summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRussell King <rmk@flint.arm.linux.org.uk>2002-04-04 11:45:09 +0100
committerRussell King <rmk@flint.arm.linux.org.uk>2002-04-04 11:45:09 +0100
commit94394e5bc92026a2ff31cd03e11e015adfdb3260 (patch)
tree8f24a3e60e98d45ba7416821aadb84508e18d79d /lib
parent3f4d4f4e46865cb01d2e2717c6906e2ae079c042 (diff)
parent5e4b50795ee8c7659a1181cea4c98712e02ea63e (diff)
Merge flint.arm.linux.org.uk:/usr/src/linux-bk-2.5/linux-2.5
into flint.arm.linux.org.uk:/usr/src/linux-bk-2.5/linux-2.5-rmk
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile2
-rw-r--r--lib/rbtree.c3
-rw-r--r--lib/string.c37
3 files changed, 9 insertions, 33 deletions
diff --git a/lib/Makefile b/lib/Makefile
index 9a4607bd59bf..349c9be41f25 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -8,7 +8,7 @@
L_TARGET := lib.a
-export-objs := cmdline.o dec_and_lock.o rwsem-spinlock.o rwsem.o crc32.o
+export-objs := cmdline.o dec_and_lock.o rwsem-spinlock.o rwsem.o crc32.o rbtree.o
obj-y := errno.o ctype.o string.o vsprintf.o brlock.o cmdline.o bust_spinlocks.o rbtree.o
diff --git a/lib/rbtree.c b/lib/rbtree.c
index ee6d9713f29f..bed359bd4a92 100644
--- a/lib/rbtree.c
+++ b/lib/rbtree.c
@@ -20,6 +20,7 @@
*/
#include <linux/rbtree.h>
+#include <linux/module.h>
static void __rb_rotate_left(rb_node_t * node, rb_root_t * root)
{
@@ -125,6 +126,7 @@ void rb_insert_color(rb_node_t * node, rb_root_t * root)
root->rb_node->rb_color = RB_BLACK;
}
+EXPORT_SYMBOL(rb_insert_color);
static void __rb_erase_color(rb_node_t * node, rb_node_t * parent,
rb_root_t * root)
@@ -291,3 +293,4 @@ void rb_erase(rb_node_t * node, rb_root_t * root)
if (color == RB_BLACK)
__rb_erase_color(child, parent, root);
}
+EXPORT_SYMBOL(rb_erase);
diff --git a/lib/string.c b/lib/string.c
index 41a90d37e35a..97aa5eda3631 100644
--- a/lib/string.c
+++ b/lib/string.c
@@ -13,6 +13,10 @@
* * Fri Jun 25 1999, Ingo Oeser <ioe@informatik.tu-chemnitz.de>
* - Added strsep() which will replace strtok() soon (because strsep() is
* reentrant and should be faster). Use only strsep() in new code, please.
+ *
+ * * Sat Feb 09 2002, Jason Thomas <jason@topic.com.au>,
+ * Matthew Hawkins <matt@mh.dropbear.id.au>
+ * - Kissed strtok() goodbye
*/
#include <linux/types.h>
@@ -52,8 +56,6 @@ int strnicmp(const char *s1, const char *s2, size_t len)
}
#endif
-char * ___strtok;
-
#ifndef __HAVE_ARCH_STRCPY
/**
* strcpy - Copy a %NUL terminated string
@@ -290,35 +292,6 @@ char * strpbrk(const char * cs,const char * ct)
}
#endif
-#ifndef __HAVE_ARCH_STRTOK
-/**
- * strtok - Split a string into tokens
- * @s: The string to be searched
- * @ct: The characters to search for
- *
- * WARNING: strtok is deprecated, use strsep instead.
- */
-char * strtok(char * s,const char * ct)
-{
- char *sbegin, *send;
-
- sbegin = s ? s : ___strtok;
- if (!sbegin) {
- return NULL;
- }
- sbegin += strspn(sbegin,ct);
- if (*sbegin == '\0') {
- ___strtok = NULL;
- return( NULL );
- }
- send = strpbrk( sbegin, ct);
- if (send && *send != '\0')
- *send++ = '\0';
- ___strtok = send;
- return (sbegin);
-}
-#endif
-
#ifndef __HAVE_ARCH_STRSEP
/**
* strsep - Split a string into tokens
@@ -452,7 +425,7 @@ void * memmove(void * dest,const void *src,size_t count)
int memcmp(const void * cs,const void * ct,size_t count)
{
const unsigned char *su1, *su2;
- signed char res = 0;
+ int res = 0;
for( su1 = cs, su2 = ct; 0 < count; ++su1, ++su2, count--)
if ((res = *su1 - *su2) != 0)