mirror of
https://github.com/postgres/postgres.git
synced 2025-09-03 15:22:11 +03:00
Add new macro as shorthand for MS VC and Borland C++:
+ #if defined(_MSC_VER) || defined(__BORLANDC__) + #define WIN32_CLIENT_ONLY + #endif
This commit is contained in:
@@ -6,16 +6,17 @@
|
||||
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/port.h,v 1.62 2004/09/27 20:37:20 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/include/port.h,v 1.63 2004/09/27 23:24:37 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#if !defined(_MSC_VER) && !defined(__BORLANDC__)
|
||||
#ifndef WIN32_CLIENT_ONLY
|
||||
/* for thread.c */
|
||||
#include <pwd.h>
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
/* non-blocking */
|
||||
@@ -169,7 +170,7 @@ extern int pgunlink(const char *path);
|
||||
extern int pgsymlink(const char *oldpath, const char *newpath);
|
||||
|
||||
/* Include this first so later includes don't see these defines */
|
||||
#ifdef _MSC_VER
|
||||
#ifdef WIN32_CLIENT_ONLY
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
@@ -183,7 +184,7 @@ extern bool rmtree(char *path, bool rmtopdir);
|
||||
#ifdef WIN32
|
||||
|
||||
/* open() replacement to allow delete of held files */
|
||||
#if !defined(_MSC_VER) && !defined(__BORLANDC__)
|
||||
#ifndef WIN32_CLIENT_ONLY
|
||||
extern int win32_open(const char *, int,...);
|
||||
|
||||
#define open(a,b,...) win32_open(a,b,##__VA_ARGS__)
|
||||
@@ -242,7 +243,7 @@ extern double rint(double x);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_INET_ATON
|
||||
#if !defined(_MSC_VER) && !defined(__BORLANDC__)
|
||||
#ifndef WIN32_CLIENT_ONLY
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user