-/* $OpenBSD: boot.c,v 1.4 2014/11/15 02:14:10 guenther Exp $ */
+/* $OpenBSD: boot.c,v 1.5 2015/01/16 16:18:07 deraadt Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/exec.h>
-#include <sys/param.h>
#include <sys/sysctl.h>
#include <nlist.h>
#include <link.h>
-/* $OpenBSD: dir.c,v 1.22 2014/07/10 09:03:01 otto Exp $ */
+/* $OpenBSD: dir.c,v 1.23 2015/01/16 16:18:07 deraadt Exp $ */
/*
* Copyright (c) 1983, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
-#include <sys/mount.h>
+#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
-/* $OpenBSD: dl_dirname.c,v 1.1 2013/04/05 12:58:03 kurt Exp $ */
+/* $OpenBSD: dl_dirname.c,v 1.2 2015/01/16 16:18:07 deraadt Exp $ */
/*
* Copyright (c) 1997, 2004 Todd C. Miller <Todd.Miller@courtesan.com>
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h>
-
+#include <sys/types.h>
+#include <limits.h>
#include "archdep.h"
/*
char *
_dl_dirname(const char *path)
{
- static char dname[MAXPATHLEN];
+ static char dname[PATH_MAX];
size_t len;
const char *endp;
-/* $OpenBSD: dl_prebind.c,v 1.16 2014/07/10 09:03:01 otto Exp $ */
+/* $OpenBSD: dl_prebind.c,v 1.17 2015/01/16 16:18:07 deraadt Exp $ */
/*
* Copyright (c) 2006 Dale Rahn <drahn@dalerahn.com>
*
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/exec.h>
-#include <sys/param.h>
#include <sys/sysctl.h>
#include <nlist.h>
#include <link.h>
-/* $OpenBSD: dl_uname.c,v 1.1 2013/04/05 12:58:03 kurt Exp $ */
+/* $OpenBSD: dl_uname.c,v 1.2 2015/01/16 16:18:07 deraadt Exp $ */
/*
* Copyright (c) 1994
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <sys/sysctl.h>
#include <sys/utsname.h>
-/* $OpenBSD: debug.c,v 1.5 2013/12/03 01:47:06 deraadt Exp $ */
+/* $OpenBSD: debug.c,v 1.6 2015/01/16 16:18:07 deraadt Exp $ */
/*
* Copyright (c) 2006 Dale Rahn <drahn@dalerahn.com>
*
#include <sys/types.h>
#include <sys/stat.h>
-#include <sys/param.h>
#include <sys/mman.h>
#include <limits.h>
#include <fcntl.h>
-/* $OpenBSD: dl_prebind.c,v 1.2 2008/04/09 21:45:26 kurt Exp $ */
+/* $OpenBSD: dl_prebind.c,v 1.3 2015/01/16 16:18:07 deraadt Exp $ */
/*
* Copyright (c) 2006 Dale Rahn <drahn@dalerahn.com>
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/exec.h>
-#include <sys/param.h>
#include <sys/sysctl.h>
#include <nlist.h>
#include <string.h>
-/* $OpenBSD: ldconfig.c,v 1.32 2013/12/30 21:58:07 deraadt Exp $ */
+/* $OpenBSD: ldconfig.c,v 1.33 2015/01/16 16:18:07 deraadt Exp $ */
/*
* Copyright (c) 1993,1995 Paul Kranenburg
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/file.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <limits.h>
#include "prebind.h"
{
DIR *dd;
struct dirent *dp;
- char name[MAXPATHLEN];
+ char name[PATH_MAX];
int dewey[MAXDEWEY], ndewey;
if ((dd = opendir(dir)) == NULL) {
-/* $OpenBSD: library.c,v 1.6 2013/12/03 01:47:06 deraadt Exp $ */
+/* $OpenBSD: library.c,v 1.7 2015/01/16 16:18:07 deraadt Exp $ */
/*
* Copyright (c) 2006 Dale Rahn <drahn@dalerahn.com>
*
#include <sys/types.h>
#include <sys/stat.h>
-#include <sys/param.h>
#include <sys/mman.h>
#include <limits.h>
#include <fcntl.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
+#include <limits.h>
#include <dirent.h>
#include "link.h"
#include "sod.h"
return object;
}
-char elf_hint_store[MAXPATHLEN];
+char elf_hint_store[PATH_MAX];
char *
elf_find_shlib(struct sod *sodp, char **searchpath, int nohints)
match = 1;
len = strlcpy(
elf_hint_store, *pp,
- MAXPATHLEN);
+ PATH_MAX);
if (pp[0][len-1] != '/') {
elf_hint_store[len] =
'/';
strlcpy(
&elf_hint_store[len],
dp->d_name,
- MAXPATHLEN-len);
+ PATH_MAX-len);
if (tsod.sod_major == -1)
break;
}
-/* $OpenBSD: prebind.c,v 1.27 2014/10/18 03:19:04 doug Exp $ */
+/* $OpenBSD: prebind.c,v 1.28 2015/01/16 16:18:07 deraadt Exp $ */
/*
* Copyright (c) 2006 Dale Rahn <drahn@dalerahn.com>
*
#include <sys/types.h>
#include <sys/stat.h>
-#include <sys/param.h>
#include <sys/mman.h>
#include <limits.h>
#include <errno.h>
-/* $OpenBSD: shlib.c,v 1.9 2006/05/13 16:33:40 deraadt Exp $ */
+/* $OpenBSD: shlib.c,v 1.10 2015/01/16 16:18:07 deraadt Exp $ */
/* $NetBSD: shlib.c,v 1.13 1998/04/04 01:00:29 fvdl Exp $ */
/*
*
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/file.h>
-/* $OpenBSD: ldd.c,v 1.17 2014/10/18 03:16:19 doug Exp $ */
+/* $OpenBSD: ldd.c,v 1.18 2015/01/16 16:18:07 deraadt Exp $ */
/*
* Copyright (c) 2001 Artur Grabowski <art@openbsd.org>
* All rights reserved.
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
+#include <limits.h>
#include <dlfcn.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <sys/wait.h>
-#include <sys/param.h>
int usage(void);
int doit(char *);
Elf_Ehdr ehdr;
Elf_Phdr *phdr;
int fd, i, size, status, interp=0;
- char buf[MAXPATHLEN];
+ char buf[PATH_MAX];
void * dlhandle;
if ((fd = open(name, O_RDONLY)) < 0) {
-/* $OpenBSD: library.c,v 1.70 2014/07/10 09:03:01 otto Exp $ */
+/* $OpenBSD: library.c,v 1.71 2015/01/16 16:18:07 deraadt Exp $ */
/*
* Copyright (c) 2002 Dale Rahn
#define _DYN_LOADER
#include <sys/types.h>
-#include <sys/param.h>
#include <fcntl.h>
#include <sys/mman.h>
#include "dl_prebind.h"
-/* $OpenBSD: library_mquery.c,v 1.47 2014/07/10 09:03:01 otto Exp $ */
+/* $OpenBSD: library_mquery.c,v 1.48 2015/01/16 16:18:07 deraadt Exp $ */
/*
* Copyright (c) 2002 Dale Rahn
#define _DYN_LOADER
#include <sys/types.h>
-#include <sys/param.h>
#include <fcntl.h>
#include <sys/mman.h>
#include "dl_prebind.h"
-/* $OpenBSD: library_subr.c,v 1.41 2014/07/10 09:03:01 otto Exp $ */
+/* $OpenBSD: library_subr.c,v 1.42 2015/01/16 16:18:07 deraadt Exp $ */
/*
* Copyright (c) 2002 Dale Rahn
#define _DYN_LOADER
#include <sys/types.h>
-#include <sys/param.h>
#include <sys/queue.h>
#include <limits.h>
#include <dirent.h>
return match;
}
-char _dl_hint_store[MAXPATHLEN];
+char _dl_hint_store[PATH_MAX];
char *
_dl_find_shlib(struct sod *sodp, char **searchpath, int nohints)
match = 1;
len = _dl_strlcpy(
_dl_hint_store, *pp,
- MAXPATHLEN);
+ PATH_MAX);
if (pp[0][len-1] != '/') {
_dl_hint_store[len] =
'/';
_dl_strlcpy(
&_dl_hint_store[len],
dp->d_name,
- MAXPATHLEN-len);
+ PATH_MAX-len);
if (tsod.sod_major == -1)
break;
}
-/* $OpenBSD: loader.c,v 1.151 2014/11/03 17:50:56 guenther Exp $ */
+/* $OpenBSD: loader.c,v 1.152 2015/01/16 16:18:07 deraadt Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/exec.h>
-#include <sys/param.h>
#include <sys/sysctl.h>
#include <nlist.h>
#include <string.h>
-/* $OpenBSD: malloc.c,v 1.5 2014/11/03 06:08:56 guenther Exp $ */
+/* $OpenBSD: malloc.c,v 1.6 2015/01/16 16:18:07 deraadt Exp $ */
/*
* Copyright (c) 2008, 2010, 2011 Otto Moerbeek <otto@drijf.net>
* Copyright (c) 2012 Matthew Dempsky <matthew@openbsd.org>
* can buy me a beer in return. Poul-Henning Kamp
*/
-
-#include <sys/types.h>
-#include <sys/param.h>
+#include <sys/param.h> /* PAGE_SHIFT ALIGN */
#include <sys/queue.h>
#include <sys/mman.h>
#include <sys/uio.h>
-/* $OpenBSD: path.c,v 1.3 2014/07/10 09:03:01 otto Exp $ */
+/* $OpenBSD: path.c,v 1.4 2015/01/16 16:18:07 deraadt Exp $ */
/*
* Copyright (c) 2013 Kurt Miller <kurt@intricatesoftware.com>
*/
#include <sys/types.h>
-#include <sys/param.h>
#include "path.h"
#include "util.h"
-/* $OpenBSD: strtol.c,v 1.1 2003/07/06 20:03:58 deraadt Exp $ */
+/* $OpenBSD: strtol.c,v 1.2 2015/01/16 16:18:07 deraadt Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
+#include <sys/types.h>
+#include <limits.h>
#include "util.h"
/*
-/* $OpenBSD: trace.c,v 1.2 2014/07/06 17:33:10 otto Exp $ */
+/* $OpenBSD: trace.c,v 1.3 2015/01/16 16:18:07 deraadt Exp $ */
/*
* Copyright (c) 2013 Miodrag Vallat.
*/
#include <sys/types.h>
-#include <sys/param.h>
#include "syscall.h"
#include "resolve.h"
-/* $OpenBSD: util.c,v 1.36 2014/12/09 15:36:36 tedu Exp $ */
+/* $OpenBSD: util.c,v 1.37 2015/01/16 16:18:07 deraadt Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
*/
#include <sys/types.h>
-#include <sys/param.h>
#include "archdep.h"
/*