[PATCH] Fix declaration guard for strcasecmp()
Jon TURNEY
jon.turney@dronecode.org.uk
Wed Oct 29 18:54:00 GMT 2014
Based on [1], I think that strcasecmp() should be declared by string.h
if _BSD_VISIBLE or _POSIX_VISIBLE, the same as strncasecmp() a few lines
further down.
Patch attached.
2014-10-29 Jon Turney <jon.turney@dronecode.org.uk>
* libc/include/string.h: Correct guard for strcasecmp().
[1] http://pubs.opengroup.org/onlinepubs/009695399/functions/strcasecmp.html
-------------- next part --------------
Index: libc/include/string.h
===================================================================
RCS file: /cvs/src/src/newlib/libc/include/string.h,v
retrieving revision 1.38
diff -u -u -p -r1.38 string.h
--- libc/include/string.h 8 Oct 2014 21:04:59 -0000 1.38
+++ libc/include/string.h 29 Oct 2014 18:31:07 -0000
@@ -69,7 +69,7 @@ char *_EXFUN(rindex,(const char *, int)
#endif
char *_EXFUN(stpcpy,(char *__restrict, const char *__restrict));
char *_EXFUN(stpncpy,(char *__restrict, const char *__restrict, size_t));
-#if __BSD_VISIBLE
+#if __BSD_VISIBLE || __POSIX_VISIBLE
int _EXFUN(strcasecmp,(const char *, const char *));
#endif
#if __GNU_VISIBLE
More information about the Newlib
mailing list