From 359e68e057c635be5e2751a680cb695e7f66f4b2 Mon Sep 17 00:00:00 2001 From: "mozilla%weilbacher.org" Date: Thu, 5 Oct 2006 12:27:44 +0000 Subject: [PATCH] [OS/2] Bug 333639: Add note about assembleCmdLine() usage and fix build warnings in _PR_CreateOS2Process(), r=wtchang, sr=mkaply --- nsprpub/pr/src/md/os2/os2misc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nsprpub/pr/src/md/os2/os2misc.c b/nsprpub/pr/src/md/os2/os2misc.c index 6e330a03fe6..cbcafc837df 100644 --- a/nsprpub/pr/src/md/os2/os2misc.c +++ b/nsprpub/pr/src/md/os2/os2misc.c @@ -116,6 +116,10 @@ PR_Now(void) /* * Assemble the command line by concatenating the argv array. + * Special characters intentionally do not get escaped, and it is + * expected that the caller wraps arguments in quotes if needed + * (e.g. for filename with spaces). + * * On success, this function returns 0 and the resulting command * line is returned in *cmdLine. On failure, it returns -1. */ @@ -249,7 +253,6 @@ PRProcess * _PR_CreateOS2Process( APIRET rc; ULONG ulAppType = 0; PID pid = 0; - char *pEnvWPS = NULL; char *pszComSpec; char pszEXEName[CCHMAXPATH] = ""; char pszFormatString[CCHMAXPATH]; @@ -305,7 +308,7 @@ PRProcess * _PR_CreateOS2Process( if (pszDot) { /* If it is a CMD file, launch the users command processor */ if (!stricmp(pszDot, ".cmd")) { - rc = DosScanEnv("COMSPEC", &pszComSpec); + rc = DosScanEnv("COMSPEC", (PSZ *)&pszComSpec); if (!rc) { strcpy(pszFormatString, "/C %s %s"); strcpy(pszEXEName, pszComSpec);