diff options
Diffstat (limited to 'lib/libc/time')
-rw-r--r-- | lib/libc/time/asctime.c | 5 | ||||
-rw-r--r-- | lib/libc/time/localtime.c | 9 | ||||
-rw-r--r-- | lib/libc/time/private.h | 14 | ||||
-rw-r--r-- | lib/libc/time/strftime.c | 5 |
4 files changed, 15 insertions, 18 deletions
diff --git a/lib/libc/time/asctime.c b/lib/libc/time/asctime.c index 16203d747e7..d2a0d19e94d 100644 --- a/lib/libc/time/asctime.c +++ b/lib/libc/time/asctime.c @@ -1,4 +1,4 @@ -/* $OpenBSD: asctime.c,v 1.22 2015/09/12 14:35:40 guenther Exp $ */ +/* $OpenBSD: asctime.c,v 1.23 2015/10/24 18:13:18 guenther Exp $ */ /* ** This file is in the public domain, so clarified as of ** 1996-06-05 by Arthur David Olson. @@ -10,6 +10,9 @@ ** whereas the output of asctime is supposed to be constant. */ +#include <errno.h> +#include <stdio.h> +#include <string.h> #include "private.h" #include "tzfile.h" #include "thread_private.h" diff --git a/lib/libc/time/localtime.c b/lib/libc/time/localtime.c index eaf989741a0..8ac4433a31f 100644 --- a/lib/libc/time/localtime.c +++ b/lib/libc/time/localtime.c @@ -1,4 +1,4 @@ -/* $OpenBSD: localtime.c,v 1.54 2015/09/19 04:02:21 guenther Exp $ */ +/* $OpenBSD: localtime.c,v 1.55 2015/10/24 18:13:18 guenther Exp $ */ /* ** This file is in the public domain, so clarified as of ** 1996-06-05 by Arthur David Olson. @@ -10,8 +10,13 @@ */ #include <ctype.h> +#include <errno.h> #include <fcntl.h> #include <float.h> /* for FLT_MAX and DBL_MAX */ +#include <stdint.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> #include "private.h" #include "tzfile.h" @@ -324,7 +329,7 @@ tzload(const char *name, struct state *sp, int doextend) } u_t; u_t * up; int doaccess; - char fullname[FILENAME_MAX]; + char fullname[PATH_MAX]; up = calloc(1, sizeof *up); if (up == NULL) diff --git a/lib/libc/time/private.h b/lib/libc/time/private.h index 6a11fae0796..f4f09e29851 100644 --- a/lib/libc/time/private.h +++ b/lib/libc/time/private.h @@ -1,4 +1,4 @@ -/* $OpenBSD: private.h,v 1.37 2015/04/07 01:47:04 millert Exp $ */ +/* $OpenBSD: private.h,v 1.38 2015/10/24 18:13:18 guenther Exp $ */ #ifndef PRIVATE_H #define PRIVATE_H @@ -30,20 +30,8 @@ ** Nested includes */ -#include <sys/types.h> /* for time_t */ -#include <stdio.h> -#include <errno.h> -#include <string.h> #include <limits.h> /* for CHAR_BIT et al. */ #include <time.h> -#include <stdlib.h> - - -#include <sys/wait.h> /* for WIFEXITED and WEXITSTATUS */ - -#include <unistd.h> /* for F_OK, R_OK, and other POSIX goodness */ - -#include <stdint.h> /* ** Finally, some convenience items. diff --git a/lib/libc/time/strftime.c b/lib/libc/time/strftime.c index 84c4c18e38f..aea2e2f8e6b 100644 --- a/lib/libc/time/strftime.c +++ b/lib/libc/time/strftime.c @@ -1,4 +1,4 @@ -/* $OpenBSD: strftime.c,v 1.27 2015/09/12 14:35:40 guenther Exp $ */ +/* $OpenBSD: strftime.c,v 1.28 2015/10/24 18:13:18 guenther Exp $ */ /* ** Copyright (c) 1989, 1993 ** The Regents of the University of California. All rights reserved. @@ -30,6 +30,7 @@ #include <fcntl.h> #include <locale.h> +#include <stdio.h> #include "private.h" #include "tzfile.h" @@ -612,7 +613,7 @@ _loc(void) char * p; const char ** ap; const char * plim; - char filename[FILENAME_MAX]; + char filename[PATH_MAX]; struct stat st; size_t namesize; size_t bufsize; |