X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fdirent.in.h;h=15f0245b0929efa68b39f57123ae1e9ba2daf0d9;hb=bd606be378ddd8404641cad023dd43f1f676b26e;hp=40824c56b7bb1702003e14b63be291d8a74821b6;hpb=3806f4f65ae6cb6106c82397a4ebba739336175f;p=gnulib.git diff --git a/lib/dirent.in.h b/lib/dirent.in.h index 40824c56b..15f0245b0 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