From: Bruce Momjian Date: Thu, 10 Aug 2006 01:35:28 +0000 (+0000) Subject: Move "#define inline __inline" from port/win32.h to c.h because Win32 X-Git-Url: http://waps.l3s.uni-hannover.de/gitweb/?a=commitdiff_plain;h=62a760df3623210d4fa95201a60f867a543d2db9;p=users%2Fbernd%2Fpostgres.git Move "#define inline __inline" from port/win32.h to c.h because Win32 interface builds like libpq need it. Backpatch addition to 8.1.X. --- diff --git a/src/include/c.h b/src/include/c.h index 55da238dc1..b3551c1819 100644 --- a/src/include/c.h +++ b/src/include/c.h @@ -744,6 +744,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 #endif diff --git a/src/include/port/win32.h b/src/include/port/win32.h index a121ee965c..b746defe0d 100644 --- a/src/include/port/win32.h +++ b/src/include/port/win32.h @@ -259,9 +259,6 @@ extern void _dosmaperr(unsigned long); typedef long ssize_t; typedef unsigned short mode_t; -#define inline __inline -#define __inline__ __inline - #undef errcode #define errcode __vc_errcode