PostgreSQL Source Code git master
Loading...
Searching...
No Matches
win32_port.h
Go to the documentation of this file.
1/*-------------------------------------------------------------------------
2 *
3 * win32_port.h
4 * Windows-specific compatibility stuff.
5 *
6 * Note this is read in MinGW as well as native Windows builds,
7 * but not in Cygwin builds.
8 *
9 * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group
10 * Portions Copyright (c) 1994, Regents of the University of California
11 *
12 * src/include/port/win32_port.h
13 *
14 *-------------------------------------------------------------------------
15 */
16#ifndef PG_WIN32_PORT_H
17#define PG_WIN32_PORT_H
18
19/*
20 * Always build with SSPI support. Keep it as a #define in case
21 * we want a switch to disable it sometime in the future.
22 */
23#define ENABLE_SSPI 1
24
25/* undefine and redefine after #include */
26#undef mkdir
27
28#undef ERROR
29
30/*
31 * VS2013 and later issue warnings about using the old Winsock API,
32 * which we don't really want to hear about.
33 */
34#ifdef _MSC_VER
35#define _WINSOCK_DEPRECATED_NO_WARNINGS
36#endif
37
38/*
39 * The MinGW64 headers choke if this is already defined - they
40 * define it themselves.
41 */
42#if !defined(__MINGW64_VERSION_MAJOR) || defined(_MSC_VER)
43#define _WINSOCKAPI_
44#endif
45
46/*
47 * windows.h includes a lot of other headers, slowing down compilation
48 * significantly. WIN32_LEAN_AND_MEAN reduces that a bit. It'd be better to
49 * remove the include of windows.h (as well as indirect inclusions of it) from
50 * such a central place, but until then...
51 *
52 * To be able to include ntstatus.h tell windows.h to not declare NTSTATUS by
53 * temporarily defining UMDF_USING_NTSTATUS, otherwise we'll get warning about
54 * macro redefinitions, as windows.h also defines NTSTATUS (yuck). That in
55 * turn requires including ntstatus.h, winternl.h to get common symbols.
56 */
57#define WIN32_LEAN_AND_MEAN
58#define UMDF_USING_NTSTATUS
59
60#include <winsock2.h>
61#include <ws2tcpip.h>
62#include <windows.h>
63#include <ntstatus.h>
64#include <winternl.h>
65
66#undef small
67#include <process.h>
68#include <signal.h>
69#include <direct.h>
70#undef near
71
72/* needed before sys/stat hacking below: */
73#define fstat microsoft_native_fstat
74#define stat microsoft_native_stat
75#include <sys/stat.h>
76#undef fstat
77#undef stat
78
79/* Must be here to avoid conflicting with prototype in windows.h */
80#define mkdir(a,b) mkdir(a)
81
82/* Windows doesn't have fsync() as such, use _commit() */
83#define fsync(fd) _commit(fd)
84
85#define USES_WINSOCK
86
87/*
88 * IPC defines
89 */
90#undef HAVE_UNION_SEMUN
91#define HAVE_UNION_SEMUN 1
92
93#define IPC_RMID 256
94#define IPC_CREAT 512
95#define IPC_EXCL 1024
96#define IPC_PRIVATE 234564
97#define IPC_NOWAIT 2048
98#define IPC_STAT 4096
99
100#define EACCESS 2048
101#ifndef EIDRM
102#define EIDRM 4096
103#endif
104
105#define SETALL 8192
106#define GETNCNT 16384
107#define GETVAL 65536
108#define SETVAL 131072
109#define GETPID 262144
110
111
112/*
113 * Signal stuff
114 *
115 * For WIN32, there is no wait() call so there are no wait() macros
116 * to interpret the return value of system(). Instead, system()
117 * return values < 0x100 are used for exit() termination, and higher
118 * values are used to indicate non-exit() termination, which is
119 * similar to a unix-style signal exit (think SIGSEGV ==
120 * STATUS_ACCESS_VIOLATION). Return values are broken up into groups:
121 *
122 * https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/using-ntstatus-values
123 *
124 * NT_SUCCESS 0 - 0x3FFFFFFF
125 * NT_INFORMATION 0x40000000 - 0x7FFFFFFF
126 * NT_WARNING 0x80000000 - 0xBFFFFFFF
127 * NT_ERROR 0xC0000000 - 0xFFFFFFFF
128 *
129 * Effectively, we don't care on the severity of the return value from
130 * system(), we just need to know if it was because of exit() or generated
131 * by the system, and it seems values >= 0x100 are system-generated.
132 * See this URL for a list of WIN32 STATUS_* values:
133 *
134 * Wine (URL used in our error messages) -
135 * http://source.winehq.org/source/include/ntstatus.h
136 * Descriptions -
137 * https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/596a1078-e883-4972-9bbc-49e60bebca55
138 *
139 * The comprehensive exception list is included in ntstatus.h from the
140 * Windows Driver Kit (WDK). A subset of the list is also included in
141 * winnt.h from the Windows SDK. Defining WIN32_NO_STATUS before including
142 * windows.h helps to avoid any conflicts.
143 *
144 * Some day we might want to print descriptions for the most common
145 * exceptions, rather than printing an include file name. We could use
146 * RtlNtStatusToDosError() and pass to FormatMessage(), which can print
147 * the text of error values, but MinGW does not support
148 * RtlNtStatusToDosError().
149 */
150#define WIFEXITED(w) (((w) & 0XFFFFFF00) == 0)
151#define WIFSIGNALED(w) (!WIFEXITED(w))
152#define WEXITSTATUS(w) (w)
153#define WTERMSIG(w) (w)
154
155#define sigmask(sig) ( 1 << ((sig)-1) )
156
157/* Some extra signals */
158#define SIGHUP 1
159#define SIGQUIT 3
160#define SIGTRAP 5
161#define SIGABRT 22 /* Set to match W32 value -- not UNIX value */
162#define SIGKILL 9
163#define SIGPIPE 13
164#define SIGALRM 14
165#define SIGSTOP 17
166#define SIGTSTP 18
167#define SIGCONT 19
168#define SIGCHLD 20
169#define SIGWINCH 28
170#define SIGUSR1 30
171#define SIGUSR2 31
172
173/* MinGW has gettimeofday(), but MSVC doesn't */
174#ifdef _MSC_VER
175/* Last parameter not used */
176extern int gettimeofday(struct timeval *tp, void *tzp);
177#endif
178
179/* for setitimer in backend/port/win32/timer.c */
180#define ITIMER_REAL 0
182{
185};
186
187int setitimer(int which, const struct itimerval *value, struct itimerval *ovalue);
188
189/* Convenience wrapper for GetFileType() */
191
192/*
193 * WIN32 does not provide 64-bit off_t, but does provide the functions operating
194 * with 64-bit offsets. Also, fseek() might not give an error for unseekable
195 * streams, so harden that function with our version.
196 */
198
199#ifdef _MSC_VER
200extern int _pgfseeko64(FILE *stream, pgoff_t offset, int origin);
201extern pgoff_t _pgftello64(FILE *stream);
202#define fseeko(stream, offset, origin) _pgfseeko64(stream, offset, origin)
203#define ftello(stream) _pgftello64(stream)
204#else
205#ifndef fseeko
206#define fseeko(stream, offset, origin) fseeko64(stream, offset, origin)
207#endif
208#ifndef ftello
209#define ftello(stream) ftello64(stream)
210#endif
211#endif
212
213/* Things that exist in MinGW headers, but need to be added to MSVC */
214#ifdef _MSC_VER
215
216#ifndef _WIN64
217typedef long ssize_t;
218#else
219typedef __int64 ssize_t;
220#endif
221
222typedef unsigned short mode_t;
223
224#define F_OK 0
225#define W_OK 2
226#define R_OK 4
227
228#endif /* _MSC_VER */
229
230/*
231 * Win32 also doesn't have symlinks, but we can emulate them with
232 * junction points on newer Win32 versions.
233 *
234 * Cygwin has its own symlinks which work on Win95/98/ME where
235 * junction points don't, so use those instead. We have no way of
236 * knowing what type of system Cygwin binaries will be run on.
237 * Note: Some CYGWIN includes might #define WIN32.
238 */
239extern int pgsymlink(const char *oldpath, const char *newpath);
240extern ssize_t pgreadlink(const char *path, char *buf, size_t size);
241
242#define symlink(oldpath, newpath) pgsymlink(oldpath, newpath)
243#define readlink(path, buf, size) pgreadlink(path, buf, size)
244
245/*
246 * Supplement to <sys/types.h>.
247 *
248 * Perl already has typedefs for uid_t and gid_t.
249 */
250#ifndef PLPERL_HAVE_UID_GID
251typedef int uid_t;
252typedef int gid_t;
253#endif
254typedef long key_t;
255
256#ifdef _MSC_VER
257typedef int pid_t;
258#endif
259
260/*
261 * Supplement to <sys/stat.h>.
262 *
263 * We must pull in sys/stat.h before this part, else our overrides lose.
264 *
265 * stat() is not guaranteed to set the st_size field on win32, so we
266 * redefine it to our own implementation. See src/port/win32stat.c.
267 *
268 * The struct stat is 32 bit in MSVC, so we redefine it as a copy of
269 * struct __stat64. This also fixes the struct size for MINGW builds.
270 */
285
286extern int _pgfstat64(int fileno, struct stat *buf);
287extern int _pgstat64(const char *name, struct stat *buf);
288extern int _pglstat64(const char *name, struct stat *buf);
289
290#define fstat(fileno, sb) _pgfstat64(fileno, sb)
291#define stat(path, sb) _pgstat64(path, sb)
292#define lstat(path, sb) _pglstat64(path, sb)
293
294/* These macros are not provided by older MinGW, nor by MSVC */
295#ifndef S_IRUSR
296#define S_IRUSR _S_IREAD
297#endif
298#ifndef S_IWUSR
299#define S_IWUSR _S_IWRITE
300#endif
301#ifndef S_IXUSR
302#define S_IXUSR _S_IEXEC
303#endif
304#ifndef S_IRWXU
305#define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR)
306#endif
307#ifndef S_IRGRP
308#define S_IRGRP 0
309#endif
310#ifndef S_IWGRP
311#define S_IWGRP 0
312#endif
313#ifndef S_IXGRP
314#define S_IXGRP 0
315#endif
316#ifndef S_IRWXG
317#define S_IRWXG 0
318#endif
319#ifndef S_IROTH
320#define S_IROTH 0
321#endif
322#ifndef S_IWOTH
323#define S_IWOTH 0
324#endif
325#ifndef S_IXOTH
326#define S_IXOTH 0
327#endif
328#ifndef S_IRWXO
329#define S_IRWXO 0
330#endif
331#ifndef S_ISDIR
332#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
333#endif
334#ifndef S_ISREG
335#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
336#endif
337
338/*
339 * In order for lstat() to be able to report junction points as symlinks, we
340 * need to hijack a bit in st_mode, since neither MSVC nor MinGW provides
341 * S_ISLNK and there aren't any spare bits. We'll steal the one for character
342 * devices, because we don't otherwise make use of those.
343 */
344#ifdef S_ISLNK
345#error "S_ISLNK is already defined"
346#endif
347#ifdef S_IFLNK
348#error "S_IFLNK is already defined"
349#endif
350#define S_IFLNK S_IFCHR
351#define S_ISLNK(m) (((m) & S_IFLNK) == S_IFLNK)
352
353/*
354 * Supplement to <fcntl.h>.
355 *
356 * We borrow bits from the high end when we have to, to avoid colliding with
357 * the system-defined values. Our open() replacement in src/port/open.c
358 * converts these to the equivalent CreateFile() flags, along with the ones
359 * from fcntl.h.
360 */
361#define O_CLOEXEC _O_NOINHERIT
362#define O_DIRECT 0x80000000
363#define O_DSYNC 0x04000000
364
365/*
366 * Supplement to <errno.h>.
367 *
368 * We redefine network-related Berkeley error symbols as the corresponding WSA
369 * constants. This allows strerror.c to recognize them as being in the Winsock
370 * error code range and pass them off to win32_socket_strerror(), since
371 * Windows' version of plain strerror() won't cope. Note that this will break
372 * if these names are used for anything else besides Windows Sockets errors.
373 * See TranslateSocketError() when changing this list.
374 */
375#undef EAGAIN
376#define EAGAIN WSAEWOULDBLOCK
377#undef EINTR
378#define EINTR WSAEINTR
379#undef EMSGSIZE
380#define EMSGSIZE WSAEMSGSIZE
381#undef EAFNOSUPPORT
382#define EAFNOSUPPORT WSAEAFNOSUPPORT
383#undef EWOULDBLOCK
384#define EWOULDBLOCK WSAEWOULDBLOCK
385#undef ECONNABORTED
386#define ECONNABORTED WSAECONNABORTED
387#undef ECONNRESET
388#define ECONNRESET WSAECONNRESET
389#undef EINPROGRESS
390#define EINPROGRESS WSAEINPROGRESS
391#undef EISCONN
392#define EISCONN WSAEISCONN
393#undef ENOBUFS
394#define ENOBUFS WSAENOBUFS
395#undef EPROTONOSUPPORT
396#define EPROTONOSUPPORT WSAEPROTONOSUPPORT
397#undef ECONNREFUSED
398#define ECONNREFUSED WSAECONNREFUSED
399#undef ENOTSOCK
400#define ENOTSOCK WSAENOTSOCK
401#undef EOPNOTSUPP
402#define EOPNOTSUPP WSAEOPNOTSUPP
403#undef EADDRINUSE
404#define EADDRINUSE WSAEADDRINUSE
405#undef EADDRNOTAVAIL
406#define EADDRNOTAVAIL WSAEADDRNOTAVAIL
407#undef EHOSTDOWN
408#define EHOSTDOWN WSAEHOSTDOWN
409#undef EHOSTUNREACH
410#define EHOSTUNREACH WSAEHOSTUNREACH
411#undef ENETDOWN
412#define ENETDOWN WSAENETDOWN
413#undef ENETRESET
414#define ENETRESET WSAENETRESET
415#undef ENETUNREACH
416#define ENETUNREACH WSAENETUNREACH
417#undef ENOTCONN
418#define ENOTCONN WSAENOTCONN
419#undef ETIMEDOUT
420#define ETIMEDOUT WSAETIMEDOUT
421
422/*
423 * Supplement to <string.h>.
424 */
425#define strtok_r strtok_s
426
427/*
428 * Supplement to <time.h>.
429 */
430#ifdef _MSC_VER
431/*
432 * MinGW has these functions if _POSIX_C_SOURCE is defined. Third-party
433 * libraries might do that, so to avoid clashes we get ahead of it and define
434 * it ourselves and use the system functions provided by MinGW.
435 */
436#define gmtime_r(clock, result) (gmtime_s(result, clock) ? NULL : (result))
437#define localtime_r(clock, result) (localtime_s(result, clock) ? NULL : (result))
438#endif
439
440/*
441 * Locale stuff.
442 *
443 * Extended locale functions with gratuitous underscore prefixes.
444 * (These APIs are nevertheless fully documented by Microsoft.)
445 */
446#define locale_t _locale_t
447#define tolower_l _tolower_l
448#define toupper_l _toupper_l
449#define towlower_l _towlower_l
450#define towupper_l _towupper_l
451#define isdigit_l _isdigit_l
452#define iswdigit_l _iswdigit_l
453#define isalpha_l _isalpha_l
454#define iswalpha_l _iswalpha_l
455#define isalnum_l _isalnum_l
456#define iswalnum_l _iswalnum_l
457#define isupper_l _isupper_l
458#define iswupper_l _iswupper_l
459#define islower_l _islower_l
460#define iswlower_l _iswlower_l
461#define isgraph_l _isgraph_l
462#define iswgraph_l _iswgraph_l
463#define isprint_l _isprint_l
464#define iswprint_l _iswprint_l
465#define ispunct_l _ispunct_l
466#define iswpunct_l _iswpunct_l
467#define isspace_l _isspace_l
468#define iswspace_l _iswspace_l
469#define strcoll_l _strcoll_l
470#define strxfrm_l _strxfrm_l
471#define wcscoll_l _wcscoll_l
472
473/*
474 * Versions of libintl >= 0.18? try to replace setlocale() with a macro
475 * to their own versions. Remove the macro, if it exists, because it
476 * ends up calling the wrong version when the backend and libintl use
477 * different versions of msvcrt.
478 */
479#if defined(setlocale)
480#undef setlocale
481#endif
482
483/*
484 * Define our own wrapper macro around setlocale() to work around bugs in
485 * Windows' native setlocale() function.
486 */
487extern char *pgwin32_setlocale(int category, const char *locale);
488
489#define setlocale(a,b) pgwin32_setlocale(a,b)
490
491
492/* In backend/port/win32/signal.c */
493extern PGDLLIMPORT volatile int pg_signal_queue;
494extern PGDLLIMPORT int pg_signal_mask;
497
498#define UNBLOCKED_SIGNAL_QUEUE() (pg_signal_queue & ~pg_signal_mask)
499#define PG_SIGNAL_COUNT 32
500
501extern void pgwin32_signal_initialize(void);
503extern void pgwin32_dispatch_queued_signals(void);
504extern void pg_queue_signal(int signum);
505
506/* In src/port/kill.c */
507#define kill(pid,sig) pgkill(pid,sig)
508extern int pgkill(int pid, int sig);
509
510/* In backend/port/win32/socket.c */
511#ifndef FRONTEND
512#define socket(af, type, protocol) pgwin32_socket(af, type, protocol)
513#define bind(s, addr, addrlen) pgwin32_bind(s, addr, addrlen)
514#define listen(s, backlog) pgwin32_listen(s, backlog)
515#define accept(s, addr, addrlen) pgwin32_accept(s, addr, addrlen)
516#define connect(s, name, namelen) pgwin32_connect(s, name, namelen)
517#define select(n, r, w, e, timeout) pgwin32_select(n, r, w, e, timeout)
518#define recv(s, buf, len, flags) pgwin32_recv(s, buf, len, flags)
519#define send(s, buf, len, flags) pgwin32_send(s, buf, len, flags)
520
521extern SOCKET pgwin32_socket(int af, int type, int protocol);
522extern int pgwin32_bind(SOCKET s, struct sockaddr *addr, int addrlen);
523extern int pgwin32_listen(SOCKET s, int backlog);
524extern SOCKET pgwin32_accept(SOCKET s, struct sockaddr *addr, int *addrlen);
525extern int pgwin32_connect(SOCKET s, const struct sockaddr *addr, int addrlen);
526extern int pgwin32_select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, const struct timeval *timeout);
527extern int pgwin32_recv(SOCKET s, char *buf, int len, int flags);
528extern int pgwin32_send(SOCKET s, const void *buf, int len, int flags);
529extern int pgwin32_waitforsinglesocket(SOCKET s, int what, int timeout);
530
532
533#endif /* FRONTEND */
534
535/* in backend/port/win32_shmem.c */
537
538/* in backend/port/win32/crashdump.c */
539extern void pgwin32_install_crashdump_handler(void);
540
541/* in port/win32dlopen.c */
542extern void *dlopen(const char *file, int mode);
543extern void *dlsym(void *handle, const char *symbol);
544extern int dlclose(void *handle);
545extern char *dlerror(void);
546
547#define RTLD_NOW 1
548#define RTLD_GLOBAL 0
549
550/* in port/win32error.c */
551extern void _dosmaperr(unsigned long);
552
553/* in port/win32env.c */
554extern int pgwin32_putenv(const char *);
555extern int pgwin32_setenv(const char *name, const char *value, int overwrite);
556extern int pgwin32_unsetenv(const char *name);
557
558#define putenv(x) pgwin32_putenv(x)
559#define setenv(x,y,z) pgwin32_setenv(x,y,z)
560#define unsetenv(x) pgwin32_unsetenv(x)
561
562/* in port/win32security.c */
563extern int pgwin32_is_service(void);
564extern int pgwin32_is_admin(void);
565
566/* Windows security token manipulation (in src/common/exec.c) */
568
569#if defined(__MINGW32__) || defined(__MINGW64__)
570/*
571 * Mingw claims to have a strtof, and my reading of its source code suggests
572 * that it ought to work (and not need this hack), but the regression test
573 * results disagree with me; whether this is a version issue or not is not
574 * clear. However, using our wrapper (and the misrounded-input variant file,
575 * already required for supporting ancient systems) can't make things any
576 * worse, except for a tiny performance loss when reading zeros.
577 *
578 * See also cygwin.h for another instance of this.
579 */
580#define HAVE_BUGGY_STRTOF 1
581#endif
582
583/* in port/win32pread.c */
584extern ssize_t pg_pread(int fd, void *buf, size_t size, pgoff_t offset);
585
586/* in port/win32pwrite.c */
587extern ssize_t pg_pwrite(int fd, const void *buf, size_t size, pgoff_t offset);
588
589#endif /* PG_WIN32_PORT_H */
unsigned char symbol
Definition api.h:4
#define PGDLLIMPORT
Definition c.h:1478
static struct @175 value
static PgChecksumMode mode
const void size_t len
static int sig
Definition pg_ctl.c:81
static char buf[DEFAULT_XLOG_SEG_SIZE]
#define pg_pwrite
Definition port.h:249
#define pg_pread
Definition port.h:248
off_t pgoff_t
Definition port.h:422
static int fd(const char *x, int i)
static int fb(int x)
struct timeval it_value
Definition win32_port.h:184
struct timeval it_interval
Definition win32_port.h:183
__time64_t st_mtime
Definition win32_port.h:282
__int64 st_size
Definition win32_port.h:280
short st_gid
Definition win32_port.h:278
unsigned short st_mode
Definition win32_port.h:275
_dev_t st_dev
Definition win32_port.h:273
short st_uid
Definition win32_port.h:277
_ino_t st_ino
Definition win32_port.h:274
_dev_t st_rdev
Definition win32_port.h:279
__time64_t st_atime
Definition win32_port.h:281
__time64_t st_ctime
Definition win32_port.h:283
short st_nlink
Definition win32_port.h:276
static void overwrite(PGconn *conn, Oid lobjId, int start, int len)
Definition testlo.c:108
const char * type
const char * name
HANDLE pgwin32_create_signal_listener(pid_t pid)
Definition signal.c:231
void * dlopen(const char *file, int mode)
Definition win32dlopen.c:76
int pgwin32_select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, const struct timeval *timeout)
Definition socket.c:517
void pg_queue_signal(int signum)
Definition signal.c:263
char * dlerror(void)
Definition win32dlopen.c:40
int pgwin32_send(SOCKET s, const void *buf, int len, int flags)
Definition socket.c:459
PGDLLIMPORT int pgwin32_noblock
Definition socket.c:28
int pgwin32_connect(SOCKET s, const struct sockaddr *addr, int addrlen)
Definition socket.c:359
int pgwin32_waitforsinglesocket(SOCKET s, int what, int timeout)
Definition socket.c:181
SOCKET pgwin32_socket(int af, int type, int protocol)
Definition socket.c:291
int _pgfstat64(int fileno, struct stat *buf)
Definition win32stat.c:260
void * dlsym(void *handle, const char *symbol)
Definition win32dlopen.c:61
int pgwin32_recv(SOCKET s, char *buf, int len, int flags)
Definition socket.c:382
void pgwin32_dispatch_queued_signals(void)
Definition signal.c:120
void pgwin32_install_crashdump_handler(void)
Definition crashdump.c:164
BOOL AddUserToTokenDacl(HANDLE hToken)
ssize_t pgreadlink(const char *path, char *buf, size_t size)
int _pgstat64(const char *name, struct stat *buf)
Definition win32stat.c:203
int pgwin32_unsetenv(const char *name)
Definition win32env.c:150
SOCKET pgwin32_accept(SOCKET s, struct sockaddr *addr, int *addrlen)
Definition socket.c:337
PGDLLIMPORT volatile int pg_signal_queue
Definition signal.c:24
int gid_t
Definition win32_port.h:252
void _dosmaperr(unsigned long)
Definition win32error.c:177
DWORD pgwin32_get_file_type(HANDLE hFile)
Definition win32common.c:31
PGDLLIMPORT HANDLE pgwin32_initial_signal_pipe
Definition signal.c:28
int pgwin32_bind(SOCKET s, struct sockaddr *addr, int addrlen)
Definition socket.c:315
long key_t
Definition win32_port.h:254
__int64 pgoff_t
Definition win32_port.h:197
PGDLLIMPORT int pg_signal_mask
Definition signal.c:25
int pgwin32_putenv(const char *)
Definition win32env.c:27
int pgwin32_is_service(void)
int pgwin32_ReserveSharedMemoryRegion(HANDLE)
int pgsymlink(const char *oldpath, const char *newpath)
int _pglstat64(const char *name, struct stat *buf)
Definition win32stat.c:113
PGDLLIMPORT HANDLE pgwin32_signal_event
Definition signal.c:27
void pgwin32_signal_initialize(void)
Definition signal.c:79
int pgwin32_is_admin(void)
int pgwin32_setenv(const char *name, const char *value, int overwrite)
Definition win32env.c:121
int pgkill(int pid, int sig)
char * pgwin32_setlocale(int category, const char *locale)
int dlclose(void *handle)
Definition win32dlopen.c:49
int uid_t
Definition win32_port.h:251
int setitimer(int which, const struct itimerval *value, struct itimerval *ovalue)
Definition timer.c:86
int pgwin32_listen(SOCKET s, int backlog)
Definition socket.c:326
int gettimeofday(struct timeval *tp, void *tzp)