#endif
#ifndef __HAVE_ARCH_STRCASECMP
-int strcasecmp(const char *s1, const char *s2)
+int (strcasecmp)(const char *s1, const char *s2)
{
int c1, c2;
* @cs: One string
* @ct: Another string
*/
-int strcmp(const char * cs,const char * ct)
+int (strcmp)(const char *cs, const char *ct)
{
register signed char __res;
* @ct: Another string
* @count: The maximum number of bytes to compare
*/
-int strncmp(const char * cs,const char * ct,size_t count)
+int (strncmp)(const char *cs, const char *ct, size_t count)
{
register signed char __res = 0;
* @s: The string to be searched
* @c: The character to search for
*/
-char * strchr(const char * s, int c)
+char *(strchr)(const char *s, int c)
{
for(; *s != (char) c; ++s)
if (*s == '\0')
* @s: The string to be searched
* @c: The character to search for
*/
-char * strrchr(const char * s, int c)
+char *(strrchr)(const char *s, int c)
{
const char *p = s + strlen(s);
do {
* strlen - Find the length of a string
* @s: The string to be sized
*/
-size_t strlen(const char * s)
+size_t (strlen)(const char * s)
{
const char *sc;
*
* Do not use memset() to access IO space, use memset_io() instead.
*/
-void * memset(void * s,int c,size_t count)
+void *(memset)(void *s, int c, size_t count)
{
char *xs = (char *) s;
* You should not use this function to access IO space, use memcpy_toio()
* or memcpy_fromio() instead.
*/
-void * memcpy(void * dest,const void *src,size_t count)
+void *(memcpy)(void *dest, const void *src, size_t count)
{
char *tmp = (char *) dest, *s = (char *) src;
*
* Unlike memcpy(), memmove() copes with overlapping areas.
*/
-void * memmove(void * dest,const void *src,size_t count)
+void *(memmove)(void *dest, const void *src, size_t count)
{
char *tmp, *s;
* @ct: Another area of memory
* @count: The size of the area.
*/
-int memcmp(const void * cs,const void * ct,size_t count)
+int (memcmp)(const void *cs, const void *ct, size_t count)
{
const unsigned char *su1, *su2;
int res = 0;
* @s1: The string to be searched
* @s2: The string to search for
*/
-char * strstr(const char * s1,const char * s2)
+char *(strstr)(const char *s1, const char *s2)
{
int l1, l2;
* returns the address of the first occurrence of @c, or %NULL
* if @c is not found
*/
-void *memchr(const void *s, int c, size_t n)
+void *(memchr)(const void *s, int c, size_t n)
{
const unsigned char *p = s;
while (n-- != 0) {
#ifndef __HAVE_ARCH_STRCMP
int strcmp(const char *, const char *);
+#define strcmp(s1, s2) __builtin_strcmp(s1, s2)
#endif
#ifndef __HAVE_ARCH_STRNCMP
int strncmp(const char *, const char *, size_t);
+#define strncmp(s1, s2, n) __builtin_strncmp(s1, s2, n)
#endif
#ifndef __HAVE_ARCH_STRNICMP
#ifndef __HAVE_ARCH_STRCASECMP
int strcasecmp(const char *, const char *);
+#define strcasecmp(s1, s2) __builtin_strcasecmp(s1, s2)
#endif
#ifndef __HAVE_ARCH_STRCHR
char *strchr(const char *, int);
+#define strchr(s1, c) __builtin_strchr(s1, c)
#endif
#ifndef __HAVE_ARCH_STRRCHR
char *strrchr(const char *, int);
+#define strrchr(s1, c) __builtin_strrchr(s1, c)
#endif
#ifndef __HAVE_ARCH_STRSTR
char *strstr(const char *, const char *);
+#define strstr(s1, s2) __builtin_strstr(s1, s2)
#endif
#ifndef __HAVE_ARCH_STRLEN
size_t strlen(const char *);
+#define strlen(s1) __builtin_strlen(s1)
#endif
#ifndef __HAVE_ARCH_STRNLEN
#ifndef __HAVE_ARCH_MEMSET
void *memset(void *, int, size_t);
+#define memset(s, c, n) __builtin_memset(s, c, n)
#endif
#ifndef __HAVE_ARCH_MEMCPY
void *memcpy(void *, const void *, size_t);
+#define memcpy(d, s, n) __builtin_memcpy(d, s, n)
#endif
#ifndef __HAVE_ARCH_MEMMOVE
void *memmove(void *, const void *, size_t);
+#define memmove(d, s, n) __builtin_memmove(d, s, n)
#endif
#ifndef __HAVE_ARCH_MEMSCAN
#ifndef __HAVE_ARCH_MEMCMP
int memcmp(const void *, const void *, size_t);
+#define memcmp(s1, s2, n) __builtin_memcmp(s1, s2, n)
#endif
#ifndef __HAVE_ARCH_MEMCHR
void *memchr(const void *, int, size_t);
+#define memchr(s, c, n) __builtin_memchr(s, c, n)
#endif
#define is_char_array(x) __builtin_types_compatible_p(typeof(x), char[])