locale.in.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /* A POSIX <locale.h>.
  2. Copyright (C) 2007-2010 Free Software Foundation, Inc.
  3. This program is free software: you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation; either version 3 of the License, or
  6. (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>. */
  13. #ifndef _GL_LOCALE_H
  14. #if __GNUC__ >= 3
  15. @PRAGMA_SYSTEM_HEADER@
  16. #endif
  17. /* The include_next requires a split double-inclusion guard. */
  18. #@INCLUDE_NEXT@ @NEXT_LOCALE_H@
  19. #ifndef _GL_LOCALE_H
  20. #define _GL_LOCALE_H
  21. /* NetBSD 5.0 mis-defines NULL. */
  22. #include <stddef.h>
  23. /* MacOS X 10.5 defines the locale_t type in <xlocale.h>. */
  24. #if @HAVE_XLOCALE_H@
  25. # include <xlocale.h>
  26. #endif
  27. /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
  28. /* The definition of _GL_ARG_NONNULL is copied here. */
  29. /* The definition of _GL_WARN_ON_USE is copied here. */
  30. /* The LC_MESSAGES locale category is specified in POSIX, but not in ISO C.
  31. On systems that don't define it, use the same value as GNU libintl. */
  32. #if !defined LC_MESSAGES
  33. # define LC_MESSAGES 1729
  34. #endif
  35. #if @GNULIB_DUPLOCALE@
  36. # if @REPLACE_DUPLOCALE@
  37. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  38. # undef duplocale
  39. # define duplocale rpl_duplocale
  40. # endif
  41. _GL_FUNCDECL_RPL (duplocale, locale_t, (locale_t locale) _GL_ARG_NONNULL ((1)));
  42. _GL_CXXALIAS_RPL (duplocale, locale_t, (locale_t locale));
  43. # else
  44. # if @HAVE_DUPLOCALE@
  45. _GL_CXXALIAS_SYS (duplocale, locale_t, (locale_t locale));
  46. # endif
  47. # endif
  48. # if @HAVE_DUPLOCALE@
  49. _GL_CXXALIASWARN (duplocale);
  50. # endif
  51. #elif defined GNULIB_POSIXCHECK
  52. # undef duplocale
  53. # if HAVE_RAW_DECL_DUPLOCALE
  54. _GL_WARN_ON_USE (duplocale, "duplocale is buggy on some glibc systems - "
  55. "use gnulib module duplocale for portability");
  56. # endif
  57. #endif
  58. #endif /* _GL_LOCALE_H */
  59. #endif /* _GL_LOCALE_H */