view tests/test-locale-c++.cc @ 39917:5f0e12c5ef27

localename: Add support for per-thread locales on Solaris 11.4. * lib/locale.in.h (newlocale, freelocale): New declarations. (duplocale): Declare also when the 'localename' module requests it. * lib/localename.c (struniq_hash_node): Renamed from hash_node. (STRUNIQ_HASH_TABLE_SIZE): Renamed from HASH_TABLE_SIZE. (struniq): Update. (struct locale_categories_names, struct locale_hash_node): New types. (LOCALE_HASH_TABLE_SIZE): New constant. (locale_hash_table, locale_lock): New variables. (pointer_hash, get_locale_t_name): New functions. (newlocale, duplocale, freelocale): New overridden functions. (gl_locale_name_thread_unsafe): Use get_locale_t_name. * m4/intlsolaris.m4: New file. * m4/localename.m4 (gl_LOCALENAME): Require gl_LOCALE_H_DEFAULTS. Invoke gt_INTL_SOLARIS. Set HAVE_NEWLOCALE, HAVE_DUPLOCALE, HAVE_FREELOCALE, REPLACE_NEWLOCALE, REPLACE_DUPLOCALE, REPLACE_FREELOCALE. * m4/locale_h.m4 (gl_LOCALE_H): Test whether newlocale, freelocale are declared. (gl_LOCALE_H_DEFAULTS): Initialize GNULIB_LOCALENAME, HAVE_NEWLOCALE, HAVE_FREELOCALE, REPLACE_NEWLOCALE, REPLACE_FREELOCALE. * modules/locale (Makefile.am): Substitute GNULIB_LOCALENAME, HAVE_NEWLOCALE, HAVE_FREELOCALE, REPLACE_NEWLOCALE, REPLACE_FREELOCALE. * modules/localename (Files): Add intlsolaris.m4. (Depends-on): Add 'locale'. (configure.ac): Invoke gl_LOCALE_MODULE_INDICATOR. * tests/test-locale-c++.cc (newlocale, freelocale): Prepare for checking the signatures.
author Bruno Haible <bruno@clisp.org>
date Sun, 14 Oct 2018 17:03:01 +0200
parents 10eb9086bea0
children 0e16812cd96d
line wrap: on
line source

/* Test of <locale.h> substitute in C++ mode.
   Copyright (C) 2010-2018 Free Software Foundation, Inc.

   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 3 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */

/* Written by Bruno Haible <bruno@clisp.org>, 2010.  */

#define GNULIB_NAMESPACE gnulib
#include <config.h>

#include <locale.h>

#include "signature.h"


#if GNULIB_TEST_LOCALECONV
SIGNATURE_CHECK (GNULIB_NAMESPACE::localeconv, struct lconv *, (void));
#endif

#if GNULIB_TEST_SETLOCALE
SIGNATURE_CHECK (GNULIB_NAMESPACE::setlocale, char *, (int, const char *));
#endif

#if 0
SIGNATURE_CHECK (GNULIB_NAMESPACE::newlocale, locale_t, (int const char *, locale_t));
#endif

#if GNULIB_TEST_DUPLOCALE && HAVE_DUPLOCALE
SIGNATURE_CHECK (GNULIB_NAMESPACE::duplocale, locale_t, (locale_t));
#endif

#if 0
SIGNATURE_CHECK (GNULIB_NAMESPACE::freelocale, void, (locale_t));
#endif


int
main ()
{
}