This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On 2016-04-14 09:16, Eric Blake wrote:
On 04/13/2016 10:55 PM, Yaakov Selkowitz wrote:+#if __BSD_VISIBLE /* POSIX declaration is in <strings.h> */ int _EXFUN(strcasecmp,(const char *, const char *)); #endifPOSIX says <string.h> can declare ANY str* function without it being namespace pollution, so _this_ particular duplicate is not only okay, but there are programs that have come to rely on it being duplicated here, the way glibc does it (yes, those programs SHOULD be using <strings.h>, but it doesn't hurt to copy glibc).
This is exactly how glibc does it: these functions are only in <string.h> for BSD compatibility (which is also the default, or with _GNU_SOURCE). However when POSIX is specified then the declarations are only in <strings.h>.
-- Yaakov
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |