CHECK_FUNCTION_EXISTS(vasprintf HAVE_VASPRINTF)
CHECK_FUNCTION_EXISTS(makecontext HAVE_MAKECONTEXT)
CHECK_FUNCTION_EXISTS(mmap HAVE_MMAP)
-CHECK_FUNCTION_EXISTS(mergesort HAVE_MERGESORT)
#Check if __thread is defined
execute_process(
#cmakedefine MMALLOC_WANT_OVERRIDE_LEGACY @MMALLOC_WANT_OVERRIDE_LEGACY@
#cmakedefine HAVE_MC @HAVE_MC@
-/* Set to true if have the mergesort function */
-#cmakedefine HAVE_MERGESORT @HAVE_MERGESORT@
-
/* If have linux_futex.h */
#cmakedefine HAVE_FUTEX_H @HAVE_FUTEX_H@
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "internal_config.h"
#include "xbt/misc.h"
#include "xbt/sysdep.h"
#include "xbt/log.h"
XBT_INLINE void xbt_dynar_sort(xbt_dynar_t dynar,
int_f_cpvoid_cpvoid_t compar_fn)
{
-#ifdef HAVE_MERGESORT
- mergesort(dynar->data, dynar->used, dynar->elmsize, compar_fn);
-#else
qsort(dynar->data, dynar->used, dynar->elmsize, compar_fn);
-#endif
}
/** @brief Sorts a dynar according to their color assuming elements can have only three colors.