bug-gnulib
[Top][All Lists]
Advanced

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

Re: Overriding the MS-Windows wint_t type considered harmful


From: Eli Zaretskii
Subject: Re: Overriding the MS-Windows wint_t type considered harmful
Date: Mon, 01 May 2017 14:01:16 +0300

> From: Bruno Haible <address@hidden>
> Cc: address@hidden
> Date: Mon, 01 May 2017 11:40:14 +0200
> 
> I can only see 3 issues, 2 of them we already discussed:
> 
>   1) The <wchar.h> problem, which you already reported in
>      https://lists.gnu.org/archive/html/bug-gnulib/2017-04/msg00166.html
>      - thank you for this report.
> 
>   2) The previous code was defining iswspace and iswupper functions.
>      Defining symbols with the same name as system function (at the linker
>      level) is dangerous practice on all non-ELF systems (Mac OS X,
>      AIX, Cygwin, Windows) anyway. And yes, this problem got worse
>      through Gnulib's type redefinition.
> 
>   3) The previous code assumed that a wint_t* is the same as a WCHAR*.
>      Not guaranteed by any standard nor Microsoft documentation.

You forget the issue with perl.h including ctype.h after wint_t was
already redefined.  This was reported here:

  http://lists.gnu.org/archive/html/bug-texinfo/2017-04/msg00055.html

Anyway, this means in 2 out of 3 issues you agree that the
redefinition causes trouble.  And the only argument for the
redefinition seems to be compliance to ISO C99, which at this point
sounds like a purely theoretical issue.

So I still think this redefinition does more harm than help, and
therefore Gnulib should not do that.

Thanks.



reply via email to

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