aboutsummaryrefslogtreecommitdiff
path: root/libmudflap
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>2004-06-04 17:20:22 +0000
committerPer Bothner <per@bothner.com>2004-06-04 17:20:22 +0000
commit917bfed8acb0de83568e8182f4bb1dec1a0f0aae (patch)
tree5dcf7fe1d68429aacfe1225763a6f492a238d0e5 /libmudflap
parentfdf3e8bae00ea167e6eefb6e8a6038cc0ea5e997 (diff)
* 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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@82627 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libmudflap')
-rw-r--r--libmudflap/ChangeLog10
-rw-r--r--libmudflap/config.h.in15
-rwxr-xr-xlibmudflap/configure12
-rw-r--r--libmudflap/configure.in5
-rw-r--r--libmudflap/mf-hooks2.c16
-rw-r--r--libmudflap/mf-runtime.c4
6 files changed, 55 insertions, 7 deletions
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 <per@bothner.com>
+
+ * 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 <aj@suse.de>
* 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 <memory.h> header file. */
#undef HAVE_MEMORY_H
+/* Define to 1 if you have the <netdb.h> header file. */
+#undef HAVE_NETDB_H
+
/* define if you have <pthread.h> */
#undef HAVE_PTHREAD_H
@@ -63,12 +66,24 @@
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
+/* Define to 1 if you have the <sys/ipc.h> header file. */
+#undef HAVE_SYS_IPC_H
+
+/* Define to 1 if you have the <sys/sem.h> header file. */
+#undef HAVE_SYS_SEM_H
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#undef HAVE_SYS_SOCKET_H
+
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
+/* Define to 1 if you have the <sys/wait.h> 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 <sys/socket.h>
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 <netdb.h>
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 <sys/wait.h>
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 <sys/ipc.h>
#include <sys/sem.h>
@@ -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)
{