diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2018-02-09 19:55:16 -0600 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2018-02-10 03:08:31 +0000 |
commit | c92a7291387abc01e47ee1495558fd2c727a57bd (patch) | |
tree | b8d4ba956cf2177146b62ff0e3572bd5fcd2a8ab /main/m4/localename-test-fix.patch | |
parent | 80b1c4bc0b8a88ad34cc88a972deaad90ae659ce (diff) | |
download | aports-c92a7291387abc01e47ee1495558fd2c727a57bd.tar.bz2 aports-c92a7291387abc01e47ee1495558fd2c727a57bd.tar.xz |
main/m4: add test suite, fix license, modernise
Diffstat (limited to 'main/m4/localename-test-fix.patch')
-rw-r--r-- | main/m4/localename-test-fix.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/main/m4/localename-test-fix.patch b/main/m4/localename-test-fix.patch new file mode 100644 index 0000000000..04584aba66 --- /dev/null +++ b/main/m4/localename-test-fix.patch @@ -0,0 +1,34 @@ +--- m4-1.4.18/tests/localename.c.old 2016-12-31 13:54:43.000000000 +0000 ++++ m4-1.4.18/tests/localename.c 2017-07-30 16:40:47.098541270 +0000 +@@ -40,7 +40,7 @@ + # if defined __APPLE__ && defined __MACH__ + # include <xlocale.h> + # endif +-# if __GLIBC__ >= 2 && !defined __UCLIBC__ ++# if defined __linux__ + # include <langinfo.h> + # endif + # if !defined IN_LIBINTL +@@ -2692,16 +2692,19 @@ + locale_t thread_locale = uselocale (NULL); + if (thread_locale != LC_GLOBAL_LOCALE) + { +-# if __GLIBC__ >= 2 && !defined __UCLIBC__ ++# if defined(_NL_LOCALE_NAME) ++ const char *name = nl_langinfo(_NL_LOCALE_NAME(category)); ++# if __GLIBC__ >= 2 && !defined __UCLIBC__ + /* Work around an incorrect definition of the _NL_LOCALE_NAME macro in + glibc < 2.12. + See <http://sourceware.org/bugzilla/show_bug.cgi?id=10968>. */ +- const char *name = +- nl_langinfo (_NL_ITEM ((category), _NL_ITEM_INDEX (-1))); ++ if (name[0] == '\0') ++ name = nl_langinfo (_NL_ITEM ((category), _NL_ITEM_INDEX (-1))); + if (name[0] == '\0') + /* Fallback code for glibc < 2.4, which did not implement + nl_langinfo (_NL_LOCALE_NAME (category)). */ + name = thread_locale->__names[category]; ++# endif + return name; + # elif defined __FreeBSD__ || (defined __APPLE__ && defined __MACH__) + /* FreeBSD, Mac OS X */ |