15 lines
754 B
Diff
15 lines
754 B
Diff
--- src/x_text.c.orig 2019-08-29 10:11:27.734179939 +0200
|
|
+++ src/x_text.c 2019-08-29 10:12:06.392225034 +0200
|
|
@@ -475,9 +475,10 @@ found in msvcrt (which indeed it isn't i
|
|
on this, just call qsort if we're Microsoft and single-instance. I hope nobody
|
|
will try to compile multi-instance Pd for 32-bit windows, but if they
|
|
do, they might run into my qsort_s problem again. */
|
|
-#if defined(_WIN32) && !defined(PDINSTANCE)
|
|
+#if (!defined(__GLIBC__) || defined(_WIN32)) && !defined(PDINSTANCE)
|
|
#define MICROSOFT_STUPID_SORT
|
|
-static void *stupid_zkeyinfo;
|
|
+#include <threads.h>
|
|
+thread_local static void *stupid_zkeyinfo;
|
|
static int stupid_sortcompare(const void *z1, const void *z2) {
|
|
return (text_sortcompare(z1, z2, stupid_zkeyinfo)); }
|
|
#endif
|