prepare to upload
[debian/sudo] / getcwd.c
index ca7ae66a09512c230f9271275ac346bae8d81b42..109794ae8174cba1462435c729a7d1bd2defbc3d 100644 (file)
--- a/getcwd.c
+++ b/getcwd.c
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 
-#include "config.h"
+#include <config.h>
 
 #include <sys/param.h>
 #include <sys/stat.h>
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS)
-# include <malloc.h>   
+# include <malloc.h>
 #endif /* HAVE_MALLOC_H && !STDC_HEADERS */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 # endif
 #endif
 
-#include "compat.h"
-
-#ifndef dirfd
-#  define dirfd(dirp)  ((dirp)->dd_fd)
-#endif
+#include <compat.h>
 
 #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 $";
-#endif /* lint */
-
 char *
 getcwd(pt, size)
        char *pt;
@@ -131,7 +122,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';