bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unknown type name 'wint_t' when targeting Cygwin


From: Bruno Haible
Subject: Re: Unknown type name 'wint_t' when targeting Cygwin
Date: Thu, 02 May 2024 00:23:10 +0200

Hi Markus,

> > Which Cygwin version, please?
> 
> The log of that run contains the following line:
> Starting cygwin install, version 2.932
> 
> Is that the Cygwin version?

It is not the Cygwin version, but it at least tells me that it's a recent
Cygwin version.

> All packages should be the latest stable versions that are distributed by the 
> Cygwin project.

OK. Then the Cygwin version is 3.5.3. I could reproduce the error.

The patch below fixes it for me. It reverts a workaround for gcc 14.0.1
from a few days ago, for which I'm adding a different workaround later.


2024-05-01  Bruno Haible  <bruno@clisp.org>

        stddef: Fix <stddef.h> behaviour on Cygwin (regression 2024-04-27).
        Reported by Markus Mützel <markus.muetzel@gmx.de> in
        <https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00522.html>.
        * lib/stddef.in.h: Don't test _@GUARD_PREFIX@_STDDEF_H. Fix comments.

diff --git a/lib/stddef.in.h b/lib/stddef.in.h
index fa249259cd..ac81257b5c 100644
--- a/lib/stddef.in.h
+++ b/lib/stddef.in.h
@@ -27,10 +27,9 @@
 #endif
 @PRAGMA_COLUMNS@
 
-#if (!defined _@GUARD_PREFIX@_STDDEF_H \
-     && (defined __need_wchar_t || defined __need_size_t \
-         || defined __need_ptrdiff_t || defined __need_NULL \
-         || defined __need_wint_t))
+#if (defined __need_wchar_t || defined __need_size_t \
+     || defined __need_ptrdiff_t || defined __need_NULL \
+     || defined __need_wint_t)
 /* Special invocation convention inside gcc header files.  In
    particular, <stddef.h> in some ancient versions of GCC blindly
    redefined NULL when __need_wint_t was defined, even though wint_t
@@ -38,7 +37,7 @@
    (FIXME: It's not clear what GCC versions those were - perhaps so
    ancient that we can stop worrying about this?)
    Although glibc 2.26 (2017) and later do not use __need_wint_t,
-   for portability to older Glibc + GCC,
+   for portability to macOS, Cygwin, Haiku, and older Glibc + GCC,
    remember if special invocation has ever been used to obtain wint_t,
    in which case we need to clean up NULL yet again.  */
 






reply via email to

[Prev in Thread] Current Thread [Next in Thread]