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

i#2522 strcasestr prototype error: Remove const from result type #2526

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Oct 4, 2024

  1. i#2522 strcasestr prototype error: Remove const from result type

    The definition of strcasestr is
    
    char *strcasestr(const char *text, const char *pattern);
    
    but drmemory uses
    
    const char *strcasestr(const char *text, const char *pattern);
    
    This causes build errors when both /usr/include/string.h and common/utils.h
    are included in linux. The definition for strcasestr for C has always not
    had the `const` in the result type (going back to its original addition
    to glibc in 1997). Thus we're pretty safe in not breaking anything on *nix.
    The other main use case of drmemory's strcasestr is on Windows, which does
    not have strcasestr.
    
    Tested:
    $ cmake && make
    
    Fixes #2522
    xdje42 committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    9278b9a View commit details
    Browse the repository at this point in the history