Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
5e01aa7a
Commit
5e01aa7a
authored
Aug 08, 2004
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixups for Win32 symlinks.
parent
9b3caebb
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
7 deletions
+28
-7
configure
configure
+7
-1
configure.in
configure.in
+5
-2
src/backend/commands/tablespace.c
src/backend/commands/tablespace.c
+10
-1
src/port/dirmod.c
src/port/dirmod.c
+6
-3
No files found.
configure
View file @
5e01aa7a
...
...
@@ -12060,7 +12060,13 @@ LIBOBJS="$LIBOBJS copydir.$ac_objext"
LIBOBJS
=
"
$LIBOBJS
gettimeofday.
$ac_objext
"
LIBOBJS
=
"
$LIBOBJS
kill.
$ac_objext
"
LIBOBJS
=
"
$LIBOBJS
open.
$ac_objext
"
LIBOBJS
=
"
$LIBOBJS
rand.
$ac_objext
"
;;
LIBOBJS
=
"
$LIBOBJS
rand.
$ac_objext
"
cat
>>
confdefs.h
<<
\
_ACEOF
#define HAVE_SYMLINK 1
_ACEOF
;;
esac
if
test
"
$with_readline
"
=
yes
;
then
...
...
configure.in
View file @
5e01aa7a
dnl Process this file with autoconf to produce a configure script.
dnl $PostgreSQL: pgsql/configure.in,v 1.37
1 2004/08/04 21:33:35 tgl
Exp $
dnl $PostgreSQL: pgsql/configure.in,v 1.37
2 2004/08/08 01:31:09 momjian
Exp $
dnl
dnl Developers, please strive to achieve this order:
dnl
...
...
@@ -908,7 +908,10 @@ AC_LIBOBJ(copydir)
AC_LIBOBJ(gettimeofday)
AC_LIBOBJ(kill)
AC_LIBOBJ(open)
AC_LIBOBJ(rand) ;;
AC_LIBOBJ(rand)
AC_DEFINE([HAVE_SYMLINK], 1,
[Define to 1 if you have the `symlink' function.])
;;
esac
if test "$with_readline" = yes; then
...
...
src/backend/commands/tablespace.c
View file @
5e01aa7a
...
...
@@ -45,7 +45,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/tablespace.c,v 1.
7 2004/08/01 20:30:48 tgl
Exp $
* $PostgreSQL: pgsql/src/backend/commands/tablespace.c,v 1.
8 2004/08/08 01:31:11 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -482,11 +482,20 @@ DropTableSpace(DropTableSpaceStmt *stmt)
errmsg
(
"could not unlink file
\"
%s
\"
: %m"
,
subfile
)));
#ifndef WIN32
if
(
unlink
(
location
)
<
0
)
ereport
(
ERROR
,
(
errcode_for_file_access
(),
errmsg
(
"could not unlink symbolic link
\"
%s
\"
: %m"
,
location
)));
#else
/* The junction is a directory, not a file */
if
(
rmdir
(
location
)
<
0
)
ereport
(
ERROR
,
(
errcode_for_file_access
(),
errmsg
(
"could not remove junction dir
\"
%s
\"
: %m"
,
location
)));
#endif
pfree
(
subfile
);
pfree
(
location
);
...
...
src/port/dirmod.c
View file @
5e01aa7a
...
...
@@ -10,7 +10,7 @@
* Win32 (NT, Win2k, XP). replace() doesn't work on Win95/98/Me.
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/port/dirmod.c,v 1.1
4 2004/08/07 21:48:09
momjian Exp $
* $PostgreSQL: pgsql/src/port/dirmod.c,v 1.1
5 2004/08/08 01:31:15
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -153,9 +153,9 @@ pgsymlink(const char *oldpath, const char *newpath)
{
HANDLE
dirhandle
;
DWORD
len
;
char
*
p
=
nativeTarget
;
char
buffer
[
MAX_PATH
*
sizeof
(
WCHAR
)
+
sizeof
(
REPARSE_JUNCTION_DATA_BUFFER
)];
char
nativeTarget
[
MAX_PATH
];
char
*
p
=
nativeTarget
;
REPARSE_JUNCTION_DATA_BUFFER
*
reparseBuf
=
(
REPARSE_JUNCTION_DATA_BUFFER
*
)
buffer
;
CreateDirectory
(
newpath
,
0
);
...
...
@@ -203,9 +203,12 @@ pgsymlink(const char *oldpath, const char *newpath)
NULL
,
GetLastError
(),
MAKELANGID
(
LANG_NEUTRAL
,
SUBLANG_DEFAULT
),
(
LPSTR
)
&
msg
,
0
,
NULL
);
#ifdef FRONTEND
fprintf
(
stderr
,
"Error setting junction for %s: %s"
,
nativeTarget
,
msg
);
#else
ereport
(
ERROR
,
(
errcode_for_file_access
(),
errmsg
(
"Error setting junction for %s: %s"
,
nativeTarget
,
msg
)));
#endif
LocalFree
(
msg
);
CloseHandle
(
dirhandle
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment