Blame gnulib/lib/locale.in.h

Packit Service a2ae7a
/* A POSIX <locale.h>.
Packit Service a2ae7a
   Copyright (C) 2007-2019 Free Software Foundation, Inc.
Packit Service a2ae7a
Packit Service a2ae7a
   This program is free software: you can redistribute it and/or modify
Packit Service a2ae7a
   it under the terms of the GNU Lesser General Public License as published by
Packit Service a2ae7a
   the Free Software Foundation; either version 2.1 of the License, or
Packit Service a2ae7a
   (at your option) any later version.
Packit Service a2ae7a
Packit Service a2ae7a
   This program is distributed in the hope that it will be useful,
Packit Service a2ae7a
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service a2ae7a
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit Service a2ae7a
   GNU Lesser General Public License for more details.
Packit Service a2ae7a
Packit Service a2ae7a
   You should have received a copy of the GNU Lesser General Public License
Packit Service a2ae7a
   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
Packit Service a2ae7a
Packit Service a2ae7a
#if __GNUC__ >= 3
Packit Service a2ae7a
@PRAGMA_SYSTEM_HEADER@
Packit Service a2ae7a
#endif
Packit Service a2ae7a
@PRAGMA_COLUMNS@
Packit Service a2ae7a
Packit Service a2ae7a
#if (defined _WIN32 && !defined __CYGWIN__ && defined __need_locale_t) \
Packit Service a2ae7a
    || defined _GL_ALREADY_INCLUDING_LOCALE_H
Packit Service a2ae7a
Packit Service a2ae7a
/* Special invocation convention:
Packit Service a2ae7a
   - Inside mingw header files,
Packit Service a2ae7a
   - To handle Solaris header files (through Solaris 10) when combined
Packit Service a2ae7a
     with gettext's libintl.h.  */
Packit Service a2ae7a
Packit Service a2ae7a
#@INCLUDE_NEXT@ @NEXT_LOCALE_H@
Packit Service a2ae7a
Packit Service a2ae7a
#else
Packit Service a2ae7a
/* Normal invocation convention.  */
Packit Service a2ae7a
Packit Service a2ae7a
#ifndef _@GUARD_PREFIX@_LOCALE_H
Packit Service a2ae7a
Packit Service a2ae7a
#define _GL_ALREADY_INCLUDING_LOCALE_H
Packit Service a2ae7a
Packit Service a2ae7a
/* The include_next requires a split double-inclusion guard.  */
Packit Service a2ae7a
#@INCLUDE_NEXT@ @NEXT_LOCALE_H@
Packit Service a2ae7a
Packit Service a2ae7a
#undef _GL_ALREADY_INCLUDING_LOCALE_H
Packit Service a2ae7a
Packit Service a2ae7a
#ifndef _@GUARD_PREFIX@_LOCALE_H
Packit Service a2ae7a
#define _@GUARD_PREFIX@_LOCALE_H
Packit Service a2ae7a
Packit Service a2ae7a
/* NetBSD 5.0 mis-defines NULL.  */
Packit Service a2ae7a
#include <stddef.h>
Packit Service a2ae7a
Packit Service a2ae7a
/* Mac OS X 10.5 defines the locale_t type in <xlocale.h>.  */
Packit Service a2ae7a
#if @HAVE_XLOCALE_H@
Packit Service a2ae7a
# include <xlocale.h>
Packit Service a2ae7a
#endif
Packit Service a2ae7a
Packit Service a2ae7a
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
Packit Service a2ae7a
Packit Service a2ae7a
/* The definition of _GL_ARG_NONNULL is copied here.  */
Packit Service a2ae7a
Packit Service a2ae7a
/* The definition of _GL_WARN_ON_USE is copied here.  */
Packit Service a2ae7a
Packit Service a2ae7a
/* The LC_MESSAGES locale category is specified in POSIX, but not in ISO C.
Packit Service a2ae7a
   On systems that don't define it, use the same value as GNU libintl.  */
Packit Service a2ae7a
#if !defined LC_MESSAGES
Packit Service a2ae7a
# define LC_MESSAGES 1729
Packit Service a2ae7a
#endif
Packit Service a2ae7a
Packit Service a2ae7a
/* Bionic libc's 'struct lconv' is just a dummy.  */
Packit Service a2ae7a
#if @REPLACE_STRUCT_LCONV@
Packit Service a2ae7a
# define lconv rpl_lconv
Packit Service a2ae7a
struct lconv
Packit Service a2ae7a
{
Packit Service a2ae7a
  /* All 'char *' are actually 'const char *'.  */
Packit Service a2ae7a
Packit Service a2ae7a
  /* Members that depend on the LC_NUMERIC category of the locale.  See
Packit Service a2ae7a
     <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html#tag_07_03_04> */
Packit Service a2ae7a
Packit Service a2ae7a
  /* Symbol used as decimal point.  */
Packit Service a2ae7a
  char *decimal_point;
Packit Service a2ae7a
  /* Symbol used to separate groups of digits to the left of the decimal
Packit Service a2ae7a
     point.  */
Packit Service a2ae7a
  char *thousands_sep;
Packit Service a2ae7a
  /* Definition of the size of groups of digits to the left of the decimal
Packit Service a2ae7a
     point.  */
Packit Service a2ae7a
  char *grouping;
Packit Service a2ae7a
Packit Service a2ae7a
  /* Members that depend on the LC_MONETARY category of the locale.  See
Packit Service a2ae7a
     <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html#tag_07_03_03> */
Packit Service a2ae7a
Packit Service a2ae7a
  /* Symbol used as decimal point.  */
Packit Service a2ae7a
  char *mon_decimal_point;
Packit Service a2ae7a
  /* Symbol used to separate groups of digits to the left of the decimal
Packit Service a2ae7a
     point.  */
Packit Service a2ae7a
  char *mon_thousands_sep;
Packit Service a2ae7a
  /* Definition of the size of groups of digits to the left of the decimal
Packit Service a2ae7a
     point.  */
Packit Service a2ae7a
  char *mon_grouping;
Packit Service a2ae7a
  /* Sign used to indicate a value >= 0.  */
Packit Service a2ae7a
  char *positive_sign;
Packit Service a2ae7a
  /* Sign used to indicate a value < 0.  */
Packit Service a2ae7a
  char *negative_sign;
Packit Service a2ae7a
Packit Service a2ae7a
  /* For formatting local currency.  */
Packit Service a2ae7a
  /* Currency symbol (3 characters) followed by separator (1 character).  */
Packit Service a2ae7a
  char *currency_symbol;
Packit Service a2ae7a
  /* Number of digits after the decimal point.  */
Packit Service a2ae7a
  char frac_digits;
Packit Service a2ae7a
  /* For values >= 0: 1 if the currency symbol precedes the number, 0 if it
Packit Service a2ae7a
     comes after the number.  */
Packit Service a2ae7a
  char p_cs_precedes;
Packit Service a2ae7a
  /* For values >= 0: Position of the sign.  */
Packit Service a2ae7a
  char p_sign_posn;
Packit Service a2ae7a
  /* For values >= 0: Placement of spaces between currency symbol, sign, and
Packit Service a2ae7a
     number.  */
Packit Service a2ae7a
  char p_sep_by_space;
Packit Service a2ae7a
  /* For values < 0: 1 if the currency symbol precedes the number, 0 if it
Packit Service a2ae7a
     comes after the number.  */
Packit Service a2ae7a
  char n_cs_precedes;
Packit Service a2ae7a
  /* For values < 0: Position of the sign.  */
Packit Service a2ae7a
  char n_sign_posn;
Packit Service a2ae7a
  /* For values < 0: Placement of spaces between currency symbol, sign, and
Packit Service a2ae7a
     number.  */
Packit Service a2ae7a
  char n_sep_by_space;
Packit Service a2ae7a
Packit Service a2ae7a
  /* For formatting international currency.  */
Packit Service a2ae7a
  /* Currency symbol (3 characters) followed by separator (1 character).  */
Packit Service a2ae7a
  char *int_curr_symbol;
Packit Service a2ae7a
  /* Number of digits after the decimal point.  */
Packit Service a2ae7a
  char int_frac_digits;
Packit Service a2ae7a
  /* For values >= 0: 1 if the currency symbol precedes the number, 0 if it
Packit Service a2ae7a
     comes after the number.  */
Packit Service a2ae7a
  char int_p_cs_precedes;
Packit Service a2ae7a
  /* For values >= 0: Position of the sign.  */
Packit Service a2ae7a
  char int_p_sign_posn;
Packit Service a2ae7a
  /* For values >= 0: Placement of spaces between currency symbol, sign, and
Packit Service a2ae7a
     number.  */
Packit Service a2ae7a
  char int_p_sep_by_space;
Packit Service a2ae7a
  /* For values < 0: 1 if the currency symbol precedes the number, 0 if it
Packit Service a2ae7a
     comes after the number.  */
Packit Service a2ae7a
  char int_n_cs_precedes;
Packit Service a2ae7a
  /* For values < 0: Position of the sign.  */
Packit Service a2ae7a
  char int_n_sign_posn;
Packit Service a2ae7a
  /* For values < 0: Placement of spaces between currency symbol, sign, and
Packit Service a2ae7a
     number.  */
Packit Service a2ae7a
  char int_n_sep_by_space;
Packit Service a2ae7a
};
Packit Service a2ae7a
#endif
Packit Service a2ae7a
Packit Service a2ae7a
#if @GNULIB_LOCALECONV@
Packit Service a2ae7a
# if @REPLACE_LOCALECONV@
Packit Service a2ae7a
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service a2ae7a
#   undef localeconv
Packit Service a2ae7a
#   define localeconv rpl_localeconv
Packit Service a2ae7a
#  endif
Packit Service a2ae7a
_GL_FUNCDECL_RPL (localeconv, struct lconv *, (void));
Packit Service a2ae7a
_GL_CXXALIAS_RPL (localeconv, struct lconv *, (void));
Packit Service a2ae7a
# else
Packit Service a2ae7a
_GL_CXXALIAS_SYS (localeconv, struct lconv *, (void));
Packit Service a2ae7a
# endif
Packit Service a2ae7a
_GL_CXXALIASWARN (localeconv);
Packit Service a2ae7a
#elif @REPLACE_STRUCT_LCONV@
Packit Service a2ae7a
# undef localeconv
Packit Service a2ae7a
# define localeconv localeconv_used_without_requesting_gnulib_module_localeconv
Packit Service a2ae7a
#elif defined GNULIB_POSIXCHECK
Packit Service a2ae7a
# undef localeconv
Packit Service a2ae7a
# if HAVE_RAW_DECL_LOCALECONV
Packit Service a2ae7a
_GL_WARN_ON_USE (localeconv,
Packit Service a2ae7a
                 "localeconv returns too few information on some platforms - "
Packit Service a2ae7a
                 "use gnulib module localeconv for portability");
Packit Service a2ae7a
# endif
Packit Service a2ae7a
#endif
Packit Service a2ae7a
Packit Service a2ae7a
#if @GNULIB_SETLOCALE@
Packit Service a2ae7a
# if @REPLACE_SETLOCALE@
Packit Service a2ae7a
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service a2ae7a
#   undef setlocale
Packit Service a2ae7a
#   define setlocale rpl_setlocale
Packit Service a2ae7a
#   define GNULIB_defined_setlocale 1
Packit Service a2ae7a
#  endif
Packit Service a2ae7a
_GL_FUNCDECL_RPL (setlocale, char *, (int category, const char *locale));
Packit Service a2ae7a
_GL_CXXALIAS_RPL (setlocale, char *, (int category, const char *locale));
Packit Service a2ae7a
# else
Packit Service a2ae7a
_GL_CXXALIAS_SYS (setlocale, char *, (int category, const char *locale));
Packit Service a2ae7a
# endif
Packit Service a2ae7a
_GL_CXXALIASWARN (setlocale);
Packit Service a2ae7a
#elif defined GNULIB_POSIXCHECK
Packit Service a2ae7a
# undef setlocale
Packit Service a2ae7a
# if HAVE_RAW_DECL_SETLOCALE
Packit Service a2ae7a
_GL_WARN_ON_USE (setlocale, "setlocale works differently on native Windows - "
Packit Service a2ae7a
                 "use gnulib module setlocale for portability");
Packit Service a2ae7a
# endif
Packit Service a2ae7a
#endif
Packit Service a2ae7a
Packit Service a2ae7a
#if /*@GNULIB_NEWLOCALE@ ||*/ (@GNULIB_LOCALENAME@ && @HAVE_NEWLOCALE@)
Packit Service a2ae7a
# if @REPLACE_NEWLOCALE@
Packit Service a2ae7a
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service a2ae7a
#   undef newlocale
Packit Service a2ae7a
#   define newlocale rpl_newlocale
Packit Service a2ae7a
#   define GNULIB_defined_newlocale 1
Packit Service a2ae7a
#  endif
Packit Service a2ae7a
_GL_FUNCDECL_RPL (newlocale, locale_t,
Packit Service a2ae7a
                  (int category_mask, const char *name, locale_t base)
Packit Service a2ae7a
                  _GL_ARG_NONNULL ((2)));
Packit Service a2ae7a
_GL_CXXALIAS_RPL (newlocale, locale_t,
Packit Service a2ae7a
                  (int category_mask, const char *name, locale_t base));
Packit Service a2ae7a
# else
Packit Service a2ae7a
#  if @HAVE_NEWLOCALE@
Packit Service a2ae7a
_GL_CXXALIAS_SYS (newlocale, locale_t,
Packit Service a2ae7a
                  (int category_mask, const char *name, locale_t base));
Packit Service a2ae7a
#  endif
Packit Service a2ae7a
# endif
Packit Service a2ae7a
# if @HAVE_NEWLOCALE@
Packit Service a2ae7a
_GL_CXXALIASWARN (newlocale);
Packit Service a2ae7a
# endif
Packit Service a2ae7a
#elif defined GNULIB_POSIXCHECK
Packit Service a2ae7a
# undef newlocale
Packit Service a2ae7a
# if HAVE_RAW_DECL_NEWLOCALE
Packit Service a2ae7a
_GL_WARN_ON_USE (newlocale, "newlocale is not portable");
Packit Service a2ae7a
# endif
Packit Service a2ae7a
#endif
Packit Service a2ae7a
Packit Service a2ae7a
#if @GNULIB_DUPLOCALE@ || (@GNULIB_LOCALENAME@ && @HAVE_DUPLOCALE@)
Packit Service a2ae7a
# if @REPLACE_DUPLOCALE@
Packit Service a2ae7a
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service a2ae7a
#   undef duplocale
Packit Service a2ae7a
#   define duplocale rpl_duplocale
Packit Service a2ae7a
#   define GNULIB_defined_duplocale 1
Packit Service a2ae7a
#  endif
Packit Service a2ae7a
_GL_FUNCDECL_RPL (duplocale, locale_t, (locale_t locale) _GL_ARG_NONNULL ((1)));
Packit Service a2ae7a
_GL_CXXALIAS_RPL (duplocale, locale_t, (locale_t locale));
Packit Service a2ae7a
# else
Packit Service a2ae7a
#  if @HAVE_DUPLOCALE@
Packit Service a2ae7a
_GL_CXXALIAS_SYS (duplocale, locale_t, (locale_t locale));
Packit Service a2ae7a
#  endif
Packit Service a2ae7a
# endif
Packit Service a2ae7a
# if @HAVE_DUPLOCALE@
Packit Service a2ae7a
_GL_CXXALIASWARN (duplocale);
Packit Service a2ae7a
# endif
Packit Service a2ae7a
#elif defined GNULIB_POSIXCHECK
Packit Service a2ae7a
# undef duplocale
Packit Service a2ae7a
# if HAVE_RAW_DECL_DUPLOCALE
Packit Service a2ae7a
_GL_WARN_ON_USE (duplocale, "duplocale is buggy on some glibc systems - "
Packit Service a2ae7a
                 "use gnulib module duplocale for portability");
Packit Service a2ae7a
# endif
Packit Service a2ae7a
#endif
Packit Service a2ae7a
Packit Service a2ae7a
#if /*@GNULIB_FREELOCALE@ ||*/ (@GNULIB_LOCALENAME@ && @HAVE_FREELOCALE@)
Packit Service a2ae7a
# if @REPLACE_FREELOCALE@
Packit Service a2ae7a
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service a2ae7a
#   undef freelocale
Packit Service a2ae7a
#   define freelocale rpl_freelocale
Packit Service a2ae7a
#   define GNULIB_defined_freelocale 1
Packit Service a2ae7a
#  endif
Packit Service a2ae7a
_GL_FUNCDECL_RPL (freelocale, void, (locale_t locale) _GL_ARG_NONNULL ((1)));
Packit Service a2ae7a
_GL_CXXALIAS_RPL (freelocale, void, (locale_t locale));
Packit Service a2ae7a
# else
Packit Service a2ae7a
#  if @HAVE_FREELOCALE@
Packit Service a2ae7a
_GL_CXXALIAS_SYS (freelocale, void, (locale_t locale));
Packit Service a2ae7a
#  endif
Packit Service a2ae7a
# endif
Packit Service a2ae7a
# if @HAVE_FREELOCALE@
Packit Service a2ae7a
_GL_CXXALIASWARN (freelocale);
Packit Service a2ae7a
# endif
Packit Service a2ae7a
#elif defined GNULIB_POSIXCHECK
Packit Service a2ae7a
# undef freelocale
Packit Service a2ae7a
# if HAVE_RAW_DECL_FREELOCALE
Packit Service a2ae7a
_GL_WARN_ON_USE (freelocale, "freelocale is not portable");
Packit Service a2ae7a
# endif
Packit Service a2ae7a
#endif
Packit Service a2ae7a
Packit Service a2ae7a
#endif /* _@GUARD_PREFIX@_LOCALE_H */
Packit Service a2ae7a
#endif /* _@GUARD_PREFIX@_LOCALE_H */
Packit Service a2ae7a
#endif /* !(__need_locale_t || _GL_ALREADY_INCLUDING_LOCALE_H) */