Blame lib/wchar.in.h

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