Modified:
trunk/myodbc3/myutil.h
Log:
Make sure __attribute__ is defined for non-gcc (and ancient gcc) compilers
Modified: trunk/myodbc3/myutil.h
===================================================================
--- trunk/myodbc3/myutil.h 2006-09-11 18:41:38 UTC (rev 88)
+++ trunk/myodbc3/myutil.h 2006-09-11 20:08:28 UTC (rev 89)
@@ -31,7 +31,20 @@
#ifndef __MYUTIL_H__
#define __MYUTIL_H__
+#ifdef __GNUC__
+# ifndef GCC_VERSION
+# define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
+# endif
+#endif
+
/*
+ Disable __attribute__() on GCC < 2.7 and non-GCC compilers.
+*/
+#if !defined(__attribute__) && (!defined(__GNUC__) || GCC_VERSION < 2007)
+#define __attribute__(A)
+#endif
+
+/*
Utility macros
*/
| Thread |
|---|
| • Connector/ODBC 3.51 commit: r89 - trunk/myodbc3 | jwinstead | 11 Sep |