diff options
Diffstat (limited to 'lib/stdlib.in.h')
| -rw-r--r-- | lib/stdlib.in.h | 68 | 
1 files changed, 58 insertions, 10 deletions
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h index d80d7ec6b05..be8ab3b86c2 100644 --- a/lib/stdlib.in.h +++ b/lib/stdlib.in.h @@ -306,9 +306,18 @@ _GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - "  _GL_FUNCDECL_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));  _GL_CXXALIAS_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));  # else +#  if !@HAVE_MBTOWC@ +_GL_FUNCDECL_SYS (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); +#  endif  _GL_CXXALIAS_SYS (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));  # endif  _GL_CXXALIASWARN (mbtowc); +#elif defined GNULIB_POSIXCHECK +# undef mbtowc +# if HAVE_RAW_DECL_MBTOWC +_GL_WARN_ON_USE (mbtowc, "mbtowc is not portable - " +                 "use gnulib module mbtowc for portability"); +# endif  #endif  #if @GNULIB_MKDTEMP@ @@ -573,10 +582,19 @@ _GL_WARN_ON_USE (qsort_r, "qsort_r is not portable - "  #if @GNULIB_RANDOM@ -# if !@HAVE_RANDOM@ +# if @REPLACE_RANDOM@ +#  if !(defined __cplusplus && defined GNULIB_NAMESPACE) +#   undef random +#   define random rpl_random +#  endif +_GL_FUNCDECL_RPL (random, long, (void)); +_GL_CXXALIAS_RPL (random, long, (void)); +# else +#  if !@HAVE_RANDOM@  _GL_FUNCDECL_SYS (random, long, (void)); -# endif +#  endif  _GL_CXXALIAS_SYS (random, long, (void)); +# endif  _GL_CXXALIASWARN (random);  #elif defined GNULIB_POSIXCHECK  # undef random @@ -587,10 +605,19 @@ _GL_WARN_ON_USE (random, "random is unportable - "  #endif  #if @GNULIB_RANDOM@ -# if !@HAVE_RANDOM@ +# if @REPLACE_RANDOM@ +#  if !(defined __cplusplus && defined GNULIB_NAMESPACE) +#   undef srandom +#   define srandom rpl_srandom +#  endif +_GL_FUNCDECL_RPL (srandom, void, (unsigned int seed)); +_GL_CXXALIAS_RPL (srandom, void, (unsigned int seed)); +# else +#  if !@HAVE_RANDOM@  _GL_FUNCDECL_SYS (srandom, void, (unsigned int seed)); -# endif +#  endif  _GL_CXXALIAS_SYS (srandom, void, (unsigned int seed)); +# endif  _GL_CXXALIASWARN (srandom);  #elif defined GNULIB_POSIXCHECK  # undef srandom @@ -601,31 +628,52 @@ _GL_WARN_ON_USE (srandom, "srandom is unportable - "  #endif  #if @GNULIB_RANDOM@ -# if !@HAVE_RANDOM@ || !@HAVE_DECL_INITSTATE@ +# if @REPLACE_INITSTATE@ +#  if !(defined __cplusplus && defined GNULIB_NAMESPACE) +#   undef initstate +#   define initstate rpl_initstate +#  endif +_GL_FUNCDECL_RPL (initstate, char *, +                  (unsigned int seed, char *buf, size_t buf_size) +                  _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (initstate, char *, +                  (unsigned int seed, char *buf, size_t buf_size)); +# else +#  if !@HAVE_INITSTATE@ || !@HAVE_DECL_INITSTATE@  _GL_FUNCDECL_SYS (initstate, char *,                    (unsigned int seed, char *buf, size_t buf_size)                    _GL_ARG_NONNULL ((2))); -# endif +#  endif  _GL_CXXALIAS_SYS (initstate, char *,                    (unsigned int seed, char *buf, size_t buf_size)); +# endif  _GL_CXXALIASWARN (initstate);  #elif defined GNULIB_POSIXCHECK  # undef initstate -# if HAVE_RAW_DECL_INITSTATE_R +# if HAVE_RAW_DECL_INITSTATE  _GL_WARN_ON_USE (initstate, "initstate is unportable - "                   "use gnulib module random for portability");  # endif  #endif  #if @GNULIB_RANDOM@ -# if !@HAVE_RANDOM@ || !@HAVE_DECL_SETSTATE@ +# if @REPLACE_SETSTATE@ +#  if !(defined __cplusplus && defined GNULIB_NAMESPACE) +#   undef setstate +#   define setstate rpl_setstate +#  endif +_GL_FUNCDECL_RPL (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (setstate, char *, (char *arg_state)); +# else +#  if !@HAVE_SETSTATE@ || !@HAVE_DECL_SETSTATE@  _GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1))); -# endif +#  endif  _GL_CXXALIAS_SYS (setstate, char *, (char *arg_state)); +# endif  _GL_CXXALIASWARN (setstate);  #elif defined GNULIB_POSIXCHECK  # undef setstate -# if HAVE_RAW_DECL_SETSTATE_R +# if HAVE_RAW_DECL_SETSTATE  _GL_WARN_ON_USE (setstate, "setstate is unportable - "                   "use gnulib module random for portability");  # endif  | 
