Skip to content

Commit e31cb75

Browse files
committed
Emulate S_ISDIR() macro on Windows
1 parent 993abe3 commit e31cb75

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

document.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include <iostream>
77
#include <sstream>
88
#include <sys/stat.h>
9+
#include <unistd.h>
910

1011
namespace Sass {
1112

win32/unistd.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99

1010
#include <stdlib.h>
1111
#include <io.h>
12-
#include <process.h> /* for getpid() and the exec..() family */
13-
#include <direct.h> /* for _getcwd() */
12+
#include <process.h> /* for getpid() and the exec..() family */
13+
#include <direct.h> /* for _getcwd() */
14+
#include <sys/stat.h> /* for _S_IFDIR */
1415

1516
#define srandom srand
1617
#define random rand
@@ -25,6 +26,7 @@
2526
#define access _access
2627
#define ftruncate _chsize
2728
#define getcwd _getcwd
29+
#define S_ISDIR(B) ((B)&_S_IFDIR)
2830

2931
#define STDIN_FILENO 0
3032
#define STDOUT_FILENO 1

0 commit comments

Comments
 (0)