1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
/* Light Unix I/O for Lua
* Copyright 2012 Rob Kendrick <rjek+luxio@rjek.com>
*
* Distributed under the same terms as Lua itself (MIT).
*/
#ifndef LUXIO_CONFIG_H
#define LUXIO_CONFIG_H
#ifdef __linux__
# define HAVE_SENDFILE 1
# define HAVE_SPLICE 1
# define HAVE_D_TYPE 1
# define HAVE_FDATASYNC 1
# define _GNU_SOURCE
# define _LARGEFILE64_SOURCE
# define _POSIX_SOURCE
# define _POSIX_C_SOURCE 200112L
#endif
#ifdef __NetBSD__
# define ICONV_IN_TYPE const char **
#else
# define ICONV_IN_TYPE char **
#endif
#ifndef _POSIX_PTHREAD_SEMANTICS
/* Solaris horror */
# define _POSIX_PTHREAD_SEMANTICS 1
#endif
#ifndef LOGIN_NAME_MAX
# define LOGIN_NAME_MAX 9
#endif
#ifndef IFNAMSIZ
/* MINIX does not have this */
# define IFNAMSIZ 128
#endif
/* Some platforms have DT_* anyway, expose them if present */
#ifndef HAVE_D_TYPE
#ifdef DT_UNKNOWN
#define HAVE_D_TYPE
#endif
#endif
#endif /* LUXIO_CONFIG_H */
|