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

Commit07d35e4

Browse files
committed
Change alternate database location patch to test for symlink() rather
than WIN32.
1 parent6165a27 commit07d35e4

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

‎configure

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3577,7 +3577,7 @@ else
35773577
then
35783578
echo'%%'> conftest.l
35793579
if$pgac_candidate -t conftest.l2>/dev/null| grep FLEX_SCANNER>/dev/null2>&1;then
3580-
if$pgac_candidate --version| grep'2\.5\.3$'>/dev/null2>&1;then
3580+
if$pgac_candidate --version| grep'2\.5\.3$'>/dev/null2>&1;then
35813581
pgac_broken_flex=$pgac_candidate
35823582
continue
35833583
fi
@@ -10305,7 +10305,8 @@ test $ac_cv_func_memcmp_working = no && LIBOBJS="$LIBOBJS memcmp.$ac_objext"
1030510305
1030610306
1030710307
10308-
forac_funcin cbrt dlopen fcvt fdatasync getpeereid memmove poll pstat setproctitle setsid sigprocmask sysconf utime utimes waitpid
10308+
10309+
forac_funcin cbrt dlopen fcvt fdatasync getpeereid memmove poll pstat setproctitle setsid sigprocmask symlink sysconf utime utimes waitpid
1030910310
do
1031010311
as_ac_var=`echo"ac_cv_func_$ac_func"|$as_tr_sh`
1031110312
echo"$as_me:$LINENO: checking for$ac_func">&5

‎configure.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dnl Process this file with autoconf to produce a configure script.
2-
dnl $Header: /cvsroot/pgsql/configure.in,v 1.244 2003/04/24 21:16:42 tgl Exp $
2+
dnl $Header: /cvsroot/pgsql/configure.in,v 1.245 2003/05/07 03:47:08 momjian Exp $
33
dnl
44
dnl Developers, please strive to achieve this order:
55
dnl
@@ -779,7 +779,7 @@ PGAC_FUNC_GETTIMEOFDAY_1ARG
779779
# SunOS doesn't handle negative byte comparisons properly with +/- return
780780
AC_FUNC_MEMCMP
781781

782-
AC_CHECK_FUNCS([cbrt dlopen fcvt fdatasync getpeereid memmove poll pstat setproctitle setsid sigprocmask sysconf utime utimes waitpid])
782+
AC_CHECK_FUNCS([cbrt dlopen fcvt fdatasync getpeereid memmove poll pstat setproctitle setsid sigprocmasksymlinksysconf utime utimes waitpid])
783783

784784
AC_CHECK_DECLS(fdatasync, [], [], [#include <unistd.h>])
785785

‎src/backend/commands/dbcommands.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.113 2003/05/04 04:42:52 momjian Exp $
12+
* $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.114 2003/05/07 03:47:08 momjian Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -174,8 +174,8 @@ createdb(const CreatedbStmt *stmt)
174174
/* don't call this in a transaction block */
175175
PreventTransactionChain((void*)stmt,"CREATE DATABASE");
176176

177-
#ifdefWIN32
178-
if (dbpath!=NULL)/* platform has no symlinks */
177+
#ifndefHAVE_SYMLINK
178+
if (dbpath!=NULL)
179179
elog(ERROR,"CREATE DATABASE: may not use an alternate location on this platform");
180180
#endif
181181

@@ -301,7 +301,7 @@ createdb(const CreatedbStmt *stmt)
301301
/* Make the symlink, if needed */
302302
if (alt_loc)
303303
{
304-
#ifndefWIN32/* already throws error on WIN32 above */
304+
#ifdefHAVE_SYMLINK/* already throws error above */
305305
if (symlink(alt_loc,nominal_loc)!=0)
306306
#endif
307307
elog(ERROR,"CREATE DATABASE: could not link '%s' to '%s': %m",

‎src/include/pg_config.h.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,9 @@
414414
/* Define to 1 if you have the <SupportDefs.h> header file. */
415415
#undef HAVE_SUPPORTDEFS_H
416416

417+
/* Define to 1 if you have the `symlink' function. */
418+
#undef HAVE_SYMLINK
419+
417420
/* Define to 1 if you have the `sysconf' function. */
418421
#undef HAVE_SYSCONF
419422

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp