comparison dw.h @ 2171:6533fc42c951

Fix building on Windows 2000 and changes to avoid CRT warnings. Was using __has_extension() to check for clang, use __clang__ instead.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Mon, 05 Oct 2020 00:49:20 +0000
parents f98cecae5402
children c677d728e143
comparison
equal deleted inserted replaced
2170:d871f636b46e 2171:6533fc42c951
1547 /* Macro for casting resource IDs to HICN */ 1547 /* Macro for casting resource IDs to HICN */
1548 #define DW_RESOURCE(a) (a < 65536 ? (HICN)a : (HICN)0) 1548 #define DW_RESOURCE(a) (a < 65536 ? (HICN)a : (HICN)0)
1549 1549
1550 #include <limits.h> 1550 #include <limits.h>
1551 /* Macros for converting from INT/UINT to and from POINTER without compiler warnings */ 1551 /* Macros for converting from INT/UINT to and from POINTER without compiler warnings */
1552 #if _MSC_VER > 1500 || (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 30100 || defined(__has_extension) 1552 #if _MSC_VER > 1500 || __GNUC_PREREQ(3, 1) || defined(__clang__)
1553 #include <stdint.h> 1553 #include <stdint.h>
1554 /* There has got to be a better way to check for the intptr_t type.... 1554 /* There has got to be a better way to check for the intptr_t type....
1555 * for now just include valid versions of Visual C and GCC plus clang. 1555 * for now just include valid versions of Visual C and GCC plus clang.
1556 */ 1556 */
1557 #define DW_INT_TO_POINTER(a) ((void *)(intptr_t)a) 1557 #define DW_INT_TO_POINTER(a) ((void *)(intptr_t)a)