[clang][extract-api] Emit "navigator" property of "name" in SymbolGraph
[llvm-project.git] / compiler-rt / lib / sanitizer_common / sanitizer_platform_limits_freebsd.h
blob9859c52ec69f35512ea30a5618bb5f2f907aa88a
1 //===-- sanitizer_platform_limits_freebsd.h -------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file is a part of Sanitizer common code.
11 // Sizes and layouts of platform-specific FreeBSD data structures.
12 //===----------------------------------------------------------------------===//
14 #ifndef SANITIZER_PLATFORM_LIMITS_FREEBSD_H
15 #define SANITIZER_PLATFORM_LIMITS_FREEBSD_H
17 #if SANITIZER_FREEBSD
19 # include "sanitizer_internal_defs.h"
20 # include "sanitizer_platform.h"
21 # include "sanitizer_platform_limits_posix.h"
23 // Get sys/_types.h, because that tells us whether 64-bit inodes are
24 // used in struct dirent below.
25 # include <sys/_types.h>
27 namespace __sanitizer {
28 void *__sanitizer_get_link_map_by_dlopen_handle(void *handle);
29 # define GET_LINK_MAP_BY_DLOPEN_HANDLE(handle) \
30 (link_map *)__sanitizer_get_link_map_by_dlopen_handle(handle)
32 extern unsigned struct_utsname_sz;
33 extern unsigned struct_stat_sz;
34 # if defined(__powerpc64__)
35 const unsigned struct___old_kernel_stat_sz = 0;
36 # else
37 const unsigned struct___old_kernel_stat_sz = 32;
38 # endif
39 extern unsigned struct_rusage_sz;
40 extern unsigned siginfo_t_sz;
41 extern unsigned struct_itimerval_sz;
42 extern unsigned pthread_t_sz;
43 extern unsigned pthread_mutex_t_sz;
44 extern unsigned pthread_cond_t_sz;
45 extern unsigned pid_t_sz;
46 extern unsigned timeval_sz;
47 extern unsigned uid_t_sz;
48 extern unsigned gid_t_sz;
49 extern unsigned fpos_t_sz;
50 extern unsigned mbstate_t_sz;
51 extern unsigned struct_timezone_sz;
52 extern unsigned struct_tms_sz;
53 extern unsigned struct_itimerspec_sz;
54 extern unsigned struct_sigevent_sz;
55 extern unsigned struct_stack_t_sz;
56 extern unsigned struct_sched_param_sz;
57 extern unsigned struct_statfs64_sz;
58 extern unsigned struct_statfs_sz;
59 extern unsigned struct_sockaddr_sz;
60 unsigned ucontext_t_sz(void *ctx);
61 extern unsigned struct_rlimit_sz;
62 extern unsigned struct_utimbuf_sz;
63 extern unsigned struct_timespec_sz;
64 extern unsigned struct_regmatch_sz;
65 extern unsigned struct_regex_sz;
66 extern unsigned struct_FTS_sz;
67 extern unsigned struct_FTSENT_sz;
68 extern const int unvis_valid;
69 extern const int unvis_validpush;
71 struct __sanitizer_iocb {
72 u64 aio_data;
73 u32 aio_key_or_aio_reserved1; // Simply crazy.
74 u32 aio_reserved1_or_aio_key; // Luckily, we don't need these.
75 u16 aio_lio_opcode;
76 s16 aio_reqprio;
77 u32 aio_fildes;
78 u64 aio_buf;
79 u64 aio_nbytes;
80 s64 aio_offset;
81 u64 aio_reserved2;
82 u64 aio_reserved3;
85 struct __sanitizer_io_event {
86 u64 data;
87 u64 obj;
88 u64 res;
89 u64 res2;
92 const unsigned iocb_cmd_pread = 0;
93 const unsigned iocb_cmd_pwrite = 1;
94 const unsigned iocb_cmd_preadv = 7;
95 const unsigned iocb_cmd_pwritev = 8;
97 struct __sanitizer___sysctl_args {
98 int *name;
99 int nlen;
100 void *oldval;
101 uptr *oldlenp;
102 void *newval;
103 uptr newlen;
104 unsigned long ___unused[4];
107 struct __sanitizer_ipc_perm {
108 unsigned int cuid;
109 unsigned int cgid;
110 unsigned int uid;
111 unsigned int gid;
112 unsigned short mode;
113 unsigned short seq;
114 long key;
117 struct __sanitizer_protoent {
118 char *p_name;
119 char **p_aliases;
120 int p_proto;
123 struct __sanitizer_netent {
124 char *n_name;
125 char **n_aliases;
126 int n_addrtype;
127 u32 n_net;
130 # if !defined(__i386__)
131 typedef long long __sanitizer_time_t;
132 # else
133 typedef long __sanitizer_time_t;
134 # endif
136 struct __sanitizer_shmid_ds {
137 __sanitizer_ipc_perm shm_perm;
138 unsigned long shm_segsz;
139 unsigned int shm_lpid;
140 unsigned int shm_cpid;
141 int shm_nattch;
142 __sanitizer_time_t shm_atime;
143 __sanitizer_time_t shm_dtime;
144 __sanitizer_time_t shm_ctime;
147 extern unsigned struct_msqid_ds_sz;
148 extern unsigned struct_mq_attr_sz;
149 extern unsigned struct_timeb_sz;
150 extern unsigned struct_statvfs_sz;
152 struct __sanitizer_iovec {
153 void *iov_base;
154 uptr iov_len;
157 struct __sanitizer_ifaddrs {
158 struct __sanitizer_ifaddrs *ifa_next;
159 char *ifa_name;
160 unsigned int ifa_flags;
161 void *ifa_addr; // (struct sockaddr *)
162 void *ifa_netmask; // (struct sockaddr *)
163 # undef ifa_dstaddr
164 void *ifa_dstaddr; // (struct sockaddr *)
165 void *ifa_data;
168 typedef unsigned __sanitizer_pthread_key_t;
170 struct __sanitizer_passwd {
171 char *pw_name;
172 char *pw_passwd;
173 int pw_uid;
174 int pw_gid;
175 __sanitizer_time_t pw_change;
176 char *pw_class;
177 char *pw_gecos;
178 char *pw_dir;
179 char *pw_shell;
180 __sanitizer_time_t pw_expire;
181 int pw_fields;
184 struct __sanitizer_group {
185 char *gr_name;
186 char *gr_passwd;
187 int gr_gid;
188 char **gr_mem;
191 typedef long __sanitizer_suseconds_t;
193 struct __sanitizer_timeval {
194 __sanitizer_time_t tv_sec;
195 __sanitizer_suseconds_t tv_usec;
198 struct __sanitizer_itimerval {
199 struct __sanitizer_timeval it_interval;
200 struct __sanitizer_timeval it_value;
203 struct __sanitizer_timeb {
204 __sanitizer_time_t time;
205 unsigned short millitm;
206 short timezone;
207 short dstflag;
210 struct __sanitizer_ether_addr {
211 u8 octet[6];
214 struct __sanitizer_tm {
215 int tm_sec;
216 int tm_min;
217 int tm_hour;
218 int tm_mday;
219 int tm_mon;
220 int tm_year;
221 int tm_wday;
222 int tm_yday;
223 int tm_isdst;
224 long int tm_gmtoff;
225 const char *tm_zone;
228 struct __sanitizer_msghdr {
229 void *msg_name;
230 unsigned msg_namelen;
231 struct __sanitizer_iovec *msg_iov;
232 unsigned msg_iovlen;
233 void *msg_control;
234 unsigned msg_controllen;
235 int msg_flags;
238 struct __sanitizer_cmsghdr {
239 unsigned cmsg_len;
240 int cmsg_level;
241 int cmsg_type;
244 struct __sanitizer_dirent {
245 # if defined(__INO64)
246 unsigned long long d_fileno;
247 unsigned long long d_off;
248 # else
249 unsigned int d_fileno;
250 # endif
251 unsigned short d_reclen;
252 // more fields that we don't care about
255 // 'clock_t' is 32 bits wide on x64 FreeBSD
256 typedef int __sanitizer_clock_t;
257 typedef int __sanitizer_clockid_t;
259 # if defined(_LP64) || defined(__x86_64__) || defined(__powerpc__) || \
260 defined(__mips__)
261 typedef unsigned __sanitizer___kernel_uid_t;
262 typedef unsigned __sanitizer___kernel_gid_t;
263 # else
264 typedef unsigned short __sanitizer___kernel_uid_t;
265 typedef unsigned short __sanitizer___kernel_gid_t;
266 # endif
267 typedef long long __sanitizer___kernel_off_t;
269 # if defined(__powerpc__) || defined(__mips__)
270 typedef unsigned int __sanitizer___kernel_old_uid_t;
271 typedef unsigned int __sanitizer___kernel_old_gid_t;
272 # else
273 typedef unsigned short __sanitizer___kernel_old_uid_t;
274 typedef unsigned short __sanitizer___kernel_old_gid_t;
275 # endif
277 typedef long long __sanitizer___kernel_loff_t;
278 typedef struct {
279 unsigned long fds_bits[1024 / (8 * sizeof(long))];
280 } __sanitizer___kernel_fd_set;
282 // This thing depends on the platform. We are only interested in the upper
283 // limit. Verified with a compiler assert in .cpp.
284 union __sanitizer_pthread_attr_t {
285 char size[128];
286 void *align;
289 const unsigned old_sigset_t_sz = sizeof(unsigned long);
291 struct __sanitizer_sigset_t {
292 // uint32_t * 4
293 unsigned int __bits[4];
296 typedef __sanitizer_sigset_t __sanitizer_kernel_sigset_t;
298 struct __sanitizer_siginfo {
299 // The size is determined by looking at sizeof of real siginfo_t on linux.
300 u64 opaque[128 / sizeof(u64)];
303 using __sanitizer_sighandler_ptr = void (*)(int sig);
304 using __sanitizer_sigactionhandler_ptr = void (*)(int sig,
305 __sanitizer_siginfo *siginfo,
306 void *uctx);
308 struct __sanitizer_sigaction {
309 union {
310 __sanitizer_sigactionhandler_ptr sigaction;
311 __sanitizer_sighandler_ptr handler;
313 int sa_flags;
314 __sanitizer_sigset_t sa_mask;
317 struct __sanitizer_sem_t {
318 u32 data[4];
321 extern const uptr sig_ign;
322 extern const uptr sig_dfl;
323 extern const uptr sig_err;
324 extern const uptr sa_siginfo;
326 extern int af_inet;
327 extern int af_inet6;
328 uptr __sanitizer_in_addr_sz(int af);
330 struct __sanitizer_dl_phdr_info {
331 uptr dlpi_addr;
332 const char *dlpi_name;
333 const void *dlpi_phdr;
334 short dlpi_phnum;
337 extern unsigned struct_ElfW_Phdr_sz;
339 struct __sanitizer_addrinfo {
340 int ai_flags;
341 int ai_family;
342 int ai_socktype;
343 int ai_protocol;
344 unsigned ai_addrlen;
345 char *ai_canonname;
346 void *ai_addr;
347 struct __sanitizer_addrinfo *ai_next;
350 struct __sanitizer_hostent {
351 char *h_name;
352 char **h_aliases;
353 int h_addrtype;
354 int h_length;
355 char **h_addr_list;
358 struct __sanitizer_pollfd {
359 int fd;
360 short events;
361 short revents;
364 typedef unsigned __sanitizer_nfds_t;
366 struct __sanitizer_glob_t {
367 uptr gl_pathc;
368 uptr gl_matchc;
369 uptr gl_offs;
370 int gl_flags;
371 char **gl_pathv;
372 int (*gl_errfunc)(const char *, int);
373 void (*gl_closedir)(void *dirp);
374 struct dirent *(*gl_readdir)(void *dirp);
375 void *(*gl_opendir)(const char *);
376 int (*gl_lstat)(const char *, void * /* struct stat* */);
377 int (*gl_stat)(const char *, void * /* struct stat* */);
380 extern int glob_nomatch;
381 extern int glob_altdirfunc;
382 extern const int wordexp_wrde_dooffs;
384 extern unsigned path_max;
386 extern int struct_ttyent_sz;
388 struct __sanitizer_wordexp_t {
389 uptr we_wordc;
390 char **we_wordv;
391 uptr we_offs;
392 char *we_strings;
393 uptr we_nbytes;
396 typedef void __sanitizer_FILE;
398 extern unsigned struct_shminfo_sz;
399 extern unsigned struct_shm_info_sz;
400 extern int shmctl_ipc_stat;
401 extern int shmctl_ipc_info;
402 extern int shmctl_shm_info;
403 extern int shmctl_shm_stat;
405 extern unsigned struct_utmpx_sz;
407 extern int map_fixed;
409 // ioctl arguments
410 struct __sanitizer_ifconf {
411 int ifc_len;
412 union {
413 void *ifcu_req;
414 } ifc_ifcu;
417 struct __sanitizer__ttyent {
418 char *ty_name;
419 char *ty_getty;
420 char *ty_type;
421 int ty_status;
422 char *ty_window;
423 char *ty_comment;
424 char *ty_group;
427 # define IOC_NRBITS 8
428 # define IOC_TYPEBITS 8
429 # if defined(__powerpc__) || defined(__powerpc64__) || defined(__mips__)
430 # define IOC_SIZEBITS 13
431 # define IOC_DIRBITS 3
432 # define IOC_NONE 1U
433 # define IOC_WRITE 4U
434 # define IOC_READ 2U
435 # else
436 # define IOC_SIZEBITS 14
437 # define IOC_DIRBITS 2
438 # define IOC_NONE 0U
439 # define IOC_WRITE 1U
440 # define IOC_READ 2U
441 # endif
442 # define IOC_NRMASK ((1 << IOC_NRBITS) - 1)
443 # define IOC_TYPEMASK ((1 << IOC_TYPEBITS) - 1)
444 # define IOC_SIZEMASK ((1 << IOC_SIZEBITS) - 1)
445 # if defined(IOC_DIRMASK)
446 # undef IOC_DIRMASK
447 # endif
448 # define IOC_DIRMASK ((1 << IOC_DIRBITS) - 1)
449 # define IOC_NRSHIFT 0
450 # define IOC_TYPESHIFT (IOC_NRSHIFT + IOC_NRBITS)
451 # define IOC_SIZESHIFT (IOC_TYPESHIFT + IOC_TYPEBITS)
452 # define IOC_DIRSHIFT (IOC_SIZESHIFT + IOC_SIZEBITS)
453 # define EVIOC_EV_MAX 0x1f
454 # define EVIOC_ABS_MAX 0x3f
456 # define IOC_DIR(nr) (((nr) >> IOC_DIRSHIFT) & IOC_DIRMASK)
457 # define IOC_TYPE(nr) (((nr) >> IOC_TYPESHIFT) & IOC_TYPEMASK)
458 # define IOC_NR(nr) (((nr) >> IOC_NRSHIFT) & IOC_NRMASK)
459 # define IOC_SIZE(nr) (((nr) >> IOC_SIZESHIFT) & IOC_SIZEMASK)
461 extern unsigned struct_ifreq_sz;
462 extern unsigned struct_termios_sz;
463 extern unsigned struct_winsize_sz;
465 extern unsigned struct_copr_buffer_sz;
466 extern unsigned struct_copr_debug_buf_sz;
467 extern unsigned struct_copr_msg_sz;
468 extern unsigned struct_midi_info_sz;
469 extern unsigned struct_mtget_sz;
470 extern unsigned struct_mtop_sz;
471 extern unsigned struct_rtentry_sz;
472 extern unsigned struct_sbi_instrument_sz;
473 extern unsigned struct_seq_event_rec_sz;
474 extern unsigned struct_synth_info_sz;
475 extern unsigned struct_vt_mode_sz;
477 extern const unsigned long __sanitizer_bufsiz;
478 extern unsigned struct_audio_buf_info_sz;
479 extern unsigned struct_ppp_stats_sz;
480 extern unsigned struct_sioc_sg_req_sz;
481 extern unsigned struct_sioc_vif_req_sz;
483 // ioctl request identifiers
485 // A special value to mark ioctls that are not present on the target platform,
486 // when it can not be determined without including any system headers.
487 extern const unsigned IOCTL_NOT_PRESENT;
489 extern unsigned IOCTL_FIOASYNC;
490 extern unsigned IOCTL_FIOCLEX;
491 extern unsigned IOCTL_FIOGETOWN;
492 extern unsigned IOCTL_FIONBIO;
493 extern unsigned IOCTL_FIONCLEX;
494 extern unsigned IOCTL_FIOSETOWN;
495 extern unsigned IOCTL_SIOCADDMULTI;
496 extern unsigned IOCTL_SIOCATMARK;
497 extern unsigned IOCTL_SIOCDELMULTI;
498 extern unsigned IOCTL_SIOCGIFADDR;
499 extern unsigned IOCTL_SIOCGIFBRDADDR;
500 extern unsigned IOCTL_SIOCGIFCONF;
501 extern unsigned IOCTL_SIOCGIFDSTADDR;
502 extern unsigned IOCTL_SIOCGIFFLAGS;
503 extern unsigned IOCTL_SIOCGIFMETRIC;
504 extern unsigned IOCTL_SIOCGIFMTU;
505 extern unsigned IOCTL_SIOCGIFNETMASK;
506 extern unsigned IOCTL_SIOCGPGRP;
507 extern unsigned IOCTL_SIOCSIFADDR;
508 extern unsigned IOCTL_SIOCSIFBRDADDR;
509 extern unsigned IOCTL_SIOCSIFDSTADDR;
510 extern unsigned IOCTL_SIOCSIFFLAGS;
511 extern unsigned IOCTL_SIOCSIFMETRIC;
512 extern unsigned IOCTL_SIOCSIFMTU;
513 extern unsigned IOCTL_SIOCSIFNETMASK;
514 extern unsigned IOCTL_SIOCSPGRP;
515 extern unsigned IOCTL_TIOCCONS;
516 extern unsigned IOCTL_TIOCEXCL;
517 extern unsigned IOCTL_TIOCGETD;
518 extern unsigned IOCTL_TIOCGPGRP;
519 extern unsigned IOCTL_TIOCGWINSZ;
520 extern unsigned IOCTL_TIOCMBIC;
521 extern unsigned IOCTL_TIOCMBIS;
522 extern unsigned IOCTL_TIOCMGET;
523 extern unsigned IOCTL_TIOCMSET;
524 extern unsigned IOCTL_TIOCNOTTY;
525 extern unsigned IOCTL_TIOCNXCL;
526 extern unsigned IOCTL_TIOCOUTQ;
527 extern unsigned IOCTL_TIOCPKT;
528 extern unsigned IOCTL_TIOCSCTTY;
529 extern unsigned IOCTL_TIOCSETD;
530 extern unsigned IOCTL_TIOCSPGRP;
531 extern unsigned IOCTL_TIOCSTI;
532 extern unsigned IOCTL_TIOCSWINSZ;
533 extern unsigned IOCTL_SIOCGETSGCNT;
534 extern unsigned IOCTL_SIOCGETVIFCNT;
535 extern unsigned IOCTL_MTIOCGET;
536 extern unsigned IOCTL_MTIOCTOP;
537 extern unsigned IOCTL_SIOCADDRT;
538 extern unsigned IOCTL_SIOCDELRT;
539 extern unsigned IOCTL_SNDCTL_DSP_GETBLKSIZE;
540 extern unsigned IOCTL_SNDCTL_DSP_GETFMTS;
541 extern unsigned IOCTL_SNDCTL_DSP_NONBLOCK;
542 extern unsigned IOCTL_SNDCTL_DSP_POST;
543 extern unsigned IOCTL_SNDCTL_DSP_RESET;
544 extern unsigned IOCTL_SNDCTL_DSP_SETFMT;
545 extern unsigned IOCTL_SNDCTL_DSP_SETFRAGMENT;
546 extern unsigned IOCTL_SNDCTL_DSP_SPEED;
547 extern unsigned IOCTL_SNDCTL_DSP_STEREO;
548 extern unsigned IOCTL_SNDCTL_DSP_SUBDIVIDE;
549 extern unsigned IOCTL_SNDCTL_DSP_SYNC;
550 extern unsigned IOCTL_SNDCTL_FM_4OP_ENABLE;
551 extern unsigned IOCTL_SNDCTL_FM_LOAD_INSTR;
552 extern unsigned IOCTL_SNDCTL_MIDI_INFO;
553 extern unsigned IOCTL_SNDCTL_MIDI_PRETIME;
554 extern unsigned IOCTL_SNDCTL_SEQ_CTRLRATE;
555 extern unsigned IOCTL_SNDCTL_SEQ_GETINCOUNT;
556 extern unsigned IOCTL_SNDCTL_SEQ_GETOUTCOUNT;
557 extern unsigned IOCTL_SNDCTL_SEQ_NRMIDIS;
558 extern unsigned IOCTL_SNDCTL_SEQ_NRSYNTHS;
559 extern unsigned IOCTL_SNDCTL_SEQ_OUTOFBAND;
560 extern unsigned IOCTL_SNDCTL_SEQ_PANIC;
561 extern unsigned IOCTL_SNDCTL_SEQ_PERCMODE;
562 extern unsigned IOCTL_SNDCTL_SEQ_RESET;
563 extern unsigned IOCTL_SNDCTL_SEQ_RESETSAMPLES;
564 extern unsigned IOCTL_SNDCTL_SEQ_SYNC;
565 extern unsigned IOCTL_SNDCTL_SEQ_TESTMIDI;
566 extern unsigned IOCTL_SNDCTL_SEQ_THRESHOLD;
567 extern unsigned IOCTL_SNDCTL_SYNTH_INFO;
568 extern unsigned IOCTL_SNDCTL_SYNTH_MEMAVL;
569 extern unsigned IOCTL_SNDCTL_TMR_CONTINUE;
570 extern unsigned IOCTL_SNDCTL_TMR_METRONOME;
571 extern unsigned IOCTL_SNDCTL_TMR_SELECT;
572 extern unsigned IOCTL_SNDCTL_TMR_SOURCE;
573 extern unsigned IOCTL_SNDCTL_TMR_START;
574 extern unsigned IOCTL_SNDCTL_TMR_STOP;
575 extern unsigned IOCTL_SNDCTL_TMR_TEMPO;
576 extern unsigned IOCTL_SNDCTL_TMR_TIMEBASE;
577 extern unsigned IOCTL_SOUND_MIXER_READ_ALTPCM;
578 extern unsigned IOCTL_SOUND_MIXER_READ_BASS;
579 extern unsigned IOCTL_SOUND_MIXER_READ_CAPS;
580 extern unsigned IOCTL_SOUND_MIXER_READ_CD;
581 extern unsigned IOCTL_SOUND_MIXER_READ_DEVMASK;
582 extern unsigned IOCTL_SOUND_MIXER_READ_ENHANCE;
583 extern unsigned IOCTL_SOUND_MIXER_READ_IGAIN;
584 extern unsigned IOCTL_SOUND_MIXER_READ_IMIX;
585 extern unsigned IOCTL_SOUND_MIXER_READ_LINE1;
586 extern unsigned IOCTL_SOUND_MIXER_READ_LINE2;
587 extern unsigned IOCTL_SOUND_MIXER_READ_LINE3;
588 extern unsigned IOCTL_SOUND_MIXER_READ_LINE;
589 extern unsigned IOCTL_SOUND_MIXER_READ_LOUD;
590 extern unsigned IOCTL_SOUND_MIXER_READ_MIC;
591 extern unsigned IOCTL_SOUND_MIXER_READ_MUTE;
592 extern unsigned IOCTL_SOUND_MIXER_READ_OGAIN;
593 extern unsigned IOCTL_SOUND_MIXER_READ_PCM;
594 extern unsigned IOCTL_SOUND_MIXER_READ_RECLEV;
595 extern unsigned IOCTL_SOUND_MIXER_READ_RECMASK;
596 extern unsigned IOCTL_SOUND_MIXER_READ_RECSRC;
597 extern unsigned IOCTL_SOUND_MIXER_READ_SPEAKER;
598 extern unsigned IOCTL_SOUND_MIXER_READ_STEREODEVS;
599 extern unsigned IOCTL_SOUND_MIXER_READ_SYNTH;
600 extern unsigned IOCTL_SOUND_MIXER_READ_TREBLE;
601 extern unsigned IOCTL_SOUND_MIXER_READ_VOLUME;
602 extern unsigned IOCTL_SOUND_MIXER_WRITE_ALTPCM;
603 extern unsigned IOCTL_SOUND_MIXER_WRITE_BASS;
604 extern unsigned IOCTL_SOUND_MIXER_WRITE_CD;
605 extern unsigned IOCTL_SOUND_MIXER_WRITE_ENHANCE;
606 extern unsigned IOCTL_SOUND_MIXER_WRITE_IGAIN;
607 extern unsigned IOCTL_SOUND_MIXER_WRITE_IMIX;
608 extern unsigned IOCTL_SOUND_MIXER_WRITE_LINE1;
609 extern unsigned IOCTL_SOUND_MIXER_WRITE_LINE2;
610 extern unsigned IOCTL_SOUND_MIXER_WRITE_LINE3;
611 extern unsigned IOCTL_SOUND_MIXER_WRITE_LINE;
612 extern unsigned IOCTL_SOUND_MIXER_WRITE_LOUD;
613 extern unsigned IOCTL_SOUND_MIXER_WRITE_MIC;
614 extern unsigned IOCTL_SOUND_MIXER_WRITE_MUTE;
615 extern unsigned IOCTL_SOUND_MIXER_WRITE_OGAIN;
616 extern unsigned IOCTL_SOUND_MIXER_WRITE_PCM;
617 extern unsigned IOCTL_SOUND_MIXER_WRITE_RECLEV;
618 extern unsigned IOCTL_SOUND_MIXER_WRITE_RECSRC;
619 extern unsigned IOCTL_SOUND_MIXER_WRITE_SPEAKER;
620 extern unsigned IOCTL_SOUND_MIXER_WRITE_SYNTH;
621 extern unsigned IOCTL_SOUND_MIXER_WRITE_TREBLE;
622 extern unsigned IOCTL_SOUND_MIXER_WRITE_VOLUME;
623 extern unsigned IOCTL_SOUND_PCM_READ_BITS;
624 extern unsigned IOCTL_SOUND_PCM_READ_CHANNELS;
625 extern unsigned IOCTL_SOUND_PCM_READ_FILTER;
626 extern unsigned IOCTL_SOUND_PCM_READ_RATE;
627 extern unsigned IOCTL_SOUND_PCM_WRITE_CHANNELS;
628 extern unsigned IOCTL_SOUND_PCM_WRITE_FILTER;
629 extern unsigned IOCTL_VT_ACTIVATE;
630 extern unsigned IOCTL_VT_GETMODE;
631 extern unsigned IOCTL_VT_OPENQRY;
632 extern unsigned IOCTL_VT_RELDISP;
633 extern unsigned IOCTL_VT_SETMODE;
634 extern unsigned IOCTL_VT_WAITACTIVE;
635 extern unsigned IOCTL_GIO_SCRNMAP;
636 extern unsigned IOCTL_KDDISABIO;
637 extern unsigned IOCTL_KDENABIO;
638 extern unsigned IOCTL_KDGETLED;
639 extern unsigned IOCTL_KDGETMODE;
640 extern unsigned IOCTL_KDGKBMODE;
641 extern unsigned IOCTL_KDGKBTYPE;
642 extern unsigned IOCTL_KDMKTONE;
643 extern unsigned IOCTL_KDSETLED;
644 extern unsigned IOCTL_KDSETMODE;
645 extern unsigned IOCTL_KDSKBMODE;
647 extern const int si_SEGV_MAPERR;
648 extern const int si_SEGV_ACCERR;
650 extern const unsigned MD5_CTX_sz;
651 extern const unsigned MD5_return_length;
653 #define SHA2_EXTERN(LEN) \
654 extern const unsigned SHA##LEN##_CTX_sz; \
655 extern const unsigned SHA##LEN##_return_length; \
656 extern const unsigned SHA##LEN##_block_length; \
657 extern const unsigned SHA##LEN##_digest_length
659 SHA2_EXTERN(224);
660 SHA2_EXTERN(256);
661 SHA2_EXTERN(384);
662 SHA2_EXTERN(512);
664 #undef SHA2_EXTERN
666 struct __sanitizer_cap_rights {
667 u64 cr_rights[2];
670 typedef struct __sanitizer_cap_rights __sanitizer_cap_rights_t;
671 extern unsigned struct_cap_rights_sz;
673 extern unsigned struct_fstab_sz;
674 extern unsigned struct_StringList_sz;
675 } // namespace __sanitizer
677 # define CHECK_TYPE_SIZE(TYPE) \
678 COMPILER_CHECK(sizeof(__sanitizer_##TYPE) == sizeof(TYPE))
680 # define CHECK_SIZE_AND_OFFSET(CLASS, MEMBER) \
681 COMPILER_CHECK(sizeof(((__sanitizer_##CLASS *)NULL)->MEMBER) == \
682 sizeof(((CLASS *)NULL)->MEMBER)); \
683 COMPILER_CHECK(offsetof(__sanitizer_##CLASS, MEMBER) == \
684 offsetof(CLASS, MEMBER))
686 // For sigaction, which is a function and struct at the same time,
687 // and thus requires explicit "struct" in sizeof() expression.
688 # define CHECK_STRUCT_SIZE_AND_OFFSET(CLASS, MEMBER) \
689 COMPILER_CHECK(sizeof(((struct __sanitizer_##CLASS *)NULL)->MEMBER) == \
690 sizeof(((struct CLASS *)NULL)->MEMBER)); \
691 COMPILER_CHECK(offsetof(struct __sanitizer_##CLASS, MEMBER) == \
692 offsetof(struct CLASS, MEMBER))
694 # define SIGACTION_SYMNAME sigaction
696 #endif
698 #endif // SANITIZER_FREEBSD