Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 6f6a5c82af6afa687488a6310ca9f5b00fb6cc0d6b4b76b3d642419c12b46924
Ticket: 0cb3554903fc141964afbaaee2602e1fe9906e88
macOS 13 SDK deprecates sprintf()
User & Date: chrstphrchvz on 2023-03-26 10:29:37
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed to:
    <tt>sprintf()</tt> is deprecated as of the macOS 13 SDK, causing many compiler warnings to be emitted when building Tcl, e.g.:
    
    <blockquote><pre>
    <span style="font-weight:bold">tcl/generic/regerror.c:77:2: <span style="color:purple">warning: </span>'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]</span>
            sprintf(convbuf, "%d", r->code); /* -1 for unknown */
            <span style="color:green;font-weight:bold">^</span>
    <span style="font-weight:bold">/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdio.h:188:1: note: </span>'sprintf' has been explicitly marked deprecated here
    __deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
    <span style="color:green;font-weight:bold">^</span>
    <span style="font-weight:bold">/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: note: </span>expanded from macro '__deprecated_msg'
            #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                          <span style="color:green;font-weight:bold">^</span>
    </pre></blockquote>
    
    
    I notice <tt>sprintf()</tt> has recently been eradicated from Tk 8.6; will there be a similar effort for Tcl 8.6, or is this won’t-fix for 8.6?
    
  5. foundin changed to: "8.6.13"
  6. is_private changed to: "0"
  7. login: "chrstphrchvz"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "6133eb3026f9b10aa9b7b48da92ae2834fc225b0"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "chrstphrchvz"
  14. subsystem changed to: "52. Portability Support"
  15. title changed to: "macOS 13 SDK deprecates sprintf()"
  16. type changed to: "Bug"