linux-2.3.4pre1: Adjustments for using gcc builtins

Horst von Brand (vonbrand@sleipnir.valparaiso.cl)
Fri, 28 May 1999 19:15:31 -0400


------- =_aaaaaaaaaa0
Content-Type: text/plain; charset="us-ascii"
Content-ID: <2188.927933227.1@sleipnir.valparaiso.cl>

After the recent problems with egcs snapshots, it was suggested that the
kernel don't use handcrafted mem* and str* functions, it better use the gcc
builtins. This gives rise to the first patch below: It just blows away the
redundant definitions in include/asm-i386/string.h and adds the symbols for
the functions to kernel/ksyms.c (gcc doesn't allways inline them for some
reason, falling back on the library functions).

During this work I found many files using mem* and str* functions that
didn't include <linux/string.h>. This means that the hand-polished inline
functions where not being used everywhere, in fact using the gcc builtins
instead or falling back on the definitions in lib/string.c if gcc doesn't
provide them.

The resulting kernel is what I'm running right now (i586/UP, egcs-19990524,
binutils-2.9.1.0.25, -fno-strict-aliasing instead of -fno-strength-reduce),
no ill efects are aparent up to here. My kernel includes the patch David
Miller posted for i386/UP here.

------- =_aaaaaaaaaa0
Content-Type: text/plain; name="builtins.diff"; charset="x-unknown"
Content-ID: <2188.927933227.2@sleipnir.valparaiso.cl>
Content-Description: Patch to use GCC mem*, str* builtins
Content-Transfer-Encoding: quoted-printable

--- linux/CREDITS.dist-2.3.4pre1 Fri May 28 01:04:06 1999
+++ linux/CREDITS Fri May 28 18:42:32 1999
@@ -281,6 +281,17 @@
S: Pittsburgh, Pennsylvania 15213
S: USA
=

+N: Horst von Brand
+E: vonbrand@inf.utfsm.cl
+E: vonbrand@sleipnir.valparaiso.cl
+D: Random kernel hacking, testing of egcs for linux
+D: Owner of linux@inf.utfsm.cl (Spanish language mailing list)
+S: Departamento de Inform=E1tica
+S: Universidad T=E9cnica Federico Santa Mar=EDa
+S: Casilla 110-V
+S: Valpara=EDso
+S: Chile
+
N: Derrick J. Brashear
E: shadow@dementia.org
W: http://www.dementia.org/~shadow
--- linux/include/asm-i386/string.h.dist-2.3.4pre1 Fri May 28 11:17:27 199=
9
+++ linux/include/asm-i386/string.h Fri May 28 16:45:59 1999
@@ -27,20 +27,10 @@
* consider these trivial functions to be PD.
*/
=

-#define __HAVE_ARCH_STRCPY
-extern inline char * strcpy(char * dest,const char *src)
-{
-int d0, d1, d2;
-__asm__ __volatile__(
- "cld\n"
- "1:\tlodsb\n\t"
- "stosb\n\t"
- "testb %%al,%%al\n\t"
- "jne 1b"
- : "=3D&S" (d0), "=3D&D" (d1), "=3D&a" (d2)
- :"0" (src),"1" (dest) : "memory");
-return dest;
-}
+/*
+ * These six are actually gcc builtins, no need for handwritten versions
+ * here: memcmp, memcpy, memset, strcmp, strcpy, strlen
+ */
=

#define __HAVE_ARCH_STRNCPY
extern inline char * strncpy(char * dest,const char *src,size_t count)
@@ -104,28 +94,6 @@
return dest;
}
=

-#define __HAVE_ARCH_STRCMP
-extern inline int strcmp(const char * cs,const char * ct)
-{
-int d0, d1;
-register int __res;
-__asm__ __volatile__(
- "cld\n"
- "1:\tlodsb\n\t"
- "scasb\n\t"
- "jne 2f\n\t"
- "testb %%al,%%al\n\t"
- "jne 1b\n\t"
- "xorl %%eax,%%eax\n\t"
- "jmp 3f\n"
- "2:\tsbbl %%eax,%%eax\n\t"
- "orb $1,%%al\n"
- "3:"
- :"=3Da" (__res), "=3D&S" (d0), "=3D&D" (d1)
- :"1" (cs),"2" (ct));
-return __res;
-}
-
#define __HAVE_ARCH_STRNCMP
extern inline int strncmp(const char * cs,const char * ct,size_t count)
{
@@ -188,116 +156,6 @@
return __res;
}
=

-#define __HAVE_ARCH_STRLEN
-extern inline size_t strlen(const char * s)
-{
-int d0;
-register int __res;
-__asm__ __volatile__(
- "cld\n\t"
- "repne\n\t"
- "scasb\n\t"
- "notl %0\n\t"
- "decl %0"
- :"=3Dc" (__res), "=3D&D" (d0) :"1" (s),"a" (0), "0" (0xffffffff));
-return __res;
-}
-
-extern inline void * __memcpy(void * to, const void * from, size_t n)
-{
-int d0, d1, d2;
-__asm__ __volatile__(
- "cld\n\t"
- "rep ; movsl\n\t"
- "testb $2,%b4\n\t"
- "je 1f\n\t"
- "movsw\n"
- "1:\ttestb $1,%b4\n\t"
- "je 2f\n\t"
- "movsb\n"
- "2:"
- : "=3D&c" (d0), "=3D&D" (d1), "=3D&S" (d2)
- :"0" (n/4), "q" (n),"1" ((long) to),"2" ((long) from)
- : "memory");
-return (to);
-}
-
-/*
- * This looks horribly ugly, but the compiler can optimize it totally,
- * as the count is constant.
- */
-extern inline void * __constant_memcpy(void * to, const void * from, size=
_t n)
-{
- switch (n) {
- case 0:
- return to;
- case 1:
- *(unsigned char *)to =3D *(const unsigned char *)from;
- return to;
- case 2:
- *(unsigned short *)to =3D *(const unsigned short *)from;
- return to;
- case 3:
- *(unsigned short *)to =3D *(const unsigned short *)from;
- *(2+(unsigned char *)to) =3D *(2+(const unsigned char *)from);
- return to;
- case 4:
- *(unsigned long *)to =3D *(const unsigned long *)from;
- return to;
- case 6: /* for Ethernet addresses */
- *(unsigned long *)to =3D *(const unsigned long *)from;
- *(2+(unsigned short *)to) =3D *(2+(const unsigned short *)from);
- return to;
- case 8:
- *(unsigned long *)to =3D *(const unsigned long *)from;
- *(1+(unsigned long *)to) =3D *(1+(const unsigned long *)from);
- return to;
- case 12:
- *(unsigned long *)to =3D *(const unsigned long *)from;
- *(1+(unsigned long *)to) =3D *(1+(const unsigned long *)from);
- *(2+(unsigned long *)to) =3D *(2+(const unsigned long *)from);
- return to;
- case 16:
- *(unsigned long *)to =3D *(const unsigned long *)from;
- *(1+(unsigned long *)to) =3D *(1+(const unsigned long *)from);
- *(2+(unsigned long *)to) =3D *(2+(const unsigned long *)from);
- *(3+(unsigned long *)to) =3D *(3+(const unsigned long *)from);
- return to;
- case 20:
- *(unsigned long *)to =3D *(const unsigned long *)from;
- *(1+(unsigned long *)to) =3D *(1+(const unsigned long *)from);
- *(2+(unsigned long *)to) =3D *(2+(const unsigned long *)from);
- *(3+(unsigned long *)to) =3D *(3+(const unsigned long *)from);
- *(4+(unsigned long *)to) =3D *(4+(const unsigned long *)from);
- return to;
- }
-#define COMMON(x) \
-__asm__ __volatile__( \
- "cld\n\t" \
- "rep ; movsl" \
- x \
- : "=3D&c" (d0), "=3D&D" (d1), "=3D&S" (d2) \
- : "0" (n/4),"1" ((long) to),"2" ((long) from) \
- : "memory");
-{
- int d0, d1, d2;
- switch (n % 4) {
- case 0: COMMON(""); return to;
- case 1: COMMON("\n\tmovsb"); return to;
- case 2: COMMON("\n\tmovsw"); return to;
- default: COMMON("\n\tmovsw\n\tmovsb"); return to;
- }
-}
- =

-#undef COMMON
-}
-
-#define __HAVE_ARCH_MEMCPY
-#define memcpy(t, f, n) \
-(__builtin_constant_p(n) ? \
- __constant_memcpy((t),(f),(n)) : \
- __memcpy((t),(f),(n)))
-
#define __HAVE_ARCH_MEMMOVE
extern inline void * memmove(void * dest,const void * src, size_t n)
{
@@ -324,8 +182,6 @@
return dest;
}
=

-#define memcmp __builtin_memcmp
-
#define __HAVE_ARCH_MEMCHR
extern inline void * memchr(const void * cs,int c,size_t count)
{
@@ -344,46 +200,6 @@
return __res;
}
=

-extern inline void * __memset_generic(void * s, char c,size_t count)
-{
-int d0, d1;
-__asm__ __volatile__(
- "cld\n\t"
- "rep\n\t"
- "stosb"
- : "=3D&c" (d0), "=3D&D" (d1)
- :"a" (c),"1" (s),"0" (count)
- :"memory");
-return s;
-}
-
-/* we might want to write optimized versions of these later */
-#define __constant_count_memset(s,c,count) __memset_generic((s),(c),(coun=
t))
-
-/*
- * memset(x,0,y) is a reasonably common thing to do, so we want to fill
- * things 32 bits at a time even when we don't know the size of the
- * area at compile-time..
- */
-extern inline void * __constant_c_memset(void * s, unsigned long c, size_=
t count)
-{
-int d0, d1;
-__asm__ __volatile__(
- "cld\n\t"
- "rep ; stosl\n\t"
- "testb $2,%b3\n\t"
- "je 1f\n\t"
- "stosw\n"
- "1:\ttestb $1,%b3\n\t"
- "je 2f\n\t"
- "stosb\n"
- "2:"
- : "=3D&c" (d0), "=3D&D" (d1)
- :"a" (c), "q" (count), "0" (count/4), "1" ((long) s)
- :"memory");
-return (s); =

-}
-
/* Added by Gertjan van Wingerde to make minix and sysv module work */
#define __HAVE_ARCH_STRNLEN
extern inline size_t strnlen(const char * s, size_t count)
@@ -405,65 +221,6 @@
return __res;
}
/* end of additional stuff */
-
-/*
- * This looks horribly ugly, but the compiler can optimize it totally,
- * as we by now know that both pattern and count is constant..
- */
-extern inline void * __constant_c_and_count_memset(void * s, unsigned lon=
g pattern, size_t count)
-{
- switch (count) {
- case 0:
- return s;
- case 1:
- *(unsigned char *)s =3D pattern;
- return s;
- case 2:
- *(unsigned short *)s =3D pattern;
- return s;
- case 3:
- *(unsigned short *)s =3D pattern;
- *(2+(unsigned char *)s) =3D pattern;
- return s;
- case 4:
- *(unsigned long *)s =3D pattern;
- return s;
- }
-#define COMMON(x) \
-__asm__ __volatile__("cld\n\t" \
- "rep ; stosl" \
- x \
- : "=3D&c" (d0), "=3D&D" (d1) \
- : "a" (pattern),"0" (count/4),"1" ((long) s) \
- : "memory")
-{
- int d0, d1;
- switch (count % 4) {
- case 0: COMMON(""); return s;
- case 1: COMMON("\n\tstosb"); return s;
- case 2: COMMON("\n\tstosw"); return s;
- default: COMMON("\n\tstosw\n\tstosb"); return s;
- }
-}
- =

-#undef COMMON
-}
-
-#define __constant_c_x_memset(s, c, count) \
-(__builtin_constant_p(count) ? \
- __constant_c_and_count_memset((s),(c),(count)) : \
- __constant_c_memset((s),(c),(count)))
-
-#define __memset(s, c, count) \
-(__builtin_constant_p(count) ? \
- __constant_count_memset((s),(c),(count)) : \
- __memset_generic((s),(c),(count)))
-
-#define __HAVE_ARCH_MEMSET
-#define memset(s, c, count) \
-(__builtin_constant_p(c) ? \
- __constant_c_x_memset((s),(0x01010101UL*(unsigned char)(c)),(count)) : \
- __memset((s),(c),(count)))
=

/*
* find the first occurrence of byte 'c', or 1 past the area if none
--- linux/kernel/ksyms.c.dist-2.3.4pre1 Fri May 28 01:13:11 1999
+++ linux/kernel/ksyms.c Fri May 28 17:54:20 1999
@@ -10,6 +10,7 @@
*/
=

#include <linux/config.h>
+#include <linux/string.h>
#include <linux/malloc.h>
#include <linux/module.h>
#include <linux/blkdev.h>
@@ -404,3 +405,9 @@
=

/* library functions */
EXPORT_SYMBOL(strnicmp);
+EXPORT_SYMBOL(strcmp);
+EXPORT_SYMBOL(strcpy);
+EXPORT_SYMBOL(strlen);
+EXPORT_SYMBOL(memcmp);
+EXPORT_SYMBOL(memcpy);
+EXPORT_SYMBOL(memset);

------- =_aaaaaaaaaa0
Content-Type: text/plain; name="includes.diff"; charset="us-ascii"
Content-ID: <2188.927933227.3@sleipnir.valparaiso.cl>
Content-Description: Add missing linux/string.h

--- linux/fs/isofs/symlink.c.dist-2.3.4pre1 Fri May 28 15:01:10 1999
+++ linux/fs/isofs/symlink.c Fri May 28 15:47:02 1999
@@ -9,6 +9,7 @@
* extensions to iso9660
*/

+#include <linux/string.h>
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/fs.h>
--- linux/fs/hpfs/buffer.c.dist-2.3.4pre1 Fri May 28 15:01:11 1999
+++ linux/fs/hpfs/buffer.c Fri May 28 15:44:34 1999
@@ -6,6 +6,7 @@
* general buffer i/o
*/

+#include <linux/string.h>
#include "hpfs_fn.h"

void hpfs_lock_creation(struct super_block *s)
--- linux/fs/hpfs/ea.c.dist-2.3.4pre1 Fri May 28 15:01:11 1999
+++ linux/fs/hpfs/ea.c Fri May 28 15:44:18 1999
@@ -6,6 +6,7 @@
* handling extended attributes
*/

+#include <linux/string.h>
#include "hpfs_fn.h"

/* Remove external extended attributes. ano specifies wheter a is a
--- linux/fs/hpfs/file.c.dist-2.3.4pre1 Fri May 28 15:01:11 1999
+++ linux/fs/hpfs/file.c Fri May 28 15:43:56 1999
@@ -6,6 +6,7 @@
* file VFS functions
*/

+#include <linux/string.h>
#include "hpfs_fn.h"

int hpfs_open(struct inode *i, struct file *f)
--- linux/fs/hpfs/name.c.dist-2.3.4pre1 Fri May 28 15:01:11 1999
+++ linux/fs/hpfs/name.c Fri May 28 15:43:23 1999
@@ -6,6 +6,7 @@
* operations with filenames
*/

+#include <linux/string.h>
#include "hpfs_fn.h"

char *text_postfix[]={
--- linux/fs/hpfs/namei.c.dist-2.3.4pre1 Fri May 28 15:01:11 1999
+++ linux/fs/hpfs/namei.c Fri May 28 15:43:14 1999
@@ -6,6 +6,7 @@
* adding & removing files & directories
*/

+#include <linux/string.h>
#include "hpfs_fn.h"

int hpfs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
--- linux/fs/hpfs/super.c.dist-2.3.4pre1 Fri May 28 15:01:11 1999
+++ linux/fs/hpfs/super.c Fri May 28 15:42:52 1999
@@ -6,6 +6,7 @@
* mouning, unmounting, error handling
*/

+#include <linux/string.h>
#include "hpfs_fn.h"
#include <linux/module.h>

--- linux/fs/ufs/util.c.dist-2.3.4pre1 Fri May 28 15:01:11 1999
+++ linux/fs/ufs/util.c Fri May 28 15:41:11 1999
@@ -6,6 +6,7 @@
* Charles University, Faculty of Mathematics and Physics
*/

+#include <linux/string.h>
#include <linux/malloc.h>
#include <linux/locks.h>

--- linux/fs/lockd/svcsubs.c.dist-2.3.4pre1 Fri May 28 15:01:11 1999
+++ linux/fs/lockd/svcsubs.c Fri May 28 15:39:18 1999
@@ -7,6 +7,7 @@
*/

#include <linux/types.h>
+#include <linux/string.h>
#include <linux/sched.h>
#include <linux/in.h>
#include <linux/sunrpc/svc.h>
--- linux/fs/lockd/svcshare.c.dist-2.3.4pre1 Fri May 28 15:01:12 1999
+++ linux/fs/lockd/svcshare.c Fri May 28 15:39:08 1999
@@ -8,6 +8,7 @@

#include <linux/sched.h>
#include <linux/unistd.h>
+#include <linux/string.h>
#include <linux/malloc.h>

#include <linux/sunrpc/clnt.h>
--- linux/fs/qnx4/inode.c.dist-2.3.4pre1 Fri May 28 15:01:12 1999
+++ linux/fs/qnx4/inode.c Fri May 28 15:37:40 1999
@@ -15,6 +15,7 @@
#include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h>
+#include <linux/string.h>
#include <linux/errno.h>
#include <linux/malloc.h>
#include <linux/qnx4_fs.h>
--- linux/fs/qnx4/symlinks.c.dist-2.3.4pre1 Fri May 28 15:01:12 1999
+++ linux/fs/qnx4/symlinks.c Fri May 28 15:36:51 1999
@@ -13,6 +13,7 @@

/* THIS FILE HAS TO BE REWRITTEN */

+#include <linux/string.h>
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/fs.h>
--- linux/fs/coda/cnode.c.dist-2.3.4pre1 Fri May 28 15:01:12 1999
+++ linux/fs/coda/cnode.c Fri May 28 15:36:08 1999
@@ -3,6 +3,7 @@
*/

#include <linux/types.h>
+#include <linux/string.h>
#include <linux/time.h>

#include <linux/coda.h>
--- linux/fs/ntfs/util.c.dist-2.3.4pre1 Fri May 28 15:01:14 1999
+++ linux/fs/ntfs/util.c Fri May 28 15:35:30 1999
@@ -12,6 +12,7 @@
#include "struct.h"
#include "util.h"

+#include <linux/string.h>
#include <linux/errno.h>
/* FreeBSD doesn't seem to have EILSEQ in errno.h */
#ifndef EILSEQ
--- linux/fs/devpts/inode.c.dist-2.3.4pre1 Fri May 28 15:01:14 1999
+++ linux/fs/devpts/inode.c Fri May 28 15:35:16 1999
@@ -12,6 +12,7 @@

#include <linux/module.h>

+#include <linux/string.h>
#include <linux/fs.h>
#include <linux/init.h>
#include <linux/kdev_t.h>
--- linux/fs/efs/namei.c.dist-2.3.4pre1 Fri May 28 15:01:14 1999
+++ linux/fs/efs/namei.c Fri May 28 15:34:51 1999
@@ -6,6 +6,7 @@
* Portions derived from work (c) 1995,1996 Christian Vogelgsang.
*/

+#include <linux/string.h>
#include <linux/efs_fs.h>

static efs_ino_t efs_find_entry(struct inode *inode, const char *name, int len) {
--- linux/fs/efs/symlink.c.dist-2.3.4pre1 Fri May 28 15:01:14 1999
+++ linux/fs/efs/symlink.c Fri May 28 15:34:34 1999
@@ -6,6 +6,7 @@
* Portions derived from work (c) 1995,1996 Christian Vogelgsang.
*/

+#include <linux/string.h>
#include <linux/malloc.h>
#include <linux/efs_fs.h>

--- linux/fs/file_table.c.dist-2.3.4pre1 Fri May 28 15:01:10 1999
+++ linux/fs/file_table.c Fri May 28 15:48:34 1999
@@ -5,6 +5,7 @@
* Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
*/

+#include <linux/string.h>
#include <linux/slab.h>
#include <linux/file.h>
#include <linux/init.h>
--- linux/init/main.c.dist-2.3.4pre1 Sun May 16 13:21:17 1999
+++ linux/init/main.c Fri May 28 14:47:35 1999
@@ -14,6 +14,7 @@
#include <linux/config.h>
#include <linux/proc_fs.h>
#include <linux/unistd.h>
+#include <linux/string.h>
#include <linux/ctype.h>
#include <linux/delay.h>
#include <linux/utsname.h>
--- linux/net/802/llc_macinit.c.dist-2.3.4pre1 Fri May 28 15:01:15 1999
+++ linux/net/802/llc_macinit.c Fri May 28 15:34:21 1999
@@ -17,6 +17,8 @@
* Alan Cox : Chainsawed to Linux format
* Added llc_ to names
* Started restructuring handlers
+ *
+ * Horst von Brand : Add #include <linux/string.h>
*/

#include <linux/module.h>
@@ -24,6 +26,7 @@
#include <linux/kernel.h>
#include <linux/malloc.h>
#include <linux/unistd.h>
+#include <linux/string.h>
#include <linux/netdevice.h>
#include <linux/init.h>
#include <net/p8022.h>
--- linux/net/core/neighbour.c.dist-2.3.4pre1 Fri May 28 15:01:15 1999
+++ linux/net/core/neighbour.c Fri May 28 15:33:28 1999
@@ -12,10 +12,12 @@
*
* Fixes:
* Vitaly E. Lavrov releasing NULL neighbor in neigh_add.
+ * Horst von Brand Add #include <linux/string.h>
*/

#include <linux/config.h>
#include <linux/types.h>
+#include <linux/string.h>
#include <linux/kernel.h>
#include <linux/socket.h>
#include <linux/sched.h>
--- linux/net/ipv4/ip_masq_quake.c.dist-2.3.4pre1 Fri May 28 15:01:16 1999
+++ linux/net/ipv4/ip_masq_quake.c Fri May 28 15:32:31 1999
@@ -12,6 +12,7 @@
* http://www.gamers.org/dEngine/quake/spec/
* Harald Hoyer : Check for QUAKE-STRING
* Juan Jose Ciarlante : litl bits for 2.1
+ * Horst von Brand : Add #include <linux/string.h>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -24,6 +25,7 @@
#include <linux/module.h>
#include <asm/system.h>
#include <linux/types.h>
+#include <linux/string.h>
#include <linux/kernel.h>
#include <linux/skbuff.h>
#include <linux/in.h>
--- linux/net/ipv4/ip_masq_vdolive.c.dist-2.3.4pre1 Fri May 28 15:01:17 1999
+++ linux/net/ipv4/ip_masq_vdolive.c Fri May 28 15:30:09 1999
@@ -10,6 +10,9 @@
* Fixes: Minor changes for 2.1 by
* Steven Clarke <Steven.Clarke@ThePlanet.Net>, Planet Online Ltd
*
+ * Add missing #include <linux/string.h>
+ * Horst von Brand <vonbrand@sleipnir.valparaiso.cl>
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
@@ -25,6 +28,7 @@
#include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h>
+#include <linux/string.h>
#include <linux/kernel.h>
#include <asm/system.h>
#include <linux/skbuff.h>
--- linux/net/ipv6/reassembly.c.dist-2.3.4pre1 Fri May 28 15:01:17 1999
+++ linux/net/ipv6/reassembly.c Fri May 28 15:27:31 1999
@@ -19,9 +19,12 @@
* Fixes:
* Andi Kleen Make it work with multiple hosts.
* More RFC compliance.
+ *
+ * Horst von Brand Add missing #include <linux/string.h>
*/
#include <linux/errno.h>
#include <linux/types.h>
+#include <linux/string.h>
#include <linux/socket.h>
#include <linux/sockios.h>
#include <linux/sched.h>
--- linux/net/ipv6/mcast.c.dist-2.3.4pre1 Fri May 28 15:01:17 1999
+++ linux/net/ipv6/mcast.c Fri May 28 15:26:35 1999
@@ -20,6 +20,7 @@
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/types.h>
+#include <linux/string.h>
#include <linux/socket.h>
#include <linux/sockios.h>
#include <linux/sched.h>
--- linux/net/ipv6/ip6_fw.c.dist-2.3.4pre1 Fri May 28 15:01:17 1999
+++ linux/net/ipv6/ip6_fw.c Fri May 28 15:26:20 1999
@@ -16,6 +16,7 @@
#include <linux/config.h>
#include <linux/errno.h>
#include <linux/types.h>
+#include <linux/string.h>
#include <linux/socket.h>
#include <linux/sockios.h>
#include <linux/net.h>
--- linux/net/ipv6/ip6_output.c.dist-2.3.4pre1 Fri May 28 15:01:17 1999
+++ linux/net/ipv6/ip6_output.c Fri May 28 15:25:34 1999
@@ -20,11 +20,13 @@
* route changes now work.
* ip6_forward does not confuse sniffers.
* etc.
- *
+ *
+ * H. von Brand : Added missing #include <linux/string.h>
*/

#include <linux/errno.h>
#include <linux/types.h>
+#include <linux/string.h>
#include <linux/socket.h>
#include <linux/net.h>
#include <linux/netdevice.h>
--- linux/net/sunrpc/auth.c.dist-2.3.4pre1 Fri May 28 15:01:17 1999
+++ linux/net/sunrpc/auth.c Fri May 28 15:22:30 1999
@@ -4,9 +4,12 @@
* Generic RPC authentication API.
*
* Copyright (C) 1996, Olaf Kirch <okir@monad.swb.de>
+ *
+ * Modified May 1999, Horst von Brand <vonbrand@sleipnir.valparaiso.cl>
*/

#include <linux/types.h>
+#include <linux/string.h>
#include <linux/sched.h>
#include <linux/malloc.h>
#include <linux/errno.h>
--- linux/net/sunrpc/auth_unix.c.dist-2.3.4pre1 Fri May 28 15:01:17 1999
+++ linux/net/sunrpc/auth_unix.c Fri May 28 15:21:35 1999
@@ -4,9 +4,12 @@
* UNIX-style authentication; no AUTH_SHORT support
*
* Copyright (C) 1996, Olaf Kirch <okir@monad.swb.de>
+ *
+ * Modified May 1999 Horst von Brand <vonbrand@sleipnir.valparaiso.cl>
*/

#include <linux/types.h>
+#include <linux/string.h>
#include <linux/malloc.h>
#include <linux/socket.h>
#include <linux/in.h>
--- linux/net/irda/irda_device.c.dist-2.3.4pre1 Fri May 28 15:01:18 1999
+++ linux/net/irda/irda_device.c Fri May 28 15:20:16 1999
@@ -8,6 +8,8 @@
* Created at: Wed Sep 2 20:22:08 1998
* Modified at: Wed Apr 21 09:48:19 1999
* Modified by: Dag Brattli <dagb@cs.uit.no>
+ * Modified at: Fri May 28 3:11 CST 1999
+ * Modified by: Horst von Brand <vonbrand@sleipnir.valparaiso.cl>
*
* Copyright (c) 1998 Dag Brattli, All Rights Reserved.
*
@@ -23,6 +25,7 @@
********************************************************************/

#include <linux/config.h>
+#include <linux/string.h>
#include <linux/proc_fs.h>
#include <linux/skbuff.h>
#include <linux/if.h>
--- linux/net/irda/irlap_comp.c.dist-2.3.4pre1 Fri May 28 15:01:18 1999
+++ linux/net/irda/irlap_comp.c Fri May 28 15:19:26 1999
@@ -8,6 +8,8 @@
* Created at: Fri Oct 9 09:18:07 1998
* Modified at: Mon Feb 8 01:23:52 1999
* Modified by: Dag Brattli <dagb@cs.uit.no>
+ * Modified at: Fri May 28 3:11 CST 1999
+ * Modified by: Horst von Brand <vonbrand@sleipnir.valparaiso.cl>
* Sources: ppp.c, isdn_ppp.c
*
* Copyright (c) 1998 Dag Brattli, All Rights Reserved.
@@ -22,6 +24,8 @@
* provided "AS-IS" and at no charge.
*
********************************************************************/
+
+#include <linux/string.h>

#include <net/irda/irda.h>
#include <net/irda/irqueue.h>
--- linux/net/irda/wrapper.c.dist-2.3.4pre1 Fri May 28 15:01:18 1999
+++ linux/net/irda/wrapper.c Fri May 28 15:17:16 1999
@@ -8,6 +8,8 @@
* Created at: Mon Aug 4 20:40:53 1997
* Modified at: Wed Apr 21 12:45:55 1999
* Modified by: Dag Brattli <dagb@cs.uit.no>
+ * Modified at: Fri May 28 3:11 CST 1999
+ * Modified by: Horst von Brand <vonbrand@sleipnir.valparaiso.cl>
*
* Copyright (c) 1998 Dag Brattli <dagb@cs.uit.no>,
* All Rights Reserved.
@@ -24,6 +26,7 @@
********************************************************************/

#include <linux/skbuff.h>
+#include <linux/string.h>
#include <asm/byteorder.h>

#include <net/irda/irda.h>
--- linux/net/irda/discovery.c.dist-2.3.4pre1 Fri May 28 15:01:18 1999
+++ linux/net/irda/discovery.c Fri May 28 15:18:21 1999
@@ -8,6 +8,8 @@
* Created at: Tue Apr 6 15:33:50 1999
* Modified at: Sun Apr 11 00:41:58 1999
* Modified by: Dag Brattli <dagb@cs.uit.no>
+ * Modified at: Fri May 28 3:11 CST 1999
+ * Modified by: Horst von Brand <vonbrand@sleipnir.valparaiso.cl>
*
* Copyright (c) 1999 Dag Brattli, All Rights Reserved.
*
@@ -28,6 +30,7 @@
*
********************************************************************/

+#include <linux/string.h>
#include <linux/socket.h>
#include <linux/irda.h>

--- linux/drivers/net/ptifddi.c.dist-2.3.4pre1 Fri May 28 15:00:58 1999
+++ linux/drivers/net/ptifddi.c Fri May 28 16:02:17 1999
@@ -8,6 +8,7 @@
static char *version =
"ptifddi.c:v1.0 10/Dec/96 David S. Miller (davem@caipfs.rutgers.edu)\n";

+#include <linux/string.h>
#include <linux/init.h>

#include "ptifddi.h"
--- linux/drivers/sound/audio.c.dist-2.3.4pre1 Fri May 28 15:01:03 1999
+++ linux/drivers/sound/audio.c Fri May 28 16:00:22 1999
@@ -20,10 +20,12 @@
* Thomas Sailer : use more logical O_NONBLOCK semantics
* Daniel Rodriksson: reworked the use of the device specific copy_user
* still generic
+ * Horst von Brand: Add missing #include <linux/string.h>
*/

#include <linux/config.h>
#include <linux/stddef.h>
+#include <linux/string.h>
#include <linux/kmod.h>

#include "sound_config.h"
--- linux/drivers/sound/sound_timer.c.dist-2.3.4pre1 Fri May 28 15:01:04 1999
+++ linux/drivers/sound/sound_timer.c Fri May 28 15:59:12 1999
@@ -12,6 +12,7 @@
* Thomas Sailer : ioctl code reworked (vmalloc/vfree removed)
*/
#include <linux/config.h>
+#include <linux/string.h>


#include "sound_config.h"
--- linux/drivers/sound/bin2hex.c.dist-2.3.4pre1 Fri May 28 15:01:04 1999
+++ linux/drivers/sound/bin2hex.c Fri May 28 15:58:45 1999
@@ -1,4 +1,5 @@
#include <stdio.h>
+#include <string.h>

int main( int argc, const char * argv [] )
{
--- linux/drivers/sound/hex2hex.c.dist-2.3.4pre1 Fri May 28 15:01:04 1999
+++ linux/drivers/sound/hex2hex.c Fri May 28 15:58:28 1999
@@ -5,6 +5,7 @@
*/

#include <stdio.h>
+#include <string.h>
#include <stdlib.h>

#define ABANDON(why) { fprintf(stderr, "%s\n", why); exit(1); }
--- linux/drivers/isdn/avmb1/b1pci.c.dist-2.3.4pre1 Fri May 28 15:01:06 1999
+++ linux/drivers/isdn/avmb1/b1pci.c Fri May 28 15:57:27 1999
@@ -46,6 +46,7 @@
*/

#include <linux/config.h>
+#include <linux/string.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/pci.h>
--- linux/drivers/isdn/hisax/hscx_irq.c.dist-2.3.4pre1 Fri May 28 15:01:07 1999
+++ linux/drivers/isdn/hisax/hscx_irq.c Fri May 28 15:56:03 1999
@@ -42,6 +42,8 @@
*
*/

+#include <linux/string.h>
+

static inline void
waitforCEC(struct IsdnCardState *cs, int hscx)
--- linux/drivers/isdn/hisax/elsa_ser.c.dist-2.3.4pre1 Fri May 28 15:01:08 1999
+++ linux/drivers/isdn/hisax/elsa_ser.c Fri May 28 15:55:10 1999
@@ -1,3 +1,4 @@
+#include <linux/string.h>
#include <linux/serial.h>
#include <linux/serial_reg.h>

--- linux/drivers/isdn/hisax/telespci.c.dist-2.3.4pre1 Fri May 28 15:01:08 1999
+++ linux/drivers/isdn/hisax/telespci.c Fri May 28 15:53:24 1999
@@ -24,6 +24,7 @@
*/
#define __NO_VERSION__
#include <linux/config.h>
+#include <linux/string.h>
#include "hisax.h"
#include "isac.h"
#include "hscx.h"
--- linux/drivers/sbus/dvma.c.dist-2.3.4pre1 Fri May 28 15:01:09 1999
+++ linux/drivers/sbus/dvma.c Fri May 28 15:51:46 1999
@@ -4,6 +4,7 @@
*/

#include <linux/config.h>
+#include <linux/string.h>
#include <linux/kernel.h>
#include <linux/malloc.h>
#include <linux/init.h>
--- linux/drivers/video/fbcmap.c.dist-2.3.4pre1 Fri May 28 15:01:09 1999
+++ linux/drivers/video/fbcmap.c Fri May 28 15:51:20 1999
@@ -8,6 +8,7 @@
* more details.
*/

+#include <linux/string.h>
#include <linux/module.h>
#include <linux/tty.h>
#include <linux/fb.h>
--- linux/drivers/misc/parport_share.c.dist-2.3.4pre1 Fri May 28 15:01:09 1999
+++ linux/drivers/misc/parport_share.c Fri May 28 15:50:45 1999
@@ -15,6 +15,8 @@

#include <linux/config.h>

+#include <linux/string.h>
+
#include <linux/tasks.h>

#include <linux/parport.h>
--- linux/drivers/misc/parport_procfs.c.dist-2.3.4pre1 Fri May 28 15:01:09 1999
+++ linux/drivers/misc/parport_procfs.c Fri May 28 15:50:11 1999
@@ -12,6 +12,7 @@
* Cleaned up include files - Russell King <linux@arm.uk.linux.org>
*/

+#include <linux/string.h>
#include <linux/config.h>
#include <linux/sched.h>
#include <linux/delay.h>
--- linux/drivers/misc/parport_ax.c.dist-2.3.4pre1 Fri May 28 15:01:09 1999
+++ linux/drivers/misc/parport_ax.c Fri May 28 15:49:54 1999
@@ -11,6 +11,7 @@
* Grant Guenther <grant@torque.net>
*/

+#include <linux/string.h>
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/errno.h>
--- linux/drivers/acorn/block/ide-ics.c.dist-2.3.4pre1 Fri May 28 15:01:10 1999
+++ linux/drivers/acorn/block/ide-ics.c Fri May 28 15:49:29 1999
@@ -8,6 +8,7 @@
* 12-09-1997 RMK Added interrupt enable/disable
*/

+#include <linux/string.h>
#include <linux/module.h>
#include <linux/ioport.h>
#include <linux/malloc.h>

------- =_aaaaaaaaaa0
Content-Type: text/plain; charset="x-unknown"
Content-ID: <2188.927933227.4@sleipnir.valparaiso.cl>
Content-Transfer-Encoding: quoted-printable

-- =

Horst von Brand vonbrand@sleipnir.valparaiso.c=
l
Casilla 9G, Vi=F1a del Mar, Chile +56 32 672=
616

------- =_aaaaaaaaaa0--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/