X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fsavedir.c;h=c92e62eadccdf3e6e4f5a62b414efdf1c0e8c300;hb=dd469821917cebe0abde6601b2ba7cd887bc498f;hp=112f5c0451abfeb4e3a74fc8d3e93e58ff028b92;hpb=21d2d10d5822fc954d080a5ff31e61a87ada1902;p=gnulib.git diff --git a/lib/savedir.c b/lib/savedir.c index 112f5c045..c92e62ead 100644 --- a/lib/savedir.c +++ b/lib/savedir.c @@ -1,7 +1,7 @@ /* savedir.c -- save the list of files in a directory in a string - Copyright 1990, 1997, 1998, 1999, 2000, 2001 Free Software - Foundation, Inc. + Copyright 1990, 1997, 1998, 1999, 2000, 2001, 2003, 2004 Free + Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -23,12 +23,11 @@ # include #endif +#include "savedir.h" + #include #include -#ifndef errno -extern int errno; -#endif #if HAVE_DIRENT_H # include @@ -52,15 +51,10 @@ extern int errno; # define CLOSEDIR(d) closedir (d) #endif -#ifdef STDC_HEADERS -# include -# include -#endif -#ifndef NULL -# define NULL 0 -#endif +#include +#include +#include -#include "savedir.h" #include "xalloc.h" /* Return a freshly allocated string containing the filenames @@ -92,7 +86,7 @@ savedir (const char *dir) while ((dp = readdir (dirp)) != NULL) { /* Skip "", ".", and "..". "" is returned by at least one buggy - implementation: Solaris 2.4 readdir on NFS filesystems. */ + implementation: Solaris 2.4 readdir on NFS file systems. */ char const *entry = dp->d_name; if (entry[entry[0] != '.' ? 0 : entry[1] != '.' ? 1 : 2] != '\0') {