Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Brad King
CMake
Commits
e9fc7ff5
Commit
e9fc7ff5
authored
Mar 24, 2017
by
Daniel Pfeifer
Browse files
Add self-sufficient wrapper for <sys/stat.h>
parent
3142808f
Changes
17
Hide whitespace changes
Inline
Side-by-side
Source/CPack/WiX/cmWIXFilesSourceWriter.cxx
View file @
e9fc7ff5
...
...
@@ -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
,
...
...
Source/CPack/cmCPackCygwinSourceGenerator.cxx
View file @
e9fc7ff5
...
...
@@ -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
...
...
Source/CPack/cmCPackDebGenerator.cxx
View file @
e9fc7ff5
...
...
@@ -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:
...
...
Source/CPack/cmCPackOSXX11Generator.cxx
View file @
e9fc7ff5
...
...
@@ -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
()
{
...
...
Source/CPack/cmCPackSTGZGenerator.cxx
View file @
e9fc7ff5
...
...
@@ -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
()
{
...
...
Source/CTest/cmCTestSubmitHandler.cxx
View file @
e9fc7ff5
...
...
@@ -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
...
...
Source/QtDialog/CMakeSetup.cxx
View file @
e9fc7ff5
...
...
@@ -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
)
{
...
...
Source/cmFileCommand.cxx
View file @
e9fc7ff5
...
...
@@ -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)
...
...
Source/cmFileTimeComparison.cxx
View file @
e9fc7ff5
...
...
@@ -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>
...
...
Source/cmGeneratorExpressionEvaluationFile.h
View file @
e9fc7ff5
...
...
@@ -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
;
...
...
Source/cmMakefile.cxx
View file @
e9fc7ff5
...
...
@@ -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
...
...
Source/cmQtAutoGeneratorInitializer.cxx
View file @
e9fc7ff5
...
...
@@ -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>
...
...
Source/cmSystemTools.cxx
View file @
e9fc7ff5
...
...
@@ -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>
...
...
Source/cmSystemTools.h
View file @
e9fc7ff5
...
...
@@ -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
...
...
Source/cmWriteFileCommand.cxx
View file @
e9fc7ff5
...
...
@@ -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
;
...
...
Source/cm_sys_stat.h
0 → 100644
View file @
e9fc7ff5
/* 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
Source/cmake.cxx
View file @
e9fc7ff5
...
...
@@ -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>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment