1 # This patch fixes the core dump and locale issues previously seen in |
1 # This patch fixes a test failure in gnulib-tests/test-localename |
2 # the test-mbrtowc3.sh, test-mbrtowc4.sh and test-mbsrtowcs4.sh tests. |
|
3 # __getlocalename_l is an Oracle private interface. |
2 # __getlocalename_l is an Oracle private interface. |
4 # Do not send this patch upstream. |
3 # Do not send this patch upstream. |
5 |
4 |
6 diff -rup grep-2.20-orig/gnulib-tests/localename.c grep-2.20/gnulib-tests/localename.c |
5 --- grep-2.22-orig/gnulib-tests/localename.c 2015-10-24 13:07:13.000000000 -0700 |
7 --- grep-2.20-orig/gnulib-tests/localename.c 2014-01-01 17:36:42.000000000 -0800 |
6 +++ grep-2.22/gnulib-tests/localename.c 2016-01-19 17:18:20.049731748 -0800 |
8 +++ grep-2.20/gnulib-tests/localename.c 2015-05-28 14:48:57.639643024 -0700 |
7 @@ -2732,6 +2732,9 @@ gl_locale_name_thread_unsafe (int catego |
9 @@ -2644,6 +2644,9 @@ gl_locale_name_thread_unsafe (int catego |
8 # elif defined __sun && HAVE_GETLOCALENAME_L |
10 return ""; |
9 /* Solaris >= 12. */ |
11 } |
10 return getlocalename_l (category, thread_locale); |
12 return querylocale (mask, thread_locale); |
|
13 +# elif defined(sun) || defined(__sun) || defined(__sun__) |
11 +# elif defined(sun) || defined(__sun) || defined(__sun__) |
14 + extern char * __getlocalename_l(int, locale_t); |
12 + extern char * __getlocalename_l(int, locale_t); |
15 + return __getlocalename_l (category, thread_locale); |
13 + return __getlocalename_l (category, thread_locale); |
|
14 # elif defined __ANDROID__ |
|
15 return MB_CUR_MAX == 4 ? "C.UTF-8" : "C"; |
16 # endif |
16 # endif |
17 } |
|
18 } |
|