[PATCH] qsort_r (pending newlib patch)

Yaakov Selkowitz yselkowitz@cygwin.com
Fri Dec 5 03:08:00 GMT 2014


Attached.

--
Yaakov
-------------- next part --------------
2014-12-04  Yaakov Selkowitz  <yselkowitz@...>

	doc/
	* new-features.xml (ov-new1.7.34): Document qsort_r and __bsd_qsort_r.
	* posix.xml (std-bsd): Add qsort_r.
	(std-gnu): Ditto.
	(std-notes): Add section for qsort_r.

	cygwin/
	* common.din (__bsd_qsort_r): Add.
	(qsort_r): Add.
	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.

Index: doc/new-features.xml
===================================================================
RCS file: /cvs/src/src/winsup/doc/new-features.xml,v
retrieving revision 1.36
diff -u -p -r1.36 new-features.xml
--- doc/new-features.xml	13 Nov 2014 13:10:26 -0000	1.36
+++ doc/new-features.xml	5 Dec 2014 01:22:25 -0000
@@ -36,6 +36,10 @@ are supposed to work.  Finally implement
 getfacl(1)/setfacl(1) accordingly.
 </para></listitem>
 
+<listitem><para>
+New APIs: qsort_r, __bsd_qsort_r.
+</para></listitem>
+
 </itemizedlist>
 
 </sect2>
Index: doc/posix.xml
===================================================================
RCS file: /cvs/src/src/winsup/doc/posix.xml,v
retrieving revision 1.3
diff -u -p -r1.3 posix.xml
--- doc/posix.xml	22 Oct 2014 19:29:33 -0000	1.3
+++ doc/posix.xml	5 Dec 2014 01:22:26 -0000
@@ -1047,6 +1047,7 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008)
     madvise
     mkstemps
     openpty
+    qsort_r			(see chapter "Implementation Notes")
     rcmd
     rcmd_af
     reallocf
@@ -1175,6 +1176,7 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008)
     pthread_getattr_np
     pthread_sigqueue
     ptsname_r
+    qsort_r			(see chapter "Implementation Notes")
     quotactl
     rawmemchr
     removexattr
@@ -1568,6 +1570,9 @@ available when cygserver is running.</pa
 what works on Windows:  Windows only supports user block quotas on NTFS, no
 group quotas, no inode quotas, no time constraints.</para>
 
+<para><function>qsort_r</function> is available in both BSD and GNU flavors,
+depending on whether _BSD_SOURCE or _GNU_SOURCE is defined when compiling.</para>
+
 </sect1>
 
 </chapter>
Index: cygwin/common.din
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/common.din,v
retrieving revision 1.13
diff -u -p -r1.13 common.din
--- cygwin/common.din	29 Oct 2014 09:56:18 -0000	1.13
+++ cygwin/common.din	5 Dec 2014 01:22:26 -0000
@@ -41,6 +41,7 @@ __assert_func NOSIGFE
 __assertfail NOSIGFE
 __b64_ntop NOSIGFE
 __b64_pton NOSIGFE
+__bsd_qsort_r NOSIGFE
 __cxa_atexit = cygwin__cxa_atexit SIGFE
 __cxa_finalize SIGFE
 __dn_comp SIGFE
@@ -920,6 +921,7 @@ putwc SIGFE
 putwchar SIGFE
 pwrite SIGFE
 qsort NOSIGFE
+qsort_r NOSIGFE
 quotactl SIGFE
 raise SIGFE
 rand NOSIGFE
Index: cygwin/include/cygwin/version.h
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/include/cygwin/version.h,v
retrieving revision 1.413
diff -u -p -r1.413 version.h
--- cygwin/include/cygwin/version.h	13 Nov 2014 13:10:25 -0000	1.413
+++ cygwin/include/cygwin/version.h	5 Dec 2014 01:22:27 -0000
@@ -457,12 +457,13 @@ details. */
       279: Export stime.
       280: Static atexit in libcygwin.a, CW_FIXED_ATEXIT.
       281: Add CW_GETNSS_PWD_SRC, CW_GETNSS_GRP_SRC.
+      282: Export __bsd_qsort_r, qsort_r.
      */
 
      /* Note that we forgot to bump the api for ualarm, strtoll, strtoull */
 
 #define CYGWIN_VERSION_API_MAJOR 0
-#define CYGWIN_VERSION_API_MINOR 281
+#define CYGWIN_VERSION_API_MINOR 282
 
      /* There is also a compatibity version number associated with the
 	shared memory regions.  It is incremented when incompatible


More information about the Cygwin-patches mailing list