diff options
| author | Bruce Momjian | 2004-06-10 16:35:18 +0000 |
|---|---|---|
| committer | Bruce Momjian | 2004-06-10 16:35:18 +0000 |
| commit | 10a3d19ad464296babb8680521dd8b1d5e086e15 (patch) | |
| tree | 6e33eb2fd944709202e91d6743083d7c1643daa1 /src/include | |
| parent | 93db6f6ae28ed8c9467ba26e95131ba7dfa94b20 (diff) | |
Handle multiple double-quoted strings using Win32's system() call.
Document limitations.
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/port.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/include/port.h b/src/include/port.h index 7ee0a138cd9..8d089a8e23e 100644 --- a/src/include/port.h +++ b/src/include/port.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/port.h,v 1.40 2004/06/03 00:07:38 momjian Exp $ + * $PostgreSQL: pgsql/src/include/port.h,v 1.41 2004/06/10 16:35:18 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -72,6 +72,18 @@ extern int find_other_exec(const char *argv0, const char *target, #define DEVNULL "/dev/null" #endif +/* + * Win32 needs double quotes at the beginning and end of system() + * strings. If not, it gets confused with multiple quoted strings. + * It also must use double-quotes around the executable name + * and any files use for redirection. Other args can use single-quotes. + */ +#ifdef WIN32 +#define SYSTEMQUOTE "\"" +#else +#define SYSTEMQUOTE "" +#endif + /* Portable delay handling */ extern void pg_usleep(long microsec); |
