#include <config.h>
-#if HAVE_USELOCALE && HAVE_NAMELESS_LOCALES
+#if HAVE_WORKING_USELOCALE && HAVE_NAMELESS_LOCALES
/* Specification. */
#include "localename-table.h"
/* Written by Bruno Haible <bruno@clisp.org>, 2018. */
-#if HAVE_USELOCALE && HAVE_NAMELESS_LOCALES
+#if HAVE_WORKING_USELOCALE && HAVE_NAMELESS_LOCALES
# include <stddef.h>
# include <locale.h>
/* Determine name of the currently selected locale.
- Copyright (C) 1995-2018 Free Software Foundation, Inc.
+ Copyright (C) 1995-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
#include "flexmember.h"
-#if HAVE_USELOCALE
+/* We cannot support uselocale() on platforms where the locale_t type is fake.
+ See intl-thread-locale.m4 for details. */
+#if HAVE_WORKING_USELOCALE && !HAVE_FAKE_LOCALES
+# define HAVE_GOOD_USELOCALE 1
+#endif
+
+#if HAVE_GOOD_USELOCALE
/* Mac OS X 10.5 defines the locale_t type in <xlocale.h>. */
# if defined __APPLE__ && defined __MACH__
# include <xlocale.h>
#endif
-#if HAVE_USELOCALE /* glibc, Mac OS X, Solaris 11 OpenIndiana, or Solaris >= 11.4 */
+#if HAVE_GOOD_USELOCALE /* glibc, Mac OS X, FreeBSD >= 9.1, Cygwin >= 2.6,
+ Solaris 11 OpenIndiana, or Solaris >= 11.4 */
/* Simple hash set of strings. We don't want to drag in lots of hash table
code here. */
#endif
-#if HAVE_USELOCALE && HAVE_NAMELESS_LOCALES
+#if HAVE_GOOD_USELOCALE && HAVE_NAMELESS_LOCALES
/* The 'locale_t' object does not contain the names of the locale categories.
We have to associate them with the object through a hash table.
#endif
-#if defined IN_LIBINTL || HAVE_USELOCALE
+#if defined IN_LIBINTL || HAVE_GOOD_USELOCALE
/* Like gl_locale_name_thread, except that the result is not in storage of
indefinite extent. */
const char *
gl_locale_name_thread_unsafe (int category, const char *categoryname)
{
-# if HAVE_USELOCALE
+# if HAVE_GOOD_USELOCALE
{
locale_t thread_locale = uselocale (NULL);
if (thread_locale != LC_GLOBAL_LOCALE)
const char *
gl_locale_name_thread (int category, const char *categoryname)
{
-#if HAVE_USELOCALE
+#if HAVE_GOOD_USELOCALE
const char *name = gl_locale_name_thread_unsafe (category, categoryname);
if (name != NULL)
return struniq (name);
/* Use the POSIX methods of looking to 'LC_ALL', 'LC_xxx', and 'LANG'.
On some systems this can be done by the 'setlocale' function itself. */
-#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL
+#if defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL
locname = setlocale (category, NULL);
#else
/* On other systems we ignore what setlocale reports and instead look at the
# pragma weak pth_rwlock_acquire
# pragma weak pth_rwlock_release
# pragma weak pth_once
+# pragma weak pth_cond_init
+# pragma weak pth_cond_await
+# pragma weak pth_cond_notify
# pragma weak pth_cancel
# define pth_in_use() (pth_cancel != NULL)
/* Compile-time assert-like macros.
- Copyright (C) 2005-2006, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
/* xsize.h -- Checked size_t computations.
- Copyright (C) 2003, 2008-2018 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2008-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
# fcntl-o.m4 serial 6
-dnl Copyright (C) 2006, 2009-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009-2019 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# serial 5
# Check for flexible array member support.
-# Copyright (C) 2006, 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2009-2019 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# glibc2.m4 serial 3
-dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2018 Free Software Foundation,
+dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2019 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
# glibc21.m4 serial 5
-dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2018 Free Software Foundation,
+dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2019 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
# iconv.m4 serial 21
-dnl Copyright (C) 2000-2002, 2007-2014, 2016-2018 Free Software Foundation,
+dnl Copyright (C) 2000-2002, 2007-2014, 2016-2019 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
# intdiv0.m4 serial 6 (gettext-0.18.2)
-dnl Copyright (C) 2002, 2007-2008, 2010-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2007-2008, 2010-2019 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# intlmacosx.m4 serial 6 (gettext-0.19.9)
-dnl Copyright (C) 2004-2014, 2016 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2014, 2016, 2019 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# intmax.m4 serial 6 (gettext-0.18.2)
-dnl Copyright (C) 2002-2005, 2008-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2005, 2008-2019 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# inttypes-pri.m4 serial 7 (gettext-0.18.2)
-dnl Copyright (C) 1997-2002, 2006, 2008-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2002, 2006, 2008-2019 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# inttypes_h.m4 serial 10
-dnl Copyright (C) 1997-2004, 2006, 2008-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2004, 2006, 2008-2019 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# nls.m4 serial 5 (gettext-0.18)
-dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016 Free Software
+dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016, 2019 Free Software
dnl Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
# printf-posix.m4 serial 6 (gettext-0.18.2)
-dnl Copyright (C) 2003, 2007, 2009-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007, 2009-2019 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# progtest.m4 serial 7 (gettext-0.18.2)
-dnl Copyright (C) 1996-2003, 2005, 2008-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 1996-2003, 2005, 2008-2019 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# size_max.m4 serial 11
-dnl Copyright (C) 2003, 2005-2006, 2008-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005-2006, 2008-2019 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# stdint_h.m4 serial 9
-dnl Copyright (C) 1997-2004, 2006, 2008-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2004, 2006, 2008-2019 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# uintmax_t.m4 serial 12
-dnl Copyright (C) 1997-2004, 2007-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2004, 2007-2019 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# visibility.m4 serial 6
-dnl Copyright (C) 2005, 2008, 2010-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2008, 2010-2019 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# xsize.m4 serial 5
-dnl Copyright (C) 2003-2004, 2008-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2004, 2008-2019 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.