Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc0c4883

Browse files
committed
Use native Cygwin symlinks so tablespaces work on Win95/98/ME which
don't support junction points. Doesn't affect native Win32.
1 parent669ca7a commitc0c4883

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

‎src/include/port.h

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
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 $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -167,18 +167,26 @@ extern intpclose_check(FILE *stream);
167167
*/
168168
externintpgrename(constchar*from,constchar*to);
169169
externintpgunlink(constchar*path);
170-
externintpgsymlink(constchar*oldpath,constchar*newpath);
171-
172170
/* Include this first so later includes don't see these defines */
173171
#ifdefWIN32_CLIENT_ONLY
174172
#include<io.h>
175173
#endif
176174

177175
#definerename(from,to)pgrename(from, to)
178176
#defineunlink(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+
#ifdefWIN32
184+
externintpgsymlink(constchar*oldpath,constchar*newpath);
179185
#definesymlink(oldpath,newpath)pgsymlink(oldpath, newpath)
180186
#endif
181187

188+
#endif
189+
182190
externboolrmtree(char*path,boolrmtopdir);
183191

184192
#ifdefWIN32

‎src/port/dirmod.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*Win32 (NT, Win2k, XP).replace() doesn't work on Win95/98/Me.
1111
*
1212
* 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 $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -142,6 +142,7 @@ pgunlink(const char *path)
142142
}
143143

144144

145+
#ifdefWIN32/* Cygwin has its own symlinks */
145146
/*
146147
*pgsymlink support:
147148
*
@@ -160,9 +161,7 @@ typedef struct
160161
WORDPrintNameOffset;
161162
WORDPrintNameLength;
162163
WCHARPathBuffer[1];
163-
}
164-
165-
REPARSE_JUNCTION_DATA_BUFFER;
164+
}REPARSE_JUNCTION_DATA_BUFFER;
166165

167166
#defineREPARSE_JUNCTION_DATA_BUFFER_HEADER_SIZE \
168167
FIELD_OFFSET(REPARSE_JUNCTION_DATA_BUFFER, SubstituteNameOffset)
@@ -246,6 +245,7 @@ pgsymlink(const char *oldpath, const char *newpath)
246245
return0;
247246
}
248247
#endif
248+
#endif
249249

250250

251251
/* We undefined this above, so we redefine it */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp