diff options
| author | Daiki Ueno <dueno@redhat.com> | 2018-05-28 13:33:32 +0200 |
|---|---|---|
| committer | Daiki Ueno <ueno@gnu.org> | 2018-05-28 16:01:34 +0200 |
| commit | 79f928492dba6a46c63e77d6b22c17c23e66403b (patch) | |
| tree | ffe8ac73b67d0d5cabc8607d76d829a5c54c5b82 /common/test-message.c | |
| parent | cd0a2de679a81829b7323bc5db46222b9eaab1d9 (diff) | |
build: Don't use locale funcs if locale_t is not defined in locale.h
On macOS, locale_t is not defined in <locale.h>. Although it is
defined in <xlocale.h>, we rather not use locales at all for POSIX
compliance.
Diffstat (limited to 'common/test-message.c')
| -rw-r--r-- | common/test-message.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/common/test-message.c b/common/test-message.c index 339ad4b..5f0fce4 100644 --- a/common/test-message.c +++ b/common/test-message.c @@ -44,7 +44,7 @@ #include <stdlib.h> #include <stdio.h> -#ifdef HAVE_LOCALE_H +#ifdef HAVE_STRERROR_L extern locale_t p11_message_locale; #endif @@ -54,7 +54,7 @@ test_with_err (void) const char *last; char *expected; -#ifdef HAVE_NEWLOCALE +#ifdef HAVE_STRERROR_L p11_message_locale = newlocale (LC_ALL_MASK, "POSIX", (locale_t) 0); #endif @@ -67,7 +67,7 @@ test_with_err (void) assert_str_eq (expected, last); free (expected); -#ifdef HAVE_NEWLOCALE +#ifdef HAVE_STRERROR_L freelocale (p11_message_locale); #endif } |
