File tree 2 files changed +15
-7
lines changed
2 files changed +15
-7
lines changed Original file line number Diff line number Diff line change 6
6
* Portions Copyright (c) 1996-2004, 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.63 2004/09/27 23:24:37 momjian Exp $
9
+ * $PostgreSQL: pgsql/src/include/port.h,v 1.64 2004/10/11 22:50:33 momjian Exp $
10
10
*
11
11
*-------------------------------------------------------------------------
12
12
*/
@@ -167,18 +167,26 @@ extern int pclose_check(FILE *stream);
167
167
*/
168
168
extern int pgrename (const char * from , const char * to );
169
169
extern int pgunlink (const char * path );
170
- extern int pgsymlink (const char * oldpath , const char * newpath );
171
-
172
170
/* Include this first so later includes don't see these defines */
173
171
#ifdef WIN32_CLIENT_ONLY
174
172
#include <io.h>
175
173
#endif
176
174
177
175
#define rename (from , to ) pgrename(from, to)
178
176
#define unlink (path ) pgunlink(path)
177
+
178
+ /*
179
+ * Cygwin has its own symlinks which work on Win95/98/ME where
180
+ * junction points don't, so use it instead. We have no way of
181
+ * knowing what type of system Cygwin binaries will be run on.
182
+ */
183
+ #ifdef WIN32
184
+ extern int pgsymlink (const char * oldpath , const char * newpath );
179
185
#define symlink (oldpath , newpath ) pgsymlink(oldpath, newpath)
180
186
#endif
181
187
188
+ #endif
189
+
182
190
extern bool rmtree (char * path , bool rmtopdir );
183
191
184
192
#ifdef WIN32
Original file line number Diff line number Diff line change 10
10
* Win32 (NT, Win2k, XP). replace() doesn't work on Win95/98/Me.
11
11
*
12
12
* IDENTIFICATION
13
- * $PostgreSQL: pgsql/src/port/dirmod.c,v 1.27 2004/09/27 19:16:02 momjian Exp $
13
+ * $PostgreSQL: pgsql/src/port/dirmod.c,v 1.28 2004/10/11 22:50:48 momjian Exp $
14
14
*
15
15
*-------------------------------------------------------------------------
16
16
*/
@@ -142,6 +142,7 @@ pgunlink(const char *path)
142
142
}
143
143
144
144
145
+ #ifdef WIN32 /* Cygwin has its own symlinks */
145
146
/*
146
147
* pgsymlink support:
147
148
*
@@ -160,9 +161,7 @@ typedef struct
160
161
WORD PrintNameOffset ;
161
162
WORD PrintNameLength ;
162
163
WCHAR PathBuffer [1 ];
163
- }
164
-
165
- REPARSE_JUNCTION_DATA_BUFFER ;
164
+ } REPARSE_JUNCTION_DATA_BUFFER ;
166
165
167
166
#define REPARSE_JUNCTION_DATA_BUFFER_HEADER_SIZE \
168
167
FIELD_OFFSET(REPARSE_JUNCTION_DATA_BUFFER, SubstituteNameOffset)
@@ -246,6 +245,7 @@ pgsymlink(const char *oldpath, const char *newpath)
246
245
return 0 ;
247
246
}
248
247
#endif
248
+ #endif
249
249
250
250
251
251
/* We undefined this above, so we redefine it */
You can’t perform that action at this time.
0 commit comments