RandyGaul / cute_headers

Collection of cross-platform one-file C/C++ libraries with no dependencies, primarily used for games
4.33k stars 269 forks source link

Added strings.h include to resolve strncasecmp on some systems #393

Closed empyreanx closed 3 months ago

empyreanx commented 3 months ago

The header strings.h is the C standard compliant header for strncasecmp, however some implementations also declare it in string.h (which is why it complies on some distributions but not others). An include for strings.h has been added. The string,h include has been preserved in the event that there are some non-compliant implementations. We don't want to accidentally break things for some users, and there are minimal downsides to doing this.

empyreanx commented 3 months ago

It looks like the upstream library is https://github.com/mattiasgustavsson/libs/blob/main/strpool.h . I'll send a PR to @mattiasgustavsson when I have a moment.