diff options
| author | Bruce Momjian | 2004-03-09 04:49:02 +0000 |
|---|---|---|
| committer | Bruce Momjian | 2004-03-09 04:49:02 +0000 |
| commit | f0f4e82f45462349bb30f3c4cc9792fa54525575 (patch) | |
| tree | c6034542251d490ca2526b58278b8fc2e9dae0a7 /src/bin | |
| parent | 96ef6682e3fd4e940ac2e9451eb70afa3625e8c3 (diff) | |
The win32 port backend will require the functionality provided by
canonicalize_path. Patch moves it from initdb.c to port/path.c.
Claudio Natoli
Diffstat (limited to 'src/bin')
| -rw-r--r-- | src/bin/initdb/initdb.c | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c index 5a9139cf106..cb44f7d0ad3 100644 --- a/src/bin/initdb/initdb.c +++ b/src/bin/initdb/initdb.c @@ -43,7 +43,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * Portions taken from FreeBSD. * - * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.22 2004/02/02 00:11:31 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.23 2004/03/09 04:49:02 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -151,7 +151,6 @@ char *pgpath; /* forward declare all our functions */ static bool rmtree(char *, bool); static void exit_nicely(void); -static void canonicalize_path(char *); #ifdef WIN32 static char *expanded_path(char *); #else @@ -289,31 +288,6 @@ rmtree(char *path, bool rmtopdir) /* - * make all paths look like unix, with forward slashes - * also strip any trailing slash. - * - * The Windows command processor will accept suitably quoted paths - * with forward slashes, but barfs badly with mixed forward and back - * slashes. Removing the trailing slash on a path means we never get - * ugly double slashes. Don't remove a leading slash, though. - */ -static void -canonicalize_path(char *path) -{ - char *p; - - for (p = path; *p; p++) - { -#ifdef WIN32 - if (*p == '\\') - *p = '/'; -#endif - } - if (p > path+1 && *--p == '/') - *p = '\0'; -} - -/* * make a copy of the array of lines, with token replaced by replacement * the first time it occurs on each line. * |
