8 |
|
extern "C" { |
9 |
|
#endif |
10 |
|
|
11 |
– |
#include "copyright.h" |
12 |
– |
|
11 |
|
#ifdef _WIN32 |
12 |
|
|
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 */ |
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 */ |
19 |
|
|
20 |
< |
#define SET_DEFAULT_BINARY() _fmode = _O_BINARY |
21 |
< |
#define SET_FILE_BINARY(fp) _setmode(fileno(fp),_O_BINARY) |
24 |
< |
#define SET_FD_BINARY(fd) _setmode(fd,_O_BINARY) |
20 |
> |
#define NON_POSIX |
21 |
> |
#define RHAS_ACCESS |
22 |
|
|
23 |
+ |
#define SET_DEFAULT_BINARY() _fmode = _O_BINARY |
24 |
+ |
#define SET_FILE_BINARY(fp) _setmode(fileno(fp),_O_BINARY) |
25 |
+ |
#define SET_FD_BINARY(fd) _setmode(fd,_O_BINARY) |
26 |
|
|
27 |
– |
|
28 |
– |
|
29 |
– |
|
30 |
– |
|
31 |
– |
|
27 |
|
#else /* _WIN32 */ |
28 |
|
|
29 |
< |
/* NOPs on unix */ |
30 |
< |
#define SET_DEFAULT_BINARY() |
31 |
< |
#define SET_FILE_BINARY(fp) |
32 |
< |
#define SET_FD_BINARY(fd) |
29 |
> |
#ifdef AMIGA |
30 |
> |
#define NON_POSIX |
31 |
> |
#else |
32 |
> |
/* assumedly posix systems */ |
33 |
> |
#define RHAS_GETPWNAM |
34 |
> |
#define RHAS_ACCESS |
35 |
> |
#define RHAS_FORK_EXEC |
36 |
> |
#endif |
37 |
|
|
38 |
+ |
/* everybody except Windows */ |
39 |
|
|
40 |
< |
|
41 |
< |
|
42 |
< |
|
43 |
< |
|
40 |
> |
/* NOPs */ |
41 |
> |
#define SET_DEFAULT_BINARY() |
42 |
> |
#define SET_FILE_BINARY(fp) |
43 |
> |
#define SET_FD_BINARY(fd) |
44 |
|
|
45 |
|
#endif /* _WIN32 */ |
46 |
|
|