13 |
|
#include <stdio.h> |
14 |
|
#define popen _popen |
15 |
|
#define pclose _pclose |
16 |
– |
#include <fcntl.h> /* _O_BINARY, _O_TEXT */ |
17 |
– |
#include <io.h> /* _setmode() */ |
18 |
– |
#include <stdlib.h> /* _fmode */ |
16 |
|
|
17 |
|
#define NON_POSIX |
21 |
– |
#define RHAS_ACCESS |
18 |
|
|
19 |
+ |
#include <sys/types.h> |
20 |
+ |
#include <sys/stat.h> |
21 |
+ |
#define RHAS_STAT |
22 |
+ |
#define S_IFREG _S_IFREG |
23 |
+ |
#define W_IFDIR _S_IFDIR |
24 |
+ |
|
25 |
+ |
#include <fcntl.h> /* _O_BINARY, _O_TEXT */ |
26 |
+ |
#include <io.h> /* _setmode() */ |
27 |
+ |
#include <stdlib.h> /* _fmode */ |
28 |
|
#define SET_DEFAULT_BINARY() _fmode = _O_BINARY |
29 |
|
#define SET_FILE_BINARY(fp) _setmode(fileno(fp),_O_BINARY) |
30 |
|
#define SET_FD_BINARY(fd) _setmode(fd,_O_BINARY) |
36 |
|
#else |
37 |
|
/* assumedly posix systems */ |
38 |
|
#define RHAS_GETPWNAM |
39 |
< |
#define RHAS_ACCESS |
39 |
> |
#define RHAS_STAT |
40 |
|
#define RHAS_FORK_EXEC |
41 |
|
#endif |
42 |
|
|