Merge topic 'update-kwsys'
fe05ad97
Merge branch 'upstream-kwsys' into update-kwsyse25f294a
KWSys 2015-12-01 (9596e98d)
This commit is contained in:
commit
36e6ee913d
|
@ -88,6 +88,10 @@
|
||||||
#elif defined(__mips) || defined(__mips__) || defined(__MIPS__)
|
#elif defined(__mips) || defined(__mips__) || defined(__MIPS__)
|
||||||
# define @KWSYS_NAMESPACE@_CPU_ENDIAN_ID @KWSYS_NAMESPACE@_CPU_ENDIAN_ID_BIG
|
# define @KWSYS_NAMESPACE@_CPU_ENDIAN_ID @KWSYS_NAMESPACE@_CPU_ENDIAN_ID_BIG
|
||||||
|
|
||||||
|
/* NIOS2 */
|
||||||
|
#elif defined(__NIOS2__) || defined(__NIOS2) || defined(__nios2__)
|
||||||
|
# define @KWSYS_NAMESPACE@_CPU_ENDIAN_ID @KWSYS_NAMESPACE@_CPU_ENDIAN_ID_LITTLE
|
||||||
|
|
||||||
/* OpenRISC 1000 */
|
/* OpenRISC 1000 */
|
||||||
#elif defined(__or1k__)
|
#elif defined(__or1k__)
|
||||||
# define @KWSYS_NAMESPACE@_CPU_ENDIAN_ID @KWSYS_NAMESPACE@_CPU_ENDIAN_ID_BIG
|
# define @KWSYS_NAMESPACE@_CPU_ENDIAN_ID @KWSYS_NAMESPACE@_CPU_ENDIAN_ID_BIG
|
||||||
|
|
|
@ -2241,7 +2241,7 @@ static kwsysProcessTime kwsysProcessTimeAdd(kwsysProcessTime in1, kwsysProcessTi
|
||||||
kwsysProcessTime out;
|
kwsysProcessTime out;
|
||||||
out.tv_sec = in1.tv_sec + in2.tv_sec;
|
out.tv_sec = in1.tv_sec + in2.tv_sec;
|
||||||
out.tv_usec = in1.tv_usec + in2.tv_usec;
|
out.tv_usec = in1.tv_usec + in2.tv_usec;
|
||||||
if(out.tv_usec > 1000000)
|
if(out.tv_usec >= 1000000)
|
||||||
{
|
{
|
||||||
out.tv_usec -= 1000000;
|
out.tv_usec -= 1000000;
|
||||||
out.tv_sec += 1;
|
out.tv_sec += 1;
|
||||||
|
|
|
@ -2970,6 +2970,8 @@ std::string SystemTools::FindProgram(
|
||||||
bool no_system_path)
|
bool no_system_path)
|
||||||
{
|
{
|
||||||
std::vector<std::string> extensions;
|
std::vector<std::string> extensions;
|
||||||
|
std::string tryPath;
|
||||||
|
|
||||||
#if defined (_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)
|
#if defined (_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)
|
||||||
bool hasExtension = false;
|
bool hasExtension = false;
|
||||||
// check to see if the name already has a .xxx at
|
// check to see if the name already has a .xxx at
|
||||||
|
@ -2983,22 +2985,22 @@ std::string SystemTools::FindProgram(
|
||||||
{
|
{
|
||||||
extensions.push_back(".com");
|
extensions.push_back(".com");
|
||||||
extensions.push_back(".exe");
|
extensions.push_back(".exe");
|
||||||
}
|
|
||||||
#endif
|
|
||||||
std::string tryPath;
|
|
||||||
|
|
||||||
// first try with extensions if the os supports them
|
// first try with extensions if the os supports them
|
||||||
for(std::vector<std::string>::iterator i =
|
for(std::vector<std::string>::iterator i =
|
||||||
extensions.begin(); i != extensions.end(); ++i)
|
extensions.begin(); i != extensions.end(); ++i)
|
||||||
{
|
|
||||||
tryPath = name;
|
|
||||||
tryPath += *i;
|
|
||||||
if(SystemTools::FileExists(tryPath) &&
|
|
||||||
!SystemTools::FileIsDirectory(tryPath))
|
|
||||||
{
|
{
|
||||||
return SystemTools::CollapseFullPath(tryPath);
|
tryPath = name;
|
||||||
|
tryPath += *i;
|
||||||
|
if(SystemTools::FileExists(tryPath) &&
|
||||||
|
!SystemTools::FileIsDirectory(tryPath))
|
||||||
|
{
|
||||||
|
return SystemTools::CollapseFullPath(tryPath);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// now try just the name
|
// now try just the name
|
||||||
tryPath = name;
|
tryPath = name;
|
||||||
if(SystemTools::FileExists(tryPath) &&
|
if(SystemTools::FileExists(tryPath) &&
|
||||||
|
@ -3048,8 +3050,7 @@ std::string SystemTools::FindProgram(
|
||||||
tryPath = *p;
|
tryPath = *p;
|
||||||
tryPath += name;
|
tryPath += name;
|
||||||
tryPath += *ext;
|
tryPath += *ext;
|
||||||
if(SystemTools::FileExists(tryPath) &&
|
if(SystemTools::FileExists(tryPath, true))
|
||||||
!SystemTools::FileIsDirectory(tryPath))
|
|
||||||
{
|
{
|
||||||
return SystemTools::CollapseFullPath(tryPath);
|
return SystemTools::CollapseFullPath(tryPath);
|
||||||
}
|
}
|
||||||
|
@ -3057,8 +3058,7 @@ std::string SystemTools::FindProgram(
|
||||||
// now try it without them
|
// now try it without them
|
||||||
tryPath = *p;
|
tryPath = *p;
|
||||||
tryPath += name;
|
tryPath += name;
|
||||||
if(SystemTools::FileExists(tryPath) &&
|
if(SystemTools::FileExists(tryPath, true))
|
||||||
!SystemTools::FileIsDirectory(tryPath))
|
|
||||||
{
|
{
|
||||||
return SystemTools::CollapseFullPath(tryPath);
|
return SystemTools::CollapseFullPath(tryPath);
|
||||||
}
|
}
|
||||||
|
@ -3097,8 +3097,7 @@ std::string SystemTools
|
||||||
const std::vector<std::string>& userPaths)
|
const std::vector<std::string>& userPaths)
|
||||||
{
|
{
|
||||||
// See if the executable exists as written.
|
// See if the executable exists as written.
|
||||||
if(SystemTools::FileExists(name) &&
|
if(SystemTools::FileExists(name, true))
|
||||||
!SystemTools::FileIsDirectory(name))
|
|
||||||
{
|
{
|
||||||
return SystemTools::CollapseFullPath(name);
|
return SystemTools::CollapseFullPath(name);
|
||||||
}
|
}
|
||||||
|
@ -3144,8 +3143,7 @@ std::string SystemTools
|
||||||
tryPath = *p;
|
tryPath = *p;
|
||||||
tryPath += name;
|
tryPath += name;
|
||||||
tryPath += ".lib";
|
tryPath += ".lib";
|
||||||
if(SystemTools::FileExists(tryPath)
|
if(SystemTools::FileExists(tryPath, true))
|
||||||
&& !SystemTools::FileIsDirectory(tryPath))
|
|
||||||
{
|
{
|
||||||
return SystemTools::CollapseFullPath(tryPath);
|
return SystemTools::CollapseFullPath(tryPath);
|
||||||
}
|
}
|
||||||
|
@ -3154,8 +3152,7 @@ std::string SystemTools
|
||||||
tryPath += "lib";
|
tryPath += "lib";
|
||||||
tryPath += name;
|
tryPath += name;
|
||||||
tryPath += ".so";
|
tryPath += ".so";
|
||||||
if(SystemTools::FileExists(tryPath)
|
if(SystemTools::FileExists(tryPath, true))
|
||||||
&& !SystemTools::FileIsDirectory(tryPath))
|
|
||||||
{
|
{
|
||||||
return SystemTools::CollapseFullPath(tryPath);
|
return SystemTools::CollapseFullPath(tryPath);
|
||||||
}
|
}
|
||||||
|
@ -3163,8 +3160,7 @@ std::string SystemTools
|
||||||
tryPath += "lib";
|
tryPath += "lib";
|
||||||
tryPath += name;
|
tryPath += name;
|
||||||
tryPath += ".a";
|
tryPath += ".a";
|
||||||
if(SystemTools::FileExists(tryPath)
|
if(SystemTools::FileExists(tryPath, true))
|
||||||
&& !SystemTools::FileIsDirectory(tryPath))
|
|
||||||
{
|
{
|
||||||
return SystemTools::CollapseFullPath(tryPath);
|
return SystemTools::CollapseFullPath(tryPath);
|
||||||
}
|
}
|
||||||
|
@ -3172,8 +3168,7 @@ std::string SystemTools
|
||||||
tryPath += "lib";
|
tryPath += "lib";
|
||||||
tryPath += name;
|
tryPath += name;
|
||||||
tryPath += ".sl";
|
tryPath += ".sl";
|
||||||
if(SystemTools::FileExists(tryPath)
|
if(SystemTools::FileExists(tryPath, true))
|
||||||
&& !SystemTools::FileIsDirectory(tryPath))
|
|
||||||
{
|
{
|
||||||
return SystemTools::CollapseFullPath(tryPath);
|
return SystemTools::CollapseFullPath(tryPath);
|
||||||
}
|
}
|
||||||
|
@ -3181,8 +3176,7 @@ std::string SystemTools
|
||||||
tryPath += "lib";
|
tryPath += "lib";
|
||||||
tryPath += name;
|
tryPath += name;
|
||||||
tryPath += ".dylib";
|
tryPath += ".dylib";
|
||||||
if(SystemTools::FileExists(tryPath)
|
if(SystemTools::FileExists(tryPath, true))
|
||||||
&& !SystemTools::FileIsDirectory(tryPath))
|
|
||||||
{
|
{
|
||||||
return SystemTools::CollapseFullPath(tryPath);
|
return SystemTools::CollapseFullPath(tryPath);
|
||||||
}
|
}
|
||||||
|
@ -3190,8 +3184,7 @@ std::string SystemTools
|
||||||
tryPath += "lib";
|
tryPath += "lib";
|
||||||
tryPath += name;
|
tryPath += name;
|
||||||
tryPath += ".dll";
|
tryPath += ".dll";
|
||||||
if(SystemTools::FileExists(tryPath)
|
if(SystemTools::FileExists(tryPath, true))
|
||||||
&& !SystemTools::FileIsDirectory(tryPath))
|
|
||||||
{
|
{
|
||||||
return SystemTools::CollapseFullPath(tryPath);
|
return SystemTools::CollapseFullPath(tryPath);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue