1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-03 15:22:11 +03:00

Use native Cygwin symlinks so tablespaces work on Win95/98/ME which

don't support junction points.  Doesn't affect native Win32.
This commit is contained in:
Bruce Momjian
2004-10-11 22:50:48 +00:00
parent 669ca7af83
commit c0c4883be3
2 changed files with 15 additions and 7 deletions

View File

@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/port.h,v 1.63 2004/09/27 23:24:37 momjian Exp $
* $PostgreSQL: pgsql/src/include/port.h,v 1.64 2004/10/11 22:50:33 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -167,8 +167,6 @@ extern int pclose_check(FILE *stream);
*/
extern int pgrename(const char *from, const char *to);
extern int pgunlink(const char *path);
extern int pgsymlink(const char *oldpath, const char *newpath);
/* Include this first so later includes don't see these defines */
#ifdef WIN32_CLIENT_ONLY
#include <io.h>
@@ -176,9 +174,19 @@ extern int pgsymlink(const char *oldpath, const char *newpath);
#define rename(from, to) pgrename(from, to)
#define unlink(path) pgunlink(path)
/*
* Cygwin has its own symlinks which work on Win95/98/ME where
* junction points don't, so use it instead. We have no way of
* knowing what type of system Cygwin binaries will be run on.
*/
#ifdef WIN32
extern int pgsymlink(const char *oldpath, const char *newpath);
#define symlink(oldpath, newpath) pgsymlink(oldpath, newpath)
#endif
#endif
extern bool rmtree(char *path, bool rmtopdir);
#ifdef WIN32