better, more generic and backwards compatible, fix for TRUE/FALSE in C code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15156 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -174,12 +174,23 @@
|
||||
typedef unsigned int bool;
|
||||
#endif // bool
|
||||
|
||||
// define boolean constants: don't use true/false here as not all compilers
|
||||
// support them
|
||||
#undef TRUE
|
||||
#undef FALSE
|
||||
#define TRUE ((bool)1)
|
||||
#define FALSE ((bool)0)
|
||||
#ifdef __cplusplus
|
||||
// define boolean constants: don't use true/false here as not all compilers
|
||||
// support them
|
||||
#undef TRUE
|
||||
#undef FALSE
|
||||
#define TRUE ((bool)1)
|
||||
#define FALSE ((bool)0)
|
||||
#else // !__cplusplus
|
||||
// the definitions above don't work for C sources
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#endif
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE 0
|
||||
#endif
|
||||
#endif // C++/!C++
|
||||
|
||||
typedef short int WXTYPE;
|
||||
|
||||
|
@@ -60,12 +60,6 @@
|
||||
|
||||
#include <winsock.h>
|
||||
|
||||
/* don't use C++ TRUE/FALSE definition which we get from wx/defs.h */
|
||||
#undef TRUE
|
||||
#undef FALSE
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
|
||||
/* if we use configure for MSW SOCKLEN_T will be already defined */
|
||||
#ifndef SOCKLEN_T
|
||||
# define SOCKLEN_T int
|
||||
|
@@ -55,12 +55,6 @@
|
||||
|
||||
#include <winsock.h>
|
||||
|
||||
/* don't use C++ TRUE/FALSE definition which we get from wx/defs.h */
|
||||
#undef TRUE
|
||||
#undef FALSE
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(default:4115) /* named type definition in parentheses */
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user