#ifndef _CRT_NON_CONFORMING_SWPRINTFS
#define _CRT_NON_CONFORMING_SWPRINTFS 1
#endif
+ #ifndef _SCL_SECURE_NO_WARNINGS
+ #define _SCL_SECURE_NO_WARNINGS 1
+ #endif
#endif /* VC++ 8 */
#endif /* __VISUALC__ */
#if defined(__VISUALC__) && (__VISUALC__ >= 1100)
/* VC++ 6.0 and 5.0 have std::wstring (what about earlier versions?) */
#define HAVE_STD_WSTRING
- #elif ( defined(__MINGW32__) || defined(__CYGWIN32__) ) \
- && wxCHECK_GCC_VERSION(3, 3)
+ #elif defined(__MINGW32__) && wxCHECK_GCC_VERSION(3, 3)
/* GCC 3.1 has std::wstring; 3.0 never was in MinGW, 2.95 hasn't it */
#define HAVE_STD_WSTRING
#endif
#ifndef HAVE_WOSTREAM
- // Mingw <= 3.4 and any version (so far) when targetting PalmOS don't have
- // std::wostream
+ // Mingw <= 3.4 and all versions of Cygwin as well as any gcc version (so
+ // far) targeting PalmOS don't have std::wostream
#if defined(__PALMOS__) || \
- (defined(__MINGW32__) && !wxCHECK_GCC_VERSION(4, 0))
+ (defined(__MINGW32__) && !wxCHECK_GCC_VERSION(4, 0)) || \
+ defined(__CYGWIN__)
#define wxNO_WOSTREAM
#endif
*/
#define wxDEPRECATED_INLINE(func, body) wxDEPRECATED(func) { body }
+/*
+ A macro to define a simple deprecated accessor.
+ */
+#define wxDEPRECATED_ACCESSOR(func, what) wxDEPRECATED_INLINE(func, return what;)
+
/*
Special variant of the macro above which should be used for the functions
which are deprecated but called by wx itself: this often happens with
wxDEPRECATED(func) { body }
#endif
-/* everybody gets the assert and other debug macros */
-#include "wx/debug.h"
-
/* NULL declaration: it must be defined as 0 for C++ programs (in particular, */
/* it must not be defined as "(void *)0" which is standard for C but completely */
/* breaks C++ code) */
#endif
#ifdef __cplusplus
+
+// everybody gets the assert and other debug macros
+#include "wx/debug.h"
+
// delete pointer if it is not NULL and NULL it afterwards
template <typename T>
inline void wxDELETE(T*& ptr)
/* integer on success as failure indicator */
#define wxNOT_FOUND (-1)
+/* the default value for some length parameters meaning that the string is */
+/* NUL-terminated */
+#define wxNO_LEN ((size_t)-1)
+
/* ---------------------------------------------------------------------------- */
/* macros dealing with comparison operators */
/* ---------------------------------------------------------------------------- */
#define WXUNUSED(identifier) identifier
#endif
-/* some arguments are only used in debug mode, but unused in release one */
-#ifdef __WXDEBUG__
- #define WXUNUSED_UNLESS_DEBUG(param) param
-#else
- #define WXUNUSED_UNLESS_DEBUG(param) WXUNUSED(param)
-#endif
-
/* some arguments are not used in unicode mode */
#if wxUSE_UNICODE
#define WXUNUSED_IN_UNICODE(param) WXUNUSED(param)
/* also define C99-like sized MIN/MAX constants */
#define wxINT8_MIN CHAR_MIN
#define wxINT8_MAX CHAR_MAX
+#define wxUINT8_MAX UCHAR_MAX
#define wxINT16_MIN SHRT_MIN
#define wxINT16_MAX SHRT_MAX
+#define wxUINT16_MAX USHRT_MAX
#if SIZEOF_INT == 4
#define wxINT32_MIN INT_MIN
#define wxINT32_MAX INT_MAX
+ #define wxUINT32_MAX UINT_MAX
#elif SIZEOF_LONG == 4
#define wxINT32_MIN LONG_MIN
#define wxINT32_MAX LONG_MAX
+ #define wxUINT32_MAX ULONG_MAX
#else
#error "Unknown 32 bit type"
#endif
typedef wxUint32 wxDword;
#ifdef LLONG_MAX
- #define wxINT64_MAX LLONG_MAX
#define wxINT64_MIN LLONG_MIN
+ #define wxINT64_MAX LLONG_MAX
+ #define wxUINT64_MAX ULLONG_MAX
#else
- #define wxINT64_MAX wxLL(9223372036854775807)
#define wxINT64_MIN (wxLL(-9223372036854775807)-1)
+ #define wxINT64_MAX wxLL(9223372036854775807)
+ #define wxUINT64_MAX wxULL(0xFFFFFFFFFFFFFFFF)
#endif
/* 64 bit */
#else
#error "error defining ssize_t, size_t is not 4 or 8 bytes"
#endif
+
+ /* prevent ssize_t redefinitions in other libraries */
+ #define HAVE_SSIZE_T
#endif
// we can't rely on Windows _W64 being defined as windows.h may not be included
#define wxTC_MULTILINE 0x0200 /* == wxNB_MULTILINE */
#define wxTC_OWNERDRAW 0x0400
-/*
- * wxStatusBar95 flags
- */
-#define wxST_SIZEGRIP 0x0010
-
/*
* wxStaticBitmap flags
*/
typedef WX_OPAQUE_TYPE(PicHandle ) * WXHMETAFILE ;
#if wxOSX_USE_CARBON
-typedef WX_OPAQUE_TYPE(ControlRef ) * WXWidget ;
-typedef WX_OPAQUE_TYPE(WindowRef) * WXWindow ;
+typedef struct OpaqueControlRef* WXWidget ;
+typedef struct OpaqueWindowPtr* WXWindow ;
typedef struct __AGLPixelFormatRec *WXGLPixelFormat;
typedef struct __AGLContextRec *WXGLContext;
#endif