mirror of
https://github.com/apache/nuttx.git
synced 2026-10-10 07:40:27 +00:00
include/string.h: Also declare strcasecmp() and strncasecmp().
POSIX declares strcasecmp() and strncasecmp() in <strings.h>. glibc, musl and newlib also declare them in <string.h>, and some programs rely on that: they include only <string.h> and get an implicit declaration on NuttX. Declare the two functions in <string.h> too. Only the prototypes are added: the BSD macros of <strings.h> (bcopy(), bzero() and others) stay out of <string.h>. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
This commit is contained in:
parent
e794a88e1e
commit
fe34a3ee78
1 changed files with 8 additions and 0 deletions
|
|
@ -74,6 +74,14 @@ size_t strlcat(FAR char *, FAR const char *, size_t);
|
|||
FAR char *strncat(FAR char *, FAR const char *, size_t);
|
||||
int strcmp(FAR const char *, FAR const char *);
|
||||
int strncmp(FAR const char *, FAR const char *, size_t);
|
||||
|
||||
/* Also declared in <strings.h>. Other C libraries declare them in
|
||||
* <string.h> as well, and some programs rely on that.
|
||||
*/
|
||||
|
||||
int strcasecmp(FAR const char *, FAR const char *);
|
||||
int strncasecmp(FAR const char *, FAR const char *, size_t);
|
||||
|
||||
int strcoll(FAR const char *, FAR const char *s2);
|
||||
FAR char *strcpy(FAR char *dest, FAR const char *src);
|
||||
FAR char *stpcpy(FAR char *dest, FAR const char *src);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue