Don't interfere with a program's definition of __attribute__.
[gnulib.git] / lib / openat.h
index dd0bb01..9cf7e0f 100644 (file)
 #include <unistd.h>
 #include <stdbool.h>
 
-#ifndef __attribute__
-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8)
-#  define __attribute__(x) /* empty */
-# endif
-#endif
-
-#ifndef ATTRIBUTE_NORETURN
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8)
 # define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
+#else
+# define ATTRIBUTE_NORETURN /* empty */
 #endif
 
 #if !HAVE_OPENAT