Commit e9fc7ff5 authored by Daniel Pfeifer's avatar Daniel Pfeifer
Browse files

Add self-sufficient wrapper for <sys/stat.h>

parent 3142808f
......@@ -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;
......
/* 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
......@@ -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>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment