fixes #ifdefs to be sure no redefine can ever happen feature/array

Wed, 07 Aug 2019 21:20:08 +0200

author
Mike Becker <universe@uap-core.de>
date
Wed, 07 Aug 2019 21:20:08 +0200
branch
feature/array
changeset 346
1a9c112f4116
parent 345
6089eb30a51a
child 347
62660a4875c9

fixes #ifdefs to be sure no redefine can ever happen

src/array.c file | annotate | diff | comparison | revisions
--- a/src/array.c	Wed Aug 07 21:14:58 2019 +0200
+++ b/src/array.c	Wed Aug 07 21:20:08 2019 +0200
@@ -35,16 +35,14 @@
 #include <stdlib.h>
 
 #ifndef UCX_ARRAY_DISABLE_QSORT
-#if defined(__GLIBC__)
+#ifdef __GLIBC__
 #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 8)
 #define ucx_array_sort_impl qsort_r
 #endif /* glibc version >= 2.8 */
-#endif /* __GLIBC__ */
-
-#if defined(__APPLE__) || defined(__FreeBSD__)
+#elif /* not  __GLIBC__ */ defined(__APPLE__) || defined(__FreeBSD__)
 #define ucx_array_sort_impl ucx_qsort_r
 #define USE_UCX_QSORT_R
-#endif /* __APLE__ or __FreeBSD__ */
+#endif /* __GLIBC__, __APLE__, __FreeBSD__ */
 #endif /* UCX_ARRAY_DISABLE_QSORT */
 
 #ifndef ucx_array_sort_impl

mercurial