*** empty log message ***
authorroot <root>
Tue, 20 Nov 2007 17:44:44 +0000 (17:44 +0000)
committerroot <root>
Tue, 20 Nov 2007 17:44:44 +0000 (17:44 +0000)
src/rxvtutil.h

index 7de27ebcf3c94513dd94937a1323ab19582c33ac..5ecbadb4fcb0041c9f6dc08ca06decfaa011e19d 100644 (file)
@@ -13,18 +13,15 @@ using namespace std;
 
 #define HAVE_GCC_BUILTINS (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ == 4))
 
-#ifndef __attribute__
-# if __GNUC__
-#  if (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || (__GNUC__ < 2)
-#   define __attribute__(x)
-#  endif
-# endif
-# define __attribute__(x)
+#if __GNUC__ >= 3
+# define rxvt_attribute(x) __attribute__(x)
+#else
+# define rxvt_attribute(x)
 #endif
 
-#define NORETURN __attribute__ ((noreturn))
-#define UNUSED   __attribute__ ((unused))
-#define CONST    __attribute__ ((const))
+#define NORETURN rxvt_attribute ((noreturn))
+#define UNUSED   rxvt_attribute ((unused))
+#define CONST    rxvt_attribute ((const))
 
 // increases code size unless -fno-enforce-eh-specs
 #if __GNUC__
@@ -69,8 +66,8 @@ T lerp (T a, U b, P p)
 
 // some bit functions, xft fuck me plenty
 #if HAVE_GCC_BUILTINS
-static inline int ctz      (unsigned int x) CONST { return __builtin_ctz      (x); }
-static inline int popcount (unsigned int x) CONST { return __builtin_popcount (x); }
+static inline int ctz      (unsigned int x) { return __builtin_ctz      (x); }
+static inline int popcount (unsigned int x) { return __builtin_popcount (x); }
 #else
 // count trailing zero bits and count # of one bits
 int ctz      (unsigned int x) CONST;