Skip to content

Commit

Permalink
merge revision(s) cfc564a:
Browse files Browse the repository at this point in the history
	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(-)
  • Loading branch information
hsbt committed May 21, 2024
1 parent 8e8a637 commit 15bda28
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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/stat.h>
#include <stdint.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

typedef int (cmpfunc_t)(const void*, const void*, void*);

#if !defined HAVE_GNU_QSORT_R
#if defined HAVE_QSORT_S && defined RUBY_MSVCRT_VERSION
/* In contrast to its name, Visual Studio qsort_s is incompatible with
* C11 in the order of the comparison function's arguments, and same
Expand Down
2 changes: 1 addition & 1 deletion version.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR
#define RUBY_VERSION_TEENY 5
#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_MONTH 5
Expand Down

0 comments on commit 15bda28

Please sign in to comment.