From: Todd C. Miller Date: Fri, 14 Dec 2001 19:52:54 +0000 (+0000) Subject: o Reorder some headers and use STDC_HEADERS define properly X-Git-Tag: SUDO_1_6_4~102 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=65fad4df3590f2223b77593725fde3313d2b6bd5;p=sudo o Reorder some headers and use STDC_HEADERS define properly o Update copyright year --- diff --git a/auth/afs.c b/auth/afs.c index 6f13e5368..4b1bfd492 100644 --- a/auth/afs.c +++ b/auth/afs.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_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 diff --git a/auth/aix_auth.c b/auth/aix_auth.c index dcd7b9bf8..9c63c3109 100644 --- a/auth/aix_auth.c +++ b/auth/aix_auth.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_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/auth/bsdauth.c b/auth/bsdauth.c index ff454b7d4..b9c2c3391 100644 --- a/auth/bsdauth.c +++ b/auth/bsdauth.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000 Todd C. Miller + * Copyright (c) 2000-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 #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 diff --git a/auth/dce.c b/auth/dce.c index 14adfa346..134ba2a8c 100644 --- a/auth/dce.c +++ b/auth/dce.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. * * This code is derived from software contributed by Jeff Earickson * of Colby College, Waterville, ME @@ -48,21 +48,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_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 diff --git a/auth/fwtk.c b/auth/fwtk.c index 047bf5c8d..00efd3726 100644 --- a/auth/fwtk.c +++ b/auth/fwtk.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_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 diff --git a/auth/kerb4.c b/auth/kerb4.c index 2503ee51a..7535d54a4 100644 --- a/auth/kerb4.c +++ b/auth/kerb4.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_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 diff --git a/auth/kerb5.c b/auth/kerb5.c index db8e0bff1..7ebb4f30b 100644 --- a/auth/kerb5.c +++ b/auth/kerb5.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999 Todd C. Miller + * Copyright (c) 1999, 2001 Todd C. Miller * All rights reserved. * * This code is derived from software contributed by Frank Cusack @@ -37,21 +37,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_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 diff --git a/auth/pam.c b/auth/pam.c index df83367a1..98183e879 100644 --- a/auth/pam.c +++ b/auth/pam.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,30 @@ #include "config.h" +#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 +# 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 */ -#include -#include +#ifdef HAVE_UNISTD_H +# include +#endif /* HAVE_UNISTD_H */ #include #include diff --git a/auth/passwd.c b/auth/passwd.c index ccd3482f3..26e6c4bb0 100644 --- a/auth/passwd.c +++ b/auth/passwd.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2001 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_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/auth/rfc1938.c b/auth/rfc1938.c index 56b11de5f..02c571e85 100644 --- a/auth/rfc1938.c +++ b/auth/rfc1938.c @@ -1,6 +1,6 @@ /* - * Copyright (c) 1994-1996,1998-1999 Todd C. Miller - * All rights reserved. + * Copyright (c) 1994-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,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_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 #if defined(HAVE_SKEY) diff --git a/auth/secureware.c b/auth/secureware.c index 7f2a77fad..dffd1b6be 100644 --- a/auth/secureware.c +++ b/auth/secureware.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 1999 Todd C. Miller + * Copyright (c) 1998, 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_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 #ifdef __hpux # undef MAXINT diff --git a/auth/securid.c b/auth/securid.c index cedd27cce..fef170057 100644 --- a/auth/securid.c +++ b/auth/securid.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999 Todd C. Miller + * Copyright (c) 1999-2001 Todd C. Miller * All rights reserved. * * This code is derived from software contributed by Giles Todd @@ -37,21 +37,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_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 diff --git a/auth/sia.c b/auth/sia.c index 5d9eba38c..15a0eac61 100644 --- a/auth/sia.c +++ b/auth/sia.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999 Todd C. Miller + * Copyright (c) 1999-2001 Todd C. Miller * All rights reserved. * * This code is derived from software contributed by Spider Boardman @@ -36,21 +36,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_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 diff --git a/auth/sudo_auth.c b/auth/sudo_auth.c index 005c7b43f..13a2d8ded 100644 --- a/auth/sudo_auth.c +++ b/auth/sudo_auth.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,22 +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 +# 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 diff --git a/logging.c b/logging.c index c84b61e7d..0b5d43899 100644 --- a/logging.c +++ b/logging.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994-1996,1998-2000 Todd C. Miller + * Copyright (c) 1994-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 "sudo.h" diff --git a/parse.c b/parse.c index 5934e7440..ceaf18fcd 100644 --- a/parse.c +++ b/parse.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 1998-2000 Todd C. Miller + * Copyright (c) 1996, 1998-2001 Todd C. Miller * All rights reserved. * * This code is derived from software contributed by Chris Jepeway @@ -37,19 +37,28 @@ #include "config.h" +#include +#include +#include #include #ifdef STDC_HEADERS # 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 +#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 */ #ifdef HAVE_FNMATCH # include #endif /* HAVE_FNMATCH_H */ @@ -59,25 +68,22 @@ #include #include #include -#include -#include #include #include #include -#include -#if HAVE_DIRENT_H +#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 +# ifdef HAVE_SYS_NDIR_H # include # endif -# if HAVE_SYS_DIR_H +# ifdef HAVE_SYS_DIR_H # include # endif -# if HAVE_NDIR_H +# ifdef HAVE_NDIR_H # include # endif #endif diff --git a/parse.lex b/parse.lex index 627636002..7748884f2 100644 --- a/parse.lex +++ b/parse.lex @@ -39,24 +39,31 @@ #include "config.h" +#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 */ #if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS) -#include +# include #endif /* HAVE_MALLOC_H && !STDC_HEADERS */ #include -#include -#include #include "sudo.h" #include "parse.h" #include diff --git a/parse.yacc b/parse.yacc index 6bc6face4..719a4d7b5 100644 --- a/parse.yacc +++ b/parse.yacc @@ -45,30 +45,37 @@ */ #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 +#else +# ifdef HAVE_STRINGS_H +# include +# endif +#endif /* HAVE_STRING_H */ #ifdef HAVE_UNISTD_H -#include +# include #endif /* HAVE_UNISTD_H */ #include -#include -#include -#ifdef HAVE_STRING_H -#include -#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 */ #if defined(YYBISON) && defined(HAVE_ALLOCA_H) && !defined(__GNUC__) -#include +# include #endif /* YYBISON && HAVE_ALLOCA_H && !__GNUC__ */ #ifdef HAVE_LSEARCH -#include +# include #endif /* HAVE_LSEARCH */ #include "sudo.h" diff --git a/set_perms.c b/set_perms.c index e90662eb4..873a925dd 100644 --- a/set_perms.c +++ b/set_perms.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994-1996,1998-2000 Todd C. Miller + * Copyright (c) 1994-1996,1998-2001 Todd C. Miller * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,25 +34,31 @@ #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 #ifdef HAVE_LOGIN_CAP_H # include #endif diff --git a/snprintf.c b/snprintf.c index e3bde41ae..62d8f183c 100644 --- a/snprintf.c +++ b/snprintf.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999 Todd C. Miller + * Copyright (c) 1999, 2001 Todd C. Miller * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. * @@ -40,18 +40,28 @@ #include "config.h" +#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 */ #if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS) # include #endif /* HAVE_MALLOC_H && !STDC_HEADERS */ diff --git a/sudo.c b/sudo.c index e73013bec..7bb229529 100644 --- a/sudo.c +++ b/sudo.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1993-1996,1998-2000 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 @@ -39,35 +39,44 @@ #include "config.h" +#include +#include +#include +#include +#ifdef HAVE_SETRLIMIT +# include +# include +#endif #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 +# 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 #include #include -#include -#include -#include -#include #include #include -#ifdef HAVE_SETRLIMIT -#include -#include -#endif #if defined(HAVE_GETPRPWNAM) && defined(HAVE_SET_AUTH_PARAMETERS) # ifdef __hpux # undef MAXINT diff --git a/testsudoers.c b/testsudoers.c index c14834d9d..79d382b56 100644 --- a/testsudoers.c +++ b/testsudoers.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 1998-2000 Todd C. Miller + * Copyright (c) 1996, 1998-2001 Todd C. Miller * All rights reserved. * * This code is derived from software contributed by Chris Jepeway @@ -37,19 +37,29 @@ #include "config.h" +#include +#include +#include +#include #include #ifdef STDC_HEADERS # 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 +#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 */ #ifdef HAVE_FNMATCH # include #endif /* HAVE_FNMATCH_H */ @@ -59,13 +69,9 @@ #include #include #include -#include -#include -#include #include #include #include -#include #include #include "sudo.h" diff --git a/tgetpass.c b/tgetpass.c index 0f06678ad..03bff7bfb 100644 --- a/tgetpass.c +++ b/tgetpass.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 1998-2000 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,41 +34,50 @@ #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 #ifdef HAVE_SYS_BSDTYPES_H -#include +# include #endif /* HAVE_SYS_BSDTYPES_H */ #ifdef HAVE_SYS_SELECT_H -#include +# include #endif /* HAVE_SYS_SELECT_H */ #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_UNISTD_H +# include +#endif /* HAVE_UNISTD_H */ +#include #include #include #include #ifdef HAVE_TERMIOS_H -#include -#else -#ifdef HAVE_TERMIO_H -#include +# include #else -#include -#include -#endif /* HAVE_TERMIO_H */ +# ifdef HAVE_TERMIO_H +# include +# else +# include +# include +# endif /* HAVE_TERMIO_H */ #endif /* HAVE_TERMIOS_H */ #include "sudo.h" diff --git a/utime.c b/utime.c index 70888d8a1..ed5c45150 100644 --- a/utime.c +++ b/utime.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,14 +34,13 @@ #include "config.h" +#include +#include #include #ifdef HAVE_UNISTD_H -#include +# include #endif /* HAVE_UNISTD_H */ -#include -#include -#include #include "compat.h" #include "emul/utime.h" diff --git a/visudo.c b/visudo.c index bbf441ac4..e26df1cd2 100644 --- a/visudo.c +++ b/visudo.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 1998-2000 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 @@ -38,45 +38,40 @@ #include "config.h" +#include +#include +#include +#include +#include #include #ifdef STDC_HEADERS -#include +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif #endif /* STDC_HEADERS */ +#ifdef HAVE_STRING_H +# include +#else +# ifdef HAVE_STRINGS_H +# include +# endif +#endif /* HAVE_STRING_H */ #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 */ -#if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS) -#include -#endif /* HAVE_MALLOC_H && !STDC_HEADERS */ #include #include #include #include #include #include -#include -#include -#include -#include -#include #include "sudo.h" #include "version.h" -#ifndef STDC_HEADERS -#ifndef __GNUC__ /* gcc has its own malloc */ -extern char *malloc __P((size_t)); -#endif /* __GNUC__ */ -extern char *getenv __P((const char *)); -extern int stat __P((const char *, struct stat *)); -#endif /* !STDC_HEADERS */ - #ifndef lint static const char rcsid[] = "$Sudo$"; #endif /* lint */