From d5c11dbc7ac52c97c04aee539dbf9e69a2a68f68 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Thu, 14 Nov 2013 22:57:09 +0100 Subject: [PATCH] Remove any reference to mergesort. * it was in fact never used (see commit 7f6d42b) * it's not standard * according to http://www.freebsd.org/cgi/man.cgi?query=mergesort&sektion=3, - it may fail - it's generally slower than qsort - it has requirements on its parameter "size" - it requires additional memory --- buildtools/Cmake/CompleteInFiles.cmake | 1 - buildtools/Cmake/src/internal_config.h.in | 3 --- src/xbt/dynar.c | 5 ----- tools/spell/sg_stopwords.txt | 2 -- 4 files changed, 11 deletions(-) diff --git a/buildtools/Cmake/CompleteInFiles.cmake b/buildtools/Cmake/CompleteInFiles.cmake index 54b63aecaf..78c06fa2fe 100644 --- a/buildtools/Cmake/CompleteInFiles.cmake +++ b/buildtools/Cmake/CompleteInFiles.cmake @@ -148,7 +148,6 @@ CHECK_FUNCTION_EXISTS(asprintf HAVE_ASPRINTF) 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( diff --git a/buildtools/Cmake/src/internal_config.h.in b/buildtools/Cmake/src/internal_config.h.in index 3e988d10ec..8400694f1b 100644 --- a/buildtools/Cmake/src/internal_config.h.in +++ b/buildtools/Cmake/src/internal_config.h.in @@ -58,9 +58,6 @@ #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@ diff --git a/src/xbt/dynar.c b/src/xbt/dynar.c index 26a81719a7..247a834d77 100644 --- a/src/xbt/dynar.c +++ b/src/xbt/dynar.c @@ -6,7 +6,6 @@ /* 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" @@ -639,11 +638,7 @@ XBT_INLINE void xbt_dynar_cursor_rm(xbt_dynar_t dynar, 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. diff --git a/tools/spell/sg_stopwords.txt b/tools/spell/sg_stopwords.txt index bbb97a5dc6..2c7cf96d9e 100644 --- a/tools/spell/sg_stopwords.txt +++ b/tools/spell/sg_stopwords.txt @@ -2558,8 +2558,6 @@ memset Memset memuse ment -mergesort -MERGESORT merr messageSize messageSizes -- 2.20.1