Header And Logo

PostgreSQL
| The world's most advanced open source database.

socket.h

Go to the documentation of this file.
00001 /*
00002  * src/include/port/win32/sys/socket.h
00003  */
00004 #ifndef WIN32_SYS_SOCKET_H
00005 #define WIN32_SYS_SOCKET_H
00006 
00007 /*
00008  * Unfortunately, <wingdi.h> of VC++ also defines ERROR.
00009  * To avoid the conflict, we include <windows.h> here and undefine ERROR
00010  * immediately.
00011  *
00012  * Note: Don't include <wingdi.h> directly.  It causes compile errors.
00013  */
00014 #include <winsock2.h>
00015 #include <ws2tcpip.h>
00016 #include <windows.h>
00017 
00018 #undef ERROR
00019 #undef small
00020 
00021 /* Restore old ERROR value */
00022 #ifdef PGERROR
00023 #define ERROR PGERROR
00024 #endif
00025 
00026 /*
00027  * we can't use the windows gai_strerror{AW} functions because
00028  * they are defined inline in the MS header files. So we'll use our
00029  * own
00030  */
00031 #undef gai_strerror
00032 
00033 #endif   /* WIN32_SYS_SOCKET_H */