diff options
Diffstat (limited to 'src/port/exec.c')
-rw-r--r-- | src/port/exec.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/port/exec.c b/src/port/exec.c index dbdc04b0ba2..c8ba1227a15 100644 --- a/src/port/exec.c +++ b/src/port/exec.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/port/exec.c,v 1.15 2004/05/24 22:35:37 momjian Exp $ + * $PostgreSQL: pgsql/src/port/exec.c,v 1.16 2004/06/10 22:26:24 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -28,13 +28,6 @@ #define _(x) gettext(x) -/* $PATH (or %PATH%) path separator */ -#ifdef WIN32 -#define PATHSEP ';' -#else -#define PATHSEP ':' -#endif - #ifndef S_IRUSR /* XXX [TRH] should be in a header */ #define S_IRUSR S_IREAD #define S_IWUSR S_IWRITE @@ -196,7 +189,7 @@ find_my_exec(const char *argv0, char *retpath) * it). */ /* Does argv0 have a separator? */ - if ((path = last_path_separator(argv0))) + if ((path = last_dir_separator(argv0))) { if (*++path == '\0') { @@ -247,7 +240,7 @@ find_my_exec(const char *argv0, char *retpath) else startp = endp + 1; - endp = strchr(startp, PATHSEP); + endp = first_path_separator(startp); if (!endp) endp = startp + strlen(startp); /* point to end */ @@ -303,7 +296,7 @@ find_other_exec(const char *argv0, const char *target, return -1; /* Trim off program name and keep just directory */ - *last_path_separator(retpath) = '\0'; + *last_dir_separator(retpath) = '\0'; snprintf(retpath + strlen(retpath), MAXPGPATH - strlen(retpath), "/%s%s", target, EXE); |