diff options
Diffstat (limited to 'lib/locale.in.h')
-rw-r--r-- | lib/locale.in.h | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/lib/locale.in.h b/lib/locale.in.h index 1063070..41a93c1 100644 --- a/lib/locale.in.h +++ b/lib/locale.in.h @@ -1,5 +1,5 @@ /* A POSIX <locale.h>. - Copyright (C) 2007-2021 Free Software Foundation, Inc. + Copyright (C) 2007-2023 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -44,6 +44,11 @@ #ifndef _@GUARD_PREFIX@_LOCALE_H #define _@GUARD_PREFIX@_LOCALE_H +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* NetBSD 5.0 mis-defines NULL. */ #include <stddef.h> @@ -229,7 +234,7 @@ _GL_CXXALIAS_SYS (newlocale, locale_t, (int category_mask, const char *name, locale_t base)); # endif # endif -# if @HAVE_NEWLOCALE@ +# if __GLIBC__ >= 2 && @HAVE_NEWLOCALE@ _GL_CXXALIASWARN (newlocale); # endif # if @HAVE_NEWLOCALE@ || @REPLACE_NEWLOCALE@ @@ -245,23 +250,23 @@ _GL_WARN_ON_USE (newlocale, "newlocale is not portable"); #endif #if @GNULIB_DUPLOCALE@ || (@GNULIB_LOCALENAME@ && @LOCALENAME_ENHANCE_LOCALE_FUNCS@ && @HAVE_DUPLOCALE@) -# if @REPLACE_DUPLOCALE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef duplocale -# define duplocale rpl_duplocale -# define GNULIB_defined_duplocale 1 -# endif +# if @HAVE_DUPLOCALE@ /* locale_t may be undefined if !@HAVE_DUPLOCALE@. */ +# if @REPLACE_DUPLOCALE@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef duplocale +# define duplocale rpl_duplocale +# define GNULIB_defined_duplocale 1 +# endif _GL_FUNCDECL_RPL (duplocale, locale_t, (locale_t locale) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (duplocale, locale_t, (locale_t locale)); -# else -# if @HAVE_DUPLOCALE@ +# else _GL_CXXALIAS_SYS (duplocale, locale_t, (locale_t locale)); # endif # endif -# if @HAVE_DUPLOCALE@ +# if __GLIBC__ >= 2 && @HAVE_DUPLOCALE@ _GL_CXXALIASWARN (duplocale); # endif -# if @HAVE_DUPLOCALE@ || @REPLACE_DUPLOCALE@ +# if @HAVE_DUPLOCALE@ # ifndef HAVE_WORKING_DUPLOCALE # define HAVE_WORKING_DUPLOCALE 1 # endif @@ -290,7 +295,7 @@ _GL_CXXALIAS_RPL (freelocale, void, (locale_t locale)); _GL_CXXALIAS_SYS_CAST (freelocale, void, (locale_t locale)); # endif # endif -# if @HAVE_FREELOCALE@ +# if __GLIBC__ >= 2 && @HAVE_FREELOCALE@ _GL_CXXALIASWARN (freelocale); # endif #elif defined GNULIB_POSIXCHECK |