File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 6
6
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
7
7
* Portions Copyright (c) 1994, Regents of the University of California
8
8
*
9
- * $PostgreSQL: pgsql/src/include/port.h,v 1.120 2008/04/11 23:53:00 tgl Exp $
9
+ * $PostgreSQL: pgsql/src/include/port.h,v 1.121 2008/04/16 14:19:56 adunstan Exp $
10
10
*
11
11
*-------------------------------------------------------------------------
12
12
*/
@@ -287,8 +287,11 @@ extern bool rmtree(char *path, bool rmtopdir);
287
287
*
288
288
* We must pull in sys/stat.h here so the system header definition
289
289
* goes in first, and we redefine that, and not the other way around.
290
+ *
291
+ * Some frontends don't need the size from stat, so if UNSAFE_STAT_OK
292
+ * is defined we don't bother with this.
290
293
*/
291
- #if defined(WIN32 ) && !defined(__CYGWIN__ )
294
+ #if defined(WIN32 ) && !defined(__CYGWIN__ ) && !defined( UNSAFE_STAT_OK )
292
295
#include <sys/stat.h>
293
296
extern int pgwin32_safestat (const char * path , struct stat * buf );
294
297
#define stat (a ,b ) pgwin32_safestat(a,b)
Original file line number Diff line number Diff line change 5
5
# Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
6
6
# Portions Copyright (c) 1994, Regents of the University of California
7
7
#
8
- # $PostgreSQL: pgsql/src/interfaces/libpq/Makefile,v 1.165 2008/04/07 14:15:58 petere Exp $
8
+ # $PostgreSQL: pgsql/src/interfaces/libpq/Makefile,v 1.166 2008/04/16 14:19:56 adunstan Exp $
9
9
#
10
10
# -------------------------------------------------------------------------
11
11
@@ -19,7 +19,7 @@ NAME= pq
19
19
SO_MAJOR_VERSION = 5
20
20
SO_MINOR_VERSION = 2
21
21
22
- override CPPFLAGS := -DFRONTEND -I$(srcdir ) $(CPPFLAGS ) -I$(top_builddir ) /src/port
22
+ override CPPFLAGS := -DFRONTEND -DUNSAFE_STAT_OK - I$(srcdir ) $(CPPFLAGS ) -I$(top_builddir ) /src/port
23
23
ifneq ($(PORTNAME ) , win32)
24
24
override CFLAGS += $(PTHREAD_CFLAGS )
25
25
endif
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ package Mkvcbuild;
3
3
#
4
4
# Package that generates build files for msvc build
5
5
#
6
- # $PostgreSQL: pgsql/src/tools/msvc/Mkvcbuild.pm,v 1.26 2008/02/28 12:17:59 mha Exp $
6
+ # $PostgreSQL: pgsql/src/tools/msvc/Mkvcbuild.pm,v 1.27 2008/04/16 14:19:56 adunstan Exp $
7
7
#
8
8
use Carp;
9
9
use Win32;
@@ -127,6 +127,7 @@ sub mkvcbuild
127
127
128
128
$libpq = $solution -> AddProject(' libpq' ,' dll' ,' interfaces' ,' src\interfaces\libpq' );
129
129
$libpq -> AddDefine(' FRONTEND' );
130
+ $libpq -> AddDefine(' UNSAFE_STAT_OK' );
130
131
$libpq -> AddIncludeDir(' src\port' );
131
132
$libpq -> AddLibrary(' wsock32.lib' );
132
133
$libpq -> AddLibrary(' secur32.lib' );
You can’t perform that action at this time.
0 commit comments