From 46dd419cd996c8c6cfb29162fa6db6d43a01dfd1 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Fri, 14 Dec 2001 19:52:47 +0000 Subject: [PATCH] o Reorder some headers and use STDC_HEADERS define properly o Update copyright year --- alloc.c | 24 +++++++++++++++--------- check.c | 32 +++++++++++++++++++------------- defaults.c | 30 ++++++++++++++++++------------ env.c | 28 +++++++++++++++++----------- fileops.c | 16 ++++++++-------- find_path.c | 38 ++++++++++++++++++-------------------- fnmatch.c | 11 ++++++----- 7 files changed, 101 insertions(+), 78 deletions(-) diff --git a/alloc.c b/alloc.c index 930deb974..8cc5c54af 100644 --- a/alloc.c +++ b/alloc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999 Todd C. Miller + * Copyright (c) 1999-2001 Todd C. Miller * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,21 +34,27 @@ #include "config.h" +#include +#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 */ -#include -#include #include "sudo.h" diff --git a/check.c b/check.c index eb71f8cc4..5bb315086 100644 --- a/check.c +++ b/check.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1993-1996,1998-1999 Todd C. Miller + * Copyright (c) 1993-1996,1998-2001 Todd C. Miller * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,27 +34,33 @@ #include "config.h" +#include +#include +#include +#include #include #ifdef STDC_HEADERS -#include +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif #endif /* STDC_HEADERS */ -#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 -#include -#include -#include #include #include diff --git a/defaults.c b/defaults.c index fdbc9d394..540cc07d3 100644 --- a/defaults.c +++ b/defaults.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999-2000 Todd C. Miller + * Copyright (c) 1999-2001 Todd C. Miller * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,22 +34,28 @@ #include "config.h" -#include +#include +#include #include #ifdef STDC_HEADERS -#include +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif #endif /* STDC_HEADERS */ -#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 */ -#include -#include +# ifdef HAVE_UNISTD_H +#include +#endif /* HAVE_UNISTD_H */ +#include #include "sudo.h" diff --git a/env.c b/env.c index d04e01741..6bb06405b 100644 --- a/env.c +++ b/env.c @@ -34,24 +34,30 @@ #include "config.h" +#include +#include +#include #include #ifdef STDC_HEADERS -#include +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif #endif /* STDC_HEADERS */ -#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 #include "sudo.h" diff --git a/fileops.c b/fileops.c index 78b05c679..c6391b90c 100644 --- a/fileops.c +++ b/fileops.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999 Todd C. Miller + * Copyright (c) 1999, 2001 Todd C. Miller * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,23 +34,23 @@ #include "config.h" +#include +#include +#ifdef HAVE_FLOCK +# include +#endif /* HAVE_FLOCK */ #include #ifdef HAVE_UNISTD_H -#include +# include #endif /* HAVE_UNISTD_H */ #include #include -#include -#include -#ifdef HAVE_FLOCK -#include -#endif /* HAVE_FLOCK */ #ifdef HAVE_UTIME # ifdef HAVE_UTIME_H # include # endif /* HAVE_UTIME_H */ #else -# include "emul/utime.h" +# include "emul/utime.h" #endif /* HAVE_UTIME */ #include "sudo.h" diff --git a/find_path.c b/find_path.c index 9a1a6e9a6..8414e5704 100644 --- a/find_path.c +++ b/find_path.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,34 +34,32 @@ #include "config.h" +#include +#include +#include #include #ifdef STDC_HEADERS -#include +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif #endif /* STDC_HEADERS */ -#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 char *strcpy __P((char *, const char *)); -extern int fprintf __P((FILE *, const char *, ...)); -extern ssize_t readlink __P((const char *, VOID *, size_t)); -extern int stat __P((const char *, struct stat *)); -extern int lstat __P((const char *, struct stat *)); -#endif /* !STDC_HEADERS */ - #ifndef lint static const char rcsid[] = "$Sudo$"; #endif /* lint */ diff --git a/fnmatch.c b/fnmatch.c index ffbdda949..2ccea5974 100644 --- a/fnmatch.c +++ b/fnmatch.c @@ -45,14 +45,15 @@ static char rcsid[] = "$OpenBSD: fnmatch.c,v 1.6 1998/03/19 00:29:59 millert Exp #include "config.h" -#include #include +#include #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 */ #include "compat.h" #include "emul/fnmatch.h" -- 2.40.0