* 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 */
/*
* 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 */
* 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 */
}
* 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 */
* 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)
{