提交 ca1aa5ba 编写于 作者: R Rich Felker

more header cleanup and conformance fixes - string.h

上级 131b5be2
......@@ -34,8 +34,6 @@ int strncmp (const char *, const char *, size_t);
int strcoll (const char *, const char *);
size_t strxfrm (char *, const char *, size_t);
char *strdup (const char *);
char *strchr (const char *, int);
char *strrchr (const char *, int);
......@@ -43,21 +41,28 @@ size_t strcspn (const char *, const char *);
size_t strspn (const char *, const char *);
char *strpbrk (const char *, const char *);
char *strstr (const char *, const char *);
char *strtok (char *, const char *);
char *strtok_r (char *, const char *, char **);
size_t strlen (const char *);
char *strerror (int);
int strerror_r (int, char *, size_t);
size_t strlcat (char *, const char *, size_t);
size_t strlcpy (char *, const char *, size_t);
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
char *strtok_r (char *, const char *, char **);
int strerror_r (int, char *, size_t);
char *stpcpy(char *, const char *);
char *stpncpy(char *, const char *, size_t);
size_t strnlen (const char *, size_t);
char *strdup (const char *);
char *strndup (const char *, size_t);
#endif
#ifdef _BSD_SOURCE
size_t strlcat (char *, const char *, size_t);
size_t strlcpy (char *, const char *, size_t);
#endif
#ifdef _GNU_SOURCE
int strcasecmp (const char *, const char *);
......
#define _BSD_SOURCE
#include <string.h>
size_t strlcat(char *d, const char *s, size_t n)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册