Added
Link Here
|
0 |
- |
1 |
--- util.c.orig 2022-04-12 11:48:55 UTC |
|
|
2 |
+++ util.c |
3 |
@@ -214,6 +214,7 @@ typedef int (cmpfunc_t)(const void*, const void*, void |
4 |
|
5 |
typedef int (cmpfunc_t)(const void*, const void*, void*); |
6 |
|
7 |
+#if !defined HAVE_GNU_QSORT_R |
8 |
#if defined HAVE_QSORT_S && defined RUBY_MSVCRT_VERSION |
9 |
/* In contrast to its name, Visual Studio qsort_s is incompatible with |
10 |
* C11 in the order of the comparison function's arguments, and same |
11 |
@@ -259,7 +260,7 @@ ruby_qsort(void* base, const size_t nel, const size_t |
12 |
qsort_s(base, nel, size, cmp, d); |
13 |
} |
14 |
# define HAVE_GNU_QSORT_R 1 |
15 |
-#elif !defined HAVE_GNU_QSORT_R |
16 |
+#else |
17 |
/* mm.c */ |
18 |
|
19 |
#define mmtype long |
20 |
@@ -525,7 +526,8 @@ ruby_qsort(void* base, const size_t nel, const size_t |
21 |
else goto nxt; /* need not to sort both sides */ |
22 |
} |
23 |
} |
24 |
-#endif /* HAVE_GNU_QSORT_R */ |
25 |
+#endif |
26 |
+#endif /* !HAVE_GNU_QSORT_R */ |
27 |
|
28 |
char * |
29 |
ruby_strdup(const char *str) |