]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Cleanup for Issue #167
authorMichael R Sweet <michael.r.sweet@gmail.com>
Fri, 9 Apr 2021 14:08:41 +0000 (10:08 -0400)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Fri, 9 Apr 2021 14:08:41 +0000 (10:08 -0400)
backend/backend-private.h
backend/usb-darwin.c

index 9b656ebd4b16e89fd9586486c35daf4fadc81146..d19b06b823b6d77a8bb3e4861de8d0d59c174dfe 100644 (file)
@@ -1,7 +1,8 @@
 /*
  * Backend support definitions for CUPS.
  *
- * Copyright © 2007-2014 by Apple Inc.
+ * Copyright © 2021 by OpenPrinting
+ * Copyright © 2007-2021 by Apple Inc.
  * Copyright © 1997-2007 by Easy Software Products, all rights reserved.
  *
  * Licensed under Apache License v2.0.  See the file "LICENSE" for more
@@ -52,6 +53,14 @@ extern "C" {
 #  endif /* __cplusplus */
 
 
+/*
+ * Log messages in backend signal handlers or other places where stdio cannot
+ * be used...
+ */
+
+#  define backendMessage(msg) {const char *s = msg; write(2, s, strlen(s));}
+
+
 /*
  * OID constants...
  */
@@ -320,13 +329,6 @@ extern int         backendSNMPSupplies(int snmp_fd, http_addr_t *addr,
 extern int             backendWaitLoop(int snmp_fd, http_addr_t *addr,
                                        int use_bc, _cups_sccb_t side_cb);
 
-/*
- * Used to log messages in backend.
- * This was done to avoid a mismatch between the message string and the length of the string to write.
- */
-#define CUPS_BACKEND_LOG_MESSAGE_SIZE 2048
-#define backendMessage(msg) {const char *s=msg; write(2, s, strnlen(s, CUPS_BACKEND_LOG_MESSAGE_SIZE));}
-
 #  ifdef __cplusplus
 }
 #  endif /* __cplusplus */
index 25e58cdda0d505d9a49ca67a61fdfa559748e994..6bf4ba566809b9a61334522074de14287215134b 100644 (file)
@@ -1,5 +1,7 @@
 /*
- * Copyright 2005-2016 Apple Inc. All rights reserved.
+ * USB backend for macOS.
+ *
+ * Copyright © 2005-2021 Apple Inc. All rights reserved.
  *
  * IMPORTANT:  This Apple software is supplied to you by Apple Computer,
  * Inc. ("Apple") in consideration of your agreement to the following