mirror of https://github.com/postgres/postgres
o remove many WIN32_CLIENT_ONLY defines o add WIN32_ONLY_COMPILER define o add 3rd argument to open() for portability o add include/port/win32_msvc directory for system includes Magnus HaganderREL8_2_STABLE
parent
877e296306
commit
399a36a75d
@ -1,72 +1,660 @@ |
|||||||
/* $PostgreSQL: pgsql/src/include/pg_config.h.win32,v 1.29 2006/05/30 12:43:28 momjian Exp $ */ |
/* src/include/pg_config.h. Generated by configure. */ |
||||||
|
/* src/include/pg_config.h.in. Generated from configure.in by autoheader. */ |
||||||
|
|
||||||
#ifndef pg_config_h_win32__ |
/* This file is generated from MingW ./configure, and with the following |
||||||
#define pg_config_h_win32__ |
* changes to be valid for Visual C++ (and compatible): |
||||||
/* |
* |
||||||
* Parts of pg_config.h that you get with autoconf on other systems |
* HAVE_CBRT, HAVE_FUNCNAME_FUNC, HAVE_FUNCNAME_FUNCTION, HAVE_GETOPT, |
||||||
|
* HAVE_GETOPT_H, HAVE_GETOPT_LONG, HAVE_RINT, HAVE_STRINGS_H, |
||||||
|
* HAVE_STRTOLL, HAVE_STRTOULL, HAVE_STRUCT_OPTION, ENABLE_THREAD_SAFETY |
||||||
|
* |
||||||
|
* For now, also HAVE_IPV6 |
||||||
*/ |
*/ |
||||||
#define PG_VERSION "8.2devel" |
|
||||||
#define PG_VERSION_STR "8.2devel (win32)" |
|
||||||
|
|
||||||
|
/* Define to the type of arg 1 of 'accept' */ |
||||||
|
#define ACCEPT_TYPE_ARG1 unsigned int |
||||||
|
|
||||||
|
/* Define to the type of arg 2 of 'accept' */ |
||||||
|
#define ACCEPT_TYPE_ARG2 struct sockaddr * |
||||||
|
|
||||||
|
/* Define to the type of arg 3 of 'accept' */ |
||||||
|
#define ACCEPT_TYPE_ARG3 int |
||||||
|
|
||||||
|
/* Define to the return type of 'accept' */ |
||||||
|
#define ACCEPT_TYPE_RETURN unsigned int PASCAL |
||||||
|
|
||||||
|
/* The alignment requirement of a `double'. */ |
||||||
|
#define ALIGNOF_DOUBLE 8 |
||||||
|
|
||||||
|
/* The alignment requirement of a `int'. */ |
||||||
|
#define ALIGNOF_INT 4 |
||||||
|
|
||||||
|
/* The alignment requirement of a `long'. */ |
||||||
|
#define ALIGNOF_LONG 4 |
||||||
|
|
||||||
|
/* The alignment requirement of a `long long int'. */ |
||||||
|
#define ALIGNOF_LONG_LONG_INT 8 |
||||||
|
|
||||||
|
/* The alignment requirement of a `short'. */ |
||||||
|
#define ALIGNOF_SHORT 2 |
||||||
|
|
||||||
|
/* Define to the default TCP port number on which the server listens and to |
||||||
|
which clients will try to connect. This can be overridden at run-time, but |
||||||
|
it's convenient if your clients have the right default compiled in. |
||||||
|
(--with-pgport=PORTNUM) */ |
||||||
#define DEF_PGPORT 5432 |
#define DEF_PGPORT 5432 |
||||||
|
|
||||||
|
/* Define to the default TCP port number as a string constant. */ |
||||||
#define DEF_PGPORT_STR "5432" |
#define DEF_PGPORT_STR "5432" |
||||||
|
|
||||||
#define MAXIMUM_ALIGNOF 4 |
/* Define to 1 if you want National Language Support. (--enable-nls) */ |
||||||
#define ACCEPT_TYPE_ARG3 int |
/* #undef ENABLE_NLS */ |
||||||
|
|
||||||
#define MAXPGPATH 1024 |
/* Define to 1 to build client libraries as thread-safe code. |
||||||
#define MEMSET_LOOP_LIMIT 1024 |
(--enable-thread-safety) */ |
||||||
|
#define ENABLE_THREAD_SAFETY 1 |
||||||
|
|
||||||
#define INDEX_MAX_KEYS 32 |
/* Define to 1 if getpwuid_r() takes a 5th argument. */ |
||||||
|
/* #undef GETPWUID_R_5ARG */ |
||||||
|
|
||||||
#define HAVE_ATEXIT |
/* Define to 1 if gettimeofday() takes only 1 argument. */ |
||||||
#define HAVE_MEMMOVE |
/* #undef GETTIMEOFDAY_1ARG */ |
||||||
|
|
||||||
#ifdef __BORLANDC__ |
#ifdef GETTIMEOFDAY_1ARG |
||||||
#define HAVE_RANDOM |
# define gettimeofday(a,b) gettimeofday(a) |
||||||
#endif |
#endif |
||||||
|
|
||||||
#undef inline |
/* Define to 1 if you have the `atexit' function. */ |
||||||
#define inline __inline |
#define HAVE_ATEXIT 1 |
||||||
|
|
||||||
#define INT64_FORMAT "%I64d" |
/* Define to 1 if you have the `cbrt' function. */ |
||||||
#define HAVE_DECL_VSNPRINTF 1 |
//#define HAVE_CBRT 1 |
||||||
|
|
||||||
|
/* Define to 1 if you have the `class' function. */ |
||||||
|
/* #undef HAVE_CLASS */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the `crypt' function. */ |
||||||
|
/* #undef HAVE_CRYPT */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the <crypt.h> header file. */ |
||||||
|
/* #undef HAVE_CRYPT_H */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the declaration of `fdatasync', and to 0 if you |
||||||
|
don't. */ |
||||||
|
#define HAVE_DECL_FDATASYNC 0 |
||||||
|
|
||||||
|
/* Define to 1 if you have the declaration of `F_FULLFSYNC', and to 0 if you |
||||||
|
don't. */ |
||||||
|
#define HAVE_DECL_F_FULLFSYNC 0 |
||||||
|
|
||||||
/* use _snprintf and _vsnprintf */ |
/* Define to 1 if you have the declaration of `snprintf', and to 0 if you |
||||||
|
don't. */ |
||||||
#define HAVE_DECL_SNPRINTF 1 |
#define HAVE_DECL_SNPRINTF 1 |
||||||
#define snprintf _snprintf |
|
||||||
|
/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you |
||||||
|
don't. */ |
||||||
#define HAVE_DECL_VSNPRINTF 1 |
#define HAVE_DECL_VSNPRINTF 1 |
||||||
#define vsnprintf _vsnprintf |
|
||||||
|
|
||||||
/* defines for dynamic linking on Win32 platform */ |
/* Define to 1 if you have the <dld.h> header file. */ |
||||||
#ifdef __CYGWIN__ |
/* #undef HAVE_DLD_H */ |
||||||
|
|
||||||
#if __GNUC__ && ! defined (__declspec) |
/* Define to 1 if you have the `dlopen' function. */ |
||||||
#error You need egcs 1.1 or newer for compiling! |
/* #undef HAVE_DLOPEN */ |
||||||
#endif |
|
||||||
|
|
||||||
#ifdef BUILDING_DLL |
/* Define to 1 if you have the <editline/history.h> header file. */ |
||||||
#define DLLIMPORT __declspec (dllexport) |
/* #undef HAVE_EDITLINE_HISTORY_H */ |
||||||
#else /* not BUILDING_DLL */ |
|
||||||
#define DLLIMPORT __declspec (dllimport) |
|
||||||
#endif |
|
||||||
|
|
||||||
#elif defined(WIN32) && defined(_MSC_VER) /* not CYGWIN */ |
/* Define to 1 if you have the <editline/readline.h> header file. */ |
||||||
|
/* #undef HAVE_EDITLINE_READLINE_H */ |
||||||
|
|
||||||
#if defined(_DLL) |
/* Define to 1 if you have the <endian.h> header file. */ |
||||||
#define DLLIMPORT __declspec (dllexport) |
/* #undef HAVE_ENDIAN_H */ |
||||||
#else /* not _DLL */ |
|
||||||
#define DLLIMPORT __declspec (dllimport) |
|
||||||
#endif |
|
||||||
|
|
||||||
#else /* not CYGWIN, not MSVC */ |
/* Define to 1 if you have the `fcvt' function. */ |
||||||
|
#define HAVE_FCVT 1 |
||||||
|
|
||||||
#define DLLIMPORT |
/* Define to 1 if you have the `fdatasync' function. */ |
||||||
|
/* #undef HAVE_FDATASYNC */ |
||||||
|
|
||||||
#endif |
/* Define to 1 if you have finite(). */ |
||||||
|
#define HAVE_FINITE 1 |
||||||
|
|
||||||
#ifndef __CYGWIN__ |
/* Define to 1 if you have the `fpclass' function. */ |
||||||
#include <windows.h> |
/* #undef HAVE_FPCLASS */ |
||||||
#endif |
|
||||||
|
/* Define to 1 if you have the `fp_class' function. */ |
||||||
|
/* #undef HAVE_FP_CLASS */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the `fp_class_d' function. */ |
||||||
|
/* #undef HAVE_FP_CLASS_D */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the <fp_class.h> header file. */ |
||||||
|
/* #undef HAVE_FP_CLASS_H */ |
||||||
|
|
||||||
|
/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ |
||||||
|
/* #undef HAVE_FSEEKO */ |
||||||
|
|
||||||
|
/* Define to 1 if your compiler understands __func__. */ |
||||||
|
//#define HAVE_FUNCNAME__FUNC 1 |
||||||
|
|
||||||
|
/* Define to 1 if your compiler understands __FUNCTION__. */ |
||||||
|
#undef HAVE_FUNCNAME__FUNCTION |
||||||
|
|
||||||
|
/* Define to 1 if you have getaddrinfo(). */ |
||||||
|
/* #undef HAVE_GETADDRINFO */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the `gethostbyname_r' function. */ |
||||||
|
/* #undef HAVE_GETHOSTBYNAME_R */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the `getopt' function. */ |
||||||
|
//#define HAVE_GETOPT 1 |
||||||
|
|
||||||
|
/* Define to 1 if you have the <getopt.h> header file. */ |
||||||
|
//#define HAVE_GETOPT_H 1 |
||||||
|
|
||||||
|
/* Define to 1 if you have the `getopt_long' function. */ |
||||||
|
//#define HAVE_GETOPT_LONG 1 |
||||||
|
|
||||||
|
/* Define to 1 if you have the `getpeereid' function. */ |
||||||
|
/* #undef HAVE_GETPEEREID */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the `getpwuid_r' function. */ |
||||||
|
/* #undef HAVE_GETPWUID_R */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the `getrusage' function. */ |
||||||
|
/* #undef HAVE_GETRUSAGE */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the <history.h> header file. */ |
||||||
|
/* #undef HAVE_HISTORY_H */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the <ieeefp.h> header file. */ |
||||||
|
/* #undef HAVE_IEEEFP_H */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the `inet_aton' function. */ |
||||||
|
/* #undef HAVE_INET_ATON */ |
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `int64'. */ |
||||||
|
/* #undef HAVE_INT64 */ |
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `int8'. */ |
||||||
|
/* #undef HAVE_INT8 */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the <inttypes.h> header file. */ |
||||||
|
#define HAVE_INTTYPES_H 1 |
||||||
|
|
||||||
|
/* Define to 1 if you have the global variable 'int optreset'. */ |
||||||
|
#define HAVE_INT_OPTRESET 1 |
||||||
|
|
||||||
|
/* Define to 1 if you have the global variable 'int timezone'. */ |
||||||
|
#define HAVE_INT_TIMEZONE |
||||||
|
|
||||||
|
/* Define to 1 if you have support for IPv6. */ |
||||||
|
//#define HAVE_IPV6 1 |
||||||
|
|
||||||
|
/* Define to 1 if you have isinf(). */ |
||||||
|
#define HAVE_ISINF 1 |
||||||
|
|
||||||
|
/* Define to 1 if you have the <kernel/image.h> header file. */ |
||||||
|
/* #undef HAVE_KERNEL_IMAGE_H */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the <kernel/OS.h> header file. */ |
||||||
|
/* #undef HAVE_KERNEL_OS_H */ |
||||||
|
|
||||||
|
/* Define to 1 if `e_data' is member of `krb5_error'. */ |
||||||
|
/* #undef HAVE_KRB5_ERROR_E_DATA */ |
||||||
|
|
||||||
|
/* Define to 1 if `text.data' is member of `krb5_error'. */ |
||||||
|
/* #undef HAVE_KRB5_ERROR_TEXT_DATA */ |
||||||
|
|
||||||
|
/* Define to 1 if `client' is member of `krb5_ticket'. */ |
||||||
|
/* #undef HAVE_KRB5_TICKET_CLIENT */ |
||||||
|
|
||||||
|
/* Define to 1 if `enc_part2' is member of `krb5_ticket'. */ |
||||||
|
/* #undef HAVE_KRB5_TICKET_ENC_PART2 */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the <langinfo.h> header file. */ |
||||||
|
/* #undef HAVE_LANGINFO_H */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the <ldap.h> header file. */ |
||||||
|
/* #undef HAVE_LDAP_H */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the `crypto' library (-lcrypto). */ |
||||||
|
/* #undef HAVE_LIBCRYPTO */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the `eay32' library (-leay32). */ |
||||||
|
/* #undef HAVE_LIBEAY32 */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the `ldap' library (-lldap). */ |
||||||
|
/* #undef HAVE_LIBLDAP */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the `pam' library (-lpam). */ |
||||||
|
/* #undef HAVE_LIBPAM */ |
||||||
|
|
||||||
|
/* Define if you have a function readline library */ |
||||||
|
/* #undef HAVE_LIBREADLINE */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the `ssl' library (-lssl). */ |
||||||
|
/* #undef HAVE_LIBSSL */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the `ssleay32' library (-lssleay32). */ |
||||||
|
/* #undef HAVE_LIBSSLEAY32 */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the `wldap32' library (-lwldap32). */ |
||||||
|
/* #undef HAVE_LIBWLDAP32 */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the `z' library (-lz). */ |
||||||
|
/* #undef HAVE_LIBZ */ |
||||||
|
|
||||||
|
/* Define to 1 if constants of type 'long long int' should have the suffix LL. |
||||||
|
*/ |
||||||
|
#define HAVE_LL_CONSTANTS 1 |
||||||
|
|
||||||
|
/* Define to 1 if `long int' works and is 64 bits. */ |
||||||
|
/* #undef HAVE_LONG_INT_64 */ |
||||||
|
|
||||||
|
/* Define to 1 if `long long int' works and is 64 bits. */ |
||||||
|
#define HAVE_LONG_LONG_INT_64 |
||||||
|
|
||||||
|
/* Define to 1 if you have the `memmove' function. */ |
||||||
|
#define HAVE_MEMMOVE 1 |
||||||
|
|
||||||
|
/* Define to 1 if you have the <memory.h> header file. */ |
||||||
|
#define HAVE_MEMORY_H 1 |
||||||
|
|
||||||
|
/* Define to 1 if you have the <netinet/in.h> header file. */ |
||||||
|
#define HAVE_NETINET_IN_H 1 |
||||||
|
|
||||||
|
/* Define to 1 if you have the <netinet/tcp.h> header file. */ |
||||||
|
/* #undef HAVE_NETINET_TCP_H */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the `on_exit' function. */ |
||||||
|
/* #undef HAVE_ON_EXIT */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the <pam/pam_appl.h> header file. */ |
||||||
|
/* #undef HAVE_PAM_PAM_APPL_H */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the `poll' function. */ |
||||||
|
/* #undef HAVE_POLL */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the <poll.h> header file. */ |
||||||
|
/* #undef HAVE_POLL_H */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the POSIX signal interface. */ |
||||||
|
/* #undef HAVE_POSIX_SIGNALS */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the `pstat' function. */ |
||||||
|
/* #undef HAVE_PSTAT */ |
||||||
|
|
||||||
|
/* Define to 1 if the PS_STRINGS thing exists. */ |
||||||
|
/* #undef HAVE_PS_STRINGS */ |
||||||
|
|
||||||
|
/* Define if you have POSIX threads libraries and header files. */ |
||||||
|
/* #undef HAVE_PTHREAD */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the <pwd.h> header file. */ |
||||||
|
#define HAVE_PWD_H 1 |
||||||
|
|
||||||
|
/* Define to 1 if you have the `random' function. */ |
||||||
|
/* #undef HAVE_RANDOM */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the <readline.h> header file. */ |
||||||
|
/* #undef HAVE_READLINE_H */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the <readline/history.h> header file. */ |
||||||
|
/* #undef HAVE_READLINE_HISTORY_H */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the <readline/readline.h> header file. */ |
||||||
|
/* #undef HAVE_READLINE_READLINE_H */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the `readlink' function. */ |
||||||
|
/* #undef HAVE_READLINK */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the `replace_history_entry' function. */ |
||||||
|
/* #undef HAVE_REPLACE_HISTORY_ENTRY */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the `rint' function. */ |
||||||
|
/*#define HAVE_RINT 1*/ |
||||||
|
|
||||||
|
/* Define to 1 if you have the global variable |
||||||
|
'rl_completion_append_character'. */ |
||||||
|
/* #undef HAVE_RL_COMPLETION_APPEND_CHARACTER */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the `rl_completion_matches' function. */ |
||||||
|
/* #undef HAVE_RL_COMPLETION_MATCHES */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the `rl_filename_completion_function' function. */ |
||||||
|
/* #undef HAVE_RL_FILENAME_COMPLETION_FUNCTION */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the <security/pam_appl.h> header file. */ |
||||||
|
/* #undef HAVE_SECURITY_PAM_APPL_H */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the `setproctitle' function. */ |
||||||
|
/* #undef HAVE_SETPROCTITLE */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the `setsid' function. */ |
||||||
|
/* #undef HAVE_SETSID */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the `sigprocmask' function. */ |
||||||
|
/* #undef HAVE_SIGPROCMASK */ |
||||||
|
|
||||||
|
/* Define to 1 if you have sigsetjmp(). */ |
||||||
|
/* #undef HAVE_SIGSETJMP */ |
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `sig_atomic_t'. */ |
||||||
|
#define HAVE_SIG_ATOMIC_T 1 |
||||||
|
|
||||||
|
/* Define to 1 if you have the `snprintf' function. */ |
||||||
|
/* #undef HAVE_SNPRINTF */ |
||||||
|
|
||||||
|
/* Define to 1 if you have spinlocks. */ |
||||||
|
#define HAVE_SPINLOCKS 1 |
||||||
|
|
||||||
|
/* Define to 1 if you have the `srandom' function. */ |
||||||
|
/* #undef HAVE_SRANDOM */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdint.h> header file. */ |
||||||
|
#define HAVE_STDINT_H 1 |
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdlib.h> header file. */ |
||||||
|
#define HAVE_STDLIB_H 1 |
||||||
|
|
||||||
|
/* Define to 1 if you have the `strdup' function. */ |
||||||
|
#define HAVE_STRDUP 1 |
||||||
|
|
||||||
|
/* Define to 1 if you have the `strerror' function. */ |
||||||
|
#define HAVE_STRERROR 1 |
||||||
|
|
||||||
|
/* Define to 1 if you have the `strerror_r' function. */ |
||||||
|
/* #undef HAVE_STRERROR_R */ |
||||||
|
|
||||||
|
/* Define to 1 if cpp supports the ANSI # stringizing operator. */ |
||||||
|
#define HAVE_STRINGIZE 1 |
||||||
|
|
||||||
|
/* Define to 1 if you have the <strings.h> header file. */ |
||||||
|
/*#define HAVE_STRINGS_H 1 */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the <string.h> header file. */ |
||||||
|
#define HAVE_STRING_H 1 |
||||||
|
|
||||||
|
/* Define to 1 if you have the `strtol' function. */ |
||||||
|
#define HAVE_STRTOL 1 |
||||||
|
|
||||||
|
/* Define to 1 if you have the `strtoll' function. */ |
||||||
|
//#define HAVE_STRTOLL 1 |
||||||
|
|
||||||
|
/* Define to 1 if you have the `strtoq' function. */ |
||||||
|
/* #undef HAVE_STRTOQ */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the `strtoul' function. */ |
||||||
|
#define HAVE_STRTOUL 1 |
||||||
|
|
||||||
|
/* Define to 1 if you have the `strtoull' function. */ |
||||||
|
//#define HAVE_STRTOULL 1 |
||||||
|
|
||||||
|
/* Define to 1 if you have the `strtouq' function. */ |
||||||
|
/* #undef HAVE_STRTOUQ */ |
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `struct addrinfo'. */ |
||||||
|
#define HAVE_STRUCT_ADDRINFO 1 |
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `struct cmsgcred'. */ |
||||||
|
/* #undef HAVE_STRUCT_CMSGCRED */ |
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `struct fcred'. */ |
||||||
|
/* #undef HAVE_STRUCT_FCRED */ |
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `struct option'. */ |
||||||
|
//#define HAVE_STRUCT_OPTION 1 |
||||||
|
|
||||||
|
/* Define to 1 if `sa_len' is member of `struct sockaddr'. */ |
||||||
|
/* #undef HAVE_STRUCT_SOCKADDR_SA_LEN */ |
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `struct sockaddr_storage'. */ |
||||||
|
#define HAVE_STRUCT_SOCKADDR_STORAGE 1 |
||||||
|
|
||||||
|
/* Define to 1 if `ss_family' is member of `struct sockaddr_storage'. */ |
||||||
|
#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 |
||||||
|
|
||||||
|
/* Define to 1 if `ss_len' is member of `struct sockaddr_storage'. */ |
||||||
|
/* #undef HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN */ |
||||||
|
|
||||||
|
/* Define to 1 if `__ss_family' is member of `struct sockaddr_storage'. */ |
||||||
|
/* #undef HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY */ |
||||||
|
|
||||||
|
/* Define to 1 if `__ss_len' is member of `struct sockaddr_storage'. */ |
||||||
|
/* #undef HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN */ |
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `struct sockaddr_un'. */ |
||||||
|
/* #undef HAVE_STRUCT_SOCKADDR_UN */ |
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `struct sockcred'. */ |
||||||
|
/* #undef HAVE_STRUCT_SOCKCRED */ |
||||||
|
|
||||||
|
/* Define to 1 if `tm_zone' is member of `struct tm'. */ |
||||||
|
/* #undef HAVE_STRUCT_TM_TM_ZONE */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the <SupportDefs.h> header file. */ |
||||||
|
/* #undef HAVE_SUPPORTDEFS_H */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the `symlink' function. */ |
||||||
|
#define HAVE_SYMLINK 1 |
||||||
|
|
||||||
|
/* Define to 1 if you have the `sysconf' function. */ |
||||||
|
/* #undef HAVE_SYSCONF */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the syslog interface. */ |
||||||
|
/* #undef HAVE_SYSLOG */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/ipc.h> header file. */ |
||||||
|
/* #undef HAVE_SYS_IPC_H */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/poll.h> header file. */ |
||||||
|
/* #undef HAVE_SYS_POLL_H */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/pstat.h> header file. */ |
||||||
|
/* #undef HAVE_SYS_PSTAT_H */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/select.h> header file. */ |
||||||
|
/* #undef HAVE_SYS_SELECT_H */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/sem.h> header file. */ |
||||||
|
/* #undef HAVE_SYS_SEM_H */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/shm.h> header file. */ |
||||||
|
/* #undef HAVE_SYS_SHM_H */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/socket.h> header file. */ |
||||||
|
#define HAVE_SYS_SOCKET_H 1 |
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/stat.h> header file. */ |
||||||
|
#define HAVE_SYS_STAT_H 1 |
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/time.h> header file. */ |
||||||
|
#define HAVE_SYS_TIME_H 1 |
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/types.h> header file. */ |
||||||
|
#define HAVE_SYS_TYPES_H 1 |
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/un.h> header file. */ |
||||||
|
/* #undef HAVE_SYS_UN_H */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the <termios.h> header file. */ |
||||||
|
/* #undef HAVE_TERMIOS_H */ |
||||||
|
|
||||||
|
/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use |
||||||
|
`HAVE_STRUCT_TM_TM_ZONE' instead. */ |
||||||
|
/* #undef HAVE_TM_ZONE */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the `towlower' function. */ |
||||||
|
#define HAVE_TOWLOWER 1 |
||||||
|
|
||||||
|
/* Define to 1 if you have the external array `tzname'. */ |
||||||
|
/* #undef HAVE_TZNAME */ |
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `uint64'. */ |
||||||
|
/* #undef HAVE_UINT64 */ |
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `uint8'. */ |
||||||
|
/* #undef HAVE_UINT8 */ |
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `union semun'. */ |
||||||
|
/* #undef HAVE_UNION_SEMUN */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the <unistd.h> header file. */ |
||||||
|
#define HAVE_UNISTD_H 1 |
||||||
|
|
||||||
|
/* Define to 1 if you have unix sockets. */ |
||||||
|
/* #undef HAVE_UNIX_SOCKETS */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the `unsetenv' function. */ |
||||||
|
/* #undef HAVE_UNSETENV */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the `utime' function. */ |
||||||
|
#define HAVE_UTIME 1 |
||||||
|
|
||||||
|
/* Define to 1 if you have the `utimes' function. */ |
||||||
|
/* #undef HAVE_UTIMES */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the <utime.h> header file. */ |
||||||
|
#define HAVE_UTIME_H 1 |
||||||
|
|
||||||
|
/* Define to 1 if you have the `vsnprintf' function. */ |
||||||
|
/* #undef HAVE_VSNPRINTF */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the `waitpid' function. */ |
||||||
|
/* #undef HAVE_WAITPID */ |
||||||
|
|
||||||
|
/* Define to 1 if you have the <wchar.h> header file. */ |
||||||
|
#define HAVE_WCHAR_H 1 |
||||||
|
|
||||||
|
/* Define to 1 if you have the `wcstombs' function. */ |
||||||
|
#define HAVE_WCSTOMBS 1 |
||||||
|
|
||||||
|
/* Define to 1 if you have the <wctype.h> header file. */ |
||||||
|
#define HAVE_WCTYPE_H 1 |
||||||
|
|
||||||
|
/* Define to 1 if you have the <winldap.h> header file. */ |
||||||
|
/* #undef HAVE_WINLDAP_H */ |
||||||
|
|
||||||
|
/* Define to the appropriate snprintf format for 64-bit ints, if any. */ |
||||||
|
#define INT64_FORMAT "%lld" |
||||||
|
|
||||||
|
/* Define to build with Kerberos 5 support. (--with-krb5) */ |
||||||
|
/* #undef KRB5 */ |
||||||
|
|
||||||
|
/* Define to the location of locale files. */ |
||||||
|
/* #undef LOCALEDIR */ |
||||||
|
|
||||||
|
/* Define as the maximum alignment requirement of any C data type. */ |
||||||
|
#define MAXIMUM_ALIGNOF 8 |
||||||
|
|
||||||
|
/* Define bytes to use libc memset(). */ |
||||||
|
#define MEMSET_LOOP_LIMIT 1024 |
||||||
|
|
||||||
|
/* Define to the address where bug reports for this package should be sent. */ |
||||||
|
#define PACKAGE_BUGREPORT "pgsql-bugs@postgresql.org" |
||||||
|
|
||||||
|
/* Define to the full name of this package. */ |
||||||
|
#define PACKAGE_NAME "PostgreSQL" |
||||||
|
|
||||||
|
/* Define to the full name and version of this package. */ |
||||||
|
#define PACKAGE_STRING "PostgreSQL 8.2devel" |
||||||
|
|
||||||
|
/* Define to the one symbol short name of this package. */ |
||||||
|
#define PACKAGE_TARNAME "postgresql" |
||||||
|
|
||||||
|
/* Define to the version of this package. */ |
||||||
|
#define PACKAGE_VERSION "8.2devel" |
||||||
|
|
||||||
|
/* Define to the name of the default PostgreSQL service principal in Kerberos. |
||||||
|
(--with-krb-srvnam=NAME) */ |
||||||
|
#define PG_KRB_SRVNAM "postgres" |
||||||
|
|
||||||
|
/* PostgreSQL version as a string */ |
||||||
|
#define PG_VERSION "8.2devel" |
||||||
|
|
||||||
|
/* PostgreSQL version as a number */ |
||||||
|
#define PG_VERSION_NUM 80200 |
||||||
|
|
||||||
|
/* A string containing the version number, platform, and C compiler */ |
||||||
|
#define PG_VERSION_STR "Uninitialized version string (win32)" |
||||||
|
|
||||||
|
/* Define to the necessary symbol if this constant uses a non-standard name on |
||||||
|
your system. */ |
||||||
|
/* #undef PTHREAD_CREATE_JOINABLE */ |
||||||
|
|
||||||
|
/* The size of a `size_t', as computed by sizeof. */ |
||||||
|
#define SIZEOF_SIZE_T 4 |
||||||
|
|
||||||
|
/* The size of a `unsigned long', as computed by sizeof. */ |
||||||
|
#define SIZEOF_UNSIGNED_LONG 4 |
||||||
|
|
||||||
|
/* Define to 1 if you have the ANSI C header files. */ |
||||||
|
#define STDC_HEADERS 1 |
||||||
|
|
||||||
|
/* Define to 1 if strerror_r() returns a int. */ |
||||||
|
/* #undef STRERROR_R_INT */ |
||||||
|
|
||||||
|
/* Define to 1 if your <sys/time.h> declares `struct tm'. */ |
||||||
|
/* #undef TM_IN_SYS_TIME */ |
||||||
|
|
||||||
|
/* Define to the appropriate snprintf format for unsigned 64-bit ints, if any. |
||||||
|
*/ |
||||||
|
#define UINT64_FORMAT "%llu" |
||||||
|
|
||||||
|
/* Define to 1 to build with assertion checks. (--enable-cassert) */ |
||||||
|
/* #undef USE_ASSERT_CHECKING */ |
||||||
|
|
||||||
|
/* Define to 1 to build with Bonjour support. (--with-bonjour) */ |
||||||
|
/* #undef USE_BONJOUR */ |
||||||
|
|
||||||
|
/* Define to 1 if you want 64-bit integer timestamp and interval support. |
||||||
|
(--enable-integer-datetimes) */ |
||||||
|
/* #undef USE_INTEGER_DATETIMES */ |
||||||
|
|
||||||
|
/* Define to 1 to build with LDAP support. (--with-ldap) */ |
||||||
|
/* #undef USE_LDAP */ |
||||||
|
|
||||||
|
/* Define to select named POSIX semaphores. */ |
||||||
|
/* #undef USE_NAMED_POSIX_SEMAPHORES */ |
||||||
|
|
||||||
|
/* Define to 1 to build with PAM support. (--with-pam) */ |
||||||
|
/* #undef USE_PAM */ |
||||||
|
|
||||||
|
/* Use replacement snprintf() functions. */ |
||||||
|
#define USE_REPL_SNPRINTF 1 |
||||||
|
|
||||||
|
/* Define to build with (Open)SSL support. (--with-openssl) */ |
||||||
|
/* #undef USE_SSL */ |
||||||
|
|
||||||
|
/* Define to select SysV-style semaphores. */ |
||||||
|
#define USE_SYSV_SEMAPHORES 1 |
||||||
|
|
||||||
|
/* Define to select SysV-style shared memory. */ |
||||||
|
#define USE_SYSV_SHARED_MEMORY 1 |
||||||
|
|
||||||
|
/* Define to select unnamed POSIX semaphores. */ |
||||||
|
/* #undef USE_UNNAMED_POSIX_SEMAPHORES */ |
||||||
|
|
||||||
|
/* Number of bits in a file offset, on hosts where this is settable. */ |
||||||
|
/* #undef _FILE_OFFSET_BITS */ |
||||||
|
|
||||||
|
/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ |
||||||
|
/* #undef _LARGEFILE_SOURCE */ |
||||||
|
|
||||||
|
/* Define for large files, on AIX-style hosts. */ |
||||||
|
/* #undef _LARGE_FILES */ |
||||||
|
|
||||||
|
/* Define to empty if `const' does not conform to ANSI C. */ |
||||||
|
/* #undef const */ |
||||||
|
|
||||||
|
/* Define as `__inline' if that's what the C compiler calls it, or to nothing |
||||||
|
if it is not supported. */ |
||||||
|
/* #undef inline */ |
||||||
|
|
||||||
|
/* Define to empty if the C compiler does not understand signed types. */ |
||||||
|
/* #undef signed */ |
||||||
|
|
||||||
#endif /* pg_config_h_win32__ */ |
/* Define to empty if the keyword `volatile' does not work. Warning: valid |
||||||
|
code using `volatile' can become incorrect without. Disable with care. */ |
||||||
|
/* #undef volatile */ |
||||||
|
@ -0,0 +1,21 @@ |
|||||||
|
/*
|
||||||
|
* Headers for port/dirent.c, win32 native implementation of dirent functions |
||||||
|
* |
||||||
|
* $PostgreSQL: pgsql/src/include/port/win32_msvc/dirent.h,v 1.1 2006/06/07 22:24:45 momjian Exp $ |
||||||
|
*/ |
||||||
|
|
||||||
|
#ifndef _WIN32VC_DIRENT_H |
||||||
|
#define _WIN32VC_DIRENT_H |
||||||
|
struct dirent { |
||||||
|
long d_ino; |
||||||
|
unsigned short d_reclen; |
||||||
|
unsigned short d_namlen; |
||||||
|
char d_name[MAX_PATH]; |
||||||
|
}; |
||||||
|
|
||||||
|
typedef struct DIR DIR; |
||||||
|
|
||||||
|
DIR* opendir(const char *); |
||||||
|
struct dirent* readdir(DIR *); |
||||||
|
int closedir(DIR*); |
||||||
|
#endif |
@ -0,0 +1 @@ |
|||||||
|
/* $PostgreSQL: pgsql/src/include/port/win32_msvc/sys/file.h,v 1.1 2006/06/07 22:24:45 momjian Exp $ */
|
@ -0,0 +1 @@ |
|||||||
|
/* $PostgreSQL: pgsql/src/include/port/win32_msvc/sys/param.h,v 1.1 2006/06/07 22:24:45 momjian Exp $ */
|
@ -0,0 +1 @@ |
|||||||
|
/* $PostgreSQL: pgsql/src/include/port/win32_msvc/sys/time.h,v 1.1 2006/06/07 22:24:45 momjian Exp $ */
|
@ -0,0 +1 @@ |
|||||||
|
/* $PostgreSQL: pgsql/src/include/port/win32_msvc/unistd.h,v 1.1 2006/06/07 22:24:45 momjian Exp $ */
|
@ -0,0 +1 @@ |
|||||||
|
/* $PostgreSQL: pgsql/src/include/port/win32_msvc/utime.h,v 1.1 2006/06/07 22:24:45 momjian Exp $ */
|
@ -0,0 +1,108 @@ |
|||||||
|
/*-------------------------------------------------------------------------
|
||||||
|
* |
||||||
|
* dirent.c |
||||||
|
* opendir/readdir/closedir for win32/msvc |
||||||
|
* |
||||||
|
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group |
||||||
|
* Portions Copyright (c) 1994, Regents of the University of California |
||||||
|
* |
||||||
|
* |
||||||
|
* IDENTIFICATION |
||||||
|
* $PostgreSQL: pgsql/src/port/dirent.c,v 1.1 2006/06/07 22:24:46 momjian Exp $ |
||||||
|
* |
||||||
|
*------------------------------------------------------------------------- |
||||||
|
*/ |
||||||
|
|
||||||
|
#include "postgres.h" |
||||||
|
#include <dirent.h> |
||||||
|
|
||||||
|
|
||||||
|
struct DIR { |
||||||
|
char *dirname; |
||||||
|
struct dirent ret; /* Used to return to caller */ |
||||||
|
HANDLE handle; |
||||||
|
}; |
||||||
|
|
||||||
|
DIR* opendir(const char *dirname) |
||||||
|
{ |
||||||
|
DWORD attr; |
||||||
|
DIR *d; |
||||||
|
|
||||||
|
/* Make sure it is a directory */ |
||||||
|
attr = GetFileAttributes(dirname); |
||||||
|
if (attr == INVALID_FILE_ATTRIBUTES)
|
||||||
|
{ |
||||||
|
errno = ENOENT; |
||||||
|
return NULL; |
||||||
|
} |
||||||
|
if ((attr & FILE_ATTRIBUTE_DIRECTORY) != FILE_ATTRIBUTE_DIRECTORY) |
||||||
|
{ |
||||||
|
errno = ENOTDIR; |
||||||
|
return NULL; |
||||||
|
} |
||||||
|
|
||||||
|
d = malloc(sizeof(DIR)); |
||||||
|
if (!d) |
||||||
|
{ |
||||||
|
errno = ENOMEM; |
||||||
|
return NULL; |
||||||
|
} |
||||||
|
d->dirname = malloc(strlen(dirname)+4); |
||||||
|
if (!d->dirname) |
||||||
|
{ |
||||||
|
errno = ENOMEM; |
||||||
|
free(d); |
||||||
|
return NULL; |
||||||
|
} |
||||||
|
strcpy(d->dirname, dirname); |
||||||
|
if (d->dirname[strlen(d->dirname)-1] != '/' && |
||||||
|
d->dirname[strlen(d->dirname)-1] != '\\') |
||||||
|
strcat(d->dirname,"\\"); /* Append backslash if not already there */ |
||||||
|
strcat(d->dirname,"*"); /* Search for entries named anything */ |
||||||
|
d->handle = INVALID_HANDLE_VALUE; |
||||||
|
d->ret.d_ino = 0; /* no inodes on win32 */ |
||||||
|
d->ret.d_reclen = 0; /* not used on win32 */ |
||||||
|
|
||||||
|
return d; |
||||||
|
} |
||||||
|
|
||||||
|
struct dirent* readdir(DIR * d) |
||||||
|
{ |
||||||
|
WIN32_FIND_DATA fd; |
||||||
|
|
||||||
|
if (d->handle == INVALID_HANDLE_VALUE) |
||||||
|
{ |
||||||
|
d->handle = FindFirstFile(d->dirname, &fd); |
||||||
|
if (d->handle == INVALID_HANDLE_VALUE) |
||||||
|
{ |
||||||
|
errno = ENOENT; |
||||||
|
return NULL; |
||||||
|
} |
||||||
|
} |
||||||
|
else
|
||||||
|
{ |
||||||
|
if (!FindNextFile(d->handle, &fd)) |
||||||
|
{ |
||||||
|
if (GetLastError() == ERROR_NO_MORE_FILES) |
||||||
|
{ |
||||||
|
/* No more files, force errno=0 (unlike mingw) */ |
||||||
|
errno = 0; |
||||||
|
return NULL; |
||||||
|
} |
||||||
|
_dosmaperr(GetLastError()); |
||||||
|
return NULL; |
||||||
|
} |
||||||
|
} |
||||||
|
strcpy(d->ret.d_name, fd.cFileName); /* Both strings are MAX_PATH long */ |
||||||
|
d->ret.d_namlen = strlen(d->ret.d_name); |
||||||
|
return &d->ret; |
||||||
|
} |
||||||
|
|
||||||
|
int closedir(DIR *d) |
||||||
|
{ |
||||||
|
if (d->handle != INVALID_HANDLE_VALUE) |
||||||
|
FindClose(d->handle); |
||||||
|
free(d->dirname); |
||||||
|
free(d); |
||||||
|
return 0; |
||||||
|
} |
@ -0,0 +1,200 @@ |
|||||||
|
/*-------------------------------------------------------------------------
|
||||||
|
* |
||||||
|
* win32error.c |
||||||
|
* Map win32 error codes to errno values |
||||||
|
* |
||||||
|
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group |
||||||
|
* |
||||||
|
* IDENTIFICATION |
||||||
|
* $PostgreSQL: pgsql/src/port/win32error.c,v 1.1 2006/06/07 22:24:46 momjian Exp $ |
||||||
|
* |
||||||
|
*------------------------------------------------------------------------- |
||||||
|
*/ |
||||||
|
|
||||||
|
#include "postgres.h" |
||||||
|
|
||||||
|
static const struct |
||||||
|
{ |
||||||
|
DWORD winerr; |
||||||
|
int doserr; |
||||||
|
} doserrors[] = |
||||||
|
|
||||||
|
{ |
||||||
|
{ |
||||||
|
ERROR_INVALID_FUNCTION, EINVAL |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_FILE_NOT_FOUND, ENOENT |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_PATH_NOT_FOUND, ENOENT |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_TOO_MANY_OPEN_FILES, EMFILE |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_ACCESS_DENIED, EACCES |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_INVALID_HANDLE, EBADF |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_ARENA_TRASHED, ENOMEM |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_NOT_ENOUGH_MEMORY, ENOMEM |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_INVALID_BLOCK, ENOMEM |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_BAD_ENVIRONMENT, E2BIG |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_BAD_FORMAT, ENOEXEC |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_INVALID_ACCESS, EINVAL |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_INVALID_DATA, EINVAL |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_INVALID_DRIVE, ENOENT |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_CURRENT_DIRECTORY, EACCES |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_NOT_SAME_DEVICE, EXDEV |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_NO_MORE_FILES, ENOENT |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_LOCK_VIOLATION, EACCES |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_SHARING_VIOLATION, EACCES |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_BAD_NETPATH, ENOENT |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_NETWORK_ACCESS_DENIED, EACCES |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_BAD_NET_NAME, ENOENT |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_FILE_EXISTS, EEXIST |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_CANNOT_MAKE, EACCES |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_FAIL_I24, EACCES |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_INVALID_PARAMETER, EINVAL |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_NO_PROC_SLOTS, EAGAIN |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_DRIVE_LOCKED, EACCES |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_BROKEN_PIPE, EPIPE |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_DISK_FULL, ENOSPC |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_INVALID_TARGET_HANDLE, EBADF |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_INVALID_HANDLE, EINVAL |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_WAIT_NO_CHILDREN, ECHILD |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_CHILD_NOT_COMPLETE, ECHILD |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_DIRECT_ACCESS_HANDLE, EBADF |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_NEGATIVE_SEEK, EINVAL |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_SEEK_ON_DEVICE, EACCES |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_DIR_NOT_EMPTY, ENOTEMPTY |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_NOT_LOCKED, EACCES |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_BAD_PATHNAME, ENOENT |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_MAX_THRDS_REACHED, EAGAIN |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_LOCK_FAILED, EACCES |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_ALREADY_EXISTS, EEXIST |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_FILENAME_EXCED_RANGE, ENOENT |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_NESTING_NOT_ALLOWED, EAGAIN |
||||||
|
}, |
||||||
|
{ |
||||||
|
ERROR_NOT_ENOUGH_QUOTA, ENOMEM |
||||||
|
} |
||||||
|
}; |
||||||
|
|
||||||
|
void |
||||||
|
_dosmaperr(unsigned long e) |
||||||
|
{ |
||||||
|
int i; |
||||||
|
|
||||||
|
if (e == 0) |
||||||
|
{ |
||||||
|
errno = 0; |
||||||
|
return; |
||||||
|
} |
||||||
|
|
||||||
|
for (i = 0; i < lengthof(doserrors); i++) |
||||||
|
{ |
||||||
|
if (doserrors[i].winerr == e) |
||||||
|
{ |
||||||
|
errno = doserrors[i].doserr; |
||||||
|
#ifndef FRONTEND |
||||||
|
ereport(DEBUG5, |
||||||
|
(errmsg_internal("mapped win32 error code %lu to %d", |
||||||
|
e, errno))); |
||||||
|
#else |
||||||
|
fprintf(stderr, _("mapped win32 error code %lu to %d"), e, errno); |
||||||
|
#endif |
||||||
|
return; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
#ifndef FRONTEND |
||||||
|
ereport(LOG, |
||||||
|
(errmsg_internal("unrecognized win32 error code: %lu", |
||||||
|
e))); |
||||||
|
#else |
||||||
|
fprintf(stderr, _("unrecognized win32 error code: %lu"), e); |
||||||
|
#endif |
||||||
|
|
||||||
|
errno = EINVAL; |
||||||
|
return; |
||||||
|
} |
Loading…
Reference in new issue