aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2001-09-06 03:18:12 +0000
committerBruce Momjian <bruce@momjian.us>2001-09-06 03:18:12 +0000
commit0b71596fdddef4077f703fcf7407e7b56522ad0d (patch)
treeaf6f89a8776708d71c3a88349e2ab221f2de7415
parente9f546365f061af57b6367d29714316e9488f4c7 (diff)
downloadpostgresql-0b71596fdddef4077f703fcf7407e7b56522ad0d.tar.gz
postgresql-0b71596fdddef4077f703fcf7407e7b56522ad0d.zip
This fixes clashing defines of ERROR. On win32, winapi.h is included, which
includes windows.h, which #defines ERROR to 0. PostgreSQL's logging functions define ERROR to -1. This patch redefines ERROR to -1 to avoid current or future breakage of the logging functions. Gerhard H?ring
-rw-r--r--src/include/libpq/pqcomm.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/include/libpq/pqcomm.h b/src/include/libpq/pqcomm.h
index 48e304d9753..c7afe170e06 100644
--- a/src/include/libpq/pqcomm.h
+++ b/src/include/libpq/pqcomm.h
@@ -9,7 +9,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: pqcomm.h,v 1.58 2001/08/21 00:33:27 momjian Exp $
+ * $Id: pqcomm.h,v 1.59 2001/09/06 03:18:12 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -19,6 +19,11 @@
#include <sys/types.h>
#ifdef WIN32
#include <winsock.h>
+/* workaround for clashing defines of "ERROR" */
+#ifdef ELOG_H
+#undef ERROR
+#define ERROR (-1)
+#endif
#else /* not WIN32 */
#include <sys/socket.h>
#ifdef HAVE_SYS_UN_H