Skip to contentSkip to conversation

qsort

PATCH In review Andreas Gruenbacher 1 participant 1 message Apr 26, 2004 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 8/11 qsort

Add qsort

This is qsort from glibc. We need it in nfsacl.

Andreas Gruenbacher <[email protected]>, SUSE Labs

include/linux/kernel.h +2 -0
Index: linux-2.6.6-rc2/include/linux/kernel.h
===================================================================
@@ -80,6 +80,8 @@ extern int sscanf(const char *, const ch
 	__attribute__ ((format (scanf,2,3)));
 extern int vsscanf(const char *, const char *, va_list);
 
+extern void qsort(void *, size_t, size_t, int (*)(const void *,const void *));
+
 extern int get_option(char **str, int *pint);
 extern char *get_options(const char *str, int nints, int *ints);
 extern unsigned long long memparse(char *ptr, char **retptr);
lib/Kconfig +3 -0
Index: linux-2.6.6-rc2/lib/Kconfig
===================================================================
@@ -12,6 +12,9 @@ config CRC32
 	  kernel tree does. Such modules that use library CRC32 functions
 	  require M here.
 
+config QSORT
+	bool "Quick Sort"
+
 #
 # compression support is select'ed if needed
 #
lib/Makefile +1 -0
Index: linux-2.6.6-rc2/lib/Makefile
===================================================================
@@ -19,6 +19,7 @@ ifneq ($(CONFIG_HAVE_DEC_LOCK),y) 
 endif
 
 obj-$(CONFIG_CRC32)	+= crc32.o
+obj-$(CONFIG_QSORT)	+= qsort.o
 
 obj-$(CONFIG_ZLIB_INFLATE) += zlib_inflate/
 obj-$(CONFIG_ZLIB_DEFLATE) += zlib_deflate/
lib/qsort.c +249 -0

249 lines not on this page · raw message