1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
|
diff -ur psutils-1.17.orig/config.h psutils-1.17/config.h
--- psutils-1.17.orig/config.h 1997-03-11 23:52:52.000000000 +0100
+++ psutils-1.17/config.h 2012-08-26 15:44:12.000000000 +0200
@@ -4,13 +4,13 @@
* OS specific configuration for PSUtils
*/
-#if defined(MSDOS) || defined(WINNT)
-#define TMPDIR "\\tmp"
+#if defined(MSDOS) || defined(WINNT) || defined(WIN32)
+#define TMPDIR "."
#define OPEN_READ "rb"
#define OPEN_WRITE "wb"
#include <fcntl.h>
#include <io.h>
-#else /* ! MSDOS && ! WINNT */
+#else /* ! MSDOS && ! WINNT && ! WIN32 */
#if defined(OS2)
#define TMPDIR "."
#define OPEN_READ "rb"
@@ -26,5 +26,5 @@
#define TMPDIR "/tmp"
#endif /* ! VMS */
#endif /* ! OS2 */
-#endif /* ! MSDOS && ! WINNT */
+#endif /* ! MSDOS && ! WINNT && !WIN32 */
diff -ur psutils-1.17.orig/epsffit.c psutils-1.17/epsffit.c
--- psutils-1.17.orig/epsffit.c 1997-03-11 23:52:52.000000000 +0100
+++ psutils-1.17/epsffit.c 2006-01-17 22:16:42.000000000 +0100
@@ -75,7 +75,7 @@
if(!(input = fopen(argv[4], OPEN_READ)))
message(FATAL, "can't open input file %s\n", argv[4]);
} else {
-#if defined(MSDOS) || defined(WINNT)
+#if defined(MSDOS) || defined(WINNT) || defined(WIN32)
int fd = fileno(stdin) ;
if ( setmode(fd, O_BINARY) < 0 )
message(FATAL, "can't reset stdin to binary mode\n");
@@ -87,7 +87,7 @@
if(!(output = fopen(argv[5], OPEN_WRITE)))
message(FATAL, "can't open output file %s\n", argv[5]);
} else {
-#if defined(MSDOS) || defined(WINNT)
+#if defined(MSDOS) || defined(WINNT) || defined(WIN32)
int fd = fileno(stdout) ;
if ( setmode(fd, O_BINARY) < 0 )
message(FATAL, "can't reset stdout to binary mode\n");
diff -ur psutils-1.17.orig/psbook.c psutils-1.17/psbook.c
--- psutils-1.17.orig/psbook.c 1997-03-11 23:53:01.000000000 +0100
+++ psutils-1.17/psbook.c 2006-01-17 22:16:42.000000000 +0100
@@ -62,7 +62,7 @@
message(FATAL, "can't open output file %s\n", *argv);
} else usage();
}
-#if defined(MSDOS) || defined(WINNT)
+#if defined(MSDOS) || defined(WINNT) || defined(WIN32)
if ( infile == stdin ) {
int fd = fileno(stdin) ;
if ( setmode(fd, O_BINARY) < 0 )
diff -ur psutils-1.17.orig/psnup.c psutils-1.17/psnup.c
--- psutils-1.17.orig/psnup.c 1997-03-11 23:53:02.000000000 +0100
+++ psutils-1.17/psnup.c 2006-01-17 22:16:42.000000000 +0100
@@ -190,7 +190,7 @@
message(FATAL, "can't open output file %s\n", *argv);
} else usage();
}
-#if defined(MSDOS) || defined(WINNT)
+#if defined(MSDOS) || defined(WINNT) || defined(WIN32)
if ( infile == stdin ) {
int fd = fileno(stdin) ;
if ( setmode(fd, O_BINARY) < 0 )
diff -ur psutils-1.17.orig/psresize.c psutils-1.17/psresize.c
--- psutils-1.17.orig/psresize.c 1997-03-11 23:53:03.000000000 +0100
+++ psutils-1.17/psresize.c 2006-01-17 22:16:42.000000000 +0100
@@ -114,7 +114,7 @@
message(FATAL, "can't open output file %s\n", *argv);
} else usage();
}
-#if defined(MSDOS) || defined(WINNT)
+#if defined(MSDOS) || defined(WINNT) || defined(WIN32)
if ( infile == stdin ) {
int fd = fileno(stdin) ;
if ( setmode(fd, O_BINARY) < 0 )
diff -ur psutils-1.17.orig/psselect.c psutils-1.17/psselect.c
--- psutils-1.17.orig/psselect.c 1997-03-11 23:53:03.000000000 +0100
+++ psutils-1.17/psselect.c 2006-01-17 22:16:42.000000000 +0100
@@ -133,7 +133,7 @@
message(FATAL, "can't open output file %s\n", *argv);
} else usage();
}
-#if defined(MSDOS) || defined(WINNT)
+#if defined(MSDOS) || defined(WINNT) || defined(WIN32)
if ( infile == stdin ) {
int fd = fileno(stdin) ;
if ( setmode(fd, O_BINARY) < 0 )
diff -ur psutils-1.17.orig/pstops.c psutils-1.17/pstops.c
--- psutils-1.17.orig/pstops.c 1997-03-11 23:53:04.000000000 +0100
+++ psutils-1.17/pstops.c 2006-01-17 22:16:42.000000000 +0100
@@ -177,7 +177,7 @@
}
if (specs == NULL)
usage();
-#if defined(MSDOS) || defined(WINNT)
+#if defined(MSDOS) || defined(WINNT) || defined(WIN32)
if ( infile == stdin ) {
int fd = fileno(stdin) ;
if ( setmode(fd, O_BINARY) < 0 )
diff -ur psutils-1.17.orig/psutil.c psutils-1.17/psutil.c
--- psutils-1.17.orig/psutil.c 1997-03-11 23:53:04.000000000 +0100
+++ psutils-1.17/psutil.c 2006-01-17 22:16:42.000000000 +0100
@@ -85,13 +85,13 @@
#endif
char *p;
char buffer[BUFSIZ] ;
-#if defined(WINNT)
+#if defined(WINNT) || defined(WIN32)
struct _stat fs ;
#else
long fpos;
#endif
-#if defined(WINNT)
+#if defined(WINNT) || defined(WIN32)
if (_fstat(fileno(fp), &fs) == 0 && (fs.st_mode&_S_IFREG) != 0)
return (fp);
#else
|