comparison dw.h @ 1601:71e0a3ad07f7

Enable level 3 warnings in DEBUG mode with Visual C to show deprecation warnings. Source code cleanup to eliminate the warnings now generated on this level.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sun, 26 Feb 2012 09:21:35 +0000
parents cbfdd56e3e72
children 38da4aa23b7c
comparison
equal deleted inserted replaced
1600:cbfdd56e3e72 1601:71e0a3ad07f7
1436 #define __has_extension __has_feature 1436 #define __has_extension __has_feature
1437 #endif 1437 #endif
1438 1438
1439 /* Visual C */ 1439 /* Visual C */
1440 #if defined(_MSC_VER) 1440 #if defined(_MSC_VER)
1441 #define DW_DEPRECATED(func, message) __declspec(deprecated(message)) func 1441 # if _MSC_VER >= 1400
1442 # define DW_DEPRECATED(func, message) __declspec(deprecated(message)) func
1443 # endif
1442 /* Clang */ 1444 /* Clang */
1443 #elif defined(__has_extension) 1445 #elif defined(__has_extension)
1444 # if __has_extension(attribute_deprecated_with_message) 1446 # if __has_extension(attribute_deprecated_with_message)
1445 # define DW_DEPRECATED(func, message) func __attribute__ ((deprecated (message))) 1447 # define DW_DEPRECATED(func, message) func __attribute__ ((deprecated (message)))
1446 # else 1448 # else
1447 # define DW_DEPRECATED(func, message) func __attribute__ ((deprecated)) 1449 # define DW_DEPRECATED(func, message) func __attribute__ ((deprecated))
1448 # endif 1450 # endif
1449 /* GCC */ 1451 /* GCC */
1450 #elif defined(__GNUC__) 1452 #elif defined(__GNUC__)
1451 # if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40500 1453 # if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40500
1452 # define DW_DEPRECATED(func, message) func __attribute__ ((deprecated (message))) 1454 # define DW_DEPRECATED(func, message) func __attribute__ ((deprecated (message)))
1453 # else 1455 # else
1454 # define DW_DEPRECATED(func, message) func __attribute__ ((deprecated)) 1456 # define DW_DEPRECATED(func, message) func __attribute__ ((deprecated))
1455 # endif 1457 # endif
1456 #else 1458 #endif
1459
1457 /* Compiler without deprecation support */ 1460 /* Compiler without deprecation support */
1461 #ifndef DW_DEPRECATED
1458 #define DW_DEPRECATED(func, message) func 1462 #define DW_DEPRECATED(func, message) func
1459 #endif 1463 #endif
1460 1464
1461 /* Public function prototypes */ 1465 /* Public function prototypes */
1462 void API dw_box_pack_start(HWND box, HWND item, int width, int height, int hsize, int vsize, int pad); 1466 void API dw_box_pack_start(HWND box, HWND item, int width, int height, int hsize, int vsize, int pad);