fix posix headers (sys/, arpa/,..)
[musl-tables] / sizeof.c
1 #define _GNU_SOURCE 1
2 #define _LARGEFILE64_SOURCE 1 
3 #define _FILE_OFFSET_BITS 64 
4
5 #include <stddef.h>
6 #include <stdint.h>
7 #include <sys/types.h>
8
9 #include <arpa/nameser.h>
10 //#include <bits/alltypes.h>
11 //#include <bits/fenv.h>
12 #include <fenv.h>
13 //#include <bits/in.h>
14 #include <netinet/in.h>
15 //#include <bits/ioctl.h>
16 #include <sys/ioctl.h>
17 //#include <bits/ipc.h>
18 #include <sys/ipc.h>
19 //#include <bits/msg.h>
20 #include <sys/msg.h>
21 //#include <bits/pthread.h>
22 #include <pthread.h>
23 //#include <bits/setjmp.h>
24 //#include <bits/shm.h>
25 #include <sys/shm.h>
26 //#include <bits/signal.h>
27 //#include <bits/socket.h>
28 //#include <bits/stat.h>
29 #include <sys/stat.h>
30 //#include <bits/statfs.h>
31 #include <sys/statfs.h>
32 //#include <bits/termios.h>
33 //#include <bits/user.h>
34 #include <sys/user.h>
35 #include <dirent.h>
36 #include <elf.h>
37 #include <fcntl.h>
38 #include <ftw.h>
39 #include <getopt.h>
40 #include <glob.h>
41 #include <grp.h>
42 #include <iconv.h>
43 #include <inttypes.h>
44 #include <linux/fb.h>
45 #include <linux/kd.h>
46 #include <linux/loop.h>
47 #include <linux/vt.h>
48 #include <locale.h>
49 #include <mntent.h>
50 #include <mqueue.h>
51 #include <net/ethernet.h>
52 #include <net/if.h>
53 #include <net/if_arp.h>
54 #include <net/route.h>
55 #include <netdb.h>
56 #include <netinet/icmp6.h>
57 #include <netinet/if_ether.h>
58 #include <netinet/in.h>
59 #include <netinet/ip.h>
60 #include <netinet/ip6.h>
61 #include <netinet/ip_icmp.h>
62 #include <netinet/udp.h>
63 #include <netpacket/packet.h>
64 #include <nl_types.h>
65 #include <poll.h>
66 #include <pwd.h>
67 #include <regex.h>
68 #include <resolv.h>
69 #include <sched.h>
70 #include <semaphore.h>
71 #include <setjmp.h>
72 #include <shadow.h>
73 #include <signal.h>
74 #include <spawn.h>
75 #include <stdbool.h>
76 #include <stdint.h>
77 #include <stdio.h>
78 #include <stdlib.h>
79 #include <sys/epoll.h>
80 #include <sys/eventfd.h>
81 #include <sys/inotify.h>
82 #include <sys/msg.h>
83 #include <sys/procfs.h>
84 #include <sys/resource.h>
85 #include <sys/select.h>
86 #include <sys/sem.h>
87 #include <sys/shm.h>
88 #include <sys/signalfd.h>
89 #include <sys/socket.h>
90 #include <sys/sysinfo.h>
91 #include <sys/time.h>
92 #include <sys/times.h>
93 #include <sys/timex.h>
94 #include <sys/types.h>
95 #include <sys/un.h>
96 #include <sys/utsname.h>
97 #include <sys/wait.h>
98 #include <syslog.h>
99 #include <termios.h>
100 #include <time.h>
101 #include <utime.h>
102 #include <utmpx.h>
103 #include <wchar.h>
104 #include <wordexp.h>
105 #define p(x) printf("%s\t%u\n", #x, sizeof(x));
106 int main(){
107 //p(CODE)
108 //p(DIR)
109 p(Elf32_Addr)
110 p(Elf32_Conflict)
111 p(Elf32_Dyn)
112 p(Elf32_Ehdr)
113 p(Elf32_Half)
114 p(Elf32_Lib)
115 p(Elf32_Move)
116 p(Elf32_Nhdr)
117 p(Elf32_Off)
118 p(Elf32_Phdr)
119 p(Elf32_RegInfo)
120 p(Elf32_Rel)
121 p(Elf32_Rela)
122 p(Elf32_Section)
123 p(Elf32_Shdr)
124 p(Elf32_Sword)
125 p(Elf32_Sxword)
126 p(Elf32_Sym)
127 p(Elf32_Syminfo)
128 p(Elf32_Verdaux)
129 p(Elf32_Verdef)
130 p(Elf32_Vernaux)
131 p(Elf32_Verneed)
132 p(Elf32_Versym)
133 p(Elf32_Word)
134 p(Elf32_Xword)
135 p(Elf32_auxv_t)
136 p(Elf32_gptab)
137 p(Elf64_Addr)
138 p(Elf64_Dyn)
139 p(Elf64_Ehdr)
140 p(Elf64_Half)
141 p(Elf64_Lib)
142 p(Elf64_Move)
143 p(Elf64_Nhdr)
144 p(Elf64_Off)
145 p(Elf64_Phdr)
146 p(Elf64_Rel)
147 p(Elf64_Rela)
148 p(Elf64_Section)
149 p(Elf64_Shdr)
150 p(Elf64_Sword)
151 p(Elf64_Sxword)
152 p(Elf64_Sym)
153 p(Elf64_Syminfo)
154 p(Elf64_Verdaux)
155 p(Elf64_Verdef)
156 p(Elf64_Vernaux)
157 p(Elf64_Verneed)
158 p(Elf64_Versym)
159 p(Elf64_Word)
160 p(Elf64_Xword)
161 p(Elf64_auxv_t)
162 p(Elf_Options)
163 p(Elf_Options_Hw)
164 //p(FILE)
165 p(HEADER)
166 p(__uint16_t)
167 p(__uint32_t)
168 p(__uint64_t)
169 p(blkcnt_t)
170 p(blksize_t)
171 p(bool)
172 p(caddr_t)
173 p(cc_t)
174 p(clock_t)
175 p(clockid_t)
176 p(dev_t)
177 p(div_t)
178 p(elf_fpregset_t)
179 //p(elf_fpxregset_t)
180 p(elf_greg_t)
181 p(elf_gregset_t)
182 p(epoll_data_t)
183 p(eventfd_t)
184 p(fd_mask)
185 p(fd_set)
186 p(fenv_t)
187 p(fexcept_t)
188 p(fpos_t)
189 p(fsblkcnt_t)
190 p(fsfilcnt_t)
191 p(gid_t)
192 p(glob_t)
193 p(iconv_t)
194 p(id_t)
195 p(idtype_t)
196 p(imaxdiv_t)
197 p(in_addr_t)
198 p(in_port_t)
199 p(ino_t)
200 p(int16_t)
201 p(int32_t)
202 p(int64_t)
203 p(int8_t)
204 p(int_fast16_t)
205 p(int_fast32_t)
206 p(int_fast64_t)
207 p(int_fast8_t)
208 p(int_least16_t)
209 p(int_least32_t)
210 p(int_least64_t)
211 p(int_least8_t)
212 p(intmax_t)
213 p(intptr_t)
214 p(jmp_buf)
215 p(key_t)
216 p(ldiv_t)
217 p(lldiv_t)
218 p(locale_t)
219 p(lwpid_t)
220 p(mbstate_t)
221 p(mcontext_t)
222 p(mode_t)
223 p(mqd_t)
224 p(msglen_t)
225 p(msgqnum_t)
226 p(nfds_t)
227 p(nl_catd)
228 p(nl_item)
229 p(nlink_t)
230 p(ns_cert_types)
231 p(ns_class)
232 p(ns_flag)
233 p(ns_key_types)
234 p(ns_msg)
235 p(ns_opcode)
236 p(ns_rcode)
237 p(ns_rr)
238 p(ns_sect)
239 p(ns_tcp_tsig_state)
240 p(ns_tsig_key)
241 p(ns_type)
242 p(ns_update_operation)
243 p(off_t)
244 p(pid_t)
245 p(posix_spawn_file_actions_t)
246 p(posix_spawnattr_t)
247 p(prfpregset_t)
248 p(prgregset_t)
249 p(prpsinfo_t)
250 p(prstatus_t)
251 p(psaddr_t)
252 p(pthread_attr_t)
253 p(pthread_barrier_t)
254 p(pthread_barrierattr_t)
255 p(pthread_cond_t)
256 p(pthread_condattr_t)
257 p(pthread_key_t)
258 p(pthread_mutex_t)
259 p(pthread_mutexattr_t)
260 p(pthread_once_t)
261 p(pthread_rwlock_t)
262 p(pthread_rwlockattr_t)
263 p(pthread_spinlock_t)
264 p(pthread_t)
265 p(ptrdiff_t)
266 p(quad_t)
267 p(regex_t)
268 p(register_t)
269 p(regmatch_t)
270 p(regoff_t)
271 p(res_state)
272 p(rlim_t)
273 p(sa_family_t)
274 p(scrnmap_t)
275 //p(sem_t)
276 p(sig_atomic_t)
277 p(sighandler_t)
278 p(siginfo_t)
279 p(sigjmp_buf)
280 p(sigset_t)
281 p(size_t)
282 p(socklen_t)
283 p(speed_t)
284 p(ssize_t)
285 p(stack_t)
286 p(struct FTW)
287 //p(struct __CODE)
288 //p(struct __fpstate)
289 p(struct __ns_msg)
290 p(struct __ns_rr)
291 //p(struct __ptcb)
292 p(struct __res_state)
293 //p(struct __siginfo)
294 //p(struct __ucontext)
295 p(struct _ns_flagdata)
296 p(struct addrinfo)
297 p(struct arpd_request)
298 p(struct arphdr)
299 p(struct arpreq)
300 p(struct arpreq_old)
301 p(struct cmsghdr)
302 p(struct console_font_op)
303 p(struct consolefontdesc)
304 p(struct dirent)
305 p(struct elf_prpsinfo)
306 p(struct elf_prstatus)
307 p(struct elf_siginfo)
308 p(struct epoll_event)
309 p(struct ether_addr)
310 p(struct ether_arp)
311 p(struct ether_header)
312 p(struct ethhdr)
313 p(struct fb_bitfield)
314 p(struct fb_cmap)
315 p(struct fb_con2fbmap)
316 p(struct fb_copyarea)
317 p(struct fb_cursor)
318 p(struct fb_fillrect)
319 p(struct fb_fix_screeninfo)
320 p(struct fb_image)
321 p(struct fb_var_screeninfo)
322 p(struct fb_vblank)
323 p(struct fbcurpos)
324 p(struct flock)
325 p(struct group)
326 p(struct hostent)
327 p(struct icmp)
328 p(struct icmp6_filter)
329 p(struct icmp6_hdr)
330 p(struct icmp6_router_renum)
331 p(struct icmp_ra_addr)
332 p(struct icmphdr)
333 p(struct if_nameindex)
334 p(struct ifaddr)
335 p(struct ifconf)
336 p(struct ifmap)
337 p(struct ifreq)
338 p(struct ih_idseq)
339 p(struct ih_pmtu)
340 p(struct ih_rtradv)
341 p(struct in6_addr)
342 //p(struct in6_mutinfo)
343 p(struct in6_pktinfo)
344 p(struct in6_rtmsg)
345 p(struct in_addr)
346 p(struct in_pktinfo)
347 p(struct inotify_event)
348 p(struct iovec)
349 p(struct ip)
350 p(struct ip6_dest)
351 p(struct ip6_ext)
352 p(struct ip6_frag)
353 p(struct ip6_hbh)
354 p(struct ip6_hdr)
355 p(struct ip6_hdrctl)
356 p(struct ip6_opt)
357 p(struct ip6_opt_jumbo)
358 p(struct ip6_opt_nsap)
359 p(struct ip6_opt_router)
360 p(struct ip6_opt_tunnel)
361 p(struct ip6_rthdr)
362 p(struct ip6_rthdr0)
363 p(struct ip_mreq)
364 p(struct ip_mreqn)
365 p(struct ip_opts)
366 p(struct ip_timestamp)
367 p(struct ipc_perm)
368 p(struct iphdr)
369 p(struct ipv6_mreq)
370 p(struct itimerspec)
371 p(struct itimerval)
372 p(struct kbd_repeat)
373 p(struct kbdiacr)
374 p(struct kbdiacrs)
375 p(struct kbentry)
376 p(struct kbkeycode)
377 p(struct kbsentry)
378 p(struct lconv)
379 p(struct linger)
380 p(struct loop_info)
381 p(struct loop_info64)
382 p(struct mld_hdr)
383 p(struct mntent)
384 p(struct mq_attr)
385 p(struct msghdr)
386 p(struct msginfo)
387 p(struct msqid_ds)
388 p(struct nd_neighbor_advert)
389 p(struct nd_neighbor_solicit)
390 p(struct nd_opt_adv_interval)
391 p(struct nd_opt_hdr)
392 p(struct nd_opt_home_agent_info)
393 p(struct nd_opt_mtu)
394 p(struct nd_opt_prefix_info)
395 p(struct nd_opt_rd_hdr)
396 p(struct nd_redirect)
397 p(struct nd_router_advert)
398 p(struct nd_router_solicit)
399 p(struct netent)
400 //p(struct npttimeval)
401 p(struct ns_tcp_tsig_state)
402 p(struct ns_tsig_key)
403 p(struct option)
404 p(struct packet_mreq)
405 p(struct passwd)
406 p(struct pollfd)
407 p(struct protoent)
408 p(struct res_sym)
409 p(struct rlimit)
410 p(struct rr_pco_match)
411 p(struct rr_pco_use)
412 p(struct rr_result)
413 p(struct rtentry)
414 p(struct rusage)
415 p(struct sched_param)
416 p(struct sembuf)
417 p(struct semid_ds)
418 p(struct seminfo)
419 p(struct servent)
420 p(struct shm_info)
421 p(struct shmid_ds)
422 p(struct shminfo)
423 p(struct sigaction)
424 p(struct sigcontext)
425 p(struct sigevent)
426 p(struct signalfd_siginfo)
427 p(struct sockaddr)
428 p(struct sockaddr_in)
429 p(struct sockaddr_in6)
430 p(struct sockaddr_ll)
431 p(struct sockaddr_storage)
432 p(struct sockaddr_un)
433 p(struct spwd)
434 p(struct stat)
435 //p(struct statvfs)
436 p(struct sysinfo)
437 p(struct termios)
438 p(struct timespec)
439 p(struct timestamp)
440 p(struct timeval)
441 p(struct timex)
442 p(struct timezone)
443 p(struct tm)
444 p(struct tms)
445 p(struct ucred)
446 p(struct udphdr)
447 p(struct unimapdesc)
448 p(struct unimapinit)
449 p(struct unipair)
450 p(struct user)
451 p(struct user_fpregs_struct)
452 //p(struct user_fpxregs_struct)
453 p(struct user_regs_struct)
454 p(struct utimbuf)
455 p(struct utmpx)
456 p(struct utsname)
457 p(struct vt_consize)
458 p(struct vt_mode)
459 p(struct vt_sizes)
460 p(struct vt_stat)
461 p(struct winsize)
462 p(suseconds_t)
463 p(tcflag_t)
464 p(time_t)
465 p(timer_t)
466 p(u_char)
467 p(u_int)
468 p(u_int16_t)
469 p(u_int32_t)
470 p(u_int64_t)
471 p(u_int8_t)
472 p(u_long)
473 p(u_quad_t)
474 p(u_short)
475 p(ucontext_t)
476 p(uid_t)
477 p(uint)
478 p(uint16_t)
479 p(uint32_t)
480 p(uint64_t)
481 p(uint8_t)
482 p(uint_fast16_t)
483 p(uint_fast32_t)
484 p(uint_fast64_t)
485 p(uint_fast8_t)
486 p(uint_least16_t)
487 p(uint_least32_t)
488 p(uint_least64_t)
489 p(uint_least8_t)
490 p(uintmax_t)
491 p(uintptr_t)
492 p(ulong)
493 p(union epoll_data)
494 p(union sigval)
495 p(ushort)
496 p(va_list)
497 p(wchar_t)
498 //p(wctrans_t)
499 //p(wctype_t)
500 p(wint_t)
501 p(wordexp_t)
502 return 0;}