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 | |||
| 74 | # include <unistd.h> | 74 | # include <unistd.h> |
| 75 | #endif | 75 | #endif |
| 76 | 76 | ||
| 77 | #ifndef __attribute__ | ||
| 78 | # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) | ||
| 79 | # define __attribute__(Spec) /* empty */ | ||
| 80 | # endif | ||
| 81 | #endif | ||
| 82 | |||
| 77 | /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ | 83 | /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ |
| 78 | 84 | ||
| 79 | /* The definition of _GL_ARG_NONNULL is copied here. */ | 85 | /* The definition of _GL_ARG_NONNULL is copied here. */ |
| @@ -95,6 +101,23 @@ struct random_data | |||
| 95 | #endif | 101 | #endif |
| 96 | 102 | ||
| 97 | 103 | ||
| 104 | #if @GNULIB__EXIT@ | ||
| 105 | /* Terminate the current process with the given return code, without running | ||
| 106 | the 'atexit' handlers. */ | ||
| 107 | # if !@HAVE__EXIT@ | ||
| 108 | _GL_FUNCDECL_SYS (_Exit, void, (int status) __attribute__ ((__noreturn__))); | ||
| 109 | # endif | ||
| 110 | _GL_CXXALIAS_SYS (_Exit, void, (int status)); | ||
| 111 | _GL_CXXALIASWARN (_Exit); | ||
| 112 | #elif defined GNULIB_POSIXCHECK | ||
| 113 | # undef _Exit | ||
| 114 | # if HAVE_RAW_DECL__EXIT | ||
| 115 | _GL_WARN_ON_USE (_Exit, "_Exit is unportable - " | ||
| 116 | "use gnulib module _Exit for portability"); | ||
| 117 | # endif | ||
| 118 | #endif | ||
| 119 | |||
| 120 | |||
| 98 | #if @GNULIB_ATOLL@ | 121 | #if @GNULIB_ATOLL@ |
| 99 | /* Parse a signed decimal integer. | 122 | /* Parse a signed decimal integer. |
| 100 | Returns the value of the integer. Errors are not detected. */ | 123 | Returns the value of the integer. Errors are not detected. */ |
| @@ -112,7 +135,7 @@ _GL_WARN_ON_USE (atoll, "atoll is unportable - " | |||
| 112 | #endif | 135 | #endif |
| 113 | 136 | ||
| 114 | #if @GNULIB_CALLOC_POSIX@ | 137 | #if @GNULIB_CALLOC_POSIX@ |
| 115 | # if !@HAVE_CALLOC_POSIX@ | 138 | # if @REPLACE_CALLOC@ |
| 116 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 139 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 117 | # undef calloc | 140 | # undef calloc |
| 118 | # define calloc rpl_calloc | 141 | # define calloc rpl_calloc |
| @@ -218,7 +241,7 @@ _GL_WARN_ON_USE (ptsname, "grantpt is not portable - " | |||
| 218 | #endif | 241 | #endif |
| 219 | 242 | ||
| 220 | #if @GNULIB_MALLOC_POSIX@ | 243 | #if @GNULIB_MALLOC_POSIX@ |
| 221 | # if !@HAVE_MALLOC_POSIX@ | 244 | # if @REPLACE_MALLOC@ |
| 222 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 245 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 223 | # undef malloc | 246 | # undef malloc |
| 224 | # define malloc rpl_malloc | 247 | # define malloc rpl_malloc |
| @@ -477,7 +500,7 @@ _GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - " | |||
| 477 | 500 | ||
| 478 | 501 | ||
| 479 | #if @GNULIB_REALLOC_POSIX@ | 502 | #if @GNULIB_REALLOC_POSIX@ |
| 480 | # if !@HAVE_REALLOC_POSIX@ | 503 | # if @REPLACE_REALLOC@ |
| 481 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 504 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 482 | # undef realloc | 505 | # undef realloc |
| 483 | # define realloc rpl_realloc | 506 | # define realloc rpl_realloc |
