[kernel] refresh generic-2.4 patches
[openwrt.git] / target / linux / generic-2.4 / patches / 225-string_lib_useful_exports.patch
1 Index: linux-2.4.35.4/lib/string.c
2 ===================================================================
3 --- linux-2.4.35.4.orig/lib/string.c
4 +++ linux-2.4.35.4/lib/string.c
5 @@ -50,6 +50,7 @@ int strnicmp(const char *s1, const char 
6         }
7         return (int)c1 - (int)c2;
8  }
9 +EXPORT_SYMBOL(strnicmp);
10  #endif
11  
12  char * ___strtok;
13 @@ -68,6 +69,7 @@ char * strcpy(char * dest,const char *sr
14                 /* nothing */;
15         return tmp;
16  }
17 +EXPORT_SYMBOL(strcpy);
18  #endif
19  
20  #ifndef __HAVE_ARCH_STRNCPY
21 @@ -90,6 +92,7 @@ char * strncpy(char * dest,const char *s
22  
23         return tmp;
24  }
25 +EXPORT_SYMBOL(strncpy);
26  #endif
27  
28  #ifndef __HAVE_ARCH_STRCAT
29 @@ -109,6 +112,7 @@ char * strcat(char * dest, const char * 
30  
31         return tmp;
32  }
33 +EXPORT_SYMBOL(strcat);
34  #endif
35  
36  #ifndef __HAVE_ARCH_STRNCAT
37 @@ -138,6 +142,7 @@ char * strncat(char *dest, const char *s
38  
39         return tmp;
40  }
41 +EXPORT_SYMBOL(strncat);
42  #endif
43  
44  #ifndef __HAVE_ARCH_STRCMP
45 @@ -157,6 +162,7 @@ int strcmp(const char * cs,const char * 
46  
47         return __res;
48  }
49 +EXPORT_SYMBOL(strcmp);
50  #endif
51  
52  #ifndef __HAVE_ARCH_STRNCMP
53 @@ -178,6 +184,7 @@ int strncmp(const char * cs,const char *
54  
55         return __res;
56  }
57 +EXPORT_SYMBOL(strncmp);
58  #endif
59  
60  #ifndef __HAVE_ARCH_STRCHR
61 @@ -193,6 +200,7 @@ char * strchr(const char * s, int c)
62                         return NULL;
63         return (char *) s;
64  }
65 +EXPORT_SYMBOL(strchr);
66  #endif
67  
68  #ifndef __HAVE_ARCH_STRRCHR
69 @@ -210,6 +218,7 @@ char * strrchr(const char * s, int c)
70         } while (--p >= s);
71         return NULL;
72  }
73 +EXPORT_SYMBOL(strrchr);
74  #endif
75  
76  #ifndef __HAVE_ARCH_STRLEN
77 @@ -225,6 +234,7 @@ size_t strlen(const char * s)
78                 /* nothing */;
79         return sc - s;
80  }
81 +EXPORT_SYMBOL(strlen);
82  #endif
83  
84  #ifndef __HAVE_ARCH_STRNLEN
85 @@ -241,6 +251,7 @@ size_t strnlen(const char * s, size_t co
86                 /* nothing */;
87         return sc - s;
88  }
89 +EXPORT_SYMBOL(strnlen);
90  #endif
91  
92  #ifndef __HAVE_ARCH_STRSPN
93 @@ -268,6 +279,7 @@ size_t strspn(const char *s, const char 
94  
95         return count;
96  }
97 +EXPORT_SYMBOL(strspn);
98  #endif
99  
100  #ifndef __HAVE_ARCH_STRPBRK
101 @@ -288,6 +300,7 @@ char * strpbrk(const char * cs,const cha
102         }
103         return NULL;
104  }
105 +EXPORT_SYMBOL(strpbrk);
106  #endif
107  
108  #ifndef __HAVE_ARCH_STRTOK
109 @@ -345,6 +358,7 @@ char * strsep(char **s, const char *ct)
110  
111         return sbegin;
112  }
113 +EXPORT_SYMBOL(strsep);
114  #endif
115  
116  #ifndef __HAVE_ARCH_MEMSET
117 @@ -365,6 +379,7 @@ void * memset(void * s,int c,size_t coun
118  
119         return s;
120  }
121 +EXPORT_SYMBOL(memset);
122  #endif
123  
124  #ifndef __HAVE_ARCH_BCOPY
125 @@ -409,6 +424,7 @@ void * memcpy(void * dest,const void *sr
126  
127         return dest;
128  }
129 +EXPORT_SYMBOL(memcpy);
130  #endif
131  
132  #ifndef __HAVE_ARCH_MEMMOVE
133 @@ -439,6 +455,7 @@ void * memmove(void * dest,const void *s
134  
135         return dest;
136  }
137 +EXPORT_SYMBOL(memmove);
138  #endif
139  
140  #ifndef __HAVE_ARCH_MEMCMP
141 @@ -458,6 +475,7 @@ int memcmp(const void * cs,const void * 
142                         break;
143         return res;
144  }
145 +EXPORT_SYMBOL(memcmp);
146  #endif
147  
148  #ifndef __HAVE_ARCH_MEMSCAN
149 @@ -482,6 +500,7 @@ void * memscan(void * addr, int c, size_
150         }
151         return (void *) p;
152  }
153 +EXPORT_SYMBOL(memscan);
154  #endif
155  
156  #ifndef __HAVE_ARCH_STRSTR
157 @@ -506,6 +525,7 @@ char * strstr(const char * s1,const char
158         }
159         return NULL;
160  }
161 +EXPORT_SYMBOL(strstr);
162  #endif
163  
164  #ifndef __HAVE_ARCH_MEMCHR
165 @@ -528,5 +548,5 @@ void *memchr(const void *s, int c, size_
166         }
167         return NULL;
168  }
169 -
170 +EXPORT_SYMBOL(memchr);
171  #endif