]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/backchannel.c
Migrate Windows conditional code to _WIN32 define.
[thirdparty/cups.git] / cups / backchannel.c
index c4c96acbe3790743cbb2988d68445ee66b4392dd..6c9aba417020465916f59b543ad673b191e400d5 100644 (file)
@@ -4,13 +4,7 @@
  * Copyright 2007-2014 by Apple Inc.
  * Copyright 1997-2007 by Easy Software Products.
  *
- * These coded instructions, statements, and computer programs are the
- * property of Apple Inc. and are protected by Federal copyright
- * law.  Distribution and use rights are outlined in the file "LICENSE.txt"
- * which should have been included with this file.  If this file is
- * file is missing or damaged, see the license at "http://www.cups.org/".
- *
- * This file is subject to the Apple OS-Developed Software exception.
+ * Licensed under Apache License v2.0.  See the file "LICENSE" for more information.
  */
 
 /*
 
 #include "cups.h"
 #include <errno.h>
-#ifdef WIN32
+#ifdef _WIN32
 #  include <io.h>
 #  include <fcntl.h>
 #else
 #  include <sys/time.h>
-#endif /* WIN32 */
+#endif /* _WIN32 */
 
 
 /*
@@ -42,7 +36,7 @@ static void   cups_setup(fd_set *set, struct timeval *tval,
  * parameter controls how many seconds to wait for the data - use 0.0 to
  * return immediately if there is no data, -1.0 to wait for data indefinitely.
  *
- * @since CUPS 1.2/OS X 10.5@
+ * @since CUPS 1.2/macOS 10.5@
  */
 
 ssize_t                                        /* O - Bytes read or -1 on error */
@@ -77,11 +71,11 @@ cupsBackChannelRead(char   *buffer, /* I - Buffer to read into */
   * Read bytes from the pipe...
   */
 
-#ifdef WIN32
+#ifdef _WIN32
   return ((ssize_t)_read(3, buffer, (unsigned)bytes));
 #else
   return (read(3, buffer, bytes));
-#endif /* WIN32 */
+#endif /* _WIN32 */
 }
 
 
@@ -93,7 +87,7 @@ cupsBackChannelRead(char   *buffer,   /* I - Buffer to read into */
  * 0.0 to return immediately if the data cannot be written, -1.0 to wait
  * indefinitely.
  *
- * @since CUPS 1.2/OS X 10.5@
+ * @since CUPS 1.2/macOS 10.5@
  */
 
 ssize_t                                        /* O - Bytes written or -1 on error */
@@ -139,11 +133,11 @@ cupsBackChannelWrite(
     * Write bytes to the pipe...
     */
 
-#ifdef WIN32
+#ifdef _WIN32
     count = (ssize_t)_write(3, buffer, (unsigned)(bytes - total));
 #else
     count = write(3, buffer, bytes - total);
-#endif /* WIN32 */
+#endif /* _WIN32 */
 
     if (count < 0)
     {