VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git] / include / asm-i386 / string.h
index a14f9f3..fc66609 100644 (file)
@@ -27,6 +27,7 @@
  */
 #if !defined(IN_STRING_C)
 
+#define __HAVE_ARCH_STRCPY
 static inline char * strcpy(char * dest,const char *src)
 {
 int d0, d1, d2;
@@ -40,6 +41,7 @@ __asm__ __volatile__(
 return dest;
 }
 
+#define __HAVE_ARCH_STRNCPY
 static inline char * strncpy(char * dest,const char *src,size_t count)
 {
 int d0, d1, d2, d3;
@@ -58,6 +60,7 @@ __asm__ __volatile__(
 return dest;
 }
 
+#define __HAVE_ARCH_STRCAT
 static inline char * strcat(char * dest,const char * src)
 {
 int d0, d1, d2, d3;
@@ -74,6 +77,7 @@ __asm__ __volatile__(
 return dest;
 }
 
+#define __HAVE_ARCH_STRNCAT
 static inline char * strncat(char * dest,const char * src,size_t count)
 {
 int d0, d1, d2, d3;
@@ -96,6 +100,7 @@ __asm__ __volatile__(
 return dest;
 }
 
+#define __HAVE_ARCH_STRCMP
 static inline int strcmp(const char * cs,const char * ct)
 {
 int d0, d1;
@@ -116,6 +121,7 @@ __asm__ __volatile__(
 return __res;
 }
 
+#define __HAVE_ARCH_STRNCMP
 static inline int strncmp(const char * cs,const char * ct,size_t count)
 {
 register int __res;
@@ -138,6 +144,7 @@ __asm__ __volatile__(
 return __res;
 }
 
+#define __HAVE_ARCH_STRCHR
 static inline char * strchr(const char * s, int c)
 {
 int d0;
@@ -156,6 +163,7 @@ __asm__ __volatile__(
 return __res;
 }
 
+#define __HAVE_ARCH_STRRCHR
 static inline char * strrchr(const char * s, int c)
 {
 int d0, d1;
@@ -277,41 +285,8 @@ static __inline__ void *__memcpy3d(void *to, const void *from, size_t len)
 
 #endif
 
-/*
- * struct_cpy(x,y), copy structure *x into (matching structure) *y.
- *
- * We get link-time errors if the structure sizes do not match.
- * There is no runtime overhead, it's all optimized away at
- * compile time.
- */
-extern void __struct_cpy_bug (void);
-
-#define struct_cpy(x,y)                        \
-({                                             \
-       if (sizeof(*(x)) != sizeof(*(y)))       \
-               __struct_cpy_bug();             \
-       memcpy(x, y, sizeof(*(x)));             \
-})
-
 #define __HAVE_ARCH_MEMMOVE
-static inline void * memmove(void * dest,const void * src, size_t n)
-{
-int d0, d1, d2;
-if (dest<src) {
-       memcpy(dest,src,n);
-} else
-__asm__ __volatile__(
-       "std\n\t"
-       "rep\n\t"
-       "movsb\n\t"
-       "cld"
-       : "=&c" (d0), "=&S" (d1), "=&D" (d2)
-       :"0" (n),
-        "1" (n-1+(const char *)src),
-        "2" (n-1+(char *)dest)
-       :"memory");
-return dest;
-}
+void *memmove(void * dest,const void * src, size_t n);
 
 #define memcmp __builtin_memcmp