diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2001-06-19 16:21:35 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2001-06-19 16:21:35 (GMT) |
commit | fbc0f37dc5c5fd86e825dc436b56fda23a2e7ea7 (patch) | |
tree | 6c44da88a7c2d81532808b3f8c887c28290d475c /src | |
parent | 5f113eac849ee628a15e70fdfed23b3b34a7db1c (diff) | |
download | hdf5-fbc0f37dc5c5fd86e825dc436b56fda23a2e7ea7.zip hdf5-fbc0f37dc5c5fd86e825dc436b56fda23a2e7ea7.tar.gz hdf5-fbc0f37dc5c5fd86e825dc436b56fda23a2e7ea7.tar.bz2 |
[svn-r4017] Purpose:
Code cleanup
Description:
Several system header files needed to be included on Linux machines to
get the prototypes for some of the system calls we are using.
Solution:
Added a new feature test macro for including the <features.h>
header on Linux machines, to set up compile macros for system header
files.
Platforms tested:
Linux (eirene), FreeBSD 4.3 (hawkwind)
Diffstat (limited to 'src')
-rw-r--r-- | src/H5.c | 9 | ||||
-rw-r--r-- | src/H5config.h.in | 6 | ||||
-rw-r--r-- | src/H5private.h | 2 | ||||
-rw-r--r-- | src/H5public.h | 6 |
4 files changed, 14 insertions, 9 deletions
@@ -31,17 +31,10 @@ #include "H5FDmpio.h" /* we need this for the struct rusage declaration */ -#if defined(H5_HAVE_GETRUSAGE) && defined(linux) +#if defined(H5_HAVE_GETRUSAGE) && defined(H5_HAVE_SYS_RESOURCE_H) # include <sys/resource.h> #endif -/* We need this on Irix64 even though we've included stdio.h as documented */ -#ifdef FIXME_ON_IRIX_THEN -#if !defined __MWERKS__ -FILE *fdopen(int fd, const char *mode); -#endif -#endif /* FIXME_ON_IRIX_THEN */ - #define PABLO_MASK H5_mask /* statically initialize block for pthread_once call used in initializing */ diff --git a/src/H5config.h.in b/src/H5config.h.in index d61f9e3..ddfdadb 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -311,6 +311,9 @@ /* Define if you have the <stdint.h> header file. */ #undef HAVE_STDINT_H +/* Define if you have the <features.h> header file. */ +#undef HAVE_FEATURES_H + /* Define if you have the <sys/filio.h> header file. */ #undef HAVE_SYS_FILIO_H @@ -329,6 +332,9 @@ /* Define if you have the <sys/stat.h> header file. */ #undef HAVE_SYS_STAT_H +/* Define if you have the <sys/resource.h> header file. */ +#undef HAVE_SYS_RESOURCE_H + /* Define if you have the <sys/sysinfo.h> header file. */ #undef HAVE_SYS_SYSINFO_H diff --git a/src/H5private.h b/src/H5private.h index fb05118..7bc4083 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -26,7 +26,7 @@ */ #include "H5config.h" /* Include all configuration info */ -/* include the pthread library */ +/* include the pthread header */ #ifdef H5_HAVE_THREADSAFE #include <pthread.h> #endif diff --git a/src/H5public.h b/src/H5public.h index 330c6e3..270fa42 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -29,7 +29,13 @@ * prevent repeated include. */ #include "H5pubconf.h" /*from configure */ + +#ifdef H5_HAVE_FEATURES_H +#include <features.h> /*for setting POSIX, BSD, etc. compatibility */ +#endif +#ifdef H5_HAVE_SYS_TYPES_H #include <sys/types.h> +#endif #ifdef H5_STDC_HEADERS # include <limits.h> /*for H5T_NATIVE_CHAR defn in H5Tpublic.h */ #endif |