Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
c0c4883b
Commit
c0c4883b
authored
20 years ago
by
Bruce Momjian
Browse files
Options
Downloads
Patches
Plain Diff
Use native Cygwin symlinks so tablespaces work on Win95/98/ME which
don't support junction points. Doesn't affect native Win32.
parent
669ca7af
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/include/port.h
+11
-3
11 additions, 3 deletions
src/include/port.h
src/port/dirmod.c
+4
-4
4 additions, 4 deletions
src/port/dirmod.c
with
15 additions
and
7 deletions
src/include/port.h
+
11
−
3
View file @
c0c4883b
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* $PostgreSQL: pgsql/src/include/port.h,v 1.6
3
2004/
09/27 23:24
:3
7
momjian Exp $
* $PostgreSQL: pgsql/src/include/port.h,v 1.6
4
2004/
10/11 22:50
:3
3
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -167,8 +167,6 @@ extern int pclose_check(FILE *stream);
...
@@ -167,8 +167,6 @@ extern int pclose_check(FILE *stream);
*/
*/
extern
int
pgrename
(
const
char
*
from
,
const
char
*
to
);
extern
int
pgrename
(
const
char
*
from
,
const
char
*
to
);
extern
int
pgunlink
(
const
char
*
path
);
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 */
/* Include this first so later includes don't see these defines */
#ifdef WIN32_CLIENT_ONLY
#ifdef WIN32_CLIENT_ONLY
#include
<io.h>
#include
<io.h>
...
@@ -176,9 +174,19 @@ extern int pgsymlink(const char *oldpath, const char *newpath);
...
@@ -176,9 +174,19 @@ extern int pgsymlink(const char *oldpath, const char *newpath);
#define rename(from, to) pgrename(from, to)
#define rename(from, to) pgrename(from, to)
#define unlink(path) pgunlink(path)
#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)
#define symlink(oldpath, newpath) pgsymlink(oldpath, newpath)
#endif
#endif
#endif
extern
bool
rmtree
(
char
*
path
,
bool
rmtopdir
);
extern
bool
rmtree
(
char
*
path
,
bool
rmtopdir
);
#ifdef WIN32
#ifdef WIN32
...
...
This diff is collapsed.
Click to expand it.
src/port/dirmod.c
+
4
−
4
View file @
c0c4883b
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
* Win32 (NT, Win2k, XP). replace() doesn't work on Win95/98/Me.
* Win32 (NT, Win2k, XP). replace() doesn't work on Win95/98/Me.
*
*
* IDENTIFICATION
* IDENTIFICATION
* $PostgreSQL: pgsql/src/port/dirmod.c,v 1.2
7
2004/
09/27 19:16:02
momjian Exp $
* $PostgreSQL: pgsql/src/port/dirmod.c,v 1.2
8
2004/
10/11 22:50:48
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -142,6 +142,7 @@ pgunlink(const char *path)
...
@@ -142,6 +142,7 @@ pgunlink(const char *path)
}
}
#ifdef WIN32
/* Cygwin has its own symlinks */
/*
/*
* pgsymlink support:
* pgsymlink support:
*
*
...
@@ -160,9 +161,7 @@ typedef struct
...
@@ -160,9 +161,7 @@ typedef struct
WORD
PrintNameOffset
;
WORD
PrintNameOffset
;
WORD
PrintNameLength
;
WORD
PrintNameLength
;
WCHAR
PathBuffer
[
1
];
WCHAR
PathBuffer
[
1
];
}
}
REPARSE_JUNCTION_DATA_BUFFER
;
REPARSE_JUNCTION_DATA_BUFFER
;
#define REPARSE_JUNCTION_DATA_BUFFER_HEADER_SIZE \
#define REPARSE_JUNCTION_DATA_BUFFER_HEADER_SIZE \
FIELD_OFFSET(REPARSE_JUNCTION_DATA_BUFFER, SubstituteNameOffset)
FIELD_OFFSET(REPARSE_JUNCTION_DATA_BUFFER, SubstituteNameOffset)
...
@@ -246,6 +245,7 @@ pgsymlink(const char *oldpath, const char *newpath)
...
@@ -246,6 +245,7 @@ pgsymlink(const char *oldpath, const char *newpath)
return
0
;
return
0
;
}
}
#endif
#endif
#endif
/* We undefined this above, so we redefine it */
/* We undefined this above, so we redefine it */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment