diff options
Diffstat (limited to 'gl/stdlib.in.h')
-rw-r--r-- | gl/stdlib.in.h | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/gl/stdlib.in.h b/gl/stdlib.in.h index d74c2518..d4ac4690 100644 --- a/gl/stdlib.in.h +++ b/gl/stdlib.in.h @@ -74,6 +74,12 @@ struct random_data # include <unistd.h> #endif +#ifndef __attribute__ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) +# define __attribute__(Spec) /* empty */ +# endif +#endif + /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ @@ -95,6 +101,23 @@ struct random_data #endif +#if @GNULIB__EXIT@ +/* Terminate the current process with the given return code, without running + the 'atexit' handlers. */ +# if !@HAVE__EXIT@ +_GL_FUNCDECL_SYS (_Exit, void, (int status) __attribute__ ((__noreturn__))); +# endif +_GL_CXXALIAS_SYS (_Exit, void, (int status)); +_GL_CXXALIASWARN (_Exit); +#elif defined GNULIB_POSIXCHECK +# undef _Exit +# if HAVE_RAW_DECL__EXIT +_GL_WARN_ON_USE (_Exit, "_Exit is unportable - " + "use gnulib module _Exit for portability"); +# endif +#endif + + #if @GNULIB_ATOLL@ /* Parse a signed decimal integer. Returns the value of the integer. Errors are not detected. */ @@ -112,7 +135,7 @@ _GL_WARN_ON_USE (atoll, "atoll is unportable - " #endif #if @GNULIB_CALLOC_POSIX@ -# if !@HAVE_CALLOC_POSIX@ +# if @REPLACE_CALLOC@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef calloc # define calloc rpl_calloc @@ -218,7 +241,7 @@ _GL_WARN_ON_USE (ptsname, "grantpt is not portable - " #endif #if @GNULIB_MALLOC_POSIX@ -# if !@HAVE_MALLOC_POSIX@ +# if @REPLACE_MALLOC@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef malloc # define malloc rpl_malloc @@ -477,7 +500,7 @@ _GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - " #if @GNULIB_REALLOC_POSIX@ -# if !@HAVE_REALLOC_POSIX@ +# if @REPLACE_REALLOC@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef realloc # define realloc rpl_realloc |