Skip to content

Commit 12954b6

Browse files
committed
Cross compile with MinGW32 runtime
Remove unnecessary Windows includes Provide workaround for http://sourceforge.net/p/mingw/bugs/2024/
1 parent 354801c commit 12954b6

File tree

5 files changed

+8
-28
lines changed

5 files changed

+8
-28
lines changed

src/file.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
#ifdef _WIN32
2+
#ifdef __MINGW32__
3+
#ifndef off64_t
4+
#define off64_t _off64_t /* Workaround for http://sourceforge.net/p/mingw/bugs/2024/ */
5+
#endif
6+
#endif
27
#include <direct.h>
38
#define getcwd _getcwd
49
#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)

src/sass_context.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
#ifdef _WIN32
2-
#include <io.h>
3-
#define LFEED "\n"
4-
#else
5-
#include <unistd.h>
6-
#define LFEED "\n"
7-
#endif
8-
91
#include "sass.h"
102

113
#include <cstring>
@@ -23,6 +15,8 @@
2315
#include "ast_fwd_decl.hpp"
2416
#include "error_handling.hpp"
2517

18+
#define LFEED "\n"
19+
2620
extern "C" {
2721
using namespace Sass;
2822

src/sass_functions.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
#ifdef _WIN32
2-
#include <io.h>
3-
#else
4-
#include <unistd.h>
5-
#endif
6-
71
#include <cstring>
82
#include "util.hpp"
93
#include "context.hpp"

src/sass_interface.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
#ifdef _WIN32
2-
#include <io.h>
3-
#define LFEED "\n"
4-
#else
5-
#include <unistd.h>
6-
#define LFEED "\n"
7-
#endif
8-
91
#include "sass.h"
102

113
#include <string>
@@ -20,6 +12,7 @@
2012
#include "error_handling.hpp"
2113
#include "sass_interface.h"
2214

15+
#define LFEED "\n"
2316

2417
extern "C" {
2518

src/sass_values.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
#ifdef _WIN32
2-
#include <io.h>
3-
#else
4-
#include <unistd.h>
5-
#endif
6-
71
#include <cstdlib>
82
#include <cstring>
93
#include "util.hpp"

0 commit comments

Comments
 (0)