Changeset 108070


Ignore:
Timestamp:
Jul 12, 2013, 5:55:23 AM (7 years ago)
Author:
jmr@…
Message:

wrap kqueue use in appropriate ifdefs

Location:
trunk/base
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/configure

    r108069 r108070  
    87838783
    87848784for ac_header in limits.h paths.h sys/file.h crt_externs.h fcntl.h sys/fcntl.h sys/cdefs.h err.h sys/socket.h \
    8785         sys/sysctl.h readline/readline.h readline/history.h pwd.h sys/paths.h utime.h
     8785        sys/event.h sys/sysctl.h readline/readline.h readline/history.h pwd.h sys/paths.h utime.h
    87868786do :
    87878787  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
     
    88008800
    88018801# Checks for library functions.
    8802 for ac_func in bzero memset fgetln lockf flock setmode strcasecmp strncasecmp strlcpy strlcat copyfile clearenv sysctlbyname
     8802for ac_func in bzero memset fgetln lockf flock setmode strcasecmp strncasecmp strlcpy strlcat copyfile clearenv sysctlbyname kqueue
    88038803do :
    88048804  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
  • trunk/base/configure.ac

    r108069 r108070  
    239239AC_HEADER_SYS_WAIT
    240240AC_CHECK_HEADERS([limits.h paths.h sys/file.h crt_externs.h fcntl.h sys/fcntl.h sys/cdefs.h err.h sys/socket.h \
    241         sys/sysctl.h readline/readline.h readline/history.h pwd.h sys/paths.h utime.h])
     241        sys/event.h sys/sysctl.h readline/readline.h readline/history.h pwd.h sys/paths.h utime.h])
    242242
    243243INCLUDES="-I.. -I. $INCLUDES"
    244244
    245245# Checks for library functions.
    246 AC_CHECK_FUNCS([bzero memset fgetln lockf flock setmode strcasecmp strncasecmp strlcpy strlcat copyfile clearenv sysctlbyname])
     246AC_CHECK_FUNCS([bzero memset fgetln lockf flock setmode strcasecmp strncasecmp strlcpy strlcat copyfile clearenv sysctlbyname kqueue])
    247247MP_CHECK_READLINK_IS_P1003_1A
    248248
  • trunk/base/src/config.h.in

    r108069 r108070  
    8484#undef HAVE_INTTYPES_H
    8585
     86/* Define to 1 if you have the `kqueue' function. */
     87#undef HAVE_KQUEUE
     88
    8689/* Define if you have the `crypto' library (-lcrypto). */
    8790#undef HAVE_LIBCRYPTO
     
    192195   */
    193196#undef HAVE_SYS_DIR_H
     197
     198/* Define to 1 if you have the <sys/event.h> header file. */
     199#undef HAVE_SYS_EVENT_H
    194200
    195201/* Define to 1 if you have the <sys/fcntl.h> header file. */
  • trunk/base/src/pextlib1.0/tracelib.c

    r108069 r108070  
    4747#include <stdlib.h>
    4848#include <string.h>
     49#if HAVE_SYS_EVENT_H
    4950#include <sys/event.h>
     51#endif
    5052#include <sys/resource.h>
    5153#include <sys/socket.h>
     
    539541}
    540542
     543#if HAVE_KQUEUE
    541544/* create this on heap rather than stack, due to its rather large size */
    542545static struct kevent res_kevents[MAX_SOCKETS];
     546#endif
     547
    543548static int TracelibRunCmd(Tcl_Interp *in) {
     549#if HAVE_KQUEUE
    544550    struct kevent kev;
    545551    int flags;
     
    773779
    774780    return TCL_OK;
     781#else
     782    Tcl_SetResult(in, "tracelib not supported on this platform", TCL_STATIC);
     783    return TCL_ERROR;
     784#endif
    775785}
    776786
Note: See TracChangeset for help on using the changeset viewer.