bug-gnulib
[Top][All Lists]
Advanced

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

Re: Avoid gnulib redefinitions - MDA


From: Bruno Haible
Subject: Re: Avoid gnulib redefinitions - MDA
Date: Sun, 30 Oct 2022 00:09:50 +0200

Gavin Smith wrote:
> so it sounds like we are better off using #undef before
> including the Perl headers to avoid depending on undocumented
> functionalities.  Thanks.

Using #undef means to decline all corrections done by Gnulib.
These are documented in the manual. For example, for 'fdopen' [1]
we have documented

  Portability problems fixed by Gnulib:

    This function crashes when invoked with invalid arguments on
    some platforms: MSVC 14.
    On Windows platforms (excluding Cygwin), this function does not
    set errno upon failure. 

So, if you always use fdopen() with correct arguments and if, in
case of a NULL return of this function, the code does not look at
errno, then the '#undef fdopen' is OK. (On those platforms where
the Microsoft deprecated alias still work, or when it is overridden
by a redirect to some perl internal function.)

Bruno

[1] https://www.gnu.org/software/gnulib/manual/html_node/fdopen.html







reply via email to

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