]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/testfile.c
Migrate Windows conditional code to _WIN32 define.
[thirdparty/cups.git] / cups / testfile.c
index e0126f90d7119036b96d8cffd264f95c0e88a5b1..68d22abe8cf886a0404452727ace58b94cb8ff63 100644 (file)
 #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>
 
 
@@ -47,10 +47,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 */
 
 
@@ -78,7 +78,7 @@ main(int  argc,                               /* I - Number of command-line arguments */
 
     status += random_tests();
 
-#ifndef WIN32
+#ifndef _WIN32
    /*
     * Test fdopen and close without reading...
     */
@@ -112,7 +112,7 @@ main(int  argc,                             /* I - Number of command-line arguments */
 
       puts("PASS");
     }
-#endif /* !WIN32 */
+#endif /* !_WIN32 */
 
    /*
     * Count lines in test file, rewind, then count again.
@@ -168,13 +168,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
     {