Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
> > Uh, I think we still do have reasons to test if we are using MSVC or
> > Borland C. I think the #define should just be moved up in c.h.
>
> Current evidence says otherwise --- but if you insist, why not put the
> define in win32.h in the first place, instead of cluttering c.h with it?
Well, we certainly need the define for the __inline macro, because was
reported as the bug.
I moved the define to win32.h as you suggested, attached, applied.
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Index: src/include/c.h
===================================================================
RCS file: /cvsroot/pgsql/src/include/c.h,v
retrieving revision 1.211
diff -c -c -r1.211 c.h
*** src/include/c.h 10 Aug 2006 01:41:29 -0000 1.211
--- src/include/c.h 3 Oct 2006 03:56:34 -0000
***************
*** 58,69 ****
#include "postgres_ext.h"
#include "pg_trace.h"
- #if defined(_MSC_VER) || defined(__BORLANDC__)
- #define WIN32_ONLY_COMPILER
#if defined(__BORLANDC__) || (_MSC_VER > 1400)
#include <crtdefs.h>
#endif
- #endif
#include <stdio.h>
#include <stdlib.h>
--- 58,66 ----
Index: src/include/port/win32.h
===================================================================
RCS file: /cvsroot/pgsql/src/include/port/win32.h,v
retrieving revision 1.59
diff -c -c -r1.59 win32.h
*** src/include/port/win32.h 16 Sep 2006 13:35:49 -0000 1.59
--- src/include/port/win32.h 3 Oct 2006 03:56:34 -0000
***************
*** 1,5 ****
--- 1,9 ----
/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.59 2006/09/16 13:35:49 tgl Exp $ */
+ #if defined(_MSC_VER) || defined(__BORLANDC__)
+ #define WIN32_ONLY_COMPILER
+ #endif
+
/* undefine and redefine after #include */
#undef mkdir