|
PostgreSQL Source Code git master
|
#include <winsock2.h>#include <ws2tcpip.h>#include <windows.h>#include <ntstatus.h>#include <winternl.h>#include <process.h>#include <signal.h>#include <direct.h>#include <sys/stat.h>
Go to the source code of this file.
Data Structures | |
| struct | itimerval |
| struct | stat |
Typedefs | |
| typedef __int64 | pgoff_t |
| typedef int | uid_t |
| typedef int | gid_t |
| typedef long | key_t |
| #define _WINSOCKAPI_ |
Definition at line 43 of file win32_port.h.
| #define accept | ( | s, | |
| addr, | |||
| addrlen | |||
| ) | pgwin32_accept(s, addr, addrlen) |
Definition at line 515 of file win32_port.h.
| #define bind | ( | s, | |
| addr, | |||
| addrlen | |||
| ) | pgwin32_bind(s, addr, addrlen) |
Definition at line 513 of file win32_port.h.
| #define connect | ( | s, | |
| name, | |||
| namelen | |||
| ) | pgwin32_connect(s, name, namelen) |
Definition at line 516 of file win32_port.h.
| #define EACCESS 2048 |
Definition at line 100 of file win32_port.h.
| #define EADDRINUSE WSAEADDRINUSE |
Definition at line 404 of file win32_port.h.
| #define EADDRNOTAVAIL WSAEADDRNOTAVAIL |
Definition at line 406 of file win32_port.h.
| #define EAFNOSUPPORT WSAEAFNOSUPPORT |
Definition at line 382 of file win32_port.h.
| #define EAGAIN WSAEWOULDBLOCK |
Definition at line 376 of file win32_port.h.
| #define ECONNABORTED WSAECONNABORTED |
Definition at line 386 of file win32_port.h.
| #define ECONNREFUSED WSAECONNREFUSED |
Definition at line 398 of file win32_port.h.
| #define ECONNRESET WSAECONNRESET |
Definition at line 388 of file win32_port.h.
| #define EHOSTDOWN WSAEHOSTDOWN |
Definition at line 408 of file win32_port.h.
| #define EHOSTUNREACH WSAEHOSTUNREACH |
Definition at line 410 of file win32_port.h.
| #define EIDRM 4096 |
Definition at line 102 of file win32_port.h.
| #define EINPROGRESS WSAEINPROGRESS |
Definition at line 390 of file win32_port.h.
Definition at line 378 of file win32_port.h.
| #define EISCONN WSAEISCONN |
Definition at line 392 of file win32_port.h.
| #define EMSGSIZE WSAEMSGSIZE |
Definition at line 380 of file win32_port.h.
| #define ENABLE_SSPI 1 |
Definition at line 23 of file win32_port.h.
| #define ENETDOWN WSAENETDOWN |
Definition at line 412 of file win32_port.h.
| #define ENETRESET WSAENETRESET |
Definition at line 414 of file win32_port.h.
| #define ENETUNREACH WSAENETUNREACH |
Definition at line 416 of file win32_port.h.
| #define ENOBUFS WSAENOBUFS |
Definition at line 394 of file win32_port.h.
| #define ENOTCONN WSAENOTCONN |
Definition at line 418 of file win32_port.h.
| #define ENOTSOCK WSAENOTSOCK |
Definition at line 400 of file win32_port.h.
| #define EOPNOTSUPP WSAEOPNOTSUPP |
Definition at line 402 of file win32_port.h.
| #define EPROTONOSUPPORT WSAEPROTONOSUPPORT |
Definition at line 396 of file win32_port.h.
| #define ETIMEDOUT WSAETIMEDOUT |
Definition at line 420 of file win32_port.h.
| #define EWOULDBLOCK WSAEWOULDBLOCK |
Definition at line 384 of file win32_port.h.
Definition at line 206 of file win32_port.h.
| #define fstat microsoft_native_fstat |
Definition at line 73 of file win32_port.h.
| #define fstat | ( | fileno, | |
| sb | |||
| ) | _pgfstat64(fileno, sb) |
Definition at line 73 of file win32_port.h.
Definition at line 209 of file win32_port.h.
| #define GETNCNT 16384 |
Definition at line 106 of file win32_port.h.
| #define GETPID 262144 |
Definition at line 109 of file win32_port.h.
| #define GETVAL 65536 |
Definition at line 107 of file win32_port.h.
| #define HAVE_UNION_SEMUN 1 |
Definition at line 91 of file win32_port.h.
| #define IPC_CREAT 512 |
Definition at line 94 of file win32_port.h.
| #define IPC_EXCL 1024 |
Definition at line 95 of file win32_port.h.
| #define IPC_NOWAIT 2048 |
Definition at line 97 of file win32_port.h.
| #define IPC_PRIVATE 234564 |
Definition at line 96 of file win32_port.h.
| #define IPC_RMID 256 |
Definition at line 93 of file win32_port.h.
| #define IPC_STAT 4096 |
Definition at line 98 of file win32_port.h.
| #define isalnum_l _isalnum_l |
Definition at line 455 of file win32_port.h.
| #define isalpha_l _isalpha_l |
Definition at line 453 of file win32_port.h.
| #define isdigit_l _isdigit_l |
Definition at line 451 of file win32_port.h.
| #define isgraph_l _isgraph_l |
Definition at line 461 of file win32_port.h.
| #define islower_l _islower_l |
Definition at line 459 of file win32_port.h.
| #define isprint_l _isprint_l |
Definition at line 463 of file win32_port.h.
| #define ispunct_l _ispunct_l |
Definition at line 465 of file win32_port.h.
| #define isspace_l _isspace_l |
Definition at line 467 of file win32_port.h.
| #define isupper_l _isupper_l |
Definition at line 457 of file win32_port.h.
| #define iswalnum_l _iswalnum_l |
Definition at line 456 of file win32_port.h.
| #define iswalpha_l _iswalpha_l |
Definition at line 454 of file win32_port.h.
| #define iswdigit_l _iswdigit_l |
Definition at line 452 of file win32_port.h.
| #define iswgraph_l _iswgraph_l |
Definition at line 462 of file win32_port.h.
| #define iswlower_l _iswlower_l |
Definition at line 460 of file win32_port.h.
| #define iswprint_l _iswprint_l |
Definition at line 464 of file win32_port.h.
| #define iswpunct_l _iswpunct_l |
Definition at line 466 of file win32_port.h.
| #define iswspace_l _iswspace_l |
Definition at line 468 of file win32_port.h.
| #define iswupper_l _iswupper_l |
Definition at line 458 of file win32_port.h.
| #define ITIMER_REAL 0 |
Definition at line 180 of file win32_port.h.
| #define listen | ( | s, | |
| backlog | |||
| ) | pgwin32_listen(s, backlog) |
Definition at line 514 of file win32_port.h.
Definition at line 446 of file win32_port.h.
| #define lstat | ( | path, | |
| sb | |||
| ) | _pglstat64(path, sb) |
Definition at line 292 of file win32_port.h.
| #define O_CLOEXEC _O_NOINHERIT |
Definition at line 361 of file win32_port.h.
| #define O_DIRECT 0x80000000 |
Definition at line 362 of file win32_port.h.
| #define O_DSYNC 0x04000000 |
Definition at line 363 of file win32_port.h.
| #define PG_SIGNAL_COUNT 32 |
Definition at line 499 of file win32_port.h.
| #define putenv | ( | x | ) | pgwin32_putenv(x) |
Definition at line 558 of file win32_port.h.
| #define readlink | ( | path, | |
| buf, | |||
| size | |||
| ) | pgreadlink(path, buf, size) |
Definition at line 243 of file win32_port.h.
Definition at line 518 of file win32_port.h.
| #define RTLD_GLOBAL 0 |
Definition at line 548 of file win32_port.h.
| #define RTLD_NOW 1 |
Definition at line 547 of file win32_port.h.
Definition at line 350 of file win32_port.h.
| #define S_IRGRP 0 |
Definition at line 308 of file win32_port.h.
| #define S_IROTH 0 |
Definition at line 320 of file win32_port.h.
Definition at line 296 of file win32_port.h.
| #define S_IRWXG 0 |
Definition at line 317 of file win32_port.h.
| #define S_IRWXO 0 |
Definition at line 329 of file win32_port.h.
Definition at line 332 of file win32_port.h.
Definition at line 351 of file win32_port.h.
Definition at line 335 of file win32_port.h.
| #define S_IWGRP 0 |
Definition at line 311 of file win32_port.h.
| #define S_IWOTH 0 |
Definition at line 323 of file win32_port.h.
Definition at line 299 of file win32_port.h.
| #define S_IXGRP 0 |
Definition at line 314 of file win32_port.h.
| #define S_IXOTH 0 |
Definition at line 326 of file win32_port.h.
Definition at line 302 of file win32_port.h.
Definition at line 517 of file win32_port.h.
Definition at line 519 of file win32_port.h.
| #define SETALL 8192 |
Definition at line 105 of file win32_port.h.
Definition at line 559 of file win32_port.h.
Definition at line 489 of file win32_port.h.
| #define SETVAL 131072 |
Definition at line 108 of file win32_port.h.
Definition at line 161 of file win32_port.h.
| #define SIGALRM 14 |
Definition at line 164 of file win32_port.h.
| #define SIGCHLD 20 |
Definition at line 168 of file win32_port.h.
| #define SIGCONT 19 |
Definition at line 167 of file win32_port.h.
| #define SIGHUP 1 |
Definition at line 158 of file win32_port.h.
| #define SIGKILL 9 |
Definition at line 162 of file win32_port.h.
Definition at line 155 of file win32_port.h.
| #define SIGPIPE 13 |
Definition at line 163 of file win32_port.h.
| #define SIGQUIT 3 |
Definition at line 159 of file win32_port.h.
| #define SIGSTOP 17 |
Definition at line 165 of file win32_port.h.
| #define SIGTRAP 5 |
Definition at line 160 of file win32_port.h.
| #define SIGTSTP 18 |
Definition at line 166 of file win32_port.h.
| #define SIGUSR1 30 |
Definition at line 170 of file win32_port.h.
| #define SIGUSR2 31 |
Definition at line 171 of file win32_port.h.
| #define SIGWINCH 28 |
Definition at line 169 of file win32_port.h.
Definition at line 512 of file win32_port.h.
Definition at line 74 of file win32_port.h.
| #define strcoll_l _strcoll_l |
Definition at line 469 of file win32_port.h.
Definition at line 425 of file win32_port.h.
| #define strxfrm_l _strxfrm_l |
Definition at line 470 of file win32_port.h.
Definition at line 242 of file win32_port.h.
| #define tolower_l _tolower_l |
Definition at line 447 of file win32_port.h.
| #define toupper_l _toupper_l |
Definition at line 448 of file win32_port.h.
| #define towlower_l _towlower_l |
Definition at line 449 of file win32_port.h.
| #define towupper_l _towupper_l |
Definition at line 450 of file win32_port.h.
| #define UMDF_USING_NTSTATUS |
Definition at line 58 of file win32_port.h.
| #define UNBLOCKED_SIGNAL_QUEUE | ( | ) | (pg_signal_queue & ~pg_signal_mask) |
Definition at line 498 of file win32_port.h.
| #define unsetenv | ( | x | ) | pgwin32_unsetenv(x) |
Definition at line 560 of file win32_port.h.
| #define USES_WINSOCK |
Definition at line 85 of file win32_port.h.
| #define wcscoll_l _wcscoll_l |
Definition at line 471 of file win32_port.h.
| #define WEXITSTATUS | ( | w | ) | (w) |
Definition at line 152 of file win32_port.h.
| #define WIFEXITED | ( | w | ) | (((w) & 0XFFFFFF00) == 0) |
Definition at line 150 of file win32_port.h.
Definition at line 151 of file win32_port.h.
| #define WIN32_LEAN_AND_MEAN |
Definition at line 57 of file win32_port.h.
| #define WTERMSIG | ( | w | ) | (w) |
Definition at line 153 of file win32_port.h.
Definition at line 252 of file win32_port.h.
Definition at line 254 of file win32_port.h.
Definition at line 197 of file win32_port.h.
Definition at line 251 of file win32_port.h.
Definition at line 177 of file win32error.c.
References DEBUG5, doserr, doserrors, EINVAL, ereport, errmsg_internal(), fb(), fprintf, i, lengthof, LOG, and winerr.
Referenced by BaseBackup(), cache_locale_time(), copyFile(), dsm_impl_pin_segment(), dsm_impl_unpin_segment(), fdatasync(), fileinfo_to_stat(), FileReadV(), FileWriteV(), getrusage(), initialize_ntdll(), link(), pg_import_system_collations(), pg_pread(), pg_pwrite(), pgwin32_get_file_type(), and readdir().
Definition at line 260 of file win32stat.c.
References buf, EINVAL, fb(), fileinfo_to_stat(), and pgwin32_get_file_type().
Definition at line 113 of file win32stat.c.
References buf, EINVAL, ENAMETOOLONG, fb(), fileinfo_to_stat(), MAXPGPATH, name, next, pg_RtlGetLastNtStatus, readlink, S_IFLNK, and S_ISDIR.
Referenced by _pgstat64().
Definition at line 203 of file win32stat.c.
References _pglstat64(), buf, ELOOP, ENAMETOOLONG, fb(), MAXPGPATH, name, next, pg_RtlGetLastNtStatus, readlink, S_ISLNK, and strlcpy().
Definition at line 49 of file win32dlopen.c.
References fb(), last_dyn_error, and set_dl_error().
Referenced by internal_load_library().
Definition at line 40 of file win32dlopen.c.
References fb(), and last_dyn_error.
Referenced by internal_load_library().
Definition at line 76 of file win32dlopen.c.
References fb(), last_dyn_error, and set_dl_error().
Referenced by internal_load_library().
Definition at line 61 of file win32dlopen.c.
References fb(), last_dyn_error, and set_dl_error().
Referenced by internal_load_library(), load_external_function(), and lookup_external_function().
Definition at line 20 of file win32pread.c.
Definition at line 20 of file win32pwrite.c.
Definition at line 263 of file signal.c.
References Assert, fb(), PG_SIGNAL_COUNT, pg_signal_crit_sec, pg_signal_queue, pgwin32_signal_event, and sigmask.
Referenced by pg_console_handler(), pg_signal_thread(), and pg_timer_thread().
Definition at line 337 of file socket.c.
References fb(), pgwin32_poll_signals(), and TranslateSocketError().
Definition at line 315 of file socket.c.
References bind, and TranslateSocketError().
Definition at line 359 of file socket.c.
References fb(), pgwin32_waitforsinglesocket(), and TranslateSocketError().
Definition at line 120 of file signal.c.
References Assert, fb(), i, PG_SIG_DFL, PG_SIG_IGN, pg_signal_array, PG_SIGNAL_COUNT, pg_signal_crit_sec, pg_signal_defaults, pg_signal_queue, pgwin32_signal_event, pg_signal_info::pid, sig, sigmask, and UNBLOCKED_SIGNAL_QUEUE.
Referenced by pg_usleep(), PGSemaphoreLock(), pgwin32_poll_signals(), pgwin32_select(), pgwin32_waitforsinglesocket(), pqsigprocmask(), and WaitEventSetWait().
Definition at line 31 of file win32common.c.
References _dosmaperr(), EINVAL, and fb().
Referenced by _pgfstat64().
Definition at line 164 of file crashdump.c.
References crashDumpHandler(), and fb().
Referenced by main().
Definition at line 49 of file win32security.c.
References _, fb(), and log_error.
Referenced by check_root().
Definition at line 120 of file win32security.c.
Referenced by send_message_to_server_log(), vwrite_stderr(), and write_stderr().
Definition at line 326 of file socket.c.
References fb(), listen, and TranslateSocketError().
Definition at line 27 of file win32env.c.
Referenced by pgwin32_setenv(), and pgwin32_unsetenv().
Definition at line 382 of file socket.c.
References b, buf, ereport, errmsg_internal(), EWOULDBLOCK, fb(), len, NOTICE, pg_usleep(), pgwin32_noblock, pgwin32_poll_signals(), pgwin32_waitforsinglesocket(), and TranslateSocketError().
Definition at line 573 of file win32_shmem.c.
References Assert, elog, fb(), LOG, PROTECTIVE_REGION_SIZE, ShmemProtectiveRegion, UsedShmemSegAddr, and UsedShmemSegSize.
|
extern |
Definition at line 517 of file socket.c.
References Assert, buf, EINTR, elog, ERROR, fb(), i, memcpy(), pgwin32_dispatch_queued_signals(), pgwin32_poll_signals(), pgwin32_signal_event, and TranslateSocketError().
Definition at line 459 of file socket.c.
References b, buf, EWOULDBLOCK, fb(), len, pgwin32_noblock, pgwin32_poll_signals(), pgwin32_waitforsinglesocket(), and TranslateSocketError().
Definition at line 121 of file win32env.c.
References EINVAL, fb(), free, malloc, name, overwrite(), pgwin32_putenv(), sprintf, and value.
Definition at line 172 of file win32setlocale.c.
References fb(), locale_map_argument, locale_map_result, map_locale(), result, setlocale, and unconstify.
Definition at line 79 of file signal.c.
References ereport, errmsg_internal(), FATAL, fb(), i, pg_console_handler(), PG_SIG_IGN, pg_signal_array, PG_SIGNAL_COUNT, pg_signal_crit_sec, pg_signal_defaults, pg_signal_mask, pg_signal_queue, pg_signal_thread(), and pgwin32_signal_event.
Referenced by InitPostmasterChild(), InitStandaloneProcess(), and PostmasterMain().
Definition at line 291 of file socket.c.
References closesocket, fb(), TranslateSocketError(), and type.
Definition at line 150 of file win32env.c.
References EINVAL, fb(), free, malloc, name, pgwin32_putenv(), and sprintf.
Definition at line 181 of file socket.c.
References buf, EINTR, ereport, errmsg_internal(), ERROR, EWOULDBLOCK, fb(), isDataGram(), pgwin32_dispatch_queued_signals(), pgwin32_signal_event, and TranslateSocketError().
Referenced by pgwin32_connect(), pgwin32_recv(), and pgwin32_send().
Definition at line 86 of file timer.c.
References Assert, timerCA::crit_sec, ereport, errmsg_internal(), timerCA::event, FATAL, fb(), ITIMER_REAL, MemSet, pg_timer_thread(), timerCommArea, timerThreadHandle, timerCA::value, and value.
Referenced by do_watch(), fork_process(), and schedule_alarm().
|
extern |
Definition at line 25 of file signal.c.
Referenced by pgwin32_signal_initialize(), and pqsigprocmask().
|
extern |
Definition at line 24 of file signal.c.
Referenced by pg_queue_signal(), pgwin32_dispatch_queued_signals(), and pgwin32_signal_initialize().
|
extern |
Definition at line 28 of file signal.c.
Referenced by pg_signal_thread().
|
extern |
Definition at line 28 of file socket.c.
Referenced by pgwin32_recv(), pgwin32_send(), secure_raw_read(), and secure_raw_write().
|
extern |
Definition at line 27 of file signal.c.
Referenced by CreateWaitEventSet(), pg_queue_signal(), pg_usleep(), PGSemaphoreLock(), pgwin32_dispatch_queued_signals(), pgwin32_select(), pgwin32_signal_initialize(), and pgwin32_waitforsinglesocket().