From: Bruno Haible Date: Wed, 24 Jul 2024 00:02:45 +0000 (+0200) Subject: getopt-posix, getopt-gnu tests: Avoid test failure on mingw. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=82695cf2bf9b127043589abe0e8aed57288a7aa0;p=gnulib.git getopt-posix, getopt-gnu tests: Avoid test failure on mingw. * tests/test-getopt.h (test_getopt): Don't special-case mingw. --- diff --git a/ChangeLog b/ChangeLog index 13e01f2684..0c252e22d0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2024-07-23 Bruno Haible + + getopt-posix, getopt-gnu tests: Avoid test failure on mingw. + * tests/test-getopt.h (test_getopt): Don't special-case mingw. + 2024-07-23 Bruno Haible xstrtod, xstrtold: Add documentation. diff --git a/tests/test-getopt.h b/tests/test-getopt.h index f13b59596b..43d23ca1fa 100644 --- a/tests/test-getopt.h +++ b/tests/test-getopt.h @@ -85,8 +85,10 @@ test_getopt (void) bool posixly = !!getenv ("POSIXLY_CORRECT"); /* See comment in getopt.c: glibc gets a LSB-compliant getopt. - Standalone applications get a POSIX-compliant getopt. */ -#if defined __GETOPT_PREFIX || !(__GLIBC__ >= 2 || defined __MINGW32__) + Standalone applications get a POSIX-compliant getopt. + Note: The 'defined __GETOPT_PREFIX' condition is equivalent to + $REPLACE_GETOPT = 1 at configure time. */ +#if defined __GETOPT_PREFIX || !(__GLIBC__ >= 2) /* Using getopt from gnulib or from a non-glibc system. */ posixly = true; #endif