]> granicus.if.org Git - sudo/commitdiff
Remove use of AC_HEADER_TIME, only obsolete platforms actually
authorTodd C. Miller <Todd.Miller@sudo.ws>
Wed, 17 Jan 2018 16:52:15 +0000 (09:52 -0700)
committerTodd C. Miller <Todd.Miller@sudo.ws>
Wed, 17 Jan 2018 16:52:15 +0000 (09:52 -0700)
need this.  Also stop removing sys/time.h unless the source file
uses struct timeval.

23 files changed:
config.h.in
configure
configure.ac
lib/util/gettime.c
lib/util/mktemp.c
lib/util/nanosleep.c
lib/util/utimens.c
plugins/sudoers/boottime.c
plugins/sudoers/check.c
plugins/sudoers/getdate.c
plugins/sudoers/getdate.y
plugins/sudoers/group_plugin.c
plugins/sudoers/iolog.c
plugins/sudoers/ldap.c
plugins/sudoers/sssd.c
plugins/sudoers/sudoreplay.c
plugins/sudoers/timestamp.c
plugins/sudoers/visudo.c
src/net_ifs.c
src/sesh.c
src/sudo.c
src/sudo_edit.c
src/utmp.c

index d97ba0a9fefb2737a32bf551af4f360e0ccaf375..2e4b877f67da1da7004027d40fffe26f19846566 100644 (file)
 /* Define to global, ppid or tty to set the default timestamp record type. */
 #undef TIMESTAMP_TYPE
 
-/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
-#undef TIME_WITH_SYS_TIME
-
 /* The number of tries a user gets to enter their password. */
 #undef TRIES_FOR_PASSWORD
 
index fe28b90c7648f6e8b75f6c8bcc431322f2b7046d..3cd6b119fcd1ed894ce136165578553499d5deda 100755 (executable)
--- a/configure
+++ b/configure
 
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
-$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
-if ${ac_cv_header_time+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
-
-int
-main ()
-{
-if ((struct tm *) 0)
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_header_time=yes
-else
-  ac_cv_header_time=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
-$as_echo "$ac_cv_header_time" >&6; }
-if test $ac_cv_header_time = yes; then
-
-$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
-
-fi
-
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
 if ${ac_cv_header_stdbool_h+:} false; then :
index 97d0959c02efb879d34839d7dd5155b0f22727bb..def437a9b19f0a802deeee592d0511de07a489fa 100644 (file)
@@ -2316,7 +2316,6 @@ dnl
 dnl Header file checks
 dnl
 AC_HEADER_DIRENT
-AC_HEADER_TIME
 AC_HEADER_STDBOOL
 AC_HEADER_MAJOR
 AC_CHECK_HEADERS_ONCE([netgroup.h paths.h spawn.h utmpx.h wordexp.h sys/sockio.h sys/bsdtypes.h sys/select.h sys/stropts.h sys/sysmacros.h])
index 3d2cee8b8b73cab37ed63e0b3fee603a17170c21..054c7b6957316baf846b1d51fc10f393c40ecbbb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2015 Todd C. Miller <Todd.Miller@sudo.ws>
+ * Copyright (c) 2014-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
@@ -21,9 +21,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
-#ifdef TIME_WITH_SYS_TIME
-# include <time.h>
-#endif
+#include <time.h>
 #include <errno.h>
 
 #if defined(__MACH__) && !defined(HAVE_CLOCK_GETTIME)
index 83530384ab35a871a4a5ae3992d3ae792e795f43..defbd9014c00361e2b7ff8b0d4c553418d4d8ce7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2003, 2004, 2008-2011, 2013, 2015, 2017
+ * Copyright (c) 2001, 2003, 2004, 2008-2011, 2013, 2015, 2017, 2018
  *     Todd C. Miller <Todd.Miller@sudo.ws>
  *
  * Permission to use, copy, modify, and distribute this software for any
@@ -38,9 +38,7 @@
 #endif /* HAVE_STRINGS_H */
 #include <ctype.h>
 #include <unistd.h>
-#ifdef TIME_WITH_SYS_TIME
-# include <time.h>
-#endif
+#include <time.h>
 
 #include "sudo_compat.h"
 #include "pathnames.h"
index 70ca756f9a75513fc3a84ea4f0e693a7764dd184..dba046c7109a19b6c861fe1b69538eac9886ae17 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2011, 2013, 2017 Todd C. Miller <Todd.Miller@sudo.ws>
+ * Copyright (c) 2009-2011, 2013, 2017-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
@@ -23,9 +23,7 @@
 #ifdef HAVE_SYS_SELECT_H
 #include <sys/select.h>
 #endif /* HAVE_SYS_SELECT_H */
-#if TIME_WITH_SYS_TIME
-# include <time.h>
-#endif
+#include <time.h>
 #include <errno.h>
 
 #include "sudo_compat.h"
index 1a53e0289f2124293f0c29062db1c82302297a51..2be02b5e04b8e2ae155e1aed0aa240ed48992a47 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Todd C. Miller <Todd.Miller@sudo.ws>
+ * Copyright (c) 2015, 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
@@ -23,9 +23,7 @@
 #include <sys/time.h>
 #include <stdio.h>
 #include <errno.h>
-#ifdef TIME_WITH_SYS_TIME
-# include <time.h>
-#endif
+#include <time.h>
 #if !defined(HAVE_UTIMES) || defined(HAVE_FUTIME)
 # include <utime.h>
 #endif
index c4031875b3226208f1c55da5a56bf15d48f0b9b7..a6cef04fffcce4a963fc9ca90324462862e08a96 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2015 Todd C. Miller <Todd.Miller@sudo.ws>
+ * Copyright (c) 2009-2015, 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
@@ -34,9 +34,7 @@
 #endif /* HAVE_STRINGS_H */
 #include <errno.h>
 #include <limits.h>
-#ifdef TIME_WITH_SYS_TIME
-# include <time.h>
-#endif
+#include <time.h>
 #ifndef __linux__
 # if defined(HAVE_SYSCTL) && defined(KERN_BOOTTIME)
 #  include <sys/sysctl.h>
index 8a68d4d04cd3bc42f525ac44f68076eb55416d38..ed49d63aea79d0328b3822175f74d083bbbea93e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1993-1996,1998-2005, 2007-2016
+ * Copyright (c) 1993-1996,1998-2005, 2007-2018
  *     Todd C. Miller <Todd.Miller@sudo.ws>
  *
  * Permission to use, copy, modify, and distribute this software for any
@@ -22,7 +22,6 @@
 #include <config.h>
 
 #include <sys/types.h>
-#include <sys/time.h>
 #include <stdio.h>
 #include <stdlib.h>
 #ifdef HAVE_STRING_H
@@ -32,9 +31,7 @@
 # include <strings.h>
 #endif /* HAVE_STRINGS_H */
 #include <unistd.h>
-#ifdef TIME_WITH_SYS_TIME
-# include <time.h>
-#endif
+#include <time.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <pwd.h>
index 526156a40165c302350a1423994afc1b67db00d1..11f55105a103f0fbbe9617219679981269aac24a 100644 (file)
@@ -27,7 +27,6 @@
 #include <config.h>
 
 #include <sys/types.h>
-#include <sys/time.h>
 #include <stdio.h>
 #include <stdlib.h>
 #ifdef HAVE_STRING_H
@@ -41,9 +40,7 @@
 #elif defined(HAVE_INTTYPES_H)
 # include <inttypes.h>
 #endif
-#ifdef TIME_WITH_SYS_TIME
-# include <time.h>
-#endif
+#include <time.h>
 #include <limits.h>
 #include <ctype.h>
 
@@ -110,7 +107,7 @@ static int  yyerror(const char *s);
 static int     yylex(void);
        int     yyparse(void);
 
-#line 103 "getdate.y"
+#line 100 "getdate.y"
 #ifndef YYSTYPE_DEFINED
 #define YYSTYPE_DEFINED
 typedef union {
@@ -118,7 +115,7 @@ typedef union {
     enum _MERIDIAN     Meridian;
 } YYSTYPE;
 #endif /* YYSTYPE_DEFINED */
-#line 121 "getdate.c"
+#line 118 "getdate.c"
 #define tAGO 257
 #define tDAY 258
 #define tDAYZONE 259
@@ -386,7 +383,8 @@ short *yyss;
 short *yysslim;
 YYSTYPE *yyvs;
 unsigned int yystacksize;
-#line 322 "getdate.y"
+int yyparse(void);
+#line 319 "getdate.y"
 
 /* Month and day table. */
 static TABLE const MonthDayTable[] = {
@@ -1008,7 +1006,7 @@ main(int argc, char *argv[])
     /* NOTREACHED */
 }
 #endif /* TEST */
-#line 959 "getdate.c"
+#line 957 "getdate.c"
 /* allocate initial stack or double stack size, up to YYMAXDEPTH */
 #if defined(__cplusplus) || defined(__STDC__)
 static int yygrowstack(void)
@@ -1217,37 +1215,37 @@ yyreduce:
     switch (yyn)
     {
 case 3:
-#line 121 "getdate.y"
+#line 118 "getdate.y"
 {
            yyHaveTime++;
        }
 break;
 case 4:
-#line 124 "getdate.y"
+#line 121 "getdate.y"
 {
            yyHaveZone++;
        }
 break;
 case 5:
-#line 127 "getdate.y"
+#line 124 "getdate.y"
 {
            yyHaveDate++;
        }
 break;
 case 6:
-#line 130 "getdate.y"
+#line 127 "getdate.y"
 {
            yyHaveDay++;
        }
 break;
 case 7:
-#line 133 "getdate.y"
+#line 130 "getdate.y"
 {
            yyHaveRel++;
        }
 break;
 case 9:
-#line 139 "getdate.y"
+#line 136 "getdate.y"
 {
            yyHour = yyvsp[-1].Number;
            yyMinutes = 0;
@@ -1256,7 +1254,7 @@ case 9:
        }
 break;
 case 10:
-#line 145 "getdate.y"
+#line 142 "getdate.y"
 {
            yyHour = yyvsp[-3].Number;
            yyMinutes = yyvsp[-1].Number;
@@ -1265,7 +1263,7 @@ case 10:
        }
 break;
 case 11:
-#line 151 "getdate.y"
+#line 148 "getdate.y"
 {
            yyHour = yyvsp[-3].Number;
            yyMinutes = yyvsp[-1].Number;
@@ -1275,7 +1273,7 @@ case 11:
        }
 break;
 case 12:
-#line 158 "getdate.y"
+#line 155 "getdate.y"
 {
            yyHour = yyvsp[-5].Number;
            yyMinutes = yyvsp[-3].Number;
@@ -1284,7 +1282,7 @@ case 12:
        }
 break;
 case 13:
-#line 164 "getdate.y"
+#line 161 "getdate.y"
 {
            yyHour = yyvsp[-5].Number;
            yyMinutes = yyvsp[-3].Number;
@@ -1295,56 +1293,56 @@ case 13:
        }
 break;
 case 14:
-#line 174 "getdate.y"
+#line 171 "getdate.y"
 {
            yyTimezone = yyvsp[0].Number;
            yyDSTmode = DSToff;
        }
 break;
 case 15:
-#line 178 "getdate.y"
+#line 175 "getdate.y"
 {
            yyTimezone = yyvsp[0].Number;
            yyDSTmode = DSTon;
        }
 break;
 case 16:
-#line 183 "getdate.y"
+#line 180 "getdate.y"
 {
            yyTimezone = yyvsp[-1].Number;
            yyDSTmode = DSTon;
        }
 break;
 case 17:
-#line 189 "getdate.y"
+#line 186 "getdate.y"
 {
            yyDayOrdinal = 1;
            yyDayNumber = yyvsp[0].Number;
        }
 break;
 case 18:
-#line 193 "getdate.y"
+#line 190 "getdate.y"
 {
            yyDayOrdinal = 1;
            yyDayNumber = yyvsp[-1].Number;
        }
 break;
 case 19:
-#line 197 "getdate.y"
+#line 194 "getdate.y"
 {
            yyDayOrdinal = yyvsp[-1].Number;
            yyDayNumber = yyvsp[0].Number;
        }
 break;
 case 20:
-#line 203 "getdate.y"
+#line 200 "getdate.y"
 {
            yyMonth = yyvsp[-2].Number;
            yyDay = yyvsp[0].Number;
        }
 break;
 case 21:
-#line 207 "getdate.y"
+#line 204 "getdate.y"
 {
            if (yyvsp[-4].Number >= 100) {
                yyYear = yyvsp[-4].Number;
@@ -1358,7 +1356,7 @@ case 21:
        }
 break;
 case 22:
-#line 218 "getdate.y"
+#line 215 "getdate.y"
 {
            /* ISO 8601 format.  yyyy-mm-dd.  */
            yyYear = yyvsp[-2].Number;
@@ -1367,7 +1365,7 @@ case 22:
        }
 break;
 case 23:
-#line 224 "getdate.y"
+#line 221 "getdate.y"
 {
            /* e.g. 17-JUN-1992.  */
            yyDay = yyvsp[-2].Number;
@@ -1376,14 +1374,14 @@ case 23:
        }
 break;
 case 24:
-#line 230 "getdate.y"
+#line 227 "getdate.y"
 {
            yyMonth = yyvsp[-1].Number;
            yyDay = yyvsp[0].Number;
        }
 break;
 case 25:
-#line 234 "getdate.y"
+#line 231 "getdate.y"
 {
            yyMonth = yyvsp[-3].Number;
            yyDay = yyvsp[-2].Number;
@@ -1391,14 +1389,14 @@ case 25:
        }
 break;
 case 26:
-#line 239 "getdate.y"
+#line 236 "getdate.y"
 {
            yyMonth = yyvsp[0].Number;
            yyDay = yyvsp[-1].Number;
        }
 break;
 case 27:
-#line 243 "getdate.y"
+#line 240 "getdate.y"
 {
            yyMonth = yyvsp[-1].Number;
            yyDay = yyvsp[-2].Number;
@@ -1406,68 +1404,68 @@ case 27:
        }
 break;
 case 28:
-#line 250 "getdate.y"
+#line 247 "getdate.y"
 {
            yyRelSeconds = -yyRelSeconds;
            yyRelMonth = -yyRelMonth;
        }
 break;
 case 30:
-#line 257 "getdate.y"
+#line 254 "getdate.y"
 {
            yyRelSeconds += yyvsp[-1].Number * yyvsp[0].Number * 60L;
        }
 break;
 case 31:
-#line 260 "getdate.y"
+#line 257 "getdate.y"
 {
            yyRelSeconds += yyvsp[-1].Number * yyvsp[0].Number * 60L;
        }
 break;
 case 32:
-#line 263 "getdate.y"
+#line 260 "getdate.y"
 {
            yyRelSeconds += yyvsp[0].Number * 60L;
        }
 break;
 case 33:
-#line 266 "getdate.y"
+#line 263 "getdate.y"
 {
            yyRelSeconds += yyvsp[-1].Number;
        }
 break;
 case 34:
-#line 269 "getdate.y"
+#line 266 "getdate.y"
 {
            yyRelSeconds += yyvsp[-1].Number;
        }
 break;
 case 35:
-#line 272 "getdate.y"
+#line 269 "getdate.y"
 {
            yyRelSeconds++;
        }
 break;
 case 36:
-#line 275 "getdate.y"
+#line 272 "getdate.y"
 {
            yyRelMonth += yyvsp[-1].Number * yyvsp[0].Number;
        }
 break;
 case 37:
-#line 278 "getdate.y"
+#line 275 "getdate.y"
 {
            yyRelMonth += yyvsp[-1].Number * yyvsp[0].Number;
        }
 break;
 case 38:
-#line 281 "getdate.y"
+#line 278 "getdate.y"
 {
            yyRelMonth += yyvsp[0].Number;
        }
 break;
 case 39:
-#line 286 "getdate.y"
+#line 283 "getdate.y"
 {
            if (yyHaveTime && yyHaveDate && !yyHaveRel)
                yyYear = yyvsp[0].Number;
@@ -1495,18 +1493,18 @@ case 39:
        }
 break;
 case 40:
-#line 313 "getdate.y"
+#line 310 "getdate.y"
 {
            yyval.Meridian = MER24;
        }
 break;
 case 41:
-#line 316 "getdate.y"
+#line 313 "getdate.y"
 {
            yyval.Meridian = yyvsp[0].Meridian;
        }
 break;
-#line 1457 "getdate.c"
+#line 1455 "getdate.c"
     }
     yyssp -= yym;
     yystate = *yyssp;
index a213ba0b05b35d59862bccb861251a12c49f24da..e23ef8d0cc1ffb4bcb65509cf888be3a330c5080 100644 (file)
@@ -15,7 +15,6 @@
 #include <config.h>
 
 #include <sys/types.h>
-#include <sys/time.h>
 #include <stdio.h>
 #include <stdlib.h>
 #ifdef HAVE_STRING_H
@@ -29,9 +28,7 @@
 #elif defined(HAVE_INTTYPES_H)
 # include <inttypes.h>
 #endif
-#ifdef TIME_WITH_SYS_TIME
-# include <time.h>
-#endif
+#include <time.h>
 #include <limits.h>
 #include <ctype.h>
 
index b3fc5bb5f83dc671cfc27a93f3f0f880b5450671..ec753c81bf072629aa5a156c82ae84f1930d078d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010-2015 Todd C. Miller <Todd.Miller@sudo.ws>
+ * Copyright (c) 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 <stdio.h>
 #include <stdlib.h>
 #ifdef HAVE_STRING_H
@@ -28,9 +27,7 @@
 # include <strings.h>
 #endif /* HAVE_STRINGS_H */
 #include <unistd.h>
-#ifdef TIME_WITH_SYS_TIME
-# include <time.h>
-#endif
+#include <time.h>
 #include <ctype.h>
 #include <errno.h>
 #include <pwd.h>
index 1924070311ffe3823fa4a5b284f96169ea291caf..251469790dc4df3bc4412cc3a093a7bdcc5d0b5f 100644 (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
@@ -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>
 #include <errno.h>
 #include <fcntl.h>
 #include <signal.h>
index 104816b8e2df3985fbd2125462b65b55d863f007..c3cb3fe5381638a37b82af284d35727832952f07 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003-2017 Todd C. Miller <Todd.Miller@sudo.ws>
+ * Copyright (c) 2003-2018 Todd C. Miller <Todd.Miller@sudo.ws>
  *
  * This code is derived from software contributed by Aaron Spangler.
  *
@@ -31,9 +31,7 @@
 # include <strings.h>
 #endif /* HAVE_STRINGS_H */
 #include <unistd.h>
-#ifdef TIME_WITH_SYS_TIME
-# include <time.h>
-#endif
+#include <time.h>
 #include <ctype.h>
 #include <errno.h>
 #include <fcntl.h>
index afb2d2f7445c82039326521a09946ea11edd6ffc..398f9a7588500fdae936ba9367c9360c5b3079aa 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003-2016 Todd C. Miller <Todd.Miller@sudo.ws>
+ * Copyright (c) 2003-2018 Todd C. Miller <Todd.Miller@sudo.ws>
  * Copyright (c) 2011 Daniel Kopecek <dkopecek@redhat.com>
  *
  * This code is derived from software contributed by Aaron Spangler.
@@ -22,7 +22,6 @@
 #ifdef HAVE_SSSD
 
 #include <sys/types.h>
-#include <sys/time.h>
 #include <sys/stat.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -33,9 +32,7 @@
 # include <strings.h>
 #endif /* HAVE_STRINGS_H */
 #include <unistd.h>
-#ifdef TIME_WITH_SYS_TIME
-# include <time.h>
-#endif
+#include <time.h>
 #include <ctype.h>
 #include <pwd.h>
 #include <grp.h>
index 2a16e9475168c591f7f89c74cc9ba5487a5677d2..3034b8ac9248cca70c6d472bfc517cd8f04caf96 100644 (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
@@ -36,9 +36,7 @@
 # include <strings.h>
 #endif /* HAVE_STRINGS_H */
 #include <unistd.h>
-#ifdef TIME_WITH_SYS_TIME
-# include <time.h>
-#endif
+#include <time.h>
 #include <ctype.h>
 #include <errno.h>
 #include <limits.h>
index 8a6f8e4e26e2d362e8ce4ec4a4370ae24e85eb46..d4e65c96e0cbab07efc0146238bc8caeae64cc34 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2017 Todd C. Miller <Todd.Miller@sudo.ws>
+ * Copyright (c) 2014-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
@@ -17,7 +17,6 @@
 #include <config.h>
 
 #include <sys/types.h>
-#include <sys/time.h>
 #include <sys/stat.h>
 #include <sys/ioctl.h>
 #include <stdio.h>
@@ -34,9 +33,7 @@
 # include <strings.h>
 #endif /* HAVE_STRINGS_H */
 #include <unistd.h>
-#ifdef TIME_WITH_SYS_TIME
-# include <time.h>
-#endif
+#include <time.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <pwd.h>
index 33143ea9765094a706515ce592e1e8c409e932cc..4d788faf3f6b8eea0faf566035d341d77290ced8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 1998-2005, 2007-2017
+ * Copyright (c) 1996, 1998-2005, 2007-2018
  *     Todd C. Miller <Todd.Miller@sudo.ws>
  *
  * Permission to use, copy, modify, and distribute this software for any
@@ -32,7 +32,6 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/socket.h>
-#include <sys/time.h>
 #include <sys/uio.h>
 #ifndef __TANDEM
 # include <sys/file.h>
 #include <signal.h>
 #include <errno.h>
 #include <fcntl.h>
+#include <time.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
-#ifdef TIME_WITH_SYS_TIME
-# include <time.h>
-#endif
 
 #include "sudoers.h"
 #include "interfaces.h"
index a1a2905ad2d7c53992fcc18d1569ba7c10ed45c3..dc8f3ce30d5ef33fd179cd02291743758cacb5b9 100644 (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>
index 29d6e920f5b6c1e327d3bd501d9d2a6392502191..c994fea4a6f842e72ce5fc33ad580c0ba625f4d8 100644 (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>
 #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 */
 
index daa129c8399fe57436f52c98fd3e75e000d98c17..b205b8a52ee3a5546551f149e64c84917083205b 100644 (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
index 5698443a44dd083caa93967fd38f9a5fc087fee5..7c72199408f55a7edcb2b444be834f1f5cd0f345 100644 (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"
index 052c8614a752e9f4bd5fea380b50e462b81a361f..cc8dec8a88c79783aac846a58cdb98405fb853e9 100644 (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