diff options
author | Russ Allbery <eagle@eyrie.org> | 2014-07-16 13:43:17 -0700 |
---|---|---|
committer | Russ Allbery <eagle@eyrie.org> | 2014-07-16 13:43:17 -0700 |
commit | 6409733ee3b7b1910dc1c166a392cc628834146c (patch) | |
tree | e9460f8f2ca0f3676afeed2a9dcf549acfc39b53 /portable/system.h | |
parent | 334ed844cbb5c8f7ea82a94c701a3016dd6950b9 (diff) | |
parent | f8963ceb19cd2b503b981f43a3f8c0f45649989f (diff) |
Imported Upstream version 1.1
Diffstat (limited to 'portable/system.h')
-rw-r--r-- | portable/system.h | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/portable/system.h b/portable/system.h index d1ccc94..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 @@ -22,7 +24,7 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at <http://www.eyrie.org/~eagle/software/rra-c-util/>. * - * Written by Russ Allbery <rra@stanford.edu> + * Written by Russ Allbery <eagle@eyrie.org> * * The authors hereby relinquish any claim to any copyright that they may have * in this work, whether granted under contract or by operation of law or @@ -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 |