msteveb / jimtcl

Official repository of Jim Tcl, an open-source, small footprint implementation of Tcl
http://jim.tcl.tk/
Other
445 stars 123 forks source link

strncasecmp and strcasecmp in jim-signal.c w/o strings.h include #270

Closed jorge-leon closed 1 year ago

jorge-leon commented 1 year ago

jim-signal.c uses the two BSD 4.4 specific functions strncasecmp and strcasecmp which are officially included in strings.h, but not necessarily in string.h.

Some arbitrarily googled comment explains the background and also contains the suggestion to replace the functions with "standard" ones.: https://stackoverflow.com/questions/4291149/difference-between-string-h-and-strings-h

The issue showed up when compiling jimtcl against diet libc: https://www.fefe.de/dietlibc/

Adding the "missing" 's' to #include <string.h> in the file jim-signal.c fixes the issue on that side.