From: Michael R Sweet Date: Fri, 9 Apr 2021 14:08:41 +0000 (-0400) Subject: Cleanup for Issue #167 X-Git-Tag: v2.4b1~152 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0813a2cecff620a0a125ebbda67d21534a042bef;p=thirdparty%2Fcups.git Cleanup for Issue #167 --- diff --git a/backend/backend-private.h b/backend/backend-private.h index 9b656ebd4b..d19b06b823 100644 --- a/backend/backend-private.h +++ b/backend/backend-private.h @@ -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 */ diff --git a/backend/usb-darwin.c b/backend/usb-darwin.c index 25e58cdda0..6bf4ba5668 100644 --- a/backend/usb-darwin.c +++ b/backend/usb-darwin.c @@ -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