提交 c42d3b3c 编写于 作者: T Tom Lane

Windows portability macros SOCK_ERRNO and SOCK_STRERROR should be in

libpq-int.h, not cluttering application namespace in libpq-fe.h.
上级 9685afb0
此差异已折叠。
......@@ -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 */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册