Whamcloud - gitweb
Use an autoconf test to detect for a BSD- or GNU-style qsort_r function
[tools/e2fsprogs.git] / lib / support / sort_r.h
index 3292a26..ebf7837 100644 (file)
@@ -24,7 +24,11 @@ void sort_r(void *base, size_t nel, size_t width,
 
 #define _SORT_R_INLINE inline
 
-#if (defined __gnu_hurd__ || defined __GNU__ || \
+#if (defined HAVE_GNU_QSORT_R)
+#  define _SORT_R_LINUX
+#elif (defined HAVE_BSD_QSORT_R)
+#  define _SORT_R_BSD
+#elif (defined __gnu_hurd__ || defined __GNU__ || \
        defined __linux__ || defined __MINGW32__ || defined __GLIBC__)
 #  define _SORT_R_LINUX
 #elif (defined __APPLE__ || defined __MACH__ || defined __DARWIN__ || \