From 07d35e4277da141475793cc67c373183ecd71453 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Wed, 7 May 2003 03:47:08 +0000 Subject: Change alternate database location patch to test for symlink() rather than WIN32. --- src/backend/commands/dbcommands.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/backend/commands/dbcommands.c') diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c index 6a680bc1a19..1c3b554c291 100644 --- a/src/backend/commands/dbcommands.c +++ b/src/backend/commands/dbcommands.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.113 2003/05/04 04:42:52 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.114 2003/05/07 03:47:08 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -174,8 +174,8 @@ createdb(const CreatedbStmt *stmt) /* don't call this in a transaction block */ PreventTransactionChain((void *) stmt, "CREATE DATABASE"); -#ifdef WIN32 - if (dbpath != NULL) /* platform has no symlinks */ +#ifndef HAVE_SYMLINK + if (dbpath != NULL) elog(ERROR, "CREATE DATABASE: may not use an alternate location on this platform"); #endif @@ -301,7 +301,7 @@ createdb(const CreatedbStmt *stmt) /* Make the symlink, if needed */ if (alt_loc) { -#ifndef WIN32 /* already throws error on WIN32 above */ +#ifdef HAVE_SYMLINK /* already throws error above */ if (symlink(alt_loc, nominal_loc) != 0) #endif elog(ERROR, "CREATE DATABASE: could not link '%s' to '%s': %m", -- cgit v1.2.3