svn commit: r343712 - in projects/clang800-import: . contrib/elftoolchain/readelf contrib/ipfilter contrib/ipfilter/ipsend contrib/ipfilter/ipsend/.OLD contrib/ipfilter/lib contrib/ipfilter/tools l...
Dimitry Andric
dim at FreeBSD.org
Sun Feb 3 11:41:48 UTC 2019
Author: dim
Date: Sun Feb 3 11:41:43 2019
New Revision: 343712
URL: https://svnweb.freebsd.org/changeset/base/343712
Log:
Merge ^/head r343571 through r343711.
Added:
projects/clang800-import/lib/libc/tests/stdlib/dynthr_mod/
- copied from r343711, head/lib/libc/tests/stdlib/dynthr_mod/
projects/clang800-import/lib/libc/tests/stdlib/dynthr_test.c
- copied unchanged from r343711, head/lib/libc/tests/stdlib/dynthr_test.c
projects/clang800-import/libexec/rtld-elf/rtld_malloc.c
- copied unchanged from r343711, head/libexec/rtld-elf/rtld_malloc.c
projects/clang800-import/sbin/pfilctl/
- copied from r343711, head/sbin/pfilctl/
projects/clang800-import/sys/dev/nvdimm/nvdimm_nfit.c
- copied unchanged from r343711, head/sys/dev/nvdimm/nvdimm_nfit.c
projects/clang800-import/sys/dev/qlnx/qlnxe/ecore_iwarp.c
- copied unchanged from r343711, head/sys/dev/qlnx/qlnxe/ecore_iwarp.c
projects/clang800-import/sys/dev/qlnx/qlnxe/ecore_ll2.c
- copied unchanged from r343711, head/sys/dev/qlnx/qlnxe/ecore_ll2.c
projects/clang800-import/sys/dev/qlnx/qlnxe/ecore_ooo.c
- copied unchanged from r343711, head/sys/dev/qlnx/qlnxe/ecore_ooo.c
projects/clang800-import/sys/dev/qlnx/qlnxe/ecore_rdma.c
- copied unchanged from r343711, head/sys/dev/qlnx/qlnxe/ecore_rdma.c
projects/clang800-import/sys/dev/qlnx/qlnxe/ecore_roce.c
- copied unchanged from r343711, head/sys/dev/qlnx/qlnxe/ecore_roce.c
projects/clang800-import/sys/dev/qlnx/qlnxe/qlnx_rdma.c
- copied unchanged from r343711, head/sys/dev/qlnx/qlnxe/qlnx_rdma.c
projects/clang800-import/sys/dev/qlnx/qlnxe/qlnx_rdma.h
- copied unchanged from r343711, head/sys/dev/qlnx/qlnxe/qlnx_rdma.h
projects/clang800-import/sys/dev/qlnx/qlnxr/
- copied from r343711, head/sys/dev/qlnx/qlnxr/
projects/clang800-import/sys/modules/iflib/
- copied from r343711, head/sys/modules/iflib/
projects/clang800-import/sys/modules/qlnx/qlnxr/
- copied from r343711, head/sys/modules/qlnx/qlnxr/
projects/clang800-import/sys/powerpc/powernv/xive.c
- copied unchanged from r343711, head/sys/powerpc/powernv/xive.c
projects/clang800-import/usr.sbin/bluetooth/sdpd/audio_sink.c
- copied unchanged from r343711, head/usr.sbin/bluetooth/sdpd/audio_sink.c
projects/clang800-import/usr.sbin/bluetooth/sdpd/audio_source.c
- copied unchanged from r343711, head/usr.sbin/bluetooth/sdpd/audio_source.c
Deleted:
projects/clang800-import/contrib/ipfilter/ipsend/.OLD/ip_compat.h
projects/clang800-import/contrib/ipfilter/ml_ipl.c
projects/clang800-import/contrib/ipfilter/mlf_ipl.c
projects/clang800-import/contrib/ipfilter/mlf_rule.c
projects/clang800-import/contrib/ipfilter/mlfk_ipl.c
projects/clang800-import/contrib/ipfilter/mlh_rule.c
projects/clang800-import/contrib/ipfilter/mln_ipl.c
projects/clang800-import/contrib/ipfilter/mln_rule.c
projects/clang800-import/contrib/ipfilter/mlo_ipl.c
projects/clang800-import/contrib/ipfilter/mlo_rule.c
projects/clang800-import/contrib/ipfilter/mls_ipl.c
projects/clang800-import/contrib/ipfilter/mls_rule.c
projects/clang800-import/contrib/ipfilter/mlso_rule.c
projects/clang800-import/libexec/rtld-elf/malloc.c
Modified:
projects/clang800-import/ObsoleteFiles.inc
projects/clang800-import/UPDATING
projects/clang800-import/contrib/elftoolchain/readelf/readelf.c
projects/clang800-import/contrib/ipfilter/arc4random.c
projects/clang800-import/contrib/ipfilter/ip_dstlist.c
projects/clang800-import/contrib/ipfilter/ip_fil.c
projects/clang800-import/contrib/ipfilter/ip_fil_compat.c
projects/clang800-import/contrib/ipfilter/ipf.h
projects/clang800-import/contrib/ipfilter/ipsend/44arp.c
projects/clang800-import/contrib/ipfilter/ipsend/arp.c
projects/clang800-import/contrib/ipfilter/ipsend/dlcommon.c
projects/clang800-import/contrib/ipfilter/ipsend/ip.c
projects/clang800-import/contrib/ipfilter/ipsend/ipresend.c
projects/clang800-import/contrib/ipfilter/ipsend/ipsend.c
projects/clang800-import/contrib/ipfilter/ipsend/ipsend.h
projects/clang800-import/contrib/ipfilter/ipsend/ipsopt.c
projects/clang800-import/contrib/ipfilter/ipsend/iptest.c
projects/clang800-import/contrib/ipfilter/ipsend/iptests.c
projects/clang800-import/contrib/ipfilter/ipsend/resend.c
projects/clang800-import/contrib/ipfilter/ipsend/sdlpi.c
projects/clang800-import/contrib/ipfilter/ipsend/sock.c
projects/clang800-import/contrib/ipfilter/lib/getifname.c
projects/clang800-import/contrib/ipfilter/lib/getproto.c
projects/clang800-import/contrib/ipfilter/lib/inet_addr.c
projects/clang800-import/contrib/ipfilter/lib/kmem.c
projects/clang800-import/contrib/ipfilter/lib/printproto.c
projects/clang800-import/contrib/ipfilter/md5.c
projects/clang800-import/contrib/ipfilter/tools/ipf.c
projects/clang800-import/contrib/ipfilter/tools/ipfs.c
projects/clang800-import/contrib/ipfilter/tools/ipfstat.c
projects/clang800-import/contrib/ipfilter/tools/ipftest.c
projects/clang800-import/contrib/ipfilter/tools/ipmon.c
projects/clang800-import/contrib/ipfilter/tools/ipnat.c
projects/clang800-import/contrib/ipfilter/tools/ipnat_y.y
projects/clang800-import/contrib/ipfilter/tools/ippool.c
projects/clang800-import/contrib/ipfilter/tools/ippool_y.y
projects/clang800-import/lib/libc/tests/stdlib/Makefile
projects/clang800-import/lib/libsdp/sdp.h
projects/clang800-import/lib/libthr/Makefile
projects/clang800-import/lib/msun/Makefile
projects/clang800-import/libexec/rtld-elf/Makefile
projects/clang800-import/libexec/rtld-elf/i386/reloc.c
projects/clang800-import/sbin/Makefile
projects/clang800-import/sbin/ifconfig/ifieee80211.c
projects/clang800-import/share/man/man4/bnxt.4
projects/clang800-import/share/man/man4/em.4
projects/clang800-import/share/man/man4/iavf.4
projects/clang800-import/share/man/man4/imcsmb.4
projects/clang800-import/share/man/man4/ixgbe.4
projects/clang800-import/share/man/man4/ixl.4
projects/clang800-import/share/man/man4/jedec_dimm.4
projects/clang800-import/share/man/man4/vmx.4
projects/clang800-import/share/man/man5/src.conf.5
projects/clang800-import/share/man/man9/Makefile
projects/clang800-import/share/man/man9/pfil.9
projects/clang800-import/share/mk/src.opts.mk
projects/clang800-import/sys/amd64/conf/GENERIC
projects/clang800-import/sys/arm64/conf/GENERIC
projects/clang800-import/sys/cam/scsi/scsi_da.c
projects/clang800-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
projects/clang800-import/sys/compat/ndis/ndis_var.h
projects/clang800-import/sys/conf/NOTES
projects/clang800-import/sys/conf/files
projects/clang800-import/sys/conf/files.powerpc
projects/clang800-import/sys/contrib/ipfilter/netinet/fil.c
projects/clang800-import/sys/contrib/ipfilter/netinet/ip_auth.c
projects/clang800-import/sys/contrib/ipfilter/netinet/ip_compat.h
projects/clang800-import/sys/contrib/ipfilter/netinet/ip_dstlist.c
projects/clang800-import/sys/contrib/ipfilter/netinet/ip_fil.h
projects/clang800-import/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
projects/clang800-import/sys/contrib/ipfilter/netinet/ip_frag.c
projects/clang800-import/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c
projects/clang800-import/sys/contrib/ipfilter/netinet/ip_htable.c
projects/clang800-import/sys/contrib/ipfilter/netinet/ip_irc_pxy.c
projects/clang800-import/sys/contrib/ipfilter/netinet/ip_log.c
projects/clang800-import/sys/contrib/ipfilter/netinet/ip_lookup.c
projects/clang800-import/sys/contrib/ipfilter/netinet/ip_nat.c
projects/clang800-import/sys/contrib/ipfilter/netinet/ip_nat.h
projects/clang800-import/sys/contrib/ipfilter/netinet/ip_nat6.c
projects/clang800-import/sys/contrib/ipfilter/netinet/ip_pool.c
projects/clang800-import/sys/contrib/ipfilter/netinet/ip_proxy.c
projects/clang800-import/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c
projects/clang800-import/sys/contrib/ipfilter/netinet/ip_scan.c
projects/clang800-import/sys/contrib/ipfilter/netinet/ip_state.c
projects/clang800-import/sys/contrib/ipfilter/netinet/ip_sync.c
projects/clang800-import/sys/dev/bwn/if_bwn.c
projects/clang800-import/sys/dev/cxgbe/adapter.h
projects/clang800-import/sys/dev/cxgbe/common/common.h
projects/clang800-import/sys/dev/cxgbe/common/t4_hw.c
projects/clang800-import/sys/dev/cxgbe/t4_main.c
projects/clang800-import/sys/dev/cxgbe/t4_sge.c
projects/clang800-import/sys/dev/e1000/if_em.c
projects/clang800-import/sys/dev/e1000/if_em.h
projects/clang800-import/sys/dev/if_ndis/if_ndis.c
projects/clang800-import/sys/dev/if_ndis/if_ndis_pccard.c
projects/clang800-import/sys/dev/imcsmb/imcsmb.c
projects/clang800-import/sys/dev/imcsmb/imcsmb_pci.c
projects/clang800-import/sys/dev/imcsmb/imcsmb_reg.h
projects/clang800-import/sys/dev/imcsmb/imcsmb_var.h
projects/clang800-import/sys/dev/ipw/if_ipw.c
projects/clang800-import/sys/dev/ixgbe/if_ix.c
projects/clang800-import/sys/dev/ixgbe/if_ixv.c
projects/clang800-import/sys/dev/ixgbe/ix_txrx.c
projects/clang800-import/sys/dev/ixgbe/ixgbe.h
projects/clang800-import/sys/dev/ixgbe/ixgbe_type.h
projects/clang800-import/sys/dev/ixl/if_iavf.c
projects/clang800-import/sys/dev/ixl/if_ixl.c
projects/clang800-import/sys/dev/ixl/ixl_iw.c
projects/clang800-import/sys/dev/ixl/ixl_pf_main.c
projects/clang800-import/sys/dev/jedec_dimm/jedec_dimm.c
projects/clang800-import/sys/dev/jedec_dimm/jedec_dimm.h
projects/clang800-import/sys/dev/netmap/netmap.c
projects/clang800-import/sys/dev/netmap/netmap_freebsd.c
projects/clang800-import/sys/dev/netmap/netmap_kern.h
projects/clang800-import/sys/dev/netmap/netmap_kloop.c
projects/clang800-import/sys/dev/nvdimm/nvdimm.c
projects/clang800-import/sys/dev/nvdimm/nvdimm_spa.c
projects/clang800-import/sys/dev/nvdimm/nvdimm_var.h
projects/clang800-import/sys/dev/sound/usb/uaudio.c
projects/clang800-import/sys/dev/usb/wlan/if_rsu.c
projects/clang800-import/sys/dev/usb/wlan/if_rsureg.h
projects/clang800-import/sys/dev/usb/wlan/if_run.c
projects/clang800-import/sys/dev/vmware/vmxnet3/if_vmx.c
projects/clang800-import/sys/dev/wtap/if_wtap.c
projects/clang800-import/sys/i386/conf/GENERIC
projects/clang800-import/sys/i386/i386/machdep.c
projects/clang800-import/sys/i386/i386/minidump_machdep_base.c
projects/clang800-import/sys/kern/kern_mbuf.c
projects/clang800-import/sys/kern/makesyscalls.sh
projects/clang800-import/sys/kern/subr_disk.c
projects/clang800-import/sys/kern/subr_kobj.c
projects/clang800-import/sys/kern/systrace_args.c
projects/clang800-import/sys/mips/conf/OCTEON1
projects/clang800-import/sys/mips/conf/std.XLP
projects/clang800-import/sys/modules/Makefile
projects/clang800-import/sys/modules/nvdimm/Makefile
projects/clang800-import/sys/modules/qlnx/Makefile
projects/clang800-import/sys/modules/qlnx/qlnxe/Makefile
projects/clang800-import/sys/net/if_bridge.c
projects/clang800-import/sys/net/if_enc.c
projects/clang800-import/sys/net/if_ethersubr.c
projects/clang800-import/sys/net/if_lagg.c
projects/clang800-import/sys/net/if_var.h
projects/clang800-import/sys/net/iflib.c
projects/clang800-import/sys/net/netmap.h
projects/clang800-import/sys/net/pfil.c
projects/clang800-import/sys/net/pfil.h
projects/clang800-import/sys/net80211/ieee80211_dfs.c
projects/clang800-import/sys/net80211/ieee80211_freebsd.c
projects/clang800-import/sys/net80211/ieee80211_proto.c
projects/clang800-import/sys/net80211/ieee80211_scan.c
projects/clang800-import/sys/net80211/ieee80211_scan_sta.c
projects/clang800-import/sys/net80211/ieee80211_tdma.c
projects/clang800-import/sys/netinet/ip_fastfwd.c
projects/clang800-import/sys/netinet/ip_input.c
projects/clang800-import/sys/netinet/ip_output.c
projects/clang800-import/sys/netinet/ip_var.h
projects/clang800-import/sys/netinet/siftr.c
projects/clang800-import/sys/netinet/tcp_input.c
projects/clang800-import/sys/netinet/tcp_stacks/rack.c
projects/clang800-import/sys/netinet6/ip6_fastfwd.c
projects/clang800-import/sys/netinet6/ip6_forward.c
projects/clang800-import/sys/netinet6/ip6_input.c
projects/clang800-import/sys/netinet6/ip6_output.c
projects/clang800-import/sys/netinet6/ip6_var.h
projects/clang800-import/sys/netpfil/ipfw/ip_fw2.c
projects/clang800-import/sys/netpfil/ipfw/ip_fw_dynamic.c
projects/clang800-import/sys/netpfil/ipfw/ip_fw_eaction.c
projects/clang800-import/sys/netpfil/ipfw/ip_fw_iface.c
projects/clang800-import/sys/netpfil/ipfw/ip_fw_nat.c
projects/clang800-import/sys/netpfil/ipfw/ip_fw_pfil.c
projects/clang800-import/sys/netpfil/ipfw/ip_fw_private.h
projects/clang800-import/sys/netpfil/ipfw/ip_fw_sockopt.c
projects/clang800-import/sys/netpfil/ipfw/ip_fw_table.c
projects/clang800-import/sys/netpfil/ipfw/ip_fw_table_value.c
projects/clang800-import/sys/netpfil/pf/pf_ioctl.c
projects/clang800-import/sys/powerpc/conf/GENERIC64
projects/clang800-import/sys/powerpc/conf/MPC85XX
projects/clang800-import/sys/powerpc/conf/MPC85XXSPE
projects/clang800-import/sys/powerpc/conf/QORIQ64
projects/clang800-import/sys/powerpc/conf/dpaa/DPAA
projects/clang800-import/sys/powerpc/powernv/opal.h
projects/clang800-import/sys/powerpc/powernv/platform_powernv.c
projects/clang800-import/sys/powerpc/pseries/xics.c
projects/clang800-import/sys/sparc64/conf/GENERIC
projects/clang800-import/sys/sys/elf_common.h
projects/clang800-import/sys/sys/mbuf.h
projects/clang800-import/sys/sys/sysproto.h
projects/clang800-import/sys/teken/teken.c
projects/clang800-import/sys/vm/uma_core.c
projects/clang800-import/sys/x86/x86/nexus.c
projects/clang800-import/sys/x86/xen/hvm.c
projects/clang800-import/sys/x86/xen/xen_intr.c
projects/clang800-import/sys/xen/hvm.h
projects/clang800-import/usr.bin/elfdump/elfdump.c
projects/clang800-import/usr.bin/shar/shar.1
projects/clang800-import/usr.bin/xinstall/tests/install_test.sh
projects/clang800-import/usr.bin/xinstall/xinstall.c
projects/clang800-import/usr.sbin/bluetooth/sdpd/Makefile
projects/clang800-import/usr.sbin/bluetooth/sdpd/profile.c
projects/clang800-import/usr.sbin/freebsd-update/freebsd-update.sh
projects/clang800-import/usr.sbin/ndiscvt/inf.c
projects/clang800-import/usr.sbin/ndiscvt/ndiscvt.c
projects/clang800-import/usr.sbin/rpc.statd/file.c
Directory Properties:
projects/clang800-import/ (props changed)
projects/clang800-import/contrib/elftoolchain/ (props changed)
projects/clang800-import/contrib/ipfilter/ (props changed)
projects/clang800-import/sys/cddl/contrib/opensolaris/ (props changed)
projects/clang800-import/sys/contrib/ipfilter/ (props changed)
Modified: projects/clang800-import/ObsoleteFiles.inc
==============================================================================
--- projects/clang800-import/ObsoleteFiles.inc Sun Feb 3 11:07:40 2019 (r343711)
+++ projects/clang800-import/ObsoleteFiles.inc Sun Feb 3 11:41:43 2019 (r343712)
@@ -190,6 +190,12 @@ OLD_FILES+=usr/lib/clang/7.0.1/lib/freebsd/libclang_rt
OLD_DIRS+=usr/lib/clang/7.0.1/lib/freebsd
OLD_DIRS+=usr/lib/clang/7.0.1/lib
OLD_DIRS+=usr/lib/clang/7.0.1
+# 20190131: pfil(9) changed
+OLD_FILES+=usr/share/man/man9/pfil_hook_get.9
+OLD_FILES+=usr/share/man/man9/pfil_rlock.9
+OLD_FILES+=usr/share/man/man9/pfil_runlock.9
+OLD_FILES+=usr/share/man/man9/pfil_wlock.9
+OLD_FILES+=usr/share/man/man9/pfil_wunlock.9
# 20190126: adv(4) / adw(4) removal
OLD_FILES+=usr/share/man/man4/adv.4.gz
OLD_FILES+=usr/share/man/man4/adw.4.gz
Modified: projects/clang800-import/UPDATING
==============================================================================
--- projects/clang800-import/UPDATING Sun Feb 3 11:07:40 2019 (r343711)
+++ projects/clang800-import/UPDATING Sun Feb 3 11:41:43 2019 (r343712)
@@ -37,6 +37,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW:
prerequisites and upgrading, if you are not already using clang 3.5.0
or higher.
+20190131:
+ Iflib is no longer unconditionally compiled into the kernel. Drivers
+ using iflib and statically compiled into the kernel, now require
+ the 'device iflib' config option. For the same drivers loaded as
+ modules on kernels not having 'device iflib', the iflib.ko module
+ is loaded automatically.
+
20181230:
r342635 changes the way efibootmgr(8) works by requiring users to add
the -b (bootnum) parameter for commands where the bootnum was previously
Modified: projects/clang800-import/contrib/elftoolchain/readelf/readelf.c
==============================================================================
--- projects/clang800-import/contrib/elftoolchain/readelf/readelf.c Sun Feb 3 11:07:40 2019 (r343711)
+++ projects/clang800-import/contrib/elftoolchain/readelf/readelf.c Sun Feb 3 11:41:43 2019 (r343712)
@@ -220,6 +220,11 @@ struct mips_option {
const char *desc;
};
+struct flag_desc {
+ uint64_t flag;
+ const char *desc;
+};
+
static void add_dumpop(struct readelf *re, size_t si, const char *sn, int op,
int t);
static const char *aeabi_adv_simd_arch(uint64_t simd);
@@ -293,6 +298,7 @@ static void dump_dwarf_ranges_foreach(struct readelf *
static void dump_dwarf_str(struct readelf *re);
static void dump_eflags(struct readelf *re, uint64_t e_flags);
static void dump_elf(struct readelf *re);
+static void dump_flags(struct flag_desc *fd, uint64_t flags);
static void dump_dyn_val(struct readelf *re, GElf_Dyn *dyn, uint32_t stab);
static void dump_dynamic(struct readelf *re);
static void dump_liblist(struct readelf *re);
@@ -307,6 +313,8 @@ static void dump_mips_specific_info(struct readelf *re
static void dump_notes(struct readelf *re);
static void dump_notes_content(struct readelf *re, const char *buf, size_t sz,
off_t off);
+static void dump_notes_data(const char *name, uint32_t type, const char *buf,
+ size_t sz);
static void dump_svr4_hash(struct section *s);
static void dump_svr4_hash64(struct readelf *re, struct section *s);
static void dump_gnu_hash(struct readelf *re, struct section *s);
@@ -2721,6 +2729,58 @@ dump_arch_dyn_val(struct readelf *re, GElf_Dyn *dyn)
}
static void
+dump_flags(struct flag_desc *desc, uint64_t val)
+{
+ struct flag_desc *fd;
+
+ for (fd = desc; fd->flag != 0; fd++) {
+ if (val & fd->flag) {
+ val &= ~fd->flag;
+ printf(" %s", fd->desc);
+ }
+ }
+ if (val != 0)
+ printf(" unknown (0x%jx)", (uintmax_t)val);
+}
+
+static struct flag_desc dt_flags[] = {
+ { DF_ORIGIN, "ORIGIN" },
+ { DF_SYMBOLIC, "SYMBOLIC" },
+ { DF_TEXTREL, "TEXTREL" },
+ { DF_BIND_NOW, "BIND_NOW" },
+ { DF_STATIC_TLS, "STATIC_TLS" },
+ { 0, NULL }
+};
+
+static struct flag_desc dt_flags_1[] = {
+ { DF_1_BIND_NOW, "NOW" },
+ { DF_1_GLOBAL, "GLOBAL" },
+ { 0x4, "GROUP" },
+ { DF_1_NODELETE, "NODELETE" },
+ { DF_1_LOADFLTR, "LOADFLTR" },
+ { 0x20, "INITFIRST" },
+ { DF_1_NOOPEN, "NOOPEN" },
+ { DF_1_ORIGIN, "ORIGIN" },
+ { 0x100, "DIRECT" },
+ { DF_1_INTERPOSE, "INTERPOSE" },
+ { DF_1_NODEFLIB, "NODEFLIB" },
+ { 0x1000, "NODUMP" },
+ { 0x2000, "CONFALT" },
+ { 0x4000, "ENDFILTEE" },
+ { 0x8000, "DISPRELDNE" },
+ { 0x10000, "DISPRELPND" },
+ { 0x20000, "NODIRECT" },
+ { 0x40000, "IGNMULDEF" },
+ { 0x80000, "NOKSYMS" },
+ { 0x100000, "NOHDR" },
+ { 0x200000, "EDITED" },
+ { 0x400000, "NORELOC" },
+ { 0x800000, "SYMINTPOSE" },
+ { 0x1000000, "GLOBAUDIT" },
+ { 0, NULL }
+};
+
+static void
dump_dyn_val(struct readelf *re, GElf_Dyn *dyn, uint32_t stab)
{
const char *name;
@@ -2804,6 +2864,12 @@ dump_dyn_val(struct readelf *re, GElf_Dyn *dyn, uint32
case DT_GNU_PRELINKED:
printf(" %s\n", timestamp(dyn->d_un.d_val));
break;
+ case DT_FLAGS:
+ dump_flags(dt_flags, dyn->d_un.d_val);
+ break;
+ case DT_FLAGS_1:
+ dump_flags(dt_flags_1, dyn->d_un.d_val);
+ break;
default:
printf("\n");
}
@@ -3422,7 +3488,54 @@ dump_notes(struct readelf *re)
}
}
+static struct flag_desc note_feature_ctl_flags[] = {
+ { NT_FREEBSD_FCTL_ASLR_DISABLE, "ASLR_DISABLE" },
+ { 0, NULL }
+};
+
static void
+dump_notes_data(const char *name, uint32_t type, const char *buf, size_t sz)
+{
+ size_t i;
+ const uint32_t *ubuf;
+
+ /* Note data is at least 4-byte aligned. */
+ if (((uintptr_t)buf & 3) != 0) {
+ warnx("bad note data alignment");
+ goto unknown;
+ }
+ ubuf = (const uint32_t *)(const void *)buf;
+
+ if (strcmp(name, "FreeBSD") == 0) {
+ switch (type) {
+ case NT_FREEBSD_ABI_TAG:
+ if (sz != 4)
+ goto unknown;
+ printf(" ABI tag: %u\n", ubuf[0]);
+ return;
+ /* NT_FREEBSD_NOINIT_TAG carries no data, treat as unknown. */
+ case NT_FREEBSD_ARCH_TAG:
+ if (sz != 4)
+ goto unknown;
+ printf(" Arch tag: %x\n", ubuf[0]);
+ return;
+ case NT_FREEBSD_FEATURE_CTL:
+ if (sz != 4)
+ goto unknown;
+ printf(" Features:");
+ dump_flags(note_feature_ctl_flags, ubuf[0]);
+ printf("\n");
+ return;
+ }
+ }
+unknown:
+ printf(" description data:");
+ for (i = 0; i < sz; i++)
+ printf(" %02x", (unsigned char)buf[i]);
+ printf("\n");
+}
+
+static void
dump_notes_content(struct readelf *re, const char *buf, size_t sz, off_t off)
{
Elf_Note *note;
@@ -3438,7 +3551,9 @@ dump_notes_content(struct readelf *re, const char *buf
return;
}
note = (Elf_Note *)(uintptr_t) buf;
- name = (char *)(uintptr_t)(note + 1);
+ buf += sizeof(Elf_Note);
+ name = buf;
+ buf += roundup2(note->n_namesz, 4);
/*
* The name field is required to be nul-terminated, and
* n_namesz includes the terminating nul in observed
@@ -3456,8 +3571,8 @@ dump_notes_content(struct readelf *re, const char *buf
printf(" %-13s %#010jx", name, (uintmax_t) note->n_descsz);
printf(" %s\n", note_type(name, re->ehdr.e_type,
note->n_type));
- buf += sizeof(Elf_Note) + roundup2(note->n_namesz, 4) +
- roundup2(note->n_descsz, 4);
+ dump_notes_data(name, note->n_type, buf, note->n_descsz);
+ buf += roundup2(note->n_descsz, 4);
}
}
Modified: projects/clang800-import/contrib/ipfilter/arc4random.c
==============================================================================
--- projects/clang800-import/contrib/ipfilter/arc4random.c Sun Feb 3 11:07:40 2019 (r343711)
+++ projects/clang800-import/contrib/ipfilter/arc4random.c Sun Feb 3 11:41:43 2019 (r343712)
@@ -7,7 +7,7 @@
*
* Dan Moschuk
*/
-#if !defined(SOLARIS2) && !defined(__osf__)
+#if !defined(SOLARIS2)
# include <sys/cdefs.h>
#endif
@@ -16,26 +16,16 @@
#ifdef __FreeBSD__
# include <sys/kernel.h>
#endif
-#if !defined(__osf__)
# include <sys/random.h>
-#endif
#ifdef __FreeBSD__
# include <sys/libkern.h>
#endif
#include <sys/lock.h>
-#ifndef __osf__
# include <sys/mutex.h>
-#endif
#include <sys/time.h>
-#if defined(SOLARIS2) && (SOLARIS2 < 9)
-# include <netinet/in_systm.h>
-#endif
#include <sys/socket.h>
#include <net/if.h>
-#ifdef __osf__
-# include <net/route.h>
-#endif
#include <netinet/in.h>
#include <netinet/ip.h>
#include "netinet/ip_compat.h"
Modified: projects/clang800-import/contrib/ipfilter/ip_dstlist.c
==============================================================================
--- projects/clang800-import/contrib/ipfilter/ip_dstlist.c Sun Feb 3 11:07:40 2019 (r343711)
+++ projects/clang800-import/contrib/ipfilter/ip_dstlist.c Sun Feb 3 11:41:43 2019 (r343712)
@@ -9,9 +9,6 @@
# define KERNEL 1
# define _KERNEL 1
#endif
-#if defined(__osf__)
-# define _PROTO_NET_H_
-#endif
#include <sys/errno.h>
#include <sys/types.h>
#include <sys/param.h>
@@ -21,9 +18,6 @@
# include <stdlib.h>
# include <string.h>
# define _KERNEL
-# ifdef __OpenBSD__
-struct file;
-# endif
# include <sys/uio.h>
# undef _KERNEL
#else
@@ -33,14 +27,12 @@ struct file;
# endif
#endif
#include <sys/time.h>
-#if !defined(linux)
# include <sys/protosw.h>
-#endif
#include <sys/socket.h>
-#if defined(_KERNEL) && (!defined(__SVR4) && !defined(__svr4__))
+#if defined(_KERNEL) && !defined(__SVR4)
# include <sys/mbuf.h>
#endif
-#if defined(__SVR4) || defined(__svr4__)
+#if defined(__SVR4)
# include <sys/filio.h>
# include <sys/byteorder.h>
# ifdef _KERNEL
@@ -49,7 +41,7 @@ struct file;
# include <sys/stream.h>
# include <sys/kmem.h>
#endif
-#if defined(__FreeBSD_version) && (__FreeBSD_version >= 300000)
+#if defined(__FreeBSD_version)
# include <sys/malloc.h>
#endif
Modified: projects/clang800-import/contrib/ipfilter/ip_fil.c
==============================================================================
--- projects/clang800-import/contrib/ipfilter/ip_fil.c Sun Feb 3 11:07:40 2019 (r343711)
+++ projects/clang800-import/contrib/ipfilter/ip_fil.c Sun Feb 3 11:41:43 2019 (r343712)
@@ -25,24 +25,10 @@ struct rtentry;
static void ipf_setifpaddr __P((struct ifnet *, char *));
void init_ifp __P((void));
-#if defined(__sgi) && (IRIX < 60500)
static int no_output __P((struct ifnet *, struct mbuf *,
- struct sockaddr *));
-static int write_output __P((struct ifnet *, struct mbuf *,
- struct sockaddr *));
-#else
-# if TRU64 >= 1885
-static int no_output __P((struct ifnet *, struct mbuf *,
- struct sockaddr *, struct rtentry *, char *));
-static int write_output __P((struct ifnet *, struct mbuf *,
- struct sockaddr *, struct rtentry *, char *));
-# else
-static int no_output __P((struct ifnet *, struct mbuf *,
struct sockaddr *, struct rtentry *));
static int write_output __P((struct ifnet *, struct mbuf *,
struct sockaddr *, struct rtentry *));
-# endif
-#endif
struct ifaddr {
struct sockaddr_storage ifa_addr;
@@ -123,17 +109,8 @@ ipf_forgetifp(softc, ifp)
static int
-#if defined(__sgi) && (IRIX < 60500)
-no_output(ifp, m, s)
-#else
-# if TRU64 >= 1885
-no_output (ifp, m, s, rt, cp)
- char *cp;
-# else
no_output(ifp, m, s, rt)
-# endif
struct rtentry *rt;
-#endif
struct ifnet *ifp;
struct mbuf *m;
struct sockaddr *s;
@@ -143,17 +120,8 @@ no_output(ifp, m, s, rt)
static int
-#if defined(__sgi) && (IRIX < 60500)
-write_output(ifp, m, s)
-#else
-# if TRU64 >= 1885
-write_output (ifp, m, s, rt, cp)
- char *cp;
-# else
write_output(ifp, m, s, rt)
-# endif
struct rtentry *rt;
-#endif
struct ifnet *ifp;
struct mbuf *m;
struct sockaddr *s;
@@ -167,8 +135,7 @@ write_output(ifp, m, s, rt)
ip = MTOD(mb, ip_t *);
#if (defined(NetBSD) && (NetBSD <= 1991011) && (NetBSD >= 199606)) || \
- (defined(OpenBSD) && (OpenBSD >= 199603)) || defined(linux) || \
- (defined(__FreeBSD__) && (__FreeBSD_version >= 501113))
+ defined(__FreeBSD__)
sprintf(fname, "/tmp/%s", ifp->if_xname);
#else
sprintf(fname, "/tmp/%s%d", ifp->if_name, ifp->if_unit);
@@ -189,42 +156,26 @@ ipf_setifpaddr(ifp, addr)
struct ifnet *ifp;
char *addr;
{
-#ifdef __sgi
- struct in_ifaddr *ifa;
-#else
struct ifaddr *ifa;
-#endif
-#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__)
+#if defined(__NetBSD__) || defined(__FreeBSD__)
if (ifp->if_addrlist.tqh_first != NULL)
#else
-# ifdef __sgi
- if (ifp->in_ifaddr != NULL)
-# else
if (ifp->if_addrlist != NULL)
-# endif
#endif
return;
ifa = (struct ifaddr *)malloc(sizeof(*ifa));
-#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__)
+#if defined(__NetBSD__) || defined(__FreeBSD__)
ifp->if_addrlist.tqh_first = ifa;
#else
-# ifdef __sgi
- ifp->in_ifaddr = ifa;
-# else
ifp->if_addrlist = ifa;
-# endif
#endif
if (ifa != NULL) {
struct sockaddr_in *sin;
-#ifdef __sgi
- sin = (struct sockaddr_in *)&ifa->ia_addr;
-#else
sin = (struct sockaddr_in *)&ifa->ifa_addr;
-#endif
#ifdef USE_INET6
if (index(addr, ':') != NULL) {
struct sockaddr_in6 *sin6;
@@ -263,8 +214,7 @@ get_unit(name, family)
struct ifnet *ifp, **ifpp, **old_ifneta;
char *addr;
#if (defined(NetBSD) && (NetBSD <= 1991011) && (NetBSD >= 199606)) || \
- (defined(OpenBSD) && (OpenBSD >= 199603)) || defined(linux) || \
- (defined(__FreeBSD__) && (__FreeBSD_version >= 501113))
+ defined(__FreeBSD__)
if (!*name)
return NULL;
@@ -333,12 +283,11 @@ get_unit(name, family)
}
ifp = ifneta[nifs - 1];
-#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__)
+#if defined(__NetBSD__) || defined(__FreeBSD__)
TAILQ_INIT(&ifp->if_addrlist);
#endif
#if (defined(NetBSD) && (NetBSD <= 1991011) && (NetBSD >= 199606)) || \
- (defined(OpenBSD) && (OpenBSD >= 199603)) || defined(linux) || \
- (defined(__FreeBSD__) && (__FreeBSD_version >= 501113))
+ defined(__FreeBSD__)
(void) strncpy(ifp->if_xname, name, sizeof(ifp->if_xname));
#else
s = name + strlen(name) - 1;
@@ -375,8 +324,7 @@ get_ifname(ifp)
{
static char ifname[LIFNAMSIZ];
-#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(linux) || \
- (defined(__FreeBSD__) && (__FreeBSD_version >= 501113))
+#if defined(__NetBSD__) || defined(__FreeBSD__)
sprintf(ifname, "%s", ifp->if_xname);
#else
if (ifp->if_unit != -1)
@@ -397,8 +345,7 @@ init_ifp()
int fd;
#if (defined(NetBSD) && (NetBSD <= 1991011) && (NetBSD >= 199606)) || \
- (defined(OpenBSD) && (OpenBSD >= 199603)) || defined(linux) || \
- (defined(__FreeBSD__) && (__FreeBSD_version >= 501113))
+ defined(__FreeBSD__)
for (ifpp = ifneta; ifpp && (ifp = *ifpp); ifpp++) {
ifp->if_output = (void *)write_output;
sprintf(fname, "/tmp/%s", ifp->if_xname);
@@ -717,20 +664,12 @@ ipf_ifpaddr(softc, v, atype, ifptr, inp, inpmask)
i6addr_t *inp, *inpmask;
{
struct ifnet *ifp = ifptr;
-#ifdef __sgi
- struct in_ifaddr *ifa;
-#else
struct ifaddr *ifa;
-#endif
-#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__)
+#if defined(__NetBSD__) || defined(__FreeBSD__)
ifa = ifp->if_addrlist.tqh_first;
#else
-# ifdef __sgi
- ifa = (struct in_ifaddr *)ifp->in_ifaddr;
-# else
ifa = ifp->if_addrlist;
-# endif
#endif
if (ifa != NULL) {
if (v == 4) {
@@ -738,11 +677,7 @@ ipf_ifpaddr(softc, v, atype, ifptr, inp, inpmask)
mask.sin_addr.s_addr = 0xffffffff;
-#ifdef __sgi
- sin = (struct sockaddr_in *)&ifa->ia_addr;
-#else
sin = (struct sockaddr_in *)&ifa->ifa_addr;
-#endif
return ipf_ifpfillv4addr(atype, sin, &mask,
&inp->in4, &inpmask->in4);
Modified: projects/clang800-import/contrib/ipfilter/ip_fil_compat.c
==============================================================================
--- projects/clang800-import/contrib/ipfilter/ip_fil_compat.c Sun Feb 3 11:07:40 2019 (r343711)
+++ projects/clang800-import/contrib/ipfilter/ip_fil_compat.c Sun Feb 3 11:41:43 2019 (r343712)
@@ -9,15 +9,12 @@
# define KERNEL 1
# define _KERNEL 1
#endif
-#if defined(__osf__)
-# define _PROTO_NET_H_
-#endif
#include <sys/param.h>
#include <sys/errno.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/file.h>
-#if __FreeBSD_version >= 220000 && defined(_KERNEL)
+#if defined(__FreeBSD_version) && defined(_KERNEL)
# include <sys/fcntl.h>
# include <sys/filio.h>
#else
@@ -26,17 +23,10 @@
#if !defined(_KERNEL)
# include <string.h>
# define _KERNEL
-# ifdef __OpenBSD__
-struct file;
-# endif
# include <sys/uio.h>
# undef _KERNEL
#endif
#include <sys/socket.h>
-#if (defined(__osf__) || defined(AIX) || defined(__hpux) || defined(__sgi)) && defined(_KERNEL)
-# include "radix_ipf_local.h"
-# define _RADIX_H_
-#endif
#include <net/if.h>
#if defined(__FreeBSD__)
# include <sys/cdefs.h>
@@ -44,7 +34,7 @@ struct file;
#endif
#if defined(_KERNEL)
# include <sys/systm.h>
-# if !defined(__SVR4) && !defined(__svr4__)
+# if !defined(__SVR4)
# include <sys/mbuf.h>
# endif
#endif
@@ -348,9 +338,6 @@ typedef struct fr_info_4_1_32 {
void *fin_qpi;
char fin_ifname[LIFNAMSIZ];
#endif
-#ifdef __sgi
- void *fin_hbuf;
-#endif
} fr_info_4_1_32_t;
typedef struct fr_info_4_1_24 {
@@ -389,9 +376,6 @@ typedef struct fr_info_4_1_24 {
void *fin_qpi;
char fin_ifname[LIFNAMSIZ];
#endif
-#ifdef __sgi
- void *fin_hbuf;
-#endif
} fr_info_4_1_24_t;
typedef struct fr_info_4_1_23 {
@@ -429,9 +413,6 @@ typedef struct fr_info_4_1_23 {
void *fin_qpi;
char fin_ifname[LIFNAMSIZ];
#endif
-#ifdef __sgi
- void *fin_hbuf;
-#endif
} fr_info_4_1_23_t;
typedef struct fr_info_4_1_11 {
@@ -468,9 +449,6 @@ typedef struct fr_info_4_1_11 {
void *fin_qpi;
char fin_ifname[LIFNAMSIZ];
#endif
-#ifdef __sgi
- void *fin_hbuf;
-#endif
} fr_info_4_1_11_t;
/* ------------------------------------------------------------------------ */
@@ -2678,9 +2656,6 @@ fr_info_4_1_32_to_current(old, current)
fin->fin_qfm = old->fin_qfm;
fin->fin_qpi = old->fin_qpi;
#endif
-#ifdef __sgi
- fin->fin_hbuf = old->fin_hbuf;
-#endif
}
@@ -2719,9 +2694,6 @@ fr_info_4_1_24_to_current(old, current)
fin->fin_qfm = old->fin_qfm;
fin->fin_qpi = old->fin_qpi;
#endif
-#ifdef __sgi
- fin->fin_hbuf = old->fin_hbuf;
-#endif
}
@@ -2759,9 +2731,6 @@ fr_info_4_1_23_to_current(old, current)
fin->fin_qfm = old->fin_qfm;
fin->fin_qpi = old->fin_qpi;
#endif
-#ifdef __sgi
- fin->fin_hbuf = fin->fin_hbuf;
-#endif
}
@@ -2799,9 +2768,6 @@ fr_info_4_1_11_to_current(old, current)
fin->fin_qfm = old->fin_qfm;
fin->fin_qpi = old->fin_qpi;
#endif
-#ifdef __sgi
- fin->fin_hbuf = fin->fin_hbuf;
-#endif
}
@@ -4078,9 +4044,6 @@ fr_info_current_to_4_1_24(current, old)
old->fin_qpi = fin->fin_qpi;
old->fin_ifname[0] = '\0';
#endif
-#ifdef __sgi
- old->fin_hbuf = fin->fin_hbuf;
-#endif
}
@@ -4121,9 +4084,6 @@ fr_info_current_to_4_1_23(current, old)
old->fin_qpi = fin->fin_qpi;
old->fin_ifname[0] = '\0';
#endif
-#ifdef __sgi
- old->fin_hbuf = fin->fin_hbuf;
-#endif
}
@@ -4163,9 +4123,6 @@ fr_info_current_to_4_1_11(current, old)
old->fin_qfm = fin->fin_qfm;
old->fin_qpi = fin->fin_qpi;
old->fin_ifname[0] = '\0';
-#endif
-#ifdef __sgi
- old->fin_hbuf = fin->fin_hbuf;
#endif
}
Modified: projects/clang800-import/contrib/ipfilter/ipf.h
==============================================================================
--- projects/clang800-import/contrib/ipfilter/ipf.h Sun Feb 3 11:07:40 2019 (r343711)
+++ projects/clang800-import/contrib/ipfilter/ipf.h Sun Feb 3 11:41:43 2019 (r343712)
@@ -12,11 +12,6 @@
#ifndef __IPF_H__
#define __IPF_H__
-#if defined(__osf__)
-# define radix_mask ipf_radix_mask
-# define radix_node ipf_radix_node
-# define radix_node_head ipf_radix_node_head
-#endif
#include <sys/param.h>
#include <sys/types.h>
@@ -31,9 +26,6 @@
# define _KERNEL
# define KERNEL
#endif
-#ifdef __OpenBSD__
-struct file;
-#endif
#include <sys/uio.h>
#ifdef ADD_KERNEL
# undef _KERNEL
@@ -188,9 +180,8 @@ typedef struct proxyrule {
} proxyrule_t;
-#if defined(__NetBSD__) || defined(__OpenBSD__) || \
- (_BSDI_VERSION >= 199701) || (__FreeBSD_version >= 300000) || \
- SOLARIS || defined(__sgi) || defined(__osf__) || defined(linux)
+#if defined(__NetBSD__) || defined(__FreeBSD_version) || \
+ SOLARIS
# include <stdarg.h>
typedef int (* ioctlfunc_t) __P((int, ioctlcmd_t, ...));
#else
@@ -199,13 +190,6 @@ typedef int (* ioctlfunc_t) __P((dev_t, ioctlcmd_t, vo
typedef int (* addfunc_t) __P((int, ioctlfunc_t, void *));
typedef int (* copyfunc_t) __P((void *, void *, size_t));
-
-/*
- * SunOS4
- */
-#if defined(sun) && !defined(__SVR4) && !defined(__svr4__)
-extern int ioctl __P((int, int, void *));
-#endif
extern char thishost[];
extern char flagset[];
Modified: projects/clang800-import/contrib/ipfilter/ipsend/44arp.c
==============================================================================
--- projects/clang800-import/contrib/ipfilter/ipsend/44arp.c Sun Feb 3 11:07:40 2019 (r343711)
+++ projects/clang800-import/contrib/ipfilter/ipsend/44arp.c Sun Feb 3 11:41:43 2019 (r343712)
@@ -10,9 +10,7 @@
#include <net/if.h>
#include <net/if_dl.h>
#include <net/if_types.h>
-#ifndef __osf__
# include <net/route.h>
-#endif
#include <netinet/in.h>
#include <netinet/if_ether.h>
#include <arpa/inet.h>
Modified: projects/clang800-import/contrib/ipfilter/ipsend/arp.c
==============================================================================
--- projects/clang800-import/contrib/ipfilter/ipsend/arp.c Sun Feb 3 11:07:40 2019 (r343711)
+++ projects/clang800-import/contrib/ipfilter/ipsend/arp.c Sun Feb 3 11:41:43 2019 (r343712)
@@ -88,7 +88,6 @@ int arp(ip, ether)
sin = (struct sockaddr_in *)&ar.arp_pa;
sin->sin_family = AF_INET;
bcopy(ip, (char *)&sin->sin_addr.s_addr, 4);
-#ifndef hpux
if ((hp = gethostbyaddr(ip, 4, AF_INET)))
# if SOLARIS && (SOLARIS2 >= 10)
if (!(ether_hostton(hp->h_name, (struct ether_addr *)ether)))
@@ -96,7 +95,6 @@ int arp(ip, ether)
if (!(ether_hostton(hp->h_name, ether)))
# endif
goto savearp;
-#endif
if (sfd == -1)
if ((sfd = socket(AF_INET, SOCK_DGRAM, 0)) == -1)
Modified: projects/clang800-import/contrib/ipfilter/ipsend/dlcommon.c
==============================================================================
--- projects/clang800-import/contrib/ipfilter/ipsend/dlcommon.c Sun Feb 3 11:07:40 2019 (r343711)
+++ projects/clang800-import/contrib/ipfilter/ipsend/dlcommon.c Sun Feb 3 11:41:43 2019 (r343712)
@@ -20,11 +20,7 @@ typedef unsigned long ulong;
#include <sys/types.h>
#include <sys/stream.h>
#include <sys/stropts.h>
-#ifdef __osf__
-# include <sys/dlpihdr.h>
-#else
# include <sys/dlpi.h>
-#endif
#include <sys/signal.h>
#include <stdio.h>
#include <string.h>
Modified: projects/clang800-import/contrib/ipfilter/ipsend/ip.c
==============================================================================
--- projects/clang800-import/contrib/ipfilter/ipsend/ip.c Sun Feb 3 11:07:40 2019 (r343711)
+++ projects/clang800-import/contrib/ipfilter/ipsend/ip.c Sun Feb 3 11:41:43 2019 (r343712)
@@ -17,11 +17,9 @@ static const char rcsid[] = "@(#)$Id$";
#include <netinet/in.h>
#include <netinet/ip.h>
#include <sys/param.h>
-#ifndef linux
# include <net/route.h>
# include <netinet/if_ether.h>
# include <netinet/ip_var.h>
-#endif
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
Modified: projects/clang800-import/contrib/ipfilter/ipsend/ipresend.c
==============================================================================
--- projects/clang800-import/contrib/ipfilter/ipsend/ipresend.c Sun Feb 3 11:07:40 2019 (r343711)
+++ projects/clang800-import/contrib/ipfilter/ipsend/ipresend.c Sun Feb 3 11:41:43 2019 (r343712)
@@ -18,9 +18,7 @@ static const char rcsid[] = "@(#)$Id$";
#include <arpa/inet.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
-#ifndef linux
#include <netinet/ip_var.h>
-#endif
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -37,9 +35,6 @@ extern struct ipread pcap, iphex, iptext;
int opts = 0;
#ifndef DEFAULT_DEVICE
-# ifdef linux
-char default_device[] = "eth0";
-# else
# ifdef sun
char default_device[] = "le0";
# else
@@ -49,15 +44,10 @@ char default_device[] = "ln0";
# ifdef __bsdi__
char default_device[] = "ef0";
# else
-# ifdef __sgi
-char default_device[] = "ec0";
-# else
char default_device[] = "lan0";
-# endif
# endif
# endif
# endif
-# endif
#else
char default_device[] = DEFAULT_DEVICE;
#endif
Modified: projects/clang800-import/contrib/ipfilter/ipsend/ipsend.c
==============================================================================
--- projects/clang800-import/contrib/ipfilter/ipsend/ipsend.c Sun Feb 3 11:07:40 2019 (r343711)
+++ projects/clang800-import/contrib/ipfilter/ipsend/ipsend.c Sun Feb 3 11:41:43 2019 (r343712)
@@ -21,14 +21,10 @@ static const char rcsid[] = "@(#)$Id$";
#include <netdb.h>
#include <string.h>
#include <netinet/ip.h>
-#ifndef linux
# include <netinet/ip_var.h>
-#endif
#include "ipsend.h"
#include "ipf.h"
-#ifndef linux
# include <netinet/udp_var.h>
-#endif
extern char *optarg;
@@ -37,27 +33,15 @@ extern void iplang __P((FILE *));
char options[68];
int opts;
-#ifdef linux
-char default_device[] = "eth0";
-#else
# ifdef ultrix
char default_device[] = "ln0";
# else
# ifdef __bsdi__
char default_device[] = "ef0";
# else
-# ifdef __sgi
-char default_device[] = "ec0";
-# else
-# ifdef __hpux
-char default_device[] = "lan0";
-# else
char default_device[] = "le0";
-# endif /* __hpux */
-# endif /* __sgi */
# endif /* __bsdi__ */
# endif /* ultrix */
-#endif /* linux */
static void usage __P((char *));
Modified: projects/clang800-import/contrib/ipfilter/ipsend/ipsend.h
==============================================================================
--- projects/clang800-import/contrib/ipfilter/ipsend/ipsend.h Sun Feb 3 11:07:40 2019 (r343711)
+++ projects/clang800-import/contrib/ipfilter/ipsend/ipsend.h Sun Feb 3 11:41:43 2019 (r343712)
@@ -26,9 +26,6 @@
#include <net/if.h>
#include "ipf.h"
-#ifdef linux
-#include <linux/sockios.h>
-#endif
/* XXX: The following is needed by tcpip.h */
#include <netinet/ip_var.h>
#include "netinet/tcpip.h"
@@ -49,11 +46,7 @@ extern u_32_t buildopts __P((char *, char *, int));
extern int addipopt __P((char *, struct ipopt_names *, int, char *));
extern int initdevice __P((char *, int));
extern int sendip __P((int, char *, int));
-#ifdef linux
-extern struct sock *find_tcp __P((int, struct tcpiphdr *));
-#else
extern struct tcpcb *find_tcp __P((int, struct tcpiphdr *));
-#endif
extern int ip_resend __P((char *, int, struct ipread *, struct in_addr, char *));
extern void ip_test1 __P((char *, int, ip_t *, struct in_addr, int));
Modified: projects/clang800-import/contrib/ipfilter/ipsend/ipsopt.c
==============================================================================
--- projects/clang800-import/contrib/ipfilter/ipsend/ipsopt.c Sun Feb 3 11:07:40 2019 (r343711)
+++ projects/clang800-import/contrib/ipfilter/ipsend/ipsopt.c Sun Feb 3 11:41:43 2019 (r343712)
@@ -20,9 +20,7 @@ static const char rcsid[] = "@(#)$Id$";
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
-#ifndef linux
#include <netinet/ip_var.h>
-#endif
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include "ipsend.h"
Modified: projects/clang800-import/contrib/ipfilter/ipsend/iptest.c
==============================================================================
--- projects/clang800-import/contrib/ipfilter/ipsend/iptest.c Sun Feb 3 11:07:40 2019 (r343711)
+++ projects/clang800-import/contrib/ipfilter/ipsend/iptest.c Sun Feb 3 11:41:43 2019 (r343712)
@@ -18,12 +18,7 @@ static const char rcsid[] = "@(#)$Id$";
#include <arpa/inet.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
-#ifndef linux
#include <netinet/ip_var.h>
-#endif
-#ifdef linux
-#include <linux/sockios.h>
-#endif
#include <stdio.h>
#include <netdb.h>
#include <unistd.h>
@@ -36,9 +31,6 @@ extern char *optarg;
extern int optind;
char options[68];
-#ifdef linux
-char default_device[] = "eth0";
-#else
# ifdef sun
char default_device[] = "le0";
# else
@@ -48,15 +40,10 @@ char default_device[] = "ln0";
# ifdef __bsdi__
char default_device[] = "ef0";
# else
-# ifdef __sgi
-char default_device[] = "ec0";
-# else
char default_device[] = "lan0";
-# endif
# endif
# endif
# endif
-#endif
static void usage __P((char *));
int main __P((int, char **));
Modified: projects/clang800-import/contrib/ipfilter/ipsend/iptests.c
==============================================================================
--- projects/clang800-import/contrib/ipfilter/ipsend/iptests.c Sun Feb 3 11:07:40 2019 (r343711)
+++ projects/clang800-import/contrib/ipfilter/ipsend/iptests.c Sun Feb 3 11:41:43 2019 (r343712)
@@ -21,7 +21,6 @@ static const char rcsid[] = "@(#)$Id$";
typedef int boolean_t;
#endif
#include <sys/time.h>
-#if !defined(__osf__)
# ifdef __NetBSD__
# include <machine/lock.h>
# include <machine/mutex.h>
@@ -37,7 +36,6 @@ typedef int boolean_t;
# endif
# undef _KERNEL
# undef KERNEL
-#endif
#if !defined(solaris) && !defined(linux) && !defined(__sgi)
# include <nlist.h>
# include <sys/user.h>
@@ -66,24 +64,13 @@ typedef int boolean_t;
#endif
#include <netinet/in_systm.h>
#include <sys/socket.h>
-#ifdef __hpux
-# define _NET_ROUTE_INCLUDED
-#endif
#include <net/if.h>
-#if defined(linux) && (LINUX >= 0200)
-# include <asm/atomic.h>
-#endif
-#if !defined(linux)
# if defined(__FreeBSD__)
# include "radix_ipf.h"
# endif
# if !defined(solaris)
# include <net/route.h>
# endif
-#else
-# define __KERNEL__ /* because there's a macro not wrapped by this */
-# include <net/route.h> /* in this file :-/ */
-#endif
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netinet/ip.h>
@@ -94,20 +81,13 @@ typedef int boolean_t;
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
-#ifdef __hpux
-# undef _NET_ROUTE_INCLUDED
-#endif
-#if !defined(linux)
# include <netinet/ip_var.h>
# if !defined(__hpux) && !defined(solaris)
# include <netinet/in_pcb.h>
# endif
-#endif
#include "ipsend.h"
-#if !defined(linux) && !defined(__hpux)
# include <netinet/tcp_timer.h>
# include <netinet/tcp_var.h>
-#endif
#if defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 106000000)
# define USE_NANOSLEEP
#endif
@@ -951,9 +931,7 @@ void ip_test5(dev, mtu, ip, gwip, ptest)
int nfd, i;
t = (tcphdr_t *)((char *)ip + (IP_HL(ip) << 2));
-#if !defined(linux) && !defined(__osf__)
t->th_x2 = 0;
-#endif
TCP_OFF_A(t, 0);
t->th_sport = htons(1);
t->th_dport = htons(1);
Modified: projects/clang800-import/contrib/ipfilter/ipsend/resend.c
==============================================================================
--- projects/clang800-import/contrib/ipfilter/ipsend/resend.c Sun Feb 3 11:07:40 2019 (r343711)
+++ projects/clang800-import/contrib/ipfilter/ipsend/resend.c Sun Feb 3 11:41:43 2019 (r343712)
@@ -19,10 +19,8 @@ static const char rcsid[] = "@(#)$Id$";
#include <arpa/inet.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
-#ifndef linux
# include <netinet/ip_var.h>
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-projects
mailing list