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 01:12:52.097715154 +0100
6 /* Find the last occurrence of C in S (same as strrchr). */
7 extern char *rindex (__const char *__s, int __c)
8 __THROW __attribute_pure__ __nonnull ((1));
10 -# ifdef __UCLIBC_SUSV3_LEGACY_MACROS__
11 +# elif defined(__UCLIBC_SUSV3_LEGACY_MACROS__) && !defined(_STRINGS_H)
12 /* bcopy/bzero/bcmp/index/rindex are marked LEGACY in SuSv3.
13 * They are replaced as proposed by SuSv3. Don't sync this part
14 * with glibc and keep it in sync with strings.h. */
16 -# define bcopy(src,dest,n) (memmove((dest), (src), (n)), (void) 0)
17 -# define bzero(s,n) (memset((s), '\0', (n)), (void) 0)
18 -# define bcmp(s1,s2,n) memcmp((s1), (s2), (size_t)(n))
19 -# define index(s,c) strchr((s), (c))
20 -# define rindex(s,c) strrchr((s), (c))
22 +/* Copy N bytes of SRC to DEST (like memmove, but args reversed). */
23 +static __inline__ void bcopy (__const void *__src, void *__dest, size_t __n)
25 + memmove(__dest, __src, __n);
28 +/* Set N bytes of S to 0. */
29 +static __inline__ void bzero (void *__s, size_t __n)
31 + memset(__s, 0, __n);
34 +/* Compare N bytes of S1 and S2 (same as memcmp). */
35 +static __inline__ int bcmp (__const void *__s1, __const void *__s2, size_t __n)
37 + return memcmp(__s1, __s2, __n);
40 +/* Find the first occurrence of C in S (same as strchr). */
41 +static __inline__ char *index (__const char *__s, int __c)
43 + return strchr(__s, __c);
46 +/* Find the last occurrence of C in S (same as strrchr). */
47 +static __inline__ char *rindex (__const char *__s, int __c)
49 + return strrchr(__s, __c);
53 /* Return the position of the first bit set in I, or 0 if none are set.
54 Index: uClibc-0.9.29/include/strings.h
55 ===================================================================
56 --- uClibc-0.9.29.orig/include/strings.h 2007-12-30 00:49:00.462700217 +0100
57 +++ uClibc-0.9.29/include/strings.h 2007-12-30 00:52:57.844227820 +0100
59 * They are replaced as proposed by SuSv3. Don't sync this part
60 * with glibc and keep it in sync with string.h. */
62 -# define bcopy(src,dest,n) (memmove((dest), (src), (n)), (void) 0)
63 -# define bzero(s,n) (memset((s), '\0', (n)), (void) 0)
64 -# define bcmp(s1,s2,n) memcmp((s1), (s2), (size_t)(n))
65 -# define index(s,c) strchr((s), (c))
66 -# define rindex(s,c) strrchr((s), (c))
68 +/* Copy N bytes of SRC to DEST (like memmove, but args reversed). */
69 +static __inline__ void bcopy (__const void *__src, void *__dest, size_t __n)
71 + memmove(__dest, __src, __n);
74 +/* Set N bytes of S to 0. */
75 +static __inline__ void bzero (void *__s, size_t __n)
77 + memset(__s, 0, __n);
80 +/* Compare N bytes of S1 and S2 (same as memcmp). */
81 +static __inline__ int bcmp (__const void *__s1, __const void *__s2, size_t __n)
83 + return memcmp(__s1, __s2, __n);
86 +/* Find the first occurrence of C in S (same as strchr). */
87 +static __inline__ char *index (__const char *__s, int __c)
89 + return strchr(__s, __c);
92 +/* Find the last occurrence of C in S (same as strrchr). */
93 +static __inline__ char *rindex (__const char *__s, int __c)
95 + return strrchr(__s, __c);