util.c: qsort_s
* util.c (ruby_qsort): use qsort_s if available, for Microsoft Visual Studio 2005 (msvcr80.dll) and mingw. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d22cf0de18
commit
be4b1c1e2c
@ -1,3 +1,8 @@
|
|||||||
|
Wed May 11 17:18:53 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* util.c (ruby_qsort): use qsort_s if available, for Microsoft
|
||||||
|
Visual Studio 2005 (msvcr80.dll) and mingw.
|
||||||
|
|
||||||
Wed May 11 10:33:26 2016 Marcus Stollsteimer <sto.mar@web.de>
|
Wed May 11 10:33:26 2016 Marcus Stollsteimer <sto.mar@web.de>
|
||||||
|
|
||||||
* COPYING: Remove trailing-whitespaces.
|
* COPYING: Remove trailing-whitespaces.
|
||||||
|
@ -2346,6 +2346,7 @@ AC_CHECK_FUNCS(posix_memalign)
|
|||||||
AC_CHECK_FUNCS(ppoll)
|
AC_CHECK_FUNCS(ppoll)
|
||||||
AC_CHECK_FUNCS(pread)
|
AC_CHECK_FUNCS(pread)
|
||||||
AC_CHECK_FUNCS(qsort_r)
|
AC_CHECK_FUNCS(qsort_r)
|
||||||
|
AC_CHECK_FUNCS(qsort_s)
|
||||||
AC_CHECK_FUNCS(readlink)
|
AC_CHECK_FUNCS(readlink)
|
||||||
AC_CHECK_FUNCS(round)
|
AC_CHECK_FUNCS(round)
|
||||||
AC_CHECK_FUNCS(sched_getaffinity)
|
AC_CHECK_FUNCS(sched_getaffinity)
|
||||||
|
5
util.c
5
util.c
@ -191,6 +191,11 @@ ruby_strtoul(const char *str, char **endptr, int base)
|
|||||||
# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
|
# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined HAVE_BSD_QSORT_R && defined HAVE_QSORT_S
|
||||||
|
# define qsort_r(base, nel, size, arg, cmp) qsort_s(base, nel, size, cmp, arg)
|
||||||
|
# define cmp_bsd_qsort cmp_ms_qsort
|
||||||
|
# define HAVE_BSD_QSORT_R 1
|
||||||
|
#endif
|
||||||
#if defined HAVE_BSD_QSORT_R
|
#if defined HAVE_BSD_QSORT_R
|
||||||
typedef int (cmpfunc_t)(const void*, const void*, void*);
|
typedef int (cmpfunc_t)(const void*, const void*, void*);
|
||||||
|
|
||||||
|
@ -741,6 +741,9 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub
|
|||||||
#define HAVE_TZNAME 1
|
#define HAVE_TZNAME 1
|
||||||
#define HAVE_DAYLIGHT 1
|
#define HAVE_DAYLIGHT 1
|
||||||
#define HAVE_GMTIME_R 1
|
#define HAVE_GMTIME_R 1
|
||||||
|
!if $(RT_VER) >= 80
|
||||||
|
#define HAVE_QSORT_S
|
||||||
|
!endif
|
||||||
#define HAVE_TYPE_NET_LUID 1
|
#define HAVE_TYPE_NET_LUID 1
|
||||||
#define SETPGRP_VOID 1
|
#define SETPGRP_VOID 1
|
||||||
#define RSHIFT(x,y) ((x)>>(int)y)
|
#define RSHIFT(x,y) ((x)>>(int)y)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user