Blame lib/locale.in.h

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