summaryrefslogtreecommitdiffstats
path: root/src/kwsys/System.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-09-24 19:59:12 (GMT)
committerBrad King <brad.king@kitware.com>2014-09-24 19:59:12 (GMT)
commit3c3738fef1b80f2ba22846f6ce71b5bfe943a985 (patch)
tree81a51c2ada580d419bcdbf2c3f3d0588efc603fe /src/kwsys/System.c
parent9655989a63e3dc3d6cf8ee32a1f3123f6cf85daf (diff)
parentc1f1673904ecad648f17979ef9743cbde749fc66 (diff)
downloadCastXML-3c3738fef1b80f2ba22846f6ce71b5bfe943a985.zip
CastXML-3c3738fef1b80f2ba22846f6ce71b5bfe943a985.tar.gz
CastXML-3c3738fef1b80f2ba22846f6ce71b5bfe943a985.tar.bz2
Merge branch 'upstream-kwsys' into src/kwsys/ subtree
Diffstat (limited to 'src/kwsys/System.c')
-rw-r--r--src/kwsys/System.c30
1 files changed, 28 insertions, 2 deletions
diff --git a/src/kwsys/System.c b/src/kwsys/System.c
index 5d178bf..1ee26fa 100644
--- a/src/kwsys/System.c
+++ b/src/kwsys/System.c
@@ -353,6 +353,10 @@ static int kwsysSystem_Shell__GetArgumentSize(const char* in,
if(kwsysSystem_Shell__ArgumentNeedsQuotes(in, isUnix, flags))
{
/* Surrounding quotes are needed. Allocate space for them. */
+ if((flags & kwsysSystem_Shell_Flag_WatcomQuote) && (isUnix))
+ {
+ size += 2;
+ }
size += 2;
/* We must escape all ending backslashes when quoting on windows. */
@@ -377,7 +381,18 @@ static char* kwsysSystem_Shell__GetArgument(const char* in, char* out,
if(needQuotes)
{
/* Add the opening quote for this argument. */
- *out++ = '"';
+ if(flags & kwsysSystem_Shell_Flag_WatcomQuote)
+ {
+ if(isUnix)
+ {
+ *out++ = '"';
+ }
+ *out++ = '\'';
+ }
+ else
+ {
+ *out++ = '"';
+ }
}
/* Scan the string for characters that require escaping or quoting. */
@@ -549,7 +564,18 @@ static char* kwsysSystem_Shell__GetArgument(const char* in, char* out,
}
/* Add the closing quote for this argument. */
- *out++ = '"';
+ if(flags & kwsysSystem_Shell_Flag_WatcomQuote)
+ {
+ *out++ = '\'';
+ if(isUnix)
+ {
+ *out++ = '"';
+ }
+ }
+ else
+ {
+ *out++ = '"';
+ }
}
/* Store a terminating null without incrementing. */