diff options
Diffstat (limited to 'cups/testfile.c')
-rw-r--r-- | cups/testfile.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/cups/testfile.c b/cups/testfile.c index b2ec8cd5..1473a4a0 100644 --- a/cups/testfile.c +++ b/cups/testfile.c @@ -1,7 +1,7 @@ /* * File test program for CUPS. * - * Copyright 2007-2015 by Apple Inc. + * Copyright 2007-2018 by Apple Inc. * Copyright 1997-2007 by Easy Software Products. * * These coded instructions, statements, and computer programs are the @@ -22,14 +22,11 @@ #include "file.h" #include <stdlib.h> #include <time.h> -#ifdef HAVE_LIBZ -# include <zlib.h> -#endif /* HAVE_LIBZ */ -#ifdef WIN32 +#ifdef _WIN32 # include <io.h> #else # include <unistd.h> -#endif /* WIN32 */ +#endif /* _WIN32 */ #include <fcntl.h> @@ -53,10 +50,10 @@ main(int argc, /* I - Number of command-line arguments */ int status; /* Exit status */ char filename[1024]; /* Filename buffer */ cups_file_t *fp; /* File pointer */ -#ifndef WIN32 +#ifndef _WIN32 int fds[2]; /* Open file descriptors */ cups_file_t *fdfile; /* File opened with cupsFileOpenFd() */ -#endif /* !WIN32 */ +#endif /* !_WIN32 */ int count; /* Number of lines in file */ @@ -84,7 +81,7 @@ main(int argc, /* I - Number of command-line arguments */ status += random_tests(); -#ifndef WIN32 +#ifndef _WIN32 /* * Test fdopen and close without reading... */ @@ -118,7 +115,7 @@ main(int argc, /* I - Number of command-line arguments */ puts("PASS"); } -#endif /* !WIN32 */ +#endif /* !_WIN32 */ /* * Count lines in psglyphs, rewind, then count again. @@ -174,13 +171,13 @@ main(int argc, /* I - Number of command-line arguments */ */ fputs("\ncupsFileFind: ", stdout); -#ifdef WIN32 +#ifdef _WIN32 if (cupsFileFind("notepad.exe", "C:/WINDOWS", 1, filename, sizeof(filename)) && cupsFileFind("notepad.exe", "C:/WINDOWS;C:/WINDOWS/SYSTEM32", 1, filename, sizeof(filename))) #else if (cupsFileFind("cat", "/bin", 1, filename, sizeof(filename)) && cupsFileFind("cat", "/bin:/usr/bin", 1, filename, sizeof(filename))) -#endif /* WIN32 */ +#endif /* _WIN32 */ printf("PASS (%s)\n", filename); else { |