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=93c1810dab4de5004e4c4352343b474f26d7e223;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 085ff3f952..9b50f55cda 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 strtod: Revisit underflow behaviour. 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