Illumos defines __sun, but does not have getlocalename_l nor the
equivalent. This partially reverts commit
387c214.
* m4/localename.m4 (gl_LOCALENAME): Check if getlocalename_l is
available, as well as uselocale.
* lib/localename.c [HAVE_USELOCALE && __sun]: Don't fallback to
use getlocalename_l if it is not available.
+2015-07-07 Daiki Ueno <ueno@gnu.org>
+
+ localename: fix link error on Illumos
+ Illumos defines __sun, but does not have getlocalename_l nor the
+ equivalent. This partially reverts commit 387c214.
+ * m4/localename.m4 (gl_LOCALENAME): Check if getlocalename_l is
+ available, as well as uselocale.
+ * lib/localename.c [HAVE_USELOCALE && __sun]: Don't fallback to
+ use getlocalename_l if it is not available.
+
2015-07-07 Daiki Ueno <ueno@gnu.org>
unistr/uN-strtok-tests: avoid a trivial leak
# if !defined IN_LIBINTL
# include "glthread/lock.h"
# endif
-# if defined __sun
+# if defined __sun && HAVE_GETLOCALENAME_L
/* Solaris >= 12. */
extern char * getlocalename_l(int, locale_t);
# endif
return "";
}
return querylocale (mask, thread_locale);
-# elif defined __sun
+# elif defined __sun && HAVE_GETLOCALENAME_L
/* Solaris >= 12. */
return getlocalename_l (category, thread_locale);
# elif defined __ANDROID__
AC_REQUIRE([gt_LC_MESSAGES])
AC_REQUIRE([gt_INTL_MACOSX])
AC_CHECK_FUNCS([setlocale uselocale])
+ dnl Solaris 12 provides getlocalename_l, while Illumos doesn't have
+ dnl it nor the equivalent.
+ if test $ac_cv_func_uselocale = yes; then
+ AC_CHECK_FUNCS([getlocalename_l])
+ fi
])