From 63bd617deeb1e7a5b5317fef410df1f4aea030ac Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 25 Mar 2012 13:45:45 +0200 Subject: [PATCH] locale: Provide a complete 'struct lconv' on Solaris 10, 11. * m4/locale_h.m4 (gl_LOCALE_H): On Solaris, define _LCONV_C99. * doc/posix-headers/locale.texi: Update. --- ChangeLog | 4 ++++ doc/posix-headers/locale.texi | 4 ++-- m4/locale_h.m4 | 11 ++++++++++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4e0bca513c..28b21d6ab5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2012-03-25 Bruno Haible + locale: Provide a complete 'struct lconv' on Solaris 10, 11. + * m4/locale_h.m4 (gl_LOCALE_H): On Solaris, define _LCONV_C99. + * doc/posix-headers/locale.texi: Update. + locale: Provide a working 'struct lconv'. * lib/locale.in.h (lconv): Override if REPLACE_STRUCT_LCONV is 1. * m4/locale_h.m4 (gl_LOCALE_H): Set REPLACE_STRUCT_LCONV to 1 if diff --git a/doc/posix-headers/locale.texi b/doc/posix-headers/locale.texi index 9ea5826917..d8e8c82c5e 100644 --- a/doc/posix-headers/locale.texi +++ b/doc/posix-headers/locale.texi @@ -24,7 +24,7 @@ The @code{struct lconv} type does not contain the members @code{int_p_cs_precedes}, @code{int_p_sign_posn}, @code{int_p_sep_by_space}, @code{int_n_cs_precedes}, @code{int_n_sign_posn}, @code{int_n_sep_by_space} on some platforms: -glibc. +glibc, Solaris 11 2011-11. @item Some platforms provide a @code{NULL} macro that cannot be used in arbitrary @@ -39,5 +39,5 @@ The @code{struct lconv} type does not contain the members @code{int_p_cs_precedes}, @code{int_p_sign_posn}, @code{int_p_sep_by_space}, @code{int_n_cs_precedes}, @code{int_n_sign_posn}, @code{int_n_sep_by_space} on some platforms: -OpenBSD 4.9, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9. +OpenBSD 4.9, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin 1.5.x, mingw, MSVC 9. @end itemize diff --git a/m4/locale_h.m4 b/m4/locale_h.m4 index 66146d8bd0..3de8e4d63f 100644 --- a/m4/locale_h.m4 +++ b/m4/locale_h.m4 @@ -1,4 +1,4 @@ -# locale_h.m4 serial 15 +# locale_h.m4 serial 16 dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -17,6 +17,15 @@ AC_DEFUN([gl_LOCALE_H], dnl If is replaced, then must also be replaced. AC_REQUIRE([gl_STDDEF_H]) + dnl Solaris 11 2011-11 defines the int_p_*, int_n_* members of 'struct lconv' + dnl only if _LCONV_C99 is defined. + AC_REQUIRE([AC_CANONICAL_HOST]) + case "$host_os" in + solaris*) + AC_DEFINE([_LCONV_C99], [1], [Define to 1 on Solaris.]) + ;; + esac + AC_CACHE_CHECK([whether locale.h conforms to POSIX:2001], [gl_cv_header_locale_h_posix2001], [AC_COMPILE_IFELSE( -- 2.39.5