Browse Source

Moved os specific includes into OsDetection.h

tempestpy_adaptions
PBerger 12 years ago
parent
commit
01ea2c8427
  1. 7
      src/parser/LabParser.cpp
  2. 9
      src/parser/Parser.cpp
  3. 7
      src/parser/Parser.h
  4. 4
      src/parser/TraParser.cpp
  5. 1
      src/parser/TraParser.h
  6. 3
      src/utility/OsDetection.h

7
src/parser/LabParser.cpp

@ -10,6 +10,7 @@
#include "src/exceptions/WrongFileFormatException.h"
#include "src/exceptions/FileIoException.h"
#include "src/utility/OsDetection.h"
#include <cstdlib>
#include <cstdio>
#include <cstring>
@ -21,12 +22,6 @@
#include <fcntl.h>
#include <locale.h>
#if defined LINUX || defined MACOSX
#include <sys/mman.h>
#elif defined WINDOWS
#define strncpy strncpy_s
#endif
#include "log4cplus/logger.h"
#include "log4cplus/loggingmacros.h"
extern log4cplus::Logger logger;

9
src/parser/Parser.cpp

@ -1,14 +1,5 @@
#include "src/parser/Parser.h"
#if defined LINUX || defined MACOSX
# include <sys/mman.h>
# include <unistd.h>
#elif defined WINDOWS
#endif
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <iostream>
#include <cstring>

7
src/parser/Parser.h

@ -10,13 +10,6 @@
#include "src/utility/OsDetection.h"
#if defined LINUX || defined MACOSX
# include <sys/mman.h>
#elif defined WINDOWS
# include <Windows.h>
# include <winnt.h>
#endif
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>

4
src/parser/TraParser.cpp

@ -17,10 +17,6 @@
#include <errno.h>
#include <time.h>
#include <sys/stat.h>
#if defined LINUX || defined MACOSX
#include <sys/mman.h>
#elif defined WINDOWS
#endif
#include <fcntl.h>
#include <locale.h>

1
src/parser/TraParser.h

@ -4,6 +4,7 @@
#include "src/storage/SquareSparseMatrix.h"
#include "src/parser/Parser.h"
#include "src/utility/OsDetection.h"
#include <memory>

3
src/utility/OsDetection.h

@ -6,11 +6,14 @@
#elif defined TARGET_OS_MAC || defined __apple__ || defined __APPLE__
# define MACOSX
# define _DARWIN_USE_64_BIT_INODE
# include <sys/mman.h>
# include <unistd.h>
#elif defined _WIN32 || defined _WIN64
# define WINDOWS
# define NOMINMAX
# include <Windows.h>
# include <winnt.h>
# define strncpy strncpy_s
#else
# error Could not detect Operating System
#endif

Loading…
Cancel
Save