diff options
Diffstat (limited to 'portable/system.h')
-rw-r--r-- | portable/system.h | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/portable/system.h b/portable/system.h index 3be86dd..544b2de 100644 --- a/portable/system.h +++ b/portable/system.h @@ -5,15 +5,17 @@ * file is the equivalent of including all of the following headers, * portably: * - * #include <sys/types.h> + * #include <inttypes.h> + * #include <limits.h> * #include <stdarg.h> * #include <stdbool.h> + * #include <stddef.h> * #include <stdio.h> * #include <stdlib.h> - * #include <stddef.h> * #include <stdint.h> * #include <string.h> * #include <strings.h> + * #include <sys/types.h> * #include <unistd.h> * * Missing functions are provided via #define or prototyped if available from @@ -43,21 +45,22 @@ #include <portable/macros.h> /* A set of standard ANSI C headers. We don't care about pre-ANSI systems. */ +#if HAVE_INTTYPES_H +# include <inttypes.h> +#endif +#include <limits.h> #include <stdarg.h> #include <stddef.h> +#if HAVE_STDINT_H +# include <stdint.h> +#endif #include <stdio.h> #include <stdlib.h> -#include <sys/types.h> #include <string.h> #if HAVE_STRINGS_H # include <strings.h> #endif -#if HAVE_INTTYPES_H -# include <inttypes.h> -#endif -#if HAVE_STDINT_H -# include <stdint.h> -#endif +#include <sys/types.h> #if HAVE_UNISTD_H # include <unistd.h> #endif @@ -127,6 +130,9 @@ extern int vsnprintf(char *, size_t, const char *, va_list); #if !HAVE_MKSTEMP extern int mkstemp(char *); #endif +#if !HAVE_REALLOCARRAY +extern void *reallocarray(void *, size_t, size_t); +#endif #if !HAVE_SETENV extern int setenv(const char *, const char *, int); #endif |