]> granicus.if.org Git - python/commitdiff
Hide GCC attributes fom compilers that don't support them.
authorNeil Schemenauer <nascheme@enme.ucalgary.ca>
Tue, 23 Oct 2001 02:20:37 +0000 (02:20 +0000)
committerNeil Schemenauer <nascheme@enme.ucalgary.ca>
Tue, 23 Oct 2001 02:20:37 +0000 (02:20 +0000)
Include/pyport.h

index 5f8ccf7c132da8ab88bfc7da2ff9ab634b533afb..9c19e7a926f748225e7e62d038af11211c2c2e49 100644 (file)
@@ -446,4 +446,13 @@ typedef    struct fd_set {
 }
 #endif
 
+/*
+ * Hide GCC attributes from compilers that don't support them.
+ */
+#if !defined(__GNUC__) || __GNUC__ < 2 || \
+    (__GNUC__ == 2 && __GNUC_MINOR__ < 7) || \
+    defined(NEXT)
+#define __attribute__(__x)
+#endif
+
 #endif /* Py_PYPORT_H */