-/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.64 2007/01/02 21:25:50 momjian Exp $ */
+/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.65 2007/01/11 02:42:31 momjian Exp $ */
#if defined(_MSC_VER) || defined(__BORLANDC__)
#define WIN32_ONLY_COMPILER
#include <signal.h>
#include <errno.h>
#include <direct.h>
+#ifndef __BORLANDC__
#include <sys/utime.h> /* for non-unicode version */
+#endif
#undef near
/* Must be here to avoid conflicting with prototype in windows.h */
#define SIGTTIN 21
#define SIGTTOU 22 /* Same as SIGABRT -- no problem, I hope */
#define SIGWINCH 28
+#ifndef __BORLANDC__
#define SIGUSR1 30
#define SIGUSR2 31
+#endif
struct timezone
{
/* Things that exist in MingW headers, but need to be added to MSVC */
#ifdef WIN32_ONLY_COMPILER
+#ifndef __BORLANDC__
typedef long ssize_t;
typedef unsigned short mode_t;
+#endif
/*
* Certain "standard edition" versions of MSVC throw a warning
#define inline __inline
#define __inline__ __inline
+#ifndef __BORLANDC__
#define _S_IRWXU (_S_IREAD | _S_IWRITE | _S_IEXEC)
#define _S_IXUSR _S_IEXEC
#define _S_IWUSR _S_IWRITE
#define S_IXUSR _S_IXUSR
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
+#endif
#define F_OK 0
#define W_OK 2
CLEAN :
-@erase "$(INTDIR)\getaddrinfo.obj"
-@erase "$(INTDIR)\pgstrcasecmp.obj"
- -@erase "$(INTDIR)\strlcpy.obj"
-@erase "$(INTDIR)\thread.obj"
-@erase "$(INTDIR)\inet_aton.obj"
-@erase "$(INTDIR)\crypt.obj"
-@erase "$(INTDIR)\wchar.obj"
-@erase "$(INTDIR)\encnames.obj"
-@erase "$(INTDIR)\pthread-win32.obj"
+ -@erase "$(INTDIR)\snprintf.obj"
+ -@erase "$(INTDIR)\strlcpy.obj"
-@erase "$(OUTDIR)\$(OUTFILENAME).lib"
-@erase "$(OUTDIR)\$(OUTFILENAME)dll.lib"
-@erase "$(OUTDIR)\libpq.res"
"$(INTDIR)\win32.obj" \
"$(INTDIR)\getaddrinfo.obj" \
"$(INTDIR)\pgstrcasecmp.obj" \
- "$(INTDIR)\strlcpy.obj" \
"$(INTDIR)\thread.obj" \
"$(INTDIR)\inet_aton.obj" \
"$(INTDIR)\crypt.obj" \
"$(INTDIR)\pqsignal.obj" \
"$(INTDIR)\wchar.obj" \
"$(INTDIR)\encnames.obj" \
+ "$(INTDIR)\snprintf.obj" \
+ "$(INTDIR)\strlcpy.obj" \
"$(INTDIR)\pthread-win32.obj"
$(LINK32_FLAGS) +
c0d32.obj $(LINK32_OBJS), +
$@,, +
- "$(OUTDIR)\blibpq.lib" import32.lib cw32mti.lib, +
+ "$(OUTDIR)\blibpq.lib" import32.lib cw32mt.lib, +
blibpqdll.def,"$(INTDIR)\libpq.res"
<<
implib -w "$(OUTDIR)\blibpqdll.lib" blibpqdll.def $@
$(CPP_PROJ) ..\..\port\pgstrcasecmp.c
<<
-"$(INTDIR)\strlcpy.obj" : ..\..\port\strlcpy.c
- $(CPP) @<<
- $(CPP_PROJ) ..\..\port\strlcpy.c
-<<
-
"$(INTDIR)\thread.obj" : ..\..\port\thread.c
$(CPP) @<<
$(CPP_PROJ) ..\..\port\thread.c
$(CPP_PROJ) /I"." ..\..\backend\utils\mb\encnames.c
<<
+"$(INTDIR)\snprintf.obj" : ..\..\port\snprintf.c
+ $(CPP) @<<
+ $(CPP_PROJ) /I"." ..\..\port\snprintf.c
+<<
+
+"$(INTDIR)\strlcpy.obj" : ..\..\port\strlcpy.c
+ $(CPP) @<<
+ $(CPP_PROJ) ..\..\port\strlcpy.c
+<<
+
+
.c.obj:
$(CPP) $(CPP_PROJ) $<