1 Index: uClibc-0.9.29/include/string.h
2 ===================================================================
3 --- uClibc-0.9.29.orig/include/string.h 2007-12-30 00:44:19.638696968 +0100
4 +++ uClibc-0.9.29/include/string.h 2007-12-30 00:52:36.655020316 +0100
6 * They are replaced as proposed by SuSv3. Don't sync this part
7 * with glibc and keep it in sync with strings.h. */
9 -# define bcopy(src,dest,n) (memmove((dest), (src), (n)), (void) 0)
10 -# define bzero(s,n) (memset((s), '\0', (n)), (void) 0)
11 -# define bcmp(s1,s2,n) memcmp((s1), (s2), (size_t)(n))
12 -# define index(s,c) strchr((s), (c))
13 -# define rindex(s,c) strrchr((s), (c))
14 +/* Copy N bytes of SRC to DEST (like memmove, but args reversed). */
15 +static inline void bcopy (__const void *__src, void *__dest, size_t __n)
17 + memmove(__dest, __src, __n);
20 +/* Set N bytes of S to 0. */
21 +static inline void bzero (void *__s, size_t __n)
23 + memset(__s, 0, __n);
26 +/* Compare N bytes of S1 and S2 (same as memcmp). */
27 +static inline int bcmp (__const void *__s1, __const void *__s2, size_t __n)
29 + return memcmp(__s1, __s2, __n);
32 +/* Find the first occurrence of C in S (same as strchr). */
33 +static inline char *index (__const char *__s, int __c)
35 + return strchr(__s, __c);
38 +/* Find the last occurrence of C in S (same as strrchr). */
39 +static inline char *rindex (__const char *__s, int __c)
41 + return strrchr(__s, __c);
46 Index: uClibc-0.9.29/include/strings.h
47 ===================================================================
48 --- uClibc-0.9.29.orig/include/strings.h 2007-12-30 00:49:00.462700217 +0100
49 +++ uClibc-0.9.29/include/strings.h 2007-12-30 00:52:57.844227820 +0100
51 * They are replaced as proposed by SuSv3. Don't sync this part
52 * with glibc and keep it in sync with string.h. */
54 -# define bcopy(src,dest,n) (memmove((dest), (src), (n)), (void) 0)
55 -# define bzero(s,n) (memset((s), '\0', (n)), (void) 0)
56 -# define bcmp(s1,s2,n) memcmp((s1), (s2), (size_t)(n))
57 -# define index(s,c) strchr((s), (c))
58 -# define rindex(s,c) strrchr((s), (c))
60 +/* Copy N bytes of SRC to DEST (like memmove, but args reversed). */
61 +static inline void bcopy (__const void *__src, void *__dest, size_t __n)
63 + memmove(__dest, __src, __n);
66 +/* Set N bytes of S to 0. */
67 +static inline void bzero (void *__s, size_t __n)
69 + memset(__s, 0, __n);
72 +/* Compare N bytes of S1 and S2 (same as memcmp). */
73 +static inline int bcmp (__const void *__s1, __const void *__s2, size_t __n)
75 + return memcmp(__s1, __s2, __n);
78 +/* Find the first occurrence of C in S (same as strchr). */
79 +static inline char *index (__const char *__s, int __c)
81 + return strchr(__s, __c);
84 +/* Find the last occurrence of C in S (same as strrchr). */
85 +static inline char *rindex (__const char *__s, int __c)
87 + return strrchr(__s, __c);