Skip to content

Commit 3929b6e

Browse files
committed
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.
1 parent a4f14fd commit 3929b6e

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

src/include/c.h

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
1313
* Portions Copyright (c) 1994, Regents of the University of California
1414
*
15-
* $PostgreSQL: pgsql/src/include/c.h,v 1.209 2006/08/08 18:49:14 momjian Exp $
15+
* $PostgreSQL: pgsql/src/include/c.h,v 1.210 2006/08/10 01:35:21 momjian Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -744,6 +744,17 @@ typedef NameData *Name;
744744
#define PG_BINARY_W "w"
745745
#endif
746746

747+
#ifdef MSVC
748+
/*
749+
* Certain "standard edition" versions of MSVC throw a warning
750+
* that later generates an error for "inline" statements, but
751+
* __inline seems to work. e.g. Microsoft Visual C++ .NET
752+
* Version 7.1.3088
753+
*/
754+
#define inline __inline
755+
#define __inline__ __inline
756+
#endif
757+
747758
#if defined(sun) && defined(__sparc__) && !defined(__SVR4)
748759
#include <unistd.h>
749760
#endif

src/include/port/win32.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.56 2006/08/09 17:33:52 momjian Exp $ */
1+
/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.57 2006/08/10 01:35:21 momjian Exp $ */
22

33
/* undefine and redefine after #include */
44
#undef mkdir
@@ -259,9 +259,6 @@ extern void _dosmaperr(unsigned long);
259259
typedef long ssize_t;
260260
typedef unsigned short mode_t;
261261

262-
#define inline __inline
263-
#define __inline__ __inline
264-
265262
#undef errcode
266263
#define errcode __vc_errcode
267264

0 commit comments

Comments
 (0)