Move "#define inline __inline" from port/win32.h to c.h because Win32
authorBruce Momjian <[email protected]>
Thu, 10 Aug 2006 01:35:28 +0000 (01:35 +0000)
committerBruce Momjian <[email protected]>
Thu, 10 Aug 2006 01:35:28 +0000 (01:35 +0000)
interface builds like libpq need it.

Backpatch addition to 8.1.X.

src/include/c.h

index e95595fd6b72fd1b0233973e4b273e940948bc86..1768d7f92f4bdb3d357f6dce3442fec63b9dc171 100644 (file)
@@ -740,6 +740,17 @@ typedef NameData *Name;
 #define PG_BINARY_W "w"
 #endif
 
+#ifdef MSVC
+/*
+ *     Certain "standard edition" versions of MSVC throw a warning
+ *     that later generates an error for "inline" statements, but
+ *     __inline seems to work.  e.g.  Microsoft Visual C++ .NET
+ *     Version 7.1.3088
+ */
+#define inline __inline
+#define __inline__ __inline
+#endif
+
 #if defined(sun) && defined(__sparc__) && !defined(__SVR4)
 #include <unistd.h>
 #endif