A few architecture specific string.h functions used to be implemented in terms of preprocessor defines to the corresponding compiler builtins. Since this is no longer the case, remove unused #undefs. Only memcmp is still defined in terms of builtins for a few arches.
Showing the changes to lib/string.c (1 of 1 file). Show all
Unified · Split
| @@ -85,7 +85,6 @@ EXPORT_SYMBOL(strcasecmp); · 84 unmodified lines | |||
| 85 | * @dest: Where to copy the string to | 85 | * @dest: Where to copy the string to |
| 86 | * @src: Where to copy the string from | 86 | * @src: Where to copy the string from |
| 87 | */ | 87 | */ |
| 88 | #undef strcpy | ||
| 89 | char *strcpy(char *dest, const char *src) | 88 | char *strcpy(char *dest, const char *src) |
| 90 | { | 89 | { |
| 91 | char *tmp = dest; | 90 | char *tmp = dest; |
| @@ -302,7 +301,6 @@ EXPORT_SYMBOL(stpcpy); · 210 unmodified lines | |||
| 302 | * @dest: The string to be appended to | 301 | * @dest: The string to be appended to |
| 303 | * @src: The string to append to it | 302 | * @src: The string to append to it |
| 304 | */ | 303 | */ |
| 305 | #undef strcat | ||
| 306 | char *strcat(char *dest, const char *src) | 304 | char *strcat(char *dest, const char *src) |
| 307 | { | 305 | { |
| 308 | char *tmp = dest; | 306 | char *tmp = dest; |
| @@ -378,7 +376,6 @@ EXPORT_SYMBOL(strlcat); · 69 unmodified lines | |||
| 378 | * @cs: One string | 376 | * @cs: One string |
| 379 | * @ct: Another string | 377 | * @ct: Another string |
| 380 | */ | 378 | */ |
| 381 | #undef strcmp | ||
| 382 | int strcmp(const char *cs, const char *ct) | 379 | int strcmp(const char *cs, const char *ct) |
| 383 | { | 380 | { |
| 384 | unsigned char c1, c2; | 381 | unsigned char c1, c2; |
| @@ -958,7 +955,6 @@ EXPORT_SYMBOL(memcmp); · 573 unmodified lines | |||
| 958 | * while this particular implementation is a simple (tail) call to memcmp, do | 955 | * while this particular implementation is a simple (tail) call to memcmp, do |
| 959 | * not rely on anything but whether the return value is zero or non-zero. | 956 | * not rely on anything but whether the return value is zero or non-zero. |
| 960 | */ | 957 | */ |
| 961 | #undef bcmp | ||
| 962 | int bcmp(const void *a, const void *b, size_t len) | 958 | int bcmp(const void *a, const void *b, size_t len) |
| 963 | { | 959 | { |
| 964 | return memcmp(a, b, len); | 960 | return memcmp(a, b, len); |