mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Avoid using unnecessary pgwin32_safestat in libpq.
This commit is contained in:
		@@ -6,7 +6,7 @@
 | 
				
			|||||||
 * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
 | 
					 * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
 | 
				
			||||||
 * Portions Copyright (c) 1994, Regents of the University of California
 | 
					 * Portions Copyright (c) 1994, Regents of the University of California
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * $PostgreSQL: pgsql/src/include/port.h,v 1.120 2008/04/11 23:53:00 tgl Exp $
 | 
					 * $PostgreSQL: pgsql/src/include/port.h,v 1.121 2008/04/16 14:19:56 adunstan Exp $
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *-------------------------------------------------------------------------
 | 
					 *-------------------------------------------------------------------------
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
@@ -287,8 +287,11 @@ extern bool rmtree(char *path, bool rmtopdir);
 | 
				
			|||||||
 *
 | 
					 *
 | 
				
			||||||
 * We must pull in sys/stat.h here so the system header definition
 | 
					 * We must pull in sys/stat.h here so the system header definition
 | 
				
			||||||
 * goes in first, and we redefine that, and not the other way around.
 | 
					 * goes in first, and we redefine that, and not the other way around.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * Some frontends don't need the size from stat, so if UNSAFE_STAT_OK
 | 
				
			||||||
 | 
					 * is defined we don't bother with this.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#if defined(WIN32) && !defined(__CYGWIN__)
 | 
					#if defined(WIN32) && !defined(__CYGWIN__) && !defined(UNSAFE_STAT_OK)
 | 
				
			||||||
#include <sys/stat.h>
 | 
					#include <sys/stat.h>
 | 
				
			||||||
extern int	pgwin32_safestat(const char *path, struct stat *buf);
 | 
					extern int	pgwin32_safestat(const char *path, struct stat *buf);
 | 
				
			||||||
#define stat(a,b) pgwin32_safestat(a,b)
 | 
					#define stat(a,b) pgwin32_safestat(a,b)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,7 +5,7 @@
 | 
				
			|||||||
# Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
 | 
					# Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
 | 
				
			||||||
# Portions Copyright (c) 1994, Regents of the University of California
 | 
					# Portions Copyright (c) 1994, Regents of the University of California
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# $PostgreSQL: pgsql/src/interfaces/libpq/Makefile,v 1.165 2008/04/07 14:15:58 petere Exp $
 | 
					# $PostgreSQL: pgsql/src/interfaces/libpq/Makefile,v 1.166 2008/04/16 14:19:56 adunstan Exp $
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
#-------------------------------------------------------------------------
 | 
					#-------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -19,7 +19,7 @@ NAME= pq
 | 
				
			|||||||
SO_MAJOR_VERSION= 5
 | 
					SO_MAJOR_VERSION= 5
 | 
				
			||||||
SO_MINOR_VERSION= 2
 | 
					SO_MINOR_VERSION= 2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
override CPPFLAGS :=  -DFRONTEND -I$(srcdir) $(CPPFLAGS) -I$(top_builddir)/src/port
 | 
					override CPPFLAGS :=  -DFRONTEND -DUNSAFE_STAT_OK -I$(srcdir) $(CPPFLAGS) -I$(top_builddir)/src/port
 | 
				
			||||||
ifneq ($(PORTNAME), win32)
 | 
					ifneq ($(PORTNAME), win32)
 | 
				
			||||||
override CFLAGS += $(PTHREAD_CFLAGS)
 | 
					override CFLAGS += $(PTHREAD_CFLAGS)
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,7 +3,7 @@ package Mkvcbuild;
 | 
				
			|||||||
#
 | 
					#
 | 
				
			||||||
# Package that generates build files for msvc build
 | 
					# Package that generates build files for msvc build
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# $PostgreSQL: pgsql/src/tools/msvc/Mkvcbuild.pm,v 1.26 2008/02/28 12:17:59 mha Exp $
 | 
					# $PostgreSQL: pgsql/src/tools/msvc/Mkvcbuild.pm,v 1.27 2008/04/16 14:19:56 adunstan Exp $
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
use Carp;
 | 
					use Carp;
 | 
				
			||||||
use Win32;
 | 
					use Win32;
 | 
				
			||||||
@@ -127,6 +127,7 @@ sub mkvcbuild
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    $libpq = $solution->AddProject('libpq','dll','interfaces','src\interfaces\libpq');
 | 
					    $libpq = $solution->AddProject('libpq','dll','interfaces','src\interfaces\libpq');
 | 
				
			||||||
    $libpq->AddDefine('FRONTEND');
 | 
					    $libpq->AddDefine('FRONTEND');
 | 
				
			||||||
 | 
						$libpq->AddDefine('UNSAFE_STAT_OK');
 | 
				
			||||||
    $libpq->AddIncludeDir('src\port');
 | 
					    $libpq->AddIncludeDir('src\port');
 | 
				
			||||||
    $libpq->AddLibrary('wsock32.lib');
 | 
					    $libpq->AddLibrary('wsock32.lib');
 | 
				
			||||||
    $libpq->AddLibrary('secur32.lib');
 | 
					    $libpq->AddLibrary('secur32.lib');
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user