aboutsummaryrefslogtreecommitdiff
path: root/src/include/c.h
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2006-06-07 22:24:46 +0000
committerBruce Momjian <bruce@momjian.us>2006-06-07 22:24:46 +0000
commit399a36a75d2d06bfdb91402713d408271b4833ba (patch)
treeb8391f6bda4680d37ac430c3270c67bde979d842 /src/include/c.h
parent877e296306a2017a18fc7086e9742c8ee3e0a665 (diff)
downloadpostgresql-399a36a75d2d06bfdb91402713d408271b4833ba.tar.gz
postgresql-399a36a75d2d06bfdb91402713d408271b4833ba.zip
Prepare code to be built by MSVC:
o remove many WIN32_CLIENT_ONLY defines o add WIN32_ONLY_COMPILER define o add 3rd argument to open() for portability o add include/port/win32_msvc directory for system includes Magnus Hagander
Diffstat (limited to 'src/include/c.h')
-rw-r--r--src/include/c.h26
1 files changed, 11 insertions, 15 deletions
diff --git a/src/include/c.h b/src/include/c.h
index 679981ea6cd..acf5738e4ae 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.202 2006/05/28 21:13:54 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/c.h,v 1.203 2006/06/07 22:24:45 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -52,17 +52,15 @@
#include "pg_config.h"
#include "pg_config_manual.h" /* must be after pg_config.h */
-#if !defined(WIN32) && !defined(__CYGWIN__)
+#if !defined(WIN32) && !defined(__CYGWIN__) /* win32 will include further down */
#include "pg_config_os.h" /* must be before any system header files */
-#else
-#if defined(_MSC_VER) || defined(__BORLANDC__)
-#define WIN32_CLIENT_ONLY
-/* Some use MinGW-generated pg_config.h but MSVC for extensions. */
-#undef HAVE_STRINGS_H
-#endif
#endif
#include "postgres_ext.h"
+#if defined(_MSC_VER) || defined(__BORLANDC__)
+#define WIN32_ONLY_COMPILER
+#endif
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -82,13 +80,11 @@
#endif
#if defined(WIN32) || defined(__CYGWIN__)
-#ifndef WIN32_CLIENT_ONLY
-/* We have to redefine some system functions after they are included above */
-#include "pg_config_os.h"
-#else
-#include "port/win32.h" /* We didn't run configure, but this is our
- * port file */
-#endif
+/* We have to redefine some system functions after they are included above.
+ *
+ * use port/win32.h directly to work on both mingw and non-mingw.
+ */
+#include "port/win32.h"
#endif
/* Must be before gettext() games below */