Index: src/include/port.h =================================================================== RCS file: /cvsroot/pgsql/src/include/port.h,v retrieving revision 1.63 diff -c -c -r1.63 port.h *** src/include/port.h 27 Sep 2004 23:24:37 -0000 1.63 --- src/include/port.h 11 Oct 2004 22:36:50 -0000 *************** *** 167,174 **** */ 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 --- 167,172 ---- *************** *** 176,184 **** --- 174,193 ---- #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 work, 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 Index: src/port/dirmod.c =================================================================== RCS file: /cvsroot/pgsql/src/port/dirmod.c,v retrieving revision 1.27 diff -c -c -r1.27 dirmod.c *** src/port/dirmod.c 27 Sep 2004 19:16:02 -0000 1.27 --- src/port/dirmod.c 11 Oct 2004 22:36:53 -0000 *************** *** 142,147 **** --- 142,148 ---- } + #ifdef WIN32 /* Cygwin has its own symlinks */ /* * pgsymlink support: * *************** *** 160,168 **** WORD PrintNameOffset; WORD PrintNameLength; WCHAR PathBuffer[1]; ! } ! ! REPARSE_JUNCTION_DATA_BUFFER; #define REPARSE_JUNCTION_DATA_BUFFER_HEADER_SIZE \ FIELD_OFFSET(REPARSE_JUNCTION_DATA_BUFFER, SubstituteNameOffset) --- 161,167 ---- WORD PrintNameOffset; WORD PrintNameLength; WCHAR PathBuffer[1]; ! } REPARSE_JUNCTION_DATA_BUFFER; #define REPARSE_JUNCTION_DATA_BUFFER_HEADER_SIZE \ FIELD_OFFSET(REPARSE_JUNCTION_DATA_BUFFER, SubstituteNameOffset) *************** *** 246,251 **** --- 245,251 ---- return 0; } #endif + #endif /* We undefined this above, so we redefine it */