diff mbox series

[2/3] Merge getopt patch from Gnulib

Message ID 20220822205834.563590-2-eggert@cs.ucla.edu
State New
Headers show
Series [1/3] Merge _GL_UNUSED C23 patch from Gnulib | expand

Commit Message

Paul Eggert Aug. 22, 2022, 8:58 p.m. UTC
* posix/getopt.c [!_LIBC]: Merge _WIN32 patch from Gnulib
so that these source files are identical.
This makes no difference for glibc.
---
 posix/getopt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Florian Weimer Aug. 23, 2022, 7:19 a.m. UTC | #1
* Paul Eggert:

> * posix/getopt.c [!_LIBC]: Merge _WIN32 patch from Gnulib
> so that these source files are identical.
> This makes no difference for glibc.
> ---
>  posix/getopt.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/posix/getopt.c b/posix/getopt.c
> index a160a4e3bd..128dc7fcf5 100644
> --- a/posix/getopt.c
> +++ b/posix/getopt.c
> @@ -45,7 +45,8 @@
>  # define _(msgid) gettext (msgid)
>  /* When used standalone, flockfile and funlockfile might not be
>     available.  */
> -# ifndef _POSIX_THREAD_SAFE_FUNCTIONS
> +# if (!defined _POSIX_THREAD_SAFE_FUNCTIONS \
> +      || (defined _WIN32 && ! defined __CYGWIN__))
>  #  define flockfile(fp) /* nop */
>  #  define funlockfile(fp) /* nop */
>  # endif

Okay.

Reviewed-by: Florian Weimer <fweimer@redhat.com>

Thanks,
Florian
diff mbox series

Patch

diff --git a/posix/getopt.c b/posix/getopt.c
index a160a4e3bd..128dc7fcf5 100644
--- a/posix/getopt.c
+++ b/posix/getopt.c
@@ -45,7 +45,8 @@ 
 # define _(msgid) gettext (msgid)
 /* When used standalone, flockfile and funlockfile might not be
    available.  */
-# ifndef _POSIX_THREAD_SAFE_FUNCTIONS
+# if (!defined _POSIX_THREAD_SAFE_FUNCTIONS \
+      || (defined _WIN32 && ! defined __CYGWIN__))
 #  define flockfile(fp) /* nop */
 #  define funlockfile(fp) /* nop */
 # endif