summaryrefslogtreecommitdiff
path: root/lib/dirent.in.h
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2009-01-18 12:40:22 +0100
committerBruno Haible <bruno@clisp.org>2009-01-18 12:40:22 +0100
commit9d33c622ce10de9c68fdd84cb3b77c5b0a75fe02 (patch)
tree48faed02fc90ddf0e8f6a1af42aaf5f6da94d6ca /lib/dirent.in.h
parent3806f4f65ae6cb6106c82397a4ebba739336175f (diff)
downloadgnulib-9d33c622ce10de9c68fdd84cb3b77c5b0a75fe02.tar.gz
New module 'alphasort'.
Diffstat (limited to 'lib/dirent.in.h')
-rw-r--r--lib/dirent.in.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/dirent.in.h b/lib/dirent.in.h
index 40824c56b7..15f0245b09 100644
--- a/lib/dirent.in.h
+++ b/lib/dirent.in.h
@@ -76,6 +76,19 @@ extern int scandir (const char *dir, struct dirent ***namelist,
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