diff --git a/Source/kwsys/SystemInformation.cxx b/Source/kwsys/SystemInformation.cxx index 81fb2f9be4..56a635a673 100644 --- a/Source/kwsys/SystemInformation.cxx +++ b/Source/kwsys/SystemInformation.cxx @@ -79,9 +79,9 @@ typedef int siginfo_t; # undef _WIN32 #endif -#ifdef __FreeBSD__ +#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) +# include # include -# include # include # include # include @@ -91,19 +91,10 @@ typedef int siginfo_t; # endif #endif -#if defined(__OpenBSD__) || defined(__NetBSD__) -# include -# include -#endif - #if defined(KWSYS_SYS_HAS_MACHINE_CPU_H) # include #endif -#if defined(__DragonFly__) -# include -#endif - #ifdef __APPLE__ # include # include @@ -123,7 +114,7 @@ typedef int siginfo_t; # endif #endif -#ifdef __linux +#if defined(__linux) || defined (__sun) || defined(_SCO_DS) # include # include # include diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index 9b56db066b..d479ee144c 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -1320,9 +1320,14 @@ bool SystemTools::FileExists(const std::string& filename) return (GetFileAttributesW( SystemTools::ConvertToWindowsExtendedPath(filename).c_str()) != INVALID_FILE_ATTRIBUTES); +#else +// SCO OpenServer 5.0.7/3.2's command has 711 permission. +#if defined(_SCO_DS) + return access(filename.c_str(), F_OK) == 0; #else return access(filename.c_str(), R_OK) == 0; #endif +#endif } //----------------------------------------------------------------------------