Merge branch 'upstream-KWSys' into update-kwsys

* upstream-KWSys:
  KWSys 2016-08-02 (3f55579d)
This commit is contained in:
Brad King 2016-08-03 10:10:28 -04:00
commit b602cb85c9
2 changed files with 8 additions and 12 deletions

View File

@ -79,9 +79,9 @@ typedef int siginfo_t;
# undef _WIN32 # undef _WIN32
#endif #endif
#ifdef __FreeBSD__ #if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
# include <sys/param.h>
# include <sys/sysctl.h> # include <sys/sysctl.h>
# include <fenv.h>
# include <sys/socket.h> # include <sys/socket.h>
# include <netdb.h> # include <netdb.h>
# include <netinet/in.h> # include <netinet/in.h>
@ -91,19 +91,10 @@ typedef int siginfo_t;
# endif # endif
#endif #endif
#if defined(__OpenBSD__) || defined(__NetBSD__)
# include <sys/param.h>
# include <sys/sysctl.h>
#endif
#if defined(KWSYS_SYS_HAS_MACHINE_CPU_H) #if defined(KWSYS_SYS_HAS_MACHINE_CPU_H)
# include <machine/cpu.h> # include <machine/cpu.h>
#endif #endif
#if defined(__DragonFly__)
# include <sys/sysctl.h>
#endif
#ifdef __APPLE__ #ifdef __APPLE__
# include <sys/sysctl.h> # include <sys/sysctl.h>
# include <mach/vm_statistics.h> # include <mach/vm_statistics.h>
@ -123,7 +114,7 @@ typedef int siginfo_t;
# endif # endif
#endif #endif
#ifdef __linux #if defined(__linux) || defined (__sun) || defined(_SCO_DS)
# include <fenv.h> # include <fenv.h>
# include <sys/socket.h> # include <sys/socket.h>
# include <netdb.h> # include <netdb.h>

View File

@ -1320,9 +1320,14 @@ bool SystemTools::FileExists(const std::string& filename)
return (GetFileAttributesW( return (GetFileAttributesW(
SystemTools::ConvertToWindowsExtendedPath(filename).c_str()) SystemTools::ConvertToWindowsExtendedPath(filename).c_str())
!= INVALID_FILE_ATTRIBUTES); != 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 #else
return access(filename.c_str(), R_OK) == 0; return access(filename.c_str(), R_OK) == 0;
#endif #endif
#endif
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------