psql \! WIN32 cleanup
От | Bruce Momjian |
---|---|
Тема | psql \! WIN32 cleanup |
Дата | |
Msg-id | 200411060429.iA64Ti412489@candle.pha.pa.us обсуждение исходный текст |
Ответы |
Re: psql \! WIN32 cleanup
|
Список | pgsql-patches |
The attached applied patch tests for COMSPEC in the right place and supplies a reasonable shell default on Win32. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073 Index: src/bin/psql/command.c =================================================================== RCS file: /cvsroot/pgsql/src/bin/psql/command.c,v retrieving revision 1.130 diff -c -c -r1.130 command.c *** src/bin/psql/command.c 4 Nov 2004 22:25:14 -0000 1.130 --- src/bin/psql/command.c 6 Nov 2004 04:18:05 -0000 *************** *** 1525,1531 **** --- 1525,1535 ---- + #ifndef WIN32 #define DEFAULT_SHELL "/bin/sh" + #else + #define DEFAULT_SHELL "c:/windows/system32/cmd.exe" + #endif static bool do_shell(const char *command) *************** *** 1537,1547 **** char *sys; const char *shellName = NULL; #ifdef WIN32 - shellName = getenv("COMSPEC"); - #endif if (shellName == NULL) ! shellName = getenv("SHELL"); if (shellName == NULL) shellName = DEFAULT_SHELL; --- 1541,1551 ---- char *sys; const char *shellName = NULL; + shellName = getenv("SHELL"); #ifdef WIN32 if (shellName == NULL) ! shellName = getenv("COMSPEC"); ! #endif if (shellName == NULL) shellName = DEFAULT_SHELL;
В списке pgsql-patches по дате отправления: