]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/adminutil.c
Migrate Windows conditional code to _WIN32 define.
[thirdparty/cups.git] / cups / adminutil.c
index b86d1977b6b381d3f741d587b04c9318f9cff253..8970a06accd7e1c5b3106a683c14f80784a994a8 100644 (file)
 #include "adminutil.h"
 #include <fcntl.h>
 #include <sys/stat.h>
-#ifdef WIN32
-#else
+#ifndef _WIN32
 #  include <unistd.h>
 #  include <sys/wait.h>
-#endif /* WIN32 */
+#endif /* !_WIN32 */
 
 
 /*
@@ -2081,7 +2080,7 @@ do_samba_command(const char *command,     /* I - Command to run */
                 const char *authfile,  /* I - Samba authentication file */
                 FILE *logfile)         /* I - Optional log file */
 {
-#ifdef WIN32
+#ifdef _WIN32
   return (1);                          /* Always fail on Windows... */
 
 #else
@@ -2148,7 +2147,7 @@ do_samba_command(const char *command,     /* I - Command to run */
     return (WEXITSTATUS(status));
   else
     return (-WTERMSIG(status));
-#endif /* WIN32 */
+#endif /* _WIN32 */
 }
 
 
@@ -2166,9 +2165,9 @@ get_cupsd_conf(
     int             *remote)           /* O - Remote file? */
 {
   int          fd;                     /* Temporary file descriptor */
-#ifndef WIN32
+#ifndef _WIN32
   struct stat  info;                   /* cupsd.conf file information */
-#endif /* WIN32 */
+#endif /* _WIN32 */
   http_status_t        status;                 /* Status of getting cupsd.conf */
   char         host[HTTP_MAX_HOST];    /* Hostname for connection */
 
@@ -2185,7 +2184,7 @@ get_cupsd_conf(
   snprintf(name, namesize, "%s/cupsd.conf", cg->cups_serverroot);
   *remote = 0;
 
-#ifndef WIN32
+#ifndef _WIN32
   if (!_cups_strcasecmp(host, "localhost") && !access(name, R_OK))
   {
    /*
@@ -2212,7 +2211,7 @@ get_cupsd_conf(
       status = HTTP_STATUS_OK;
   }
   else
-#endif /* !WIN32 */
+#endif /* !_WIN32 */
   {
    /*
     * Read cupsd.conf via a HTTP GET request...