changeset 17762:8728cf80b7d8

qsort_r: include <config.h> Problem reported by Tom G. Christensen in: http://lists.gnu.org/archive/html/bug-gnulib/2014-09/msg00071.html * lib/qsort.c [!_LIBC]: Include <config.h> first.
author Paul Eggert <eggert@cs.ucla.edu>
date Tue, 16 Sep 2014 12:26:48 -0700
parents af887cfa71dd
children c6e0ae5c3fec
files ChangeLog lib/qsort.c
diffstat 2 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2014-09-16  Paul Eggert  <eggert@cs.ucla.edu>
+
+	qsort_r: include <config.h>
+	Problem reported by Tom G. Christensen in:
+	http://lists.gnu.org/archive/html/bug-gnulib/2014-09/msg00071.html
+	* lib/qsort.c [!_LIBC]: Include <config.h> first.
+
 2014-09-16  Dylan Cali  <calid1984@gmail.com>
 
 	avltree-list: avoid compiler warnings (trivial)
--- a/lib/qsort.c
+++ b/lib/qsort.c
@@ -20,6 +20,10 @@
    Engineering a sort function; Jon Bentley and M. Douglas McIlroy;
    Software - Practice and Experience; Vol. 23 (11), 1249-1265, 1993.  */
 
+#ifndef _LIBC
+# include <config.h>
+#endif
+
 #include <limits.h>
 #include <stdlib.h>
 #include <string.h>