diff options
author | Russ Allbery <eagle@eyrie.org> | 2014-07-11 20:18:41 -0700 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2014-07-11 22:38:49 -0700 |
commit | da0aba21779529d98436e42323fc12f702390969 (patch) | |
tree | 950e33ac99f2ff45303e939bf74f8bfbbb635215 /portable/system.h | |
parent | 2971570d0e90bd166d87eff14e9e42c095c9f614 (diff) |
Update to rra-c-util 5.5 and C TAP Harness 3.1
Update to rra-c-util 5.5:
* Use Lancaster Consensus environment variables to control tests.
* Use calloc or reallocarray for protection against integer overflows.
* Suppress warnings from Kerberos headers in non-system paths.
* Assume calloc initializes pointers to NULL.
* Assume free(NULL) is properly ignored.
* Improve error handling in xasprintf and xvasprintf.
* Check the return status of snprintf and vsnprintf properly.
* Preserve errno if snprintf fails in vasprintf replacement.
Update to C TAP Harness 3.1:
* Reopen standard input to /dev/null when running a test list.
* Don't leak extraneous file descriptors to tests.
* Suppress lazy plans and test summaries if the test failed with bail.
* runtests now treats the command line as a list of tests by default.
* The full test executable path can now be passed to runtests -o.
* Improved harness output for tests with lazy plans.
* Improved harness output to a terminal for some abort cases.
* Flush harness output after each test even when not on a terminal.
Change-Id: I05161eb3d3be49a98f7762e876cb114da0c84e9a
Reviewed-on: https://gerrit.stanford.edu/1529
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
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 |