From: Bruce Momjian Date: Thu, 10 Aug 2006 01:35:21 +0000 (+0000) Subject: Move "#define inline __inline" from port/win32.h to c.h because Win32 X-Git-Tag: REL8_2_BETA1~353 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3929b6e9f6ce33924760b4765095a185e8781201;p=postgresql 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 3aa958d7dc..7e7cce8dad 100644 --- a/src/include/c.h +++ b/src/include/c.h @@ -12,7 +12,7 @@ * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/c.h,v 1.209 2006/08/08 18:49:14 momjian Exp $ + * $PostgreSQL: pgsql/src/include/c.h,v 1.210 2006/08/10 01:35:21 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -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 e10e53f7dd..e50e965461 100644 --- a/src/include/port/win32.h +++ b/src/include/port/win32.h @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.56 2006/08/09 17:33:52 momjian Exp $ */ +/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.57 2006/08/10 01:35:21 momjian Exp $ */ /* undefine and redefine after #include */ #undef mkdir @@ -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