From: Todd C. Miller Date: Fri, 14 Dec 2001 19:52:47 +0000 (+0000) Subject: o Reorder some headers and use STDC_HEADERS define properly X-Git-Tag: SUDO_1_6_4~105 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ca12a5bef2f5311a22204ca1005c668acd41744f;p=sudo o Reorder some headers and use STDC_HEADERS define properly o Update copyright year --- diff --git a/getcwd.c b/getcwd.c index 30abd44fa..2d9fe5121 100644 --- a/getcwd.c +++ b/getcwd.c @@ -35,35 +35,41 @@ #include #include #ifdef STDC_HEADERS -#include +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif #endif /* STDC_HEADERS */ #ifdef HAVE_STRING_H -#include +# include +#else +# ifdef HAVE_STRINGS_H +# include +# endif #endif /* HAVE_STRING_H */ -#ifdef HAVE_STRINGS_H -#include -#endif /* HAVE_STRINGS_H */ #if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS) -#include +# include #endif /* HAVE_MALLOC_H && !STDC_HEADERS */ #ifdef HAVE_UNISTD_H -#include +# include #endif /* HAVE_UNISTD_H */ -#if HAVE_DIRENT_H -# include -# define NAMLEN(dirent) strlen((dirent)->d_name) +#ifdef HAVE_DIRENT_H +# include +# define NAMLEN(dirent) strlen((dirent)->d_name) #else -# define dirent direct -# define NAMLEN(dirent) (dirent)->d_namlen -# if HAVE_SYS_NDIR_H -# include -# endif -# if HAVE_SYS_DIR_H -# include -# endif -# if HAVE_NDIR_H -# include -# endif +# define dirent direct +# define NAMLEN(dirent) (dirent)->d_namlen +# ifdef HAVE_SYS_NDIR_H +# include +# endif +# ifdef HAVE_SYS_DIR_H +# include +# endif +# ifdef HAVE_NDIR_H +# include +# endif #endif #include "compat.h"