mkstemp.c: Check HAVE_SYS_TIME_H before including sys/time.h
authorJeffrey A Law <law@cygnus.com>
Tue, 13 Oct 1998 23:08:18 +0000 (23:08 +0000)
committerJeff Law <law@gcc.gnu.org>
Tue, 13 Oct 1998 23:08:18 +0000 (17:08 -0600)
        * mkstemp.c: Check HAVE_SYS_TIME_H before including sys/time.h
        * configure.in (AC_CHECK_HEADERS): Check for sys/time.h too.
        * config.in, configure: Rebuilt.

From-SVN: r23067

libiberty/ChangeLog
libiberty/config.in
libiberty/configure
libiberty/configure.in
libiberty/mkstemp.c

index 73e0dc8f2811656e0fa682256e886c24e9cc31b8..9c5359c21e3d123cbcfd849976f1cd91791fb855 100644 (file)
@@ -1,5 +1,9 @@
 Tue Oct 13 23:51:51 1998  Jeffrey A Law  (law@cygnus.com)
 
+        * mkstemp.c: Check HAVE_SYS_TIME_H before including sys/time.h
+        * configure.in (AC_CHECK_HEADERS): Check for sys/time.h too.
+        * config.in, configure: Rebuilt.
+
        * getopt.c: Check HAVE_STRINGS_H before including strings.h.
        * configure.in (AC_CHECK_HEADERS): Check for strings.h too.
        * config.in, configure: Rebuilt.
index 51da79847498293ca14042ffb0c07a6b24c00cbb..3f47928afbe4e6e4cbf252dda0a9e069d0d1f8b9 100644 (file)
 /* Define if you have the <sys/param.h> header file.  */
 #undef HAVE_SYS_PARAM_H
 
+/* Define if you have the <sys/time.h> header file.  */
+#undef HAVE_SYS_TIME_H
+
 /* Define if you have the <unistd.h> header file.  */
 #undef HAVE_UNISTD_H
index 52de547b8c5c9e97162ef4858fe68c08b26df576..cf36e1e925b3e2d42de37b4a5004baf4091abc85 100755 (executable)
@@ -1027,7 +1027,7 @@ else
 fi
 echo "$ac_t""$CPP" 1>&6
 
-for ac_hdr in sys/file.h sys/param.h stdlib.h string.h unistd.h strings.h
+for ac_hdr in sys/file.h sys/param.h stdlib.h string.h unistd.h strings.h sys/time.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
index 57b9071f25bb48787e7368080797648e71d7e64b..ee824595cdc2327fd74eeed1b51025b5e27f43b3 100644 (file)
@@ -106,7 +106,7 @@ AC_SUBST_FILE(host_makefile_frag)
 # It's OK to check for header files.  Although the compiler may not be
 # able to link anything, it had better be able to at least compile
 # something.
-AC_CHECK_HEADERS(sys/file.h sys/param.h stdlib.h string.h unistd.h strings.h)
+AC_CHECK_HEADERS(sys/file.h sys/param.h stdlib.h string.h unistd.h strings.h sys/time.h)
 
 # This is the list of functions which libiberty will provide if they
 # are not available on the host.
index f0eb78c1e2af4da688a4f9cfdfb4d7aeabab10dd..af496d532e874fd0eda45d62762c64fadc821121 100644 (file)
@@ -33,7 +33,9 @@
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
+#ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
+#endif
 #include "ansidecl.h"
 #else
 #include "system.h"