[ATTN] autoconf or GCC maintainers: wint_t no longer defined from GCC stddef.h

Brian Inglis Brian.Inglis@SystematicSW.ab.ca
Sun Nov 22 00:11:04 GMT 2026


On 2026-11-21 10:24, ASSI via Cygwin-apps wrote:
> Brian Inglis via Cygwin-apps writes:
>> Reran the diffutils build released last year, because we are dealing
>> with a lack of Large File Support on files > 4GB, and the build now
>> fails with upgraded config.guess, config.sub and compiler (see
>> attached log excerpts):

>> $ grep -iB5 -A1 wint_t diffutils-3.12-1-compile.log
>> autoreconf-2.73: configure.ac: not running make: --make not given
>> autoreconf-2.73: Leaving directory '.'
>> *** Info: config.guess: updated from '2025-07-10' to '2026-05-17'
>> *** Info: config.sub: updated from '2025-07-10' to '2026-05-17'
>> ...
>> checking for wint_t... yes
>> checking whether wint_t is large enough... yes
>> checking whether <wchar.h> uses 'inline' correctly... yes
>> -- 
>>   CC       libdiffutils_a-basename-lgpl.o
>> In file included from /usr/include/sys/reent.h:16,
>>                  from /usr/include/stdlib.h:18,
>>                  from ./stdlib.h:51,
>>                  from /usr/src/diffutils/diffutils-3.12-1.x86_64/src/diffutils-3.12/lib/allocator.c:21:
>> /usr/include/sys/_types.h:167:5: error: unknown type name 'wint_t'
>>   167 |     wint_t __wch;
>>       |     ^~~~~~
>> In file included from /usr/include/sys/reent.h:16,
>>                  from /usr/include/stdio.h:60,
>>                  from ./stdio.h:55,
>>                  from /usr/src/diffutils/diffutils-3.12-1.x86_64/src/diffutils-3.12/lib/argmatch.h:32,
>>                  from /usr/src/diffutils/diffutils-3.12-1.x86_64/src/diffutils-3.12/lib/argmatch.c:25:
>> /usr/include/sys/_types.h:167:5: error: unknown type name 'wint_t'
>>   167 |     wint_t __wch;
>>       |     ^~~~~~
>> In file included from /usr/include/sys/reent.h:16,
>>                  from /usr/include/sys/errno.h:11,
>>                  from /usr/include/errno.h:9,
>>                  from /usr/src/diffutils/diffutils-3.12-1.x86_64/src/diffutils-3.12/lib/openat-priv.h:23,
>>                  from /usr/src/diffutils/diffutils-3.12-1.x86_64/src/diffutils-3.12/lib/openat-proc.c:22:
>> /usr/include/sys/_types.h:167:5: error: unknown type name 'wint_t'
>>   167 |     wint_t __wch;
>>       |     ^~~~~~
>> 
>> The config still detects wint_t is supported, but compiles fail with wint_t 
>> undefined, as __need_wint_t or other features are undefined in the compiles,
>> but not in the config tests:
>> 
>> $ grep -iB4 wint_t /lib/gcc/x86_64-pc-cygwin/14/include/stddef.h
>> #if (!defined(_STDDEF_H) && !defined(_STDDEF_H_) && !defined(_ANSI_STDDEF_H) \
>>      && !defined(__STDDEF_H__)) \
>>     || defined(__need_wchar_t) || defined(__need_size_t) \
>>     || defined(__need_ptrdiff_t) || defined(__need_NULL) \
>>     || defined(__need_wint_t)
>> -- 
>>    wants us just to define one data type.  So don't define
>>    the symbols that indicate this file's entire job has been done.  */
>> #if (!defined(__need_wchar_t) && !defined(__need_size_t)    \
>>      && !defined(__need_ptrdiff_t) && !defined(__need_NULL)    \
>>      && !defined(__need_wint_t))
>> -- 
>> #endif /* __wchar_t__ */
>> #undef    __need_wchar_t
>> #endif /* _STDDEF_H or __need_wchar_t.  */
>> 
>> #if defined (__need_wint_t)
>> #ifndef _WINT_T
>> #define _WINT_T
>> 
>> #ifndef __WINT_TYPE__
>> #define __WINT_TYPE__ unsigned int
>> #endif
>> typedef __WINT_TYPE__ wint_t;
>> #endif
>> #undef __need_wint_t
[Context restored for forwarding]

> That is going to be fun… it's obviously some GNUlib thing going on and
> the last of my packages that shows this problem now is indeed from May
> (shortly before the GCC update) and rolling back automake and
> autoconf-archive doesn't fix it.  The likely reason is a rework of gcc
> stddef.h for C23 compliance, but I don't yet see how this intertwines
> with GNUlib.  The change that is supposed to suppress spurious warnings
> on some systems is already there…
> 
> OK, the normal search deteriorates by the day and is almost useless now,
> but the artificial idiot gave me a hint (but not the solution):
> 
> --8<---------------cut here---------------start------------->8---
> export gl_cv_clean_version_stddef=yes
> --8<---------------cut here---------------end--------------->8---
> 
> Until the upstream project has updated their files to be new enough to
> recognize it themselves, this makes things go swimmingly again.  Now I
> need to roll back the rollback on my machines…

Thanks Achim,

In my cases, I can just append to or add the old:

CYGCONF_ARGS+=" gl_cv_clean_version_stddef=yes"

Do you think it is likely to be handled elsewhere eventually?

If so, I will keep it separate for ease of eventual removal!

-- 
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retrancher  but when there is no more to cut
                                 -- Antoine de Saint-Exupéry


More information about the Cygwin-apps mailing list