mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-07 04:02:23 +03:00
Add self-sufficient wrapper for <sys/stat.h>
This commit is contained in:
1 parent
3142808f15
commit
e9fc7ff505
17 files changed
+29
-39
No files matched your search
@@ -9,9 +9,7 @@
|
||||
#include <cmSystemTools.h>
|
||||
#include <cmUuid.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
// include sys/stat.h after sys/types.h
|
||||
#include <sys/stat.h>
|
||||
#include "cm_sys_stat.h"
|
||||
|
||||
cmWIXFilesSourceWriter::cmWIXFilesSourceWriter(cmCPackLog* logger,
|
||||
std::string const& filename,
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// system tools because it is not implemented robustly enough to move
|
||||
// files across directories.
|
||||
#ifdef _WIN32
|
||||
#include <sys/stat.h>
|
||||
#include "cm_sys_stat.h"
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "cmCPackLog.h"
|
||||
#include "cmGeneratedFileStream.h"
|
||||
#include "cmSystemTools.h"
|
||||
#include "cm_sys_stat.h"
|
||||
|
||||
#include <cmsys/Glob.hxx>
|
||||
#include <limits.h>
|
||||
@@ -16,7 +17,6 @@
|
||||
#include <set>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <utility>
|
||||
|
||||
// NOTE:
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
#include "cmCPackOSXX11Generator.h"
|
||||
|
||||
#include <sstream>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "cmCPackGenerator.h"
|
||||
#include "cmCPackLog.h"
|
||||
#include "cmGeneratedFileStream.h"
|
||||
#include "cmSystemTools.h"
|
||||
#include "cm_sys_stat.h"
|
||||
|
||||
cmCPackOSXX11Generator::cmCPackOSXX11Generator()
|
||||
{
|
||||
|
||||
@@ -8,13 +8,10 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <sys/types.h>
|
||||
// include sys/stat.h after sys/types.h
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "cmCPackGenerator.h"
|
||||
#include "cmCPackLog.h"
|
||||
#include "cmSystemTools.h"
|
||||
#include "cm_sys_stat.h"
|
||||
|
||||
cmCPackSTGZGenerator::cmCPackSTGZGenerator()
|
||||
{
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
|
||||
#if defined(CTEST_USE_XMLRPC)
|
||||
#include "cmVersion.h"
|
||||
#include "cm_sys_stat.h"
|
||||
#include <cm_xmlrpc.h>
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
#define SUBMIT_TIMEOUT_IN_SECONDS_DEFAULT 120
|
||||
|
||||
@@ -184,9 +184,9 @@ int main(int argc, char** argv)
|
||||
}
|
||||
|
||||
#if defined(Q_OS_MAC)
|
||||
#include "cm_sys_stat.h"
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
static bool cmOSXInstall(std::string const& dir, std::string const& tool)
|
||||
{
|
||||
|
||||
@@ -16,10 +16,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
// include sys/stat.h after sys/types.h
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "cmAlgorithms.h"
|
||||
#include "cmCommandArgumentsHelper.h"
|
||||
#include "cmCryptoHash.h"
|
||||
@@ -35,6 +31,7 @@
|
||||
#include "cmSystemTools.h"
|
||||
#include "cmTimestamp.h"
|
||||
#include "cm_auto_ptr.hxx"
|
||||
#include "cm_sys_stat.h"
|
||||
#include "cmake.h"
|
||||
|
||||
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
// Use a platform-specific API to get file times efficiently.
|
||||
#if !defined(_WIN32) || defined(__CYGWIN__)
|
||||
#include <sys/stat.h>
|
||||
#include "cm_sys_stat.h"
|
||||
#define cmFileTimeComparison_Type struct stat
|
||||
#else
|
||||
#include <cmsys/Encoding.hxx>
|
||||
|
||||
@@ -11,12 +11,7 @@
|
||||
|
||||
#include "cmGeneratorExpression.h"
|
||||
#include "cm_auto_ptr.hxx"
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
typedef unsigned short mode_t;
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#include "cm_sys_stat.h"
|
||||
|
||||
class cmLocalGenerator;
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "cmVersion.h"
|
||||
#include "cmWorkingDirectory.h"
|
||||
#include "cm_auto_ptr.hxx"
|
||||
#include "cm_sys_stat.h"
|
||||
#include "cmake.h"
|
||||
|
||||
#ifdef CMAKE_BUILD_WITH_CMAKE
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "cmState.h"
|
||||
#include "cmSystemTools.h"
|
||||
#include "cmTarget.h"
|
||||
#include "cm_sys_stat.h"
|
||||
#include "cmake.h"
|
||||
|
||||
#if defined(_WIN32) && !defined(__CYGWIN__)
|
||||
@@ -27,7 +28,6 @@
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <sys/stat.h>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "cmAlgorithms.h"
|
||||
#include "cmProcessOutput.h"
|
||||
#include "cm_sys_stat.h"
|
||||
|
||||
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
||||
#include "cmArchiveWrite.h"
|
||||
@@ -42,7 +43,6 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <time.h>
|
||||
#include <utility>
|
||||
|
||||
|
||||
@@ -12,12 +12,6 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
typedef unsigned short mode_t;
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
class cmSystemToolsFileTime;
|
||||
|
||||
/** \class cmSystemTools
|
||||
|
||||
@@ -4,12 +4,9 @@
|
||||
|
||||
#include <cmsys/FStream.hxx>
|
||||
|
||||
#include <sys/types.h>
|
||||
// include sys/stat.h after sys/types.h
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "cmMakefile.h"
|
||||
#include "cmSystemTools.h"
|
||||
#include "cm_sys_stat.h"
|
||||
|
||||
class cmExecutionStatus;
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
file Copyright.txt or https://cmake.org/licensing for details. */
|
||||
#ifndef cm_sys_stat_h
|
||||
#define cm_sys_stat_h
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
typedef unsigned short mode_t;
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
// include sys/stat.h after sys/types.h
|
||||
#include <sys/stat.h>
|
||||
|
||||
#endif
|
||||
+1
-4
@@ -25,6 +25,7 @@
|
||||
#include "cmVersionConfig.h"
|
||||
#include "cmWorkingDirectory.h"
|
||||
#include "cm_auto_ptr.hxx"
|
||||
#include "cm_sys_stat.h"
|
||||
|
||||
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
||||
#include <cm_jsoncpp_writer.h>
|
||||
@@ -106,10 +107,6 @@
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
// include sys/stat.h after sys/types.h
|
||||
#include <sys/stat.h> // struct stat
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmsys/FStream.hxx>
|
||||
#include <cmsys/Glob.hxx>
|
||||
|
||||
Reference in new issue
Block a user