Blame lib/locale.in.h

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