Re: [pcre-dev] 7.9-RC2 test release

Page principale
Supprimer ce message
Auteur: Sheri
Date:  
À: pcre-dev
Sujet: Re: [pcre-dev] 7.9-RC2 test release
Philip Hazel wrote:
> On Wed, 1 Apr 2009, Sheri wrote:
>
>
>> Built fine on Windows/Msys configured with cmake with the following
>> option set, but I did get one warning when building pcretest I can't
>> recall seeing with previous versions:
>> c:/pcre-7.9/pcre-7.9-RC2/pcretest.c:75:1: warning: "fileno" redefined
>> In file included from c:/pcre-7.9/pcre-7.9-RC2/pcretest.c:44:
>> c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/stdio.h:395:1:
>> warning: this is the location of the previous definition
>>
>
> Hmm. The code reads:
>
> #if defined(_WIN32) || defined(WIN32)
> #include <io.h>                /* For _setmode() */
> #include <fcntl.h>             /* For _O_BINARY */
> #define INPUT_MODE   "r"
> #define OUTPUT_MODE  "wb"

>
> #define isatty _isatty         /* This is what Windows calls them, I'm told */
> #define fileno _fileno

>
> My guess is that MinGW is defining it for itself when it wasn't before?
> Anyway, that coding has not changed in this release. I suppose it could
> be wrapped with #ifndef fileno. Could you try that, please?
>

Yes, worked (no more warning.)