1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-03 15:22:11 +03:00

Windows portability macros SOCK_ERRNO and SOCK_STRERROR should be in

libpq-int.h, not cluttering application namespace in libpq-fe.h.
This commit is contained in:
Tom Lane
2001-11-02 20:51:27 +00:00
parent 9685afb0b2
commit c42d3b3c24
2 changed files with 259 additions and 252 deletions

View File

@@ -12,7 +12,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: libpq-int.h,v 1.42 2001/10/28 06:26:12 momjian Exp $
* $Id: libpq-int.h,v 1.43 2001/11/02 20:51:27 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -353,4 +353,16 @@ __attribute__((format_arg(1)));
#define libpq_gettext(x) (x)
#endif
/*
* These macros are needed to let error-handling code be portable between
* Unix and Windows. (ugh)
*/
#ifdef WIN32
#define SOCK_ERRNO (WSAGetLastError())
#define SOCK_STRERROR winsock_strerror
#else
#define SOCK_ERRNO errno
#define SOCK_STRERROR strerror
#endif
#endif /* LIBPQ_INT_H */