Skip to content

Commit 25c161e

Browse files
committed
Move Win32 defines from port.h to win32.h.
1 parent acd907b commit 25c161e

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

src/include/port.h

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* $PostgreSQL: pgsql/src/include/port.h,v 1.44 2004/07/21 03:07:40 momjian Exp $
9+
* $PostgreSQL: pgsql/src/include/port.h,v 1.45 2004/07/23 01:58:36 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -246,13 +246,3 @@ extern int pqGethostbyname(const char *name,
246246
struct hostent **result,
247247
int *herrno);
248248

249-
/* FIXME: [win32] Placeholder win32 replacements, to allow continued development */
250-
#ifdef WIN32
251-
#define fsync(a) _commit(a)
252-
#define sync() _flushall()
253-
#define ftruncate(a,b) chsize(a,b)
254-
#define WEXITSTATUS(w) (((w) >> 8) & 0xff)
255-
#define WIFEXITED(w) (((w) & 0xff) == 0)
256-
#define WIFSIGNALED(w) (((w) & 0x7f) > 0 && (((w) & 0x7f) < 0x7f))
257-
#define WTERMSIG(w) ((w) & 0x7f)
258-
#endif

src/include/port/win32.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.26 2004/06/24 21:03:33 tgl Exp $ */
1+
/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.27 2004/07/23 01:58:36 momjian Exp $ */
22

33
/* undefine and redefine after #include */
44
#undef mkdir
@@ -13,6 +13,9 @@
1313
#define mkdir(a,b) mkdir(a)
1414

1515

16+
#define fsync(a) _commit(a)
17+
#define ftruncate(a,b) chsize(a,b)
18+
1619
#define USES_WINSOCK
1720

1821
/* defines for dynamic linking on Win32 platform */
@@ -145,6 +148,11 @@ extern int pgwin32_is_service(void);
145148
#endif
146149

147150

151+
#define WEXITSTATUS(w) (((w) >> 8) & 0xff)
152+
#define WIFEXITED(w) (((w) & 0xff) == 0)
153+
#define WIFSIGNALED(w) (((w) & 0x7f) > 0 && (((w) & 0x7f) < 0x7f))
154+
#define WTERMSIG(w) ((w) & 0x7f)
155+
148156
/* Some extra signals */
149157
#define SIGHUP 1
150158
#define SIGQUIT 3

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy