summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2012-12-04 02:38:52 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2012-12-04 02:38:52 +0000
commiteee0e689e9639ae0916aa15636959ad9584e203e (patch)
treee1fd76f998d990060f4d09d8cac55b16df1474b8
parentef243207f8630a625d2b953f94c64496751e2574 (diff)
replace sys/param.h with sys/types.h (and sometimes add limits.h if needed)
ok guenther
-rw-r--r--bin/date/date.c4
-rw-r--r--bin/md5/md5.c8
-rw-r--r--bin/mt/mtrmt.c4
-rw-r--r--libexec/rpc.rusersd/rusers_proc.c4
-rw-r--r--sbin/ldattach/atomicio.c5
5 files changed, 15 insertions, 10 deletions
diff --git a/bin/date/date.c b/bin/date/date.c
index b6a2a4f807c..a6be81cc3dd 100644
--- a/bin/date/date.c
+++ b/bin/date/date.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: date.c,v 1.37 2011/07/08 18:07:16 deraadt Exp $ */
+/* $OpenBSD: date.c,v 1.38 2012/12/04 02:38:50 deraadt Exp $ */
/* $NetBSD: date.c,v 1.11 1995/09/07 06:21:05 jtc Exp $ */
/*
@@ -30,7 +30,7 @@
* SUCH DAMAGE.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <sys/time.h>
#include <ctype.h>
diff --git a/bin/md5/md5.c b/bin/md5/md5.c
index 956a61b8a73..af0f1748aa0 100644
--- a/bin/md5/md5.c
+++ b/bin/md5/md5.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: md5.c,v 1.53 2011/07/05 23:39:27 tedu Exp $ */
+/* $OpenBSD: md5.c,v 1.54 2012/12/04 02:38:51 deraadt Exp $ */
/*
* Copyright (c) 2001,2003,2005-2006 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -20,7 +20,7 @@
* Materiel Command, USAF, under agreement number F39502-99-1-0512.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <sys/queue.h>
#include <netinet/in.h>
#include <ctype.h>
@@ -30,6 +30,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <limits.h>
#include <time.h>
#include <unistd.h>
@@ -46,6 +47,9 @@
#define MAX_DIGEST_LEN 128
+#define MIN(a,b) (((a)<(b))?(a):(b))
+#define MAX(a,b) (((a)>(b))?(a):(b))
+
enum program_mode {
MODE_MD5,
MODE_SHA1,
diff --git a/bin/mt/mtrmt.c b/bin/mt/mtrmt.c
index cc8cb7bd867..01847bc91a8 100644
--- a/bin/mt/mtrmt.c
+++ b/bin/mt/mtrmt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mtrmt.c,v 1.19 2012/12/04 02:34:05 deraadt Exp $ */
+/* $OpenBSD: mtrmt.c,v 1.20 2012/12/04 02:38:51 deraadt Exp $ */
/* $NetBSD: mtrmt.c,v 1.2 1996/03/06 06:22:07 scottr Exp $ */
/*-
@@ -30,7 +30,7 @@
* SUCH DAMAGE.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <sys/mtio.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
diff --git a/libexec/rpc.rusersd/rusers_proc.c b/libexec/rpc.rusersd/rusers_proc.c
index 2cecb9f2c78..d17c6725a03 100644
--- a/libexec/rpc.rusersd/rusers_proc.c
+++ b/libexec/rpc.rusersd/rusers_proc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rusers_proc.c,v 1.22 2009/10/27 23:59:31 deraadt Exp $ */
+/* $OpenBSD: rusers_proc.c,v 1.23 2012/12/04 02:38:51 deraadt Exp $ */
/*-
* Copyright (c) 1993 John Brezak
@@ -28,7 +28,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/types.h>
@@ -39,6 +38,7 @@
#include <stdlib.h>
#include <syslog.h>
#include <unistd.h>
+#include <limits.h>
#include <string.h>
#include <rpc/rpc.h>
#include <rpcsvc/rusers.h> /* New version */
diff --git a/sbin/ldattach/atomicio.c b/sbin/ldattach/atomicio.c
index 5adb7fd0597..5bfab6a9627 100644
--- a/sbin/ldattach/atomicio.c
+++ b/sbin/ldattach/atomicio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: atomicio.c,v 1.1 2008/06/09 21:06:10 mbalmer Exp $ */
+/* $OpenBSD: atomicio.c,v 1.2 2012/12/04 02:38:51 deraadt Exp $ */
/*
* Copyright (c) 2006 Damien Miller. All rights reserved.
* Copyright (c) 2005 Anil Madhavapeddy. All rights reserved.
@@ -26,12 +26,13 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <sys/uio.h>
#include <errno.h>
#include <poll.h>
#include <string.h>
+#include <limits.h>
#include <unistd.h>
#include "atomicio.h"