Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch of checked header changes from CCI 2021-05 #448

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Commits on May 21, 2021

  1. Change the existing conditional headers to raise an #error if the

    original header is not available on the system.
    
    As agreed with Sulekha. Conditionalizing the installation via CMake
    might be even better, but that would take some more thought, especially
    if we still want to test threads_checked.h on systems that don't have
    threads.h.
    
    Note that for the wrapper headers (`foo.h` as opposed to
    `foo_checked.h`), we reverse the order of the conditionals because we
    always want to use the `#error` message from `foo.h`, not the one from
    `foo_checked.h`, which wouldn't make sense if the user originally
    included `foo.h`.
    
    The `#error` message is subject to change in Microsoft's code review.
    mattmccutchen-cci committed May 21, 2021
    Configuration menu
    Copy the full SHA
    a908b53 View commit details
    Browse the repository at this point in the history

Commits on May 25, 2021

  1. Fix the bounds declarations for snprintf variants to match snprintf.

    This applies the change from
    microsoft#309 to support the common use
    case for sprintf-like functions with null-terminated arrays.
    mattmccutchen-cci committed May 25, 2021
    Configuration menu
    Copy the full SHA
    00d0c73 View commit details
    Browse the repository at this point in the history
  2. Allow the memory block passed to realloc to be zero-size.

    This is analogous to microsoft#298 for
    `free` and presumably is safe for the same reason.
    mattmccutchen-cci committed May 25, 2021
    Configuration menu
    Copy the full SHA
    f638c5c View commit details
    Browse the repository at this point in the history
  3. Add more headers and checked declarations.

    Co-authored-by: John Kastner <john@correctcomputation.com>
    Co-authored-by: mwhicks1 <mwh@correctcomputation.com>
    3 people committed May 25, 2021
    Configuration menu
    Copy the full SHA
    2b6b1e4 View commit details
    Browse the repository at this point in the history
  4. Add itype to strftime.

    Originally by Mike with no stated reason. We're discussing whether we
    want to keep it.
    mattmccutchen-cci committed May 25, 2021
    Configuration menu
    Copy the full SHA
    d29e37e View commit details
    Browse the repository at this point in the history