diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2001-06-19 16:18:42 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2001-06-19 16:18:42 (GMT) |
commit | 609950e388fd0eee2137b5ce24cfeb9e76d5cd00 (patch) | |
tree | 6c0dd2f5bf675dde44e82d1defd3f0d35850392e /configure.in | |
parent | 0a063ad4819b551774c1849693371fbbd2fa9872 (diff) | |
download | hdf5-609950e388fd0eee2137b5ce24cfeb9e76d5cd00.zip hdf5-609950e388fd0eee2137b5ce24cfeb9e76d5cd00.tar.gz hdf5-609950e388fd0eee2137b5ce24cfeb9e76d5cd00.tar.bz2 |
[svn-r4015] Purpose:
Code cleanup
Description:
Several system functions don't have prototypes on Linux machines with our
current compile flags.
Solution:
Add _POSIX_SOURCE and _BSD_SOURCE macros to the compile line when compiling
on Linux machines, to pick up missing prototypes.
Platforms tested:
Linux (eirene), FreeBSD 4.3 (hawkwind)
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/configure.in b/configure.in index 5ad4aba..470f133 100644 --- a/configure.in +++ b/configure.in @@ -415,7 +415,7 @@ AC_HEADER_TIME dnl Unix AC_CHECK_HEADERS(sys/resource.h sys/time.h unistd.h sys/ioctl.h sys/stat.h) AC_CHECK_HEADERS(sys/socket.h sys/types.h) -AC_CHECK_HEADERS(stddef.h setjmp.h) +AC_CHECK_HEADERS(stddef.h setjmp.h features.h) AC_CHECK_HEADERS(stdint.h, C9x=yes) dnl Windows AC_CHECK_HEADERS(io.h winsock.h sys/timeb.h) @@ -453,6 +453,15 @@ case "$host_cpu-$host_vendor-$host_os" in fi done fi) + dnl Add POSIX support on Linux systems, so <features.h> defines + dnl __USE_POSIX, which is required to get the prototype for fdopen + dnl defined correctly in <stdio.h> + CPPFLAGS="-D_POSIX_SOURCE $CPPFLAGS" + dnl Also add BSD support on Linux systems, so <features.h> defines + dnl __USE_BSD, which is required to get the prototype for strdup + dnl defined correctly in <string.h> and snprintf & vsnprintf defined + dnl correctly in <stdio.h> + CPPFLAGS="-D_BSD_SOURCE $CPPFLAGS" ;; esac |