diff lib/dirent.in.h @ 11039:8842f30244d1

New module 'alphasort'.
author Bruno Haible <bruno@clisp.org>
date Sun, 18 Jan 2009 12:40:22 +0100
parents 6c37790abb93
children 80567a8f98f8
line wrap: on
line diff
--- a/lib/dirent.in.h
+++ b/lib/dirent.in.h
@@ -76,6 +76,19 @@
      scandir (d, n, f, c))
 #endif
 
+#if @GNULIB_ALPHASORT@
+/* Compare two 'struct dirent' entries alphabetically.  */
+# if !@HAVE_ALPHASORT@
+extern int alphasort (const struct dirent **, const struct dirent **);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef alphasort
+# define alphasort(a,b) \
+    (GL_LINK_WARNING ("alphasort is unportable - " \
+                      "use gnulib module alphasort for portability"), \
+     alphasort (a, b))
+#endif
+
 #ifdef __cplusplus
 }
 #endif