From 93c1810dab4de5004e4c4352343b474f26d7e223 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Wed, 24 Jul 2024 02:02:45 +0200 Subject: [PATCH] getopt-posix, getopt-gnu tests: Avoid test failure on mingw. * tests/test-getopt.h (test_getopt): Don't special-case mingw. --- ChangeLog | 5 +++++ tests/test-getopt.h | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) 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 -- 2.39.5