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 #include -#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