stdlib.h: define qsort and bsearch

Dimitrie O. Paun dpaun at rogers.com
Thu Jan 9 17:25:32 CST 2003


Both Unix and MinGW have qsort and bsearch defined in stdlib.h.
Moreover, the code that this fixes compiles in Windows as well,
which means that MS has them defined there as well.

ChangeLog
  Define qsort and bsearch in stdlib.h.

Index: include/msvcrt/stdlib.h
===================================================================
RCS file: /var/cvs/wine/include/msvcrt/stdlib.h,v
retrieving revision 1.10
diff -u -r1.10 stdlib.h
--- include/msvcrt/stdlib.h	4 Jan 2003 00:19:17 -0000	1.10
+++ include/msvcrt/stdlib.h	9 Jan 2003 20:29:00 -0000
@@ -189,6 +189,10 @@
 long        MSVCRT(strtol)(const char*,char**,int);
 unsigned long MSVCRT(strtoul)(const char*,char**,int);
 int         MSVCRT(system)(const char*);
+void*       MSVCRT(bsearch)(const void*,const void*,MSVCRT(size_t),MSVCRT(size_t),
+                            int (*)(const void*,const void*));
+void        MSVCRT(qsort)(void*,MSVCRT(size_t),MSVCRT(size_t),
+                          int (*)(const void*,const void*));
 
 #ifndef MSVCRT_WSTDLIB_DEFINED
 #define MSVCRT_WSTDLIB_DEFINED


-- 
Dimi.




More information about the wine-patches mailing list