summaryrefslogtreecommitdiff
path: root/usr.bin/nm
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-01-16 06:40:24 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-01-16 06:40:24 +0000
commit315054f4737a39489e0a14f3a92bff61f1592832 (patch)
tree62bf010653374ce09b6beb4dfa0414a91457233b /usr.bin/nm
parent79e3d817585ca08a91e30ad14abe43e2ab70295f (diff)
Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
Diffstat (limited to 'usr.bin/nm')
-rw-r--r--usr.bin/nm/elf.c4
-rw-r--r--usr.bin/nm/nm.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/nm/elf.c b/usr.bin/nm/elf.c
index 7e323d31de8..74b3bd35979 100644
--- a/usr.bin/nm/elf.c
+++ b/usr.bin/nm/elf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: elf.c,v 1.23 2013/11/26 13:19:07 deraadt Exp $ */
+/* $OpenBSD: elf.c,v 1.24 2015/01/16 06:40:10 deraadt Exp $ */
/*
* Copyright (c) 2003 Michael Shalayeff
@@ -26,7 +26,6 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/mman.h>
#include <unistd.h>
#include <a.out.h>
@@ -36,6 +35,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <limits.h>
#include <ctype.h>
#include "elfuncs.h"
#include "util.h"
diff --git a/usr.bin/nm/nm.c b/usr.bin/nm/nm.c
index a9622b67cad..3937f4926c1 100644
--- a/usr.bin/nm/nm.c
+++ b/usr.bin/nm/nm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nm.c,v 1.41 2014/04/28 18:49:28 miod Exp $ */
+/* $OpenBSD: nm.c,v 1.42 2015/01/16 06:40:10 deraadt Exp $ */
/* $NetBSD: nm.c,v 1.7 1996/01/14 23:04:03 pk Exp $ */
/*
@@ -33,7 +33,7 @@
* SUCH DAMAGE.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <sys/mman.h>
#include <a.out.h>
#include <elf_abi.h>