Use a consistent definition of bool

Since _Bool is only ever a keyword and not a macro, and we can't
test for HAVE_STDBOOL_H in the headers, remove the #ifdef for it in
<cdio/types.h> and instead, simply define it as 'int'.  Replace
inclusion of <stdbool.h> with <cdio/types.h> so that a consistent
definition of bool is used.

Signed-off-by: Natalia Portillo <claunia@claunia.com>
This commit is contained in:
Stuart Brady
2012-04-30 23:30:57 +01:00
committed by Natalia Portillo
parent 634bf0ad6b
commit 4fe14a678b
7 changed files with 15 additions and 42 deletions

View File

@@ -25,11 +25,8 @@
# include "config.h"
#endif
#ifdef HAVE_STDBOOL_H
# include <stdbool.h>
#endif
#include <cdio/sector.h>
#include <cdio/types.h>
#include "cdio_assert.h"
#include "cdio_private.h"

View File

@@ -24,13 +24,10 @@
# include "config.h"
#endif
#ifdef HAVE_STDBOOL_H
# include <stdbool.h>
#endif
#include <cdio/cdio.h>
#include <cdio/sector.h>
#include <cdio/util.h>
#include <cdio/types.h>
#include <cdio/mmc.h>
#include <cdio/logging.h>
#include "cdio_assert.h"

View File

@@ -20,10 +20,6 @@
# include "config.h"
#endif
#ifdef HAVE_STDBOOL_H
# include <stdbool.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
@@ -31,6 +27,7 @@
#include <cdio/logging.h>
#include <cdio/sector.h>
#include <cdio/util.h>
#include <cdio/types.h>
#include <cdio/mmc.h>
#include "cdio_assert.h"
#include "cdio_private.h"

View File

@@ -45,12 +45,9 @@
# include "config.h"
#endif
#ifdef HAVE_STDBOOL_H
# include <stdbool.h>
#endif
#include <cdio/sector.h>
#include <cdio/util.h>
#include <cdio/types.h>
#include "cdio_assert.h"
#include "cdio_private.h"

View File

@@ -24,13 +24,10 @@
# include "config.h"
#endif
#ifdef HAVE_STDBOOL_H
# include <stdbool.h>
#endif
#include <cdio/cdio.h>
#include <cdio/sector.h>
#include <cdio/util.h>
#include <cdio/types.h>
#include <cdio/mmc.h>
#include <cdio/logging.h>
#include "cdio_assert.h"

View File

@@ -32,13 +32,10 @@
# include "config.h"
#endif
#ifdef HAVE_STDBOOL_H
# include <stdbool.h>
#endif
#include <cdio/logging.h>
#include <cdio/sector.h>
#include <cdio/util.h>
#include <cdio/types.h>
/* For SCSI TR_* enumerations */
typedef enum {