~ubuntu-branches/ubuntu/oneiric/postgresql-9.1/oneiric-security

« back to all changes in this revision

Viewing changes to src/include/port/win32/sys/socket.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-05-11 10:41:53 UTC
  • Revision ID: james.westby@ubuntu.com-20110511104153-psbh2o58553fv1m0
Tags: upstream-9.1~beta1
ImportĀ upstreamĀ versionĀ 9.1~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * src/include/port/win32/sys/socket.h
 
3
 */
 
4
#ifndef WIN32_SYS_SOCKET_H
 
5
#define WIN32_SYS_SOCKET_H
 
6
 
 
7
/*
 
8
 * Unfortunately, <wingdi.h> of VC++ also defines ERROR.
 
9
 * To avoid the conflict, we include <windows.h> here and undefine ERROR
 
10
 * immediately.
 
11
 *
 
12
 * Note: Don't include <wingdi.h> directly.  It causes compile errors.
 
13
 */
 
14
#include <winsock2.h>
 
15
#include <ws2tcpip.h>
 
16
#include <windows.h>
 
17
 
 
18
#undef ERROR
 
19
#undef small
 
20
 
 
21
/* Restore old ERROR value */
 
22
#ifdef PGERROR
 
23
#define ERROR PGERROR
 
24
#endif
 
25
 
 
26
/*
 
27
 * we can't use the windows gai_strerror{AW} functions because
 
28
 * they are defined inline in the MS header files. So we'll use our
 
29
 * own
 
30
 */
 
31
#undef gai_strerror
 
32
 
 
33
#endif   /* WIN32_SYS_SOCKET_H */