summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2014-06-30 04:25:11 +0000
committerderaadt <deraadt@openbsd.org>2014-06-30 04:25:11 +0000
commit3a8058f538997b2689ba31ec7a3dbc578515b897 (patch)
tree8d6fa1bc950f3dc81414a6914a63d473f62c376c
parentsys/types.h rather than sys/param.h, where applicable. avoid overreach. (diff)
downloadwireguard-openbsd-3a8058f538997b2689ba31ec7a3dbc578515b897.tar.xz
wireguard-openbsd-3a8058f538997b2689ba31ec7a3dbc578515b897.zip
remove backwards compat layer for alpha osf1. back then compilers and
the parsers sucked, so byte misalignment repair was requested. These days it means the parsers should improve. ok lteo
-rw-r--r--usr.sbin/tcpdump/Makefile4
-rw-r--r--usr.sbin/tcpdump/machdep.c44
-rw-r--r--usr.sbin/tcpdump/machdep.h29
-rw-r--r--usr.sbin/tcpdump/tcpdump.c5
4 files changed, 3 insertions, 79 deletions
diff --git a/usr.sbin/tcpdump/Makefile b/usr.sbin/tcpdump/Makefile
index 361d95d87c5..1fc07799c0d 100644
--- a/usr.sbin/tcpdump/Makefile
+++ b/usr.sbin/tcpdump/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.55 2014/06/20 04:01:42 lteo Exp $
+# $OpenBSD: Makefile,v 1.56 2014/06/30 04:25:11 deraadt Exp $
#
# Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994
# The Regents of the University of California. All rights reserved.
@@ -41,7 +41,7 @@ SRCS= tcpdump.c addrtoname.c privsep.c privsep_fdpass.c privsep_pcap.c \
print-fddi.c print-llc.c print-sunrpc.c print-hsrp.c print-vqp.c \
print-vrrp.c print-wb.c print-decnet.c print-isoclns.c print-ipx.c \
print-atm.c print-dvmrp.c print-krb.c print-pim.c print-netbios.c \
- util.c bpf_dump.c parsenfsfh.c version.c machdep.c print-igrp.c \
+ util.c bpf_dump.c parsenfsfh.c version.c print-igrp.c \
print-gre.c print-radius.c print-enc.c print-cnfp.c \
print-ipsec.c print-ike.c print-raw.c print-l2tp.c print-mobile.c \
print-ip6.c print-ip6opts.c print-icmp6.c print-dhcp6.c print-frag6.c \
diff --git a/usr.sbin/tcpdump/machdep.c b/usr.sbin/tcpdump/machdep.c
deleted file mode 100644
index c94d5fcc6bf..00000000000
--- a/usr.sbin/tcpdump/machdep.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/* $OpenBSD: machdep.c,v 1.8 2009/10/27 23:59:55 deraadt Exp $ */
-
-/*
- * Copyright (c) 1996, 1997
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that: (1) source code distributions
- * retain the above copyright notice and this paragraph in its entirety, (2)
- * distributions including binary code include the above copyright notice and
- * this paragraph in its entirety in the documentation or other materials
- * provided with the distribution, and (3) all advertising materials mentioning
- * features or use of this software display the following acknowledgement:
- * ``This product includes software developed by the University of California,
- * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
- * the University nor the names of its contributors may be used to endorse
- * or promote products derived from this software without specific prior
- * written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#include <sys/types.h>
-#ifdef __osf__
-#include <sys/sysinfo.h>
-#include <sys/proc.h>
-#endif
-
-#include "machdep.h"
-
-int
-abort_on_misalignment(char *ebuf, size_t ebufsiz)
-{
-#ifdef __osf__
- static int buf[2] = { SSIN_UACPROC, UAC_SIGBUS };
-
- if (setsysinfo(SSI_NVPAIRS, (caddr_t)buf, 1, 0, 0) < 0) {
- (void)snprintf(ebuf, ebufsiz, "setsysinfo: %s", pcap_strerror(errno));
- return (-1);
- }
-#endif
- return (0);
-}
diff --git a/usr.sbin/tcpdump/machdep.h b/usr.sbin/tcpdump/machdep.h
deleted file mode 100644
index 6630f70977c..00000000000
--- a/usr.sbin/tcpdump/machdep.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* $OpenBSD: machdep.h,v 1.4 2007/10/07 16:41:05 deraadt Exp $ */
-
-/*
- * Copyright (c) 1996
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that: (1) source code distributions
- * retain the above copyright notice and this paragraph in its entirety, (2)
- * distributions including binary code include the above copyright notice and
- * this paragraph in its entirety in the documentation or other materials
- * provided with the distribution, and (3) all advertising materials mentioning
- * features or use of this software display the following acknowledgement:
- * ``This product includes software developed by the University of California,
- * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
- * the University nor the names of its contributors may be used to endorse
- * or promote products derived from this software without specific prior
- * written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @(#) $Id: machdep.h,v 1.4 2007/10/07 16:41:05 deraadt Exp $ (LBL)
- */
-#ifndef tcpdump_machdep_h
-#define tcpdump_machdep_h
-
-int abort_on_misalignment(char *, size_t);
-#endif
diff --git a/usr.sbin/tcpdump/tcpdump.c b/usr.sbin/tcpdump/tcpdump.c
index 509661b26a5..c41a41cfedb 100644
--- a/usr.sbin/tcpdump/tcpdump.c
+++ b/usr.sbin/tcpdump/tcpdump.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcpdump.c,v 1.65 2012/07/11 10:37:38 sthen Exp $ */
+/* $OpenBSD: tcpdump.c,v 1.66 2014/06/30 04:25:11 deraadt Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
@@ -48,7 +48,6 @@
#include "interface.h"
#include "addrtoname.h"
-#include "machdep.h"
#include "setsignal.h"
#include "gmt2local.h"
@@ -224,8 +223,6 @@ main(int argc, char **argv)
error("Failed to setup privsep");
/* state: STATE_INIT */
- if (abort_on_misalignment(ebuf, sizeof(ebuf)) < 0)
- error("%s", ebuf);
opterr = 0;
while ((op = getopt(argc, argv,