Skip to content

Commit

Permalink
fix bad include (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
promgamer authored and vincentlaucsb committed Aug 14, 2019
1 parent 143de29 commit 0c1bcee
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions include/internal/constants.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,18 @@

#include "csv_format.hpp"

#if defined(_WIN32)
#include <Windows.h>
#undef max
#undef min
#elif defined(__linux__)
#include <unistd.h>
#endif

namespace csv {
namespace internals {
// Get operating system specific details
#if defined(_WIN32)
#include <Windows.h>
#undef max
#undef min

inline int getpagesize() {
_SYSTEM_INFO sys_info = {};
GetSystemInfo(&sys_info);
Expand All @@ -24,7 +28,6 @@ namespace csv {
/** Size of a memory page in bytes */
const int PAGE_SIZE = getpagesize();
#elif defined(__linux__)
#include <unistd.h>
const int PAGE_SIZE = getpagesize();
#else
const int PAGE_SIZE = 4096;
Expand Down

0 comments on commit 0c1bcee

Please sign in to comment.