]> git.saurik.com Git - wxWidgets.git/commitdiff
define C99-like wxINT8/16/32_MIN/MAX constants in addition to wxInt8/16/32 types
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 5 Apr 2007 14:58:58 +0000 (14:58 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 5 Apr 2007 14:58:58 +0000 (14:58 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45255 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/defs.h

index bdf2293a3452af779801ee8bb8c1586f3a1619ae..eff3612016b407c325fda624de7c9731ccc78d10 100644 (file)
@@ -739,7 +739,7 @@ typedef wxUint16 wxWord;
   |short      | 16    16    16    16    16 |
   |int        | 32    64    32    32    16 |
   |long       | 64    64    32    32    32 |
-  |long long  |             64             |
+  |long long  | 64    64    64    --    -- |
   |void *     | 64    64    64    32    32 |
   +-----------+----------------------------+
 
@@ -862,6 +862,23 @@ typedef wxUint16 wxWord;
     #endif
 #endif /*  Win/!Win */
 
+/* also define C99-like sized MIN/MAX constants */
+#define wxINT8_MIN CHAR_MIN
+#define wxINT8_MAX CHAR_MAX
+
+#define wxINT16_MIN SHRT_MIN
+#define wxINT16_MAX SHRT_MAX
+
+#if SIZEOF_INT == 4
+    #define wxINT32_MIN INT_MIN
+    #define wxINT32_MAX INT_MAX
+#elif SIZEOF_LONG == 4
+    #define wxINT32_MIN LONG_MIN
+    #define wxINT32_MAX LONG_MAX
+#else
+    #error "Unknown 32 bit type"
+#endif
+
 typedef wxUint32 wxDword;
 
 /*