patch-2.1.124 linux/include/asm-sparc64/string.h

Next file: linux/include/asm-sparc64/system.h
Previous file: linux/include/asm-sparc64/softirq.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.123/linux/include/asm-sparc64/string.h linux/include/asm-sparc64/string.h
@@ -1,4 +1,4 @@
-/* $Id: string.h,v 1.11 1998/06/12 14:54:35 jj Exp $
+/* $Id: string.h,v 1.12 1998/10/04 08:44:27 davem Exp $
  * string.h: External definitions for optimized assembly string
  *           routines for the Linux Kernel.
  *
@@ -127,6 +127,15 @@
 
 /* Now the str*() stuff... */
 #define __HAVE_ARCH_STRLEN
+
+/* Ugly but it works around a bug in our original sparc64-linux-gcc.  */
+extern __kernel_size_t __strlen(const char *);
+#undef strlen
+#define strlen(__arg0)					\
+({	int __strlen_res = __strlen(__arg0) + 1;	\
+	__strlen_res -= 1;				\
+	__strlen_res;					\
+})
 
 #define __HAVE_ARCH_STRNCMP
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov