Blame src/gl/wchar.in.h

Packit aea12f
/* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
Packit aea12f
Packit Service 991b93
   Copyright (C) 2007-2020 Free Software Foundation, Inc.
Packit aea12f
Packit aea12f
   This program is free software; you can redistribute it and/or modify
Packit aea12f
   it under the terms of the GNU General Public License as published by
Packit aea12f
   the Free Software Foundation; either version 3, or (at your option)
Packit aea12f
   any later version.
Packit aea12f
Packit aea12f
   This program is distributed in the hope that it will be useful,
Packit aea12f
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit aea12f
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit aea12f
   GNU General Public License for more details.
Packit aea12f
Packit aea12f
   You should have received a copy of the GNU General Public License
Packit aea12f
   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
Packit aea12f
Packit aea12f
/* Written by Eric Blake.  */
Packit aea12f
Packit aea12f
/*
Packit aea12f
 * ISO C 99 <wchar.h> for platforms that have issues.
Packit Service 991b93
 * <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/wchar.h.html>
Packit aea12f
 *
Packit aea12f
 * For now, this just ensures proper prerequisite inclusion order and
Packit aea12f
 * the declaration of wcwidth().
Packit aea12f
 */
Packit aea12f
Packit aea12f
#if __GNUC__ >= 3
Packit aea12f
@PRAGMA_SYSTEM_HEADER@
Packit aea12f
#endif
Packit aea12f
@PRAGMA_COLUMNS@
Packit aea12f
Packit aea12f
#if (((defined __need_mbstate_t || defined __need_wint_t)               \
Packit aea12f
      && !defined __MINGW32__)                                          \
Packit aea12f
     || (defined __hpux                                                 \
Packit Service 991b93
         && ((defined _INTTYPES_INCLUDED                                \
Packit Service 991b93
              && !defined _GL_FINISHED_INCLUDING_SYSTEM_INTTYPES_H)     \
Packit aea12f
             || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H))               \
Packit aea12f
     || (defined __MINGW32__ && defined __STRING_H_SOURCED__)           \
Packit aea12f
     || defined _GL_ALREADY_INCLUDING_WCHAR_H)
Packit aea12f
/* Special invocation convention:
Packit aea12f
   - Inside glibc and uClibc header files, but not MinGW.
Packit aea12f
   - On HP-UX 11.00 we have a sequence of nested includes
Packit aea12f
     <wchar.h> -> <stdlib.h> -> <stdint.h>, and the latter includes <wchar.h>,
Packit aea12f
     once indirectly <stdint.h> -> <sys/types.h> -> <inttypes.h> -> <wchar.h>
Packit aea12f
     and once directly.  In both situations 'wint_t' is not yet defined,
Packit aea12f
     therefore we cannot provide the function overrides; instead include only
Packit aea12f
     the system's <wchar.h>.
Packit aea12f
   - With MinGW 3.22, when <string.h> includes <wchar.h>, only some part of
Packit aea12f
     <wchar.h> is actually processed, and that doesn't include 'mbstate_t'.
Packit aea12f
   - On IRIX 6.5, similarly, we have an include <wchar.h> -> <wctype.h>, and
Packit aea12f
     the latter includes <wchar.h>.  But here, we have no way to detect whether
Packit aea12f
     <wctype.h> is completely included or is still being included.  */
Packit aea12f
Packit aea12f
#@INCLUDE_NEXT@ @NEXT_WCHAR_H@
Packit aea12f
Packit aea12f
#else
Packit aea12f
/* Normal invocation convention.  */
Packit aea12f
Packit aea12f
#ifndef _@GUARD_PREFIX@_WCHAR_H
Packit aea12f
Packit aea12f
#define _GL_ALREADY_INCLUDING_WCHAR_H
Packit aea12f
Packit aea12f
#if @HAVE_FEATURES_H@
Packit aea12f
# include <features.h> /* for __GLIBC__ */
Packit aea12f
#endif
Packit aea12f
Packit aea12f
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
Packit aea12f
   <wchar.h>.
Packit aea12f
   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
Packit aea12f
   included before <wchar.h>.
Packit aea12f
   In some builds of uClibc, <wchar.h> is nonexistent and wchar_t is defined
Packit aea12f
   by <stddef.h>.
Packit aea12f
   But avoid namespace pollution on glibc systems.  */
Packit aea12f
#if !(defined __GLIBC__ && !defined __UCLIBC__)
Packit aea12f
# include <stddef.h>
Packit aea12f
#endif
Packit aea12f
#ifndef __GLIBC__
Packit aea12f
# include <stdio.h>
Packit aea12f
# include <time.h>
Packit aea12f
#endif
Packit aea12f
Packit aea12f
/* Include the original <wchar.h> if it exists.
Packit aea12f
   Some builds of uClibc lack it.  */
Packit aea12f
/* The include_next requires a split double-inclusion guard.  */
Packit aea12f
#if @HAVE_WCHAR_H@
Packit aea12f
# @INCLUDE_NEXT@ @NEXT_WCHAR_H@
Packit aea12f
#endif
Packit aea12f
Packit aea12f
#undef _GL_ALREADY_INCLUDING_WCHAR_H
Packit aea12f
Packit aea12f
#ifndef _@GUARD_PREFIX@_WCHAR_H
Packit aea12f
#define _@GUARD_PREFIX@_WCHAR_H
Packit aea12f
Packit aea12f
/* The __attribute__ feature is available in gcc versions 2.5 and later.
Packit aea12f
   The attribute __pure__ was added in gcc 2.96.  */
Packit Service 991b93
#ifndef _GL_ATTRIBUTE_PURE
Packit Service 991b93
# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
Packit Service 991b93
#  define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
Packit Service 991b93
# else
Packit Service 991b93
#  define _GL_ATTRIBUTE_PURE /* empty */
Packit Service 991b93
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
Packit aea12f
Packit aea12f
/* The definition of _GL_ARG_NONNULL is copied here.  */
Packit aea12f
Packit aea12f
/* The definition of _GL_WARN_ON_USE is copied here.  */
Packit aea12f
Packit aea12f
Packit aea12f
/* Define wint_t and WEOF.  (Also done in wctype.in.h.)  */
Packit aea12f
#if !@HAVE_WINT_T@ && !defined wint_t
Packit aea12f
# define wint_t int
Packit aea12f
# ifndef WEOF
Packit aea12f
#  define WEOF -1
Packit aea12f
# endif
Packit aea12f
#else
Packit aea12f
/* mingw and MSVC define wint_t as 'unsigned short' in <crtdefs.h> or
Packit aea12f
   <stddef.h>.  This is too small: ISO C 99 section 7.24.1.(2) says that
Packit aea12f
   wint_t must be "unchanged by default argument promotions".  Override it.  */
Packit aea12f
# if @GNULIB_OVERRIDES_WINT_T@
Packit aea12f
#  if !GNULIB_defined_wint_t
Packit aea12f
#   if @HAVE_CRTDEFS_H@
Packit aea12f
#    include <crtdefs.h>
Packit aea12f
#   else
Packit aea12f
#    include <stddef.h>
Packit aea12f
#   endif
Packit aea12f
typedef unsigned int rpl_wint_t;
Packit aea12f
#   undef wint_t
Packit aea12f
#   define wint_t rpl_wint_t
Packit aea12f
#   define GNULIB_defined_wint_t 1
Packit aea12f
#  endif
Packit aea12f
# endif
Packit aea12f
# ifndef WEOF
Packit aea12f
#  define WEOF ((wint_t) -1)
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Override mbstate_t if it is too small.
Packit aea12f
   On IRIX 6.5, sizeof (mbstate_t) == 1, which is not sufficient for
Packit Service 991b93
   implementing mbrtowc for encodings like UTF-8.
Packit Service 991b93
   On AIX and MSVC, mbrtowc needs to be overridden, but mbstate_t exists and is
Packit Service 991b93
   large enough and overriding it would cause problems in C++ mode.  */
Packit Service 991b93
#if !(((defined _WIN32 && !defined __CYGWIN__) || @HAVE_MBSINIT@) && @HAVE_MBRTOWC@) || @REPLACE_MBSTATE_T@
Packit aea12f
# if !GNULIB_defined_mbstate_t
Packit Service 991b93
#  if !(defined _AIX || defined _MSC_VER)
Packit aea12f
typedef int rpl_mbstate_t;
Packit Service 991b93
#   undef mbstate_t
Packit Service 991b93
#   define mbstate_t rpl_mbstate_t
Packit Service 991b93
#  endif
Packit aea12f
#  define GNULIB_defined_mbstate_t 1
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Convert a single-byte character to a wide character.  */
Packit aea12f
#if @GNULIB_BTOWC@
Packit aea12f
# if @REPLACE_BTOWC@
Packit aea12f
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit aea12f
#   undef btowc
Packit aea12f
#   define btowc rpl_btowc
Packit aea12f
#  endif
Packit aea12f
_GL_FUNCDECL_RPL (btowc, wint_t, (int c) _GL_ATTRIBUTE_PURE);
Packit aea12f
_GL_CXXALIAS_RPL (btowc, wint_t, (int c));
Packit aea12f
# else
Packit aea12f
#  if !@HAVE_BTOWC@
Packit aea12f
_GL_FUNCDECL_SYS (btowc, wint_t, (int c) _GL_ATTRIBUTE_PURE);
Packit aea12f
#  endif
Packit Service 991b93
/* Need to cast, because on mingw, the return type is 'unsigned short'.  */
Packit Service 991b93
_GL_CXXALIAS_SYS_CAST (btowc, wint_t, (int c));
Packit aea12f
# endif
Packit Service 991b93
# if __GLIBC__ >= 2
Packit aea12f
_GL_CXXALIASWARN (btowc);
Packit Service 991b93
# endif
Packit aea12f
#elif defined GNULIB_POSIXCHECK
Packit aea12f
# undef btowc
Packit aea12f
# if HAVE_RAW_DECL_BTOWC
Packit aea12f
_GL_WARN_ON_USE (btowc, "btowc is unportable - "
Packit aea12f
                 "use gnulib module btowc for portability");
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Convert a wide character to a single-byte character.  */
Packit aea12f
#if @GNULIB_WCTOB@
Packit aea12f
# if @REPLACE_WCTOB@
Packit aea12f
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit aea12f
#   undef wctob
Packit aea12f
#   define wctob rpl_wctob
Packit aea12f
#  endif
Packit aea12f
_GL_FUNCDECL_RPL (wctob, int, (wint_t wc) _GL_ATTRIBUTE_PURE);
Packit aea12f
_GL_CXXALIAS_RPL (wctob, int, (wint_t wc));
Packit aea12f
# else
Packit aea12f
#  if !defined wctob && !@HAVE_DECL_WCTOB@
Packit aea12f
/* wctob is provided by gnulib, or wctob exists but is not declared.  */
Packit aea12f
_GL_FUNCDECL_SYS (wctob, int, (wint_t wc) _GL_ATTRIBUTE_PURE);
Packit aea12f
#  endif
Packit aea12f
_GL_CXXALIAS_SYS (wctob, int, (wint_t wc));
Packit aea12f
# endif
Packit Service 991b93
# if __GLIBC__ >= 2
Packit aea12f
_GL_CXXALIASWARN (wctob);
Packit Service 991b93
# endif
Packit aea12f
#elif defined GNULIB_POSIXCHECK
Packit aea12f
# undef wctob
Packit aea12f
# if HAVE_RAW_DECL_WCTOB
Packit aea12f
_GL_WARN_ON_USE (wctob, "wctob is unportable - "
Packit aea12f
                 "use gnulib module wctob for portability");
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Test whether *PS is in the initial state.  */
Packit aea12f
#if @GNULIB_MBSINIT@
Packit aea12f
# if @REPLACE_MBSINIT@
Packit aea12f
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit aea12f
#   undef mbsinit
Packit aea12f
#   define mbsinit rpl_mbsinit
Packit aea12f
#  endif
Packit aea12f
_GL_FUNCDECL_RPL (mbsinit, int, (const mbstate_t *ps));
Packit aea12f
_GL_CXXALIAS_RPL (mbsinit, int, (const mbstate_t *ps));
Packit aea12f
# else
Packit aea12f
#  if !@HAVE_MBSINIT@
Packit aea12f
_GL_FUNCDECL_SYS (mbsinit, int, (const mbstate_t *ps));
Packit aea12f
#  endif
Packit aea12f
_GL_CXXALIAS_SYS (mbsinit, int, (const mbstate_t *ps));
Packit aea12f
# endif
Packit Service 991b93
# if __GLIBC__ >= 2
Packit aea12f
_GL_CXXALIASWARN (mbsinit);
Packit Service 991b93
# endif
Packit aea12f
#elif defined GNULIB_POSIXCHECK
Packit aea12f
# undef mbsinit
Packit aea12f
# if HAVE_RAW_DECL_MBSINIT
Packit aea12f
_GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - "
Packit aea12f
                 "use gnulib module mbsinit for portability");
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Convert a multibyte character to a wide character.  */
Packit aea12f
#if @GNULIB_MBRTOWC@
Packit aea12f
# if @REPLACE_MBRTOWC@
Packit aea12f
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit aea12f
#   undef mbrtowc
Packit aea12f
#   define mbrtowc rpl_mbrtowc
Packit aea12f
#  endif
Packit aea12f
_GL_FUNCDECL_RPL (mbrtowc, size_t,
Packit Service 991b93
                  (wchar_t *restrict pwc, const char *restrict s, size_t n,
Packit Service 991b93
                   mbstate_t *restrict ps));
Packit aea12f
_GL_CXXALIAS_RPL (mbrtowc, size_t,
Packit Service 991b93
                  (wchar_t *restrict pwc, const char *restrict s, size_t n,
Packit Service 991b93
                   mbstate_t *restrict ps));
Packit aea12f
# else
Packit aea12f
#  if !@HAVE_MBRTOWC@
Packit aea12f
_GL_FUNCDECL_SYS (mbrtowc, size_t,
Packit Service 991b93
                  (wchar_t *restrict pwc, const char *restrict s, size_t n,
Packit Service 991b93
                   mbstate_t *restrict ps));
Packit aea12f
#  endif
Packit aea12f
_GL_CXXALIAS_SYS (mbrtowc, size_t,
Packit Service 991b93
                  (wchar_t *restrict pwc, const char *restrict s, size_t n,
Packit Service 991b93
                   mbstate_t *restrict ps));
Packit aea12f
# endif
Packit Service 991b93
# if __GLIBC__ >= 2
Packit aea12f
_GL_CXXALIASWARN (mbrtowc);
Packit Service 991b93
# endif
Packit aea12f
#elif defined GNULIB_POSIXCHECK
Packit aea12f
# undef mbrtowc
Packit aea12f
# if HAVE_RAW_DECL_MBRTOWC
Packit aea12f
_GL_WARN_ON_USE (mbrtowc, "mbrtowc is unportable - "
Packit aea12f
                 "use gnulib module mbrtowc for portability");
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Recognize a multibyte character.  */
Packit aea12f
#if @GNULIB_MBRLEN@
Packit aea12f
# if @REPLACE_MBRLEN@
Packit aea12f
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit aea12f
#   undef mbrlen
Packit aea12f
#   define mbrlen rpl_mbrlen
Packit aea12f
#  endif
Packit Service 991b93
_GL_FUNCDECL_RPL (mbrlen, size_t,
Packit Service 991b93
                  (const char *restrict s, size_t n, mbstate_t *restrict ps));
Packit Service 991b93
_GL_CXXALIAS_RPL (mbrlen, size_t,
Packit Service 991b93
                  (const char *restrict s, size_t n, mbstate_t *restrict ps));
Packit aea12f
# else
Packit aea12f
#  if !@HAVE_MBRLEN@
Packit Service 991b93
_GL_FUNCDECL_SYS (mbrlen, size_t,
Packit Service 991b93
                  (const char *restrict s, size_t n, mbstate_t *restrict ps));
Packit aea12f
#  endif
Packit Service 991b93
_GL_CXXALIAS_SYS (mbrlen, size_t,
Packit Service 991b93
                  (const char *restrict s, size_t n, mbstate_t *restrict ps));
Packit aea12f
# endif
Packit Service 991b93
# if __GLIBC__ >= 2
Packit aea12f
_GL_CXXALIASWARN (mbrlen);
Packit Service 991b93
# endif
Packit aea12f
#elif defined GNULIB_POSIXCHECK
Packit aea12f
# undef mbrlen
Packit aea12f
# if HAVE_RAW_DECL_MBRLEN
Packit aea12f
_GL_WARN_ON_USE (mbrlen, "mbrlen is unportable - "
Packit aea12f
                 "use gnulib module mbrlen for portability");
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Convert a string to a wide string.  */
Packit aea12f
#if @GNULIB_MBSRTOWCS@
Packit aea12f
# if @REPLACE_MBSRTOWCS@
Packit aea12f
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit aea12f
#   undef mbsrtowcs
Packit aea12f
#   define mbsrtowcs rpl_mbsrtowcs
Packit aea12f
#  endif
Packit aea12f
_GL_FUNCDECL_RPL (mbsrtowcs, size_t,
Packit Service 991b93
                  (wchar_t *restrict dest,
Packit Service 991b93
                   const char **restrict srcp, size_t len,
Packit Service 991b93
                   mbstate_t *restrict ps)
Packit aea12f
                  _GL_ARG_NONNULL ((2)));
Packit aea12f
_GL_CXXALIAS_RPL (mbsrtowcs, size_t,
Packit Service 991b93
                  (wchar_t *restrict dest,
Packit Service 991b93
                   const char **restrict srcp, size_t len,
Packit Service 991b93
                   mbstate_t *restrict ps));
Packit aea12f
# else
Packit aea12f
#  if !@HAVE_MBSRTOWCS@
Packit aea12f
_GL_FUNCDECL_SYS (mbsrtowcs, size_t,
Packit Service 991b93
                  (wchar_t *restrict dest,
Packit Service 991b93
                   const char **restrict srcp, size_t len,
Packit Service 991b93
                   mbstate_t *restrict ps)
Packit aea12f
                  _GL_ARG_NONNULL ((2)));
Packit aea12f
#  endif
Packit aea12f
_GL_CXXALIAS_SYS (mbsrtowcs, size_t,
Packit Service 991b93
                  (wchar_t *restrict dest,
Packit Service 991b93
                   const char **restrict srcp, size_t len,
Packit Service 991b93
                   mbstate_t *restrict ps));
Packit aea12f
# endif
Packit Service 991b93
# if __GLIBC__ >= 2
Packit aea12f
_GL_CXXALIASWARN (mbsrtowcs);
Packit Service 991b93
# endif
Packit aea12f
#elif defined GNULIB_POSIXCHECK
Packit aea12f
# undef mbsrtowcs
Packit aea12f
# if HAVE_RAW_DECL_MBSRTOWCS
Packit aea12f
_GL_WARN_ON_USE (mbsrtowcs, "mbsrtowcs is unportable - "
Packit aea12f
                 "use gnulib module mbsrtowcs for portability");
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Convert a string to a wide string.  */
Packit aea12f
#if @GNULIB_MBSNRTOWCS@
Packit aea12f
# if @REPLACE_MBSNRTOWCS@
Packit aea12f
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit aea12f
#   undef mbsnrtowcs
Packit aea12f
#   define mbsnrtowcs rpl_mbsnrtowcs
Packit aea12f
#  endif
Packit aea12f
_GL_FUNCDECL_RPL (mbsnrtowcs, size_t,
Packit Service 991b93
                  (wchar_t *restrict dest,
Packit Service 991b93
                   const char **restrict srcp, size_t srclen, size_t len,
Packit Service 991b93
                   mbstate_t *restrict ps)
Packit aea12f
                  _GL_ARG_NONNULL ((2)));
Packit aea12f
_GL_CXXALIAS_RPL (mbsnrtowcs, size_t,
Packit Service 991b93
                  (wchar_t *restrict dest,
Packit Service 991b93
                   const char **restrict srcp, size_t srclen, size_t len,
Packit Service 991b93
                   mbstate_t *restrict ps));
Packit aea12f
# else
Packit aea12f
#  if !@HAVE_MBSNRTOWCS@
Packit aea12f
_GL_FUNCDECL_SYS (mbsnrtowcs, size_t,
Packit Service 991b93
                  (wchar_t *restrict dest,
Packit Service 991b93
                   const char **restrict srcp, size_t srclen, size_t len,
Packit Service 991b93
                   mbstate_t *restrict ps)
Packit aea12f
                  _GL_ARG_NONNULL ((2)));
Packit aea12f
#  endif
Packit aea12f
_GL_CXXALIAS_SYS (mbsnrtowcs, size_t,
Packit Service 991b93
                  (wchar_t *restrict dest,
Packit Service 991b93
                   const char **restrict srcp, size_t srclen, size_t len,
Packit Service 991b93
                   mbstate_t *restrict ps));
Packit aea12f
# endif
Packit aea12f
_GL_CXXALIASWARN (mbsnrtowcs);
Packit aea12f
#elif defined GNULIB_POSIXCHECK
Packit aea12f
# undef mbsnrtowcs
Packit aea12f
# if HAVE_RAW_DECL_MBSNRTOWCS
Packit aea12f
_GL_WARN_ON_USE (mbsnrtowcs, "mbsnrtowcs is unportable - "
Packit aea12f
                 "use gnulib module mbsnrtowcs for portability");
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Convert a wide character to a multibyte character.  */
Packit aea12f
#if @GNULIB_WCRTOMB@
Packit aea12f
# if @REPLACE_WCRTOMB@
Packit aea12f
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit aea12f
#   undef wcrtomb
Packit aea12f
#   define wcrtomb rpl_wcrtomb
Packit aea12f
#  endif
Packit Service 991b93
_GL_FUNCDECL_RPL (wcrtomb, size_t,
Packit Service 991b93
                  (char *restrict s, wchar_t wc, mbstate_t *restrict ps));
Packit Service 991b93
_GL_CXXALIAS_RPL (wcrtomb, size_t,
Packit Service 991b93
                  (char *restrict s, wchar_t wc, mbstate_t *restrict ps));
Packit aea12f
# else
Packit aea12f
#  if !@HAVE_WCRTOMB@
Packit Service 991b93
_GL_FUNCDECL_SYS (wcrtomb, size_t,
Packit Service 991b93
                  (char *restrict s, wchar_t wc, mbstate_t *restrict ps));
Packit aea12f
#  endif
Packit Service 991b93
_GL_CXXALIAS_SYS (wcrtomb, size_t,
Packit Service 991b93
                  (char *restrict s, wchar_t wc, mbstate_t *restrict ps));
Packit aea12f
# endif
Packit Service 991b93
# if __GLIBC__ >= 2
Packit aea12f
_GL_CXXALIASWARN (wcrtomb);
Packit Service 991b93
# endif
Packit aea12f
#elif defined GNULIB_POSIXCHECK
Packit aea12f
# undef wcrtomb
Packit aea12f
# if HAVE_RAW_DECL_WCRTOMB
Packit aea12f
_GL_WARN_ON_USE (wcrtomb, "wcrtomb is unportable - "
Packit aea12f
                 "use gnulib module wcrtomb for portability");
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Convert a wide string to a string.  */
Packit aea12f
#if @GNULIB_WCSRTOMBS@
Packit aea12f
# if @REPLACE_WCSRTOMBS@
Packit aea12f
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit aea12f
#   undef wcsrtombs
Packit aea12f
#   define wcsrtombs rpl_wcsrtombs
Packit aea12f
#  endif
Packit aea12f
_GL_FUNCDECL_RPL (wcsrtombs, size_t,
Packit Service 991b93
                  (char *restrict dest, const wchar_t **restrict srcp,
Packit Service 991b93
                   size_t len,
Packit Service 991b93
                   mbstate_t *restrict ps)
Packit aea12f
                  _GL_ARG_NONNULL ((2)));
Packit aea12f
_GL_CXXALIAS_RPL (wcsrtombs, size_t,
Packit Service 991b93
                  (char *restrict dest, const wchar_t **restrict srcp,
Packit Service 991b93
                   size_t len,
Packit Service 991b93
                   mbstate_t *restrict ps));
Packit aea12f
# else
Packit aea12f
#  if !@HAVE_WCSRTOMBS@
Packit aea12f
_GL_FUNCDECL_SYS (wcsrtombs, size_t,
Packit Service 991b93
                  (char *restrict dest, const wchar_t **restrict srcp,
Packit Service 991b93
                   size_t len,
Packit Service 991b93
                   mbstate_t *restrict ps)
Packit aea12f
                  _GL_ARG_NONNULL ((2)));
Packit aea12f
#  endif
Packit aea12f
_GL_CXXALIAS_SYS (wcsrtombs, size_t,
Packit Service 991b93
                  (char *restrict dest, const wchar_t **restrict srcp,
Packit Service 991b93
                   size_t len,
Packit Service 991b93
                   mbstate_t *restrict ps));
Packit aea12f
# endif
Packit Service 991b93
# if __GLIBC__ >= 2
Packit aea12f
_GL_CXXALIASWARN (wcsrtombs);
Packit Service 991b93
# endif
Packit aea12f
#elif defined GNULIB_POSIXCHECK
Packit aea12f
# undef wcsrtombs
Packit aea12f
# if HAVE_RAW_DECL_WCSRTOMBS
Packit aea12f
_GL_WARN_ON_USE (wcsrtombs, "wcsrtombs is unportable - "
Packit aea12f
                 "use gnulib module wcsrtombs for portability");
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Convert a wide string to a string.  */
Packit aea12f
#if @GNULIB_WCSNRTOMBS@
Packit aea12f
# if @REPLACE_WCSNRTOMBS@
Packit aea12f
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit aea12f
#   undef wcsnrtombs
Packit aea12f
#   define wcsnrtombs rpl_wcsnrtombs
Packit aea12f
#  endif
Packit aea12f
_GL_FUNCDECL_RPL (wcsnrtombs, size_t,
Packit Service 991b93
                  (char *restrict dest,
Packit Service 991b93
                   const wchar_t **restrict srcp, size_t srclen,
Packit Service 991b93
                   size_t len,
Packit Service 991b93
                   mbstate_t *restrict ps)
Packit aea12f
                  _GL_ARG_NONNULL ((2)));
Packit aea12f
_GL_CXXALIAS_RPL (wcsnrtombs, size_t,
Packit Service 991b93
                  (char *restrict dest,
Packit Service 991b93
                   const wchar_t **restrict srcp, size_t srclen,
Packit Service 991b93
                   size_t len,
Packit Service 991b93
                   mbstate_t *restrict ps));
Packit aea12f
# else
Packit Service 991b93
#  if !@HAVE_WCSNRTOMBS@ || (defined __cplusplus && defined __sun)
Packit aea12f
_GL_FUNCDECL_SYS (wcsnrtombs, size_t,
Packit Service 991b93
                  (char *restrict dest,
Packit Service 991b93
                   const wchar_t **restrict srcp, size_t srclen,
Packit Service 991b93
                   size_t len,
Packit Service 991b93
                   mbstate_t *restrict ps)
Packit aea12f
                  _GL_ARG_NONNULL ((2)));
Packit aea12f
#  endif
Packit aea12f
_GL_CXXALIAS_SYS (wcsnrtombs, size_t,
Packit Service 991b93
                  (char *restrict dest,
Packit Service 991b93
                   const wchar_t **restrict srcp, size_t srclen,
Packit Service 991b93
                   size_t len,
Packit Service 991b93
                   mbstate_t *restrict ps));
Packit aea12f
# endif
Packit Service 991b93
# if __GLIBC__ >= 2
Packit aea12f
_GL_CXXALIASWARN (wcsnrtombs);
Packit Service 991b93
# endif
Packit aea12f
#elif defined GNULIB_POSIXCHECK
Packit aea12f
# undef wcsnrtombs
Packit aea12f
# if HAVE_RAW_DECL_WCSNRTOMBS
Packit aea12f
_GL_WARN_ON_USE (wcsnrtombs, "wcsnrtombs is unportable - "
Packit aea12f
                 "use gnulib module wcsnrtombs for portability");
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Return the number of screen columns needed for WC.  */
Packit aea12f
#if @GNULIB_WCWIDTH@
Packit aea12f
# if @REPLACE_WCWIDTH@
Packit aea12f
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit aea12f
#   undef wcwidth
Packit aea12f
#   define wcwidth rpl_wcwidth
Packit aea12f
#  endif
Packit aea12f
_GL_FUNCDECL_RPL (wcwidth, int, (wchar_t) _GL_ATTRIBUTE_PURE);
Packit aea12f
_GL_CXXALIAS_RPL (wcwidth, int, (wchar_t));
Packit aea12f
# else
Packit aea12f
#  if !@HAVE_DECL_WCWIDTH@
Packit aea12f
/* wcwidth exists but is not declared.  */
Packit aea12f
_GL_FUNCDECL_SYS (wcwidth, int, (wchar_t) _GL_ATTRIBUTE_PURE);
Packit aea12f
#  endif
Packit aea12f
_GL_CXXALIAS_SYS (wcwidth, int, (wchar_t));
Packit aea12f
# endif
Packit Service 991b93
# if __GLIBC__ >= 2
Packit aea12f
_GL_CXXALIASWARN (wcwidth);
Packit Service 991b93
# endif
Packit aea12f
#elif defined GNULIB_POSIXCHECK
Packit aea12f
# undef wcwidth
Packit aea12f
# if HAVE_RAW_DECL_WCWIDTH
Packit aea12f
_GL_WARN_ON_USE (wcwidth, "wcwidth is unportable - "
Packit aea12f
                 "use gnulib module wcwidth for portability");
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Search N wide characters of S for C.  */
Packit aea12f
#if @GNULIB_WMEMCHR@
Packit aea12f
# if !@HAVE_WMEMCHR@
Packit aea12f
_GL_FUNCDECL_SYS (wmemchr, wchar_t *, (const wchar_t *s, wchar_t c, size_t n)
Packit aea12f
                                      _GL_ATTRIBUTE_PURE);
Packit aea12f
# endif
Packit aea12f
  /* On some systems, this function is defined as an overloaded function:
Packit aea12f
       extern "C++" {
Packit aea12f
         const wchar_t * std::wmemchr (const wchar_t *, wchar_t, size_t);
Packit aea12f
         wchar_t * std::wmemchr (wchar_t *, wchar_t, size_t);
Packit aea12f
       }  */
Packit aea12f
_GL_CXXALIAS_SYS_CAST2 (wmemchr,
Packit aea12f
                        wchar_t *, (const wchar_t *, wchar_t, size_t),
Packit aea12f
                        const wchar_t *, (const wchar_t *, wchar_t, size_t));
Packit aea12f
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
Packit aea12f
     && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
Packit aea12f
_GL_CXXALIASWARN1 (wmemchr, wchar_t *, (wchar_t *s, wchar_t c, size_t n));
Packit aea12f
_GL_CXXALIASWARN1 (wmemchr, const wchar_t *,
Packit aea12f
                   (const wchar_t *s, wchar_t c, size_t n));
Packit Service 991b93
# elif __GLIBC__ >= 2
Packit aea12f
_GL_CXXALIASWARN (wmemchr);
Packit aea12f
# endif
Packit aea12f
#elif defined GNULIB_POSIXCHECK
Packit aea12f
# undef wmemchr
Packit aea12f
# if HAVE_RAW_DECL_WMEMCHR
Packit aea12f
_GL_WARN_ON_USE (wmemchr, "wmemchr is unportable - "
Packit aea12f
                 "use gnulib module wmemchr for portability");
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Compare N wide characters of S1 and S2.  */
Packit aea12f
#if @GNULIB_WMEMCMP@
Packit aea12f
# if !@HAVE_WMEMCMP@
Packit aea12f
_GL_FUNCDECL_SYS (wmemcmp, int,
Packit aea12f
                  (const wchar_t *s1, const wchar_t *s2, size_t n)
Packit aea12f
                  _GL_ATTRIBUTE_PURE);
Packit aea12f
# endif
Packit aea12f
_GL_CXXALIAS_SYS (wmemcmp, int,
Packit aea12f
                  (const wchar_t *s1, const wchar_t *s2, size_t n));
Packit Service 991b93
# if __GLIBC__ >= 2
Packit aea12f
_GL_CXXALIASWARN (wmemcmp);
Packit Service 991b93
# endif
Packit aea12f
#elif defined GNULIB_POSIXCHECK
Packit aea12f
# undef wmemcmp
Packit aea12f
# if HAVE_RAW_DECL_WMEMCMP
Packit aea12f
_GL_WARN_ON_USE (wmemcmp, "wmemcmp is unportable - "
Packit aea12f
                 "use gnulib module wmemcmp for portability");
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Copy N wide characters of SRC to DEST.  */
Packit aea12f
#if @GNULIB_WMEMCPY@
Packit aea12f
# if !@HAVE_WMEMCPY@
Packit aea12f
_GL_FUNCDECL_SYS (wmemcpy, wchar_t *,
Packit Service 991b93
                  (wchar_t *restrict dest,
Packit Service 991b93
                   const wchar_t *restrict src, size_t n));
Packit aea12f
# endif
Packit aea12f
_GL_CXXALIAS_SYS (wmemcpy, wchar_t *,
Packit Service 991b93
                  (wchar_t *restrict dest,
Packit Service 991b93
                   const wchar_t *restrict src, size_t n));
Packit Service 991b93
# if __GLIBC__ >= 2
Packit aea12f
_GL_CXXALIASWARN (wmemcpy);
Packit Service 991b93
# endif
Packit aea12f
#elif defined GNULIB_POSIXCHECK
Packit aea12f
# undef wmemcpy
Packit aea12f
# if HAVE_RAW_DECL_WMEMCPY
Packit aea12f
_GL_WARN_ON_USE (wmemcpy, "wmemcpy is unportable - "
Packit aea12f
                 "use gnulib module wmemcpy for portability");
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Copy N wide characters of SRC to DEST, guaranteeing correct behavior for
Packit aea12f
   overlapping memory areas.  */
Packit aea12f
#if @GNULIB_WMEMMOVE@
Packit aea12f
# if !@HAVE_WMEMMOVE@
Packit aea12f
_GL_FUNCDECL_SYS (wmemmove, wchar_t *,
Packit aea12f
                  (wchar_t *dest, const wchar_t *src, size_t n));
Packit aea12f
# endif
Packit aea12f
_GL_CXXALIAS_SYS (wmemmove, wchar_t *,
Packit aea12f
                  (wchar_t *dest, const wchar_t *src, size_t n));
Packit Service 991b93
# if __GLIBC__ >= 2
Packit aea12f
_GL_CXXALIASWARN (wmemmove);
Packit Service 991b93
# endif
Packit aea12f
#elif defined GNULIB_POSIXCHECK
Packit aea12f
# undef wmemmove
Packit aea12f
# if HAVE_RAW_DECL_WMEMMOVE
Packit aea12f
_GL_WARN_ON_USE (wmemmove, "wmemmove is unportable - "
Packit aea12f
                 "use gnulib module wmemmove for portability");
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Set N wide characters of S to C.  */
Packit aea12f
#if @GNULIB_WMEMSET@
Packit aea12f
# if !@HAVE_WMEMSET@
Packit aea12f
_GL_FUNCDECL_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n));
Packit aea12f
# endif
Packit aea12f
_GL_CXXALIAS_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n));
Packit Service 991b93
# if __GLIBC__ >= 2
Packit aea12f
_GL_CXXALIASWARN (wmemset);
Packit Service 991b93
# endif
Packit aea12f
#elif defined GNULIB_POSIXCHECK
Packit aea12f
# undef wmemset
Packit aea12f
# if HAVE_RAW_DECL_WMEMSET
Packit aea12f
_GL_WARN_ON_USE (wmemset, "wmemset is unportable - "
Packit aea12f
                 "use gnulib module wmemset for portability");
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Return the number of wide characters in S.  */
Packit aea12f
#if @GNULIB_WCSLEN@
Packit aea12f
# if !@HAVE_WCSLEN@
Packit aea12f
_GL_FUNCDECL_SYS (wcslen, size_t, (const wchar_t *s) _GL_ATTRIBUTE_PURE);
Packit aea12f
# endif
Packit aea12f
_GL_CXXALIAS_SYS (wcslen, size_t, (const wchar_t *s));
Packit Service 991b93
# if __GLIBC__ >= 2
Packit aea12f
_GL_CXXALIASWARN (wcslen);
Packit Service 991b93
# endif
Packit aea12f
#elif defined GNULIB_POSIXCHECK
Packit aea12f
# undef wcslen
Packit aea12f
# if HAVE_RAW_DECL_WCSLEN
Packit aea12f
_GL_WARN_ON_USE (wcslen, "wcslen is unportable - "
Packit aea12f
                 "use gnulib module wcslen for portability");
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Return the number of wide characters in S, but at most MAXLEN.  */
Packit aea12f
#if @GNULIB_WCSNLEN@
Packit aea12f
# if !@HAVE_WCSNLEN@
Packit aea12f
_GL_FUNCDECL_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen)
Packit aea12f
                                   _GL_ATTRIBUTE_PURE);
Packit aea12f
# endif
Packit aea12f
_GL_CXXALIAS_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen));
Packit aea12f
_GL_CXXALIASWARN (wcsnlen);
Packit aea12f
#elif defined GNULIB_POSIXCHECK
Packit aea12f
# undef wcsnlen
Packit aea12f
# if HAVE_RAW_DECL_WCSNLEN
Packit aea12f
_GL_WARN_ON_USE (wcsnlen, "wcsnlen is unportable - "
Packit aea12f
                 "use gnulib module wcsnlen for portability");
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Copy SRC to DEST.  */
Packit aea12f
#if @GNULIB_WCSCPY@
Packit aea12f
# if !@HAVE_WCSCPY@
Packit Service 991b93
_GL_FUNCDECL_SYS (wcscpy, wchar_t *,
Packit Service 991b93
                  (wchar_t *restrict dest, const wchar_t *restrict src));
Packit aea12f
# endif
Packit Service 991b93
_GL_CXXALIAS_SYS (wcscpy, wchar_t *,
Packit Service 991b93
                  (wchar_t *restrict dest, const wchar_t *restrict src));
Packit Service 991b93
# if __GLIBC__ >= 2
Packit aea12f
_GL_CXXALIASWARN (wcscpy);
Packit Service 991b93
# endif
Packit aea12f
#elif defined GNULIB_POSIXCHECK
Packit aea12f
# undef wcscpy
Packit aea12f
# if HAVE_RAW_DECL_WCSCPY
Packit aea12f
_GL_WARN_ON_USE (wcscpy, "wcscpy is unportable - "
Packit aea12f
                 "use gnulib module wcscpy for portability");
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Copy SRC to DEST, returning the address of the terminating L'\0' in DEST.  */
Packit aea12f
#if @GNULIB_WCPCPY@
Packit aea12f
# if !@HAVE_WCPCPY@
Packit Service 991b93
_GL_FUNCDECL_SYS (wcpcpy, wchar_t *,
Packit Service 991b93
                  (wchar_t *restrict dest, const wchar_t *restrict src));
Packit aea12f
# endif
Packit Service 991b93
_GL_CXXALIAS_SYS (wcpcpy, wchar_t *,
Packit Service 991b93
                  (wchar_t *restrict dest, const wchar_t *restrict src));
Packit aea12f
_GL_CXXALIASWARN (wcpcpy);
Packit aea12f
#elif defined GNULIB_POSIXCHECK
Packit aea12f
# undef wcpcpy
Packit aea12f
# if HAVE_RAW_DECL_WCPCPY
Packit aea12f
_GL_WARN_ON_USE (wcpcpy, "wcpcpy is unportable - "
Packit aea12f
                 "use gnulib module wcpcpy for portability");
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Copy no more than N wide characters of SRC to DEST.  */
Packit aea12f
#if @GNULIB_WCSNCPY@
Packit aea12f
# if !@HAVE_WCSNCPY@
Packit aea12f
_GL_FUNCDECL_SYS (wcsncpy, wchar_t *,
Packit Service 991b93
                  (wchar_t *restrict dest,
Packit Service 991b93
                   const wchar_t *restrict src, size_t n));
Packit aea12f
# endif
Packit aea12f
_GL_CXXALIAS_SYS (wcsncpy, wchar_t *,
Packit Service 991b93
                  (wchar_t *restrict dest,
Packit Service 991b93
                   const wchar_t *restrict src, size_t n));
Packit Service 991b93
# if __GLIBC__ >= 2
Packit aea12f
_GL_CXXALIASWARN (wcsncpy);
Packit Service 991b93
# endif
Packit aea12f
#elif defined GNULIB_POSIXCHECK
Packit aea12f
# undef wcsncpy
Packit aea12f
# if HAVE_RAW_DECL_WCSNCPY
Packit aea12f
_GL_WARN_ON_USE (wcsncpy, "wcsncpy is unportable - "
Packit aea12f
                 "use gnulib module wcsncpy for portability");
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Copy no more than N characters of SRC to DEST, returning the address of
Packit aea12f
   the last character written into DEST.  */
Packit aea12f
#if @GNULIB_WCPNCPY@
Packit aea12f
# if !@HAVE_WCPNCPY@
Packit aea12f
_GL_FUNCDECL_SYS (wcpncpy, wchar_t *,
Packit Service 991b93
                  (wchar_t *restrict dest,
Packit Service 991b93
                   const wchar_t *restrict src, size_t n));
Packit aea12f
# endif
Packit aea12f
_GL_CXXALIAS_SYS (wcpncpy, wchar_t *,
Packit Service 991b93
                  (wchar_t *restrict dest,
Packit Service 991b93
                   const wchar_t *restrict src, size_t n));
Packit aea12f
_GL_CXXALIASWARN (wcpncpy);
Packit aea12f
#elif defined GNULIB_POSIXCHECK
Packit aea12f
# undef wcpncpy
Packit aea12f
# if HAVE_RAW_DECL_WCPNCPY
Packit aea12f
_GL_WARN_ON_USE (wcpncpy, "wcpncpy is unportable - "
Packit aea12f
                 "use gnulib module wcpncpy for portability");
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Append SRC onto DEST.  */
Packit aea12f
#if @GNULIB_WCSCAT@
Packit aea12f
# if !@HAVE_WCSCAT@
Packit Service 991b93
_GL_FUNCDECL_SYS (wcscat, wchar_t *,
Packit Service 991b93
                  (wchar_t *restrict dest, const wchar_t *restrict src));
Packit aea12f
# endif
Packit Service 991b93
_GL_CXXALIAS_SYS (wcscat, wchar_t *,
Packit Service 991b93
                  (wchar_t *restrict dest, const wchar_t *restrict src));
Packit Service 991b93
# if __GLIBC__ >= 2
Packit aea12f
_GL_CXXALIASWARN (wcscat);
Packit Service 991b93
# endif
Packit aea12f
#elif defined GNULIB_POSIXCHECK
Packit aea12f
# undef wcscat
Packit aea12f
# if HAVE_RAW_DECL_WCSCAT
Packit aea12f
_GL_WARN_ON_USE (wcscat, "wcscat is unportable - "
Packit aea12f
                 "use gnulib module wcscat for portability");
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Append no more than N wide characters of SRC onto DEST.  */
Packit aea12f
#if @GNULIB_WCSNCAT@
Packit aea12f
# if !@HAVE_WCSNCAT@
Packit aea12f
_GL_FUNCDECL_SYS (wcsncat, wchar_t *,
Packit Service 991b93
                  (wchar_t *restrict dest, const wchar_t *restrict src,
Packit Service 991b93
                   size_t n));
Packit aea12f
# endif
Packit aea12f
_GL_CXXALIAS_SYS (wcsncat, wchar_t *,
Packit Service 991b93
                  (wchar_t *restrict dest, const wchar_t *restrict src,
Packit Service 991b93
                   size_t n));
Packit Service 991b93
# if __GLIBC__ >= 2
Packit aea12f
_GL_CXXALIASWARN (wcsncat);
Packit Service 991b93
# endif
Packit aea12f
#elif defined GNULIB_POSIXCHECK
Packit aea12f
# undef wcsncat
Packit aea12f
# if HAVE_RAW_DECL_WCSNCAT
Packit aea12f
_GL_WARN_ON_USE (wcsncat, "wcsncat is unportable - "
Packit aea12f
                 "use gnulib module wcsncat for portability");
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Compare S1 and S2.  */
Packit aea12f
#if @GNULIB_WCSCMP@
Packit aea12f
# if !@HAVE_WCSCMP@
Packit aea12f
_GL_FUNCDECL_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)
Packit aea12f
                               _GL_ATTRIBUTE_PURE);
Packit aea12f
# endif
Packit aea12f
_GL_CXXALIAS_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2));
Packit Service 991b93
# if __GLIBC__ >= 2
Packit aea12f
_GL_CXXALIASWARN (wcscmp);
Packit Service 991b93
# endif
Packit aea12f
#elif defined GNULIB_POSIXCHECK
Packit aea12f
# undef wcscmp
Packit aea12f
# if HAVE_RAW_DECL_WCSCMP
Packit aea12f
_GL_WARN_ON_USE (wcscmp, "wcscmp is unportable - "
Packit aea12f
                 "use gnulib module wcscmp for portability");
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Compare no more than N wide characters of S1 and S2.  */
Packit aea12f
#if @GNULIB_WCSNCMP@
Packit aea12f
# if !@HAVE_WCSNCMP@
Packit aea12f
_GL_FUNCDECL_SYS (wcsncmp, int,
Packit aea12f
                  (const wchar_t *s1, const wchar_t *s2, size_t n)
Packit aea12f
                  _GL_ATTRIBUTE_PURE);
Packit aea12f
# endif
Packit aea12f
_GL_CXXALIAS_SYS (wcsncmp, int,
Packit aea12f
                  (const wchar_t *s1, const wchar_t *s2, size_t n));
Packit Service 991b93
# if __GLIBC__ >= 2
Packit aea12f
_GL_CXXALIASWARN (wcsncmp);
Packit Service 991b93
# endif
Packit aea12f
#elif defined GNULIB_POSIXCHECK
Packit aea12f
# undef wcsncmp
Packit aea12f
# if HAVE_RAW_DECL_WCSNCMP
Packit aea12f
_GL_WARN_ON_USE (wcsncmp, "wcsncmp is unportable - "
Packit aea12f
                 "use gnulib module wcsncmp for portability");
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Compare S1 and S2, ignoring case.  */
Packit aea12f
#if @GNULIB_WCSCASECMP@
Packit aea12f
# if !@HAVE_WCSCASECMP@
Packit aea12f
_GL_FUNCDECL_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2)
Packit aea12f
                                   _GL_ATTRIBUTE_PURE);
Packit aea12f
# endif
Packit aea12f
_GL_CXXALIAS_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2));
Packit aea12f
_GL_CXXALIASWARN (wcscasecmp);
Packit aea12f
#elif defined GNULIB_POSIXCHECK
Packit aea12f
# undef wcscasecmp
Packit aea12f
# if HAVE_RAW_DECL_WCSCASECMP
Packit aea12f
_GL_WARN_ON_USE (wcscasecmp, "wcscasecmp is unportable - "
Packit aea12f
                 "use gnulib module wcscasecmp for portability");
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Compare no more than N chars of S1 and S2, ignoring case.  */
Packit aea12f
#if @GNULIB_WCSNCASECMP@
Packit aea12f
# if !@HAVE_WCSNCASECMP@
Packit aea12f
_GL_FUNCDECL_SYS (wcsncasecmp, int,
Packit aea12f
                  (const wchar_t *s1, const wchar_t *s2, size_t n)
Packit aea12f
                  _GL_ATTRIBUTE_PURE);
Packit aea12f
# endif
Packit aea12f
_GL_CXXALIAS_SYS (wcsncasecmp, int,
Packit aea12f
                  (const wchar_t *s1, const wchar_t *s2, size_t n));
Packit aea12f
_GL_CXXALIASWARN (wcsncasecmp);
Packit aea12f
#elif defined GNULIB_POSIXCHECK
Packit aea12f
# undef wcsncasecmp
Packit aea12f
# if HAVE_RAW_DECL_WCSNCASECMP
Packit aea12f
_GL_WARN_ON_USE (wcsncasecmp, "wcsncasecmp is unportable - "
Packit aea12f
                 "use gnulib module wcsncasecmp for portability");
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Compare S1 and S2, both interpreted as appropriate to the LC_COLLATE
Packit aea12f
   category of the current locale.  */
Packit aea12f
#if @GNULIB_WCSCOLL@
Packit aea12f
# if !@HAVE_WCSCOLL@
Packit aea12f
_GL_FUNCDECL_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2));
Packit aea12f
# endif
Packit aea12f
_GL_CXXALIAS_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2));
Packit Service 991b93
# if __GLIBC__ >= 2
Packit aea12f
_GL_CXXALIASWARN (wcscoll);
Packit Service 991b93
# endif
Packit aea12f
#elif defined GNULIB_POSIXCHECK
Packit aea12f
# undef wcscoll
Packit aea12f
# if HAVE_RAW_DECL_WCSCOLL
Packit aea12f
_GL_WARN_ON_USE (wcscoll, "wcscoll is unportable - "
Packit aea12f
                 "use gnulib module wcscoll for portability");
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Transform S2 into array pointed to by S1 such that if wcscmp is applied
Packit aea12f
   to two transformed strings the result is the as applying 'wcscoll' to the
Packit aea12f
   original strings.  */
Packit aea12f
#if @GNULIB_WCSXFRM@
Packit aea12f
# if !@HAVE_WCSXFRM@
Packit Service 991b93
_GL_FUNCDECL_SYS (wcsxfrm, size_t,
Packit Service 991b93
                  (wchar_t *restrict s1, const wchar_t *restrict s2, size_t n));
Packit aea12f
# endif
Packit Service 991b93
_GL_CXXALIAS_SYS (wcsxfrm, size_t,
Packit Service 991b93
                  (wchar_t *restrict s1, const wchar_t *restrict s2, size_t n));
Packit Service 991b93
# if __GLIBC__ >= 2
Packit aea12f
_GL_CXXALIASWARN (wcsxfrm);
Packit Service 991b93
# endif
Packit aea12f
#elif defined GNULIB_POSIXCHECK
Packit aea12f
# undef wcsxfrm
Packit aea12f
# if HAVE_RAW_DECL_WCSXFRM
Packit aea12f
_GL_WARN_ON_USE (wcsxfrm, "wcsxfrm is unportable - "
Packit aea12f
                 "use gnulib module wcsxfrm for portability");
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Duplicate S, returning an identical malloc'd string.  */
Packit aea12f
#if @GNULIB_WCSDUP@
Packit aea12f
# if !@HAVE_WCSDUP@
Packit aea12f
_GL_FUNCDECL_SYS (wcsdup, wchar_t *, (const wchar_t *s));
Packit aea12f
# endif
Packit aea12f
_GL_CXXALIAS_SYS (wcsdup, wchar_t *, (const wchar_t *s));
Packit aea12f
_GL_CXXALIASWARN (wcsdup);
Packit aea12f
#elif defined GNULIB_POSIXCHECK
Packit aea12f
# undef wcsdup
Packit aea12f
# if HAVE_RAW_DECL_WCSDUP
Packit aea12f
_GL_WARN_ON_USE (wcsdup, "wcsdup is unportable - "
Packit aea12f
                 "use gnulib module wcsdup for portability");
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Find the first occurrence of WC in WCS.  */
Packit aea12f
#if @GNULIB_WCSCHR@
Packit aea12f
# if !@HAVE_WCSCHR@
Packit aea12f
_GL_FUNCDECL_SYS (wcschr, wchar_t *, (const wchar_t *wcs, wchar_t wc)
Packit aea12f
                                     _GL_ATTRIBUTE_PURE);
Packit aea12f
# endif
Packit aea12f
  /* On some systems, this function is defined as an overloaded function:
Packit aea12f
       extern "C++" {
Packit aea12f
         const wchar_t * std::wcschr (const wchar_t *, wchar_t);
Packit aea12f
         wchar_t * std::wcschr (wchar_t *, wchar_t);
Packit aea12f
       }  */
Packit aea12f
_GL_CXXALIAS_SYS_CAST2 (wcschr,
Packit aea12f
                        wchar_t *, (const wchar_t *, wchar_t),
Packit aea12f
                        const wchar_t *, (const wchar_t *, wchar_t));
Packit aea12f
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
Packit aea12f
     && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
Packit aea12f
_GL_CXXALIASWARN1 (wcschr, wchar_t *, (wchar_t *wcs, wchar_t wc));
Packit aea12f
_GL_CXXALIASWARN1 (wcschr, const wchar_t *, (const wchar_t *wcs, wchar_t wc));
Packit Service 991b93
# elif __GLIBC__ >= 2
Packit aea12f
_GL_CXXALIASWARN (wcschr);
Packit aea12f
# endif
Packit aea12f
#elif defined GNULIB_POSIXCHECK
Packit aea12f
# undef wcschr
Packit aea12f
# if HAVE_RAW_DECL_WCSCHR
Packit aea12f
_GL_WARN_ON_USE (wcschr, "wcschr is unportable - "
Packit aea12f
                 "use gnulib module wcschr for portability");
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Find the last occurrence of WC in WCS.  */
Packit aea12f
#if @GNULIB_WCSRCHR@
Packit aea12f
# if !@HAVE_WCSRCHR@
Packit aea12f
_GL_FUNCDECL_SYS (wcsrchr, wchar_t *, (const wchar_t *wcs, wchar_t wc)
Packit aea12f
                                      _GL_ATTRIBUTE_PURE);
Packit aea12f
# endif
Packit aea12f
  /* On some systems, this function is defined as an overloaded function:
Packit aea12f
       extern "C++" {
Packit aea12f
         const wchar_t * std::wcsrchr (const wchar_t *, wchar_t);
Packit aea12f
         wchar_t * std::wcsrchr (wchar_t *, wchar_t);
Packit aea12f
       }  */
Packit aea12f
_GL_CXXALIAS_SYS_CAST2 (wcsrchr,
Packit aea12f
                        wchar_t *, (const wchar_t *, wchar_t),
Packit aea12f
                        const wchar_t *, (const wchar_t *, wchar_t));
Packit aea12f
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
Packit aea12f
     && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
Packit aea12f
_GL_CXXALIASWARN1 (wcsrchr, wchar_t *, (wchar_t *wcs, wchar_t wc));
Packit aea12f
_GL_CXXALIASWARN1 (wcsrchr, const wchar_t *, (const wchar_t *wcs, wchar_t wc));
Packit Service 991b93
# elif __GLIBC__ >= 2
Packit aea12f
_GL_CXXALIASWARN (wcsrchr);
Packit aea12f
# endif
Packit aea12f
#elif defined GNULIB_POSIXCHECK
Packit aea12f
# undef wcsrchr
Packit aea12f
# if HAVE_RAW_DECL_WCSRCHR
Packit aea12f
_GL_WARN_ON_USE (wcsrchr, "wcsrchr is unportable - "
Packit aea12f
                 "use gnulib module wcsrchr for portability");
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Return the length of the initial segmet of WCS which consists entirely
Packit aea12f
   of wide characters not in REJECT.  */
Packit aea12f
#if @GNULIB_WCSCSPN@
Packit aea12f
# if !@HAVE_WCSCSPN@
Packit aea12f
_GL_FUNCDECL_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject)
Packit aea12f
                                   _GL_ATTRIBUTE_PURE);
Packit aea12f
# endif
Packit aea12f
_GL_CXXALIAS_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject));
Packit Service 991b93
# if __GLIBC__ >= 2
Packit aea12f
_GL_CXXALIASWARN (wcscspn);
Packit Service 991b93
# endif
Packit aea12f
#elif defined GNULIB_POSIXCHECK
Packit aea12f
# undef wcscspn
Packit aea12f
# if HAVE_RAW_DECL_WCSCSPN
Packit aea12f
_GL_WARN_ON_USE (wcscspn, "wcscspn is unportable - "
Packit aea12f
                 "use gnulib module wcscspn for portability");
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Return the length of the initial segmet of WCS which consists entirely
Packit aea12f
   of wide characters in ACCEPT.  */
Packit aea12f
#if @GNULIB_WCSSPN@
Packit aea12f
# if !@HAVE_WCSSPN@
Packit aea12f
_GL_FUNCDECL_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept)
Packit aea12f
                                  _GL_ATTRIBUTE_PURE);
Packit aea12f
# endif
Packit aea12f
_GL_CXXALIAS_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept));
Packit Service 991b93
# if __GLIBC__ >= 2
Packit aea12f
_GL_CXXALIASWARN (wcsspn);
Packit Service 991b93
# endif
Packit aea12f
#elif defined GNULIB_POSIXCHECK
Packit aea12f
# undef wcsspn
Packit aea12f
# if HAVE_RAW_DECL_WCSSPN
Packit aea12f
_GL_WARN_ON_USE (wcsspn, "wcsspn is unportable - "
Packit aea12f
                 "use gnulib module wcsspn for portability");
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Find the first occurrence in WCS of any character in ACCEPT.  */
Packit aea12f
#if @GNULIB_WCSPBRK@
Packit aea12f
# if !@HAVE_WCSPBRK@
Packit aea12f
_GL_FUNCDECL_SYS (wcspbrk, wchar_t *,
Packit aea12f
                  (const wchar_t *wcs, const wchar_t *accept)
Packit aea12f
                  _GL_ATTRIBUTE_PURE);
Packit aea12f
# endif
Packit aea12f
  /* On some systems, this function is defined as an overloaded function:
Packit aea12f
       extern "C++" {
Packit aea12f
         const wchar_t * std::wcspbrk (const wchar_t *, const wchar_t *);
Packit aea12f
         wchar_t * std::wcspbrk (wchar_t *, const wchar_t *);
Packit aea12f
       }  */
Packit aea12f
_GL_CXXALIAS_SYS_CAST2 (wcspbrk,
Packit aea12f
                        wchar_t *, (const wchar_t *, const wchar_t *),
Packit aea12f
                        const wchar_t *, (const wchar_t *, const wchar_t *));
Packit aea12f
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
Packit aea12f
     && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
Packit aea12f
_GL_CXXALIASWARN1 (wcspbrk, wchar_t *,
Packit aea12f
                   (wchar_t *wcs, const wchar_t *accept));
Packit aea12f
_GL_CXXALIASWARN1 (wcspbrk, const wchar_t *,
Packit aea12f
                   (const wchar_t *wcs, const wchar_t *accept));
Packit Service 991b93
# elif __GLIBC__ >= 2
Packit aea12f
_GL_CXXALIASWARN (wcspbrk);
Packit aea12f
# endif
Packit aea12f
#elif defined GNULIB_POSIXCHECK
Packit aea12f
# undef wcspbrk
Packit aea12f
# if HAVE_RAW_DECL_WCSPBRK
Packit aea12f
_GL_WARN_ON_USE (wcspbrk, "wcspbrk is unportable - "
Packit aea12f
                 "use gnulib module wcspbrk for portability");
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Find the first occurrence of NEEDLE in HAYSTACK.  */
Packit aea12f
#if @GNULIB_WCSSTR@
Packit aea12f
# if !@HAVE_WCSSTR@
Packit aea12f
_GL_FUNCDECL_SYS (wcsstr, wchar_t *,
Packit Service 991b93
                  (const wchar_t *restrict haystack,
Packit Service 991b93
                   const wchar_t *restrict needle)
Packit aea12f
                  _GL_ATTRIBUTE_PURE);
Packit aea12f
# endif
Packit aea12f
  /* On some systems, this function is defined as an overloaded function:
Packit aea12f
       extern "C++" {
Packit aea12f
         const wchar_t * std::wcsstr (const wchar_t *, const wchar_t *);
Packit aea12f
         wchar_t * std::wcsstr (wchar_t *, const wchar_t *);
Packit aea12f
       }  */
Packit aea12f
_GL_CXXALIAS_SYS_CAST2 (wcsstr,
Packit Service 991b93
                        wchar_t *,
Packit Service 991b93
                        (const wchar_t *restrict, const wchar_t *restrict),
Packit Service 991b93
                        const wchar_t *,
Packit Service 991b93
                        (const wchar_t *restrict, const wchar_t *restrict));
Packit aea12f
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
Packit aea12f
     && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
Packit aea12f
_GL_CXXALIASWARN1 (wcsstr, wchar_t *,
Packit Service 991b93
                   (wchar_t *restrict haystack,
Packit Service 991b93
                    const wchar_t *restrict needle));
Packit aea12f
_GL_CXXALIASWARN1 (wcsstr, const wchar_t *,
Packit Service 991b93
                   (const wchar_t *restrict haystack,
Packit Service 991b93
                    const wchar_t *restrict needle));
Packit Service 991b93
# elif __GLIBC__ >= 2
Packit aea12f
_GL_CXXALIASWARN (wcsstr);
Packit aea12f
# endif
Packit aea12f
#elif defined GNULIB_POSIXCHECK
Packit aea12f
# undef wcsstr
Packit aea12f
# if HAVE_RAW_DECL_WCSSTR
Packit aea12f
_GL_WARN_ON_USE (wcsstr, "wcsstr is unportable - "
Packit aea12f
                 "use gnulib module wcsstr for portability");
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Divide WCS into tokens separated by characters in DELIM.  */
Packit aea12f
#if @GNULIB_WCSTOK@
Packit Service 991b93
# if @REPLACE_WCSTOK@
Packit Service 991b93
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 991b93
#   undef wcstok
Packit Service 991b93
#   define wcstok rpl_wcstok
Packit Service 991b93
#  endif
Packit Service 991b93
_GL_FUNCDECL_RPL (wcstok, wchar_t *,
Packit Service 991b93
                  (wchar_t *restrict wcs, const wchar_t *restrict delim,
Packit Service 991b93
                   wchar_t **restrict ptr));
Packit Service 991b93
_GL_CXXALIAS_RPL (wcstok, wchar_t *,
Packit Service 991b93
                  (wchar_t *restrict wcs, const wchar_t *restrict delim,
Packit Service 991b93
                   wchar_t **restrict ptr));
Packit Service 991b93
# else
Packit Service 991b93
#  if !@HAVE_WCSTOK@
Packit aea12f
_GL_FUNCDECL_SYS (wcstok, wchar_t *,
Packit Service 991b93
                  (wchar_t *restrict wcs, const wchar_t *restrict delim,
Packit Service 991b93
                   wchar_t **restrict ptr));
Packit Service 991b93
#  endif
Packit aea12f
_GL_CXXALIAS_SYS (wcstok, wchar_t *,
Packit Service 991b93
                  (wchar_t *restrict wcs, const wchar_t *restrict delim,
Packit Service 991b93
                   wchar_t **restrict ptr));
Packit Service 991b93
# endif
Packit Service 991b93
# if __GLIBC__ >= 2
Packit aea12f
_GL_CXXALIASWARN (wcstok);
Packit Service 991b93
# endif
Packit aea12f
#elif defined GNULIB_POSIXCHECK
Packit aea12f
# undef wcstok
Packit aea12f
# if HAVE_RAW_DECL_WCSTOK
Packit aea12f
_GL_WARN_ON_USE (wcstok, "wcstok is unportable - "
Packit aea12f
                 "use gnulib module wcstok for portability");
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Determine number of column positions required for first N wide
Packit aea12f
   characters (or fewer if S ends before this) in S.  */
Packit aea12f
#if @GNULIB_WCSWIDTH@
Packit aea12f
# if @REPLACE_WCSWIDTH@
Packit aea12f
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit aea12f
#   undef wcswidth
Packit aea12f
#   define wcswidth rpl_wcswidth
Packit aea12f
#  endif
Packit aea12f
_GL_FUNCDECL_RPL (wcswidth, int, (const wchar_t *s, size_t n)
Packit aea12f
                                 _GL_ATTRIBUTE_PURE);
Packit aea12f
_GL_CXXALIAS_RPL (wcswidth, int, (const wchar_t *s, size_t n));
Packit aea12f
# else
Packit aea12f
#  if !@HAVE_WCSWIDTH@
Packit aea12f
_GL_FUNCDECL_SYS (wcswidth, int, (const wchar_t *s, size_t n)
Packit aea12f
                                 _GL_ATTRIBUTE_PURE);
Packit aea12f
#  endif
Packit aea12f
_GL_CXXALIAS_SYS (wcswidth, int, (const wchar_t *s, size_t n));
Packit aea12f
# endif
Packit Service 991b93
# if __GLIBC__ >= 2
Packit aea12f
_GL_CXXALIASWARN (wcswidth);
Packit Service 991b93
# endif
Packit aea12f
#elif defined GNULIB_POSIXCHECK
Packit aea12f
# undef wcswidth
Packit aea12f
# if HAVE_RAW_DECL_WCSWIDTH
Packit aea12f
_GL_WARN_ON_USE (wcswidth, "wcswidth is unportable - "
Packit aea12f
                 "use gnulib module wcswidth for portability");
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* Convert *TP to a date and time wide string.  See
Packit Service 991b93
   <https://pubs.opengroup.org/onlinepubs/9699919799/functions/wcsftime.html>.  */
Packit aea12f
#if @GNULIB_WCSFTIME@
Packit aea12f
# if @REPLACE_WCSFTIME@
Packit aea12f
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit aea12f
#   undef wcsftime
Packit aea12f
#   define wcsftime rpl_wcsftime
Packit aea12f
#  endif
Packit Service 991b93
_GL_FUNCDECL_RPL (wcsftime, size_t,
Packit Service 991b93
                  (wchar_t *restrict __buf, size_t __bufsize,
Packit Service 991b93
                   const wchar_t *restrict __fmt,
Packit Service 991b93
                   const struct tm *restrict __tp)
Packit Service 991b93
                  _GL_ARG_NONNULL ((1, 3, 4)));
Packit Service 991b93
_GL_CXXALIAS_RPL (wcsftime, size_t,
Packit Service 991b93
                  (wchar_t *restrict __buf, size_t __bufsize,
Packit Service 991b93
                   const wchar_t *restrict __fmt,
Packit Service 991b93
                   const struct tm *restrict __tp));
Packit aea12f
# else
Packit aea12f
#  if !@HAVE_WCSFTIME@
Packit Service 991b93
_GL_FUNCDECL_SYS (wcsftime, size_t,
Packit Service 991b93
                  (wchar_t *restrict __buf, size_t __bufsize,
Packit Service 991b93
                   const wchar_t *restrict __fmt,
Packit Service 991b93
                   const struct tm *restrict __tp)
Packit Service 991b93
                  _GL_ARG_NONNULL ((1, 3, 4)));
Packit aea12f
#  endif
Packit Service 991b93
_GL_CXXALIAS_SYS (wcsftime, size_t,
Packit Service 991b93
                  (wchar_t *restrict __buf, size_t __bufsize,
Packit Service 991b93
                   const wchar_t *restrict __fmt,
Packit Service 991b93
                   const struct tm *restrict __tp));
Packit aea12f
# endif
Packit Service 991b93
# if __GLIBC__ >= 2
Packit aea12f
_GL_CXXALIASWARN (wcsftime);
Packit Service 991b93
# endif
Packit aea12f
#elif defined GNULIB_POSIXCHECK
Packit aea12f
# undef wcsftime
Packit aea12f
# if HAVE_RAW_DECL_WCSFTIME
Packit aea12f
_GL_WARN_ON_USE (wcsftime, "wcsftime is unportable - "
Packit aea12f
                 "use gnulib module wcsftime for portability");
Packit aea12f
# endif
Packit aea12f
#endif
Packit aea12f
Packit aea12f
Packit aea12f
#endif /* _@GUARD_PREFIX@_WCHAR_H */
Packit aea12f
#endif /* _@GUARD_PREFIX@_WCHAR_H */
Packit aea12f
#endif