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

Inizio della pagina
Delete this message
Autore: Christian Ehrlicher
Data:  
To: pcre-dev
Oggetto: Re: [pcre-dev] 7.9-RC2 test release
Philip Hazel schrieb:
> 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?
>
>> I had entered a cmake build type of Release, which apparently adds these
>> C and C++ compiler flags: -O3 -DNDEBUG (which don't show up on the
>> listing and neither does the build type -- would be nice if it showed
>> the build type. I suppose it would have shown up if I had entered any
>> special compiler flags of my own.)
>
> I'm afraid I don't know enough about cmake to know if there is anything
> that can be done about that.
>

STRING(TOUPPER ${CMAKE_BUILD_TYPE} buildtype)
...
MESSAGE(STATUS " C compiler flags ................ : ${CMAKE_C_FLAGS}
${CMAKE_C_FLAGS_${buildtype}}")
MESSAGE(STATUS " C++ compiler flags .............. : ${CMAKE_CXX_FLAGS}
${CMAKE_CXX_FLAGS_${buildtype}}")

Should do the trick.

btw: all " in the config overview output should be moved behind the
variables like I did it for the two above.


HTH
Christian