[tex-k] Minor prototype fix in kpathsea header file

Doug McKenna doug at mathemaesthetics.com
Fri Oct 18 20:48:32 CEST 2019


XCode's LLVM compiler issued a warning for a bad prototype for the following lines in the kpathsea file "c-memstr.h":

#if !defined(HAVE_STRING_H)
extern char *strtok ();           <--
#ifndef strstr
extern char *strstr ();           <--
#endif

It proffers a fix of inserting a void between the parentheses in both cases, which would be incorrect.

The correct fix, based on looking up their latest prototypes in system headers, is:

#if !defined(HAVE_STRING_H)
extern char *strtok (char *str, const char *delim);
#ifndef strstr
extern char *strstr (const char *big, const char *little);
#endif


- Doug McKenna


More information about the tex-k mailing list