c6ec65395c
Change-Id: Ie07ef2f9e9f6d0b31b513afa913b79d9c641e4f1
41 lines
1.6 KiB
Text
41 lines
1.6 KiB
Text
--- liblangtag/lt-macros.h
|
|
+++ liblangtag/lt-macros.h
|
|
@@ -120,7 +120,7 @@
|
|
*
|
|
* See the GNU C documentation for more details.
|
|
*/
|
|
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
|
|
+#if (defined __GNUC__ && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4))) || defined __clang__
|
|
# define LT_GNUC_PRINTF(format_idx, arg_idx) \
|
|
__attribute__((__format__ (__printf__, format_idx, arg_idx)))
|
|
# define LT_GNUC_UNUSED \
|
|
@@ -136,7 +136,7 @@
|
|
* explicit %NULL.
|
|
* See the GNU C documentation for details.
|
|
*/
|
|
-#if __GNUC__ >= 4
|
|
+#if (defined __GNUC__ &&__GNUC__ >= 4) || defined __clang__
|
|
# define LT_GNUC_NULL_TERMINATED \
|
|
__attribute__((__sentinel__))
|
|
#else /* !__GNUC__ */
|
|
@@ -220,17 +220,17 @@
|
|
*
|
|
* See the GNU C documentation for more details.
|
|
*/
|
|
-#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
|
|
+#if defined __GNUC__ && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
|
|
#define LT_GNUC_DEPRECATED __attribute__((__deprecated__))
|
|
#else
|
|
#define LT_GNUC_DEPRECATED
|
|
#endif
|
|
-#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
|
|
+#if defined __GNUC__ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5))
|
|
#define LT_GNUC_DEPRECATED_FOR(f) __attribute__((deprecated("Use " #f " instead")))
|
|
#else
|
|
#define LT_GNUC_DEPRECATED_FOR(f) LT_GNUC_DEPRECATED
|
|
#endif
|
|
-#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
|
|
+#if defined __GNUC__ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
|
|
#define LT_GNUC_BEGIN_IGNORE_DEPRECATIONS \
|
|
_Pragma ("GCC diagnostic push") \
|
|
_Pragma ("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
|