On quarta-feira, 15 de janeiro de 2014 19:54:41, Anton Lundin wrote:
>  #ifdef __cplusplus
>  extern "C" {
> -#else
> -#if __STDC_VERSION__ >= 199901L
> -#include <stdbool.h>
> -#ifndef TRUE
> -#define TRUE true
> -#endif
> -#ifndef FALSE
> -#define FALSE false
> -#endif
> -#else
> -typedef int bool;
> -#ifndef TRUE
> -#define TRUE 1
> -#endif
> -#ifndef FALSE
> -#define FALSE 0
> -#endif
> -#endif
>  #endif
> +#include <stdbool.h>

Strictly speaking, we shouldn't include stdbool.h in C++ code.

So this should be:

#ifdef __cplusplus
extern "C"
#else
#include <stdbool.h>
#endif

However, both GCC and Clang allow for it, so I don't see a problem.

MSVC 2012 doesn't have it, but 2013 does -- Microsoft finally added some C99 
features.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
subsurface mailing list
[email protected]
http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to