abi.cc -> abi_type.cc
[musl-tables] / abi.cc
1 #define _GNU_SOURCE 1
2 #define _LARGEFILE64_SOURCE 1
3 #define _FILE_OFFSET_BITS 64
4 #define SYSLOG_NAMES 1
5 #include <stddef.h>
6 #include <sys/types.h>
7
8 #include <aio.h>
9 #include <alloca.h>
10 #include <ar.h>
11 #include <arpa/ftp.h>
12 #include <arpa/inet.h>
13 #include <arpa/nameser.h>
14 #include <arpa/nameser_compat.h>
15 #include <arpa/telnet.h>
16 #include <arpa/tftp.h>
17 #include <assert.h>
18 #include <byteswap.h>
19 #include <complex.h>
20 #include <cpio.h>
21 #include <crypt.h>
22 #include <ctype.h>
23 #include <dirent.h>
24 #include <dlfcn.h>
25 #include <elf.h>
26 #include <endian.h>
27 #include <err.h>
28 #include <errno.h>
29 #include <fcntl.h>
30 #include <features.h>
31 #include <fenv.h>
32 #include <float.h>
33 #include <fmtmsg.h>
34 #include <fnmatch.h>
35 #include <ftw.h>
36 #include <getopt.h>
37 #include <glob.h>
38 #include <grp.h>
39 #include <iconv.h>
40 #include <ifaddrs.h>
41 #include <inttypes.h>
42 #include <iso646.h>
43 #include <langinfo.h>
44 #include <lastlog.h>
45 #include <libgen.h>
46 #include <libintl.h>
47 #include <limits.h>
48 #include <link.h>
49 #include <locale.h>
50 #include <malloc.h>
51 #include <math.h>
52 #include <memory.h>
53 #include <mntent.h>
54 #include <monetary.h>
55 #include <mqueue.h>
56 #include <net/ethernet.h>
57 #include <net/if.h>
58 #include <net/if_arp.h>
59 #include <net/route.h>
60 #include <netdb.h>
61 #include <netinet/ether.h>
62 #include <netinet/icmp6.h>
63 #include <netinet/if_ether.h>
64 #include <netinet/igmp.h>
65 #include <netinet/in.h>
66 #include <netinet/in_systm.h>
67 #include <netinet/ip.h>
68 #include <netinet/ip6.h>
69 #include <netinet/ip_icmp.h>
70 #include <netinet/tcp.h>
71 #include <netinet/udp.h>
72 #include <netpacket/packet.h>
73 #include <nl_types.h>
74 #include <paths.h>
75 #include <poll.h>
76 #include <pthread.h>
77 #include <pty.h>
78 #include <pwd.h>
79 #include <regex.h>
80 #include <resolv.h>
81 #include <sched.h>
82 #include <scsi/scsi.h>
83 #include <scsi/scsi_ioctl.h>
84 #include <scsi/sg.h>
85 #include <search.h>
86 #include <semaphore.h>
87 #include <setjmp.h>
88 #include <shadow.h>
89 #include <signal.h>
90 #include <spawn.h>
91 //#include <stdalign.h>
92 #include <stdarg.h>
93 #include <stdbool.h>
94 #include <stddef.h>
95 #include <stdint.h>
96 #include <stdio.h>
97 #include <stdio_ext.h>
98 #include <stdlib.h>
99 //#include <stdnoreturn.h>
100 #include <string.h>
101 #include <strings.h>
102 #include <stropts.h>
103 #include <sys/acct.h>
104 //#include <sys/auxv.h>
105 //#include <sys/cachectl.h>
106 #include <sys/dir.h>
107 #include <sys/epoll.h>
108 //#include <sys/errno.h>
109 #include <sys/eventfd.h>
110 #include <sys/fanotify.h>
111 //#include <sys/fcntl.h>
112 #include <sys/file.h>
113 #include <sys/fsuid.h>
114 #include <sys/inotify.h>
115 #include <sys/io.h>
116 #include <sys/ioctl.h>
117 #include <sys/ipc.h>
118 #include <sys/kd.h>
119 #include <sys/klog.h>
120 #include <sys/mman.h>
121 #include <sys/mount.h>
122 #include <sys/msg.h>
123 #include <sys/mtio.h>
124 #include <sys/param.h>
125 #include <sys/personality.h>
126 //#include <sys/poll.h>
127 #include <sys/prctl.h>
128 #include <sys/procfs.h>
129 #include <sys/ptrace.h>
130 #include <sys/quota.h>
131 #include <sys/reboot.h>
132 #include <sys/reg.h>
133 #include <sys/resource.h>
134 #include <sys/select.h>
135 #include <sys/sem.h>
136 #include <sys/sendfile.h>
137 #include <sys/shm.h>
138 //#include <sys/signal.h>
139 #include <sys/signalfd.h>
140 #include <sys/socket.h>
141 //#include <sys/soundcard.h>
142 #include <sys/stat.h>
143 #include <sys/statfs.h>
144 #include <sys/statvfs.h>
145 #include <sys/stropts.h>
146 #include <sys/swap.h>
147 #include <sys/syscall.h>
148 #include <sys/sysinfo.h>
149 #include <sys/syslog.h>
150 #include <sys/sysmacros.h>
151 //#include <sys/termios.h>
152 #include <sys/time.h>
153 #include <sys/timeb.h>
154 #include <sys/timerfd.h>
155 #include <sys/times.h>
156 #include <sys/timex.h>
157 #include <sys/ttydefaults.h>
158 #include <sys/types.h>
159 #include <sys/ucontext.h>
160 #include <sys/uio.h>
161 #include <sys/un.h>
162 #include <sys/user.h>
163 #include <sys/utsname.h>
164 #include <sys/vfs.h>
165 #include <sys/vt.h>
166 #include <sys/wait.h>
167 #include <sys/xattr.h>
168 #include <syscall.h>
169 #include <sysexits.h>
170 #include <syslog.h>
171 #include <tar.h>
172 #include <termios.h>
173 #include <tgmath.h>
174 //#include <threads.h>
175 #include <time.h>
176 #include <uchar.h>
177 #include <ucontext.h>
178 #include <ulimit.h>
179 #include <unistd.h>
180 #include <utime.h>
181 #include <utmp.h>
182 #include <utmpx.h>
183 #include <values.h>
184 //#include <wait.h>
185 #include <wchar.h>
186 #include <wctype.h>
187 #include <wordexp.h>
188 typedef long long long_long; typedef long double long_double;
189 struct size{int i;}; struct align{int i;};
190 #define p(s,t) void x_##t(s t x, s t* ptr, size(*y)[sizeof(s t)], align(*z)[__alignof__(s t)]){}
191 #define pp(s,t) void x_##t(s t* ptr, size(*y)[sizeof(s t*)], align(*z)[__alignof__(s t*)]){}
192 p(,ACTION)
193 p(,CODE)
194 pp(,DIR)
195 p(,Dl_info)
196 p(,ENTRY)
197 p(,Elf32_Addr)
198 p(,Elf32_Conflict)
199 p(,Elf32_Dyn)
200 p(,Elf32_Ehdr)
201 p(,Elf32_Half)
202 p(,Elf32_Lib)
203 p(,Elf32_Move)
204 p(,Elf32_Nhdr)
205 p(,Elf32_Off)
206 p(,Elf32_Phdr)
207 p(,Elf32_RegInfo)
208 p(,Elf32_Rel)
209 p(,Elf32_Rela)
210 p(,Elf32_Section)
211 p(,Elf32_Shdr)
212 p(,Elf32_Sword)
213 p(,Elf32_Sxword)
214 p(,Elf32_Sym)
215 p(,Elf32_Syminfo)
216 p(,Elf32_Verdaux)
217 p(,Elf32_Verdef)
218 p(,Elf32_Vernaux)
219 p(,Elf32_Verneed)
220 p(,Elf32_Versym)
221 p(,Elf32_Word)
222 p(,Elf32_Xword)
223 p(,Elf32_auxv_t)
224 p(,Elf32_gptab)
225 p(,Elf64_Addr)
226 p(,Elf64_Dyn)
227 p(,Elf64_Ehdr)
228 p(,Elf64_Half)
229 p(,Elf64_Lib)
230 p(,Elf64_Move)
231 p(,Elf64_Nhdr)
232 p(,Elf64_Off)
233 p(,Elf64_Phdr)
234 p(,Elf64_Rel)
235 p(,Elf64_Rela)
236 p(,Elf64_Section)
237 p(,Elf64_Shdr)
238 p(,Elf64_Sword)
239 p(,Elf64_Sxword)
240 p(,Elf64_Sym)
241 p(,Elf64_Syminfo)
242 p(,Elf64_Verdaux)
243 p(,Elf64_Verdef)
244 p(,Elf64_Vernaux)
245 p(,Elf64_Verneed)
246 p(,Elf64_Versym)
247 p(,Elf64_Word)
248 p(,Elf64_Xword)
249 p(,Elf64_auxv_t)
250 p(,Elf_Options)
251 p(,Elf_Options_Hw)
252 p(,Elf_Symndx)
253 pp(,FILE)
254 p(,HEADER)
255 p(,Sg_io_hdr)
256 //p(,Sg_io_vec)
257 p(,Sg_req_info)
258 p(,Sg_scsi_id)
259 p(,VISIT)
260 //p(,__isoc_va_list)
261 p(,__jmp_buf)
262 p(,blkcnt_t)
263 p(,blksize_t)
264 p(,bool)
265 p(,caddr_t)
266 p(,cc_t)
267 p(,char)
268 p(,char16_t)
269 p(,char32_t)
270 p(,clock_t)
271 p(,clockid_t)
272 //p(,cnd_t)
273 p(,comp_t)
274 p(,cpu_set_t)
275 p(,dev_t)
276 p(,div_t)
277 p(,double)
278 p(,double_t)
279 p(,elf_fpregset_t)
280 p(,elf_greg_t)
281 p(,elf_gregset_t)
282 p(,epoll_data_t)
283 p(,eventfd_t)
284 p(,fd_mask)
285 p(,fd_set)
286 p(,fenv_t)
287 p(,fexcept_t)
288 p(,float)
289 p(,float_t)
290 p(,fpos_t)
291 p(,fpregset_t)
292 p(,fsblkcnt_t)
293 p(,fsfilcnt_t)
294 p(,fsid_t)
295 p(,gid_t)
296 p(,glob_t)
297 p(,greg_t)
298 p(,gregset_t)
299 p(,iconv_t)
300 p(,id_t)
301 p(,idtype_t)
302 p(,imaxdiv_t)
303 p(,in_addr_t)
304 p(,in_port_t)
305 p(,ino_t)
306 p(,int)
307 p(,int16_t)
308 p(,int32_t)
309 p(,int64_t)
310 p(,int8_t)
311 p(,int_fast16_t)
312 p(,int_fast32_t)
313 p(,int_fast64_t)
314 p(,int_fast8_t)
315 p(,int_least16_t)
316 p(,int_least32_t)
317 p(,int_least64_t)
318 p(,int_least8_t)
319 p(,intmax_t)
320 p(,intptr_t)
321 p(,jmp_buf)
322 p(,key_t)
323 p(,ldiv_t)
324 p(,lldiv_t)
325 p(,locale_t)
326 p(,long)
327 p(,long_double)
328 p(,long_long)
329 p(,lwpid_t)
330 p(,max_align_t)
331 p(,mbstate_t)
332 p(,mcontext_t)
333 p(,mode_t)
334 p(,mqd_t)
335 p(,msglen_t)
336 p(,msgqnum_t)
337 //p(,mtx_t)
338 p(,n_long)
339 p(,n_short)
340 p(,n_time)
341 p(,nfds_t)
342 p(,nl_catd)
343 p(,nl_item)
344 p(,nlink_t)
345 p(,ns_cert_types)
346 p(,ns_class)
347 p(,ns_flag)
348 p(,ns_key_types)
349 p(,ns_msg)
350 p(,ns_opcode)
351 p(,ns_rcode)
352 p(,ns_rr)
353 p(,ns_sect)
354 //p(,ns_tcp_tsig_state)
355 //p(,ns_tsig_key)
356 p(,ns_type)
357 p(,ns_update_operation)
358 p(,off_t)
359 //p(,once_flag)
360 p(,pid_t)
361 p(,posix_spawn_file_actions_t)
362 p(,posix_spawnattr_t)
363 p(,prfpregset_t)
364 p(,prgregset_t)
365 p(,prpsinfo_t)
366 p(,prstatus_t)
367 p(,psaddr_t)
368 p(,pthread_attr_t)
369 p(,pthread_barrier_t)
370 p(,pthread_barrierattr_t)
371 p(,pthread_cond_t)
372 p(,pthread_condattr_t)
373 p(,pthread_key_t)
374 p(,pthread_mutex_t)
375 p(,pthread_mutexattr_t)
376 p(,pthread_once_t)
377 p(,pthread_rwlock_t)
378 p(,pthread_rwlockattr_t)
379 p(,pthread_spinlock_t)
380 p(,pthread_t)
381 p(,ptrdiff_t)
382 p(,quad_t)
383 p(,regex_t)
384 p(,register_t)
385 p(,regmatch_t)
386 p(,regoff_t)
387 p(,res_state)
388 p(,rlim_t)
389 p(,sa_family_t)
390 p(,sem_t)
391 p(,sg_io_hdr_t)
392 p(,sg_iovec_t)
393 p(,sg_req_info_t)
394 p(,shmatt_t)
395 p(,short)
396 p(,sig_atomic_t)
397 p(,sig_t)
398 p(,sighandler_t)
399 p(,siginfo_t)
400 p(,sigjmp_buf)
401 p(,sigset_t)
402 p(,size_t)
403 p(,socklen_t)
404 p(,speed_t)
405 p(,ssize_t)
406 p(,stack_t)
407 p(struct,FTW)
408 //p(struct,__fsid_t)
409 p(struct,__jmp_buf_tag)
410 //p(struct,__mbstate_t)
411 p(struct,__ns_msg)
412 p(struct,__ns_rr)
413 //p(struct,__ptcb)
414 p(struct,__res_state)
415 //p(struct,__sigset_t)
416 //p(struct,__ucontext)
417 p(struct,_fpstate)
418 p(struct,_ns_flagdata)
419 p(struct,acct)
420 p(struct,acct_v3)
421 p(struct,addrinfo)
422 p(struct,aiocb)
423 p(struct,ar_hdr)
424 p(struct,arpd_request)
425 p(struct,arphdr)
426 p(struct,arpreq)
427 p(struct,arpreq_old)
428 p(struct,bandinfo)
429 p(struct,ccs_modesel_head)
430 p(struct,cmsghdr)
431 //p(struct,cpu_set_t)
432 p(struct,crypt_data)
433 p(struct,dirent)
434 p(struct,dl_phdr_info)
435 p(struct,dqblk)
436 p(struct,dqinfo)
437 p(struct,elf_prpsinfo)
438 p(struct,elf_prstatus)
439 p(struct,elf_siginfo)
440 p(struct,entry)
441 p(struct,epoll_event)
442 p(struct,ether_addr)
443 p(struct,ether_arp)
444 p(struct,ether_header)
445 p(struct,ethhdr)
446 p(struct,f_owner_ex)
447 p(struct,fanotify_event_metadata)
448 p(struct,fanotify_response)
449 p(struct,flock)
450 p(struct,group)
451 p(struct,group_filter)
452 p(struct,group_req)
453 p(struct,group_source_req)
454 p(struct,hostent)
455 p(struct,hsearch_data)
456 p(struct,icmp)
457 p(struct,icmp6_filter)
458 p(struct,icmp6_hdr)
459 p(struct,icmp6_router_renum)
460 p(struct,icmp_ra_addr)
461 p(struct,icmphdr)
462 p(struct,if_nameindex)
463 p(struct,ifaddr)
464 p(struct,ifaddrs)
465 p(struct,ifconf)
466 p(struct,ifmap)
467 p(struct,ifreq)
468 p(struct,igmp)
469 //p(struct,ih_idseq)
470 //p(struct,ih_pmtu)
471 //p(struct,ih_rtradv)
472 p(struct,in6_addr)
473 p(struct,in6_pktinfo)
474 p(struct,in6_rtmsg)
475 p(struct,in_addr)
476 p(struct,in_pktinfo)
477 p(struct,inotify_event)
478 p(struct,iovec)
479 p(struct,ip)
480 p(struct,ip6_dest)
481 p(struct,ip6_ext)
482 p(struct,ip6_frag)
483 p(struct,ip6_hbh)
484 p(struct,ip6_hdr)
485 //p(struct,ip6_hdrctl)
486 p(struct,ip6_mtuinfo)
487 p(struct,ip6_opt)
488 p(struct,ip6_opt_jumbo)
489 p(struct,ip6_opt_nsap)
490 p(struct,ip6_opt_router)
491 p(struct,ip6_opt_tunnel)
492 p(struct,ip6_rthdr)
493 p(struct,ip6_rthdr0)
494 p(struct,ip_mreq)
495 p(struct,ip_mreq_source)
496 p(struct,ip_mreqn)
497 p(struct,ip_msfilter)
498 p(struct,ip_opts)
499 p(struct,ip_timestamp)
500 p(struct,ipc_perm)
501 p(struct,iphdr)
502 p(struct,ipv6_mreq)
503 p(struct,itimerspec)
504 p(struct,itimerval)
505 p(struct,lastlog)
506 p(struct,lconv)
507 p(struct,linger)
508 p(struct,link_map)
509 p(struct,mld_hdr)
510 p(struct,mmsghdr)
511 p(struct,mntent)
512 p(struct,mq_attr)
513 p(struct,msgbuf)
514 p(struct,msghdr)
515 p(struct,msginfo)
516 p(struct,msqid_ds)
517 p(struct,mt_tape_info)
518 p(struct,mtconfiginfo)
519 p(struct,mtget)
520 p(struct,mtop)
521 p(struct,mtpos)
522 p(struct,nd_neighbor_advert)
523 p(struct,nd_neighbor_solicit)
524 p(struct,nd_opt_adv_interval)
525 p(struct,nd_opt_hdr)
526 p(struct,nd_opt_home_agent_info)
527 p(struct,nd_opt_mtu)
528 p(struct,nd_opt_prefix_info)
529 p(struct,nd_opt_rd_hdr)
530 p(struct,nd_redirect)
531 p(struct,nd_router_advert)
532 p(struct,nd_router_solicit)
533 p(struct,netent)
534 p(struct,ns_tcp_tsig_state)
535 p(struct,ns_tsig_key)
536 p(struct,ntptimeval)
537 p(struct,option)
538 p(struct,packet_mreq)
539 p(struct,passwd)
540 p(struct,pollfd)
541 p(struct,prctl_mm_map)
542 p(struct,protoent)
543 //p(struct,ptrace_peeksiginfo_args)
544 p(struct,qelem)
545 p(struct,r_debug)
546 p(struct,re_pattern_buffer)
547 p(struct,res_sym)
548 p(struct,rlimit)
549 p(struct,rr_pco_match)
550 p(struct,rr_pco_use)
551 p(struct,rr_result)
552 p(struct,rtentry)
553 p(struct,rusage)
554 p(struct,sched_param)
555 p(struct,sembuf)
556 p(struct,semid_ds)
557 p(struct,seminfo)
558 p(struct,servent)
559 p(struct,sg_header)
560 p(struct,sg_io_hdr)
561 p(struct,sg_iovec)
562 p(struct,sg_req_info)
563 p(struct,sg_scsi_id)
564 p(struct,shm_info)
565 p(struct,shmid_ds)
566 p(struct,shminfo)
567 p(struct,sigaction)
568 p(struct,sigaltstack)
569 p(struct,sigcontext)
570 p(struct,sigevent)
571 p(struct,signalfd_siginfo)
572 p(struct,sockaddr)
573 p(struct,sockaddr_in)
574 p(struct,sockaddr_in6)
575 p(struct,sockaddr_ll)
576 p(struct,sockaddr_storage)
577 p(struct,sockaddr_un)
578 p(struct,spwd)
579 p(struct,stat)
580 p(struct,statfs)
581 p(struct,statvfs)
582 p(struct,str_list)
583 p(struct,str_mlist)
584 p(struct,strbuf)
585 p(struct,strfdinsert)
586 p(struct,strioctl)
587 p(struct,strpeek)
588 p(struct,strrecvfd)
589 p(struct,sysinfo)
590 p(struct,tcp_info)
591 p(struct,tcp_md5sig)
592 p(struct,tcphdr)
593 p(struct,termios)
594 p(struct,tftphdr)
595 p(struct,timeb)
596 p(struct,timespec)
597 p(struct,timestamp)
598 p(struct,timeval)
599 p(struct,timex)
600 p(struct,timezone)
601 p(struct,tm)
602 p(struct,tms)
603 p(struct,ucred)
604 p(struct,udphdr)
605 p(struct,user)
606 p(struct,user_fpregs_struct)
607 p(struct,user_regs_struct)
608 p(struct,utimbuf)
609 p(struct,utmpx)
610 p(struct,utsname)
611 p(struct,winsize)
612 p(,suseconds_t)
613 p(,tcflag_t)
614 //p(,tcp_seq)
615 //p(,thrd_start_t)
616 //p(,thrd_t)
617 p(,time_t)
618 p(,timer_t)
619 //p(,tss_dtor_t)
620 //p(,tss_t)
621 p(,u_char)
622 p(,u_int)
623 p(,u_int16_t)
624 p(,u_int32_t)
625 p(,u_int64_t)
626 p(,u_int8_t)
627 p(,u_long)
628 p(,u_quad_t)
629 p(,u_short)
630 p(,ucontext_t)
631 p(,uid_t)
632 p(,uint)
633 p(,uint16_t)
634 p(,uint32_t)
635 p(,uint64_t)
636 p(,uint8_t)
637 p(,uint_fast16_t)
638 p(,uint_fast32_t)
639 p(,uint_fast64_t)
640 p(,uint_fast8_t)
641 p(,uint_least16_t)
642 p(,uint_least32_t)
643 p(,uint_least64_t)
644 p(,uint_least8_t)
645 p(,uintmax_t)
646 p(,uintptr_t)
647 p(,ulong)
648 //p(union,_G_fpos64_t)
649 p(union,epoll_data)
650 p(union,sigval)
651 p(,useconds_t)
652 p(,ushort)
653 p(,va_list)
654 pp(,void)
655 p(,wchar_t)
656 p(,wctrans_t)
657 p(,wctype_t)
658 p(,wint_t)
659 p(,wordexp_t)