According to
http://msdn.microsoft.com/library/en-
us/vccore98/HTML/_crt_is.2c_.isw_routines.asp
wint_t is defined as unsigned short in MSVC. I suppose
MinGW should follow it, too.
Also notice that info there for WEOF is not quite
correct. It is really defined as (wint_t)(0xFFFF) in
MSVC. MinGW's current way of (wchar_t)(0xFFFF) is
compatible with it.
Patch for stddef.h
Logged In: YES
user_id=11494
__WINT_TYPE__ is a __builtin__
D:\Users\Danny>echo __WINT_TYPE__ | cpp
# 1 "<stdin>"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "<stdin>"
unsigned int
To change the __builtin__ type we need to rebuild GCC with
a two-line change to the source file
gcc/config/i386/mingw32.h to define WINT_TYPE as "unsigned
short".
I'm in the process of doing that as part of already
scheduled bootstrap of GCC from mainline CVS and then
running the testsuite. I don't expect any problems.
But, I doubt if I am going to anything with it until I have
a reason. Can you provide a testcase that shows that current
typedef causes problems?
Danny
Logged In: YES
user_id=11494
__WINT_TYPE__ is a __builtin__
D:\Users\Danny>echo __WINT_TYPE__ | cpp
# 1 "<stdin>"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "<stdin>"
unsigned int
To change the __builtin__ type we need to rebuild GCC with
a two-line change to the source file
gcc/config/i386/mingw32.h to define WINT_TYPE as "unsigned
short".
I'm in the process of doing that as part of already
scheduled bootstrap of GCC from mainline CVS and then
running the testsuite. I don't expect any problems.
But, I doubt if I am going to anything with it until I have
a reason. Can you provide a testcase that shows that current
typedef causes problems?
Danny
Logged In: YES
user_id=399758
I don't think __WINT_TYPE__ a built-in, since my patch do
have effects, at least for my gcc version 2.95.3-7 (mingw
experimental). Before patching stddef.h sizeof(wint_t) is
4, and now it is 2. Maybe because you are using GCC 3?
I had said that the problem "does not look very important".
Earnie said it should be a mistake. If it is a mistake, and
it is easy to correct, I find no reason that I should not
try to correct the problem.
Logged In: YES
user_id=11494
Fixed in GCC 3.1