| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
#if __GNUC__ >= 3 |
| 19 |
@PRAGMA_SYSTEM_HEADER@ |
| 20 |
#endif |
| 21 |
@PRAGMA_COLUMNS@ |
| 22 |
|
| 23 |
#if defined __need_system_stdlib_h || defined __need_malloc_and_calloc |
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
#@INCLUDE_NEXT@ @NEXT_STDLIB_H@ |
| 28 |
|
| 29 |
#else |
| 30 |
|
| 31 |
|
| 32 |
#ifndef _@GUARD_PREFIX@_STDLIB_H |
| 33 |
|
| 34 |
|
| 35 |
#@INCLUDE_NEXT@ @NEXT_STDLIB_H@ |
| 36 |
|
| 37 |
#ifndef _@GUARD_PREFIX@_STDLIB_H |
| 38 |
#define _@GUARD_PREFIX@_STDLIB_H |
| 39 |
|
| 40 |
|
| 41 |
#include <stddef.h> |
| 42 |
|
| 43 |
|
| 44 |
#if @GNULIB_SYSTEM_POSIX@ && !defined WEXITSTATUS |
| 45 |
# include <sys/wait.h> |
| 46 |
#endif |
| 47 |
|
| 48 |
|
| 49 |
#if (@GNULIB_GETLOADAVG@ || defined GNULIB_POSIXCHECK) && @HAVE_SYS_LOADAVG_H@ |
| 50 |
|
| 51 |
|
| 52 |
# include <sys/time.h> |
| 53 |
# include <sys/loadavg.h> |
| 54 |
#endif |
| 55 |
|
| 56 |
|
| 57 |
#if defined _WIN32 && !defined __CYGWIN__ |
| 58 |
# include <io.h> |
| 59 |
#endif |
| 60 |
|
| 61 |
#if @GNULIB_RANDOM_R@ |
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
# if @HAVE_RANDOM_H@ |
| 67 |
# include <random.h> |
| 68 |
# endif |
| 69 |
|
| 70 |
# if !@HAVE_STRUCT_RANDOM_DATA@ || @REPLACE_RANDOM_R@ || !@HAVE_RANDOM_R@ |
| 71 |
# include <stdint.h> |
| 72 |
# endif |
| 73 |
|
| 74 |
# if !@HAVE_STRUCT_RANDOM_DATA@ |
| 75 |
|
| 76 |
|
| 77 |
# if !GNULIB_defined_struct_random_data |
| 78 |
struct random_data |
| 79 |
{ |
| 80 |
int32_t *fptr; |
| 81 |
int32_t *rptr; |
| 82 |
int32_t *state; |
| 83 |
int rand_type; |
| 84 |
int rand_deg; |
| 85 |
int rand_sep; |
| 86 |
int32_t *end_ptr; |
| 87 |
}; |
| 88 |
# define GNULIB_defined_struct_random_data 1 |
| 89 |
# endif |
| 90 |
# endif |
| 91 |
#endif |
| 92 |
|
| 93 |
#if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_MKOSTEMP@ || @GNULIB_MKOSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !(defined _WIN32 && ! defined __CYGWIN__) |
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
# include <unistd.h> |
| 100 |
#endif |
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
#ifndef _GL_ATTRIBUTE_DEALLOC |
| 106 |
# if __GNUC__ >= 11 |
| 107 |
# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) |
| 108 |
# else |
| 109 |
# define _GL_ATTRIBUTE_DEALLOC(f, i) |
| 110 |
# endif |
| 111 |
#endif |
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
#ifndef _GL_ATTRIBUTE_DEALLOC_FREE |
| 117 |
# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1) |
| 118 |
#endif |
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
#ifndef _GL_ATTRIBUTE_MALLOC |
| 124 |
# if __GNUC__ >= 3 || defined __clang__ |
| 125 |
# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) |
| 126 |
# else |
| 127 |
# define _GL_ATTRIBUTE_MALLOC |
| 128 |
# endif |
| 129 |
#endif |
| 130 |
|
| 131 |
|
| 132 |
|
| 133 |
#ifndef _GL_ATTRIBUTE_PURE |
| 134 |
# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__ |
| 135 |
# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) |
| 136 |
# else |
| 137 |
# define _GL_ATTRIBUTE_PURE |
| 138 |
# endif |
| 139 |
#endif |
| 140 |
|
| 141 |
|
| 142 |
|
| 143 |
|
| 144 |
|
| 145 |
|
| 146 |
|
| 147 |
|
| 148 |
|
| 149 |
|
| 150 |
|
| 151 |
#ifndef EXIT_SUCCESS |
| 152 |
# define EXIT_SUCCESS 0 |
| 153 |
#endif |
| 154 |
|
| 155 |
|
| 156 |
#ifndef EXIT_FAILURE |
| 157 |
# define EXIT_FAILURE 1 |
| 158 |
#elif EXIT_FAILURE != 1 |
| 159 |
# undef EXIT_FAILURE |
| 160 |
# define EXIT_FAILURE 1 |
| 161 |
#endif |
| 162 |
|
| 163 |
|
| 164 |
#if @GNULIB__EXIT@ |
| 165 |
|
| 166 |
|
| 167 |
# if @REPLACE__EXIT@ |
| 168 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 169 |
# undef _Exit |
| 170 |
# define _Exit rpl__Exit |
| 171 |
# endif |
| 172 |
_GL_FUNCDECL_RPL (_Exit, _Noreturn void, (int status)); |
| 173 |
_GL_CXXALIAS_RPL (_Exit, void, (int status)); |
| 174 |
# else |
| 175 |
# if !@HAVE__EXIT@ |
| 176 |
_GL_FUNCDECL_SYS (_Exit, _Noreturn void, (int status)); |
| 177 |
# endif |
| 178 |
_GL_CXXALIAS_SYS (_Exit, void, (int status)); |
| 179 |
# endif |
| 180 |
# if __GLIBC__ >= 2 |
| 181 |
_GL_CXXALIASWARN (_Exit); |
| 182 |
# endif |
| 183 |
#elif defined GNULIB_POSIXCHECK |
| 184 |
# undef _Exit |
| 185 |
# if HAVE_RAW_DECL__EXIT |
| 186 |
_GL_WARN_ON_USE (_Exit, "_Exit is unportable - " |
| 187 |
"use gnulib module _Exit for portability"); |
| 188 |
# endif |
| 189 |
#endif |
| 190 |
|
| 191 |
|
| 192 |
#if @GNULIB_FREE_POSIX@ |
| 193 |
# if @REPLACE_FREE@ |
| 194 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 195 |
# undef free |
| 196 |
# define free rpl_free |
| 197 |
# endif |
| 198 |
# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) |
| 199 |
_GL_FUNCDECL_RPL (free, void, (void *ptr) throw ()); |
| 200 |
# else |
| 201 |
_GL_FUNCDECL_RPL (free, void, (void *ptr)); |
| 202 |
# endif |
| 203 |
_GL_CXXALIAS_RPL (free, void, (void *ptr)); |
| 204 |
# else |
| 205 |
_GL_CXXALIAS_SYS (free, void, (void *ptr)); |
| 206 |
# endif |
| 207 |
# if __GLIBC__ >= 2 |
| 208 |
_GL_CXXALIASWARN (free); |
| 209 |
# endif |
| 210 |
#elif defined GNULIB_POSIXCHECK |
| 211 |
# undef free |
| 212 |
|
| 213 |
_GL_WARN_ON_USE (free, "free is not future POSIX compliant everywhere - " |
| 214 |
"use gnulib module free for portability"); |
| 215 |
#endif |
| 216 |
|
| 217 |
|
| 218 |
|
| 219 |
#if @GNULIB_ALIGNED_ALLOC@ |
| 220 |
# if @REPLACE_ALIGNED_ALLOC@ |
| 221 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 222 |
# undef aligned_alloc |
| 223 |
# define aligned_alloc rpl_aligned_alloc |
| 224 |
# endif |
| 225 |
_GL_FUNCDECL_RPL (aligned_alloc, void *, |
| 226 |
(size_t alignment, size_t size) |
| 227 |
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); |
| 228 |
_GL_CXXALIAS_RPL (aligned_alloc, void *, (size_t alignment, size_t size)); |
| 229 |
# else |
| 230 |
# if @HAVE_ALIGNED_ALLOC@ |
| 231 |
# if __GNUC__ >= 11 |
| 232 |
|
| 233 |
_GL_FUNCDECL_SYS (aligned_alloc, void *, |
| 234 |
(size_t alignment, size_t size) |
| 235 |
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); |
| 236 |
# endif |
| 237 |
_GL_CXXALIAS_SYS (aligned_alloc, void *, (size_t alignment, size_t size)); |
| 238 |
# endif |
| 239 |
# endif |
| 240 |
# if (__GLIBC__ >= 2) && @HAVE_ALIGNED_ALLOC@ |
| 241 |
_GL_CXXALIASWARN (aligned_alloc); |
| 242 |
# endif |
| 243 |
#else |
| 244 |
# if @GNULIB_FREE_POSIX@ && __GNUC__ >= 11 && !defined aligned_alloc |
| 245 |
|
| 246 |
_GL_FUNCDECL_SYS (aligned_alloc, void *, |
| 247 |
(size_t alignment, size_t size) |
| 248 |
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); |
| 249 |
# endif |
| 250 |
# if defined GNULIB_POSIXCHECK |
| 251 |
# undef aligned_alloc |
| 252 |
# if HAVE_RAW_DECL_ALIGNED_ALLOC |
| 253 |
_GL_WARN_ON_USE (aligned_alloc, "aligned_alloc is not portable - " |
| 254 |
"use gnulib module aligned_alloc for portability"); |
| 255 |
# endif |
| 256 |
# endif |
| 257 |
#endif |
| 258 |
|
| 259 |
#if @GNULIB_ATOLL@ |
| 260 |
|
| 261 |
|
| 262 |
# if !@HAVE_ATOLL@ |
| 263 |
_GL_FUNCDECL_SYS (atoll, long long, (const char *string) |
| 264 |
_GL_ATTRIBUTE_PURE |
| 265 |
_GL_ARG_NONNULL ((1))); |
| 266 |
# endif |
| 267 |
_GL_CXXALIAS_SYS (atoll, long long, (const char *string)); |
| 268 |
_GL_CXXALIASWARN (atoll); |
| 269 |
#elif defined GNULIB_POSIXCHECK |
| 270 |
# undef atoll |
| 271 |
# if HAVE_RAW_DECL_ATOLL |
| 272 |
_GL_WARN_ON_USE (atoll, "atoll is unportable - " |
| 273 |
"use gnulib module atoll for portability"); |
| 274 |
# endif |
| 275 |
#endif |
| 276 |
|
| 277 |
#if @GNULIB_CALLOC_POSIX@ |
| 278 |
# if (@GNULIB_CALLOC_POSIX@ && @REPLACE_CALLOC_FOR_CALLOC_POSIX@) \ |
| 279 |
|| (@GNULIB_CALLOC_GNU@ && @REPLACE_CALLOC_FOR_CALLOC_GNU@) |
| 280 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 281 |
# undef calloc |
| 282 |
# define calloc rpl_calloc |
| 283 |
# endif |
| 284 |
_GL_FUNCDECL_RPL (calloc, void *, |
| 285 |
(size_t nmemb, size_t size) |
| 286 |
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); |
| 287 |
_GL_CXXALIAS_RPL (calloc, void *, (size_t nmemb, size_t size)); |
| 288 |
# else |
| 289 |
# if __GNUC__ >= 11 |
| 290 |
|
| 291 |
_GL_FUNCDECL_SYS (calloc, void *, |
| 292 |
(size_t nmemb, size_t size) |
| 293 |
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); |
| 294 |
# endif |
| 295 |
_GL_CXXALIAS_SYS (calloc, void *, (size_t nmemb, size_t size)); |
| 296 |
# endif |
| 297 |
# if __GLIBC__ >= 2 |
| 298 |
_GL_CXXALIASWARN (calloc); |
| 299 |
# endif |
| 300 |
#else |
| 301 |
# if @GNULIB_FREE_POSIX@ && __GNUC__ >= 11 && !defined calloc |
| 302 |
|
| 303 |
_GL_FUNCDECL_SYS (calloc, void *, |
| 304 |
(size_t nmemb, size_t size) |
| 305 |
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); |
| 306 |
# endif |
| 307 |
# if defined GNULIB_POSIXCHECK |
| 308 |
# undef calloc |
| 309 |
|
| 310 |
_GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - " |
| 311 |
"use gnulib module calloc-posix for portability"); |
| 312 |
# endif |
| 313 |
#endif |
| 314 |
|
| 315 |
#if @GNULIB_CANONICALIZE_FILE_NAME@ |
| 316 |
# if @REPLACE_CANONICALIZE_FILE_NAME@ |
| 317 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 318 |
# define canonicalize_file_name rpl_canonicalize_file_name |
| 319 |
# endif |
| 320 |
_GL_FUNCDECL_RPL (canonicalize_file_name, char *, |
| 321 |
(const char *name) |
| 322 |
_GL_ARG_NONNULL ((1)) |
| 323 |
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); |
| 324 |
_GL_CXXALIAS_RPL (canonicalize_file_name, char *, (const char *name)); |
| 325 |
# else |
| 326 |
# if !@HAVE_CANONICALIZE_FILE_NAME@ || __GNUC__ >= 11 |
| 327 |
_GL_FUNCDECL_SYS (canonicalize_file_name, char *, |
| 328 |
(const char *name) |
| 329 |
_GL_ARG_NONNULL ((1)) |
| 330 |
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); |
| 331 |
# endif |
| 332 |
_GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name)); |
| 333 |
# endif |
| 334 |
# ifndef GNULIB_defined_canonicalize_file_name |
| 335 |
# define GNULIB_defined_canonicalize_file_name \ |
| 336 |
(!@HAVE_CANONICALIZE_FILE_NAME@ || @REPLACE_CANONICALIZE_FILE_NAME@) |
| 337 |
# endif |
| 338 |
_GL_CXXALIASWARN (canonicalize_file_name); |
| 339 |
#else |
| 340 |
# if @GNULIB_FREE_POSIX@ && __GNUC__ >= 11 && !defined canonicalize_file_name |
| 341 |
|
| 342 |
|
| 343 |
_GL_FUNCDECL_SYS (canonicalize_file_name, char *, |
| 344 |
(const char *name) |
| 345 |
_GL_ARG_NONNULL ((1)) |
| 346 |
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); |
| 347 |
# endif |
| 348 |
# if defined GNULIB_POSIXCHECK |
| 349 |
# undef canonicalize_file_name |
| 350 |
# if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME |
| 351 |
_GL_WARN_ON_USE (canonicalize_file_name, |
| 352 |
"canonicalize_file_name is unportable - " |
| 353 |
"use gnulib module canonicalize-lgpl for portability"); |
| 354 |
# endif |
| 355 |
# endif |
| 356 |
#endif |
| 357 |
|
| 358 |
#if @GNULIB_MDA_ECVT@ |
| 359 |
|
| 360 |
|
| 361 |
|
| 362 |
|
| 363 |
# if defined _WIN32 && !defined __CYGWIN__ |
| 364 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 365 |
# undef ecvt |
| 366 |
# define ecvt _ecvt |
| 367 |
# endif |
| 368 |
_GL_CXXALIAS_MDA (ecvt, char *, |
| 369 |
(double number, int ndigits, int *decptp, int *signp)); |
| 370 |
# else |
| 371 |
# if @HAVE_DECL_ECVT@ |
| 372 |
_GL_CXXALIAS_SYS (ecvt, char *, |
| 373 |
(double number, int ndigits, int *decptp, int *signp)); |
| 374 |
# endif |
| 375 |
# endif |
| 376 |
# if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_DECL_ECVT@ |
| 377 |
_GL_CXXALIASWARN (ecvt); |
| 378 |
# endif |
| 379 |
#endif |
| 380 |
|
| 381 |
#if @GNULIB_MDA_FCVT@ |
| 382 |
|
| 383 |
|
| 384 |
|
| 385 |
|
| 386 |
# if defined _WIN32 && !defined __CYGWIN__ |
| 387 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 388 |
# undef fcvt |
| 389 |
# define fcvt _fcvt |
| 390 |
# endif |
| 391 |
_GL_CXXALIAS_MDA (fcvt, char *, |
| 392 |
(double number, int ndigits, int *decptp, int *signp)); |
| 393 |
# else |
| 394 |
# if @HAVE_DECL_FCVT@ |
| 395 |
_GL_CXXALIAS_SYS (fcvt, char *, |
| 396 |
(double number, int ndigits, int *decptp, int *signp)); |
| 397 |
# endif |
| 398 |
# endif |
| 399 |
# if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_DECL_FCVT@ |
| 400 |
_GL_CXXALIASWARN (fcvt); |
| 401 |
# endif |
| 402 |
#endif |
| 403 |
|
| 404 |
#if @GNULIB_MDA_GCVT@ |
| 405 |
|
| 406 |
|
| 407 |
|
| 408 |
|
| 409 |
# if defined _WIN32 && !defined __CYGWIN__ |
| 410 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 411 |
# undef gcvt |
| 412 |
# define gcvt _gcvt |
| 413 |
# endif |
| 414 |
_GL_CXXALIAS_MDA (gcvt, char *, (double number, int ndigits, char *buf)); |
| 415 |
# else |
| 416 |
# if @HAVE_DECL_GCVT@ |
| 417 |
_GL_CXXALIAS_SYS (gcvt, char *, (double number, int ndigits, char *buf)); |
| 418 |
# endif |
| 419 |
# endif |
| 420 |
# if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_DECL_GCVT@ |
| 421 |
_GL_CXXALIASWARN (gcvt); |
| 422 |
# endif |
| 423 |
#endif |
| 424 |
|
| 425 |
#if @GNULIB_GETLOADAVG@ |
| 426 |
|
| 427 |
|
| 428 |
|
| 429 |
|
| 430 |
# if @REPLACE_GETLOADAVG@ |
| 431 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 432 |
# undef getloadavg |
| 433 |
# define getloadavg rpl_getloadavg |
| 434 |
# endif |
| 435 |
_GL_FUNCDECL_RPL (getloadavg, int, (double loadavg[], int nelem) |
| 436 |
_GL_ARG_NONNULL ((1))); |
| 437 |
_GL_CXXALIAS_RPL (getloadavg, int, (double loadavg[], int nelem)); |
| 438 |
# else |
| 439 |
# if !@HAVE_DECL_GETLOADAVG@ |
| 440 |
_GL_FUNCDECL_SYS (getloadavg, int, (double loadavg[], int nelem) |
| 441 |
_GL_ARG_NONNULL ((1))); |
| 442 |
# endif |
| 443 |
_GL_CXXALIAS_SYS (getloadavg, int, (double loadavg[], int nelem)); |
| 444 |
# endif |
| 445 |
# if __GLIBC__ >= 2 |
| 446 |
_GL_CXXALIASWARN (getloadavg); |
| 447 |
# endif |
| 448 |
#elif defined GNULIB_POSIXCHECK |
| 449 |
# undef getloadavg |
| 450 |
# if HAVE_RAW_DECL_GETLOADAVG |
| 451 |
_GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - " |
| 452 |
"use gnulib module getloadavg for portability"); |
| 453 |
# endif |
| 454 |
#endif |
| 455 |
|
| 456 |
#if @GNULIB_GETPROGNAME@ |
| 457 |
|
| 458 |
|
| 459 |
# if @REPLACE_GETPROGNAME@ |
| 460 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 461 |
# undef getprogname |
| 462 |
# define getprogname rpl_getprogname |
| 463 |
# endif |
| 464 |
# ifdef HAVE_DECL_PROGRAM_INVOCATION_NAME |
| 465 |
_GL_FUNCDECL_RPL (getprogname, const char *, (void) _GL_ATTRIBUTE_PURE); |
| 466 |
# else |
| 467 |
_GL_FUNCDECL_RPL (getprogname, const char *, (void)); |
| 468 |
# endif |
| 469 |
_GL_CXXALIAS_RPL (getprogname, const char *, (void)); |
| 470 |
# else |
| 471 |
# if !@HAVE_GETPROGNAME@ |
| 472 |
# ifdef HAVE_DECL_PROGRAM_INVOCATION_NAME |
| 473 |
_GL_FUNCDECL_SYS (getprogname, const char *, (void) _GL_ATTRIBUTE_PURE); |
| 474 |
# else |
| 475 |
_GL_FUNCDECL_SYS (getprogname, const char *, (void)); |
| 476 |
# endif |
| 477 |
# endif |
| 478 |
_GL_CXXALIAS_SYS (getprogname, const char *, (void)); |
| 479 |
# endif |
| 480 |
# if __GLIBC__ >= 2 |
| 481 |
_GL_CXXALIASWARN (getprogname); |
| 482 |
# endif |
| 483 |
#elif defined GNULIB_POSIXCHECK |
| 484 |
# undef getprogname |
| 485 |
# if HAVE_RAW_DECL_GETPROGNAME |
| 486 |
_GL_WARN_ON_USE (getprogname, "getprogname is unportable - " |
| 487 |
"use gnulib module getprogname for portability"); |
| 488 |
# endif |
| 489 |
#endif |
| 490 |
|
| 491 |
#if @GNULIB_GETSUBOPT@ |
| 492 |
|
| 493 |
|
| 494 |
|
| 495 |
|
| 496 |
|
| 497 |
|
| 498 |
|
| 499 |
|
| 500 |
|
| 501 |
|
| 502 |
|
| 503 |
# if @REPLACE_GETSUBOPT@ |
| 504 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 505 |
# undef getsubopt |
| 506 |
# define getsubopt rpl_getsubopt |
| 507 |
# endif |
| 508 |
_GL_FUNCDECL_RPL (getsubopt, int, |
| 509 |
(char **optionp, char *const *tokens, char **valuep) |
| 510 |
_GL_ARG_NONNULL ((1, 2, 3))); |
| 511 |
_GL_CXXALIAS_RPL (getsubopt, int, |
| 512 |
(char **optionp, char *const *tokens, char **valuep)); |
| 513 |
# else |
| 514 |
# if !@HAVE_GETSUBOPT@ |
| 515 |
_GL_FUNCDECL_SYS (getsubopt, int, |
| 516 |
(char **optionp, char *const *tokens, char **valuep) |
| 517 |
_GL_ARG_NONNULL ((1, 2, 3))); |
| 518 |
# endif |
| 519 |
_GL_CXXALIAS_SYS (getsubopt, int, |
| 520 |
(char **optionp, char *const *tokens, char **valuep)); |
| 521 |
# endif |
| 522 |
# if __GLIBC__ >= 2 |
| 523 |
_GL_CXXALIASWARN (getsubopt); |
| 524 |
# endif |
| 525 |
#elif defined GNULIB_POSIXCHECK |
| 526 |
# undef getsubopt |
| 527 |
# if HAVE_RAW_DECL_GETSUBOPT |
| 528 |
_GL_WARN_ON_USE (getsubopt, "getsubopt is unportable - " |
| 529 |
"use gnulib module getsubopt for portability"); |
| 530 |
# endif |
| 531 |
#endif |
| 532 |
|
| 533 |
#if @GNULIB_GRANTPT@ |
| 534 |
|
| 535 |
|
| 536 |
# if !@HAVE_GRANTPT@ |
| 537 |
_GL_FUNCDECL_SYS (grantpt, int, (int fd)); |
| 538 |
# endif |
| 539 |
_GL_CXXALIAS_SYS (grantpt, int, (int fd)); |
| 540 |
_GL_CXXALIASWARN (grantpt); |
| 541 |
#elif defined GNULIB_POSIXCHECK |
| 542 |
# undef grantpt |
| 543 |
# if HAVE_RAW_DECL_GRANTPT |
| 544 |
_GL_WARN_ON_USE (grantpt, "grantpt is not portable - " |
| 545 |
"use gnulib module grantpt for portability"); |
| 546 |
# endif |
| 547 |
#endif |
| 548 |
|
| 549 |
|
| 550 |
|
| 551 |
|
| 552 |
|
| 553 |
#if @GNULIB_MALLOC_POSIX@ |
| 554 |
# if (@GNULIB_MALLOC_POSIX@ && @REPLACE_MALLOC_FOR_MALLOC_POSIX@) \ |
| 555 |
|| (@GNULIB_MALLOC_GNU@ && @REPLACE_MALLOC_FOR_MALLOC_GNU@) |
| 556 |
# if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ |
| 557 |
|| _GL_USE_STDLIB_ALLOC) |
| 558 |
# undef malloc |
| 559 |
# define malloc rpl_malloc |
| 560 |
# endif |
| 561 |
_GL_FUNCDECL_RPL (malloc, void *, |
| 562 |
(size_t size) |
| 563 |
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); |
| 564 |
_GL_CXXALIAS_RPL (malloc, void *, (size_t size)); |
| 565 |
# else |
| 566 |
# if __GNUC__ >= 11 |
| 567 |
|
| 568 |
_GL_FUNCDECL_SYS (malloc, void *, |
| 569 |
(size_t size) |
| 570 |
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); |
| 571 |
# endif |
| 572 |
_GL_CXXALIAS_SYS (malloc, void *, (size_t size)); |
| 573 |
# endif |
| 574 |
# if __GLIBC__ >= 2 |
| 575 |
_GL_CXXALIASWARN (malloc); |
| 576 |
# endif |
| 577 |
#else |
| 578 |
# if @GNULIB_FREE_POSIX@ && __GNUC__ >= 11 && !defined malloc |
| 579 |
|
| 580 |
_GL_FUNCDECL_SYS (malloc, void *, |
| 581 |
(size_t size) |
| 582 |
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); |
| 583 |
# endif |
| 584 |
# if defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC |
| 585 |
# undef malloc |
| 586 |
|
| 587 |
_GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - " |
| 588 |
"use gnulib module malloc-posix for portability"); |
| 589 |
# endif |
| 590 |
#endif |
| 591 |
|
| 592 |
|
| 593 |
#if @GNULIB_MBTOWC@ |
| 594 |
# if @REPLACE_MBTOWC@ |
| 595 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 596 |
# undef mbtowc |
| 597 |
# define mbtowc rpl_mbtowc |
| 598 |
# endif |
| 599 |
_GL_FUNCDECL_RPL (mbtowc, int, |
| 600 |
(wchar_t *restrict pwc, const char *restrict s, size_t n)); |
| 601 |
_GL_CXXALIAS_RPL (mbtowc, int, |
| 602 |
(wchar_t *restrict pwc, const char *restrict s, size_t n)); |
| 603 |
# else |
| 604 |
# if !@HAVE_MBTOWC@ |
| 605 |
_GL_FUNCDECL_SYS (mbtowc, int, |
| 606 |
(wchar_t *restrict pwc, const char *restrict s, size_t n)); |
| 607 |
# endif |
| 608 |
_GL_CXXALIAS_SYS (mbtowc, int, |
| 609 |
(wchar_t *restrict pwc, const char *restrict s, size_t n)); |
| 610 |
# endif |
| 611 |
# if __GLIBC__ >= 2 |
| 612 |
_GL_CXXALIASWARN (mbtowc); |
| 613 |
# endif |
| 614 |
#elif defined GNULIB_POSIXCHECK |
| 615 |
# undef mbtowc |
| 616 |
# if HAVE_RAW_DECL_MBTOWC |
| 617 |
_GL_WARN_ON_USE (mbtowc, "mbtowc is not portable - " |
| 618 |
"use gnulib module mbtowc for portability"); |
| 619 |
# endif |
| 620 |
#endif |
| 621 |
|
| 622 |
#if @GNULIB_MKDTEMP@ |
| 623 |
|
| 624 |
|
| 625 |
|
| 626 |
|
| 627 |
|
| 628 |
# if !@HAVE_MKDTEMP@ |
| 629 |
_GL_FUNCDECL_SYS (mkdtemp, char *, (char * ) _GL_ARG_NONNULL ((1))); |
| 630 |
# endif |
| 631 |
_GL_CXXALIAS_SYS (mkdtemp, char *, (char * )); |
| 632 |
_GL_CXXALIASWARN (mkdtemp); |
| 633 |
#elif defined GNULIB_POSIXCHECK |
| 634 |
# undef mkdtemp |
| 635 |
# if HAVE_RAW_DECL_MKDTEMP |
| 636 |
_GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - " |
| 637 |
"use gnulib module mkdtemp for portability"); |
| 638 |
# endif |
| 639 |
#endif |
| 640 |
|
| 641 |
#if @GNULIB_MKOSTEMP@ |
| 642 |
|
| 643 |
|
| 644 |
|
| 645 |
|
| 646 |
|
| 647 |
|
| 648 |
|
| 649 |
|
| 650 |
|
| 651 |
|
| 652 |
|
| 653 |
|
| 654 |
# if @REPLACE_MKOSTEMP@ |
| 655 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 656 |
# undef mkostemp |
| 657 |
# define mkostemp rpl_mkostemp |
| 658 |
# endif |
| 659 |
_GL_FUNCDECL_RPL (mkostemp, int, (char * , int ) |
| 660 |
_GL_ARG_NONNULL ((1))); |
| 661 |
_GL_CXXALIAS_RPL (mkostemp, int, (char * , int )); |
| 662 |
# else |
| 663 |
# if !@HAVE_MKOSTEMP@ |
| 664 |
_GL_FUNCDECL_SYS (mkostemp, int, (char * , int ) |
| 665 |
_GL_ARG_NONNULL ((1))); |
| 666 |
# endif |
| 667 |
_GL_CXXALIAS_SYS (mkostemp, int, (char * , int )); |
| 668 |
# endif |
| 669 |
# if __GLIBC__ >= 2 |
| 670 |
_GL_CXXALIASWARN (mkostemp); |
| 671 |
# endif |
| 672 |
#elif defined GNULIB_POSIXCHECK |
| 673 |
# undef mkostemp |
| 674 |
# if HAVE_RAW_DECL_MKOSTEMP |
| 675 |
_GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - " |
| 676 |
"use gnulib module mkostemp for portability"); |
| 677 |
# endif |
| 678 |
#endif |
| 679 |
|
| 680 |
#if @GNULIB_MKOSTEMPS@ |
| 681 |
|
| 682 |
|
| 683 |
|
| 684 |
|
| 685 |
|
| 686 |
|
| 687 |
|
| 688 |
|
| 689 |
|
| 690 |
|
| 691 |
|
| 692 |
|
| 693 |
|
| 694 |
# if @REPLACE_MKOSTEMPS@ |
| 695 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 696 |
# undef mkostemps |
| 697 |
# define mkostemps rpl_mkostemps |
| 698 |
# endif |
| 699 |
_GL_FUNCDECL_RPL (mkostemps, int, |
| 700 |
(char * , int , int ) |
| 701 |
_GL_ARG_NONNULL ((1))); |
| 702 |
_GL_CXXALIAS_RPL (mkostemps, int, |
| 703 |
(char * , int , int )); |
| 704 |
# else |
| 705 |
# if !@HAVE_MKOSTEMPS@ |
| 706 |
_GL_FUNCDECL_SYS (mkostemps, int, |
| 707 |
(char * , int , int ) |
| 708 |
_GL_ARG_NONNULL ((1))); |
| 709 |
# endif |
| 710 |
_GL_CXXALIAS_SYS (mkostemps, int, |
| 711 |
(char * , int , int )); |
| 712 |
# endif |
| 713 |
# if __GLIBC__ >= 2 |
| 714 |
_GL_CXXALIASWARN (mkostemps); |
| 715 |
# endif |
| 716 |
#elif defined GNULIB_POSIXCHECK |
| 717 |
# undef mkostemps |
| 718 |
# if HAVE_RAW_DECL_MKOSTEMPS |
| 719 |
_GL_WARN_ON_USE (mkostemps, "mkostemps is unportable - " |
| 720 |
"use gnulib module mkostemps for portability"); |
| 721 |
# endif |
| 722 |
#endif |
| 723 |
|
| 724 |
#if @GNULIB_MKSTEMP@ |
| 725 |
|
| 726 |
|
| 727 |
|
| 728 |
|
| 729 |
|
| 730 |
|
| 731 |
|
| 732 |
|
| 733 |
|
| 734 |
# if @REPLACE_MKSTEMP@ |
| 735 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 736 |
# define mkstemp rpl_mkstemp |
| 737 |
# endif |
| 738 |
_GL_FUNCDECL_RPL (mkstemp, int, (char * ) _GL_ARG_NONNULL ((1))); |
| 739 |
_GL_CXXALIAS_RPL (mkstemp, int, (char * )); |
| 740 |
# else |
| 741 |
# if ! @HAVE_MKSTEMP@ |
| 742 |
_GL_FUNCDECL_SYS (mkstemp, int, (char * ) _GL_ARG_NONNULL ((1))); |
| 743 |
# endif |
| 744 |
_GL_CXXALIAS_SYS (mkstemp, int, (char * )); |
| 745 |
# endif |
| 746 |
_GL_CXXALIASWARN (mkstemp); |
| 747 |
#elif defined GNULIB_POSIXCHECK |
| 748 |
# undef mkstemp |
| 749 |
# if HAVE_RAW_DECL_MKSTEMP |
| 750 |
_GL_WARN_ON_USE (mkstemp, "mkstemp is unportable - " |
| 751 |
"use gnulib module mkstemp for portability"); |
| 752 |
# endif |
| 753 |
#endif |
| 754 |
|
| 755 |
#if @GNULIB_MKSTEMPS@ |
| 756 |
|
| 757 |
|
| 758 |
|
| 759 |
|
| 760 |
|
| 761 |
|
| 762 |
|
| 763 |
|
| 764 |
|
| 765 |
|
| 766 |
# if !@HAVE_MKSTEMPS@ |
| 767 |
_GL_FUNCDECL_SYS (mkstemps, int, (char * , int ) |
| 768 |
_GL_ARG_NONNULL ((1))); |
| 769 |
# endif |
| 770 |
_GL_CXXALIAS_SYS (mkstemps, int, (char * , int )); |
| 771 |
_GL_CXXALIASWARN (mkstemps); |
| 772 |
#elif defined GNULIB_POSIXCHECK |
| 773 |
# undef mkstemps |
| 774 |
# if HAVE_RAW_DECL_MKSTEMPS |
| 775 |
_GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - " |
| 776 |
"use gnulib module mkstemps for portability"); |
| 777 |
# endif |
| 778 |
#endif |
| 779 |
|
| 780 |
#if @GNULIB_MDA_MKTEMP@ |
| 781 |
|
| 782 |
|
| 783 |
|
| 784 |
# if defined _WIN32 && !defined __CYGWIN__ |
| 785 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 786 |
# undef mktemp |
| 787 |
# define mktemp _mktemp |
| 788 |
# endif |
| 789 |
_GL_CXXALIAS_MDA (mktemp, char *, (char * )); |
| 790 |
# else |
| 791 |
_GL_CXXALIAS_SYS (mktemp, char *, (char * )); |
| 792 |
# endif |
| 793 |
_GL_CXXALIASWARN (mktemp); |
| 794 |
#endif |
| 795 |
|
| 796 |
|
| 797 |
#if @GNULIB_POSIX_MEMALIGN@ |
| 798 |
# if @REPLACE_POSIX_MEMALIGN@ |
| 799 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 800 |
# undef posix_memalign |
| 801 |
# define posix_memalign rpl_posix_memalign |
| 802 |
# endif |
| 803 |
_GL_FUNCDECL_RPL (posix_memalign, int, |
| 804 |
(void **memptr, size_t alignment, size_t size) |
| 805 |
_GL_ARG_NONNULL ((1))); |
| 806 |
_GL_CXXALIAS_RPL (posix_memalign, int, |
| 807 |
(void **memptr, size_t alignment, size_t size)); |
| 808 |
# else |
| 809 |
# if @HAVE_POSIX_MEMALIGN@ |
| 810 |
_GL_CXXALIAS_SYS (posix_memalign, int, |
| 811 |
(void **memptr, size_t alignment, size_t size)); |
| 812 |
# endif |
| 813 |
# endif |
| 814 |
# if __GLIBC__ >= 2 && @HAVE_POSIX_MEMALIGN@ |
| 815 |
_GL_CXXALIASWARN (posix_memalign); |
| 816 |
# endif |
| 817 |
#elif defined GNULIB_POSIXCHECK |
| 818 |
# undef posix_memalign |
| 819 |
# if HAVE_RAW_DECL_POSIX_MEMALIGN |
| 820 |
_GL_WARN_ON_USE (posix_memalign, "posix_memalign is not portable - " |
| 821 |
"use gnulib module posix_memalign for portability"); |
| 822 |
# endif |
| 823 |
#endif |
| 824 |
|
| 825 |
#if @GNULIB_POSIX_OPENPT@ |
| 826 |
|
| 827 |
|
| 828 |
# if @REPLACE_POSIX_OPENPT@ |
| 829 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 830 |
# undef posix_openpt |
| 831 |
# define posix_openpt rpl_posix_openpt |
| 832 |
# endif |
| 833 |
_GL_FUNCDECL_RPL (posix_openpt, int, (int flags)); |
| 834 |
_GL_CXXALIAS_RPL (posix_openpt, int, (int flags)); |
| 835 |
# else |
| 836 |
# if !@HAVE_POSIX_OPENPT@ |
| 837 |
_GL_FUNCDECL_SYS (posix_openpt, int, (int flags)); |
| 838 |
# endif |
| 839 |
_GL_CXXALIAS_SYS (posix_openpt, int, (int flags)); |
| 840 |
# endif |
| 841 |
# if __GLIBC__ >= 2 |
| 842 |
_GL_CXXALIASWARN (posix_openpt); |
| 843 |
# endif |
| 844 |
#elif defined GNULIB_POSIXCHECK |
| 845 |
# undef posix_openpt |
| 846 |
# if HAVE_RAW_DECL_POSIX_OPENPT |
| 847 |
_GL_WARN_ON_USE (posix_openpt, "posix_openpt is not portable - " |
| 848 |
"use gnulib module posix_openpt for portability"); |
| 849 |
# endif |
| 850 |
#endif |
| 851 |
|
| 852 |
#if @GNULIB_PTSNAME@ |
| 853 |
|
| 854 |
|
| 855 |
# if @REPLACE_PTSNAME@ |
| 856 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 857 |
# undef ptsname |
| 858 |
# define ptsname rpl_ptsname |
| 859 |
# endif |
| 860 |
_GL_FUNCDECL_RPL (ptsname, char *, (int fd)); |
| 861 |
_GL_CXXALIAS_RPL (ptsname, char *, (int fd)); |
| 862 |
# else |
| 863 |
# if !@HAVE_PTSNAME@ |
| 864 |
_GL_FUNCDECL_SYS (ptsname, char *, (int fd)); |
| 865 |
# endif |
| 866 |
_GL_CXXALIAS_SYS (ptsname, char *, (int fd)); |
| 867 |
# endif |
| 868 |
_GL_CXXALIASWARN (ptsname); |
| 869 |
#elif defined GNULIB_POSIXCHECK |
| 870 |
# undef ptsname |
| 871 |
# if HAVE_RAW_DECL_PTSNAME |
| 872 |
_GL_WARN_ON_USE (ptsname, "ptsname is not portable - " |
| 873 |
"use gnulib module ptsname for portability"); |
| 874 |
# endif |
| 875 |
#endif |
| 876 |
|
| 877 |
#if @GNULIB_PTSNAME_R@ |
| 878 |
|
| 879 |
|
| 880 |
|
| 881 |
# if @REPLACE_PTSNAME_R@ |
| 882 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 883 |
# undef ptsname_r |
| 884 |
# define ptsname_r rpl_ptsname_r |
| 885 |
# endif |
| 886 |
_GL_FUNCDECL_RPL (ptsname_r, int, (int fd, char *buf, size_t len)); |
| 887 |
_GL_CXXALIAS_RPL (ptsname_r, int, (int fd, char *buf, size_t len)); |
| 888 |
# else |
| 889 |
# if !@HAVE_PTSNAME_R@ |
| 890 |
_GL_FUNCDECL_SYS (ptsname_r, int, (int fd, char *buf, size_t len)); |
| 891 |
# endif |
| 892 |
_GL_CXXALIAS_SYS (ptsname_r, int, (int fd, char *buf, size_t len)); |
| 893 |
# endif |
| 894 |
# ifndef GNULIB_defined_ptsname_r |
| 895 |
# define GNULIB_defined_ptsname_r (!@HAVE_PTSNAME_R@ || @REPLACE_PTSNAME_R@) |
| 896 |
# endif |
| 897 |
_GL_CXXALIASWARN (ptsname_r); |
| 898 |
#elif defined GNULIB_POSIXCHECK |
| 899 |
# undef ptsname_r |
| 900 |
# if HAVE_RAW_DECL_PTSNAME_R |
| 901 |
_GL_WARN_ON_USE (ptsname_r, "ptsname_r is not portable - " |
| 902 |
"use gnulib module ptsname_r for portability"); |
| 903 |
# endif |
| 904 |
#endif |
| 905 |
|
| 906 |
#if @GNULIB_PUTENV@ |
| 907 |
# if @REPLACE_PUTENV@ |
| 908 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 909 |
# undef putenv |
| 910 |
# define putenv rpl_putenv |
| 911 |
# endif |
| 912 |
_GL_FUNCDECL_RPL (putenv, int, (char *string) _GL_ARG_NONNULL ((1))); |
| 913 |
_GL_CXXALIAS_RPL (putenv, int, (char *string)); |
| 914 |
# elif defined _WIN32 && !defined __CYGWIN__ |
| 915 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 916 |
# undef putenv |
| 917 |
# define putenv _putenv |
| 918 |
# endif |
| 919 |
_GL_CXXALIAS_MDA (putenv, int, (char *string)); |
| 920 |
# else |
| 921 |
_GL_CXXALIAS_SYS (putenv, int, (char *string)); |
| 922 |
# endif |
| 923 |
_GL_CXXALIASWARN (putenv); |
| 924 |
#elif @GNULIB_MDA_PUTENV@ |
| 925 |
|
| 926 |
|
| 927 |
|
| 928 |
# if defined _WIN32 && !defined __CYGWIN__ |
| 929 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 930 |
# undef putenv |
| 931 |
# define putenv _putenv |
| 932 |
# endif |
| 933 |
|
| 934 |
|
| 935 |
_GL_CXXALIAS_MDA_CAST (putenv, int, (char *string)); |
| 936 |
# else |
| 937 |
_GL_CXXALIAS_SYS (putenv, int, (char *string)); |
| 938 |
# endif |
| 939 |
_GL_CXXALIASWARN (putenv); |
| 940 |
#endif |
| 941 |
|
| 942 |
#if @GNULIB_QSORT_R@ |
| 943 |
|
| 944 |
|
| 945 |
|
| 946 |
# ifdef __cplusplus |
| 947 |
extern "C" { |
| 948 |
# endif |
| 949 |
# if !GNULIB_defined_qsort_r_fn_types |
| 950 |
typedef int (*_gl_qsort_r_compar_fn) (void const *, void const *, void *); |
| 951 |
# define GNULIB_defined_qsort_r_fn_types 1 |
| 952 |
# endif |
| 953 |
# ifdef __cplusplus |
| 954 |
} |
| 955 |
# endif |
| 956 |
# if @REPLACE_QSORT_R@ |
| 957 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 958 |
# undef qsort_r |
| 959 |
# define qsort_r rpl_qsort_r |
| 960 |
# endif |
| 961 |
_GL_FUNCDECL_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size, |
| 962 |
_gl_qsort_r_compar_fn compare, |
| 963 |
void *arg) _GL_ARG_NONNULL ((1, 4))); |
| 964 |
_GL_CXXALIAS_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size, |
| 965 |
_gl_qsort_r_compar_fn compare, |
| 966 |
void *arg)); |
| 967 |
# else |
| 968 |
# if !@HAVE_QSORT_R@ |
| 969 |
_GL_FUNCDECL_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size, |
| 970 |
_gl_qsort_r_compar_fn compare, |
| 971 |
void *arg) _GL_ARG_NONNULL ((1, 4))); |
| 972 |
# endif |
| 973 |
_GL_CXXALIAS_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size, |
| 974 |
_gl_qsort_r_compar_fn compare, |
| 975 |
void *arg)); |
| 976 |
# endif |
| 977 |
_GL_CXXALIASWARN (qsort_r); |
| 978 |
#elif defined GNULIB_POSIXCHECK |
| 979 |
# undef qsort_r |
| 980 |
# if HAVE_RAW_DECL_QSORT_R |
| 981 |
_GL_WARN_ON_USE (qsort_r, "qsort_r is not portable - " |
| 982 |
"use gnulib module qsort_r for portability"); |
| 983 |
# endif |
| 984 |
#endif |
| 985 |
|
| 986 |
|
| 987 |
#if @GNULIB_RANDOM_R@ |
| 988 |
# if !@HAVE_RANDOM_R@ |
| 989 |
# ifndef RAND_MAX |
| 990 |
# define RAND_MAX 2147483647 |
| 991 |
# endif |
| 992 |
# endif |
| 993 |
#endif |
| 994 |
|
| 995 |
|
| 996 |
#if @GNULIB_RANDOM@ |
| 997 |
# if @REPLACE_RANDOM@ |
| 998 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 999 |
# undef random |
| 1000 |
# define random rpl_random |
| 1001 |
# endif |
| 1002 |
_GL_FUNCDECL_RPL (random, long, (void)); |
| 1003 |
_GL_CXXALIAS_RPL (random, long, (void)); |
| 1004 |
# else |
| 1005 |
# if !@HAVE_RANDOM@ |
| 1006 |
_GL_FUNCDECL_SYS (random, long, (void)); |
| 1007 |
# endif |
| 1008 |
|
| 1009 |
|
| 1010 |
_GL_CXXALIAS_SYS_CAST (random, long, (void)); |
| 1011 |
# endif |
| 1012 |
_GL_CXXALIASWARN (random); |
| 1013 |
#elif defined GNULIB_POSIXCHECK |
| 1014 |
# undef random |
| 1015 |
# if HAVE_RAW_DECL_RANDOM |
| 1016 |
_GL_WARN_ON_USE (random, "random is unportable - " |
| 1017 |
"use gnulib module random for portability"); |
| 1018 |
# endif |
| 1019 |
#endif |
| 1020 |
|
| 1021 |
#if @GNULIB_RANDOM@ |
| 1022 |
# if @REPLACE_RANDOM@ |
| 1023 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1024 |
# undef srandom |
| 1025 |
# define srandom rpl_srandom |
| 1026 |
# endif |
| 1027 |
_GL_FUNCDECL_RPL (srandom, void, (unsigned int seed)); |
| 1028 |
_GL_CXXALIAS_RPL (srandom, void, (unsigned int seed)); |
| 1029 |
# else |
| 1030 |
# if !@HAVE_RANDOM@ |
| 1031 |
_GL_FUNCDECL_SYS (srandom, void, (unsigned int seed)); |
| 1032 |
# endif |
| 1033 |
|
| 1034 |
|
| 1035 |
_GL_CXXALIAS_SYS_CAST (srandom, void, (unsigned int seed)); |
| 1036 |
# endif |
| 1037 |
_GL_CXXALIASWARN (srandom); |
| 1038 |
#elif defined GNULIB_POSIXCHECK |
| 1039 |
# undef srandom |
| 1040 |
# if HAVE_RAW_DECL_SRANDOM |
| 1041 |
_GL_WARN_ON_USE (srandom, "srandom is unportable - " |
| 1042 |
"use gnulib module random for portability"); |
| 1043 |
# endif |
| 1044 |
#endif |
| 1045 |
|
| 1046 |
#if @GNULIB_RANDOM@ |
| 1047 |
# if @REPLACE_INITSTATE@ |
| 1048 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1049 |
# undef initstate |
| 1050 |
# define initstate rpl_initstate |
| 1051 |
# endif |
| 1052 |
_GL_FUNCDECL_RPL (initstate, char *, |
| 1053 |
(unsigned int seed, char *buf, size_t buf_size) |
| 1054 |
_GL_ARG_NONNULL ((2))); |
| 1055 |
_GL_CXXALIAS_RPL (initstate, char *, |
| 1056 |
(unsigned int seed, char *buf, size_t buf_size)); |
| 1057 |
# else |
| 1058 |
# if !@HAVE_INITSTATE@ || !@HAVE_DECL_INITSTATE@ |
| 1059 |
_GL_FUNCDECL_SYS (initstate, char *, |
| 1060 |
(unsigned int seed, char *buf, size_t buf_size) |
| 1061 |
_GL_ARG_NONNULL ((2))); |
| 1062 |
# endif |
| 1063 |
|
| 1064 |
|
| 1065 |
_GL_CXXALIAS_SYS_CAST (initstate, char *, |
| 1066 |
(unsigned int seed, char *buf, size_t buf_size)); |
| 1067 |
# endif |
| 1068 |
# if __GLIBC__ >= 2 |
| 1069 |
_GL_CXXALIASWARN (initstate); |
| 1070 |
# endif |
| 1071 |
#elif defined GNULIB_POSIXCHECK |
| 1072 |
# undef initstate |
| 1073 |
# if HAVE_RAW_DECL_INITSTATE |
| 1074 |
_GL_WARN_ON_USE (initstate, "initstate is unportable - " |
| 1075 |
"use gnulib module random for portability"); |
| 1076 |
# endif |
| 1077 |
#endif |
| 1078 |
|
| 1079 |
#if @GNULIB_RANDOM@ |
| 1080 |
# if @REPLACE_SETSTATE@ |
| 1081 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1082 |
# undef setstate |
| 1083 |
# define setstate rpl_setstate |
| 1084 |
# endif |
| 1085 |
_GL_FUNCDECL_RPL (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1))); |
| 1086 |
_GL_CXXALIAS_RPL (setstate, char *, (char *arg_state)); |
| 1087 |
# else |
| 1088 |
# if !@HAVE_SETSTATE@ || !@HAVE_DECL_SETSTATE@ |
| 1089 |
_GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1))); |
| 1090 |
# endif |
| 1091 |
|
| 1092 |
|
| 1093 |
_GL_CXXALIAS_SYS_CAST (setstate, char *, (char *arg_state)); |
| 1094 |
# endif |
| 1095 |
# if __GLIBC__ >= 2 |
| 1096 |
_GL_CXXALIASWARN (setstate); |
| 1097 |
# endif |
| 1098 |
#elif defined GNULIB_POSIXCHECK |
| 1099 |
# undef setstate |
| 1100 |
# if HAVE_RAW_DECL_SETSTATE |
| 1101 |
_GL_WARN_ON_USE (setstate, "setstate is unportable - " |
| 1102 |
"use gnulib module random for portability"); |
| 1103 |
# endif |
| 1104 |
#endif |
| 1105 |
|
| 1106 |
|
| 1107 |
#if @GNULIB_RANDOM_R@ |
| 1108 |
# if @REPLACE_RANDOM_R@ |
| 1109 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1110 |
# undef random_r |
| 1111 |
# define random_r rpl_random_r |
| 1112 |
# endif |
| 1113 |
_GL_FUNCDECL_RPL (random_r, int, (struct random_data *buf, int32_t *result) |
| 1114 |
_GL_ARG_NONNULL ((1, 2))); |
| 1115 |
_GL_CXXALIAS_RPL (random_r, int, (struct random_data *buf, int32_t *result)); |
| 1116 |
# else |
| 1117 |
# if !@HAVE_RANDOM_R@ |
| 1118 |
_GL_FUNCDECL_SYS (random_r, int, (struct random_data *buf, int32_t *result) |
| 1119 |
_GL_ARG_NONNULL ((1, 2))); |
| 1120 |
# endif |
| 1121 |
_GL_CXXALIAS_SYS (random_r, int, (struct random_data *buf, int32_t *result)); |
| 1122 |
# endif |
| 1123 |
_GL_CXXALIASWARN (random_r); |
| 1124 |
#elif defined GNULIB_POSIXCHECK |
| 1125 |
# undef random_r |
| 1126 |
# if HAVE_RAW_DECL_RANDOM_R |
| 1127 |
_GL_WARN_ON_USE (random_r, "random_r is unportable - " |
| 1128 |
"use gnulib module random_r for portability"); |
| 1129 |
# endif |
| 1130 |
#endif |
| 1131 |
|
| 1132 |
#if @GNULIB_RANDOM_R@ |
| 1133 |
# if @REPLACE_RANDOM_R@ |
| 1134 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1135 |
# undef srandom_r |
| 1136 |
# define srandom_r rpl_srandom_r |
| 1137 |
# endif |
| 1138 |
_GL_FUNCDECL_RPL (srandom_r, int, |
| 1139 |
(unsigned int seed, struct random_data *rand_state) |
| 1140 |
_GL_ARG_NONNULL ((2))); |
| 1141 |
_GL_CXXALIAS_RPL (srandom_r, int, |
| 1142 |
(unsigned int seed, struct random_data *rand_state)); |
| 1143 |
# else |
| 1144 |
# if !@HAVE_RANDOM_R@ |
| 1145 |
_GL_FUNCDECL_SYS (srandom_r, int, |
| 1146 |
(unsigned int seed, struct random_data *rand_state) |
| 1147 |
_GL_ARG_NONNULL ((2))); |
| 1148 |
# endif |
| 1149 |
_GL_CXXALIAS_SYS (srandom_r, int, |
| 1150 |
(unsigned int seed, struct random_data *rand_state)); |
| 1151 |
# endif |
| 1152 |
_GL_CXXALIASWARN (srandom_r); |
| 1153 |
#elif defined GNULIB_POSIXCHECK |
| 1154 |
# undef srandom_r |
| 1155 |
# if HAVE_RAW_DECL_SRANDOM_R |
| 1156 |
_GL_WARN_ON_USE (srandom_r, "srandom_r is unportable - " |
| 1157 |
"use gnulib module random_r for portability"); |
| 1158 |
# endif |
| 1159 |
#endif |
| 1160 |
|
| 1161 |
#if @GNULIB_RANDOM_R@ |
| 1162 |
# if @REPLACE_RANDOM_R@ |
| 1163 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1164 |
# undef initstate_r |
| 1165 |
# define initstate_r rpl_initstate_r |
| 1166 |
# endif |
| 1167 |
_GL_FUNCDECL_RPL (initstate_r, int, |
| 1168 |
(unsigned int seed, char *buf, size_t buf_size, |
| 1169 |
struct random_data *rand_state) |
| 1170 |
_GL_ARG_NONNULL ((2, 4))); |
| 1171 |
_GL_CXXALIAS_RPL (initstate_r, int, |
| 1172 |
(unsigned int seed, char *buf, size_t buf_size, |
| 1173 |
struct random_data *rand_state)); |
| 1174 |
# else |
| 1175 |
# if !@HAVE_RANDOM_R@ |
| 1176 |
_GL_FUNCDECL_SYS (initstate_r, int, |
| 1177 |
(unsigned int seed, char *buf, size_t buf_size, |
| 1178 |
struct random_data *rand_state) |
| 1179 |
_GL_ARG_NONNULL ((2, 4))); |
| 1180 |
# endif |
| 1181 |
|
| 1182 |
|
| 1183 |
_GL_CXXALIAS_SYS_CAST (initstate_r, int, |
| 1184 |
(unsigned int seed, char *buf, size_t buf_size, |
| 1185 |
struct random_data *rand_state)); |
| 1186 |
# endif |
| 1187 |
_GL_CXXALIASWARN (initstate_r); |
| 1188 |
#elif defined GNULIB_POSIXCHECK |
| 1189 |
# undef initstate_r |
| 1190 |
# if HAVE_RAW_DECL_INITSTATE_R |
| 1191 |
_GL_WARN_ON_USE (initstate_r, "initstate_r is unportable - " |
| 1192 |
"use gnulib module random_r for portability"); |
| 1193 |
# endif |
| 1194 |
#endif |
| 1195 |
|
| 1196 |
#if @GNULIB_RANDOM_R@ |
| 1197 |
# if @REPLACE_RANDOM_R@ |
| 1198 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1199 |
# undef setstate_r |
| 1200 |
# define setstate_r rpl_setstate_r |
| 1201 |
# endif |
| 1202 |
_GL_FUNCDECL_RPL (setstate_r, int, |
| 1203 |
(char *arg_state, struct random_data *rand_state) |
| 1204 |
_GL_ARG_NONNULL ((1, 2))); |
| 1205 |
_GL_CXXALIAS_RPL (setstate_r, int, |
| 1206 |
(char *arg_state, struct random_data *rand_state)); |
| 1207 |
# else |
| 1208 |
# if !@HAVE_RANDOM_R@ |
| 1209 |
_GL_FUNCDECL_SYS (setstate_r, int, |
| 1210 |
(char *arg_state, struct random_data *rand_state) |
| 1211 |
_GL_ARG_NONNULL ((1, 2))); |
| 1212 |
# endif |
| 1213 |
|
| 1214 |
|
| 1215 |
_GL_CXXALIAS_SYS_CAST (setstate_r, int, |
| 1216 |
(char *arg_state, struct random_data *rand_state)); |
| 1217 |
# endif |
| 1218 |
_GL_CXXALIASWARN (setstate_r); |
| 1219 |
#elif defined GNULIB_POSIXCHECK |
| 1220 |
# undef setstate_r |
| 1221 |
# if HAVE_RAW_DECL_SETSTATE_R |
| 1222 |
_GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - " |
| 1223 |
"use gnulib module random_r for portability"); |
| 1224 |
# endif |
| 1225 |
#endif |
| 1226 |
|
| 1227 |
|
| 1228 |
#if @GNULIB_REALLOC_POSIX@ |
| 1229 |
# if (@GNULIB_REALLOC_POSIX@ && @REPLACE_REALLOC_FOR_REALLOC_POSIX@) \ |
| 1230 |
|| (@GNULIB_REALLOC_GNU@ && @REPLACE_REALLOC_FOR_REALLOC_GNU@) |
| 1231 |
# if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ |
| 1232 |
|| _GL_USE_STDLIB_ALLOC) |
| 1233 |
# undef realloc |
| 1234 |
# define realloc rpl_realloc |
| 1235 |
# endif |
| 1236 |
_GL_FUNCDECL_RPL (realloc, void *, (void *ptr, size_t size) |
| 1237 |
_GL_ATTRIBUTE_DEALLOC_FREE); |
| 1238 |
_GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size)); |
| 1239 |
# else |
| 1240 |
# if __GNUC__ >= 11 |
| 1241 |
|
| 1242 |
_GL_FUNCDECL_SYS (realloc, void *, (void *ptr, size_t size) |
| 1243 |
_GL_ATTRIBUTE_DEALLOC_FREE); |
| 1244 |
# endif |
| 1245 |
_GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size)); |
| 1246 |
# endif |
| 1247 |
# if __GLIBC__ >= 2 |
| 1248 |
_GL_CXXALIASWARN (realloc); |
| 1249 |
# endif |
| 1250 |
#else |
| 1251 |
# if @GNULIB_FREE_POSIX@ && __GNUC__ >= 11 && !defined realloc |
| 1252 |
|
| 1253 |
_GL_FUNCDECL_SYS (realloc, void *, (void *ptr, size_t size) |
| 1254 |
_GL_ATTRIBUTE_DEALLOC_FREE); |
| 1255 |
# endif |
| 1256 |
# if defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC |
| 1257 |
# undef realloc |
| 1258 |
|
| 1259 |
_GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - " |
| 1260 |
"use gnulib module realloc-posix for portability"); |
| 1261 |
# endif |
| 1262 |
#endif |
| 1263 |
|
| 1264 |
|
| 1265 |
#if @GNULIB_REALLOCARRAY@ |
| 1266 |
# if @REPLACE_REALLOCARRAY@ |
| 1267 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1268 |
# undef reallocarray |
| 1269 |
# define reallocarray rpl_reallocarray |
| 1270 |
# endif |
| 1271 |
_GL_FUNCDECL_RPL (reallocarray, void *, |
| 1272 |
(void *ptr, size_t nmemb, size_t size)); |
| 1273 |
_GL_CXXALIAS_RPL (reallocarray, void *, |
| 1274 |
(void *ptr, size_t nmemb, size_t size)); |
| 1275 |
# else |
| 1276 |
# if ! @HAVE_REALLOCARRAY@ |
| 1277 |
_GL_FUNCDECL_SYS (reallocarray, void *, |
| 1278 |
(void *ptr, size_t nmemb, size_t size)); |
| 1279 |
# endif |
| 1280 |
_GL_CXXALIAS_SYS (reallocarray, void *, |
| 1281 |
(void *ptr, size_t nmemb, size_t size)); |
| 1282 |
# endif |
| 1283 |
# if __GLIBC__ >= 2 |
| 1284 |
_GL_CXXALIASWARN (reallocarray); |
| 1285 |
# endif |
| 1286 |
#elif defined GNULIB_POSIXCHECK |
| 1287 |
# undef reallocarray |
| 1288 |
# if HAVE_RAW_DECL_REALLOCARRAY |
| 1289 |
_GL_WARN_ON_USE (reallocarray, "reallocarray is not portable - " |
| 1290 |
"use gnulib module reallocarray for portability"); |
| 1291 |
# endif |
| 1292 |
#endif |
| 1293 |
|
| 1294 |
#if @GNULIB_REALPATH@ |
| 1295 |
# if @REPLACE_REALPATH@ |
| 1296 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1297 |
# define realpath rpl_realpath |
| 1298 |
# endif |
| 1299 |
_GL_FUNCDECL_RPL (realpath, char *, |
| 1300 |
(const char *restrict name, char *restrict resolved) |
| 1301 |
_GL_ARG_NONNULL ((1))); |
| 1302 |
_GL_CXXALIAS_RPL (realpath, char *, |
| 1303 |
(const char *restrict name, char *restrict resolved)); |
| 1304 |
# else |
| 1305 |
# if !@HAVE_REALPATH@ |
| 1306 |
_GL_FUNCDECL_SYS (realpath, char *, |
| 1307 |
(const char *restrict name, char *restrict resolved) |
| 1308 |
_GL_ARG_NONNULL ((1))); |
| 1309 |
# endif |
| 1310 |
_GL_CXXALIAS_SYS (realpath, char *, |
| 1311 |
(const char *restrict name, char *restrict resolved)); |
| 1312 |
# endif |
| 1313 |
_GL_CXXALIASWARN (realpath); |
| 1314 |
#elif defined GNULIB_POSIXCHECK |
| 1315 |
# undef realpath |
| 1316 |
# if HAVE_RAW_DECL_REALPATH |
| 1317 |
_GL_WARN_ON_USE (realpath, "realpath is unportable - use gnulib module " |
| 1318 |
"canonicalize or canonicalize-lgpl for portability"); |
| 1319 |
# endif |
| 1320 |
#endif |
| 1321 |
|
| 1322 |
#if @GNULIB_RPMATCH@ |
| 1323 |
|
| 1324 |
|
| 1325 |
# if !@HAVE_RPMATCH@ |
| 1326 |
_GL_FUNCDECL_SYS (rpmatch, int, (const char *response) _GL_ARG_NONNULL ((1))); |
| 1327 |
# endif |
| 1328 |
_GL_CXXALIAS_SYS (rpmatch, int, (const char *response)); |
| 1329 |
_GL_CXXALIASWARN (rpmatch); |
| 1330 |
#elif defined GNULIB_POSIXCHECK |
| 1331 |
# undef rpmatch |
| 1332 |
# if HAVE_RAW_DECL_RPMATCH |
| 1333 |
_GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - " |
| 1334 |
"use gnulib module rpmatch for portability"); |
| 1335 |
# endif |
| 1336 |
#endif |
| 1337 |
|
| 1338 |
#if @GNULIB_SECURE_GETENV@ |
| 1339 |
|
| 1340 |
# if !@HAVE_SECURE_GETENV@ |
| 1341 |
_GL_FUNCDECL_SYS (secure_getenv, char *, |
| 1342 |
(char const *name) _GL_ARG_NONNULL ((1))); |
| 1343 |
# endif |
| 1344 |
_GL_CXXALIAS_SYS (secure_getenv, char *, (char const *name)); |
| 1345 |
_GL_CXXALIASWARN (secure_getenv); |
| 1346 |
#elif defined GNULIB_POSIXCHECK |
| 1347 |
# undef secure_getenv |
| 1348 |
# if HAVE_RAW_DECL_SECURE_GETENV |
| 1349 |
_GL_WARN_ON_USE (secure_getenv, "secure_getenv is unportable - " |
| 1350 |
"use gnulib module secure_getenv for portability"); |
| 1351 |
# endif |
| 1352 |
#endif |
| 1353 |
|
| 1354 |
#if @GNULIB_SETENV@ |
| 1355 |
|
| 1356 |
|
| 1357 |
# if @REPLACE_SETENV@ |
| 1358 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1359 |
# undef setenv |
| 1360 |
# define setenv rpl_setenv |
| 1361 |
# endif |
| 1362 |
_GL_FUNCDECL_RPL (setenv, int, |
| 1363 |
(const char *name, const char *value, int replace) |
| 1364 |
_GL_ARG_NONNULL ((1))); |
| 1365 |
_GL_CXXALIAS_RPL (setenv, int, |
| 1366 |
(const char *name, const char *value, int replace)); |
| 1367 |
# else |
| 1368 |
# if !@HAVE_DECL_SETENV@ |
| 1369 |
_GL_FUNCDECL_SYS (setenv, int, |
| 1370 |
(const char *name, const char *value, int replace) |
| 1371 |
_GL_ARG_NONNULL ((1))); |
| 1372 |
# endif |
| 1373 |
_GL_CXXALIAS_SYS (setenv, int, |
| 1374 |
(const char *name, const char *value, int replace)); |
| 1375 |
# endif |
| 1376 |
# if !(@REPLACE_SETENV@ && !@HAVE_DECL_SETENV@) |
| 1377 |
_GL_CXXALIASWARN (setenv); |
| 1378 |
# endif |
| 1379 |
#elif defined GNULIB_POSIXCHECK |
| 1380 |
# undef setenv |
| 1381 |
# if HAVE_RAW_DECL_SETENV |
| 1382 |
_GL_WARN_ON_USE (setenv, "setenv is unportable - " |
| 1383 |
"use gnulib module setenv for portability"); |
| 1384 |
# endif |
| 1385 |
#endif |
| 1386 |
|
| 1387 |
#if @GNULIB_STRTOD@ |
| 1388 |
|
| 1389 |
# if @REPLACE_STRTOD@ |
| 1390 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1391 |
# define strtod rpl_strtod |
| 1392 |
# endif |
| 1393 |
# define GNULIB_defined_strtod_function 1 |
| 1394 |
_GL_FUNCDECL_RPL (strtod, double, |
| 1395 |
(const char *restrict str, char **restrict endp) |
| 1396 |
_GL_ARG_NONNULL ((1))); |
| 1397 |
_GL_CXXALIAS_RPL (strtod, double, |
| 1398 |
(const char *restrict str, char **restrict endp)); |
| 1399 |
# else |
| 1400 |
# if !@HAVE_STRTOD@ |
| 1401 |
_GL_FUNCDECL_SYS (strtod, double, |
| 1402 |
(const char *restrict str, char **restrict endp) |
| 1403 |
_GL_ARG_NONNULL ((1))); |
| 1404 |
# endif |
| 1405 |
_GL_CXXALIAS_SYS (strtod, double, |
| 1406 |
(const char *restrict str, char **restrict endp)); |
| 1407 |
# endif |
| 1408 |
# if __GLIBC__ >= 2 |
| 1409 |
_GL_CXXALIASWARN (strtod); |
| 1410 |
# endif |
| 1411 |
#elif defined GNULIB_POSIXCHECK |
| 1412 |
# undef strtod |
| 1413 |
# if HAVE_RAW_DECL_STRTOD |
| 1414 |
_GL_WARN_ON_USE (strtod, "strtod is unportable - " |
| 1415 |
"use gnulib module strtod for portability"); |
| 1416 |
# endif |
| 1417 |
#endif |
| 1418 |
|
| 1419 |
#if @GNULIB_STRTOLD@ |
| 1420 |
|
| 1421 |
# if @REPLACE_STRTOLD@ |
| 1422 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1423 |
# define strtold rpl_strtold |
| 1424 |
# endif |
| 1425 |
# define GNULIB_defined_strtold_function 1 |
| 1426 |
_GL_FUNCDECL_RPL (strtold, long double, |
| 1427 |
(const char *restrict str, char **restrict endp) |
| 1428 |
_GL_ARG_NONNULL ((1))); |
| 1429 |
_GL_CXXALIAS_RPL (strtold, long double, |
| 1430 |
(const char *restrict str, char **restrict endp)); |
| 1431 |
# else |
| 1432 |
# if !@HAVE_STRTOLD@ |
| 1433 |
_GL_FUNCDECL_SYS (strtold, long double, |
| 1434 |
(const char *restrict str, char **restrict endp) |
| 1435 |
_GL_ARG_NONNULL ((1))); |
| 1436 |
# endif |
| 1437 |
_GL_CXXALIAS_SYS (strtold, long double, |
| 1438 |
(const char *restrict str, char **restrict endp)); |
| 1439 |
# endif |
| 1440 |
_GL_CXXALIASWARN (strtold); |
| 1441 |
#elif defined GNULIB_POSIXCHECK |
| 1442 |
# undef strtold |
| 1443 |
# if HAVE_RAW_DECL_STRTOLD |
| 1444 |
_GL_WARN_ON_USE (strtold, "strtold is unportable - " |
| 1445 |
"use gnulib module strtold for portability"); |
| 1446 |
# endif |
| 1447 |
#endif |
| 1448 |
|
| 1449 |
#if @GNULIB_STRTOL@ |
| 1450 |
|
| 1451 |
|
| 1452 |
|
| 1453 |
|
| 1454 |
|
| 1455 |
|
| 1456 |
|
| 1457 |
|
| 1458 |
# if @REPLACE_STRTOL@ |
| 1459 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1460 |
# define strtol rpl_strtol |
| 1461 |
# endif |
| 1462 |
# define GNULIB_defined_strtol_function 1 |
| 1463 |
_GL_FUNCDECL_RPL (strtol, long, |
| 1464 |
(const char *restrict string, char **restrict endptr, |
| 1465 |
int base) |
| 1466 |
_GL_ARG_NONNULL ((1))); |
| 1467 |
_GL_CXXALIAS_RPL (strtol, long, |
| 1468 |
(const char *restrict string, char **restrict endptr, |
| 1469 |
int base)); |
| 1470 |
# else |
| 1471 |
# if !@HAVE_STRTOL@ |
| 1472 |
_GL_FUNCDECL_SYS (strtol, long, |
| 1473 |
(const char *restrict string, char **restrict endptr, |
| 1474 |
int base) |
| 1475 |
_GL_ARG_NONNULL ((1))); |
| 1476 |
# endif |
| 1477 |
_GL_CXXALIAS_SYS (strtol, long, |
| 1478 |
(const char *restrict string, char **restrict endptr, |
| 1479 |
int base)); |
| 1480 |
# endif |
| 1481 |
# if __GLIBC__ >= 2 |
| 1482 |
_GL_CXXALIASWARN (strtol); |
| 1483 |
# endif |
| 1484 |
#elif defined GNULIB_POSIXCHECK |
| 1485 |
# undef strtol |
| 1486 |
# if HAVE_RAW_DECL_STRTOL |
| 1487 |
_GL_WARN_ON_USE (strtol, "strtol is unportable - " |
| 1488 |
"use gnulib module strtol for portability"); |
| 1489 |
# endif |
| 1490 |
#endif |
| 1491 |
|
| 1492 |
#if @GNULIB_STRTOLL@ |
| 1493 |
|
| 1494 |
|
| 1495 |
|
| 1496 |
|
| 1497 |
|
| 1498 |
|
| 1499 |
|
| 1500 |
|
| 1501 |
# if @REPLACE_STRTOLL@ |
| 1502 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1503 |
# define strtoll rpl_strtoll |
| 1504 |
# endif |
| 1505 |
# define GNULIB_defined_strtoll_function 1 |
| 1506 |
_GL_FUNCDECL_RPL (strtoll, long long, |
| 1507 |
(const char *restrict string, char **restrict endptr, |
| 1508 |
int base) |
| 1509 |
_GL_ARG_NONNULL ((1))); |
| 1510 |
_GL_CXXALIAS_RPL (strtoll, long long, |
| 1511 |
(const char *restrict string, char **restrict endptr, |
| 1512 |
int base)); |
| 1513 |
# else |
| 1514 |
# if !@HAVE_STRTOLL@ |
| 1515 |
_GL_FUNCDECL_SYS (strtoll, long long, |
| 1516 |
(const char *restrict string, char **restrict endptr, |
| 1517 |
int base) |
| 1518 |
_GL_ARG_NONNULL ((1))); |
| 1519 |
# endif |
| 1520 |
_GL_CXXALIAS_SYS (strtoll, long long, |
| 1521 |
(const char *restrict string, char **restrict endptr, |
| 1522 |
int base)); |
| 1523 |
# endif |
| 1524 |
_GL_CXXALIASWARN (strtoll); |
| 1525 |
#elif defined GNULIB_POSIXCHECK |
| 1526 |
# undef strtoll |
| 1527 |
# if HAVE_RAW_DECL_STRTOLL |
| 1528 |
_GL_WARN_ON_USE (strtoll, "strtoll is unportable - " |
| 1529 |
"use gnulib module strtoll for portability"); |
| 1530 |
# endif |
| 1531 |
#endif |
| 1532 |
|
| 1533 |
#if @GNULIB_STRTOUL@ |
| 1534 |
|
| 1535 |
|
| 1536 |
|
| 1537 |
|
| 1538 |
|
| 1539 |
|
| 1540 |
|
| 1541 |
# if @REPLACE_STRTOUL@ |
| 1542 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1543 |
# define strtoul rpl_strtoul |
| 1544 |
# endif |
| 1545 |
# define GNULIB_defined_strtoul_function 1 |
| 1546 |
_GL_FUNCDECL_RPL (strtoul, unsigned long, |
| 1547 |
(const char *restrict string, char **restrict endptr, |
| 1548 |
int base) |
| 1549 |
_GL_ARG_NONNULL ((1))); |
| 1550 |
_GL_CXXALIAS_RPL (strtoul, unsigned long, |
| 1551 |
(const char *restrict string, char **restrict endptr, |
| 1552 |
int base)); |
| 1553 |
# else |
| 1554 |
# if !@HAVE_STRTOUL@ |
| 1555 |
_GL_FUNCDECL_SYS (strtoul, unsigned long, |
| 1556 |
(const char *restrict string, char **restrict endptr, |
| 1557 |
int base) |
| 1558 |
_GL_ARG_NONNULL ((1))); |
| 1559 |
# endif |
| 1560 |
_GL_CXXALIAS_SYS (strtoul, unsigned long, |
| 1561 |
(const char *restrict string, char **restrict endptr, |
| 1562 |
int base)); |
| 1563 |
# endif |
| 1564 |
# if __GLIBC__ >= 2 |
| 1565 |
_GL_CXXALIASWARN (strtoul); |
| 1566 |
# endif |
| 1567 |
#elif defined GNULIB_POSIXCHECK |
| 1568 |
# undef strtoul |
| 1569 |
# if HAVE_RAW_DECL_STRTOUL |
| 1570 |
_GL_WARN_ON_USE (strtoul, "strtoul is unportable - " |
| 1571 |
"use gnulib module strtoul for portability"); |
| 1572 |
# endif |
| 1573 |
#endif |
| 1574 |
|
| 1575 |
#if @GNULIB_STRTOULL@ |
| 1576 |
|
| 1577 |
|
| 1578 |
|
| 1579 |
|
| 1580 |
|
| 1581 |
|
| 1582 |
|
| 1583 |
|
| 1584 |
# if @REPLACE_STRTOULL@ |
| 1585 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1586 |
# define strtoull rpl_strtoull |
| 1587 |
# endif |
| 1588 |
# define GNULIB_defined_strtoull_function 1 |
| 1589 |
_GL_FUNCDECL_RPL (strtoull, unsigned long long, |
| 1590 |
(const char *restrict string, char **restrict endptr, |
| 1591 |
int base) |
| 1592 |
_GL_ARG_NONNULL ((1))); |
| 1593 |
_GL_CXXALIAS_RPL (strtoull, unsigned long long, |
| 1594 |
(const char *restrict string, char **restrict endptr, |
| 1595 |
int base)); |
| 1596 |
# else |
| 1597 |
# if !@HAVE_STRTOULL@ |
| 1598 |
_GL_FUNCDECL_SYS (strtoull, unsigned long long, |
| 1599 |
(const char *restrict string, char **restrict endptr, |
| 1600 |
int base) |
| 1601 |
_GL_ARG_NONNULL ((1))); |
| 1602 |
# endif |
| 1603 |
_GL_CXXALIAS_SYS (strtoull, unsigned long long, |
| 1604 |
(const char *restrict string, char **restrict endptr, |
| 1605 |
int base)); |
| 1606 |
# endif |
| 1607 |
_GL_CXXALIASWARN (strtoull); |
| 1608 |
#elif defined GNULIB_POSIXCHECK |
| 1609 |
# undef strtoull |
| 1610 |
# if HAVE_RAW_DECL_STRTOULL |
| 1611 |
_GL_WARN_ON_USE (strtoull, "strtoull is unportable - " |
| 1612 |
"use gnulib module strtoull for portability"); |
| 1613 |
# endif |
| 1614 |
#endif |
| 1615 |
|
| 1616 |
#if @GNULIB_UNLOCKPT@ |
| 1617 |
|
| 1618 |
|
| 1619 |
# if !@HAVE_UNLOCKPT@ |
| 1620 |
_GL_FUNCDECL_SYS (unlockpt, int, (int fd)); |
| 1621 |
# endif |
| 1622 |
_GL_CXXALIAS_SYS (unlockpt, int, (int fd)); |
| 1623 |
_GL_CXXALIASWARN (unlockpt); |
| 1624 |
#elif defined GNULIB_POSIXCHECK |
| 1625 |
# undef unlockpt |
| 1626 |
# if HAVE_RAW_DECL_UNLOCKPT |
| 1627 |
_GL_WARN_ON_USE (unlockpt, "unlockpt is not portable - " |
| 1628 |
"use gnulib module unlockpt for portability"); |
| 1629 |
# endif |
| 1630 |
#endif |
| 1631 |
|
| 1632 |
#if @GNULIB_UNSETENV@ |
| 1633 |
|
| 1634 |
# if @REPLACE_UNSETENV@ |
| 1635 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1636 |
# undef unsetenv |
| 1637 |
# define unsetenv rpl_unsetenv |
| 1638 |
# endif |
| 1639 |
_GL_FUNCDECL_RPL (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1))); |
| 1640 |
_GL_CXXALIAS_RPL (unsetenv, int, (const char *name)); |
| 1641 |
# else |
| 1642 |
# if !@HAVE_DECL_UNSETENV@ |
| 1643 |
_GL_FUNCDECL_SYS (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1))); |
| 1644 |
# endif |
| 1645 |
_GL_CXXALIAS_SYS (unsetenv, int, (const char *name)); |
| 1646 |
# endif |
| 1647 |
# if !(@REPLACE_UNSETENV@ && !@HAVE_DECL_UNSETENV@) |
| 1648 |
_GL_CXXALIASWARN (unsetenv); |
| 1649 |
# endif |
| 1650 |
#elif defined GNULIB_POSIXCHECK |
| 1651 |
# undef unsetenv |
| 1652 |
# if HAVE_RAW_DECL_UNSETENV |
| 1653 |
_GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - " |
| 1654 |
"use gnulib module unsetenv for portability"); |
| 1655 |
# endif |
| 1656 |
#endif |
| 1657 |
|
| 1658 |
|
| 1659 |
#if @GNULIB_WCTOMB@ |
| 1660 |
# if @REPLACE_WCTOMB@ |
| 1661 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1662 |
# undef wctomb |
| 1663 |
# define wctomb rpl_wctomb |
| 1664 |
# endif |
| 1665 |
_GL_FUNCDECL_RPL (wctomb, int, (char *s, wchar_t wc)); |
| 1666 |
_GL_CXXALIAS_RPL (wctomb, int, (char *s, wchar_t wc)); |
| 1667 |
# else |
| 1668 |
_GL_CXXALIAS_SYS (wctomb, int, (char *s, wchar_t wc)); |
| 1669 |
# endif |
| 1670 |
# if __GLIBC__ >= 2 |
| 1671 |
_GL_CXXALIASWARN (wctomb); |
| 1672 |
# endif |
| 1673 |
#endif |
| 1674 |
|
| 1675 |
|
| 1676 |
#endif |
| 1677 |
#endif |
| 1678 |
#endif |