Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0b71596

Browse files
committed
This fixes clashing defines of ERROR. On win32, winapi.h is included, which
includes windows.h, which #defines ERROR to 0. PostgreSQL's logging functionsdefine ERROR to -1. This patch redefines ERROR to -1 to avoid current orfuture breakage of the logging functions.Gerhard H?ring
1 parente9f5463 commit0b71596

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

‎src/include/libpq/pqcomm.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
1010
* Portions Copyright (c) 1994, Regents of the University of California
1111
*
12-
* $Id: pqcomm.h,v 1.58 2001/08/21 00:33:27 momjian Exp $
12+
* $Id: pqcomm.h,v 1.59 2001/09/06 03:18:12 momjian Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -19,6 +19,11 @@
1919
#include<sys/types.h>
2020
#ifdefWIN32
2121
#include<winsock.h>
22+
/* workaround for clashing defines of "ERROR" */
23+
#ifdefELOG_H
24+
#undef ERROR
25+
#defineERROR(-1)
26+
#endif
2227
#else/* not WIN32 */
2328
#include<sys/socket.h>
2429
#ifdefHAVE_SYS_UN_H

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp