Make qsort() in readconf.c more portable
[exim.git] / src / src / string.c
index c0dfd04b6de31852b986e5e024b9d57f8b28827b..be5a8deda633965ad33300b716352278e3374a83 100644 (file)
@@ -1707,6 +1707,17 @@ return yield;
 #endif  /* COMPILE_UTILITY */
 
 
+#ifndef COMPILE_UTILITY
+/* qsort(3), currently used to sort the environment variables
+for -bP environment output, needs a function to compare two pointers to string
+pointers. Here it is. */
+
+int
+string_compare_by_pointer(const void *a, const void *b)
+{
+return Ustrcmp(CUSS *(const char**) a, CUSS *(const char**) b);
+}
+#endif /* COMPILE_UTILITY */