@@ -10,7 +10,7 @@
10#include <time.h>
10#include <time.h>
11#include <dirent.h>
11#include <dirent.h>
13−#if defined(WIN32) || defined(__WIN32) || defined(__WIN32__)
13+#ifdef _WIN32
14int win_fpoll(void* h);
14int win_fpoll(void* h);
15FILE *win32_u8fopen(const char *path, const char *mode);
15FILE *win32_u8fopen(const char *path, const char *mode);
16FILE *win32_u8popen(const char *path, const char *mode);
16FILE *win32_u8popen(const char *path, const char *mode);
@@ -25,7 +25,7 @@ void putStr(char* str) {
27void *fileOpen(char *name, char *mode) {
27void *fileOpen(char *name, char *mode) {
28−#if defined(WIN32) || defined(__WIN32) || defined(__WIN32__)
28+#ifdef _WIN32
29 FILE *f = win32_u8fopen(name, mode);
29 FILE *f = win32_u8fopen(name, mode);
31 FILE *f = fopen(name, mode);
31 FILE *f = fopen(name, mode);
@@ -97,7 +97,7 @@ char* idris_nextDirEntry(void* h) {
99int idris_mkdir(char* dname) {
99int idris_mkdir(char* dname) {
100−#if defined(WIN32) || defined(__WIN32) || defined(__WIN32__)
100+#ifdef _WIN32
101 return mkdir(dname);
101 return mkdir(dname);
103 return mkdir(dname, S_IRWXU | S_IRGRP | S_IROTH);
103 return mkdir(dname, S_IRWXU | S_IRGRP | S_IROTH);
@@ -119,7 +119,7 @@ int idris_writeStr(void* h, char* str) {
120int fpoll(void* h)
120int fpoll(void* h)
122−#if defined(WIN32) || defined(__WIN32) || defined(__WIN32__)
122+#ifdef _WIN32
123 return win_fpoll(h);
123 return win_fpoll(h);
125 FILE* f = (FILE*)h;
125 FILE* f = (FILE*)h;
@@ -138,7 +138,7 @@ int fpoll(void* h)
140void *do_popen(const char *cmd, const char *mode) {
140void *do_popen(const char *cmd, const char *mode) {
141−#if defined(WIN32) || defined(__WIN32) || defined(__WIN32__)
141+#ifdef _WIN32
142 FILE *f = win32_u8popen(cmd, mode);
142 FILE *f = win32_u8popen(cmd, mode);
144 FILE *f = popen(cmd, mode);
144 FILE *f = popen(cmd, mode);