Commit 74e31927 authored by Kitware Robot's avatar Kitware Robot Committed by Brad King
Browse files

KWSys 2014-08-11 (32023afd)

Extract upstream KWSys using the following shell commands.

$ git archive --prefix=upstream-kwsys/ 32023afd | tar x
$ git shortlog --no-merges --abbrev=8 --format='%h %s' dd873734..32023afd
Ben Boeckel (26):
      ef3bfa01 c_str: Don't use .c_str() when streaming strings
      9c165368 Glob: Use string comparisons if you have them ready
      53ba0bc6 containers: Use .empty() instead of .size() where possible
      6cbb57ac strings: Use string methods instead of size calculations
      e53596b7 RegularExpression: Add string overloads
      aec9de6a CommandLineArguments: Push the string back, not its C string
      1d531416 Glob: Accept a string in Glob::AddFile
      81f5e0a8 Glob: Accept a string in Glob::AddExpression
      d40c2706 SystemTools: Remove redundant if guards
      c1296f4a SystemTools: Defer computing length until after a .empty() check
      7ffb7106 SystemTools: Use the iterator constructor for strings
      29e3b1d8 SystemTools: Use .rfind('/') rather than .find_last_of("/")
      5eb3a65c SystemTools: Don't construct a string just for its length
      b07b5fc1 SystemTools: Take a string in GetShortPath
      153f6df7 SystemTools: Use strings in ComparePath
      2c2f6604 SystemTools: Accept strings in IsSubDirectory
      84db9ee5 SystemTools: Take strings in AddTranslationPath
      4b409aa4 SystemTools: Take strings in SplitPath
      d2dbff07 SystemTools: Take strings in CollapseFullPath
      e9204f8f SystemTools: Take strings in AddKeepPath
      3254681a SystemTools: Reserve memory in JoinPath
      6074f33f SystemTools: Use static strings in SystemToolsAppendComponents
      9927862c SystemTools: more string replacements
      b3d598b0 strings: remove unnecessary c_str calls
      ffe94132 SystemTools: use char instead of const char*
      f29fec7c Directory: accept strings in methods

Bob E (1):
      697b1401 SystemInformation: No SA_RESTART on QNX

Brad King (7):
      39f98b5d Encoding: Add self-assignment check to CommandLineArguments
      1979c02d hashtable: Poison operator= on internal node type
      f3a36760 SystemInformation: Include backtrace APIs whenever we use them
      2e00d252 SystemTools: Port cygwin path conversion to modern API
      c282e64f Process: Workaround child kill trouble on Cygwin
      4791701a SystemTools: Remove ConvertWindowsCommandLineToUnixArguments method
      4d526097 Add assert() to quiet Clang scan-build warnings

Christian Svensson (1):
      32023afd CPU: Add support for OpenRISC 1000

Chuck Atkins (3):
      e4bba930 Directory: Make sure the /* suffix uses correct slashes
      97817ce7 SystemTools: Refactor test file and directory locations
      8f991ab0 SystemTools: Use extended paths on Windows for > 256 length

Clinton Stimpson (2):
      c2a329ce Encoding: Fixes uses of stat() on Windows to work with unicode.
      65b36ede Encoding: Fix testProcess to work with unicode paths.

Gerhard Grimm (1):
      fa86f1ba SystemInformation: Fix HP-UX PA-RISC processor detection

Jiri Malak (1):
      36982798 SystemTools: add Watcom single Quote processing

Rashad M (1):
      e787837a SharedForward: Cast away const to call execvp on MinGW 64-bit

Rolf Eike Beer (3):
      a8aa1014 SystemInformation: Fix HP-UX Intel processor detection
      a99a9235 set the compile flags for older HP compilers to fix compilation
      8b085635 MD5: avoid casting back and forth between size_t and int

Steve Dougherty (1):
      5f28a52b Terminal: Fix spelling of 'definitely' in comments

Change-Id: I766fc25a92cf9151c249a7569f018ff49f904480
parent 2eede99a
......@@ -299,6 +299,13 @@ IF(NOT CMAKE_COMPILER_IS_GNUCXX)
ENDIF(CMAKE_SYSTEM MATCHES "OSF1-V.*")
IF(CMAKE_SYSTEM MATCHES "HP-UX")
SET(KWSYS_PLATFORM_CXX_TEST_EXTRA_FLAGS "+p")
IF(CMAKE_CXX_COMPILER_ID MATCHES "HP")
# it is known that version 3.85 fails and 6.25 works without these flags
IF(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4)
# use new C++ library and improved template support
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -AA +hpxstd98")
ENDIF()
ENDIF()
ENDIF(CMAKE_SYSTEM MATCHES "HP-UX")
ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX)
......@@ -1164,10 +1171,9 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR)
ADD_EXECUTABLE(${KWSYS_NAMESPACE}TestsCxx ${KWSYS_CXX_TEST_SRCS})
SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}TestsCxx PROPERTY LABELS ${KWSYS_LABELS_EXE})
TARGET_LINK_LIBRARIES(${KWSYS_NAMESPACE}TestsCxx ${KWSYS_NAMESPACE})
SET(TEST_SYSTEMTOOLS_BIN_FILE
"${CMAKE_CURRENT_SOURCE_DIR}/testSystemTools.bin")
SET(TEST_SYSTEMTOOLS_SRC_FILE
"${CMAKE_CURRENT_SOURCE_DIR}/testSystemTools.cxx")
SET(TEST_SYSTEMTOOLS_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
SET(TEST_SYSTEMTOOLS_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
CONFIGURE_FILE(
${PROJECT_SOURCE_DIR}/testSystemTools.h.in
${PROJECT_BINARY_DIR}/testSystemTools.h)
......
......@@ -80,6 +80,10 @@
#elif defined(__mips) || defined(__mips__) || defined(__MIPS__)
# define @KWSYS_NAMESPACE@_CPU_ENDIAN_ID @KWSYS_NAMESPACE@_CPU_ENDIAN_ID_BIG
/* OpenRISC 1000 */
#elif defined(__or1k__)
# define @KWSYS_NAMESPACE@_CPU_ENDIAN_ID @KWSYS_NAMESPACE@_CPU_ENDIAN_ID_BIG
/* RS/6000 */
#elif defined(__THW_RS600) || defined(_IBMR2) || defined(_POWER)
# define @KWSYS_NAMESPACE@_CPU_ENDIAN_ID @KWSYS_NAMESPACE@_CPU_ENDIAN_ID_BIG
......
......@@ -178,7 +178,7 @@ bool CommandLineArguments::GetMatchedArguments(
matches->push_back(parg);
}
}
return matches->size() > 0;
return !matches->empty();
}
//----------------------------------------------------------------------------
......@@ -235,7 +235,7 @@ int CommandLineArguments::Parse()
return 0;
}
CommandLineArguments_DEBUG("This is a space argument: " << arg
<< " value: " << this->Internals->Argv[cc+1].c_str());
<< " value: " << this->Internals->Argv[cc+1]);
// Value is the next argument
if ( !this->PopulateVariable(cs, this->Internals->Argv[cc+1].c_str()) )
{
......@@ -244,7 +244,7 @@ int CommandLineArguments::Parse()
cc ++;
break;
case EQUAL_ARGUMENT:
if ( arg.size() == sarg.size() || *(arg.c_str() + sarg.size()) != '=' )
if ( arg.size() == sarg.size() || arg.at(sarg.size()) != '=' )
{
this->Internals->LastArgument --;
return 0;
......@@ -309,11 +309,11 @@ int CommandLineArguments::Parse()
else if ( this->StoreUnusedArgumentsFlag )
{
CommandLineArguments_DEBUG("Store unused argument " << arg);
this->Internals->UnusedArguments.push_back(arg.c_str());
this->Internals->UnusedArguments.push_back(arg);
}
else
{
kwsys_ios::cerr << "Got unknown argument: \"" << arg.c_str() << "\"" << kwsys_ios::endl;
kwsys_ios::cerr << "Got unknown argument: \"" << arg << "\"" << kwsys_ios::endl;
this->Internals->LastArgument --;
return 0;
}
......
......@@ -103,7 +103,7 @@ void Directory::Clear()
namespace KWSYS_NAMESPACE
{
bool Directory::Load(const char* name)
bool Directory::Load(const kwsys_stl::string& name)
{
this->Clear();
#if _MSC_VER < 1300
......@@ -112,16 +112,25 @@ bool Directory::Load(const char* name)
intptr_t srchHandle;
#endif
char* buf;
size_t n = strlen(name);
if ( name[n - 1] == '/' )
size_t n = name.size();
if ( *name.rbegin() == '/' || *name.rbegin() == '\\' )
{
buf = new char[n + 1 + 1];
sprintf(buf, "%s*", name);
sprintf(buf, "%s*", name.c_str());
}
else
{
// Make sure the slashes in the wildcard suffix are consistent with the
// rest of the path
buf = new char[n + 2 + 1];
sprintf(buf, "%s/*", name);
if ( name.find('\\') != name.npos )
{
sprintf(buf, "%s\\*", name.c_str());
}
else
{
sprintf(buf, "%s/*", name.c_str());
}
}
struct _wfinddata_t data; // data of current file
......@@ -144,7 +153,7 @@ bool Directory::Load(const char* name)
return _findclose(srchHandle) != -1;
}
unsigned long Directory::GetNumberOfFilesInDirectory(const char* name)
unsigned long Directory::GetNumberOfFilesInDirectory(const kwsys_stl::string& name)
{
#if _MSC_VER < 1300
long srchHandle;
......@@ -152,16 +161,16 @@ unsigned long Directory::GetNumberOfFilesInDirectory(const char* name)
intptr_t srchHandle;
#endif
char* buf;
size_t n = strlen(name);
if ( name[n - 1] == '/' )
size_t n = name.size();
if ( *name.rbegin() == '/' )
{
buf = new char[n + 1 + 1];
sprintf(buf, "%s*", name);
sprintf(buf, "%s*", name.c_str());
}
else
{
buf = new char[n + 2 + 1];
sprintf(buf, "%s/*", name);
sprintf(buf, "%s/*", name.c_str());
}
struct _wfinddata_t data; // data of current file
......@@ -206,15 +215,11 @@ p=1992&sid=f16167f51964f1a68fe5041b8eb213b6
namespace KWSYS_NAMESPACE
{
bool Directory::Load(const char* name)
bool Directory::Load(const kwsys_stl::string& name)
{
this->Clear();
if (!name)
{
return 0;
}
DIR* dir = opendir(name);
DIR* dir = opendir(name.c_str());
if (!dir)
{
......@@ -230,14 +235,9 @@ bool Directory::Load(const char* name)
return 1;
}
unsigned long Directory::GetNumberOfFilesInDirectory(const char* name)
unsigned long Directory::GetNumberOfFilesInDirectory(const kwsys_stl::string& name)
{
DIR* dir = opendir(name);
if (!dir)
{
return 0;
}
DIR* dir = opendir(name.c_str());
unsigned long count = 0;
for (dirent* d = readdir(dir); d; d = readdir(dir) )
......
......@@ -13,6 +13,13 @@
#define @KWSYS_NAMESPACE@_Directory_hxx
#include <@KWSYS_NAMESPACE@/Configure.h>
#include <@KWSYS_NAMESPACE@/stl/string>
/* Define these macros temporarily to keep the code readable. */
#if !defined (KWSYS_NAMESPACE) && !@KWSYS_NAMESPACE@_NAME_IS_KWSYS
# define kwsys_stl @KWSYS_NAMESPACE@_stl
# define kwsys_ios @KWSYS_NAMESPACE@_ios
#endif
namespace @KWSYS_NAMESPACE@
{
......@@ -38,7 +45,7 @@ public:
* in that directory. 0 is returned if the directory can not be
* opened, 1 if it is opened.
*/
bool Load(const char*);
bool Load(const kwsys_stl::string&);
/**
* Return the number of files in the current directory.
......@@ -49,7 +56,7 @@ public:
* Return the number of files in the specified directory.
* A higher performance static method.
*/
static unsigned long GetNumberOfFilesInDirectory(const char*);
static unsigned long GetNumberOfFilesInDirectory(const kwsys_stl::string&);
/**
* Return the file at the given index, the indexing is 0 based
......@@ -77,4 +84,10 @@ private:
} // namespace @KWSYS_NAMESPACE@
/* Undefine temporary macros. */
#if !defined (KWSYS_NAMESPACE) && !@KWSYS_NAMESPACE@_NAME_IS_KWSYS
# undef kwsys_stl
# undef kwsys_ios
#endif
#endif
......@@ -110,16 +110,19 @@ Encoding::CommandLineArguments::
Encoding::CommandLineArguments&
Encoding::CommandLineArguments::operator=(const CommandLineArguments& other)
{
size_t i;
for(i=0; i<this->argv_.size(); i++)
if(this != &other)
{
free(this->argv_[i]);
}
size_t i;
for(i=0; i<this->argv_.size(); i++)
{
free(this->argv_[i]);
}
this->argv_.resize(other.argv_.size());
for(i=0; i<this->argv_.size(); i++)
{
this->argv_[i] = other.argv_[i] ? strdup(other.argv_[i]) : 0;
this->argv_.resize(other.argv_.size());
for(i=0; i<this->argv_.size(); i++)
{
this->argv_[i] = other.argv_[i] ? strdup(other.argv_[i]) : 0;
}
}
return *this;
......
......@@ -218,7 +218,7 @@ void Glob::RecurseDirectory(kwsys_stl::string::size_type start,
const kwsys_stl::string& dir)
{
kwsys::Directory d;
if ( !d.Load(dir.c_str()) )
if ( !d.Load(dir) )
{
return;
}
......@@ -229,8 +229,7 @@ void Glob::RecurseDirectory(kwsys_stl::string::size_type start,
for ( cc = 0; cc < d.GetNumberOfFiles(); cc ++ )
{
fname = d.GetFile(cc);
if ( strcmp(fname.c_str(), ".") == 0 ||
strcmp(fname.c_str(), "..") == 0 )
if ( fname == "." || fname == ".." )
{
continue;
}
......@@ -258,8 +257,8 @@ void Glob::RecurseDirectory(kwsys_stl::string::size_type start,
fullname = dir + "/" + fname;
}
bool isDir = kwsys::SystemTools::FileIsDirectory(realname.c_str());
bool isSymLink = kwsys::SystemTools::FileIsSymlink(realname.c_str());
bool isDir = kwsys::SystemTools::FileIsDirectory(realname);
bool isSymLink = kwsys::SystemTools::FileIsSymlink(realname);
if ( isDir && (!isSymLink || this->RecurseThroughSymlinks) )
{
......@@ -271,11 +270,10 @@ void Glob::RecurseDirectory(kwsys_stl::string::size_type start,
}
else
{
if ( (this->Internals->Expressions.size() > 0) &&
this->Internals->Expressions[
this->Internals->Expressions.size()-1].find(fname.c_str()) )
if ( !this->Internals->Expressions.empty() &&
this->Internals->Expressions.rbegin()->find(fname) )
{
this->AddFile(this->Internals->Files, realname.c_str());
this->AddFile(this->Internals->Files, realname);
}
}
}
......@@ -299,7 +297,7 @@ void Glob::ProcessDirectory(kwsys_stl::string::size_type start,
}
kwsys::Directory d;
if ( !d.Load(dir.c_str()) )
if ( !d.Load(dir) )
{
return;
}
......@@ -310,8 +308,7 @@ void Glob::ProcessDirectory(kwsys_stl::string::size_type start,
for ( cc = 0; cc < d.GetNumberOfFiles(); cc ++ )
{
fname = d.GetFile(cc);
if ( strcmp(fname.c_str(), ".") == 0 ||
strcmp(fname.c_str(), "..") == 0 )
if ( fname == "." || fname == ".." )
{
continue;
}
......@@ -345,16 +342,16 @@ void Glob::ProcessDirectory(kwsys_stl::string::size_type start,
//kwsys_ios::cout << "Full name: " << fullname << kwsys_ios::endl;
if ( !last &&
!kwsys::SystemTools::FileIsDirectory(realname.c_str()) )
!kwsys::SystemTools::FileIsDirectory(realname) )
{
continue;
}
if ( this->Internals->Expressions[start].find(fname.c_str()) )
if ( this->Internals->Expressions[start].find(fname) )
{
if ( last )
{
this->AddFile(this->Internals->Files, realname.c_str());
this->AddFile(this->Internals->Files, realname);
}
else
{
......@@ -374,7 +371,7 @@ bool Glob::FindFiles(const kwsys_stl::string& inexpr)
this->Internals->Expressions.clear();
this->Internals->Files.clear();
if ( !kwsys::SystemTools::FileIsFullPath(expr.c_str()) )
if ( !kwsys::SystemTools::FileIsFullPath(expr) )
{
expr = kwsys::SystemTools::GetCurrentWorkingDirectory();
expr += "/" + inexpr;
......@@ -442,9 +439,9 @@ bool Glob::FindFiles(const kwsys_stl::string& inexpr)
int ch = expr[cc];
if ( ch == '/' )
{
if ( cexpr.size() > 0 )
if ( !cexpr.empty() )
{
this->AddExpression(cexpr.c_str());
this->AddExpression(cexpr);
}
cexpr = "";
}
......@@ -453,9 +450,9 @@ bool Glob::FindFiles(const kwsys_stl::string& inexpr)
cexpr.append(1, static_cast<char>(ch));
}
}
if ( cexpr.size() > 0 )
if ( !cexpr.empty() )
{
this->AddExpression(cexpr.c_str());
this->AddExpression(cexpr);
}
// Handle network paths
......@@ -471,11 +468,11 @@ bool Glob::FindFiles(const kwsys_stl::string& inexpr)
}
//----------------------------------------------------------------------------
void Glob::AddExpression(const char* expr)
void Glob::AddExpression(const kwsys_stl::string& expr)
{
this->Internals->Expressions.push_back(
kwsys::RegularExpression(
this->PatternToRegex(expr).c_str()));
this->PatternToRegex(expr)));
}
//----------------------------------------------------------------------------
......@@ -500,11 +497,11 @@ const char* Glob::GetRelative()
}
//----------------------------------------------------------------------------
void Glob::AddFile(kwsys_stl::vector<kwsys_stl::string>& files, const char* file)
void Glob::AddFile(kwsys_stl::vector<kwsys_stl::string>& files, const kwsys_stl::string& file)
{
if ( !this->Relative.empty() )
{
files.push_back(kwsys::SystemTools::RelativePath(this->Relative.c_str(), file));
files.push_back(kwsys::SystemTools::RelativePath(this->Relative.c_str(), file.c_str()));
}
else
{
......
......@@ -91,10 +91,10 @@ protected:
const kwsys_stl::string& dir);
//! Add regular expression
void AddExpression(const char* expr);
void AddExpression(const kwsys_stl::string& expr);
//! Add a file to the list
void AddFile(kwsys_stl::vector<kwsys_stl::string>& files, const char* file);
void AddFile(kwsys_stl::vector<kwsys_stl::string>& files, const kwsys_stl::string& file);
GlobInternals* Internals;
bool Recurse;
......
......@@ -478,11 +478,16 @@ void kwsysMD5_Initialize(kwsysMD5* md5)
/*--------------------------------------------------------------------------*/
void kwsysMD5_Append(kwsysMD5* md5, unsigned char const* data, int length)
{
size_t dlen;
if(length < 0)
{
length = (int)strlen((char const*)data);
dlen = strlen((char const*)data);
}
md5_append(&md5->md5_state, (md5_byte_t const*)data, (size_t)length);
else
{
dlen = (size_t)length;
}
md5_append(&md5->md5_state, (md5_byte_t const*)data, dlen);
}
/*--------------------------------------------------------------------------*/
......
......@@ -68,6 +68,7 @@ do.
#include <signal.h> /* sigaction */
#include <dirent.h> /* DIR, dirent */
#include <ctype.h> /* isspace */
#include <assert.h> /* assert */
#if defined(__VMS)
# define KWSYSPE_VMS_NONBLOCK , O_NONBLOCK
......@@ -450,6 +451,7 @@ int kwsysProcess_AddCommand(kwsysProcess* cp, char const* const* command)
}
for(i=0; i < n; ++i)
{
assert(command[i]); /* Quiet Clang scan-build. */
newCommands[cp->NumberOfCommands][i] = strdup(command[i]);
if(!newCommands[cp->NumberOfCommands][i])
{
......@@ -2413,6 +2415,12 @@ static void kwsysProcessKill(pid_t process_id)
/* Suspend the process to be sure it will not create more children. */
kill(process_id, SIGSTOP);
#if defined(__CYGWIN__)
/* Some Cygwin versions seem to need help here. Give up our time slice
so that the child can process SIGSTOP before we send SIGKILL. */
usleep(1);
#endif
/* Kill all children if we can find them. */
#if defined(__linux__) || defined(__CYGWIN__)
/* First try using the /proc filesystem. */
......
......@@ -882,13 +882,6 @@ void regdump ();
static char* regprop ();
#endif
bool RegularExpression::find (kwsys_stl::string const& s)
{
return find(s.c_str());
}
// find -- Matches the regular expression to the given string.
// Returns true if found, and sets start and end indexes accordingly.
......
......@@ -198,12 +198,17 @@ public:
* Instantiate RegularExpression with compiled char*.
*/
inline RegularExpression (char const*);
/**
* Instantiate RegularExpression as a copy of another regular expression.
*/
RegularExpression (RegularExpression const&);
/**
* Instantiate RegularExpression with compiled string.
*/
inline RegularExpression (kwsys_stl::string const&);
/**
* Destructor.
*/
......@@ -215,6 +220,12 @@ public:
*/
bool compile (char const*);
/**
* Compile a regular expression into internal code
* for later pattern matching.
*/
inline bool compile (kwsys_stl::string const&);
/**
* Matches the regular expression to the given string.
* Returns true if found, and sets start and end indexes accordingly.
......@@ -225,7 +236,7 @@ public:
* Matches the regular expression to the given std string.
* Returns true if found, and sets start and end indexes accordingly.
*/
bool find (kwsys_stl::string const&);
inline bool find (kwsys_stl::string const&);
/**
* Index to start of first find.
......@@ -312,6 +323,16 @@ inline RegularExpression::RegularExpression (const char* s)
}
}
/**
* Creates a regular expression from string s, and
* compiles s.
*/
inline RegularExpression::RegularExpression (const kwsys_stl::string& s)
{
this->program = 0;
this->compile(s);
}
/**
* Destroys and frees space allocated for the regular expression.
*/
......@@ -322,6 +343,24 @@ inline RegularExpression::~RegularExpression ()
//#endif
}
/**
* Compile a regular expression into internal code
* for later pattern matching.
*/
inline bool RegularExpression::compile (kwsys_stl::string const& s)
{
return this->compile(s.c_str());
}
/**
* Matches the regular expression to the given std string.
* Returns true if found, and sets start and end indexes accordingly.
*/
inline bool RegularExpression::find (kwsys_stl::string const& s)
{
return this->find(s.c_str());
}
/**
* Set the start position for the regular expression.
*/
......
......@@ -512,7 +512,7 @@ static void kwsys_shared_forward_execvp(const char* cmd,
/* Invoke the child process. */
#if defined(_MSC_VER)
_execvp(cmd, argv);
#elif defined(__MINGW32__)
#elif defined(__MINGW32__) && !defined(__MINGW64__)
execvp(cmd, argv);
#else
execvp(cmd, (char* const*)argv);
......
......@@ -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. */
......
......@@ -36,6 +36,7 @@
# define kwsysSystem_Shell_Flag_MinGWMake kwsys_ns(System_Shell_Flag_MinGWMake)
# define kwsysSystem_Shell_Flag_NMake kwsys_ns(System_Shell_Flag_NMake)
# define kwsysSystem_Shell_Flag_AllowMakeVariables kwsys_ns(System_Shell_Flag_AllowMakeVariables)
# define kwsysSystem_Shell_Flag_WatcomQuote kwsys_ns(System_Shell_Flag_WatcomQuote)
#endif
#ifdef __VMS
......@@ -102,14 +103,17 @@ enum kwsysSystem_Shell_Flag_e
kwsysSystem_Shell_Flag_MinGWMake = (1<<4),
/** The target shell is in a NMake makefile. */
kwsysSystem_Shell_Flag_NMake = (1<<6),
kwsysSystem_Shell_Flag_NMake = (1<<5),
/** Make variable reference syntax $(MAKEVAR) should not be escaped
to allow a build tool to replace it. Replacement values
containing spaces, quotes, backslashes, or other
non-alphanumeric characters that have significance to some makes