[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Overriding the MS-Windows wint_t type considered harmful
From: |
Bruno Haible |
Subject: |
Re: Overriding the MS-Windows wint_t type considered harmful |
Date: |
Sun, 30 Apr 2017 17:27:50 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-75-generic; KDE/5.18.0; x86_64; ; ) |
Hi Eli,
> One scenario where this gets in the way is when the application
> includes some other header, e.g. ctype.h, which declares the same isw*
> functions as wchar.h and wctype.h -- if the inclusion of ctype.h is
> _after_ wchar.h/wctype.h are included, this produces compilation
> errors, because the prototypes of the isw* functions were first seen
> with the original wint_t type, and now are seen with the wider wint_t.
We know how to fix such situations in gnulib. Thanks for the report.
> Another scenario is when wint_t variables are passed to functions that
> expect pointers to WCHAR data type used by the lower-level Win32 APIs
> (LPCWSTR etc.) -- with the overridden type, this causes compilation
> warnings or errors, and requires casts or intermediate variables.
Can you elaborate on these, please? WCHAR = wchar_t != win_t.
Bruno