diff options
author | Bruno Haible <bruno@clisp.org> | 2010-09-10 20:23:49 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2010-09-10 20:23:49 +0200 |
commit | 3f322af6c93f7eb4c6ce5ceb789416aae10a50bd (patch) | |
tree | 2e7a6424f9a9e2848cf7e1aa647735b41c0e26ac /m4/langinfo_h.m4 | |
parent | cc85acd7729af217a8f4820ecb36a9be816dba75 (diff) | |
download | gnulib-3f322af6c93f7eb4c6ce5ceb789416aae10a50bd.tar.gz |
langinfo, nl_langinfo: Fix for IRIX 5.3.
* m4/langinfo_h.m4 (gl_LANGINFO_H): Test whether langinfo.h defines
T_FMT_AMPM, YESEXPR. Set HAVE_LANGINFO_T_FMT_AMPM,
HAVE_LANGINFO_YESEXPR.
* modules/langinfo (Makefile.am): Substitute HAVE_LANGINFO_T_FMT_AMPM,
HAVE_LANGINFO_YESEXPR.
* lib/langinfo.in.h (T_FMT_AMPM, GNULIB_defined_T_FMT_AMPM): Define if
HAVE_LANGINFO_T_FMT_AMPM is 0.
(YESEXPR, NOEXPR, GNULIB_defined_YESEXPR): Define if
HAVE_LANGINFO_YESEXPR is 0.
* lib/nl_langinfo.c (rpl_nl_langinfo): Handle also T_FMT_AMPM, YESEXPR,
NOEXPR.
* doc/posix-headers/langinfo.texi: Mention the IRIX 5.3 problem.
* doc/posix-functions/nl_langinfo.texi: Likewise.
Reported by Eric Blake.
Diffstat (limited to 'm4/langinfo_h.m4')
-rw-r--r-- | m4/langinfo_h.m4 | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/m4/langinfo_h.m4 b/m4/langinfo_h.m4 index 11a56980f7..c5824c6c84 100644 --- a/m4/langinfo_h.m4 +++ b/m4/langinfo_h.m4 @@ -1,4 +1,4 @@ -# langinfo_h.m4 serial 6 +# langinfo_h.m4 serial 7 dnl Copyright (C) 2009-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -21,7 +21,7 @@ AC_DEFUN([gl_LANGINFO_H], if test $ac_cv_header_langinfo_h = yes; then HAVE_LANGINFO_H=1 dnl Determine what <langinfo.h> defines. CODESET and ERA etc. are missing - dnl on OpenBSD 3.8. + dnl on OpenBSD 3.8. T_FMT_AMPM an YESEXPR, NOEXPR are missing on IRIX 5.3. AC_CACHE_CHECK([whether langinfo.h defines CODESET], [gl_cv_header_langinfo_codeset], [AC_COMPILE_IFELSE( @@ -34,6 +34,18 @@ int a = CODESET; if test $gl_cv_header_langinfo_codeset = yes; then HAVE_LANGINFO_CODESET=1 fi + AC_CACHE_CHECK([whether langinfo.h defines T_FMT_AMPM], + [gl_cv_header_langinfo_t_fmt_ampm], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[#include <langinfo.h> +int a = T_FMT_AMPM; +]])], + [gl_cv_header_langinfo_t_fmt_ampm=yes], + [gl_cv_header_langinfo_t_fmt_ampm=no]) + ]) + if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then + HAVE_LANGINFO_T_FMT_AMPM=1 + fi AC_CACHE_CHECK([whether langinfo.h defines ERA], [gl_cv_header_langinfo_era], [AC_COMPILE_IFELSE( @@ -46,12 +58,26 @@ int a = ERA; if test $gl_cv_header_langinfo_era = yes; then HAVE_LANGINFO_ERA=1 fi + AC_CACHE_CHECK([whether langinfo.h defines YESEXPR], + [gl_cv_header_langinfo_yesexpr], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[#include <langinfo.h> +int a = YESEXPR; +]])], + [gl_cv_header_langinfo_yesexpr=yes], + [gl_cv_header_langinfo_yesexpr=no]) + ]) + if test $gl_cv_header_langinfo_yesexpr = yes; then + HAVE_LANGINFO_YESEXPR=1 + fi else HAVE_LANGINFO_H=0 fi AC_SUBST([HAVE_LANGINFO_H]) AC_SUBST([HAVE_LANGINFO_CODESET]) + AC_SUBST([HAVE_LANGINFO_T_FMT_AMPM]) AC_SUBST([HAVE_LANGINFO_ERA]) + AC_SUBST([HAVE_LANGINFO_YESEXPR]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. |