bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH] build: avoid link failure on systems using gnulib's fcntl bu


From: Bruno Haible
Subject: Re: [PATCH] build: avoid link failure on systems using gnulib's fcntl but not open
Date: Sun, 28 Mar 2010 02:07:38 +0100
User-agent: KMail/1.9.9

> ... change the expansion of @GNULIB_OPEN@ in lib/fcntl.in.h
> so that it expands to
>   defined IN_GREP_GNULIB_TESTS
> instead of to 1

Actually I made it expand to
    IN_GREP_GNULIB_TESTS
not
    defined IN_GREP_GNULIB_TESTS
because I wanted to use the same expansion also for the GNULIB_OPEN C macro,
and preprocessor instructions like

   #define GNULIB_OPEN     defined IN_GREP_GNULIB_TESTS
   #if GNULIB_OPEN
   ...
   #endif

are not valid C. (I know no compiler which chokes on that, but that doesn't
change the fact that it has "undefined behavior" in ISO C99.)

Bruno




reply via email to

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