several. Switch from FILENAME_MAX to PATH_MAX (it's for open(), not fopen()).
ok deraadt@ tedu@ krw@
-/* $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.
** 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"
-/* $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.
*/
#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"
} u_t;
u_t * up;
int doaccess;
- char fullname[FILENAME_MAX];
+ char fullname[PATH_MAX];
up = calloc(1, sizeof *up);
if (up == NULL)
-/* $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
** 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.
-/* $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.
#include <fcntl.h>
#include <locale.h>
+#include <stdio.h>
#include "private.h"
#include "tzfile.h"
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;