for consistency use memcpy/memset everywhere instead of bcopy/bzero
[rsync/rsync.git] / lib / compat.c
index 3e66cc9..cabdc87 100644 (file)
@@ -54,7 +54,25 @@ pid_t waitpid(pid_t pid, int *statptr, int options)
 #ifndef HAVE_MEMMOVE
 void *memmove(void *dest, const void *src, size_t n)
 {
-       bcopy(src, dest, n);
+       memcpy(dest, src, n);
        return dest;
 }
 #endif
+
+#ifndef HAVE_STRPBRK
+/* Find the first ocurrence in S of any character in ACCEPT.  
+   derived from glibc 
+*/
+char *strpbrk(const char *s, const char *accept)
+{
+       while (*s != '\0')  {
+               const char *a = accept;
+               while (*a != '\0') {
+                       if (*a++ == *s) return (char *)s;
+               }
+               ++s;
+       }
+
+       return NULL;
+}
+#endif