Changed enum-type boolean to whta is defined in stdbool.h, and in practise replaced TRUEs and FALSEs with true, and false, respectively.

This commit is contained in:
vraatikka
2013-08-28 22:47:14 +03:00
parent ff109c6319
commit 34b26ad85f
4 changed files with 146 additions and 120 deletions

View File

@ -15,12 +15,12 @@
*
* Copyright SkySQL Ab 2013
*/
#include <math.h>
#if !defined(SKYGW_TYPES_H)
#define SKYGW_TYPES_H
#include <math.h>
#include <stdbool.h>
#define SECOND_USEC (1024*1024L)
#define MSEC_USEC (1024L)
@ -36,15 +36,4 @@
#define UINTLEN(i) (i<10 ? 1 : (i<100 ? 2 : (i<1000 ? 3 : CALCLEN(i))))
#if defined(__cplusplus) && !defined(TRUE) && !defined(FALSE)
# define TRUE true
# define FALSE false
#elif !defined(TRUE) && !defined(FALSE)
typedef enum {FALSE=0, TRUE} bool;
#else
# if !defined(bool)
# define bool int
# endif
#endif
#endif /* SKYGW_TYPES_H */