1 /* $Header: /cvsroot/pgsql/src/include/port/win32.h,v 1.7 2003/04/18 01:03:42 momjian Exp $ */
3 #include <port/win32defs.h>
8 /* defines for dynamic linking on Win32 platform */
11 #if __GNUC__ && ! defined (__declspec)
12 #error You need egcs 1.1 or newer for compiling!
16 #define DLLIMPORT __declspec (dllexport)
17 #else /* not BUILDING_DLL */
18 #define DLLIMPORT __declspec (dllimport)
21 #elif defined(WIN32) && defined(_MSC_VER) /* not CYGWIN */
24 #define DLLIMPORT __declspec (dllexport)
26 #define DLLIMPORT __declspec (dllimport)
29 #else /* not CYGWIN, not MSVC */
36 * Supplement to <sys/types.h>.
40 #define pid_t unsigned long
44 #define ushort unsigned short
47 * Supplement to <sys/stat.h>.
51 #define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR)
52 #define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG)
54 #define S_IRUSR _S_IREAD
55 #define S_IWUSR _S_IWRITE
56 #define S_IXUSR _S_IEXEC
57 #define S_IRWXU (_S_IREAD | _S_IWRITE | _S_IEXEC)
60 * Supplement to <errno.h>.
65 #define EINTR WSAEINTR
66 #define EAGAIN WSAEWOULDBLOCK
67 #define EMSGSIZE WSAEMSGSIZE
68 #define EAFNOSUPPORT WSAEAFNOSUPPORT
69 #define EWOULDBLOCK WSAEWOULDBLOCK
70 #define ECONNRESET WSAECONNRESET
71 #define EINPROGRESS WSAEINPROGRESS
74 * Supplement to <math.h>.
77 #define finite _finite
78 extern double rint(double x);
81 * Supplement to <stdio.h>.
83 #define snprintf _snprintf
84 #define vsnprintf _vsnprintf