Back to index

nagios-plugins  1.4.16
stdlib.in.h
Go to the documentation of this file.
00001 /* A GNU-like <stdlib.h>.
00002 
00003    Copyright (C) 1995, 2001-2004, 2006-2010 Free Software Foundation, Inc.
00004 
00005    This program is free software: you can redistribute it and/or modify
00006    it under the terms of the GNU General Public License as published by
00007    the Free Software Foundation; either version 3 of the License, or
00008    (at your option) any later version.
00009 
00010    This program is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013    GNU General Public License for more details.
00014 
00015    You should have received a copy of the GNU General Public License
00016    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
00017 
00018 #if __GNUC__ >= 3
00019 @PRAGMA_SYSTEM_HEADER@
00020 #endif
00021 
00022 #if defined __need_malloc_and_calloc
00023 /* Special invocation convention inside glibc header files.  */
00024 
00025 #@INCLUDE_NEXT@ @NEXT_STDLIB_H@
00026 
00027 #else
00028 /* Normal invocation convention.  */
00029 
00030 #ifndef _GL_STDLIB_H
00031 
00032 /* The include_next requires a split double-inclusion guard.  */
00033 #@INCLUDE_NEXT@ @NEXT_STDLIB_H@
00034 
00035 #ifndef _GL_STDLIB_H
00036 #define _GL_STDLIB_H
00037 
00038 /* NetBSD 5.0 mis-defines NULL.  */
00039 #include <stddef.h>
00040 
00041 /* Solaris declares getloadavg() in <sys/loadavg.h>.  */
00042 #if (@GNULIB_GETLOADAVG@ || defined GNULIB_POSIXCHECK) && @HAVE_SYS_LOADAVG_H@
00043 # include <sys/loadavg.h>
00044 #endif
00045 
00046 /* OSF/1 5.1 declares 'struct random_data' in <random.h>, which is included
00047    from <stdlib.h> if _REENTRANT is defined.  Include it always.  */
00048 #if @HAVE_RANDOM_H@
00049 # include <random.h>
00050 #endif
00051 
00052 #if !@HAVE_STRUCT_RANDOM_DATA@ || (@GNULIB_RANDOM_R@ && !@HAVE_RANDOM_R@) \
00053     || defined GNULIB_POSIXCHECK
00054 # include <stdint.h>
00055 #endif
00056 
00057 #if !@HAVE_STRUCT_RANDOM_DATA@
00058 struct random_data
00059 {
00060   int32_t *fptr;                /* Front pointer.  */
00061   int32_t *rptr;                /* Rear pointer.  */
00062   int32_t *state;               /* Array of state values.  */
00063   int rand_type;                /* Type of random number generator.  */
00064   int rand_deg;                 /* Degree of random number generator.  */
00065   int rand_sep;                 /* Distance between front and rear.  */
00066   int32_t *end_ptr;             /* Pointer behind state table.  */
00067 };
00068 #endif
00069 
00070 #if (@GNULIB_MKSTEMP@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
00071 /* On MacOS X 10.3, only <unistd.h> declares mkstemp.  */
00072 /* On Cygwin 1.7.1, only <unistd.h> declares getsubopt.  */
00073 /* But avoid namespace pollution on glibc systems and native Windows.  */
00074 # include <unistd.h>
00075 #endif
00076 
00077 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
00078 
00079 /* The definition of _GL_ARG_NONNULL is copied here.  */
00080 
00081 /* The definition of _GL_WARN_ON_USE is copied here.  */
00082 
00083 
00084 /* Some systems do not define EXIT_*, despite otherwise supporting C89.  */
00085 #ifndef EXIT_SUCCESS
00086 # define EXIT_SUCCESS 0
00087 #endif
00088 /* Tandem/NSK and other platforms that define EXIT_FAILURE as -1 interfere
00089    with proper operation of xargs.  */
00090 #ifndef EXIT_FAILURE
00091 # define EXIT_FAILURE 1
00092 #elif EXIT_FAILURE != 1
00093 # undef EXIT_FAILURE
00094 # define EXIT_FAILURE 1
00095 #endif
00096 
00097 
00098 #if @GNULIB_ATOLL@
00099 /* Parse a signed decimal integer.
00100    Returns the value of the integer.  Errors are not detected.  */
00101 # if !@HAVE_ATOLL@
00102 _GL_FUNCDECL_SYS (atoll, long long, (const char *string) _GL_ARG_NONNULL ((1)));
00103 # endif
00104 _GL_CXXALIAS_SYS (atoll, long long, (const char *string));
00105 _GL_CXXALIASWARN (atoll);
00106 #elif defined GNULIB_POSIXCHECK
00107 # undef atoll
00108 # if HAVE_RAW_DECL_ATOLL
00109 _GL_WARN_ON_USE (atoll, "atoll is unportable - "
00110                  "use gnulib module atoll for portability");
00111 # endif
00112 #endif
00113 
00114 #if @GNULIB_CALLOC_POSIX@
00115 # if !@HAVE_CALLOC_POSIX@
00116 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00117 #   undef calloc
00118 #   define calloc rpl_calloc
00119 #  endif
00120 _GL_FUNCDECL_RPL (calloc, void *, (size_t nmemb, size_t size));
00121 _GL_CXXALIAS_RPL (calloc, void *, (size_t nmemb, size_t size));
00122 # else
00123 _GL_CXXALIAS_SYS (calloc, void *, (size_t nmemb, size_t size));
00124 # endif
00125 _GL_CXXALIASWARN (calloc);
00126 #elif defined GNULIB_POSIXCHECK
00127 # undef calloc
00128 /* Assume calloc is always declared.  */
00129 _GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - "
00130                  "use gnulib module calloc-posix for portability");
00131 #endif
00132 
00133 #if @GNULIB_CANONICALIZE_FILE_NAME@
00134 # if @REPLACE_CANONICALIZE_FILE_NAME@
00135 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00136 #   define canonicalize_file_name rpl_canonicalize_file_name
00137 #  endif
00138 _GL_FUNCDECL_RPL (canonicalize_file_name, char *, (const char *name)
00139                                                   _GL_ARG_NONNULL ((1)));
00140 _GL_CXXALIAS_RPL (canonicalize_file_name, char *, (const char *name));
00141 # else
00142 #  if !@HAVE_CANONICALIZE_FILE_NAME@
00143 _GL_FUNCDECL_SYS (canonicalize_file_name, char *, (const char *name)
00144                                                   _GL_ARG_NONNULL ((1)));
00145 #  endif
00146 _GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name));
00147 # endif
00148 _GL_CXXALIASWARN (canonicalize_file_name);
00149 #elif defined GNULIB_POSIXCHECK
00150 # undef canonicalize_file_name
00151 # if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME
00152 _GL_WARN_ON_USE (canonicalize_file_name, "canonicalize_file_name is unportable - "
00153                  "use gnulib module canonicalize-lgpl for portability");
00154 # endif
00155 #endif
00156 
00157 #if @GNULIB_GETLOADAVG@
00158 /* Store max(NELEM,3) load average numbers in LOADAVG[].
00159    The three numbers are the load average of the last 1 minute, the last 5
00160    minutes, and the last 15 minutes, respectively.
00161    LOADAVG is an array of NELEM numbers.  */
00162 # if !@HAVE_DECL_GETLOADAVG@
00163 _GL_FUNCDECL_SYS (getloadavg, int, (double loadavg[], int nelem)
00164                                    _GL_ARG_NONNULL ((1)));
00165 # endif
00166 _GL_CXXALIAS_SYS (getloadavg, int, (double loadavg[], int nelem));
00167 _GL_CXXALIASWARN (getloadavg);
00168 #elif defined GNULIB_POSIXCHECK
00169 # undef getloadavg
00170 # if HAVE_RAW_DECL_GETLOADAVG
00171 _GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - "
00172                  "use gnulib module getloadavg for portability");
00173 # endif
00174 #endif
00175 
00176 #if @GNULIB_GETSUBOPT@
00177 /* Assuming *OPTIONP is a comma separated list of elements of the form
00178    "token" or "token=value", getsubopt parses the first of these elements.
00179    If the first element refers to a "token" that is member of the given
00180    NULL-terminated array of tokens:
00181      - It replaces the comma with a NUL byte, updates *OPTIONP to point past
00182        the first option and the comma, sets *VALUEP to the value of the
00183        element (or NULL if it doesn't contain an "=" sign),
00184      - It returns the index of the "token" in the given array of tokens.
00185    Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined.
00186    For more details see the POSIX:2001 specification.
00187    http://www.opengroup.org/susv3xsh/getsubopt.html */
00188 # if !@HAVE_GETSUBOPT@
00189 _GL_FUNCDECL_SYS (getsubopt, int,
00190                   (char **optionp, char *const *tokens, char **valuep)
00191                   _GL_ARG_NONNULL ((1, 2, 3)));
00192 # endif
00193 _GL_CXXALIAS_SYS (getsubopt, int,
00194                   (char **optionp, char *const *tokens, char **valuep));
00195 _GL_CXXALIASWARN (getsubopt);
00196 #elif defined GNULIB_POSIXCHECK
00197 # undef getsubopt
00198 # if HAVE_RAW_DECL_GETSUBOPT
00199 _GL_WARN_ON_USE (getsubopt, "getsubopt is unportable - "
00200                  "use gnulib module getsubopt for portability");
00201 # endif
00202 #endif
00203 
00204 #if @GNULIB_GRANTPT@
00205 /* Change the ownership and access permission of the slave side of the
00206    pseudo-terminal whose master side is specified by FD.  */
00207 # if !@HAVE_GRANTPT@
00208 _GL_FUNCDECL_SYS (grantpt, int, (int fd));
00209 # endif
00210 _GL_CXXALIAS_SYS (grantpt, int, (int fd));
00211 _GL_CXXALIASWARN (grantpt);
00212 #elif defined GNULIB_POSIXCHECK
00213 # undef grantpt
00214 # if HAVE_RAW_DECL_GRANTPT
00215 _GL_WARN_ON_USE (ptsname, "grantpt is not portable - "
00216                  "use gnulib module grantpt for portability");
00217 # endif
00218 #endif
00219 
00220 #if @GNULIB_MALLOC_POSIX@
00221 # if !@HAVE_MALLOC_POSIX@
00222 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00223 #   undef malloc
00224 #   define malloc rpl_malloc
00225 #  endif
00226 _GL_FUNCDECL_RPL (malloc, void *, (size_t size));
00227 _GL_CXXALIAS_RPL (malloc, void *, (size_t size));
00228 # else
00229 _GL_CXXALIAS_SYS (malloc, void *, (size_t size));
00230 # endif
00231 _GL_CXXALIASWARN (malloc);
00232 #elif defined GNULIB_POSIXCHECK
00233 # undef malloc
00234 /* Assume malloc is always declared.  */
00235 _GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - "
00236                  "use gnulib module malloc-posix for portability");
00237 #endif
00238 
00239 #if @GNULIB_MKDTEMP@
00240 /* Create a unique temporary directory from TEMPLATE.
00241    The last six characters of TEMPLATE must be "XXXXXX";
00242    they are replaced with a string that makes the directory name unique.
00243    Returns TEMPLATE, or a null pointer if it cannot get a unique name.
00244    The directory is created mode 700.  */
00245 # if !@HAVE_MKDTEMP@
00246 _GL_FUNCDECL_SYS (mkdtemp, char *, (char * /*template*/) _GL_ARG_NONNULL ((1)));
00247 # endif
00248 _GL_CXXALIAS_SYS (mkdtemp, char *, (char * /*template*/));
00249 _GL_CXXALIASWARN (mkdtemp);
00250 #elif defined GNULIB_POSIXCHECK
00251 # undef mkdtemp
00252 # if HAVE_RAW_DECL_MKDTEMP
00253 _GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - "
00254                  "use gnulib module mkdtemp for portability");
00255 # endif
00256 #endif
00257 
00258 #if @GNULIB_MKOSTEMP@
00259 /* Create a unique temporary file from TEMPLATE.
00260    The last six characters of TEMPLATE must be "XXXXXX";
00261    they are replaced with a string that makes the file name unique.
00262    The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>)
00263    and O_TEXT, O_BINARY (defined in "binary-io.h").
00264    The file is then created, with the specified flags, ensuring it didn't exist
00265    before.
00266    The file is created read-write (mask at least 0600 & ~umask), but it may be
00267    world-readable and world-writable (mask 0666 & ~umask), depending on the
00268    implementation.
00269    Returns the open file descriptor if successful, otherwise -1 and errno
00270    set.  */
00271 # if !@HAVE_MKOSTEMP@
00272 _GL_FUNCDECL_SYS (mkostemp, int, (char * /*template*/, int /*flags*/)
00273                                  _GL_ARG_NONNULL ((1)));
00274 # endif
00275 _GL_CXXALIAS_SYS (mkostemp, int, (char * /*template*/, int /*flags*/));
00276 _GL_CXXALIASWARN (mkostemp);
00277 #elif defined GNULIB_POSIXCHECK
00278 # undef mkostemp
00279 # if HAVE_RAW_DECL_MKOSTEMP
00280 _GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - "
00281                  "use gnulib module mkostemp for portability");
00282 # endif
00283 #endif
00284 
00285 #if @GNULIB_MKOSTEMPS@
00286 /* Create a unique temporary file from TEMPLATE.
00287    The last six characters of TEMPLATE before a suffix of length
00288    SUFFIXLEN must be "XXXXXX";
00289    they are replaced with a string that makes the file name unique.
00290    The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>)
00291    and O_TEXT, O_BINARY (defined in "binary-io.h").
00292    The file is then created, with the specified flags, ensuring it didn't exist
00293    before.
00294    The file is created read-write (mask at least 0600 & ~umask), but it may be
00295    world-readable and world-writable (mask 0666 & ~umask), depending on the
00296    implementation.
00297    Returns the open file descriptor if successful, otherwise -1 and errno
00298    set.  */
00299 # if !@HAVE_MKOSTEMPS@
00300 _GL_FUNCDECL_SYS (mkostemps, int,
00301                   (char * /*template*/, int /*suffixlen*/, int /*flags*/)
00302                   _GL_ARG_NONNULL ((1)));
00303 # endif
00304 _GL_CXXALIAS_SYS (mkostemps, int,
00305                   (char * /*template*/, int /*suffixlen*/, int /*flags*/));
00306 _GL_CXXALIASWARN (mkostemps);
00307 #elif defined GNULIB_POSIXCHECK
00308 # undef mkostemps
00309 # if HAVE_RAW_DECL_MKOSTEMPS
00310 _GL_WARN_ON_USE (mkostemps, "mkostemps is unportable - "
00311                  "use gnulib module mkostemps for portability");
00312 # endif
00313 #endif
00314 
00315 #if @GNULIB_MKSTEMP@
00316 /* Create a unique temporary file from TEMPLATE.
00317    The last six characters of TEMPLATE must be "XXXXXX";
00318    they are replaced with a string that makes the file name unique.
00319    The file is then created, ensuring it didn't exist before.
00320    The file is created read-write (mask at least 0600 & ~umask), but it may be
00321    world-readable and world-writable (mask 0666 & ~umask), depending on the
00322    implementation.
00323    Returns the open file descriptor if successful, otherwise -1 and errno
00324    set.  */
00325 # if @REPLACE_MKSTEMP@
00326 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00327 #   define mkstemp rpl_mkstemp
00328 #  endif
00329 _GL_FUNCDECL_RPL (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1)));
00330 _GL_CXXALIAS_RPL (mkstemp, int, (char * /*template*/));
00331 # else
00332 #  if ! @HAVE_MKSTEMP@
00333 _GL_FUNCDECL_SYS (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1)));
00334 #  endif
00335 _GL_CXXALIAS_SYS (mkstemp, int, (char * /*template*/));
00336 # endif
00337 _GL_CXXALIASWARN (mkstemp);
00338 #elif defined GNULIB_POSIXCHECK
00339 # undef mkstemp
00340 # if HAVE_RAW_DECL_MKSTEMP
00341 _GL_WARN_ON_USE (mkstemp, "mkstemp is unportable - "
00342                  "use gnulib module mkstemp for portability");
00343 # endif
00344 #endif
00345 
00346 #if @GNULIB_MKSTEMPS@
00347 /* Create a unique temporary file from TEMPLATE.
00348    The last six characters of TEMPLATE prior to a suffix of length
00349    SUFFIXLEN must be "XXXXXX";
00350    they are replaced with a string that makes the file name unique.
00351    The file is then created, ensuring it didn't exist before.
00352    The file is created read-write (mask at least 0600 & ~umask), but it may be
00353    world-readable and world-writable (mask 0666 & ~umask), depending on the
00354    implementation.
00355    Returns the open file descriptor if successful, otherwise -1 and errno
00356    set.  */
00357 # if !@HAVE_MKSTEMPS@
00358 _GL_FUNCDECL_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/)
00359                                  _GL_ARG_NONNULL ((1)));
00360 # endif
00361 _GL_CXXALIAS_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/));
00362 _GL_CXXALIASWARN (mkstemps);
00363 #elif defined GNULIB_POSIXCHECK
00364 # undef mkstemps
00365 # if HAVE_RAW_DECL_MKSTEMPS
00366 _GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - "
00367                  "use gnulib module mkstemps for portability");
00368 # endif
00369 #endif
00370 
00371 #if @GNULIB_PTSNAME@
00372 /* Return the pathname of the pseudo-terminal slave associated with
00373    the master FD is open on, or NULL on errors.  */
00374 # if !@HAVE_PTSNAME@
00375 _GL_FUNCDECL_SYS (ptsname, char *, (int fd));
00376 # endif
00377 _GL_CXXALIAS_SYS (ptsname, char *, (int fd));
00378 _GL_CXXALIASWARN (ptsname);
00379 #elif defined GNULIB_POSIXCHECK
00380 # undef ptsname
00381 # if HAVE_RAW_DECL_PTSNAME
00382 _GL_WARN_ON_USE (ptsname, "ptsname is not portable - "
00383                  "use gnulib module ptsname for portability");
00384 # endif
00385 #endif
00386 
00387 #if @GNULIB_PUTENV@
00388 # if @REPLACE_PUTENV@
00389 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00390 #   undef putenv
00391 #   define putenv rpl_putenv
00392 #  endif
00393 _GL_FUNCDECL_RPL (putenv, int, (char *string) _GL_ARG_NONNULL ((1)));
00394 _GL_CXXALIAS_RPL (putenv, int, (char *string));
00395 # else
00396 _GL_CXXALIAS_SYS (putenv, int, (char *string));
00397 # endif
00398 _GL_CXXALIASWARN (putenv);
00399 #endif
00400 
00401 
00402 #if @GNULIB_RANDOM_R@
00403 # if !@HAVE_RANDOM_R@
00404 #  ifndef RAND_MAX
00405 #   define RAND_MAX 2147483647
00406 #  endif
00407 # endif
00408 #endif
00409 
00410 #if @GNULIB_RANDOM_R@
00411 # if !@HAVE_RANDOM_R@
00412 _GL_FUNCDECL_SYS (random_r, int, (struct random_data *buf, int32_t *result)
00413                                  _GL_ARG_NONNULL ((1, 2)));
00414 # endif
00415 _GL_CXXALIAS_SYS (random_r, int, (struct random_data *buf, int32_t *result));
00416 _GL_CXXALIASWARN (random_r);
00417 #elif defined GNULIB_POSIXCHECK
00418 # undef random_r
00419 # if HAVE_RAW_DECL_RANDOM_R
00420 _GL_WARN_ON_USE (random_r, "random_r is unportable - "
00421                  "use gnulib module random_r for portability");
00422 # endif
00423 #endif
00424 
00425 #if @GNULIB_RANDOM_R@
00426 # if !@HAVE_RANDOM_R@
00427 _GL_FUNCDECL_SYS (srandom_r, int,
00428                   (unsigned int seed, struct random_data *rand_state)
00429                   _GL_ARG_NONNULL ((2)));
00430 # endif
00431 _GL_CXXALIAS_SYS (srandom_r, int,
00432                   (unsigned int seed, struct random_data *rand_state));
00433 _GL_CXXALIASWARN (srandom_r);
00434 #elif defined GNULIB_POSIXCHECK
00435 # undef srandom_r
00436 # if HAVE_RAW_DECL_SRANDOM_R
00437 _GL_WARN_ON_USE (srandom_r, "srandom_r is unportable - "
00438                  "use gnulib module random_r for portability");
00439 # endif
00440 #endif
00441 
00442 #if @GNULIB_RANDOM_R@
00443 # if !@HAVE_RANDOM_R@
00444 _GL_FUNCDECL_SYS (initstate_r, int,
00445                   (unsigned int seed, char *buf, size_t buf_size,
00446                    struct random_data *rand_state)
00447                   _GL_ARG_NONNULL ((2, 4)));
00448 # endif
00449 _GL_CXXALIAS_SYS (initstate_r, int,
00450                   (unsigned int seed, char *buf, size_t buf_size,
00451                    struct random_data *rand_state));
00452 _GL_CXXALIASWARN (initstate_r);
00453 #elif defined GNULIB_POSIXCHECK
00454 # undef initstate_r
00455 # if HAVE_RAW_DECL_INITSTATE_R
00456 _GL_WARN_ON_USE (initstate_r, "initstate_r is unportable - "
00457                  "use gnulib module random_r for portability");
00458 # endif
00459 #endif
00460 
00461 #if @GNULIB_RANDOM_R@
00462 # if !@HAVE_RANDOM_R@
00463 _GL_FUNCDECL_SYS (setstate_r, int,
00464                   (char *arg_state, struct random_data *rand_state)
00465                   _GL_ARG_NONNULL ((1, 2)));
00466 # endif
00467 _GL_CXXALIAS_SYS (setstate_r, int,
00468                   (char *arg_state, struct random_data *rand_state));
00469 _GL_CXXALIASWARN (setstate_r);
00470 #elif defined GNULIB_POSIXCHECK
00471 # undef setstate_r
00472 # if HAVE_RAW_DECL_SETSTATE_R
00473 _GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - "
00474                  "use gnulib module random_r for portability");
00475 # endif
00476 #endif
00477 
00478 
00479 #if @GNULIB_REALLOC_POSIX@
00480 # if !@HAVE_REALLOC_POSIX@
00481 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00482 #   undef realloc
00483 #   define realloc rpl_realloc
00484 #  endif
00485 _GL_FUNCDECL_RPL (realloc, void *, (void *ptr, size_t size));
00486 _GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size));
00487 # else
00488 _GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size));
00489 # endif
00490 _GL_CXXALIASWARN (realloc);
00491 #elif defined GNULIB_POSIXCHECK
00492 # undef realloc
00493 /* Assume realloc is always declared.  */
00494 _GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - "
00495                  "use gnulib module realloc-posix for portability");
00496 #endif
00497 
00498 #if @GNULIB_REALPATH@
00499 # if @REPLACE_REALPATH@
00500 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00501 #   define realpath rpl_realpath
00502 #  endif
00503 _GL_FUNCDECL_RPL (realpath, char *, (const char *name, char *resolved)
00504                                     _GL_ARG_NONNULL ((1)));
00505 _GL_CXXALIAS_RPL (realpath, char *, (const char *name, char *resolved));
00506 # else
00507 #  if !@HAVE_REALPATH@
00508 _GL_FUNCDECL_SYS (realpath, char *, (const char *name, char *resolved)
00509                                     _GL_ARG_NONNULL ((1)));
00510 #  endif
00511 _GL_CXXALIAS_SYS (realpath, char *, (const char *name, char *resolved));
00512 # endif
00513 _GL_CXXALIASWARN (realpath);
00514 #elif defined GNULIB_POSIXCHECK
00515 # undef realpath
00516 # if HAVE_RAW_DECL_REALPATH
00517 _GL_WARN_ON_USE (realpath, "realpath is unportable - use gnulib module "
00518                  "canonicalize or canonicalize-lgpl for portability");
00519 # endif
00520 #endif
00521 
00522 #if @GNULIB_RPMATCH@
00523 /* Test a user response to a question.
00524    Return 1 if it is affirmative, 0 if it is negative, or -1 if not clear.  */
00525 # if !@HAVE_RPMATCH@
00526 _GL_FUNCDECL_SYS (rpmatch, int, (const char *response) _GL_ARG_NONNULL ((1)));
00527 # endif
00528 _GL_CXXALIAS_SYS (rpmatch, int, (const char *response));
00529 _GL_CXXALIASWARN (rpmatch);
00530 #elif defined GNULIB_POSIXCHECK
00531 # undef rpmatch
00532 # if HAVE_RAW_DECL_RPMATCH
00533 _GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - "
00534                  "use gnulib module rpmatch for portability");
00535 # endif
00536 #endif
00537 
00538 #if @GNULIB_SETENV@
00539 /* Set NAME to VALUE in the environment.
00540    If REPLACE is nonzero, overwrite an existing value.  */
00541 # if @REPLACE_SETENV@
00542 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00543 #   undef setenv
00544 #   define setenv rpl_setenv
00545 #  endif
00546 _GL_FUNCDECL_RPL (setenv, int,
00547                   (const char *name, const char *value, int replace)
00548                   _GL_ARG_NONNULL ((1)));
00549 _GL_CXXALIAS_RPL (setenv, int,
00550                   (const char *name, const char *value, int replace));
00551 # else
00552 #  if !@HAVE_SETENV@
00553 _GL_FUNCDECL_SYS (setenv, int,
00554                   (const char *name, const char *value, int replace)
00555                   _GL_ARG_NONNULL ((1)));
00556 #  endif
00557 _GL_CXXALIAS_SYS (setenv, int,
00558                   (const char *name, const char *value, int replace));
00559 # endif
00560 _GL_CXXALIASWARN (setenv);
00561 #elif defined GNULIB_POSIXCHECK
00562 # undef setenv
00563 # if HAVE_RAW_DECL_SETENV
00564 _GL_WARN_ON_USE (setenv, "setenv is unportable - "
00565                  "use gnulib module setenv for portability");
00566 # endif
00567 #endif
00568 
00569 #if @GNULIB_STRTOD@
00570  /* Parse a double from STRING, updating ENDP if appropriate.  */
00571 # if @REPLACE_STRTOD@
00572 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00573 #   define strtod rpl_strtod
00574 #  endif
00575 _GL_FUNCDECL_RPL (strtod, double, (const char *str, char **endp)
00576                                   _GL_ARG_NONNULL ((1)));
00577 _GL_CXXALIAS_RPL (strtod, double, (const char *str, char **endp));
00578 # else
00579 #  if !@HAVE_STRTOD@
00580 _GL_FUNCDECL_SYS (strtod, double, (const char *str, char **endp)
00581                                   _GL_ARG_NONNULL ((1)));
00582 #  endif
00583 _GL_CXXALIAS_SYS (strtod, double, (const char *str, char **endp));
00584 # endif
00585 _GL_CXXALIASWARN (strtod);
00586 #elif defined GNULIB_POSIXCHECK
00587 # undef strtod
00588 # if HAVE_RAW_DECL_STRTOD
00589 _GL_WARN_ON_USE (strtod, "strtod is unportable - "
00590                  "use gnulib module strtod for portability");
00591 # endif
00592 #endif
00593 
00594 #if @GNULIB_STRTOLL@
00595 /* Parse a signed integer whose textual representation starts at STRING.
00596    The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0,
00597    it may be decimal or octal (with prefix "0") or hexadecimal (with prefix
00598    "0x").
00599    If ENDPTR is not NULL, the address of the first byte after the integer is
00600    stored in *ENDPTR.
00601    Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno is set
00602    to ERANGE.  */
00603 # if !@HAVE_STRTOLL@
00604 _GL_FUNCDECL_SYS (strtoll, long long,
00605                   (const char *string, char **endptr, int base)
00606                   _GL_ARG_NONNULL ((1)));
00607 # endif
00608 _GL_CXXALIAS_SYS (strtoll, long long,
00609                   (const char *string, char **endptr, int base));
00610 _GL_CXXALIASWARN (strtoll);
00611 #elif defined GNULIB_POSIXCHECK
00612 # undef strtoll
00613 # if HAVE_RAW_DECL_STRTOLL
00614 _GL_WARN_ON_USE (strtoll, "strtoll is unportable - "
00615                  "use gnulib module strtoll for portability");
00616 # endif
00617 #endif
00618 
00619 #if @GNULIB_STRTOULL@
00620 /* Parse an unsigned integer whose textual representation starts at STRING.
00621    The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0,
00622    it may be decimal or octal (with prefix "0") or hexadecimal (with prefix
00623    "0x").
00624    If ENDPTR is not NULL, the address of the first byte after the integer is
00625    stored in *ENDPTR.
00626    Upon overflow, the return value is ULLONG_MAX, and errno is set to
00627    ERANGE.  */
00628 # if !@HAVE_STRTOULL@
00629 _GL_FUNCDECL_SYS (strtoull, unsigned long long,
00630                   (const char *string, char **endptr, int base)
00631                   _GL_ARG_NONNULL ((1)));
00632 # endif
00633 _GL_CXXALIAS_SYS (strtoull, unsigned long long,
00634                   (const char *string, char **endptr, int base));
00635 _GL_CXXALIASWARN (strtoull);
00636 #elif defined GNULIB_POSIXCHECK
00637 # undef strtoull
00638 # if HAVE_RAW_DECL_STRTOULL
00639 _GL_WARN_ON_USE (strtoull, "strtoull is unportable - "
00640                  "use gnulib module strtoull for portability");
00641 # endif
00642 #endif
00643 
00644 #if @GNULIB_UNLOCKPT@
00645 /* Unlock the slave side of the pseudo-terminal whose master side is specified
00646    by FD, so that it can be opened.  */
00647 # if !@HAVE_UNLOCKPT@
00648 _GL_FUNCDECL_SYS (unlockpt, int, (int fd));
00649 # endif
00650 _GL_CXXALIAS_SYS (unlockpt, int, (int fd));
00651 _GL_CXXALIASWARN (unlockpt);
00652 #elif defined GNULIB_POSIXCHECK
00653 # undef unlockpt
00654 # if HAVE_RAW_DECL_UNLOCKPT
00655 _GL_WARN_ON_USE (ptsname, "unlockpt is not portable - "
00656                  "use gnulib module unlockpt for portability");
00657 # endif
00658 #endif
00659 
00660 #if @GNULIB_UNSETENV@
00661 /* Remove the variable NAME from the environment.  */
00662 # if @REPLACE_UNSETENV@
00663 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00664 #   undef unsetenv
00665 #   define unsetenv rpl_unsetenv
00666 #  endif
00667 _GL_FUNCDECL_RPL (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1)));
00668 _GL_CXXALIAS_RPL (unsetenv, int, (const char *name));
00669 # else
00670 #  if !@HAVE_UNSETENV@
00671 _GL_FUNCDECL_SYS (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1)));
00672 #  endif
00673 _GL_CXXALIAS_SYS (unsetenv, int, (const char *name));
00674 # endif
00675 _GL_CXXALIASWARN (unsetenv);
00676 #elif defined GNULIB_POSIXCHECK
00677 # undef unsetenv
00678 # if HAVE_RAW_DECL_UNSETENV
00679 _GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - "
00680                  "use gnulib module unsetenv for portability");
00681 # endif
00682 #endif
00683 
00684 
00685 #endif /* _GL_STDLIB_H */
00686 #endif /* _GL_STDLIB_H */
00687 #endif