From: Per Bothner Date: Fri, 4 Jun 2004 17:20:22 +0000 (-0700) Subject: configure.in (LIBMUDFLAPTH): Fix thinko. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b9d71ce3e4860dd7ae12039eaa05c9731b12a095;p=gcc.git configure.in (LIBMUDFLAPTH): Fix thinko. * configure.in (LIBMUDFLAPTH): Fix thinko. * configure.in: Check for more headers. * mf-hooks2.c: Conditionalize on HAVE_SYS_SOCKET_H etc. * mf-runtime.c: In two places conditionalize on SIUSR1 rather than HAVE_SIGNAL as mingw has signal.h but not SIUSR1. From-SVN: r82627 --- diff --git a/libmudflap/ChangeLog b/libmudflap/ChangeLog index f8d30c78144..57fe2ebfa42 100644 --- a/libmudflap/ChangeLog +++ b/libmudflap/ChangeLog @@ -1,3 +1,13 @@ +2004-06-04 Per Bothner + + * configure.in (LIBMUDFLAPTH): Fix thinko. + + * configure.in: Check for more headers. + * mf-hooks2.c: Conditionalize on HAVE_SYS_SOCKET_H etc. + + * mf-runtime.c: In two places conditionalize on SIUSR1 rather than + HAVE_SIGNAL as mingw has signal.h but not SIUSR1. + 2004-06-01 Andreas Jaeger * configure.in: Handle multilibs, support diff --git a/libmudflap/config.h.in b/libmudflap/config.h.in index 3e3aa1227ee..3c5484276db 100644 --- a/libmudflap/config.h.in +++ b/libmudflap/config.h.in @@ -36,6 +36,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H +/* Define to 1 if you have the header file. */ +#undef HAVE_NETDB_H + /* define if you have */ #undef HAVE_PTHREAD_H @@ -63,12 +66,24 @@ /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_IPC_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SEM_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SOCKET_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_WAIT_H + /* union semun defined in sys/ipc.h or sys/sem.h */ #undef HAVE_UNION_SEMUN diff --git a/libmudflap/configure b/libmudflap/configure index 3a532f4c501..fab36079c13 100755 --- a/libmudflap/configure +++ b/libmudflap/configure @@ -3574,7 +3574,13 @@ done -for ac_header in stdint.h execinfo.h signal.h dlfcn.h + + + + + +for ac_header in stdint.h execinfo.h signal.h dlfcn.h \ + netdb.h sys/ipc.h sys/sem.h sys/wait.h sys/socket.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then @@ -4790,7 +4796,7 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic" case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 4793 "configure"' > conftest.$ac_ext + echo '#line 4799 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5424,7 +5430,7 @@ fi -if test "x$ac_have_pthread_h" != ""; then +if test "$ac_have_pthread_h" != ""; then LIBMUDFLAPTH_TRUE= LIBMUDFLAPTH_FALSE='#' else diff --git a/libmudflap/configure.in b/libmudflap/configure.in index c04c80c1f57..3bb2633c3d7 100644 --- a/libmudflap/configure.in +++ b/libmudflap/configure.in @@ -62,7 +62,8 @@ AC_TRY_COMPILE([ [AC_MSG_RESULT(no) enable_shared=no]) -AC_CHECK_HEADERS(stdint.h execinfo.h signal.h dlfcn.h) +AC_CHECK_HEADERS(stdint.h execinfo.h signal.h dlfcn.h \ + netdb.h sys/ipc.h sys/sem.h sys/wait.h sys/socket.h) AC_CHECK_FUNCS(backtrace backtrace_symbols gettimeofday signal) dnl Check for 64-bit stdio calls related to Large File Support @@ -114,7 +115,7 @@ ac_have_pthread_h=yes ],[ ac_have_pthread_h= ]) -AM_CONDITIONAL(LIBMUDFLAPTH, [test "x$ac_have_pthread_h" != ""]) +AM_CONDITIONAL(LIBMUDFLAPTH, [test "$ac_have_pthread_h" != ""]) AC_CHECK_LIB(dl, dlsym) diff --git a/libmudflap/mf-hooks2.c b/libmudflap/mf-hooks2.c index b0867729979..601dc24fb12 100644 --- a/libmudflap/mf-hooks2.c +++ b/libmudflap/mf-hooks2.c @@ -1206,6 +1206,8 @@ WRAPPER2(struct dirent *, readdir, DIR *dir) } #endif +#ifdef HAVE_SYS_SOCKET_H + #ifdef WRAP_recv #include WRAPPER2(int, recv, int s, void *buf, size_t len, int flags) @@ -1327,6 +1329,8 @@ WRAPPER2(int, connect, int sockfd, const struct sockaddr *addr, } #endif +#endif /* HAVE_SYS_SOCKET_H */ + #ifdef WRAP_gethostname WRAPPER2(int, gethostname, char *name, size_t len) { @@ -1345,6 +1349,8 @@ WRAPPER2(int, sethostname, const char *name, size_t len) } #endif +#ifdef HAVE_NETDB_H + #ifdef WRAP_gethostbyname #include WRAPPER2(struct hostent *, gethostbyname, const char *name) @@ -1425,6 +1431,10 @@ WRAPPER2(struct hostent *, gethostbyname, const char *name) } #endif +#endif /* HAVE_NETDB_H */ + +#ifdef SYS_WAIT_H + #ifdef WRAP_wait #include WRAPPER2(pid_t, wait, int *status) @@ -1449,6 +1459,8 @@ WRAPPER2(pid_t, waitpid, pid_t pid, int *status, int options) } #endif +#endif /* HAVE_SYS_WAIT_H */ + #ifdef WRAP_popen WRAPPER2(FILE *, popen, const char *command, const char *mode) { @@ -1651,6 +1663,8 @@ WRAPPER2(void *, dlsym, void *handle, char *symbol) } #endif +#if defined(HAVE_SYS_IPC_H) && defined(HAVE_SYS_SEM_H) + #ifdef WRAP_semop #include #include @@ -1765,3 +1779,5 @@ WRAPPER2(int, shmdt, const void *shmaddr) } #endif +#endif /* defined(HAVE_SYS_IPC_H) && defined(HAVE_SYS_SEM_H) */ + diff --git a/libmudflap/mf-runtime.c b/libmudflap/mf-runtime.c index 8d5ed8c3665..71890364b72 100644 --- a/libmudflap/mf-runtime.c +++ b/libmudflap/mf-runtime.c @@ -296,7 +296,7 @@ options [] = {"collect-stats", "collect statistics on mudflap's operation", set_option, 1, &__mf_opts.collect_stats}, -#if HAVE_SIGNAL +#ifdef SIGUSR1 {"sigusr1-report", "print report upon SIGUSR1", set_option, 1, &__mf_opts.sigusr1_report}, @@ -2354,7 +2354,7 @@ __mf_sigusr1_respond () { static int handler_installed; -#if HAVE_SIGNAL +#ifdef SIGUSR1 /* Manage handler */ if (__mf_opts.sigusr1_report && ! handler_installed) {