comparison dw.h @ 1841:7677754a1ca5

Ok, slight changes to prevent missing stdint.h with Visual C prior to 2010.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 20 Nov 2012 05:09:30 +0000
parents 3343a61f3262
children 6ab13f213847
comparison
equal deleted inserted replaced
1840:3343a61f3262 1841:7677754a1ca5
5 5
6 /* Dynamic Windows version numbers */ 6 /* Dynamic Windows version numbers */
7 #define DW_MAJOR_VERSION 2 7 #define DW_MAJOR_VERSION 2
8 #define DW_MINOR_VERSION 4 8 #define DW_MINOR_VERSION 4
9 #define DW_SUB_VERSION 0 9 #define DW_SUB_VERSION 0
10
11 #include <stdint.h>
12 10
13 #if !defined(__PHOTON__) 11 #if !defined(__PHOTON__)
14 /* These corespond to the entries in the color 12 /* These corespond to the entries in the color
15 * arrays in the Win32 dw.c, they are also the 13 * arrays in the Win32 dw.c, they are also the
16 * same as DOS ANSI colors. 14 * same as DOS ANSI colors.
1391 /* Macro for casting resource IDs to HICN */ 1389 /* Macro for casting resource IDs to HICN */
1392 #define DW_RESOURCE(a) (a < 65536 ? (HICN)a : (HICN)0) 1390 #define DW_RESOURCE(a) (a < 65536 ? (HICN)a : (HICN)0)
1393 1391
1394 #include <limits.h> 1392 #include <limits.h>
1395 /* Macros for converting from INT/UINT to and from POINTER without compiler warnings */ 1393 /* Macros for converting from INT/UINT to and from POINTER without compiler warnings */
1396 #if _MSC_VER > 1200 || (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 30100 || defined(__has_extension) 1394 #if _MSC_VER > 1500 || (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 30100 || defined(__has_extension)
1395 #include <stdint.h>
1397 /* There has got to be a better way to check for the intptr_t type.... 1396 /* There has got to be a better way to check for the intptr_t type....
1398 * for now just include valid versions of Visual C and GCC plus clang. 1397 * for now just include valid versions of Visual C and GCC plus clang.
1399 */ 1398 */
1400 #define DW_INT_TO_POINTER(a) ((void *)(intptr_t)a) 1399 #define DW_INT_TO_POINTER(a) ((void *)(intptr_t)a)
1401 #define DW_POINTER_TO_INT(a) ((int)(intptr_t)a) 1400 #define DW_POINTER_TO_INT(a) ((int)(intptr_t)a)