pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
compiler-rt-netbsd: Start splitting posix and netbsd code
Module Name: pkgsrc-wip
Committed By: Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By: kamil
Date: Sun Aug 27 08:19:30 2017 +0200
Changeset: 4c937dc0ac2801bd12e840d780eb1797a2bd6b17
Modified Files:
compiler-rt-netbsd/distinfo
compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__interceptors.h
compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc
compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h
Log Message:
compiler-rt-netbsd: Start splitting posix and netbsd code
On demand from upstream split NetBSD from sanitizer_platform_limits_posix.h.
Part 3.
Sponsored by <The NetBSD Foundation>
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=4c937dc0ac2801bd12e840d780eb1797a2bd6b17
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
compiler-rt-netbsd/distinfo | 6 +-
...zer__common_sanitizer__platform__interceptors.h | 10 +-
...__common_sanitizer__platform__limits__netbsd.cc | 369 ++++----
...r__common_sanitizer__platform__limits__netbsd.h | 966 ++++++++++-----------
4 files changed, 675 insertions(+), 676 deletions(-)
diffs:
diff --git a/compiler-rt-netbsd/distinfo b/compiler-rt-netbsd/distinfo
index 832716b0e2..77d8b453ba 100644
--- a/compiler-rt-netbsd/distinfo
+++ b/compiler-rt-netbsd/distinfo
@@ -21,9 +21,9 @@ SHA1 (patch-lib_fuzzer_FuzzerUtilLinux.cpp) = 30e0ead2deb98ac0a7f67403c47044ef6e
SHA1 (patch-lib_fuzzer_afl_afl__driver.cpp) = a114e28152558b7147d0931eb638109c3d2f32a2
SHA1 (patch-lib_fuzzer_tests_CMakeLists.txt) = eaffd9f8f2621ad465b5c734a764bdff0243af3d
SHA1 (patch-lib_sanitizer__common_CMakeLists.txt) = 41b67281e9c9498c0be923f8aca05e93ef92db35
-SHA1 (patch-lib_sanitizer__common_sanitizer__platform__interceptors.h) = 5cfe5b2217deb84703c6385c11a243b15b035256
-SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc) = 04812bc64ed53e6e1da764b70678d85252c28d5a
-SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h) = 89ce6c77523b479fda2a52ba65e1513dc048f6db
+SHA1 (patch-lib_sanitizer__common_sanitizer__platform__interceptors.h) = f179544393a9a884ab669c10f323539f80d8efad
+SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc) = 9c6d240b07b928e898408312624562fa26a26144
+SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h) = a72bc2b9e2ff38091f77a38a2f78d68e1d446900
SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h) = 86d872c585bfde552276a5f3e3d198338663bafd
SHA1 (patch-lib_sanitizer__common_sanitizer__posix.h) = e3c6e3f438dbc0911ec54f24bb5a325afe07fbe1
SHA1 (patch-lib_sanitizer__common_sanitizer__posix__libcdep.cc) = 24be4a422f108c24fd095ef725a3b3b582553e66
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__interceptors.h b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__interceptors.h
index bfbda48c7b..0a7139642f 100644
--- a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__interceptors.h
+++ b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__interceptors.h
@@ -7,11 +7,11 @@ $NetBSD$
#if SI_POSIX
-# include "sanitizer_platform_limits_posix.h"
-+# if SANITIZER_NETBSD
-+# include "sanitizer_platform_limits_netbsd.h"
-+# else
-+# include "sanitizer_platform_limits_posix.h"
-+# endif
++#if SANITIZER_NETBSD
++#include "sanitizer_platform_limits_netbsd.h"
++#else
++#include "sanitizer_platform_limits_posix.h"
++#endif
#endif
#if SANITIZER_LINUX && !SANITIZER_ANDROID
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc
index f928d1444f..7d7939de06 100644
--- a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc
+++ b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc
@@ -1,8 +1,8 @@
$NetBSD$
---- lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc.orig 2017-08-27 05:17:29.575199440 +0000
+--- lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc.orig 2017-08-27 06:19:05.500119741 +0000
+++ lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc
-@@ -0,0 +1,423 @@
+@@ -0,0 +1,422 @@
+//===-- sanitizer_platform_limits_posix.cc --------------------------------===//
+//
+// The LLVM Compiler Infrastructure
@@ -22,63 +22,62 @@ $NetBSD$
+#if SANITIZER_NETBSD
+#include <arpa/inet.h>
+#include <dirent.h>
++#include <glob.h>
+#include <grp.h>
+#include <limits.h>
++#include <link_elf.h>
+#include <net/if.h>
++#include <net/if_ether.h>
++#include <net/ppp_defs.h>
++#include <net/route.h>
+#include <netdb.h>
++#include <netinet/in.h>
++#include <netinet/ip_mroute.h>
+#include <poll.h>
+#include <pthread.h>
+#include <pwd.h>
+#include <signal.h>
+#include <stddef.h>
++#include <sys/filio.h>
++#include <sys/ipc.h>
+#include <sys/mman.h>
++#include <sys/mount.h>
++#include <sys/mount.h>
++#include <sys/mqueue.h>
++#include <sys/msg.h>
++#include <sys/mtio.h>
+#include <sys/resource.h>
++#include <sys/shm.h>
++#include <sys/signal.h>
+#include <sys/socket.h>
++#include <sys/socket.h>
++#include <sys/sockio.h>
++#include <sys/soundcard.h>
+#include <sys/stat.h>
++#include <sys/statvfs.h>
+#include <sys/time.h>
++#include <sys/timeb.h>
+#include <sys/times.h>
++#include <sys/timespec.h>
++#include <sys/timex.h>
+#include <sys/types.h>
+#include <sys/utsname.h>
++#include <term.h>
+#include <termios.h>
+#include <time.h>
-+#include <wchar.h>
+#include <utmp.h>
-+#include <net/route.h>
-+#include <sys/mount.h>
-+#include <sys/timeb.h>
+#include <utmpx.h>
-+# include <sys/mount.h>
-+# include <sys/sockio.h>
-+# include <sys/socket.h>
-+# include <sys/filio.h>
-+# include <sys/signal.h>
-+# include <sys/timespec.h>
-+# include <sys/timex.h>
-+# include <sys/mqueue.h>
-+# include <sys/msg.h>
-+# include <sys/ipc.h>
-+# include <sys/msg.h>
-+# include <sys/statvfs.h>
-+# include <sys/soundcard.h>
-+# include <sys/mtio.h>
-+# include <netinet/ip_mroute.h>
-+# include <netinet/in.h>
-+# include <net/ppp_defs.h>
-+# include <glob.h>
-+# include <term.h>
-+#include <link_elf.h>
-+#include <net/if_ether.h>
-+#include <sys/shm.h>
++#include <wchar.h>
+#define statfs statvfs
+#define d_ino d_fileno
+
+#undef IOC_DIRMASK
+
-+# include <utime.h>
-+# include <sys/ptrace.h>
-+# include <semaphore.h>
+#include <ifaddrs.h>
++#include <semaphore.h>
++#include <sys/ptrace.h>
+#include <sys/ucontext.h>
++#include <utime.h>
+#include <wordexp.h>
+
+// Include these after system headers to avoid name clashes and ambiguities.
@@ -86,173 +85,173 @@ $NetBSD$
+#include "sanitizer_platform_limits_posix.h"
+
+namespace __sanitizer {
-+ unsigned struct_utsname_sz = sizeof(struct utsname);
-+ unsigned struct_stat_sz = sizeof(struct stat);
-+ unsigned struct_rusage_sz = sizeof(struct rusage);
-+ unsigned struct_tm_sz = sizeof(struct tm);
-+ unsigned struct_passwd_sz = sizeof(struct passwd);
-+ unsigned struct_group_sz = sizeof(struct group);
-+ unsigned siginfo_t_sz = sizeof(siginfo_t);
-+ unsigned struct_sigaction_sz = sizeof(struct sigaction);
-+ unsigned struct_itimerval_sz = sizeof(struct itimerval);
-+ unsigned pthread_t_sz = sizeof(pthread_t);
-+ unsigned pthread_cond_t_sz = sizeof(pthread_cond_t);
-+ unsigned pid_t_sz = sizeof(pid_t);
-+ unsigned timeval_sz = sizeof(timeval);
-+ unsigned uid_t_sz = sizeof(uid_t);
-+ unsigned gid_t_sz = sizeof(gid_t);
-+ unsigned mbstate_t_sz = sizeof(mbstate_t);
-+ unsigned sigset_t_sz = sizeof(sigset_t);
-+ unsigned struct_timezone_sz = sizeof(struct timezone);
-+ unsigned struct_tms_sz = sizeof(struct tms);
-+ unsigned struct_sigevent_sz = sizeof(struct sigevent);
-+ unsigned struct_sched_param_sz = sizeof(struct sched_param);
-+ unsigned struct_statfs_sz = sizeof(struct statfs);
-+ unsigned struct_sockaddr_sz = sizeof(struct sockaddr);
-+ unsigned ucontext_t_sz = sizeof(ucontext_t);
-+ unsigned struct_rlimit_sz = sizeof(struct rlimit);
-+ unsigned struct_timespec_sz = sizeof(struct timespec);
-+ unsigned struct_utimbuf_sz = sizeof(struct utimbuf);
-+ unsigned struct_itimerspec_sz = sizeof(struct itimerspec);
-+ unsigned struct_timex_sz = sizeof(struct timex);
-+ unsigned struct_msqid_ds_sz = sizeof(struct msqid_ds);
-+ unsigned struct_mq_attr_sz = sizeof(struct mq_attr);
-+ unsigned struct_statvfs_sz = sizeof(struct statvfs);
-+
-+ uptr sig_ign = (uptr)SIG_IGN;
-+ uptr sig_dfl = (uptr)SIG_DFL;
-+ uptr sa_siginfo = (uptr)SA_SIGINFO;
-+
-+ unsigned struct_shminfo_sz = sizeof(struct shminfo);
++unsigned struct_utsname_sz = sizeof(struct utsname);
++unsigned struct_stat_sz = sizeof(struct stat);
++unsigned struct_rusage_sz = sizeof(struct rusage);
++unsigned struct_tm_sz = sizeof(struct tm);
++unsigned struct_passwd_sz = sizeof(struct passwd);
++unsigned struct_group_sz = sizeof(struct group);
++unsigned siginfo_t_sz = sizeof(siginfo_t);
++unsigned struct_sigaction_sz = sizeof(struct sigaction);
++unsigned struct_itimerval_sz = sizeof(struct itimerval);
++unsigned pthread_t_sz = sizeof(pthread_t);
++unsigned pthread_cond_t_sz = sizeof(pthread_cond_t);
++unsigned pid_t_sz = sizeof(pid_t);
++unsigned timeval_sz = sizeof(timeval);
++unsigned uid_t_sz = sizeof(uid_t);
++unsigned gid_t_sz = sizeof(gid_t);
++unsigned mbstate_t_sz = sizeof(mbstate_t);
++unsigned sigset_t_sz = sizeof(sigset_t);
++unsigned struct_timezone_sz = sizeof(struct timezone);
++unsigned struct_tms_sz = sizeof(struct tms);
++unsigned struct_sigevent_sz = sizeof(struct sigevent);
++unsigned struct_sched_param_sz = sizeof(struct sched_param);
++unsigned struct_statfs_sz = sizeof(struct statfs);
++unsigned struct_sockaddr_sz = sizeof(struct sockaddr);
++unsigned ucontext_t_sz = sizeof(ucontext_t);
++unsigned struct_rlimit_sz = sizeof(struct rlimit);
++unsigned struct_timespec_sz = sizeof(struct timespec);
++unsigned struct_utimbuf_sz = sizeof(struct utimbuf);
++unsigned struct_itimerspec_sz = sizeof(struct itimerspec);
++unsigned struct_timex_sz = sizeof(struct timex);
++unsigned struct_msqid_ds_sz = sizeof(struct msqid_ds);
++unsigned struct_mq_attr_sz = sizeof(struct mq_attr);
++unsigned struct_statvfs_sz = sizeof(struct statvfs);
++
++uptr sig_ign = (uptr)SIG_IGN;
++uptr sig_dfl = (uptr)SIG_DFL;
++uptr sa_siginfo = (uptr)SA_SIGINFO;
++
++unsigned struct_shminfo_sz = sizeof(struct shminfo);
+#define IPC_INFO -1
+#define SHM_INFO -1
+#define SHM_STAT -1
-+ unsigned struct_shm_info_sz = -1;
++unsigned struct_shm_info_sz = -1;
+#endif
-+ int shmctl_ipc_stat = (int)IPC_STAT;
-+ int shmctl_ipc_info = (int)IPC_INFO;
-+ int shmctl_shm_info = (int)SHM_INFO;
++int shmctl_ipc_stat = (int)IPC_STAT;
++int shmctl_ipc_info = (int)IPC_INFO;
++int shmctl_shm_info = (int)SHM_INFO;
+
+#endif
+
-+ unsigned struct_utmp_sz = sizeof(struct utmp);
-+ unsigned struct_utmpx_sz = sizeof(struct utmpx);
++unsigned struct_utmp_sz = sizeof(struct utmp);
++unsigned struct_utmpx_sz = sizeof(struct utmpx);
+
-+ int map_fixed = MAP_FIXED;
++int map_fixed = MAP_FIXED;
+
-+ int af_inet = (int)AF_INET;
-+ int af_inet6 = (int)AF_INET6;
++int af_inet = (int)AF_INET;
++int af_inet6 = (int)AF_INET6;
+
-+ uptr __sanitizer_in_addr_sz(int af) {
-+ if (af == AF_INET)
-+ return sizeof(struct in_addr);
-+ else if (af == AF_INET6)
-+ return sizeof(struct in6_addr);
-+ else
-+ return 0;
-+ }
++uptr __sanitizer_in_addr_sz(int af) {
++ if (af == AF_INET)
++ return sizeof(struct in_addr);
++ else if (af == AF_INET6)
++ return sizeof(struct in6_addr);
++ else
++ return 0;
++}
+
+int glob_nomatch = GLOB_NOMATCH;
+int glob_altdirfunc = GLOB_ALTDIRFUNC;
+
-+ unsigned path_max = PATH_MAX;
-+
-+ // ioctl arguments
-+ unsigned struct_ifreq_sz = sizeof(struct ifreq);
-+ unsigned struct_termios_sz = sizeof(struct termios);
-+ unsigned struct_winsize_sz = sizeof(struct winsize);
-+ unsigned struct_midi_info_sz = sizeof(struct midi_info);
-+ unsigned struct_mtget_sz = sizeof(struct mtget);
-+ unsigned struct_mtop_sz = sizeof(struct mtop);
-+ unsigned struct_sbi_instrument_sz = sizeof(struct sbi_instrument);
-+ unsigned struct_seq_event_rec_sz = sizeof(struct seq_event_rec);
-+ unsigned struct_synth_info_sz = sizeof(struct synth_info);
-+ unsigned struct_vt_mode_sz = sizeof(struct vt_mode);
-+ unsigned struct_audio_buf_info_sz = sizeof(struct audio_buf_info);
-+ unsigned struct_ppp_stats_sz = sizeof(struct ppp_stats);
-+ unsigned struct_sioc_sg_req_sz = sizeof(struct sioc_sg_req);
-+ unsigned struct_sioc_vif_req_sz = sizeof(struct sioc_vif_req);
-+
-+ const unsigned IOCTL_NOT_PRESENT = 0;
-+
-+ unsigned IOCTL_FIOASYNC = FIOASYNC;
-+ unsigned IOCTL_FIOCLEX = FIOCLEX;
-+ unsigned IOCTL_FIOGETOWN = FIOGETOWN;
-+ unsigned IOCTL_FIONBIO = FIONBIO;
-+ unsigned IOCTL_FIONCLEX = FIONCLEX;
-+ unsigned IOCTL_FIOSETOWN = FIOSETOWN;
-+ unsigned IOCTL_SIOCADDMULTI = SIOCADDMULTI;
-+ unsigned IOCTL_SIOCATMARK = SIOCATMARK;
-+ unsigned IOCTL_SIOCDELMULTI = SIOCDELMULTI;
-+ unsigned IOCTL_SIOCGIFADDR = SIOCGIFADDR;
-+ unsigned IOCTL_SIOCGIFBRDADDR = SIOCGIFBRDADDR;
-+ unsigned IOCTL_SIOCGIFCONF = SIOCGIFCONF;
-+ unsigned IOCTL_SIOCGIFDSTADDR = SIOCGIFDSTADDR;
-+ unsigned IOCTL_SIOCGIFFLAGS = SIOCGIFFLAGS;
-+ unsigned IOCTL_SIOCGIFMETRIC = SIOCGIFMETRIC;
-+ unsigned IOCTL_SIOCGIFMTU = SIOCGIFMTU;
-+ unsigned IOCTL_SIOCGIFNETMASK = SIOCGIFNETMASK;
-+ unsigned IOCTL_SIOCGPGRP = SIOCGPGRP;
-+ unsigned IOCTL_SIOCSIFADDR = SIOCSIFADDR;
-+ unsigned IOCTL_SIOCSIFBRDADDR = SIOCSIFBRDADDR;
-+ unsigned IOCTL_SIOCSIFDSTADDR = SIOCSIFDSTADDR;
-+ unsigned IOCTL_SIOCSIFFLAGS = SIOCSIFFLAGS;
-+ unsigned IOCTL_SIOCSIFMETRIC = SIOCSIFMETRIC;
-+ unsigned IOCTL_SIOCSIFMTU = SIOCSIFMTU;
-+ unsigned IOCTL_SIOCSIFNETMASK = SIOCSIFNETMASK;
-+ unsigned IOCTL_SIOCSPGRP = SIOCSPGRP;
-+ unsigned IOCTL_TIOCCONS = TIOCCONS;
-+ unsigned IOCTL_TIOCEXCL = TIOCEXCL;
-+ unsigned IOCTL_TIOCGETD = TIOCGETD;
-+ unsigned IOCTL_TIOCGPGRP = TIOCGPGRP;
-+ unsigned IOCTL_TIOCGWINSZ = TIOCGWINSZ;
-+ unsigned IOCTL_TIOCMBIC = TIOCMBIC;
-+ unsigned IOCTL_TIOCMBIS = TIOCMBIS;
-+ unsigned IOCTL_TIOCMGET = TIOCMGET;
-+ unsigned IOCTL_TIOCMSET = TIOCMSET;
-+ unsigned IOCTL_TIOCNOTTY = TIOCNOTTY;
-+ unsigned IOCTL_TIOCNXCL = TIOCNXCL;
-+ unsigned IOCTL_TIOCOUTQ = TIOCOUTQ;
-+ unsigned IOCTL_TIOCPKT = TIOCPKT;
-+ unsigned IOCTL_TIOCSCTTY = TIOCSCTTY;
-+ unsigned IOCTL_TIOCSETD = TIOCSETD;
-+ unsigned IOCTL_TIOCSPGRP = TIOCSPGRP;
-+ unsigned IOCTL_TIOCSTI = TIOCSTI;
-+ unsigned IOCTL_TIOCSWINSZ = TIOCSWINSZ;
-+ unsigned IOCTL_SIOCGETSGCNT = SIOCGETSGCNT;
-+ unsigned IOCTL_SIOCGETVIFCNT = SIOCGETVIFCNT;
-+ unsigned IOCTL_TCFLSH = TCFLSH;
-+ unsigned IOCTL_TCGETA = TCGETA;
-+ unsigned IOCTL_TCGETS = TCGETS;
-+ unsigned IOCTL_TCSBRK = TCSBRK;
-+ unsigned IOCTL_TCSBRKP = TCSBRKP;
-+ unsigned IOCTL_TCSETA = TCSETA;
-+ unsigned IOCTL_TCSETAF = TCSETAF;
-+ unsigned IOCTL_TCSETAW = TCSETAW;
-+ unsigned IOCTL_TCSETS = TCSETS;
-+ unsigned IOCTL_TCSETSF = TCSETSF;
-+ unsigned IOCTL_TCSETSW = TCSETSW;
-+ unsigned IOCTL_TCXONC = TCXONC;
-+ unsigned IOCTL_TIOCGLCKTRMIOS = TIOCGLCKTRMIOS;
-+ unsigned IOCTL_TIOCGSOFTCAR = TIOCGSOFTCAR;
-+ unsigned IOCTL_TIOCINQ = TIOCINQ;
-+ unsigned IOCTL_TIOCLINUX = TIOCLINUX;
-+ unsigned IOCTL_TIOCSERCONFIG = TIOCSERCONFIG;
-+ unsigned IOCTL_TIOCSERGETLSR = TIOCSERGETLSR;
-+ unsigned IOCTL_TIOCSERGWILD = TIOCSERGWILD;
-+ unsigned IOCTL_TIOCSERSWILD = TIOCSERSWILD;
-+ unsigned IOCTL_TIOCSLCKTRMIOS = TIOCSLCKTRMIOS;
-+ unsigned IOCTL_TIOCSSOFTCAR = TIOCSSOFTCAR;
-+ unsigned IOCTL_VT_DISALLOCATE = VT_DISALLOCATE;
-+ unsigned IOCTL_VT_GETSTATE = VT_GETSTATE;
-+ unsigned IOCTL_VT_RESIZE = VT_RESIZE;
-+ unsigned IOCTL_VT_RESIZEX = VT_RESIZEX;
-+ unsigned IOCTL_VT_SENDSIG = VT_SENDSIG;
-+#endif // SANITIZER_LINUX
-+
-+ const int si_SEGV_MAPERR = SEGV_MAPERR;
-+ const int si_SEGV_ACCERR = SEGV_ACCERR;
-+} // namespace __sanitizer
++unsigned path_max = PATH_MAX;
++
++// ioctl arguments
++unsigned struct_ifreq_sz = sizeof(struct ifreq);
++unsigned struct_termios_sz = sizeof(struct termios);
++unsigned struct_winsize_sz = sizeof(struct winsize);
++unsigned struct_midi_info_sz = sizeof(struct midi_info);
++unsigned struct_mtget_sz = sizeof(struct mtget);
++unsigned struct_mtop_sz = sizeof(struct mtop);
++unsigned struct_sbi_instrument_sz = sizeof(struct sbi_instrument);
++unsigned struct_seq_event_rec_sz = sizeof(struct seq_event_rec);
++unsigned struct_synth_info_sz = sizeof(struct synth_info);
++unsigned struct_vt_mode_sz = sizeof(struct vt_mode);
++unsigned struct_audio_buf_info_sz = sizeof(struct audio_buf_info);
++unsigned struct_ppp_stats_sz = sizeof(struct ppp_stats);
++unsigned struct_sioc_sg_req_sz = sizeof(struct sioc_sg_req);
++unsigned struct_sioc_vif_req_sz = sizeof(struct sioc_vif_req);
++
++const unsigned IOCTL_NOT_PRESENT = 0;
++
++unsigned IOCTL_FIOASYNC = FIOASYNC;
++unsigned IOCTL_FIOCLEX = FIOCLEX;
++unsigned IOCTL_FIOGETOWN = FIOGETOWN;
++unsigned IOCTL_FIONBIO = FIONBIO;
++unsigned IOCTL_FIONCLEX = FIONCLEX;
++unsigned IOCTL_FIOSETOWN = FIOSETOWN;
++unsigned IOCTL_SIOCADDMULTI = SIOCADDMULTI;
++unsigned IOCTL_SIOCATMARK = SIOCATMARK;
++unsigned IOCTL_SIOCDELMULTI = SIOCDELMULTI;
++unsigned IOCTL_SIOCGIFADDR = SIOCGIFADDR;
++unsigned IOCTL_SIOCGIFBRDADDR = SIOCGIFBRDADDR;
++unsigned IOCTL_SIOCGIFCONF = SIOCGIFCONF;
++unsigned IOCTL_SIOCGIFDSTADDR = SIOCGIFDSTADDR;
++unsigned IOCTL_SIOCGIFFLAGS = SIOCGIFFLAGS;
++unsigned IOCTL_SIOCGIFMETRIC = SIOCGIFMETRIC;
++unsigned IOCTL_SIOCGIFMTU = SIOCGIFMTU;
++unsigned IOCTL_SIOCGIFNETMASK = SIOCGIFNETMASK;
++unsigned IOCTL_SIOCGPGRP = SIOCGPGRP;
++unsigned IOCTL_SIOCSIFADDR = SIOCSIFADDR;
++unsigned IOCTL_SIOCSIFBRDADDR = SIOCSIFBRDADDR;
++unsigned IOCTL_SIOCSIFDSTADDR = SIOCSIFDSTADDR;
++unsigned IOCTL_SIOCSIFFLAGS = SIOCSIFFLAGS;
++unsigned IOCTL_SIOCSIFMETRIC = SIOCSIFMETRIC;
++unsigned IOCTL_SIOCSIFMTU = SIOCSIFMTU;
++unsigned IOCTL_SIOCSIFNETMASK = SIOCSIFNETMASK;
++unsigned IOCTL_SIOCSPGRP = SIOCSPGRP;
++unsigned IOCTL_TIOCCONS = TIOCCONS;
++unsigned IOCTL_TIOCEXCL = TIOCEXCL;
++unsigned IOCTL_TIOCGETD = TIOCGETD;
++unsigned IOCTL_TIOCGPGRP = TIOCGPGRP;
++unsigned IOCTL_TIOCGWINSZ = TIOCGWINSZ;
++unsigned IOCTL_TIOCMBIC = TIOCMBIC;
++unsigned IOCTL_TIOCMBIS = TIOCMBIS;
++unsigned IOCTL_TIOCMGET = TIOCMGET;
++unsigned IOCTL_TIOCMSET = TIOCMSET;
++unsigned IOCTL_TIOCNOTTY = TIOCNOTTY;
++unsigned IOCTL_TIOCNXCL = TIOCNXCL;
++unsigned IOCTL_TIOCOUTQ = TIOCOUTQ;
++unsigned IOCTL_TIOCPKT = TIOCPKT;
++unsigned IOCTL_TIOCSCTTY = TIOCSCTTY;
++unsigned IOCTL_TIOCSETD = TIOCSETD;
++unsigned IOCTL_TIOCSPGRP = TIOCSPGRP;
++unsigned IOCTL_TIOCSTI = TIOCSTI;
++unsigned IOCTL_TIOCSWINSZ = TIOCSWINSZ;
++unsigned IOCTL_SIOCGETSGCNT = SIOCGETSGCNT;
++unsigned IOCTL_SIOCGETVIFCNT = SIOCGETVIFCNT;
++unsigned IOCTL_TCFLSH = TCFLSH;
++unsigned IOCTL_TCGETA = TCGETA;
++unsigned IOCTL_TCGETS = TCGETS;
++unsigned IOCTL_TCSBRK = TCSBRK;
++unsigned IOCTL_TCSBRKP = TCSBRKP;
++unsigned IOCTL_TCSETA = TCSETA;
++unsigned IOCTL_TCSETAF = TCSETAF;
++unsigned IOCTL_TCSETAW = TCSETAW;
++unsigned IOCTL_TCSETS = TCSETS;
++unsigned IOCTL_TCSETSF = TCSETSF;
++unsigned IOCTL_TCSETSW = TCSETSW;
++unsigned IOCTL_TCXONC = TCXONC;
++unsigned IOCTL_TIOCGLCKTRMIOS = TIOCGLCKTRMIOS;
++unsigned IOCTL_TIOCGSOFTCAR = TIOCGSOFTCAR;
++unsigned IOCTL_TIOCINQ = TIOCINQ;
++unsigned IOCTL_TIOCLINUX = TIOCLINUX;
++unsigned IOCTL_TIOCSERCONFIG = TIOCSERCONFIG;
++unsigned IOCTL_TIOCSERGETLSR = TIOCSERGETLSR;
++unsigned IOCTL_TIOCSERGWILD = TIOCSERGWILD;
++unsigned IOCTL_TIOCSERSWILD = TIOCSERSWILD;
++unsigned IOCTL_TIOCSLCKTRMIOS = TIOCSLCKTRMIOS;
++unsigned IOCTL_TIOCSSOFTCAR = TIOCSSOFTCAR;
++unsigned IOCTL_VT_DISALLOCATE = VT_DISALLOCATE;
++unsigned IOCTL_VT_GETSTATE = VT_GETSTATE;
++unsigned IOCTL_VT_RESIZE = VT_RESIZE;
++unsigned IOCTL_VT_RESIZEX = VT_RESIZEX;
++unsigned IOCTL_VT_SENDSIG = VT_SENDSIG;
++#endif // SANITIZER_LINUX
++
++const int si_SEGV_MAPERR = SEGV_MAPERR;
++const int si_SEGV_ACCERR = SEGV_ACCERR;
++} // namespace __sanitizer
+
+using namespace __sanitizer;
+
@@ -425,4 +424,4 @@ $NetBSD$
+COMPILER_CHECK(__sanitizer_XDR_DECODE == XDR_DECODE);
+COMPILER_CHECK(__sanitizer_XDR_FREE == XDR_FREE);
+
-+#endif // SANITIZER_NETBSD
++#endif // SANITIZER_NETBSD
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h
index 0201df48c8..7c06e9709c 100644
--- a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h
+++ b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h
@@ -1,6 +1,6 @@
$NetBSD$
---- lib/sanitizer_common/sanitizer_platform_limits_netbsd.h.orig 2017-08-27 05:17:32.661559121 +0000
+--- lib/sanitizer_common/sanitizer_platform_limits_netbsd.h.orig 2017-08-27 06:19:05.500321760 +0000
+++ lib/sanitizer_common/sanitizer_platform_limits_netbsd.h
@@ -0,0 +1,566 @@
+//===-- sanitizer_platform_limits_posix.h ---------------------------------===//
@@ -35,309 +35,309 @@ $NetBSD$
+#endif
+
+namespace __sanitizer {
-+ extern unsigned struct_utsname_sz;
-+ extern unsigned struct_stat_sz;
-+ extern unsigned struct_rusage_sz;
-+ extern unsigned siginfo_t_sz;
-+ extern unsigned struct_itimerval_sz;
-+ extern unsigned pthread_t_sz;
-+ extern unsigned pthread_cond_t_sz;
-+ extern unsigned pid_t_sz;
-+ extern unsigned timeval_sz;
-+ extern unsigned uid_t_sz;
-+ extern unsigned gid_t_sz;
-+ extern unsigned mbstate_t_sz;
-+ extern unsigned struct_timezone_sz;
-+ extern unsigned struct_tms_sz;
-+ extern unsigned struct_itimerspec_sz;
-+ extern unsigned struct_sigevent_sz;
-+ extern unsigned struct_sched_param_sz;
-+ extern unsigned struct_statfs_sz;
-+ extern unsigned struct_sockaddr_sz;
-+ extern unsigned ucontext_t_sz;
-+
-+ extern unsigned struct_rlimit_sz;
-+ extern unsigned struct_utimbuf_sz;
-+ extern unsigned struct_timespec_sz;
-+
-+ struct __sanitizer_iocb {
-+ u64 aio_offset;
-+ uptr aio_buf;
-+ long aio_nbytes;
-+ u32 aio_fildes;
-+ u32 aio_lio_opcode;
-+ long aio_reqprio;
++extern unsigned struct_utsname_sz;
++extern unsigned struct_stat_sz;
++extern unsigned struct_rusage_sz;
++extern unsigned siginfo_t_sz;
++extern unsigned struct_itimerval_sz;
++extern unsigned pthread_t_sz;
++extern unsigned pthread_cond_t_sz;
++extern unsigned pid_t_sz;
++extern unsigned timeval_sz;
++extern unsigned uid_t_sz;
++extern unsigned gid_t_sz;
++extern unsigned mbstate_t_sz;
++extern unsigned struct_timezone_sz;
++extern unsigned struct_tms_sz;
++extern unsigned struct_itimerspec_sz;
++extern unsigned struct_sigevent_sz;
++extern unsigned struct_sched_param_sz;
++extern unsigned struct_statfs_sz;
++extern unsigned struct_sockaddr_sz;
++extern unsigned ucontext_t_sz;
++
++extern unsigned struct_rlimit_sz;
++extern unsigned struct_utimbuf_sz;
++extern unsigned struct_timespec_sz;
++
++struct __sanitizer_iocb {
++ u64 aio_offset;
++ uptr aio_buf;
++ long aio_nbytes;
++ u32 aio_fildes;
++ u32 aio_lio_opcode;
++ long aio_reqprio;
+#if _LP64
-+ u8 aio_sigevent[32];
++ u8 aio_sigevent[32];
+#else
-+ u8 aio_sigevent[20];
++ u8 aio_sigevent[20];
+#endif
-+ u32 _state;
-+ u32 _errno;
-+ long _retval;
++ u32 _state;
++ u32 _errno;
++ long _retval;
++};
++
++struct __sanitizer___sysctl_args {
++ int *name;
++ int nlen;
++ void *oldval;
++ uptr *oldlenp;
++ void *newval;
++ uptr newlen;
++};
++
++struct __sanitizer_sem_t {
++ uptr data[5];
++};
++
++struct __sanitizer_ipc_perm {
++ u32 uid;
++ u32 gid;
++ u32 cuid;
++ u32 cgid;
++ u32 mode;
++ unsigned short _seq;
++ long _key;
++};
++
++struct __sanitizer_shmid_ds {
++ __sanitizer_ipc_perm shm_perm;
++ unsigned long shm_segsz;
++ u32 shm_lpid;
++ u32 shm_cpid;
++ unsigned int shm_nattch;
++ u64 shm_atime;
++ u64 shm_dtime;
++ u64 shm_ctime;
++ void *_shm_internal;
++};
++
++extern unsigned struct_msqid_ds_sz;
++extern unsigned struct_mq_attr_sz;
++extern unsigned struct_timex_sz;
++extern unsigned struct_statvfs_sz;
++
++struct __sanitizer_iovec {
++ void *iov_base;
++ uptr iov_len;
++};
++
++struct __sanitizer_ifaddrs {
++ struct __sanitizer_ifaddrs *ifa_next;
++ char *ifa_name;
++ unsigned int ifa_flags;
++ void *ifa_addr; // (struct sockaddr *)
++ void *ifa_netmask; // (struct sockaddr *)
++ void *ifa_dstaddr; // (struct sockaddr *)
++ void *ifa_data;
++ unsigned int ifa_addrflags;
++};
++
++typedef unsigned __sanitizer_pthread_key_t;
++
++typedef long long __sanitizer_time_t;
++
++struct __sanitizer_passwd {
++ char *pw_name;
++ char *pw_passwd;
++ int pw_uid;
++ int pw_gid;
++ __sanitizer_time_t pw_change;
++ char *pw_class;
++ char *pw_gecos;
++ char *pw_dir;
++ char *pw_shell;
++ __sanitizer_time_t pw_expire;
++};
++
++struct __sanitizer_group {
++ char *gr_name;
++ char *gr_passwd;
++ int gr_gid;
++ char **gr_mem;
++};
++
++struct __sanitizer_timeb {
++ __sanitizer_time_t time;
++ unsigned short millitm;
++ short timezone;
++ short dstflag;
++};
++
++struct __sanitizer_ether_addr {
++ u8 octet[6];
++};
++
++struct __sanitizer_tm {
++ int tm_sec;
++ int tm_min;
++ int tm_hour;
++ int tm_mday;
++ int tm_mon;
++ int tm_year;
++ int tm_wday;
++ int tm_yday;
++ int tm_isdst;
++ long int tm_gmtoff;
++ const char *tm_zone;
++};
++
++struct __sanitizer_msghdr {
++ void *msg_name;
++ unsigned msg_namelen;
++ struct __sanitizer_iovec *msg_iov;
++ unsigned msg_iovlen;
++ void *msg_control;
++ unsigned msg_controllen;
++ int msg_flags;
++};
++struct __sanitizer_cmsghdr {
++ unsigned cmsg_len;
++ int cmsg_level;
++ int cmsg_type;
++};
++
++struct __sanitizer_dirent {
++ u64 d_fileno;
++ u16 d_reclen;
++ // more fields that we don't care about
++};
++
++typedef int __sanitizer_clock_t;
++typedef int __sanitizer_clockid_t;
++
++typedef u32 __sanitizer___kernel_uid_t;
++typedef u32 __sanitizer___kernel_gid_t;
++typedef u64 __sanitizer___kernel_off_t;
++typedef struct {
++ u32 fds_bits[8];
++} __sanitizer___kernel_fd_set;
++
++typedef struct {
++ unsigned int pta_magic;
++ int pta_flags;
++ void *pta_private;
++} __sanitizer_pthread_attr_t;
++
++struct __sanitizer_sigset_t {
++ // uint32_t * 4
++ unsigned int __bits[4];
++};
++
++struct __sanitizer_sigaction {
++ union {
++ void (*handler)(int sig);
++ void (*sigaction)(int sig, void *siginfo, void *uctx);
+ };
++ __sanitizer_sigset_t sa_mask;
++ int sa_flags;
++};
+
-+ struct __sanitizer___sysctl_args {
-+ int *name;
-+ int nlen;
-+ void *oldval;
-+ uptr *oldlenp;
-+ void *newval;
-+ uptr newlen;
-+ };
-+
-+ struct __sanitizer_sem_t {
-+ uptr data[5];
-+ };
-+
-+ struct __sanitizer_ipc_perm {
-+ u32 uid;
-+ u32 gid;
-+ u32 cuid;
-+ u32 cgid;
-+ u32 mode;
-+ unsigned short _seq;
-+ long _key;
-+ };
-+
-+ struct __sanitizer_shmid_ds {
-+ __sanitizer_ipc_perm shm_perm;
-+ unsigned long shm_segsz;
-+ u32 shm_lpid;
-+ u32 shm_cpid;
-+ unsigned int shm_nattch;
-+ u64 shm_atime;
-+ u64 shm_dtime;
-+ u64 shm_ctime;
-+ void *_shm_internal;
-+ };
-+
-+ extern unsigned struct_msqid_ds_sz;
-+ extern unsigned struct_mq_attr_sz;
-+ extern unsigned struct_timex_sz;
-+ extern unsigned struct_statvfs_sz;
-+
-+ struct __sanitizer_iovec {
-+ void *iov_base;
-+ uptr iov_len;
-+ };
-+
-+ struct __sanitizer_ifaddrs {
-+ struct __sanitizer_ifaddrs *ifa_next;
-+ char *ifa_name;
-+ unsigned int ifa_flags;
-+ void *ifa_addr; // (struct sockaddr *)
-+ void *ifa_netmask; // (struct sockaddr *)
-+ void *ifa_dstaddr; // (struct sockaddr *)
-+ void *ifa_data;
-+ unsigned int ifa_addrflags;
-+ };
-+
-+ typedef unsigned __sanitizer_pthread_key_t;
-+
-+ typedef long long __sanitizer_time_t;
-+
-+ struct __sanitizer_passwd {
-+ char *pw_name;
-+ char *pw_passwd;
-+ int pw_uid;
-+ int pw_gid;
-+ __sanitizer_time_t pw_change;
-+ char *pw_class;
-+ char *pw_gecos;
-+ char *pw_dir;
-+ char *pw_shell;
-+ __sanitizer_time_t pw_expire;
-+ };
-+
-+ struct __sanitizer_group {
-+ char *gr_name;
-+ char *gr_passwd;
-+ int gr_gid;
-+ char **gr_mem;
-+ };
-+
-+ struct __sanitizer_timeb {
-+ __sanitizer_time_t time;
-+ unsigned short millitm;
-+ short timezone;
-+ short dstflag;
-+ };
-+
-+ struct __sanitizer_ether_addr {
-+ u8 octet[6];
-+ };
-+
-+ struct __sanitizer_tm {
-+ int tm_sec;
-+ int tm_min;
-+ int tm_hour;
-+ int tm_mday;
-+ int tm_mon;
-+ int tm_year;
-+ int tm_wday;
-+ int tm_yday;
-+ int tm_isdst;
-+ long int tm_gmtoff;
-+ const char *tm_zone;
-+ };
-+
-+ struct __sanitizer_msghdr {
-+ void *msg_name;
-+ unsigned msg_namelen;
-+ struct __sanitizer_iovec *msg_iov;
-+ unsigned msg_iovlen;
-+ void *msg_control;
-+ unsigned msg_controllen;
-+ int msg_flags;
-+ };
-+ struct __sanitizer_cmsghdr {
-+ unsigned cmsg_len;
-+ int cmsg_level;
-+ int cmsg_type;
-+ };
-+
-+ struct __sanitizer_dirent {
-+ u64 d_fileno;
-+ u16 d_reclen;
-+ // more fields that we don't care about
-+ };
-+
-+ typedef int __sanitizer_clock_t;
-+ typedef int __sanitizer_clockid_t;
-+
-+ typedef u32 __sanitizer___kernel_uid_t;
-+ typedef u32 __sanitizer___kernel_gid_t;
-+ typedef u64 __sanitizer___kernel_off_t;
-+ typedef struct {
-+ u32 fds_bits[8];
-+ } __sanitizer___kernel_fd_set;
-+
-+ typedef struct {
-+ unsigned int pta_magic;
-+ int pta_flags;
-+ void *pta_private;
-+ } __sanitizer_pthread_attr_t;
-+
-+ struct __sanitizer_sigset_t {
-+ // uint32_t * 4
-+ unsigned int __bits[4];
-+ };
-+
-+ struct __sanitizer_sigaction {
-+ union {
-+ void (*handler)(int sig);
-+ void (*sigaction)(int sig, void *siginfo, void *uctx);
-+ };
-+ __sanitizer_sigset_t sa_mask;
-+ int sa_flags;
-+ };
-+
-+ typedef __sanitizer_sigset_t __sanitizer_kernel_sigset_t;
-+
-+ struct __sanitizer_kernel_sigaction_t {
-+ union {
-+ void (*handler)(int signo);
-+ void (*sigaction)(int signo, void *info, void *ctx);
-+ };
-+ unsigned long sa_flags;
-+ void (*sa_restorer)(void);
-+ __sanitizer_kernel_sigset_t sa_mask;
-+ };
-+
-+ extern uptr sig_ign;
-+ extern uptr sig_dfl;
-+ extern uptr sa_siginfo;
-+
-+ extern int af_inet;
-+ extern int af_inet6;
-+ uptr __sanitizer_in_addr_sz(int af);
-+
-+ struct __sanitizer_dl_phdr_info {
-+ uptr dlpi_addr;
-+ const char *dlpi_name;
-+ const void *dlpi_phdr;
-+ short dlpi_phnum;
-+ };
-+
-+ extern unsigned struct_ElfW_Phdr_sz;
-+
-+ struct __sanitizer_addrinfo {
-+ int ai_flags;
-+ int ai_family;
-+ int ai_socktype;
-+ int ai_protocol;
-+ unsigned ai_addrlen;
-+ char *ai_canonname;
-+ void *ai_addr;
-+ struct __sanitizer_addrinfo *ai_next;
-+ };
-+
-+ struct __sanitizer_hostent {
-+ char *h_name;
-+ char **h_aliases;
-+ int h_addrtype;
-+ int h_length;
-+ char **h_addr_list;
-+ };
-+
-+ struct __sanitizer_pollfd {
-+ int fd;
-+ short events;
-+ short revents;
-+ };
-+
-+ typedef unsigned __sanitizer_nfds_t;
-+
-+ struct __sanitizer_glob_t {
-+ uptr gl_pathc;
-+ uptr gl_matchc;
-+ uptr gl_offs;
-+ int gl_flags;
-+ char **gl_pathv;
-+ int (*gl_errfunc)(const char*, int);
-+ void (*gl_closedir)(void *dirp);
-+ struct dirent *(*gl_readdir)(void *dirp);
-+ void *(*gl_opendir)(const char*);
-+ int (*gl_lstat)(const char*, void* /* struct stat* */);
-+ int (*gl_stat)(const char*, void* /* struct stat* */);
-+ };
-+
-+ extern int glob_nomatch;
-+ extern int glob_altdirfunc;
-+
-+ extern unsigned path_max;
-+
-+ struct __sanitizer_wordexp_t {
-+ uptr we_wordc;
-+ char **we_wordv;
-+ uptr we_offs;
-+ char *we_strings;
-+ uptr we_nbytes;
-+ };
-+
-+ typedef void __sanitizer_FILE;
-+# define SANITIZER_HAS_STRUCT_FILE 0
-+
-+ extern unsigned struct_shminfo_sz;
-+ extern unsigned struct_shm_info_sz;
-+ extern int shmctl_ipc_stat;
-+ extern int shmctl_ipc_info;
-+ extern int shmctl_shm_info;
-+ extern int shmctl_shm_stat;
-+
-+ extern unsigned struct_utmp_sz;
-+ extern unsigned struct_utmpx_sz;
-+
-+ extern int map_fixed;
++typedef __sanitizer_sigset_t __sanitizer_kernel_sigset_t;
+
-+ // ioctl arguments
-+ struct __sanitizer_ifconf {
-+ int ifc_len;
-+ union {
-+ void *ifcu_req;
-+ } ifc_ifcu;
++struct __sanitizer_kernel_sigaction_t {
++ union {
++ void (*handler)(int signo);
++ void (*sigaction)(int signo, void *info, void *ctx);
+ };
++ unsigned long sa_flags;
++ void (*sa_restorer)(void);
++ __sanitizer_kernel_sigset_t sa_mask;
++};
++
++extern uptr sig_ign;
++extern uptr sig_dfl;
++extern uptr sa_siginfo;
++
++extern int af_inet;
++extern int af_inet6;
++uptr __sanitizer_in_addr_sz(int af);
++
++struct __sanitizer_dl_phdr_info {
++ uptr dlpi_addr;
++ const char *dlpi_name;
++ const void *dlpi_phdr;
++ short dlpi_phnum;
++};
++
++extern unsigned struct_ElfW_Phdr_sz;
++
++struct __sanitizer_addrinfo {
++ int ai_flags;
++ int ai_family;
++ int ai_socktype;
++ int ai_protocol;
++ unsigned ai_addrlen;
++ char *ai_canonname;
++ void *ai_addr;
++ struct __sanitizer_addrinfo *ai_next;
++};
++
++struct __sanitizer_hostent {
++ char *h_name;
++ char **h_aliases;
++ int h_addrtype;
++ int h_length;
++ char **h_addr_list;
++};
++
++struct __sanitizer_pollfd {
++ int fd;
++ short events;
++ short revents;
++};
++
++typedef unsigned __sanitizer_nfds_t;
++
++struct __sanitizer_glob_t {
++ uptr gl_pathc;
++ uptr gl_matchc;
++ uptr gl_offs;
++ int gl_flags;
++ char **gl_pathv;
++ int (*gl_errfunc)(const char *, int);
++ void (*gl_closedir)(void *dirp);
++ struct dirent *(*gl_readdir)(void *dirp);
++ void *(*gl_opendir)(const char *);
++ int (*gl_lstat)(const char *, void * /* struct stat* */);
++ int (*gl_stat)(const char *, void * /* struct stat* */);
++};
++
++extern int glob_nomatch;
++extern int glob_altdirfunc;
++
++extern unsigned path_max;
++
++struct __sanitizer_wordexp_t {
++ uptr we_wordc;
++ char **we_wordv;
++ uptr we_offs;
++ char *we_strings;
++ uptr we_nbytes;
++};
++
++typedef void __sanitizer_FILE;
++#define SANITIZER_HAS_STRUCT_FILE 0
++
++extern unsigned struct_shminfo_sz;
++extern unsigned struct_shm_info_sz;
++extern int shmctl_ipc_stat;
++extern int shmctl_ipc_info;
++extern int shmctl_shm_info;
++extern int shmctl_shm_stat;
++
++extern unsigned struct_utmp_sz;
++extern unsigned struct_utmpx_sz;
++
++extern int map_fixed;
++
++// ioctl arguments
++struct __sanitizer_ifconf {
++ int ifc_len;
++ union {
++ void *ifcu_req;
++ } ifc_ifcu;
++};
+
+#define IOC_NRBITS 8
+#define IOC_TYPEBITS 8
@@ -371,201 +371,201 @@ $NetBSD$
+
+extern unsigned struct_arpreq_sz;
+
-+ extern unsigned struct_mtget_sz;
-+ extern unsigned struct_mtop_sz;
-+ extern unsigned struct_rtentry_sz;
-+ extern unsigned struct_sbi_instrument_sz;
-+ extern unsigned struct_seq_event_rec_sz;
-+ extern unsigned struct_synth_info_sz;
-+ extern unsigned struct_vt_mode_sz;
-+ extern unsigned struct_audio_buf_info_sz;
-+ extern unsigned struct_ppp_stats_sz;
-+ extern unsigned struct_sioc_sg_req_sz;
-+ extern unsigned struct_sioc_vif_req_sz;
-+
-+ // ioctl request identifiers
-+
-+ // A special value to mark ioctls that are not present on the target platform,
-+ // when it can not be determined without including any system headers.
-+ extern const unsigned IOCTL_NOT_PRESENT;
-+
-+ extern unsigned IOCTL_FIOASYNC;
-+ extern unsigned IOCTL_FIOCLEX;
-+ extern unsigned IOCTL_FIOGETOWN;
-+ extern unsigned IOCTL_FIONBIO;
-+ extern unsigned IOCTL_FIONCLEX;
-+ extern unsigned IOCTL_FIOSETOWN;
-+ extern unsigned IOCTL_SIOCADDMULTI;
-+ extern unsigned IOCTL_SIOCATMARK;
-+ extern unsigned IOCTL_SIOCDELMULTI;
-+ extern unsigned IOCTL_SIOCGIFADDR;
-+ extern unsigned IOCTL_SIOCGIFBRDADDR;
-+ extern unsigned IOCTL_SIOCGIFCONF;
-+ extern unsigned IOCTL_SIOCGIFDSTADDR;
-+ extern unsigned IOCTL_SIOCGIFFLAGS;
-+ extern unsigned IOCTL_SIOCGIFMETRIC;
-+ extern unsigned IOCTL_SIOCGIFMTU;
-+ extern unsigned IOCTL_SIOCGIFNETMASK;
-+ extern unsigned IOCTL_SIOCGPGRP;
-+ extern unsigned IOCTL_SIOCSIFADDR;
-+ extern unsigned IOCTL_SIOCSIFBRDADDR;
-+ extern unsigned IOCTL_SIOCSIFDSTADDR;
-+ extern unsigned IOCTL_SIOCSIFFLAGS;
-+ extern unsigned IOCTL_SIOCSIFMETRIC;
-+ extern unsigned IOCTL_SIOCSIFMTU;
-+ extern unsigned IOCTL_SIOCSIFNETMASK;
-+ extern unsigned IOCTL_SIOCSPGRP;
-+ extern unsigned IOCTL_TIOCCONS;
-+ extern unsigned IOCTL_TIOCEXCL;
-+ extern unsigned IOCTL_TIOCGETD;
-+ extern unsigned IOCTL_TIOCGPGRP;
-+ extern unsigned IOCTL_TIOCGWINSZ;
-+ extern unsigned IOCTL_TIOCMBIC;
-+ extern unsigned IOCTL_TIOCMBIS;
-+ extern unsigned IOCTL_TIOCMGET;
-+ extern unsigned IOCTL_TIOCMSET;
-+ extern unsigned IOCTL_TIOCNOTTY;
-+ extern unsigned IOCTL_TIOCNXCL;
-+ extern unsigned IOCTL_TIOCOUTQ;
-+ extern unsigned IOCTL_TIOCPKT;
-+ extern unsigned IOCTL_TIOCSCTTY;
-+ extern unsigned IOCTL_TIOCSETD;
-+ extern unsigned IOCTL_TIOCSPGRP;
-+ extern unsigned IOCTL_TIOCSTI;
-+ extern unsigned IOCTL_TIOCSWINSZ;
-+ extern unsigned IOCTL_SIOCGETSGCNT;
-+ extern unsigned IOCTL_SIOCGETVIFCNT;
-+
-+ extern unsigned IOCTL_MTIOCGET;
-+ extern unsigned IOCTL_MTIOCTOP;
-+ extern unsigned IOCTL_SIOCADDRT;
-+ extern unsigned IOCTL_SIOCDELRT;
-+ extern unsigned IOCTL_SNDCTL_DSP_GETBLKSIZE;
-+ extern unsigned IOCTL_SNDCTL_DSP_GETFMTS;
-+ extern unsigned IOCTL_SNDCTL_DSP_NONBLOCK;
-+ extern unsigned IOCTL_SNDCTL_DSP_POST;
-+ extern unsigned IOCTL_SNDCTL_DSP_RESET;
-+ extern unsigned IOCTL_SNDCTL_DSP_SETFMT;
-+ extern unsigned IOCTL_SNDCTL_DSP_SETFRAGMENT;
-+ extern unsigned IOCTL_SNDCTL_DSP_SPEED;
-+ extern unsigned IOCTL_SNDCTL_DSP_STEREO;
-+ extern unsigned IOCTL_SNDCTL_DSP_SUBDIVIDE;
-+ extern unsigned IOCTL_SNDCTL_DSP_SYNC;
-+ extern unsigned IOCTL_SNDCTL_FM_4OP_ENABLE;
-+ extern unsigned IOCTL_SNDCTL_FM_LOAD_INSTR;
-+ extern unsigned IOCTL_SNDCTL_MIDI_INFO;
-+ extern unsigned IOCTL_SNDCTL_MIDI_PRETIME;
-+ extern unsigned IOCTL_SNDCTL_SEQ_CTRLRATE;
-+ extern unsigned IOCTL_SNDCTL_SEQ_GETINCOUNT;
-+ extern unsigned IOCTL_SNDCTL_SEQ_GETOUTCOUNT;
-+ extern unsigned IOCTL_SNDCTL_SEQ_NRMIDIS;
-+ extern unsigned IOCTL_SNDCTL_SEQ_NRSYNTHS;
-+ extern unsigned IOCTL_SNDCTL_SEQ_OUTOFBAND;
-+ extern unsigned IOCTL_SNDCTL_SEQ_PANIC;
-+ extern unsigned IOCTL_SNDCTL_SEQ_PERCMODE;
-+ extern unsigned IOCTL_SNDCTL_SEQ_RESET;
-+ extern unsigned IOCTL_SNDCTL_SEQ_RESETSAMPLES;
-+ extern unsigned IOCTL_SNDCTL_SEQ_SYNC;
-+ extern unsigned IOCTL_SNDCTL_SEQ_TESTMIDI;
-+ extern unsigned IOCTL_SNDCTL_SEQ_THRESHOLD;
-+ extern unsigned IOCTL_SNDCTL_SYNTH_INFO;
-+ extern unsigned IOCTL_SNDCTL_SYNTH_MEMAVL;
-+ extern unsigned IOCTL_SNDCTL_TMR_CONTINUE;
-+ extern unsigned IOCTL_SNDCTL_TMR_METRONOME;
-+ extern unsigned IOCTL_SNDCTL_TMR_SELECT;
-+ extern unsigned IOCTL_SNDCTL_TMR_SOURCE;
-+ extern unsigned IOCTL_SNDCTL_TMR_START;
-+ extern unsigned IOCTL_SNDCTL_TMR_STOP;
-+ extern unsigned IOCTL_SNDCTL_TMR_TEMPO;
-+ extern unsigned IOCTL_SNDCTL_TMR_TIMEBASE;
-+ extern unsigned IOCTL_SOUND_MIXER_READ_ALTPCM;
-+ extern unsigned IOCTL_SOUND_MIXER_READ_BASS;
-+ extern unsigned IOCTL_SOUND_MIXER_READ_CAPS;
-+ extern unsigned IOCTL_SOUND_MIXER_READ_CD;
-+ extern unsigned IOCTL_SOUND_MIXER_READ_DEVMASK;
-+ extern unsigned IOCTL_SOUND_MIXER_READ_ENHANCE;
-+ extern unsigned IOCTL_SOUND_MIXER_READ_IGAIN;
-+ extern unsigned IOCTL_SOUND_MIXER_READ_IMIX;
-+ extern unsigned IOCTL_SOUND_MIXER_READ_LINE1;
-+ extern unsigned IOCTL_SOUND_MIXER_READ_LINE2;
-+ extern unsigned IOCTL_SOUND_MIXER_READ_LINE3;
-+ extern unsigned IOCTL_SOUND_MIXER_READ_LINE;
-+ extern unsigned IOCTL_SOUND_MIXER_READ_LOUD;
-+ extern unsigned IOCTL_SOUND_MIXER_READ_MIC;
-+ extern unsigned IOCTL_SOUND_MIXER_READ_MUTE;
-+ extern unsigned IOCTL_SOUND_MIXER_READ_OGAIN;
-+ extern unsigned IOCTL_SOUND_MIXER_READ_PCM;
-+ extern unsigned IOCTL_SOUND_MIXER_READ_RECLEV;
-+ extern unsigned IOCTL_SOUND_MIXER_READ_RECMASK;
-+ extern unsigned IOCTL_SOUND_MIXER_READ_RECSRC;
-+ extern unsigned IOCTL_SOUND_MIXER_READ_SPEAKER;
-+ extern unsigned IOCTL_SOUND_MIXER_READ_STEREODEVS;
-+ extern unsigned IOCTL_SOUND_MIXER_READ_SYNTH;
-+ extern unsigned IOCTL_SOUND_MIXER_READ_TREBLE;
-+ extern unsigned IOCTL_SOUND_MIXER_READ_VOLUME;
-+ extern unsigned IOCTL_SOUND_MIXER_WRITE_ALTPCM;
-+ extern unsigned IOCTL_SOUND_MIXER_WRITE_BASS;
-+ extern unsigned IOCTL_SOUND_MIXER_WRITE_CD;
-+ extern unsigned IOCTL_SOUND_MIXER_WRITE_ENHANCE;
-+ extern unsigned IOCTL_SOUND_MIXER_WRITE_IGAIN;
-+ extern unsigned IOCTL_SOUND_MIXER_WRITE_IMIX;
-+ extern unsigned IOCTL_SOUND_MIXER_WRITE_LINE1;
-+ extern unsigned IOCTL_SOUND_MIXER_WRITE_LINE2;
-+ extern unsigned IOCTL_SOUND_MIXER_WRITE_LINE3;
-+ extern unsigned IOCTL_SOUND_MIXER_WRITE_LINE;
-+ extern unsigned IOCTL_SOUND_MIXER_WRITE_LOUD;
-+ extern unsigned IOCTL_SOUND_MIXER_WRITE_MIC;
-+ extern unsigned IOCTL_SOUND_MIXER_WRITE_MUTE;
-+ extern unsigned IOCTL_SOUND_MIXER_WRITE_OGAIN;
-+ extern unsigned IOCTL_SOUND_MIXER_WRITE_PCM;
-+ extern unsigned IOCTL_SOUND_MIXER_WRITE_RECLEV;
-+ extern unsigned IOCTL_SOUND_MIXER_WRITE_RECSRC;
-+ extern unsigned IOCTL_SOUND_MIXER_WRITE_SPEAKER;
-+ extern unsigned IOCTL_SOUND_MIXER_WRITE_SYNTH;
-+ extern unsigned IOCTL_SOUND_MIXER_WRITE_TREBLE;
-+ extern unsigned IOCTL_SOUND_MIXER_WRITE_VOLUME;
-+ extern unsigned IOCTL_SOUND_PCM_READ_BITS;
-+ extern unsigned IOCTL_SOUND_PCM_READ_CHANNELS;
-+ extern unsigned IOCTL_SOUND_PCM_READ_FILTER;
-+ extern unsigned IOCTL_SOUND_PCM_READ_RATE;
-+ extern unsigned IOCTL_SOUND_PCM_WRITE_CHANNELS;
-+ extern unsigned IOCTL_SOUND_PCM_WRITE_FILTER;
-+ extern unsigned IOCTL_VT_ACTIVATE;
-+ extern unsigned IOCTL_VT_GETMODE;
-+ extern unsigned IOCTL_VT_OPENQRY;
-+ extern unsigned IOCTL_VT_RELDISP;
-+ extern unsigned IOCTL_VT_SETMODE;
-+ extern unsigned IOCTL_VT_WAITACTIVE;
-+
-+ extern unsigned IOCTL_KDDISABIO;
-+ extern unsigned IOCTL_KDENABIO;
-+ extern unsigned IOCTL_KDGETLED;
-+ extern unsigned IOCTL_KDGKBMODE;
-+ extern unsigned IOCTL_KDGKBTYPE;
-+ extern unsigned IOCTL_KDMKTONE;
-+ extern unsigned IOCTL_KDSETLED;
-+ extern unsigned IOCTL_KDSETMODE;
-+ extern unsigned IOCTL_KDSKBMODE;
-+
-+ extern const int si_SEGV_MAPERR;
-+ extern const int si_SEGV_ACCERR;
++extern unsigned struct_mtget_sz;
++extern unsigned struct_mtop_sz;
++extern unsigned struct_rtentry_sz;
++extern unsigned struct_sbi_instrument_sz;
++extern unsigned struct_seq_event_rec_sz;
++extern unsigned struct_synth_info_sz;
++extern unsigned struct_vt_mode_sz;
++extern unsigned struct_audio_buf_info_sz;
++extern unsigned struct_ppp_stats_sz;
++extern unsigned struct_sioc_sg_req_sz;
++extern unsigned struct_sioc_vif_req_sz;
++
++// ioctl request identifiers
++
++// A special value to mark ioctls that are not present on the target platform,
++// when it can not be determined without including any system headers.
++extern const unsigned IOCTL_NOT_PRESENT;
++
++extern unsigned IOCTL_FIOASYNC;
++extern unsigned IOCTL_FIOCLEX;
++extern unsigned IOCTL_FIOGETOWN;
++extern unsigned IOCTL_FIONBIO;
++extern unsigned IOCTL_FIONCLEX;
++extern unsigned IOCTL_FIOSETOWN;
++extern unsigned IOCTL_SIOCADDMULTI;
++extern unsigned IOCTL_SIOCATMARK;
++extern unsigned IOCTL_SIOCDELMULTI;
++extern unsigned IOCTL_SIOCGIFADDR;
++extern unsigned IOCTL_SIOCGIFBRDADDR;
++extern unsigned IOCTL_SIOCGIFCONF;
++extern unsigned IOCTL_SIOCGIFDSTADDR;
++extern unsigned IOCTL_SIOCGIFFLAGS;
++extern unsigned IOCTL_SIOCGIFMETRIC;
++extern unsigned IOCTL_SIOCGIFMTU;
++extern unsigned IOCTL_SIOCGIFNETMASK;
++extern unsigned IOCTL_SIOCGPGRP;
++extern unsigned IOCTL_SIOCSIFADDR;
++extern unsigned IOCTL_SIOCSIFBRDADDR;
++extern unsigned IOCTL_SIOCSIFDSTADDR;
++extern unsigned IOCTL_SIOCSIFFLAGS;
++extern unsigned IOCTL_SIOCSIFMETRIC;
++extern unsigned IOCTL_SIOCSIFMTU;
++extern unsigned IOCTL_SIOCSIFNETMASK;
++extern unsigned IOCTL_SIOCSPGRP;
++extern unsigned IOCTL_TIOCCONS;
++extern unsigned IOCTL_TIOCEXCL;
++extern unsigned IOCTL_TIOCGETD;
++extern unsigned IOCTL_TIOCGPGRP;
++extern unsigned IOCTL_TIOCGWINSZ;
++extern unsigned IOCTL_TIOCMBIC;
++extern unsigned IOCTL_TIOCMBIS;
++extern unsigned IOCTL_TIOCMGET;
++extern unsigned IOCTL_TIOCMSET;
++extern unsigned IOCTL_TIOCNOTTY;
++extern unsigned IOCTL_TIOCNXCL;
++extern unsigned IOCTL_TIOCOUTQ;
++extern unsigned IOCTL_TIOCPKT;
++extern unsigned IOCTL_TIOCSCTTY;
++extern unsigned IOCTL_TIOCSETD;
++extern unsigned IOCTL_TIOCSPGRP;
++extern unsigned IOCTL_TIOCSTI;
++extern unsigned IOCTL_TIOCSWINSZ;
++extern unsigned IOCTL_SIOCGETSGCNT;
++extern unsigned IOCTL_SIOCGETVIFCNT;
++
++extern unsigned IOCTL_MTIOCGET;
++extern unsigned IOCTL_MTIOCTOP;
++extern unsigned IOCTL_SIOCADDRT;
++extern unsigned IOCTL_SIOCDELRT;
++extern unsigned IOCTL_SNDCTL_DSP_GETBLKSIZE;
++extern unsigned IOCTL_SNDCTL_DSP_GETFMTS;
++extern unsigned IOCTL_SNDCTL_DSP_NONBLOCK;
++extern unsigned IOCTL_SNDCTL_DSP_POST;
++extern unsigned IOCTL_SNDCTL_DSP_RESET;
++extern unsigned IOCTL_SNDCTL_DSP_SETFMT;
++extern unsigned IOCTL_SNDCTL_DSP_SETFRAGMENT;
++extern unsigned IOCTL_SNDCTL_DSP_SPEED;
++extern unsigned IOCTL_SNDCTL_DSP_STEREO;
++extern unsigned IOCTL_SNDCTL_DSP_SUBDIVIDE;
++extern unsigned IOCTL_SNDCTL_DSP_SYNC;
++extern unsigned IOCTL_SNDCTL_FM_4OP_ENABLE;
++extern unsigned IOCTL_SNDCTL_FM_LOAD_INSTR;
++extern unsigned IOCTL_SNDCTL_MIDI_INFO;
++extern unsigned IOCTL_SNDCTL_MIDI_PRETIME;
++extern unsigned IOCTL_SNDCTL_SEQ_CTRLRATE;
++extern unsigned IOCTL_SNDCTL_SEQ_GETINCOUNT;
++extern unsigned IOCTL_SNDCTL_SEQ_GETOUTCOUNT;
++extern unsigned IOCTL_SNDCTL_SEQ_NRMIDIS;
++extern unsigned IOCTL_SNDCTL_SEQ_NRSYNTHS;
++extern unsigned IOCTL_SNDCTL_SEQ_OUTOFBAND;
++extern unsigned IOCTL_SNDCTL_SEQ_PANIC;
++extern unsigned IOCTL_SNDCTL_SEQ_PERCMODE;
++extern unsigned IOCTL_SNDCTL_SEQ_RESET;
++extern unsigned IOCTL_SNDCTL_SEQ_RESETSAMPLES;
++extern unsigned IOCTL_SNDCTL_SEQ_SYNC;
++extern unsigned IOCTL_SNDCTL_SEQ_TESTMIDI;
++extern unsigned IOCTL_SNDCTL_SEQ_THRESHOLD;
++extern unsigned IOCTL_SNDCTL_SYNTH_INFO;
++extern unsigned IOCTL_SNDCTL_SYNTH_MEMAVL;
++extern unsigned IOCTL_SNDCTL_TMR_CONTINUE;
++extern unsigned IOCTL_SNDCTL_TMR_METRONOME;
++extern unsigned IOCTL_SNDCTL_TMR_SELECT;
++extern unsigned IOCTL_SNDCTL_TMR_SOURCE;
++extern unsigned IOCTL_SNDCTL_TMR_START;
++extern unsigned IOCTL_SNDCTL_TMR_STOP;
++extern unsigned IOCTL_SNDCTL_TMR_TEMPO;
++extern unsigned IOCTL_SNDCTL_TMR_TIMEBASE;
++extern unsigned IOCTL_SOUND_MIXER_READ_ALTPCM;
++extern unsigned IOCTL_SOUND_MIXER_READ_BASS;
++extern unsigned IOCTL_SOUND_MIXER_READ_CAPS;
++extern unsigned IOCTL_SOUND_MIXER_READ_CD;
++extern unsigned IOCTL_SOUND_MIXER_READ_DEVMASK;
++extern unsigned IOCTL_SOUND_MIXER_READ_ENHANCE;
++extern unsigned IOCTL_SOUND_MIXER_READ_IGAIN;
++extern unsigned IOCTL_SOUND_MIXER_READ_IMIX;
++extern unsigned IOCTL_SOUND_MIXER_READ_LINE1;
++extern unsigned IOCTL_SOUND_MIXER_READ_LINE2;
++extern unsigned IOCTL_SOUND_MIXER_READ_LINE3;
++extern unsigned IOCTL_SOUND_MIXER_READ_LINE;
++extern unsigned IOCTL_SOUND_MIXER_READ_LOUD;
++extern unsigned IOCTL_SOUND_MIXER_READ_MIC;
++extern unsigned IOCTL_SOUND_MIXER_READ_MUTE;
++extern unsigned IOCTL_SOUND_MIXER_READ_OGAIN;
++extern unsigned IOCTL_SOUND_MIXER_READ_PCM;
++extern unsigned IOCTL_SOUND_MIXER_READ_RECLEV;
++extern unsigned IOCTL_SOUND_MIXER_READ_RECMASK;
++extern unsigned IOCTL_SOUND_MIXER_READ_RECSRC;
++extern unsigned IOCTL_SOUND_MIXER_READ_SPEAKER;
++extern unsigned IOCTL_SOUND_MIXER_READ_STEREODEVS;
++extern unsigned IOCTL_SOUND_MIXER_READ_SYNTH;
++extern unsigned IOCTL_SOUND_MIXER_READ_TREBLE;
++extern unsigned IOCTL_SOUND_MIXER_READ_VOLUME;
++extern unsigned IOCTL_SOUND_MIXER_WRITE_ALTPCM;
++extern unsigned IOCTL_SOUND_MIXER_WRITE_BASS;
++extern unsigned IOCTL_SOUND_MIXER_WRITE_CD;
++extern unsigned IOCTL_SOUND_MIXER_WRITE_ENHANCE;
++extern unsigned IOCTL_SOUND_MIXER_WRITE_IGAIN;
++extern unsigned IOCTL_SOUND_MIXER_WRITE_IMIX;
++extern unsigned IOCTL_SOUND_MIXER_WRITE_LINE1;
++extern unsigned IOCTL_SOUND_MIXER_WRITE_LINE2;
++extern unsigned IOCTL_SOUND_MIXER_WRITE_LINE3;
++extern unsigned IOCTL_SOUND_MIXER_WRITE_LINE;
++extern unsigned IOCTL_SOUND_MIXER_WRITE_LOUD;
++extern unsigned IOCTL_SOUND_MIXER_WRITE_MIC;
++extern unsigned IOCTL_SOUND_MIXER_WRITE_MUTE;
++extern unsigned IOCTL_SOUND_MIXER_WRITE_OGAIN;
++extern unsigned IOCTL_SOUND_MIXER_WRITE_PCM;
++extern unsigned IOCTL_SOUND_MIXER_WRITE_RECLEV;
++extern unsigned IOCTL_SOUND_MIXER_WRITE_RECSRC;
++extern unsigned IOCTL_SOUND_MIXER_WRITE_SPEAKER;
++extern unsigned IOCTL_SOUND_MIXER_WRITE_SYNTH;
++extern unsigned IOCTL_SOUND_MIXER_WRITE_TREBLE;
++extern unsigned IOCTL_SOUND_MIXER_WRITE_VOLUME;
++extern unsigned IOCTL_SOUND_PCM_READ_BITS;
++extern unsigned IOCTL_SOUND_PCM_READ_CHANNELS;
++extern unsigned IOCTL_SOUND_PCM_READ_FILTER;
++extern unsigned IOCTL_SOUND_PCM_READ_RATE;
++extern unsigned IOCTL_SOUND_PCM_WRITE_CHANNELS;
++extern unsigned IOCTL_SOUND_PCM_WRITE_FILTER;
++extern unsigned IOCTL_VT_ACTIVATE;
++extern unsigned IOCTL_VT_GETMODE;
++extern unsigned IOCTL_VT_OPENQRY;
++extern unsigned IOCTL_VT_RELDISP;
++extern unsigned IOCTL_VT_SETMODE;
++extern unsigned IOCTL_VT_WAITACTIVE;
++
++extern unsigned IOCTL_KDDISABIO;
++extern unsigned IOCTL_KDENABIO;
++extern unsigned IOCTL_KDGETLED;
++extern unsigned IOCTL_KDGKBMODE;
++extern unsigned IOCTL_KDGKBTYPE;
++extern unsigned IOCTL_KDMKTONE;
++extern unsigned IOCTL_KDSETLED;
++extern unsigned IOCTL_KDSETMODE;
++extern unsigned IOCTL_KDSKBMODE;
++
++extern const int si_SEGV_MAPERR;
++extern const int si_SEGV_ACCERR;
+} // namespace __sanitizer
+
+#define CHECK_TYPE_SIZE(TYPE) \
+ COMPILER_CHECK(sizeof(__sanitizer_##TYPE) == sizeof(TYPE))
+
-+#define CHECK_SIZE_AND_OFFSET(CLASS, MEMBER) \
-+ COMPILER_CHECK(sizeof(((__sanitizer_##CLASS *) NULL)->MEMBER) == \
-+ sizeof(((CLASS *) NULL)->MEMBER)); \
-+ COMPILER_CHECK(offsetof(__sanitizer_##CLASS, MEMBER) == \
++#define CHECK_SIZE_AND_OFFSET(CLASS, MEMBER) \
++ COMPILER_CHECK(sizeof(((__sanitizer_##CLASS *)NULL)->MEMBER) == \
++ sizeof(((CLASS *)NULL)->MEMBER)); \
++ COMPILER_CHECK(offsetof(__sanitizer_##CLASS, MEMBER) == \
+ offsetof(CLASS, MEMBER))
+
+// For sigaction, which is a function and struct at the same time,
+// and thus requires explicit "struct" in sizeof() expression.
-+#define CHECK_STRUCT_SIZE_AND_OFFSET(CLASS, MEMBER) \
-+ COMPILER_CHECK(sizeof(((struct __sanitizer_##CLASS *) NULL)->MEMBER) == \
-+ sizeof(((struct CLASS *) NULL)->MEMBER)); \
-+ COMPILER_CHECK(offsetof(struct __sanitizer_##CLASS, MEMBER) == \
++#define CHECK_STRUCT_SIZE_AND_OFFSET(CLASS, MEMBER) \
++ COMPILER_CHECK(sizeof(((struct __sanitizer_##CLASS *)NULL)->MEMBER) == \
++ sizeof(((struct CLASS *)NULL)->MEMBER)); \
++ COMPILER_CHECK(offsetof(struct __sanitizer_##CLASS, MEMBER) == \
+ offsetof(struct CLASS, MEMBER))
+
+#endif
Home |
Main Index |
Thread Index |
Old Index