diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | resolv/tst-resolv-ai_idn-latin1.c | 5 | ||||
-rw-r--r-- | resolv/tst-resolv-ai_idn.c | 5 |
3 files changed, 14 insertions, 0 deletions
@@ -1,5 +1,9 @@ 2019-08-22 Joseph Myers <joseph@codesourcery.com> + * resolv/tst-resolv-ai_idn-latin1.c (do_test): Mark test + unsupported with libidn2 before 2.0.5. + * resolv/tst-resolv-ai_idn.c (do_test): Likewise. + * manual/time.texi (strftime): Document %Ob and %OB as C2X features. diff --git a/resolv/tst-resolv-ai_idn-latin1.c b/resolv/tst-resolv-ai_idn-latin1.c index 4a6bf5623c..5c515958c2 100644 --- a/resolv/tst-resolv-ai_idn-latin1.c +++ b/resolv/tst-resolv-ai_idn-latin1.c @@ -29,6 +29,11 @@ do_test (void) void *handle = dlopen (LIBIDN2_SONAME, RTLD_LAZY); if (handle == NULL) FAIL_UNSUPPORTED ("libidn2 not installed"); + void *check_ver_sym = xdlsym (handle, "idn2_check_version"); + const char *check_res + = ((const char *(*) (const char *)) check_ver_sym) ("2.0.5"); + if (check_res == NULL) + FAIL_UNSUPPORTED ("libidn2 too old"); if (setlocale (LC_CTYPE, "en_US.ISO-8859-1") == NULL) FAIL_EXIT1 ("setlocale: %m"); diff --git a/resolv/tst-resolv-ai_idn.c b/resolv/tst-resolv-ai_idn.c index 493d1c7741..046842769a 100644 --- a/resolv/tst-resolv-ai_idn.c +++ b/resolv/tst-resolv-ai_idn.c @@ -28,6 +28,11 @@ do_test (void) void *handle = dlopen (LIBIDN2_SONAME, RTLD_LAZY); if (handle == NULL) FAIL_UNSUPPORTED ("libidn2 not installed"); + void *check_ver_sym = xdlsym (handle, "idn2_check_version"); + const char *check_res + = ((const char *(*) (const char *)) check_ver_sym) ("2.0.5"); + if (check_res == NULL) + FAIL_UNSUPPORTED ("libidn2 too old"); if (setlocale (LC_CTYPE, "en_US.UTF-8") == NULL) FAIL_EXIT1 ("setlocale: %m"); |