Commit aaa93559 authored by Paul Eggert's avatar Paul Eggert

Simpler version of strtoumax module.

parent 36009a21
......@@ -4,12 +4,9 @@
This is needed for the new integer-reading code in lread.c.
It automatically pulls in the following gnulib files, which
are used on old-fashioned platforms that don't have strtoumax:
lib/inttypes.in.h, lib/strtoimax.c, lib/strtol.c,
lib/strtoll.c, lib/strtoul.c, lib/strtoull.c, lib/strtoumax.c,
lib/verify.h, lib/wchar.in.h, m4/inttypes-pri.m4,
m4/inttypes.m4, m4/strtoimax.m4, m4/strtol.m4, m4/strtoll.m4,
m4/strtoul.m4, m4/strtoull.m4, m4/strtoumax.m4, m4/wchar_h.m4,
m4/wint_t.m4.
lib/inttypes.in.h, lib/strtoimax.c, lib/strtol.c, lib/strtoul.c,
lib/strtoull.c, lib/strtoumax.c, lib/verify.h, m4/inttypes.m4,
m4/strtoull.m4, m4/strtoumax.m4.
2011-04-20 Ken Brown <kbrown@cornell.edu>
......
......@@ -9,7 +9,7 @@
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files careadlinkat crypto/md5 dtoastr filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink socklen stdio strftime strtoumax symlink sys_stat
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files careadlinkat crypto/md5 dtoastr filemode getloadavg getopt-gnu ignore-value intprops lstat manywarnings mktime readlink socklen stdio strftime strtoumax symlink sys_stat warnings
MOSTLYCLEANFILES += core *.stackdump
......@@ -574,57 +574,12 @@ EXTRA_libgnu_a_SOURCES += strftime.c
## end gnulib module strftime
## begin gnulib module strtoimax
EXTRA_DIST += strtoimax.c
EXTRA_libgnu_a_SOURCES += strtoimax.c
## end gnulib module strtoimax
## begin gnulib module strtol
EXTRA_DIST += strtol.c
EXTRA_libgnu_a_SOURCES += strtol.c
## end gnulib module strtol
## begin gnulib module strtoll
EXTRA_DIST += strtoll.c
EXTRA_libgnu_a_SOURCES += strtoll.c
## end gnulib module strtoll
## begin gnulib module strtoul
EXTRA_DIST += strtoul.c
EXTRA_libgnu_a_SOURCES += strtoul.c
## end gnulib module strtoul
## begin gnulib module strtoull
EXTRA_DIST += strtoull.c
EXTRA_libgnu_a_SOURCES += strtoull.c
## end gnulib module strtoull
## begin gnulib module strtoumax
EXTRA_DIST += strtoumax.c
EXTRA_DIST += strtoimax.c strtol.c strtoul.c strtoull.c strtoumax.c
EXTRA_libgnu_a_SOURCES += strtoumax.c
EXTRA_libgnu_a_SOURCES += strtoimax.c strtol.c strtoul.c strtoull.c strtoumax.c
## end gnulib module strtoumax
......@@ -906,126 +861,6 @@ EXTRA_DIST += $(top_srcdir)/./warn-on-use.h
## end gnulib module warn-on-use
## begin gnulib module wchar
BUILT_SOURCES += wchar.h
# We need the following in order to create <wchar.h> when the system
# version does not work standalone.
wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \
-e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \
-e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \
-e 's|@''GNULIB_BTOWC''@|$(GNULIB_BTOWC)|g' \
-e 's|@''GNULIB_WCTOB''@|$(GNULIB_WCTOB)|g' \
-e 's|@''GNULIB_MBSINIT''@|$(GNULIB_MBSINIT)|g' \
-e 's|@''GNULIB_MBRTOWC''@|$(GNULIB_MBRTOWC)|g' \
-e 's|@''GNULIB_MBRLEN''@|$(GNULIB_MBRLEN)|g' \
-e 's|@''GNULIB_MBSRTOWCS''@|$(GNULIB_MBSRTOWCS)|g' \
-e 's|@''GNULIB_MBSNRTOWCS''@|$(GNULIB_MBSNRTOWCS)|g' \
-e 's|@''GNULIB_WCRTOMB''@|$(GNULIB_WCRTOMB)|g' \
-e 's|@''GNULIB_WCSRTOMBS''@|$(GNULIB_WCSRTOMBS)|g' \
-e 's|@''GNULIB_WCSNRTOMBS''@|$(GNULIB_WCSNRTOMBS)|g' \
-e 's|@''GNULIB_WCWIDTH''@|$(GNULIB_WCWIDTH)|g' \
-e 's|@''GNULIB_WMEMCHR''@|$(GNULIB_WMEMCHR)|g' \
-e 's|@''GNULIB_WMEMCMP''@|$(GNULIB_WMEMCMP)|g' \
-e 's|@''GNULIB_WMEMCPY''@|$(GNULIB_WMEMCPY)|g' \
-e 's|@''GNULIB_WMEMMOVE''@|$(GNULIB_WMEMMOVE)|g' \
-e 's|@''GNULIB_WMEMSET''@|$(GNULIB_WMEMSET)|g' \
-e 's|@''GNULIB_WCSLEN''@|$(GNULIB_WCSLEN)|g' \
-e 's|@''GNULIB_WCSNLEN''@|$(GNULIB_WCSNLEN)|g' \
-e 's|@''GNULIB_WCSCPY''@|$(GNULIB_WCSCPY)|g' \
-e 's|@''GNULIB_WCPCPY''@|$(GNULIB_WCPCPY)|g' \
-e 's|@''GNULIB_WCSNCPY''@|$(GNULIB_WCSNCPY)|g' \
-e 's|@''GNULIB_WCPNCPY''@|$(GNULIB_WCPNCPY)|g' \
-e 's|@''GNULIB_WCSCAT''@|$(GNULIB_WCSCAT)|g' \
-e 's|@''GNULIB_WCSNCAT''@|$(GNULIB_WCSNCAT)|g' \
-e 's|@''GNULIB_WCSCMP''@|$(GNULIB_WCSCMP)|g' \
-e 's|@''GNULIB_WCSNCMP''@|$(GNULIB_WCSNCMP)|g' \
-e 's|@''GNULIB_WCSCASECMP''@|$(GNULIB_WCSCASECMP)|g' \
-e 's|@''GNULIB_WCSNCASECMP''@|$(GNULIB_WCSNCASECMP)|g' \
-e 's|@''GNULIB_WCSCOLL''@|$(GNULIB_WCSCOLL)|g' \
-e 's|@''GNULIB_WCSXFRM''@|$(GNULIB_WCSXFRM)|g' \
-e 's|@''GNULIB_WCSDUP''@|$(GNULIB_WCSDUP)|g' \
-e 's|@''GNULIB_WCSCHR''@|$(GNULIB_WCSCHR)|g' \
-e 's|@''GNULIB_WCSRCHR''@|$(GNULIB_WCSRCHR)|g' \
-e 's|@''GNULIB_WCSCSPN''@|$(GNULIB_WCSCSPN)|g' \
-e 's|@''GNULIB_WCSSPN''@|$(GNULIB_WCSSPN)|g' \
-e 's|@''GNULIB_WCSPBRK''@|$(GNULIB_WCSPBRK)|g' \
-e 's|@''GNULIB_WCSSTR''@|$(GNULIB_WCSSTR)|g' \
-e 's|@''GNULIB_WCSTOK''@|$(GNULIB_WCSTOK)|g' \
-e 's|@''GNULIB_WCSWIDTH''@|$(GNULIB_WCSWIDTH)|g' \
< $(srcdir)/wchar.in.h | \
sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \
-e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \
-e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \
-e 's|@''HAVE_MBRTOWC''@|$(HAVE_MBRTOWC)|g' \
-e 's|@''HAVE_MBRLEN''@|$(HAVE_MBRLEN)|g' \
-e 's|@''HAVE_MBSRTOWCS''@|$(HAVE_MBSRTOWCS)|g' \
-e 's|@''HAVE_MBSNRTOWCS''@|$(HAVE_MBSNRTOWCS)|g' \
-e 's|@''HAVE_WCRTOMB''@|$(HAVE_WCRTOMB)|g' \
-e 's|@''HAVE_WCSRTOMBS''@|$(HAVE_WCSRTOMBS)|g' \
-e 's|@''HAVE_WCSNRTOMBS''@|$(HAVE_WCSNRTOMBS)|g' \
-e 's|@''HAVE_WMEMCHR''@|$(HAVE_WMEMCHR)|g' \
-e 's|@''HAVE_WMEMCMP''@|$(HAVE_WMEMCMP)|g' \
-e 's|@''HAVE_WMEMCPY''@|$(HAVE_WMEMCPY)|g' \
-e 's|@''HAVE_WMEMMOVE''@|$(HAVE_WMEMMOVE)|g' \
-e 's|@''HAVE_WMEMSET''@|$(HAVE_WMEMSET)|g' \
-e 's|@''HAVE_WCSLEN''@|$(HAVE_WCSLEN)|g' \
-e 's|@''HAVE_WCSNLEN''@|$(HAVE_WCSNLEN)|g' \
-e 's|@''HAVE_WCSCPY''@|$(HAVE_WCSCPY)|g' \
-e 's|@''HAVE_WCPCPY''@|$(HAVE_WCPCPY)|g' \
-e 's|@''HAVE_WCSNCPY''@|$(HAVE_WCSNCPY)|g' \
-e 's|@''HAVE_WCPNCPY''@|$(HAVE_WCPNCPY)|g' \
-e 's|@''HAVE_WCSCAT''@|$(HAVE_WCSCAT)|g' \
-e 's|@''HAVE_WCSNCAT''@|$(HAVE_WCSNCAT)|g' \
-e 's|@''HAVE_WCSCMP''@|$(HAVE_WCSCMP)|g' \
-e 's|@''HAVE_WCSNCMP''@|$(HAVE_WCSNCMP)|g' \
-e 's|@''HAVE_WCSCASECMP''@|$(HAVE_WCSCASECMP)|g' \
-e 's|@''HAVE_WCSNCASECMP''@|$(HAVE_WCSNCASECMP)|g' \
-e 's|@''HAVE_WCSCOLL''@|$(HAVE_WCSCOLL)|g' \
-e 's|@''HAVE_WCSXFRM''@|$(HAVE_WCSXFRM)|g' \
-e 's|@''HAVE_WCSDUP''@|$(HAVE_WCSDUP)|g' \
-e 's|@''HAVE_WCSCHR''@|$(HAVE_WCSCHR)|g' \
-e 's|@''HAVE_WCSRCHR''@|$(HAVE_WCSRCHR)|g' \
-e 's|@''HAVE_WCSCSPN''@|$(HAVE_WCSCSPN)|g' \
-e 's|@''HAVE_WCSSPN''@|$(HAVE_WCSSPN)|g' \
-e 's|@''HAVE_WCSPBRK''@|$(HAVE_WCSPBRK)|g' \
-e 's|@''HAVE_WCSSTR''@|$(HAVE_WCSSTR)|g' \
-e 's|@''HAVE_WCSTOK''@|$(HAVE_WCSTOK)|g' \
-e 's|@''HAVE_WCSWIDTH''@|$(HAVE_WCSWIDTH)|g' \
-e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \
-e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \
| \
sed -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \
-e 's|@''REPLACE_BTOWC''@|$(REPLACE_BTOWC)|g' \
-e 's|@''REPLACE_WCTOB''@|$(REPLACE_WCTOB)|g' \
-e 's|@''REPLACE_MBSINIT''@|$(REPLACE_MBSINIT)|g' \
-e 's|@''REPLACE_MBRTOWC''@|$(REPLACE_MBRTOWC)|g' \
-e 's|@''REPLACE_MBRLEN''@|$(REPLACE_MBRLEN)|g' \
-e 's|@''REPLACE_MBSRTOWCS''@|$(REPLACE_MBSRTOWCS)|g' \
-e 's|@''REPLACE_MBSNRTOWCS''@|$(REPLACE_MBSNRTOWCS)|g' \
-e 's|@''REPLACE_WCRTOMB''@|$(REPLACE_WCRTOMB)|g' \
-e 's|@''REPLACE_WCSRTOMBS''@|$(REPLACE_WCSRTOMBS)|g' \
-e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \
-e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \
-e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
} > $@-t && \
mv $@-t $@
MOSTLYCLEANFILES += wchar.h wchar.h-t
EXTRA_DIST += wchar.in.h
## end gnulib module wchar
mostlyclean-local: mostlyclean-generic
@for dir in '' $(MOSTLYCLEANDIRS); do \
......
......@@ -186,9 +186,8 @@
# define LOCALE_PARAM_PROTO
#endif
#include <wchar.h>
#ifdef USE_WIDE_CHAR
# include <wchar.h>
# include <wctype.h>
# define L_(Ch) L##Ch
# define UCHAR_TYPE wint_t
......
/* Function to parse a `long long int' from text.
Copyright (C) 1995-1997, 1999, 2001, 2009-2011 Free Software Foundation,
Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#define QUAD 1
#include <strtol.c>
#ifdef _LIBC
# ifdef SHARED
# include <shlib-compat.h>
# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)
compat_symbol (libc, __strtoll_internal, __strtoq_internal, GLIBC_2_0);
# endif
# endif
weak_alias (strtoll, strtoq)
#endif
/* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
Copyright (C) 2007-2011 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
/* Written by Eric Blake. */
/*
* ISO C 99 <wchar.h> for platforms that have issues.
* <http://www.opengroup.org/susv3xbd/wchar.h.html>
*
* For now, this just ensures proper prerequisite inclusion order and
* the declaration of wcwidth().
*/
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
@PRAGMA_COLUMNS@
#if defined __need_mbstate_t || defined __need_wint_t || (defined __hpux && ((defined _INTTYPES_INCLUDED && !defined strtoimax) || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) || defined _GL_ALREADY_INCLUDING_WCHAR_H
/* Special invocation convention:
- Inside glibc and uClibc header files.
- On HP-UX 11.00 we have a sequence of nested includes
<wchar.h> -> <stdlib.h> -> <stdint.h>, and the latter includes <wchar.h>,
once indirectly <stdint.h> -> <sys/types.h> -> <inttypes.h> -> <wchar.h>
and once directly. In both situations 'wint_t' is not yet defined,
therefore we cannot provide the function overrides; instead include only
the system's <wchar.h>.
- On IRIX 6.5, similarly, we have an include <wchar.h> -> <wctype.h>, and
the latter includes <wchar.h>. But here, we have no way to detect whether
<wctype.h> is completely included or is still being included. */
#@INCLUDE_NEXT@ @NEXT_WCHAR_H@
#else
/* Normal invocation convention. */
#ifndef _GL_WCHAR_H
#define _GL_ALREADY_INCLUDING_WCHAR_H
#if @HAVE_FEATURES_H@
# include <features.h> /* for __GLIBC__ */
#endif
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
<wchar.h>.
BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
included before <wchar.h>.
In some builds of uClibc, <wchar.h> is nonexistent and wchar_t is defined
by <stddef.h>.
But avoid namespace pollution on glibc systems. */
#if !(defined __GLIBC__ && !defined __UCLIBC__)
# include <stddef.h>
#endif
#ifndef __GLIBC__
# include <stdio.h>
# include <time.h>
#endif
/* Include the original <wchar.h> if it exists.
Some builds of uClibc lack it. */
/* The include_next requires a split double-inclusion guard. */
#if @HAVE_WCHAR_H@
# @INCLUDE_NEXT@ @NEXT_WCHAR_H@
#endif
#undef _GL_ALREADY_INCLUDING_WCHAR_H
#ifndef _GL_WCHAR_H
#define _GL_WCHAR_H
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
/* The definition of _GL_ARG_NONNULL is copied here. */
/* The definition of _GL_WARN_ON_USE is copied here. */
/* Define wint_t and WEOF. (Also done in wctype.in.h.) */
#if !@HAVE_WINT_T@ && !defined wint_t
# define wint_t int
# ifndef WEOF
# define WEOF -1
# endif
#else
# ifndef WEOF
# define WEOF ((wint_t) -1)
# endif
#endif
/* Override mbstate_t if it is too small.
On IRIX 6.5, sizeof (mbstate_t) == 1, which is not sufficient for
implementing mbrtowc for encodings like UTF-8. */
#if !(@HAVE_MBSINIT@ && @HAVE_MBRTOWC@) || @REPLACE_MBSTATE_T@
# if !GNULIB_defined_mbstate_t
typedef int rpl_mbstate_t;
# undef mbstate_t
# define mbstate_t rpl_mbstate_t
# define GNULIB_defined_mbstate_t 1
# endif
#endif
/* Convert a single-byte character to a wide character. */
#if @GNULIB_BTOWC@
# if @REPLACE_BTOWC@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef btowc
# define btowc rpl_btowc
# endif
_GL_FUNCDECL_RPL (btowc, wint_t, (int c));
_GL_CXXALIAS_RPL (btowc, wint_t, (int c));
# else
# if !@HAVE_BTOWC@
_GL_FUNCDECL_SYS (btowc, wint_t, (int c));
# endif
_GL_CXXALIAS_SYS (btowc, wint_t, (int c));
# endif
_GL_CXXALIASWARN (btowc);
#elif defined GNULIB_POSIXCHECK
# undef btowc
# if HAVE_RAW_DECL_BTOWC
_GL_WARN_ON_USE (btowc, "btowc is unportable - "
"use gnulib module btowc for portability");
# endif
#endif
/* Convert a wide character to a single-byte character. */
#if @GNULIB_WCTOB@
# if @REPLACE_WCTOB@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef wctob
# define wctob rpl_wctob
# endif
_GL_FUNCDECL_RPL (wctob, int, (wint_t wc));
_GL_CXXALIAS_RPL (wctob, int, (wint_t wc));
# else
# if !defined wctob && !@HAVE_DECL_WCTOB@
/* wctob is provided by gnulib, or wctob exists but is not declared. */
_GL_FUNCDECL_SYS (wctob, int, (wint_t wc));
# endif
_GL_CXXALIAS_SYS (wctob, int, (wint_t wc));
# endif
_GL_CXXALIASWARN (wctob);
#elif defined GNULIB_POSIXCHECK
# undef wctob
# if HAVE_RAW_DECL_WCTOB
_GL_WARN_ON_USE (wctob, "wctob is unportable - "
"use gnulib module wctob for portability");
# endif
#endif
/* Test whether *PS is in the initial state. */
#if @GNULIB_MBSINIT@
# if @REPLACE_MBSINIT@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef mbsinit
# define mbsinit rpl_mbsinit
# endif
_GL_FUNCDECL_RPL (mbsinit, int, (const mbstate_t *ps));
_GL_CXXALIAS_RPL (mbsinit, int, (const mbstate_t *ps));
# else
# if !@HAVE_MBSINIT@
_GL_FUNCDECL_SYS (mbsinit, int, (const mbstate_t *ps));
# endif
_GL_CXXALIAS_SYS (mbsinit, int, (const mbstate_t *ps));
# endif
_GL_CXXALIASWARN (mbsinit);
#elif defined GNULIB_POSIXCHECK
# undef mbsinit
# if HAVE_RAW_DECL_MBSINIT
_GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - "
"use gnulib module mbsinit for portability");
# endif
#endif
/* Convert a multibyte character to a wide character. */
#if @GNULIB_MBRTOWC@
# if @REPLACE_MBRTOWC@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef mbrtowc
# define mbrtowc rpl_mbrtowc
# endif
_GL_FUNCDECL_RPL (mbrtowc, size_t,
(wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
_GL_CXXALIAS_RPL (mbrtowc, size_t,
(wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
# else
# if !@HAVE_MBRTOWC@
_GL_FUNCDECL_SYS (mbrtowc, size_t,
(wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
# endif
_GL_CXXALIAS_SYS (mbrtowc, size_t,
(wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
# endif
_GL_CXXALIASWARN (mbrtowc);
#elif defined GNULIB_POSIXCHECK
# undef mbrtowc
# if HAVE_RAW_DECL_MBRTOWC
_GL_WARN_ON_USE (mbrtowc, "mbrtowc is unportable - "
"use gnulib module mbrtowc for portability");
# endif
#endif
/* Recognize a multibyte character. */
#if @GNULIB_MBRLEN@
# if @REPLACE_MBRLEN@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef mbrlen
# define mbrlen rpl_mbrlen
# endif
_GL_FUNCDECL_RPL (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
_GL_CXXALIAS_RPL (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
# else
# if !@HAVE_MBRLEN@
_GL_FUNCDECL_SYS (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
# endif
_GL_CXXALIAS_SYS (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
# endif
_GL_CXXALIASWARN (mbrlen);
#elif defined GNULIB_POSIXCHECK
# undef mbrlen
# if HAVE_RAW_DECL_MBRLEN
_GL_WARN_ON_USE (mbrlen, "mbrlen is unportable - "
"use gnulib module mbrlen for portability");
# endif
#endif
/* Convert a string to a wide string. */
#if @GNULIB_MBSRTOWCS@
# if @REPLACE_MBSRTOWCS@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef mbsrtowcs
# define mbsrtowcs rpl_mbsrtowcs
# endif
_GL_FUNCDECL_RPL (mbsrtowcs, size_t,
(wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps)
_GL_ARG_NONNULL ((2)));
_GL_CXXALIAS_RPL (mbsrtowcs, size_t,
(wchar_t *dest, const char **srcp, size_t len,
mbstate_t *ps));
# else
# if !@HAVE_MBSRTOWCS@
_GL_FUNCDECL_SYS (mbsrtowcs, size_t,
(wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps)
_GL_ARG_NONNULL ((2)));
# endif
_GL_CXXALIAS_SYS (mbsrtowcs, size_t,
(wchar_t *dest, const char **srcp, size_t len,
mbstate_t *ps));
# endif
_GL_CXXALIASWARN (mbsrtowcs);
#elif defined GNULIB_POSIXCHECK
# undef mbsrtowcs
# if HAVE_RAW_DECL_MBSRTOWCS
_GL_WARN_ON_USE (mbsrtowcs, "mbsrtowcs is unportable - "
"use gnulib module mbsrtowcs for portability");
# endif
#endif
/* Convert a string to a wide string. */
#if @GNULIB_MBSNRTOWCS@
# if @REPLACE_MBSNRTOWCS@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef mbsnrtowcs
# define mbsnrtowcs rpl_mbsnrtowcs
# endif
_GL_FUNCDECL_RPL (mbsnrtowcs, size_t,
(wchar_t *dest, const char **srcp, size_t srclen, size_t len,
mbstate_t *ps)
_GL_ARG_NONNULL ((2)));
_GL_CXXALIAS_RPL (mbsnrtowcs, size_t,
(wchar_t *dest, const char **srcp, size_t srclen, size_t len,
mbstate_t *ps));
# else
# if !@HAVE_MBSNRTOWCS@
_GL_FUNCDECL_SYS (mbsnrtowcs, size_t,
(wchar_t *dest, const char **srcp, size_t srclen, size_t len,
mbstate_t *ps)
_GL_ARG_NONNULL ((2)));
# endif
_GL_CXXALIAS_SYS (mbsnrtowcs, size_t,
(wchar_t *dest, const char **srcp, size_t srclen, size_t len,
mbstate_t *ps));
# endif
_GL_CXXALIASWARN (mbsnrtowcs);
#elif defined GNULIB_POSIXCHECK
# undef mbsnrtowcs
# if HAVE_RAW_DECL_MBSNRTOWCS
_GL_WARN_ON_USE (mbsnrtowcs, "mbsnrtowcs is unportable - "
"use gnulib module mbsnrtowcs for portability");
# endif
#endif
/* Convert a wide character to a multibyte character. */
#if @GNULIB_WCRTOMB@
# if @REPLACE_WCRTOMB@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef wcrtomb
# define wcrtomb rpl_wcrtomb
# endif
_GL_FUNCDECL_RPL (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
_GL_CXXALIAS_RPL (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
# else
# if !@HAVE_WCRTOMB@
_GL_FUNCDECL_SYS (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
# endif
_GL_CXXALIAS_SYS (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
# endif
_GL_CXXALIASWARN (wcrtomb);
#elif defined GNULIB_POSIXCHECK
# undef wcrtomb
# if HAVE_RAW_DECL_WCRTOMB
_GL_WARN_ON_USE (wcrtomb, "wcrtomb is unportable - "
"use gnulib module wcrtomb for portability");
# endif
#endif
/* Convert a wide string to a string. */
#if @GNULIB_WCSRTOMBS@
# if @REPLACE_WCSRTOMBS@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef wcsrtombs
# define wcsrtombs rpl_wcsrtombs
# endif
_GL_FUNCDECL_RPL (wcsrtombs, size_t,
(char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps)
_GL_ARG_NONNULL ((2)));
_GL_CXXALIAS_RPL (wcsrtombs, size_t,
(char *dest, const wchar_t **srcp, size_t len,
mbstate_t *ps));
# else
# if !@HAVE_WCSRTOMBS@
_GL_FUNCDECL_SYS (wcsrtombs, size_t,
(char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps)
_GL_ARG_NONNULL ((2)));
# endif
_GL_CXXALIAS_SYS (wcsrtombs, size_t,
(char *dest, const wchar_t **srcp, size_t len,
mbstate_t *ps));
# endif
_GL_CXXALIASWARN (wcsrtombs);
#elif defined GNULIB_POSIXCHECK
# undef wcsrtombs
# if HAVE_RAW_DECL_WCSRTOMBS
_GL_WARN_ON_USE (wcsrtombs, "wcsrtombs is unportable - "
"use gnulib module wcsrtombs for portability");
# endif
#endif
/* Convert a wide string to a string. */
#if @GNULIB_WCSNRTOMBS@
# if @REPLACE_WCSNRTOMBS@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef wcsnrtombs
# define wcsnrtombs rpl_wcsnrtombs
# endif
_GL_FUNCDECL_RPL (wcsnrtombs, size_t,
(char *dest, const wchar_t **srcp, size_t srclen, size_t len,
mbstate_t *ps)
_GL_ARG_NONNULL ((2)));
_GL_CXXALIAS_RPL (wcsnrtombs, size_t,
(char *dest, const wchar_t **srcp, size_t srclen, size_t len,
mbstate_t *ps));
# else
# if !@HAVE_WCSNRTOMBS@
_GL_FUNCDECL_SYS (wcsnrtombs, size_t,
(char *dest, const wchar_t **srcp, size_t srclen, size_t len,
mbstate_t *ps)
_GL_ARG_NONNULL ((2)));
# endif
_GL_CXXALIAS_SYS (wcsnrtombs, size_t,
(char *dest, const wchar_t **srcp, size_t srclen, size_t len,
mbstate_t *ps));
# endif
_GL_CXXALIASWARN (wcsnrtombs);
#elif defined GNULIB_POSIXCHECK
# undef wcsnrtombs
# if HAVE_RAW_DECL_WCSNRTOMBS