merge revision(s) cfc564ac40:

Include headers for `ruby_qsort` only if needed

	If GNU `qsort_r` is available, we use the function and these headers
	are not used.
	---
	 util.c | 4 ++--
	 1 file changed, 2 insertions(+), 2 deletions(-)
This commit is contained in:
Hiroshi SHIBATA 2024-05-21 13:29:34 +09:00
parent 24d7a1c6e7
commit 07c11226a0
2 changed files with 3 additions and 3 deletions

4
util.c
View file

@ -203,15 +203,15 @@ ruby_strtoul(const char *str, char **endptr, int base)
} }
} }
#if !defined HAVE_GNU_QSORT_R
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <stdint.h>
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
#include <unistd.h> #include <unistd.h>
#endif #endif
typedef int (cmpfunc_t)(const void*, const void*, void*); typedef int (cmpfunc_t)(const void*, const void*, void*);
#if !defined HAVE_GNU_QSORT_R
#if defined HAVE_QSORT_S && defined RUBY_MSVCRT_VERSION #if defined HAVE_QSORT_S && defined RUBY_MSVCRT_VERSION
/* In contrast to its name, Visual Studio qsort_s is incompatible with /* In contrast to its name, Visual Studio qsort_s is incompatible with
* C11 in the order of the comparison function's arguments, and same * C11 in the order of the comparison function's arguments, and same

View file

@ -11,7 +11,7 @@
# define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR # define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR
#define RUBY_VERSION_TEENY 5 #define RUBY_VERSION_TEENY 5
#define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR #define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
#define RUBY_PATCHLEVEL 254 #define RUBY_PATCHLEVEL 255
#define RUBY_RELEASE_YEAR 2024 #define RUBY_RELEASE_YEAR 2024
#define RUBY_RELEASE_MONTH 5 #define RUBY_RELEASE_MONTH 5