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~104 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f61723c47b08f6ef4f00553e3803b014ec97a84d;p=sudo o Reorder some headers and use STDC_HEADERS define properly o Update copyright year --- diff --git a/getspwuid.c b/getspwuid.c index 0e4fa059d..b67027baa 100644 --- a/getspwuid.c +++ b/getspwuid.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 1998, 1999 Todd C. Miller + * Copyright (c) 1996, 1998-2001 Todd C. Miller * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,22 +34,31 @@ #include "config.h" +#include +#include +#include #include #ifdef STDC_HEADERS # include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif #endif /* STDC_HEADERS */ #ifdef HAVE_STRING_H +# if defined(HAVE_MEMORY_H) && !defined(STDC_HEADERS) +# include +# endif # include +#else +# ifdef HAVE_STRINGS_H +# include +# endif #endif /* HAVE_STRING_H */ -#ifdef HAVE_STRINGS_H -# include -#endif /* HAVE_STRINGS_H */ #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ -#include -#include -#include #include #ifdef HAVE_GETSPNAM # include diff --git a/goodpath.c b/goodpath.c index f950d9442..10c5ec73e 100644 --- a/goodpath.c +++ b/goodpath.c @@ -1,6 +1,6 @@ /* - * Copyright (c) 1996, 1998, 1999 Todd C. Miller - * All rights reserved. + * Copyright (c) 1996, 1998, 1999, 2001 + * Todd C. Miller . All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -34,27 +34,24 @@ #include "config.h" +#include +#include +#include #include -#ifdef HAVE_UNISTD_H -#include -#endif /* HAVE_UNISTD_H */ #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 */ +#ifdef HAVE_UNISTD_H +# include +#endif /* HAVE_UNISTD_H */ #include -#include -#include -#include #include "sudo.h" -#ifndef STDC_HEADERS -extern int stat __P((const char *, struct stat *)); -#endif /* !STDC_HEADERS */ - #ifndef lint static const char rcsid[] = "$Sudo$"; #endif /* lint */ diff --git a/interfaces.c b/interfaces.c index b58a654d9..7895c3291 100644 --- a/interfaces.c +++ b/interfaces.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 1998, 1999 Todd C. Miller + * Copyright (c) 1996, 1998-2001 Todd C. Miller * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -43,47 +43,48 @@ struct rtentry; #include "config.h" -#include -#ifdef STDC_HEADERS -#include -#endif /* STDC_HEADERS */ -#ifdef HAVE_UNISTD_H -#include -#endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H -#include -#endif /* HAVE_STRING_H */ -#ifdef HAVE_STRINGS_H -#include -#endif /* HAVE_STRINGS_H */ -#include -#include #include #include #include #include #include #if defined(HAVE_SYS_SOCKIO_H) && !defined(SIOCGIFCONF) -#include +# include #endif +#include +#ifdef HAVE_STRING_H +# if defined(HAVE_MEMORY_H) && !defined(STDC_HEADERS) +# include +# endif +# include +#else +# ifdef HAVE_STRINGS_H +# include +# endif +#endif /* HAVE_STRING_H */ +#ifdef HAVE_UNISTD_H +# include +#endif /* HAVE_UNISTD_H */ +#include +#include #ifdef _ISC -#include -#include -#include -#include -#define STRSET(cmd, param, len) {strioctl.ic_cmd=(cmd);\ +# include +# include +# include +# include +# define STRSET(cmd, param, len) {strioctl.ic_cmd=(cmd);\ strioctl.ic_dp=(param);\ strioctl.ic_timout=0;\ strioctl.ic_len=(len);} #endif /* _ISC */ #ifdef _MIPS -#include +# include #endif /* _MIPS */ #include #include #include #ifdef HAVE_GETIFADDRS -#include +# include #endif #include "sudo.h"