mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Add Win32 versions of unlink and rename --- loop until success.
This commit is contained in:
		
							
								
								
									
										9
									
								
								configure
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										9
									
								
								configure
									
									
									
									
										vendored
									
									
								
							@@ -11145,8 +11145,13 @@ ac_cv_func_fseeko=yes
 | 
				
			|||||||
esac
 | 
					esac
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Solaris has a very slow qsort in certain cases, so we replace it.
 | 
					# Solaris has a very slow qsort in certain cases, so we replace it.
 | 
				
			||||||
case $host_os in
 | 
					case $host_os in solaris*)
 | 
				
			||||||
  solaris*) LIBOBJS="$LIBOBJS qsort.$ac_objext" ;;
 | 
					LIBOBJS="$LIBOBJS qsort.$ac_objext" ;;
 | 
				
			||||||
 | 
					esac
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Win32 can't to rename or unlink on an open file
 | 
				
			||||||
 | 
					case $host_os in win32*)
 | 
				
			||||||
 | 
					LIBOBJS="$LIBOBJS dirmod.$ac_objext" ;;
 | 
				
			||||||
esac
 | 
					esac
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# On HPUX 9, rint() is not in regular libm.a but in /lib/pa1.1/libm.a;
 | 
					# On HPUX 9, rint() is not in regular libm.a but in /lib/pa1.1/libm.a;
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										11
									
								
								configure.in
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								configure.in
									
									
									
									
									
								
							@@ -1,5 +1,5 @@
 | 
				
			|||||||
dnl Process this file with autoconf to produce a configure script.
 | 
					dnl Process this file with autoconf to produce a configure script.
 | 
				
			||||||
dnl $Header: /cvsroot/pgsql/configure.in,v 1.242 2003/04/06 22:45:22 petere Exp $
 | 
					dnl $Header: /cvsroot/pgsql/configure.in,v 1.243 2003/04/22 02:18:09 momjian Exp $
 | 
				
			||||||
dnl
 | 
					dnl
 | 
				
			||||||
dnl Developers, please strive to achieve this order:
 | 
					dnl Developers, please strive to achieve this order:
 | 
				
			||||||
dnl
 | 
					dnl
 | 
				
			||||||
@@ -856,8 +856,13 @@ ac_cv_func_fseeko=yes
 | 
				
			|||||||
esac
 | 
					esac
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Solaris has a very slow qsort in certain cases, so we replace it.
 | 
					# Solaris has a very slow qsort in certain cases, so we replace it.
 | 
				
			||||||
case $host_os in
 | 
					case $host_os in solaris*) 
 | 
				
			||||||
  solaris*) AC_LIBOBJ(qsort) ;;
 | 
					AC_LIBOBJ(qsort) ;;
 | 
				
			||||||
 | 
					esac
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Win32 can't to rename or unlink on an open file
 | 
				
			||||||
 | 
					case $host_os in win32*) 
 | 
				
			||||||
 | 
					AC_LIBOBJ(dirmod) ;;
 | 
				
			||||||
esac
 | 
					esac
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# On HPUX 9, rint() is not in regular libm.a but in /lib/pa1.1/libm.a;
 | 
					# On HPUX 9, rint() is not in regular libm.a but in /lib/pa1.1/libm.a;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -12,7 +12,7 @@
 | 
				
			|||||||
 * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
 | 
					 * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
 | 
				
			||||||
 * Portions Copyright (c) 1994, Regents of the University of California
 | 
					 * Portions Copyright (c) 1994, Regents of the University of California
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * $Id: c.h,v 1.138 2003/04/18 01:03:42 momjian Exp $
 | 
					 * $Id: c.h,v 1.139 2003/04/22 02:18:09 momjian Exp $
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *-------------------------------------------------------------------------
 | 
					 *-------------------------------------------------------------------------
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
@@ -711,6 +711,17 @@ int fseeko(FILE *stream, off_t offset, int whence);
 | 
				
			|||||||
off_t ftello(FILE *stream);
 | 
					off_t ftello(FILE *stream);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * Win32 doesn't have reliable rename/unlink during concurrent access
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					#ifdef WIN32
 | 
				
			||||||
 | 
					int pgrename(const char *from, const char *to);
 | 
				
			||||||
 | 
					int pgunlink(const char *path);      
 | 
				
			||||||
 | 
					#define rename(path)		pgrename(path)
 | 
				
			||||||
 | 
					#define unlink(from, to)	pgunlink(from, to)
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
/* These are for things that are one way on Unix and another on NT */
 | 
					/* These are for things that are one way on Unix and another on NT */
 | 
				
			||||||
#define NULL_DEV		"/dev/null"
 | 
					#define NULL_DEV		"/dev/null"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user