X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=getcwd.c;h=0478932c467e3237122eb906fc5b5abff871a44c;hb=6850c41061e133f6ab21bc84330f62d6058fd27c;hp=ca7ae66a09512c230f9271275ac346bae8d81b42;hpb=ca3ab12a66fc683cabf546fd405cfbf39ef9fb6f;p=debian%2Fsudo diff --git a/getcwd.c b/getcwd.c index ca7ae66..0478932 100644 --- a/getcwd.c +++ b/getcwd.c @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ -#include "config.h" +#include #include #include @@ -50,7 +50,7 @@ # endif #endif /* HAVE_STRING_H */ #if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS) -# include +# include #endif /* HAVE_MALLOC_H && !STDC_HEADERS */ #ifdef HAVE_UNISTD_H # include @@ -72,18 +72,14 @@ # endif #endif -#include "compat.h" - -#ifndef dirfd -# define dirfd(dirp) ((dirp)->dd_fd) -#endif +#include #define ISDOT(dp) \ (dp->d_name[0] == '.' && (dp->d_name[1] == '\0' || \ (dp->d_name[1] == '.' && dp->d_name[2] == '\0'))) #ifndef lint -static const char rcsid[] = "$Sudo: getcwd.c,v 1.22 2001/12/14 19:52:47 millert Exp $"; +__unused static const char rcsid[] = "$Sudo: getcwd.c,v 1.25.2.1 2007/06/12 00:56:42 millert Exp $"; #endif /* lint */ char * @@ -131,7 +127,7 @@ getcwd(pt, size) */ if ((up = malloc(upsize = 1024 - 4)) == NULL) goto err; - eup = up + MAXPATHLEN; + eup = up + PATH_MAX; bup = up; up[0] = '.'; up[1] = '\0';