X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilcutil%2Fsilctypes.h;fp=lib%2Fsilcutil%2Fsilctypes.h;h=f1f8ddb15fde504c74e7a6e60fa02e95607fe49b;hb=a71ca13285f67f081df53cf40a0170a723ebdec3;hp=7500b1fb22d71a403d09f99267f47ed58d3bfe2e;hpb=0fe36aefe123f64c81e3982153fa49094132c1be;p=silc.git diff --git a/lib/silcutil/silctypes.h b/lib/silcutil/silctypes.h index 7500b1fb..f1f8ddb1 100644 --- a/lib/silcutil/silctypes.h +++ b/lib/silcutil/silctypes.h @@ -4,7 +4,7 @@ Author: Pekka Riikonen - Copyright (C) 2002 - 2006 Pekka Riikonen + Copyright (C) 2002 - 2007 Pekka Riikonen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -31,6 +31,29 @@ #ifndef SILCTYPES_H #define SILCTYPES_H +/****d* silcutil/SILCTypes/SilcBool + * + * NAME + * + * typedef unigned char SilcBool; + * + * DESCRIPTION + * + * Boolean value, and is always 8-bits. Represents value 0 or 1. + * + ***/ +typedef unsigned char SilcBool; + +/* The bool macro is deprecated. Use SilcBool instead. */ +#ifdef SILC_MACOSX +#define bool _Bool +#endif +#ifndef __cplusplus +#ifndef bool +#define bool unsigned char +#endif +#endif + /****d* silcutil/SILCTypes/TRUE * * NAME @@ -65,48 +88,6 @@ #endif /***/ -/****d* silcutil/SILCTypes/SilcBool - * - * NAME - * - * typedef unigned char SilcBool; - * - * DESCRIPTION - * - * Boolean value, and is always 8-bits. Represents value 0 or 1. - * - ***/ -typedef unsigned char SilcBool; - -/****d* silcutil/SILCTypes/bool - * - * NAME - * - * #define SilcBool ... - * - * DESCRIPTION - * - * Boolean value, and is 8-bits. Represents value 0 or 1. In - * C++ code this type is defined by the C++, and this definition is - * not used. - * - * NOTES - * - * This macro is deprecated. Use SilcBool instead. - * - * SOURCE - */ -#ifdef SILC_MACOSX -#define bool _Bool -#endif - -#ifndef __cplusplus -#ifndef bool -#define bool unsigned char -#endif -#endif -/***/ - /* Our offsetof macro */ #define silc_offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)