Mercurial > dwindows
comparison compat.c @ 172:0fc45e386376
Get Dynamic Windows building with Watcom.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sun, 01 Dec 2002 11:11:41 +0000 |
parents | a5da1ac53b34 |
children | 4e3407df0e38 |
comparison
equal
deleted
inserted
replaced
171:b8e93557b2c7 | 172:0fc45e386376 |
---|---|
68 #endif | 68 #endif |
69 } | 69 } |
70 | 70 |
71 int makedir(char *path) | 71 int makedir(char *path) |
72 { | 72 { |
73 #if defined(__IBMC__) || (defined(__WIN32__) && !defined(__CYGWIN32__)) | 73 #if defined(__IBMC__) || defined(__WATCOMC__) || (defined(__WIN32__) && !defined(__CYGWIN32__)) |
74 return mkdir(path); | 74 return mkdir(path); |
75 #else | 75 #else |
76 return mkdir(path,S_IRWXU); | 76 return mkdir(path,S_IRWXU); |
77 #endif | 77 #endif |
78 } | 78 } |
79 | 79 |
80 void nonblock(int fd) | 80 void nonblock(int fd) |
81 { | 81 { |
82 #ifdef __IBMC__ | 82 #if defined(__OS2__) && !defined(__EMX__) |
83 static int _nonblock = 1; | 83 static int _nonblock = 1; |
84 | 84 |
85 ioctl(fd, FIONBIO, (char *)&_nonblock, sizeof(_nonblock)); | 85 ioctl(fd, FIONBIO, (char *)&_nonblock, sizeof(_nonblock)); |
86 #elif defined(__WIN32__) && !defined(__CYGWIN32__) | 86 #elif defined(__WIN32__) && !defined(__CYGWIN32__) |
87 static unsigned long _nonblock = 1; | 87 static unsigned long _nonblock = 1; |
92 #endif | 92 #endif |
93 } | 93 } |
94 | 94 |
95 void block(int fd) | 95 void block(int fd) |
96 { | 96 { |
97 #ifdef __IBMC__ | 97 #if defined(__OS2__) && !defined(__EMX__) |
98 static int _nonblock = 0; | 98 static int _nonblock = 0; |
99 | 99 |
100 ioctl(fd, FIONBIO, (char *)&_nonblock, sizeof(_nonblock)); | 100 ioctl(fd, FIONBIO, (char *)&_nonblock, sizeof(_nonblock)); |
101 #elif defined(__WIN32__) && !defined(__CYGWIN32__) | 101 #elif defined(__WIN32__) && !defined(__CYGWIN32__) |
102 static unsigned long _nonblock = 0; | 102 static unsigned long _nonblock = 0; |
629 #endif | 629 #endif |
630 | 630 |
631 /* Sharable fopen() and fclose() calls. */ | 631 /* Sharable fopen() and fclose() calls. */ |
632 FILE *fsopen(char *path, char *modes) | 632 FILE *fsopen(char *path, char *modes) |
633 { | 633 { |
634 #if defined(__OS2__) || defined(__WIN32__) | 634 #if (defined(__OS2__) && !defined(__WATCOMC__)) || defined(__WIN32__) |
635 int z; | 635 int z; |
636 | 636 |
637 if(!FSIRoot) | 637 if(!FSIRoot) |
638 FSIRoot = calloc(sizeof(struct _fsinfo), FSI_MAX); | 638 FSIRoot = calloc(sizeof(struct _fsinfo), FSI_MAX); |
639 | 639 |