mirror of https://github.com/lukechilds/node.git
Ryan Dahl
14 years ago
8 changed files with 626 additions and 191 deletions
@ -0,0 +1,81 @@ |
|||
/* config.h. Generated from config.h.in by configure. */ |
|||
/* config.h.in. Generated from configure.ac by autoheader. */ |
|||
|
|||
/* Define to 1 if you have the <dlfcn.h> header file. */ |
|||
#define HAVE_DLFCN_H 1 |
|||
|
|||
/* fdatasync(2) is available */ |
|||
#define HAVE_FDATASYNC 1 |
|||
|
|||
/* futimes(2) is available */ |
|||
#define HAVE_FUTIMES 1 |
|||
|
|||
/* Define to 1 if you have the <inttypes.h> header file. */ |
|||
#define HAVE_INTTYPES_H 1 |
|||
|
|||
/* Define to 1 if you have the <memory.h> header file. */ |
|||
#define HAVE_MEMORY_H 1 |
|||
|
|||
/* pread(2) and pwrite(2) are available */ |
|||
#define HAVE_PREADWRITE 1 |
|||
|
|||
/* readahead(2) is available (linux) */ |
|||
/* #undef HAVE_READAHEAD */ |
|||
|
|||
/* sendfile(2) is available and supported */ |
|||
#define HAVE_SENDFILE 1 |
|||
|
|||
/* Define to 1 if you have the <stdint.h> header file. */ |
|||
#define HAVE_STDINT_H 1 |
|||
|
|||
/* Define to 1 if you have the <stdlib.h> header file. */ |
|||
#define HAVE_STDLIB_H 1 |
|||
|
|||
/* Define to 1 if you have the <strings.h> header file. */ |
|||
#define HAVE_STRINGS_H 1 |
|||
|
|||
/* Define to 1 if you have the <string.h> header file. */ |
|||
#define HAVE_STRING_H 1 |
|||
|
|||
/* sync_file_range(2) is available */ |
|||
/* #undef HAVE_SYNC_FILE_RANGE */ |
|||
|
|||
/* Define to 1 if you have the <sys/stat.h> header file. */ |
|||
#define HAVE_SYS_STAT_H 1 |
|||
|
|||
/* Define to 1 if you have the <sys/types.h> header file. */ |
|||
#define HAVE_SYS_TYPES_H 1 |
|||
|
|||
/* Define to 1 if you have the <unistd.h> header file. */ |
|||
#define HAVE_UNISTD_H 1 |
|||
|
|||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
|||
*/ |
|||
#define LT_OBJDIR ".libs/" |
|||
|
|||
/* Name of package */ |
|||
#define PACKAGE "libeio" |
|||
|
|||
/* Define to the address where bug reports for this package should be sent. */ |
|||
#define PACKAGE_BUGREPORT "" |
|||
|
|||
/* Define to the full name of this package. */ |
|||
#define PACKAGE_NAME "" |
|||
|
|||
/* Define to the full name and version of this package. */ |
|||
#define PACKAGE_STRING "" |
|||
|
|||
/* Define to the one symbol short name of this package. */ |
|||
#define PACKAGE_TARNAME "" |
|||
|
|||
/* Define to the home page for this package. */ |
|||
#define PACKAGE_URL "" |
|||
|
|||
/* Define to the version of this package. */ |
|||
#define PACKAGE_VERSION "" |
|||
|
|||
/* Define to 1 if you have the ANSI C header files. */ |
|||
#define STDC_HEADERS 1 |
|||
|
|||
/* Version number of package */ |
|||
#define VERSION "1.0" |
@ -0,0 +1,81 @@ |
|||
/* config.h. Generated from config.h.in by configure. */ |
|||
/* config.h.in. Generated from configure.ac by autoheader. */ |
|||
|
|||
/* Define to 1 if you have the <dlfcn.h> header file. */ |
|||
#define HAVE_DLFCN_H 1 |
|||
|
|||
/* fdatasync(2) is available */ |
|||
#define HAVE_FDATASYNC 1 |
|||
|
|||
/* futimes(2) is available */ |
|||
#define HAVE_FUTIMES 1 |
|||
|
|||
/* Define to 1 if you have the <inttypes.h> header file. */ |
|||
#define HAVE_INTTYPES_H 1 |
|||
|
|||
/* Define to 1 if you have the <memory.h> header file. */ |
|||
#define HAVE_MEMORY_H 1 |
|||
|
|||
/* pread(2) and pwrite(2) are available */ |
|||
#define HAVE_PREADWRITE 1 |
|||
|
|||
/* readahead(2) is available (linux) */ |
|||
#define HAVE_READAHEAD 1 |
|||
|
|||
/* sendfile(2) is available and supported */ |
|||
#define HAVE_SENDFILE 1 |
|||
|
|||
/* Define to 1 if you have the <stdint.h> header file. */ |
|||
#define HAVE_STDINT_H 1 |
|||
|
|||
/* Define to 1 if you have the <stdlib.h> header file. */ |
|||
#define HAVE_STDLIB_H 1 |
|||
|
|||
/* Define to 1 if you have the <strings.h> header file. */ |
|||
#define HAVE_STRINGS_H 1 |
|||
|
|||
/* Define to 1 if you have the <string.h> header file. */ |
|||
#define HAVE_STRING_H 1 |
|||
|
|||
/* sync_file_range(2) is available */ |
|||
#define HAVE_SYNC_FILE_RANGE 1 |
|||
|
|||
/* Define to 1 if you have the <sys/stat.h> header file. */ |
|||
#define HAVE_SYS_STAT_H 1 |
|||
|
|||
/* Define to 1 if you have the <sys/types.h> header file. */ |
|||
#define HAVE_SYS_TYPES_H 1 |
|||
|
|||
/* Define to 1 if you have the <unistd.h> header file. */ |
|||
#define HAVE_UNISTD_H 1 |
|||
|
|||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
|||
*/ |
|||
#define LT_OBJDIR ".libs/" |
|||
|
|||
/* Name of package */ |
|||
#define PACKAGE "libeio" |
|||
|
|||
/* Define to the address where bug reports for this package should be sent. */ |
|||
#define PACKAGE_BUGREPORT "" |
|||
|
|||
/* Define to the full name of this package. */ |
|||
#define PACKAGE_NAME "" |
|||
|
|||
/* Define to the full name and version of this package. */ |
|||
#define PACKAGE_STRING "" |
|||
|
|||
/* Define to the one symbol short name of this package. */ |
|||
#define PACKAGE_TARNAME "" |
|||
|
|||
/* Define to the home page for this package. */ |
|||
#define PACKAGE_URL "" |
|||
|
|||
/* Define to the version of this package. */ |
|||
#define PACKAGE_VERSION "" |
|||
|
|||
/* Define to 1 if you have the ANSI C header files. */ |
|||
#define STDC_HEADERS 1 |
|||
|
|||
/* Version number of package */ |
|||
#define VERSION "1.0" |
@ -0,0 +1,81 @@ |
|||
/* config.h. Generated from config.h.in by configure. */ |
|||
/* config.h.in. Generated from configure.ac by autoheader. */ |
|||
|
|||
/* Define to 1 if you have the <dlfcn.h> header file. */ |
|||
#define HAVE_DLFCN_H 1 |
|||
|
|||
/* fdatasync(2) is available */ |
|||
#define HAVE_FDATASYNC 1 |
|||
|
|||
/* futimes(2) is available */ |
|||
/* #undef HAVE_FUTIMES */ |
|||
|
|||
/* Define to 1 if you have the <inttypes.h> header file. */ |
|||
#define HAVE_INTTYPES_H 1 |
|||
|
|||
/* Define to 1 if you have the <memory.h> header file. */ |
|||
#define HAVE_MEMORY_H 1 |
|||
|
|||
/* pread(2) and pwrite(2) are available */ |
|||
#define HAVE_PREADWRITE 1 |
|||
|
|||
/* readahead(2) is available (linux) */ |
|||
/* #undef HAVE_READAHEAD */ |
|||
|
|||
/* sendfile(2) is available and supported */ |
|||
/* #undef HAVE_SENDFILE */ |
|||
|
|||
/* Define to 1 if you have the <stdint.h> header file. */ |
|||
#define HAVE_STDINT_H 1 |
|||
|
|||
/* Define to 1 if you have the <stdlib.h> header file. */ |
|||
#define HAVE_STDLIB_H 1 |
|||
|
|||
/* Define to 1 if you have the <strings.h> header file. */ |
|||
#define HAVE_STRINGS_H 1 |
|||
|
|||
/* Define to 1 if you have the <string.h> header file. */ |
|||
#define HAVE_STRING_H 1 |
|||
|
|||
/* sync_file_range(2) is available */ |
|||
/* #undef HAVE_SYNC_FILE_RANGE */ |
|||
|
|||
/* Define to 1 if you have the <sys/stat.h> header file. */ |
|||
#define HAVE_SYS_STAT_H 1 |
|||
|
|||
/* Define to 1 if you have the <sys/types.h> header file. */ |
|||
#define HAVE_SYS_TYPES_H 1 |
|||
|
|||
/* Define to 1 if you have the <unistd.h> header file. */ |
|||
#define HAVE_UNISTD_H 1 |
|||
|
|||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
|||
*/ |
|||
#define LT_OBJDIR ".libs/" |
|||
|
|||
/* Name of package */ |
|||
#define PACKAGE "libeio" |
|||
|
|||
/* Define to the address where bug reports for this package should be sent. */ |
|||
#define PACKAGE_BUGREPORT "" |
|||
|
|||
/* Define to the full name of this package. */ |
|||
#define PACKAGE_NAME "" |
|||
|
|||
/* Define to the full name and version of this package. */ |
|||
#define PACKAGE_STRING "" |
|||
|
|||
/* Define to the one symbol short name of this package. */ |
|||
#define PACKAGE_TARNAME "" |
|||
|
|||
/* Define to the home page for this package. */ |
|||
#define PACKAGE_URL "" |
|||
|
|||
/* Define to the version of this package. */ |
|||
#define PACKAGE_VERSION "" |
|||
|
|||
/* Define to 1 if you have the ANSI C header files. */ |
|||
#define STDC_HEADERS 1 |
|||
|
|||
/* Version number of package */ |
|||
#define VERSION "1.0" |
@ -1,127 +1,19 @@ |
|||
import Options |
|||
import sys |
|||
import platform |
|||
|
|||
def set_options(opt): |
|||
pass |
|||
#opt.tool_options('compiler_cc') |
|||
|
|||
def configure(conf): |
|||
print "--- libeio ---" |
|||
#conf.check_tool('compiler_cc') |
|||
|
|||
conf.check(lib='pthread', uselib_store='PTHREAD') |
|||
conf.check_cc(lib="pthread", header_name="pthread.h", function_name="pthread_create", mandatory=True) |
|||
if not sys.platform.startswith("cygwin"): |
|||
conf.check_cc(lib="pthread", header_name="pthread.h", function_name="pthread_atfork", mandatory=True) |
|||
else: |
|||
conf.check_cc(lib="pthread", header_name="unistd.h", function_name="pthread_atfork", mandatory=True) |
|||
|
|||
conf.check_cc(msg="Checking for futimes(2)", define_name="HAVE_FUTIMES", fragment=""" |
|||
#include <sys/types.h> |
|||
#include <sys/time.h> |
|||
#include <utime.h> |
|||
struct timeval tv[2]; |
|||
int res; |
|||
int fd; |
|||
int main(void) |
|||
{ |
|||
res = futimes (fd, tv); |
|||
return 0; |
|||
} |
|||
""") |
|||
|
|||
conf.check_cc(msg="Checking for readahead(2)", define_name="HAVE_READAHEAD", fragment=""" |
|||
#include <fcntl.h> |
|||
int main(void) |
|||
{ |
|||
int fd = 0; |
|||
size_t count = 2; |
|||
ssize_t res; |
|||
res = readahead (fd, 0, count); |
|||
return 0; |
|||
} |
|||
""") |
|||
|
|||
conf.check_cc(msg="Checking for fdatasync(2)", define_name="HAVE_FDATASYNC", fragment=""" |
|||
#include <unistd.h> |
|||
int main(void) |
|||
{ |
|||
int fd = 0; |
|||
fdatasync (fd); |
|||
return 0; |
|||
} |
|||
""") |
|||
|
|||
conf.check_cc(msg="Checking for pread(2) and pwrite(2)", define_name="HAVE_PREADWRITE", fragment=""" |
|||
#include <unistd.h> |
|||
int main(void) |
|||
{ |
|||
int fd = 0; |
|||
size_t count = 1; |
|||
char buf; |
|||
off_t offset = 1; |
|||
ssize_t res; |
|||
res = pread (fd, &buf, count, offset); |
|||
res = pwrite (fd, &buf, count, offset); |
|||
return 0; |
|||
} |
|||
""") |
|||
|
|||
conf.check_cc(msg="Checking for sendfile(2)" , define_name="HAVE_SENDFILE" , fragment=""" |
|||
# include <sys/types.h> |
|||
#if __linux |
|||
# include <sys/sendfile.h> |
|||
#elif __FreeBSD__ || defined(__APPLE__) |
|||
# include <sys/socket.h> |
|||
# include <sys/uio.h> |
|||
#elif __hpux |
|||
# include <sys/socket.h> |
|||
#else |
|||
# error unsupported architecture |
|||
#endif |
|||
int main(void) |
|||
{ |
|||
int fd = 0; |
|||
off_t offset = 1; |
|||
size_t count = 2; |
|||
ssize_t res; |
|||
#if __linux |
|||
res = sendfile (fd, fd, offset, count); |
|||
#elif __FreeBSD__ |
|||
res = sendfile (fd, fd, offset, count, 0, &offset, 0); |
|||
#elif __APPLE__ |
|||
res = sendfile (fd, fd, offset, &offset, 0, 0); |
|||
#elif __hpux |
|||
res = sendfile (fd, fd, offset, count, 0, 0); |
|||
#endif |
|||
return 0; |
|||
} |
|||
""") |
|||
|
|||
conf.env.append_value("CCFLAGS", "-D_GNU_SOURCE") |
|||
conf.check_cc(msg="Checking for sync_file_range(2) ", fragment=""" |
|||
#include <fcntl.h> |
|||
int main(void) |
|||
{ |
|||
int fd = 0; |
|||
off64_t offset = 1; |
|||
off64_t nbytes = 1; |
|||
unsigned int flags = SYNC_FILE_RANGE_WAIT_BEFORE|SYNC_FILE_RANGE_WRITE|SYNC_FILE_RANGE_WAIT_AFTER; |
|||
ssize_t res; |
|||
res = sync_file_range (fd, offset, nbytes, flags); |
|||
return 0; |
|||
} |
|||
""", define_name="HAVE_SYNC_FILE_RANGE") |
|||
conf.env.append_value('CCFLAGS', ['-DHAVE_CONFIG_H=1', '-D_GNU_SOURCE']) |
|||
|
|||
def build(bld): |
|||
libeio = bld.new_task_gen("cc") |
|||
libeio.source = "eio.c" |
|||
libeio.target = 'eio' |
|||
libeio.name = 'eio' |
|||
libeio.includes = '. ../..' |
|||
libeio.uselib = "PTHREAD" |
|||
libeio.install_path = None |
|||
cares = bld.new_task_gen("cc") |
|||
cares.source = "eio.c" |
|||
cares.target = 'eio' |
|||
cares.name = 'eio' |
|||
cares.includes = '. ./' + bld.env['DEST_OS'] + '-' + bld.env['DEST_CPU'] |
|||
cares.install_path = None |
|||
if bld.env["USE_DEBUG"]: |
|||
libeio.clone("debug"); |
|||
bld.install_files('${PREFIX}/include/node/', 'eio.h'); |
|||
cares.clone("debug"); |
|||
|
|||
|
@ -0,0 +1,122 @@ |
|||
/* config.h. Generated from config.h.in by configure. */ |
|||
/* config.h.in. Generated from configure.ac by autoheader. */ |
|||
|
|||
/* Define to 1 if you have the `clock_gettime' function. */ |
|||
/* #undef HAVE_CLOCK_GETTIME */ |
|||
|
|||
/* "use syscall interface for clock_gettime" */ |
|||
/* #undef HAVE_CLOCK_SYSCALL */ |
|||
|
|||
/* Define to 1 if you have the <dlfcn.h> header file. */ |
|||
#define HAVE_DLFCN_H 1 |
|||
|
|||
/* Define to 1 if you have the `epoll_ctl' function. */ |
|||
/* #undef HAVE_EPOLL_CTL */ |
|||
|
|||
/* Define to 1 if you have the `eventfd' function. */ |
|||
/* #undef HAVE_EVENTFD */ |
|||
|
|||
/* Define to 1 if you have the `inotify_init' function. */ |
|||
/* #undef HAVE_INOTIFY_INIT */ |
|||
|
|||
/* Define to 1 if you have the <inttypes.h> header file. */ |
|||
#define HAVE_INTTYPES_H 1 |
|||
|
|||
/* Define to 1 if you have the `kqueue' function. */ |
|||
#define HAVE_KQUEUE 1 |
|||
|
|||
/* Define to 1 if you have the `m' library (-lm). */ |
|||
#define HAVE_LIBM 1 |
|||
|
|||
/* Define to 1 if you have the `rt' library (-lrt). */ |
|||
/* #undef HAVE_LIBRT */ |
|||
|
|||
/* Define to 1 if you have the <memory.h> header file. */ |
|||
#define HAVE_MEMORY_H 1 |
|||
|
|||
/* Define to 1 if you have the `nanosleep' function. */ |
|||
/* #undef HAVE_NANOSLEEP */ |
|||
|
|||
/* Define to 1 if you have the `poll' function. */ |
|||
#define HAVE_POLL 1 |
|||
|
|||
/* Define to 1 if you have the <poll.h> header file. */ |
|||
#define HAVE_POLL_H 1 |
|||
|
|||
/* Define to 1 if you have the `port_create' function. */ |
|||
/* #undef HAVE_PORT_CREATE */ |
|||
|
|||
/* Define to 1 if you have the <port.h> header file. */ |
|||
/* #undef HAVE_PORT_H */ |
|||
|
|||
/* Define to 1 if you have the `select' function. */ |
|||
#define HAVE_SELECT 1 |
|||
|
|||
/* Define to 1 if you have the `signalfd' function. */ |
|||
/* #undef HAVE_SIGNALFD */ |
|||
|
|||
/* Define to 1 if you have the <stdint.h> header file. */ |
|||
#define HAVE_STDINT_H 1 |
|||
|
|||
/* Define to 1 if you have the <stdlib.h> header file. */ |
|||
#define HAVE_STDLIB_H 1 |
|||
|
|||
/* Define to 1 if you have the <strings.h> header file. */ |
|||
#define HAVE_STRINGS_H 1 |
|||
|
|||
/* Define to 1 if you have the <string.h> header file. */ |
|||
#define HAVE_STRING_H 1 |
|||
|
|||
/* Define to 1 if you have the <sys/epoll.h> header file. */ |
|||
/* #undef HAVE_SYS_EPOLL_H */ |
|||
|
|||
/* Define to 1 if you have the <sys/eventfd.h> header file. */ |
|||
/* #undef HAVE_SYS_EVENTFD_H */ |
|||
|
|||
/* Define to 1 if you have the <sys/event.h> header file. */ |
|||
#define HAVE_SYS_EVENT_H 1 |
|||
|
|||
/* Define to 1 if you have the <sys/inotify.h> header file. */ |
|||
/* #undef HAVE_SYS_INOTIFY_H */ |
|||
|
|||
/* Define to 1 if you have the <sys/queue.h> header file. */ |
|||
#define HAVE_SYS_QUEUE_H 1 |
|||
|
|||
/* Define to 1 if you have the <sys/select.h> header file. */ |
|||
#define HAVE_SYS_SELECT_H 1 |
|||
|
|||
/* Define to 1 if you have the <sys/signalfd.h> header file. */ |
|||
/* #undef HAVE_SYS_SIGNALFD_H */ |
|||
|
|||
/* Define to 1 if you have the <sys/stat.h> header file. */ |
|||
#define HAVE_SYS_STAT_H 1 |
|||
|
|||
/* Define to 1 if you have the <sys/types.h> header file. */ |
|||
#define HAVE_SYS_TYPES_H 1 |
|||
|
|||
/* Define to 1 if you have the <unistd.h> header file. */ |
|||
#define HAVE_UNISTD_H 1 |
|||
|
|||
/* Name of package */ |
|||
#define PACKAGE "libev" |
|||
|
|||
/* Define to the address where bug reports for this package should be sent. */ |
|||
#define PACKAGE_BUGREPORT "" |
|||
|
|||
/* Define to the full name of this package. */ |
|||
#define PACKAGE_NAME "" |
|||
|
|||
/* Define to the full name and version of this package. */ |
|||
#define PACKAGE_STRING "" |
|||
|
|||
/* Define to the one symbol short name of this package. */ |
|||
#define PACKAGE_TARNAME "" |
|||
|
|||
/* Define to the version of this package. */ |
|||
#define PACKAGE_VERSION "" |
|||
|
|||
/* Define to 1 if you have the ANSI C header files. */ |
|||
#define STDC_HEADERS 1 |
|||
|
|||
/* Version number of package */ |
|||
#define VERSION "3.9" |
@ -0,0 +1,122 @@ |
|||
/* config.h. Generated from config.h.in by configure. */ |
|||
/* config.h.in. Generated from configure.ac by autoheader. */ |
|||
|
|||
/* Define to 1 if you have the `clock_gettime' function. */ |
|||
/* #undef HAVE_CLOCK_GETTIME */ |
|||
|
|||
/* "use syscall interface for clock_gettime" */ |
|||
#define HAVE_CLOCK_SYSCALL 1 |
|||
|
|||
/* Define to 1 if you have the <dlfcn.h> header file. */ |
|||
#define HAVE_DLFCN_H 1 |
|||
|
|||
/* Define to 1 if you have the `epoll_ctl' function. */ |
|||
#define HAVE_EPOLL_CTL 1 |
|||
|
|||
/* Define to 1 if you have the `eventfd' function. */ |
|||
#define HAVE_EVENTFD 1 |
|||
|
|||
/* Define to 1 if you have the `inotify_init' function. */ |
|||
#define HAVE_INOTIFY_INIT 1 |
|||
|
|||
/* Define to 1 if you have the <inttypes.h> header file. */ |
|||
#define HAVE_INTTYPES_H 1 |
|||
|
|||
/* Define to 1 if you have the `kqueue' function. */ |
|||
/* #undef HAVE_KQUEUE */ |
|||
|
|||
/* Define to 1 if you have the `m' library (-lm). */ |
|||
#define HAVE_LIBM 1 |
|||
|
|||
/* Define to 1 if you have the `rt' library (-lrt). */ |
|||
/* #undef HAVE_LIBRT */ |
|||
|
|||
/* Define to 1 if you have the <memory.h> header file. */ |
|||
#define HAVE_MEMORY_H 1 |
|||
|
|||
/* Define to 1 if you have the `nanosleep' function. */ |
|||
/* #undef HAVE_NANOSLEEP */ |
|||
|
|||
/* Define to 1 if you have the `poll' function. */ |
|||
#define HAVE_POLL 1 |
|||
|
|||
/* Define to 1 if you have the <poll.h> header file. */ |
|||
#define HAVE_POLL_H 1 |
|||
|
|||
/* Define to 1 if you have the `port_create' function. */ |
|||
/* #undef HAVE_PORT_CREATE */ |
|||
|
|||
/* Define to 1 if you have the <port.h> header file. */ |
|||
/* #undef HAVE_PORT_H */ |
|||
|
|||
/* Define to 1 if you have the `select' function. */ |
|||
#define HAVE_SELECT 1 |
|||
|
|||
/* Define to 1 if you have the `signalfd' function. */ |
|||
#define HAVE_SIGNALFD 1 |
|||
|
|||
/* Define to 1 if you have the <stdint.h> header file. */ |
|||
#define HAVE_STDINT_H 1 |
|||
|
|||
/* Define to 1 if you have the <stdlib.h> header file. */ |
|||
#define HAVE_STDLIB_H 1 |
|||
|
|||
/* Define to 1 if you have the <strings.h> header file. */ |
|||
#define HAVE_STRINGS_H 1 |
|||
|
|||
/* Define to 1 if you have the <string.h> header file. */ |
|||
#define HAVE_STRING_H 1 |
|||
|
|||
/* Define to 1 if you have the <sys/epoll.h> header file. */ |
|||
#define HAVE_SYS_EPOLL_H 1 |
|||
|
|||
/* Define to 1 if you have the <sys/eventfd.h> header file. */ |
|||
#define HAVE_SYS_EVENTFD_H 1 |
|||
|
|||
/* Define to 1 if you have the <sys/event.h> header file. */ |
|||
/* #undef HAVE_SYS_EVENT_H */ |
|||
|
|||
/* Define to 1 if you have the <sys/inotify.h> header file. */ |
|||
#define HAVE_SYS_INOTIFY_H 1 |
|||
|
|||
/* Define to 1 if you have the <sys/queue.h> header file. */ |
|||
#define HAVE_SYS_QUEUE_H 1 |
|||
|
|||
/* Define to 1 if you have the <sys/select.h> header file. */ |
|||
#define HAVE_SYS_SELECT_H 1 |
|||
|
|||
/* Define to 1 if you have the <sys/signalfd.h> header file. */ |
|||
#define HAVE_SYS_SIGNALFD_H 1 |
|||
|
|||
/* Define to 1 if you have the <sys/stat.h> header file. */ |
|||
#define HAVE_SYS_STAT_H 1 |
|||
|
|||
/* Define to 1 if you have the <sys/types.h> header file. */ |
|||
#define HAVE_SYS_TYPES_H 1 |
|||
|
|||
/* Define to 1 if you have the <unistd.h> header file. */ |
|||
#define HAVE_UNISTD_H 1 |
|||
|
|||
/* Name of package */ |
|||
#define PACKAGE "libev" |
|||
|
|||
/* Define to the address where bug reports for this package should be sent. */ |
|||
#define PACKAGE_BUGREPORT "" |
|||
|
|||
/* Define to the full name of this package. */ |
|||
#define PACKAGE_NAME "" |
|||
|
|||
/* Define to the full name and version of this package. */ |
|||
#define PACKAGE_STRING "" |
|||
|
|||
/* Define to the one symbol short name of this package. */ |
|||
#define PACKAGE_TARNAME "" |
|||
|
|||
/* Define to the version of this package. */ |
|||
#define PACKAGE_VERSION "" |
|||
|
|||
/* Define to 1 if you have the ANSI C header files. */ |
|||
#define STDC_HEADERS 1 |
|||
|
|||
/* Version number of package */ |
|||
#define VERSION "3.9" |
@ -0,0 +1,122 @@ |
|||
/* config.h. Generated from config.h.in by configure. */ |
|||
/* config.h.in. Generated from configure.ac by autoheader. */ |
|||
|
|||
/* Define to 1 if you have the `clock_gettime' function. */ |
|||
/* #undef HAVE_CLOCK_GETTIME */ |
|||
|
|||
/* "use syscall interface for clock_gettime" */ |
|||
/* #undef HAVE_CLOCK_SYSCALL */ |
|||
|
|||
/* Define to 1 if you have the <dlfcn.h> header file. */ |
|||
#define HAVE_DLFCN_H 1 |
|||
|
|||
/* Define to 1 if you have the `epoll_ctl' function. */ |
|||
/* #undef HAVE_EPOLL_CTL */ |
|||
|
|||
/* Define to 1 if you have the `eventfd' function. */ |
|||
/* #undef HAVE_EVENTFD */ |
|||
|
|||
/* Define to 1 if you have the `inotify_init' function. */ |
|||
/* #undef HAVE_INOTIFY_INIT */ |
|||
|
|||
/* Define to 1 if you have the <inttypes.h> header file. */ |
|||
#define HAVE_INTTYPES_H 1 |
|||
|
|||
/* Define to 1 if you have the `kqueue' function. */ |
|||
/* #undef HAVE_KQUEUE */ |
|||
|
|||
/* Define to 1 if you have the `m' library (-lm). */ |
|||
#define HAVE_LIBM 1 |
|||
|
|||
/* Define to 1 if you have the `rt' library (-lrt). */ |
|||
/* #undef HAVE_LIBRT */ |
|||
|
|||
/* Define to 1 if you have the <memory.h> header file. */ |
|||
#define HAVE_MEMORY_H 1 |
|||
|
|||
/* Define to 1 if you have the `nanosleep' function. */ |
|||
/* #undef HAVE_NANOSLEEP */ |
|||
|
|||
/* Define to 1 if you have the `poll' function. */ |
|||
#define HAVE_POLL 1 |
|||
|
|||
/* Define to 1 if you have the <poll.h> header file. */ |
|||
#define HAVE_POLL_H 1 |
|||
|
|||
/* Define to 1 if you have the `port_create' function. */ |
|||
#define HAVE_PORT_CREATE 1 |
|||
|
|||
/* Define to 1 if you have the <port.h> header file. */ |
|||
#define HAVE_PORT_H 1 |
|||
|
|||
/* Define to 1 if you have the `select' function. */ |
|||
#define HAVE_SELECT 1 |
|||
|
|||
/* Define to 1 if you have the `signalfd' function. */ |
|||
/* #undef HAVE_SIGNALFD */ |
|||
|
|||
/* Define to 1 if you have the <stdint.h> header file. */ |
|||
#define HAVE_STDINT_H 1 |
|||
|
|||
/* Define to 1 if you have the <stdlib.h> header file. */ |
|||
#define HAVE_STDLIB_H 1 |
|||
|
|||
/* Define to 1 if you have the <strings.h> header file. */ |
|||
#define HAVE_STRINGS_H 1 |
|||
|
|||
/* Define to 1 if you have the <string.h> header file. */ |
|||
#define HAVE_STRING_H 1 |
|||
|
|||
/* Define to 1 if you have the <sys/epoll.h> header file. */ |
|||
/* #undef HAVE_SYS_EPOLL_H */ |
|||
|
|||
/* Define to 1 if you have the <sys/eventfd.h> header file. */ |
|||
/* #undef HAVE_SYS_EVENTFD_H */ |
|||
|
|||
/* Define to 1 if you have the <sys/event.h> header file. */ |
|||
/* #undef HAVE_SYS_EVENT_H */ |
|||
|
|||
/* Define to 1 if you have the <sys/inotify.h> header file. */ |
|||
/* #undef HAVE_SYS_INOTIFY_H */ |
|||
|
|||
/* Define to 1 if you have the <sys/queue.h> header file. */ |
|||
#define HAVE_SYS_QUEUE_H 1 |
|||
|
|||
/* Define to 1 if you have the <sys/select.h> header file. */ |
|||
#define HAVE_SYS_SELECT_H 1 |
|||
|
|||
/* Define to 1 if you have the <sys/signalfd.h> header file. */ |
|||
/* #undef HAVE_SYS_SIGNALFD_H */ |
|||
|
|||
/* Define to 1 if you have the <sys/stat.h> header file. */ |
|||
#define HAVE_SYS_STAT_H 1 |
|||
|
|||
/* Define to 1 if you have the <sys/types.h> header file. */ |
|||
#define HAVE_SYS_TYPES_H 1 |
|||
|
|||
/* Define to 1 if you have the <unistd.h> header file. */ |
|||
#define HAVE_UNISTD_H 1 |
|||
|
|||
/* Name of package */ |
|||
#define PACKAGE "libev" |
|||
|
|||
/* Define to the address where bug reports for this package should be sent. */ |
|||
#define PACKAGE_BUGREPORT "" |
|||
|
|||
/* Define to the full name of this package. */ |
|||
#define PACKAGE_NAME "" |
|||
|
|||
/* Define to the full name and version of this package. */ |
|||
#define PACKAGE_STRING "" |
|||
|
|||
/* Define to the one symbol short name of this package. */ |
|||
#define PACKAGE_TARNAME "" |
|||
|
|||
/* Define to the version of this package. */ |
|||
#define PACKAGE_VERSION "" |
|||
|
|||
/* Define to 1 if you have the ANSI C header files. */ |
|||
#define STDC_HEADERS 1 |
|||
|
|||
/* Version number of package */ |
|||
#define VERSION "3.9" |
@ -1,85 +1,19 @@ |
|||
import Options |
|||
import platform |
|||
|
|||
PLATFORM_IS_DARWIN = platform.platform().find('Darwin') == 0 |
|||
|
|||
def set_options(opt): |
|||
pass |
|||
#opt.tool_options('compiler_cc') |
|||
|
|||
def configure(conf): |
|||
print "--- libev ---" |
|||
#conf.check_tool('compiler_cc') |
|||
|
|||
# Why to the two checks? One is to define HAVE_SYS_EPOLL_H |
|||
# the other is to define HAVE_EPOLL_CTL |
|||
# Yes, WAF is a piece of shit. |
|||
|
|||
if conf.check_cc(header_name="sys/inotify.h"): |
|||
conf.check_cc(header_name="sys/inotify.h", function_name="inotify_init") |
|||
|
|||
if conf.check_cc(header_name="sys/epoll.h"): |
|||
conf.check_cc(header_name="sys/epoll.h", function_name="epoll_ctl") |
|||
|
|||
if conf.check_cc(header_name="port.h"): |
|||
conf.check_cc(header_name="port.h", function_name="port_create") |
|||
|
|||
if conf.check_cc(header_name="poll.h"): |
|||
conf.check_cc(header_name="poll.h", function_name="poll") |
|||
|
|||
conf.check_cc(header_name="sys/event.h") |
|||
conf.check_cc(header_name="sys/queue.h") |
|||
if PLATFORM_IS_DARWIN: |
|||
conf.check_cc(header_name="sys/event.h", function_name="kqueue") |
|||
else: |
|||
conf.check_cc(header_name="sys/queue.h", function_name="kqueue") |
|||
|
|||
if conf.check_cc(header_name="sys/select.h"): |
|||
conf.check_cc(header_name="sys/select.h", function_name="select") |
|||
|
|||
if conf.check_cc(header_name="sys/eventfd.h"): |
|||
conf.check_cc(header_name="sys/eventfd.h", function_name="eventfd") |
|||
|
|||
|
|||
code = """ |
|||
#include <syscall.h> |
|||
#include <time.h> |
|||
#include <stdio.h> |
|||
|
|||
int main() { |
|||
struct timespec ts; |
|||
int status = syscall(SYS_clock_gettime, CLOCK_REALTIME, &ts); |
|||
return 0; |
|||
} |
|||
""" |
|||
conf.check_cc(fragment=code, define_name="HAVE_CLOCK_SYSCALL", execute=True, |
|||
msg="Checking for SYS_clock_gettime") |
|||
|
|||
have_librt = conf.check(lib='rt', uselib_store='RT') |
|||
if have_librt: |
|||
conf.check_cc(lib="rt", header_name="time.h", function_name="clock_gettime") |
|||
if PLATFORM_IS_DARWIN: |
|||
conf.check_cc(header_name="time.h", function_name="nanosleep") |
|||
elif have_librt: |
|||
conf.check_cc(lib="rt", header_name="time.h", function_name="nanosleep") |
|||
|
|||
conf.check_cc(lib="m", header_name="math.h", function_name="ceil") |
|||
|
|||
conf.define("HAVE_CONFIG_H", 1) |
|||
# Not using these. |
|||
conf.env.append_value('CPPFLAGS', ['-DEV_FORK_ENABLE=0', |
|||
'-DEV_EMBED_ENABLE=0', |
|||
'-DEV_MULTIPLICITY=0']) |
|||
conf.env.append_value('CCFLAGS', ['-DHAVE_CONFIG_H=1']) |
|||
|
|||
def build(bld): |
|||
libev = bld.new_task_gen("cc") |
|||
libev.source = 'ev.c' |
|||
libev.target = 'ev' |
|||
libev.name = 'ev' |
|||
libev.includes = '. ../..' |
|||
libev.uselib = "RT" |
|||
libev.install_path = None |
|||
cares = bld.new_task_gen("cc") |
|||
cares.source = "ev.c" |
|||
cares.target = 'ev' |
|||
cares.name = 'ev' |
|||
cares.includes = '. ./' + bld.env['DEST_OS'] + '-' + bld.env['DEST_CPU'] |
|||
cares.install_path = None |
|||
if bld.env["USE_DEBUG"]: |
|||
libev.clone("debug"); |
|||
bld.install_files('${PREFIX}/include/node/', 'ev.h'); |
|||
cares.clone("debug"); |
|||
|
|||
|
Loading…
Reference in new issue