Remove use of AC_HEADER_TIME, only obsolete platforms actually

need this.  Also stop removing sys/time.h unless the source file
uses struct timeval.
This commit is contained in:
Todd C. Miller
2018-01-17 09:52:15 -07:00
parent b161ebe62d
commit a885b952fb
23 changed files with 80 additions and 167 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 1998-2005, 2007-2015
* Copyright (c) 1996, 1998-2005, 2007-2015, 2018
* Todd C. Miller <Todd.Miller@sudo.ws>
*
* Permission to use, copy, modify, and distribute this software for any
@@ -32,7 +32,6 @@ struct rtentry;
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <sys/ioctl.h>
#if defined(HAVE_SYS_SOCKIO_H) && !defined(SIOCGIFCONF)
# include <sys/sockio.h>

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2010-2016 Todd C. Miller <Todd.Miller@sudo.ws>
* Copyright (c) 2008, 2010-2018 Todd C. Miller <Todd.Miller@sudo.ws>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -20,7 +20,6 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
@@ -28,15 +27,13 @@
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <time.h>
#include <unistd.h>
#ifdef HAVE_STDBOOL_H
# include <stdbool.h>
#else
# include "compat/stdbool.h"
#endif /* HAVE_STDBOOL_H */
#ifdef TIME_WITH_SYS_TIME
# include <time.h>
#endif
#include "sudo_gettext.h" /* must be included before sudo_compat.h */

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009-2017 Todd C. Miller <Todd.Miller@sudo.ws>
* Copyright (c) 2009-2018 Todd C. Miller <Todd.Miller@sudo.ws>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -24,7 +24,6 @@
#include <sys/stat.h>
#include <sys/wait.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <stdio.h>
#include <stdlib.h>
@@ -42,9 +41,7 @@
#include <signal.h>
#include <grp.h>
#include <pwd.h>
#ifdef TIME_WITH_SYS_TIME
# include <time.h>
#endif
#include <time.h>
#ifdef HAVE_SELINUX
# include <selinux/selinux.h> /* for is_selinux_enabled() */
#endif

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2004-2008, 2010-2017 Todd C. Miller <Todd.Miller@sudo.ws>
* Copyright (c) 2004-2008, 2010-2018 Todd C. Miller <Todd.Miller@sudo.ws>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -18,7 +18,6 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/wait.h>
#include <sys/socket.h>
#include <stdio.h>
@@ -29,6 +28,7 @@
#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif /* HAVE_STRINGS_H */
#include <time.h>
#include <unistd.h>
#include <ctype.h>
#include <errno.h>
@@ -37,9 +37,6 @@
#include <signal.h>
#include <errno.h>
#include <fcntl.h>
#ifdef TIME_WITH_SYS_TIME
# include <time.h>
#endif
#include "sudo.h"
#include "sudo_exec.h"

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011-2016 Todd C. Miller <Todd.Miller@sudo.ws>
* Copyright (c) 2011-2018 Todd C. Miller <Todd.Miller@sudo.ws>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -28,9 +28,7 @@
# include <strings.h>
#endif /* HAVE_STRINGS_H */
#include <unistd.h>
#ifdef TIME_WITH_SYS_TIME
# include <time.h>
#endif
#include <time.h>
#ifdef HAVE_UTMPX_H
# include <utmpx.h>
#else