Skip to content

Commit

Permalink
Emulate S_ISDIR() macro on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
dahlia committed Sep 11, 2012
1 parent 993abe3 commit e31cb75
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions document.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <iostream>
#include <sstream>
#include <sys/stat.h>
#include <unistd.h>

namespace Sass {

Expand Down
6 changes: 4 additions & 2 deletions win32/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@

#include <stdlib.h>
#include <io.h>
#include <process.h> /* for getpid() and the exec..() family */
#include <direct.h> /* for _getcwd() */
#include <process.h> /* for getpid() and the exec..() family */
#include <direct.h> /* for _getcwd() */
#include <sys/stat.h> /* for _S_IFDIR */

#define srandom srand
#define random rand
Expand All @@ -25,6 +26,7 @@
#define access _access
#define ftruncate _chsize
#define getcwd _getcwd
#define S_ISDIR(B) ((B)&_S_IFDIR)

#define STDIN_FILENO 0
#define STDOUT_FILENO 1
Expand Down

0 comments on commit e31cb75

Please sign in to comment.