Re: [pcre-dev] [PATCH] PCRE2 on Windows

Página Principal
Apagar esta mensagem
Autor: ph10
Data:  
Para: Daniel Richard G.
CC: pcre-dev
Assunto: Re: [pcre-dev] [PATCH] PCRE2 on Windows
On Wed, 20 Jun 2018, Daniel Richard G. wrote:

> Note that Autoconf is not setting the variables to zero when the headers
> are not found. On an old FreeBSD system here, for example, the generated
> pcre2.h contains
>
>     #define PCRE2_HAVE_STDINT_H   
>     #define PCRE2_HAVE_INTTYPES_H 1

>
> The first one will be assumed to be zero in preprocessor expressions,
> but not without producing a warning with -Wundef.


What's the best way to solve that? Does

#if defined(PCRE2_HAVE_STDINT_H) && PCRE2_HAVE_STDINT_H != 1

or

#if defined(PCRE2_HAVE_STDINT_H) && PCRE2_HAVE_STDINT_H

do any better? There must be some way to test for that without causing a
warning.

Philip

--
Philip Hazel