Mercurial > dwindows
comparison dw.h @ 1599:d2864925afb9
Last commit didn't work with GCC... not quite as pretty but this works.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sat, 25 Feb 2012 23:22:49 +0000 |
parents | a2cd4b78048f |
children | cbfdd56e3e72 |
comparison
equal
deleted
inserted
replaced
1598:a2cd4b78048f | 1599:d2864925afb9 |
---|---|
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 #define DW_DEPRECATED(func, message) __declspec(deprecated(message)) func |
1442 /* Clang with message */ | 1442 /* Clang */ |
1443 #elif defined(__has_extension) && __has_extension(attribute_deprecated_with_message)) | 1443 #elif defined(__has_extension) |
1444 #define DW_DEPRECATED(func, message) func __attribute__ ((deprecated (message))) | 1444 # if __has_extension(attribute_deprecated_with_message) |
1445 /* GCC with message */ | 1445 # define DW_DEPRECATED(func, message) func __attribute__ ((deprecated (message))) |
1446 #elif defined(__GNUC__) && (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40500 | 1446 # else |
1447 #define DW_DEPRECATED(func, message) func __attribute__ ((deprecated (message))) | 1447 # define DW_DEPRECATED(func, message) func __attribute__ ((deprecated)) |
1448 /* Clang or GCC without message */ | 1448 # endif |
1449 #elif defined(__clang__) || defined(__GNUC__) | 1449 /* GCC */ |
1450 #define DW_DEPRECATED(func, message) func __attribute__ ((deprecated)) | 1450 #elif defined(__GNUC__) |
1451 # if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40500 | |
1452 # define DW_DEPRECATED(func, message) func __attribute__ ((deprecated (message))) | |
1453 # else | |
1454 # define DW_DEPRECATED(func, message) func __attribute__ ((deprecated)) | |
1455 # endif | |
1451 #else | 1456 #else |
1452 /* Compiler without deprecation support */ | 1457 /* Compiler without deprecation support */ |
1453 #define DW_DEPRECATED(func) func | 1458 #define DW_DEPRECATED(func) func |
1454 #endif | 1459 #endif |
1455 | 1460 |