diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2017-06-18 21:18:32 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2017-06-18 21:23:52 +0300 |
commit | 4347b6b05d0f469d7b9bf5739624acf65a811ce0 (patch) | |
tree | 6039dc4031e66d48c5945d5c0aba465d0b186073 | |
parent | 3ce80abf0e00076456dcab35899f96002ee2fb17 (diff) | |
download | illumos-packaging-4347b6b05d0f469d7b9bf5739624acf65a811ce0.tar.gz |
libc: fix qsort_r() declaration for c++
-rw-r--r-- | libc/debian/changelog | 6 | ||||
-rw-r--r-- | libc/debian/patches/libc-add-qsort_r.patch | 50 |
2 files changed, 36 insertions, 20 deletions
diff --git a/libc/debian/changelog b/libc/debian/changelog index 3a564ea..55eba99 100644 --- a/libc/debian/changelog +++ b/libc/debian/changelog @@ -1,3 +1,9 @@ +libc (5.10.18.git.2a44663-3) UNRELEASED; urgency=medium + + * fix qsort_r() declaration for c++ (updated libc-add-qsort_r.patch) + + -- Igor Pashev <pashev.igor@gmail.com> Sun, 18 Jun 2017 21:23:18 +0300 + libc (5.10.18.git.2a44663-2) unstable; urgency=medium * Added illumos-6993.patch diff --git a/libc/debian/patches/libc-add-qsort_r.patch b/libc/debian/patches/libc-add-qsort_r.patch index a320c2d..9d40a9e 100644 --- a/libc/debian/patches/libc-add-qsort_r.patch +++ b/libc/debian/patches/libc-add-qsort_r.patch @@ -1,7 +1,7 @@ -Index: b/usr/src/common/util/qsort.c +Index: libc/usr/src/common/util/qsort.c =================================================================== ---- a/usr/src/common/util/qsort.c -+++ b/usr/src/common/util/qsort.c +--- libc.orig/usr/src/common/util/qsort.c ++++ libc/usr/src/common/util/qsort.c @@ -50,9 +50,15 @@ static void swapb(char *r1, char *r2, si * note: cstyle specifically prohibits nested conditional operators * but this is the only way to do the median of 3 function in-line @@ -79,10 +79,10 @@ Index: b/usr/src/common/util/qsort.c if (cv < 0) { break; } -Index: b/usr/src/lib/libc/port/mapfile-vers +Index: libc/usr/src/lib/libc/port/mapfile-vers =================================================================== ---- a/usr/src/lib/libc/port/mapfile-vers -+++ b/usr/src/lib/libc/port/mapfile-vers +--- libc.orig/usr/src/lib/libc/port/mapfile-vers ++++ libc/usr/src/lib/libc/port/mapfile-vers @@ -289,6 +289,7 @@ SYMBOL_VERSION DYSON_1 { memrchr; program_invocation_name; @@ -91,10 +91,10 @@ Index: b/usr/src/lib/libc/port/mapfile-vers rawmemchr; sendfile; sendfilev; -Index: b/usr/src/lib/libc/i386/Makefile.com +Index: libc/usr/src/lib/libc/i386/Makefile.com =================================================================== ---- a/usr/src/lib/libc/i386/Makefile.com -+++ b/usr/src/lib/libc/i386/Makefile.com +--- libc.orig/usr/src/lib/libc/i386/Makefile.com ++++ libc/usr/src/lib/libc/i386/Makefile.com @@ -101,6 +101,7 @@ COMOBJS= \ bsearch.o \ bzero.o \ @@ -103,17 +103,17 @@ Index: b/usr/src/lib/libc/i386/Makefile.com strtol.o \ strtoul.o \ strtoll.o \ -Index: b/usr/src/common/util/qsort_r.c +Index: libc/usr/src/common/util/qsort_r.c =================================================================== --- /dev/null -+++ b/usr/src/common/util/qsort_r.c ++++ libc/usr/src/common/util/qsort_r.c @@ -0,0 +1,2 @@ +#define QSORT_R +#include "qsort.c" -Index: b/usr/src/lib/libc/amd64/Makefile +Index: libc/usr/src/lib/libc/amd64/Makefile =================================================================== ---- a/usr/src/lib/libc/amd64/Makefile -+++ b/usr/src/lib/libc/amd64/Makefile +--- libc.orig/usr/src/lib/libc/amd64/Makefile ++++ libc/usr/src/lib/libc/amd64/Makefile @@ -100,6 +100,7 @@ COMOBJS= \ bsearch.o \ bzero.o \ @@ -122,10 +122,10 @@ Index: b/usr/src/lib/libc/amd64/Makefile strtol.o \ strtoul.o \ strtoll.o \ -Index: b/usr/src/head/stdlib.h +Index: libc/usr/src/head/stdlib.h =================================================================== ---- a/usr/src/head/stdlib.h -+++ b/usr/src/head/stdlib.h +--- libc.orig/usr/src/head/stdlib.h ++++ libc/usr/src/head/stdlib.h @@ -34,6 +34,8 @@ #ifndef _STDLIB_H #define _STDLIB_H @@ -135,15 +135,25 @@ Index: b/usr/src/head/stdlib.h #include <iso/stdlib_iso.h> #include <iso/stdlib_c99.h> -@@ -43,6 +45,7 @@ +@@ -43,7 +45,17 @@ #if defined(_GNU_SOURCE) || defined(__EXTENSIONS__) # include <alloca.h> -+void qsort_r(void *, size_t, size_t, int (*)(const void *, const void *, void *), void *); ++ ++#if __cplusplus >= 199711L ++namespace std { #endif ++void qsort_r(void *, size_t, size_t, int (*)(const void *, const void *, void *), void *); ++ ++#if __cplusplus >= 199711L ++} ++#endif /* end of namespace std */ ++ ++#endif /* _GNU_SOURCE */ -@@ -73,6 +76,9 @@ using std::mblen; + /* +@@ -73,6 +85,9 @@ using std::mblen; using std::mbstowcs; using std::mbtowc; using std::qsort; |