Repository: alibaba/atlas Branch: master Commit: c20c5b83f67b Files: 4239 Total size: 37.8 MB Directory structure: gitextract_as4hsawy/ ├── .github/ │ └── ISSUE_TEMPLATE.md ├── .gitignore ├── .gitmodules ├── CONTRIBUTING.md ├── LICENSE ├── NOTICE ├── README.md ├── _config.yml ├── atlas-aapt/ │ ├── .gitignore │ ├── CMakeLists.txt │ ├── Makefile │ ├── README.md │ ├── README.zh-cn.md │ ├── UpdateAndroidSource.sh │ ├── bionic/ │ │ └── libc/ │ │ └── include/ │ │ ├── alloca.h │ │ ├── android/ │ │ │ ├── api-level.h │ │ │ ├── dlext.h │ │ │ ├── legacy_errno_inlines.h │ │ │ ├── legacy_signal_inlines.h │ │ │ ├── legacy_stdlib_inlines.h │ │ │ ├── legacy_sys_atomics_inlines.h │ │ │ ├── legacy_sys_stat_inlines.h │ │ │ ├── legacy_termios_inlines.h │ │ │ └── set_abort_message.h │ │ ├── ar.h │ │ ├── arpa/ │ │ │ ├── inet.h │ │ │ ├── nameser.h │ │ │ ├── nameser_compat.h │ │ │ └── telnet.h │ │ ├── assert.h │ │ ├── bits/ │ │ │ ├── lockf.h │ │ │ ├── posix_limits.h │ │ │ ├── pthread_types.h │ │ │ ├── timespec.h │ │ │ └── wchar_limits.h │ │ ├── byteswap.h │ │ ├── ctype.h │ │ ├── dirent.h │ │ ├── dlfcn.h │ │ ├── elf.h │ │ ├── endian.h │ │ ├── err.h │ │ ├── errno.h │ │ ├── error.h │ │ ├── fcntl.h │ │ ├── features.h │ │ ├── fnmatch.h │ │ ├── fts.h │ │ ├── ftw.h │ │ ├── getopt.h │ │ ├── grp.h │ │ ├── ifaddrs.h │ │ ├── inttypes.h │ │ ├── lastlog.h │ │ ├── libgen.h │ │ ├── limits.h │ │ ├── link.h │ │ ├── locale.h │ │ ├── machine/ │ │ │ ├── endian.h │ │ │ └── ieee.h │ │ ├── malloc.h │ │ ├── memory.h │ │ ├── mntent.h │ │ ├── net/ │ │ │ ├── ethernet.h │ │ │ ├── ethertypes.h │ │ │ ├── if.h │ │ │ ├── if_arp.h │ │ │ ├── if_ether.h │ │ │ ├── if_ieee1394.h │ │ │ ├── if_packet.h │ │ │ ├── if_types.h │ │ │ └── route.h │ │ ├── netdb.h │ │ ├── netinet/ │ │ │ ├── ether.h │ │ │ ├── icmp6.h │ │ │ ├── if_ether.h │ │ │ ├── in.h │ │ │ ├── in6.h │ │ │ ├── in_systm.h │ │ │ ├── ip.h │ │ │ ├── ip6.h │ │ │ ├── ip_icmp.h │ │ │ ├── tcp.h │ │ │ └── udp.h │ │ ├── netpacket/ │ │ │ └── packet.h │ │ ├── nsswitch.h │ │ ├── paths.h │ │ ├── poll.h │ │ ├── pthread.h │ │ ├── pty.h │ │ ├── pwd.h │ │ ├── regex.h │ │ ├── resolv.h │ │ ├── sched.h │ │ ├── search.h │ │ ├── semaphore.h │ │ ├── setjmp.h │ │ ├── sgtty.h │ │ ├── signal.h │ │ ├── stdatomic.h │ │ ├── stdint.h │ │ ├── stdio.h │ │ ├── stdio_ext.h │ │ ├── stdlib.h │ │ ├── string.h │ │ ├── strings.h │ │ ├── sys/ │ │ │ ├── _errdefs.h │ │ │ ├── _sigdefs.h │ │ │ ├── _system_properties.h │ │ │ ├── atomics.h │ │ │ ├── auxv.h │ │ │ ├── cachectl.h │ │ │ ├── capability.h │ │ │ ├── cdefs.h │ │ │ ├── endian.h │ │ │ ├── epoll.h │ │ │ ├── errno.h │ │ │ ├── eventfd.h │ │ │ ├── fcntl.h │ │ │ ├── file.h │ │ │ ├── fsuid.h │ │ │ ├── glibc-syscalls.h │ │ │ ├── inotify.h │ │ │ ├── ioctl.h │ │ │ ├── ioctl_compat.h │ │ │ ├── ipc.h │ │ │ ├── klog.h │ │ │ ├── limits.h │ │ │ ├── mman.h │ │ │ ├── mount.h │ │ │ ├── msg.h │ │ │ ├── param.h │ │ │ ├── personality.h │ │ │ ├── poll.h │ │ │ ├── prctl.h │ │ │ ├── procfs.h │ │ │ ├── ptrace.h │ │ │ ├── queue.h │ │ │ ├── reboot.h │ │ │ ├── reg.h │ │ │ ├── resource.h │ │ │ ├── select.h │ │ │ ├── sem.h │ │ │ ├── sendfile.h │ │ │ ├── signal.h │ │ │ ├── signalfd.h │ │ │ ├── socket.h │ │ │ ├── socketcalls.h │ │ │ ├── stat.h │ │ │ ├── statfs.h │ │ │ ├── statvfs.h │ │ │ ├── swap.h │ │ │ ├── syscall.h │ │ │ ├── sysconf.h │ │ │ ├── sysinfo.h │ │ │ ├── syslimits.h │ │ │ ├── syslog.h │ │ │ ├── sysmacros.h │ │ │ ├── system_properties.h │ │ │ ├── time.h │ │ │ ├── timerfd.h │ │ │ ├── times.h │ │ │ ├── timex.h │ │ │ ├── ttychars.h │ │ │ ├── ttydefaults.h │ │ │ ├── ttydev.h │ │ │ ├── types.h │ │ │ ├── ucontext.h │ │ │ ├── uio.h │ │ │ ├── un.h │ │ │ ├── unistd.h │ │ │ ├── user.h │ │ │ ├── utime.h │ │ │ ├── utsname.h │ │ │ ├── vfs.h │ │ │ ├── vt.h │ │ │ ├── wait.h │ │ │ └── xattr.h │ │ ├── syscall.h │ │ ├── sysexits.h │ │ ├── syslog.h │ │ ├── termio.h │ │ ├── termios.h │ │ ├── time.h │ │ ├── time64.h │ │ ├── uchar.h │ │ ├── ucontext.h │ │ ├── unistd.h │ │ ├── util.h │ │ ├── utime.h │ │ ├── utmp.h │ │ ├── wait.h │ │ ├── wchar.h │ │ ├── wctype.h │ │ └── xlocale.h │ ├── build_ShakaAapt_all_in_linux.sh │ ├── build_ShakaAapt_all_in_maxos.sh │ ├── external/ │ │ ├── compiler-rt/ │ │ │ ├── .arcconfig │ │ │ ├── .gitignore │ │ │ ├── Android.bp │ │ │ ├── Android.mk │ │ │ ├── CMakeLists.txt │ │ │ ├── CODE_OWNERS.TXT │ │ │ ├── CREDITS.TXT │ │ │ ├── LICENSE.TXT │ │ │ ├── MODULE_LICENSE_MIT │ │ │ ├── Makefile │ │ │ ├── NOTICE │ │ │ ├── README.android │ │ │ ├── README.txt │ │ │ ├── cmake/ │ │ │ │ ├── Modules/ │ │ │ │ │ ├── AddCompilerRT.cmake │ │ │ │ │ ├── CompilerRTCompile.cmake │ │ │ │ │ ├── CompilerRTDarwinUtils.cmake │ │ │ │ │ ├── CompilerRTLink.cmake │ │ │ │ │ ├── CompilerRTUtils.cmake │ │ │ │ │ └── SanitizerUtils.cmake │ │ │ │ └── config-ix.cmake │ │ │ ├── include/ │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── sanitizer/ │ │ │ │ ├── allocator_interface.h │ │ │ │ ├── asan_interface.h │ │ │ │ ├── common_interface_defs.h │ │ │ │ ├── coverage_interface.h │ │ │ │ ├── dfsan_interface.h │ │ │ │ ├── linux_syscall_hooks.h │ │ │ │ ├── lsan_interface.h │ │ │ │ ├── msan_interface.h │ │ │ │ └── tsan_interface_atomic.h │ │ │ ├── lib/ │ │ │ │ ├── BlocksRuntime/ │ │ │ │ │ ├── Block.h │ │ │ │ │ ├── Block_private.h │ │ │ │ │ ├── data.c │ │ │ │ │ └── runtime.c │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── Makefile.mk │ │ │ │ ├── asan/ │ │ │ │ │ ├── .clang-format │ │ │ │ │ ├── Android.mk │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── Makefile.mk │ │ │ │ │ ├── README.txt │ │ │ │ │ ├── asan.syms.extra │ │ │ │ │ ├── asan_activation.cc │ │ │ │ │ ├── asan_activation.h │ │ │ │ │ ├── asan_activation_flags.inc │ │ │ │ │ ├── asan_allocator.cc │ │ │ │ │ ├── asan_allocator.h │ │ │ │ │ ├── asan_android_stub.cc │ │ │ │ │ ├── asan_blacklist.txt │ │ │ │ │ ├── asan_debugging.cc │ │ │ │ │ ├── asan_fake_stack.cc │ │ │ │ │ ├── asan_fake_stack.h │ │ │ │ │ ├── asan_flags.cc │ │ │ │ │ ├── asan_flags.h │ │ │ │ │ ├── asan_flags.inc │ │ │ │ │ ├── asan_globals.cc │ │ │ │ │ ├── asan_init_version.h │ │ │ │ │ ├── asan_interceptors.cc │ │ │ │ │ ├── asan_interceptors.h │ │ │ │ │ ├── asan_interface_internal.h │ │ │ │ │ ├── asan_internal.h │ │ │ │ │ ├── asan_linux.cc │ │ │ │ │ ├── asan_lock.h │ │ │ │ │ ├── asan_mac.cc │ │ │ │ │ ├── asan_malloc_linux.cc │ │ │ │ │ ├── asan_malloc_mac.cc │ │ │ │ │ ├── asan_malloc_win.cc │ │ │ │ │ ├── asan_mapping.h │ │ │ │ │ ├── asan_new_delete.cc │ │ │ │ │ ├── asan_poisoning.cc │ │ │ │ │ ├── asan_poisoning.h │ │ │ │ │ ├── asan_posix.cc │ │ │ │ │ ├── asan_preinit.cc │ │ │ │ │ ├── asan_report.cc │ │ │ │ │ ├── asan_report.h │ │ │ │ │ ├── asan_rtl.cc │ │ │ │ │ ├── asan_stack.cc │ │ │ │ │ ├── asan_stack.h │ │ │ │ │ ├── asan_stats.cc │ │ │ │ │ ├── asan_stats.h │ │ │ │ │ ├── asan_suppressions.cc │ │ │ │ │ ├── asan_suppressions.h │ │ │ │ │ ├── asan_thread.cc │ │ │ │ │ ├── asan_thread.h │ │ │ │ │ ├── asan_win.cc │ │ │ │ │ ├── asan_win_dll_thunk.cc │ │ │ │ │ ├── asan_win_dynamic_runtime_thunk.cc │ │ │ │ │ ├── asanwrapper.cc │ │ │ │ │ ├── scripts/ │ │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ │ ├── asan_device_setup │ │ │ │ │ │ ├── asan_symbolize.py │ │ │ │ │ │ └── symbolize.py │ │ │ │ │ └── tests/ │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── asan_asm_test.cc │ │ │ │ │ ├── asan_benchmarks_test.cc │ │ │ │ │ ├── asan_exceptions_test.cc │ │ │ │ │ ├── asan_fake_stack_test.cc │ │ │ │ │ ├── asan_globals_test.cc │ │ │ │ │ ├── asan_interface_test.cc │ │ │ │ │ ├── asan_mac_test.cc │ │ │ │ │ ├── asan_mac_test.h │ │ │ │ │ ├── asan_mac_test_helpers.mm │ │ │ │ │ ├── asan_mem_test.cc │ │ │ │ │ ├── asan_noinst_test.cc │ │ │ │ │ ├── asan_oob_test.cc │ │ │ │ │ ├── asan_racy_double_free_test.cc │ │ │ │ │ ├── asan_str_test.cc │ │ │ │ │ ├── asan_test.cc │ │ │ │ │ ├── asan_test.ignore │ │ │ │ │ ├── asan_test_config.h │ │ │ │ │ ├── asan_test_main.cc │ │ │ │ │ └── asan_test_utils.h │ │ │ │ ├── builtins/ │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── Darwin-excludes/ │ │ │ │ │ │ ├── 10.4-x86_64.txt │ │ │ │ │ │ ├── 10.4.txt │ │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ │ ├── README.TXT │ │ │ │ │ │ ├── ios-armv7.txt │ │ │ │ │ │ ├── ios-armv7s.txt │ │ │ │ │ │ ├── ios.txt │ │ │ │ │ │ ├── ios6-armv7.txt │ │ │ │ │ │ ├── ios6-armv7s.txt │ │ │ │ │ │ ├── ios7-arm64.txt │ │ │ │ │ │ ├── iossim-i386.txt │ │ │ │ │ │ ├── iossim-x86_64.txt │ │ │ │ │ │ ├── iossim.txt │ │ │ │ │ │ ├── osx-i386.txt │ │ │ │ │ │ ├── osx-x86_64.txt │ │ │ │ │ │ └── osx.txt │ │ │ │ │ ├── Makefile.mk │ │ │ │ │ ├── README.txt │ │ │ │ │ ├── absvdi2.c │ │ │ │ │ ├── absvsi2.c │ │ │ │ │ ├── absvti2.c │ │ │ │ │ ├── adddf3.c │ │ │ │ │ ├── addsf3.c │ │ │ │ │ ├── addtf3.c │ │ │ │ │ ├── addvdi3.c │ │ │ │ │ ├── addvsi3.c │ │ │ │ │ ├── addvti3.c │ │ │ │ │ ├── apple_versioning.c │ │ │ │ │ ├── arm/ │ │ │ │ │ │ ├── Makefile.mk │ │ │ │ │ │ ├── adddf3vfp.S │ │ │ │ │ │ ├── addsf3vfp.S │ │ │ │ │ │ ├── aeabi_cdcmp.S │ │ │ │ │ │ ├── aeabi_cdcmpeq_check_nan.c │ │ │ │ │ │ ├── aeabi_cfcmp.S │ │ │ │ │ │ ├── aeabi_cfcmpeq_check_nan.c │ │ │ │ │ │ ├── aeabi_dcmp.S │ │ │ │ │ │ ├── aeabi_div0.c │ │ │ │ │ │ ├── aeabi_drsub.c │ │ │ │ │ │ ├── aeabi_fcmp.S │ │ │ │ │ │ ├── aeabi_frsub.c │ │ │ │ │ │ ├── aeabi_idivmod.S │ │ │ │ │ │ ├── aeabi_ldivmod.S │ │ │ │ │ │ ├── aeabi_memcmp.S │ │ │ │ │ │ ├── aeabi_memcpy.S │ │ │ │ │ │ ├── aeabi_memmove.S │ │ │ │ │ │ ├── aeabi_memset.S │ │ │ │ │ │ ├── aeabi_uidivmod.S │ │ │ │ │ │ ├── aeabi_uldivmod.S │ │ │ │ │ │ ├── bswapdi2.S │ │ │ │ │ │ ├── bswapsi2.S │ │ │ │ │ │ ├── clzdi2.S │ │ │ │ │ │ ├── clzsi2.S │ │ │ │ │ │ ├── comparesf2.S │ │ │ │ │ │ ├── divdf3vfp.S │ │ │ │ │ │ ├── divmodsi4.S │ │ │ │ │ │ ├── divsf3vfp.S │ │ │ │ │ │ ├── divsi3.S │ │ │ │ │ │ ├── eqdf2vfp.S │ │ │ │ │ │ ├── eqsf2vfp.S │ │ │ │ │ │ ├── extendsfdf2vfp.S │ │ │ │ │ │ ├── fixdfsivfp.S │ │ │ │ │ │ ├── fixsfsivfp.S │ │ │ │ │ │ ├── fixunsdfsivfp.S │ │ │ │ │ │ ├── fixunssfsivfp.S │ │ │ │ │ │ ├── floatsidfvfp.S │ │ │ │ │ │ ├── floatsisfvfp.S │ │ │ │ │ │ ├── floatunssidfvfp.S │ │ │ │ │ │ ├── floatunssisfvfp.S │ │ │ │ │ │ ├── gedf2vfp.S │ │ │ │ │ │ ├── gesf2vfp.S │ │ │ │ │ │ ├── gtdf2vfp.S │ │ │ │ │ │ ├── gtsf2vfp.S │ │ │ │ │ │ ├── ledf2vfp.S │ │ │ │ │ │ ├── lesf2vfp.S │ │ │ │ │ │ ├── ltdf2vfp.S │ │ │ │ │ │ ├── ltsf2vfp.S │ │ │ │ │ │ ├── modsi3.S │ │ │ │ │ │ ├── muldf3vfp.S │ │ │ │ │ │ ├── mulsf3vfp.S │ │ │ │ │ │ ├── nedf2vfp.S │ │ │ │ │ │ ├── negdf2vfp.S │ │ │ │ │ │ ├── negsf2vfp.S │ │ │ │ │ │ ├── nesf2vfp.S │ │ │ │ │ │ ├── restore_vfp_d8_d15_regs.S │ │ │ │ │ │ ├── save_vfp_d8_d15_regs.S │ │ │ │ │ │ ├── softfloat-alias.list │ │ │ │ │ │ ├── subdf3vfp.S │ │ │ │ │ │ ├── subsf3vfp.S │ │ │ │ │ │ ├── switch16.S │ │ │ │ │ │ ├── switch32.S │ │ │ │ │ │ ├── switch8.S │ │ │ │ │ │ ├── switchu8.S │ │ │ │ │ │ ├── sync-ops.h │ │ │ │ │ │ ├── sync_fetch_and_add_4.S │ │ │ │ │ │ ├── sync_fetch_and_add_8.S │ │ │ │ │ │ ├── sync_fetch_and_and_4.S │ │ │ │ │ │ ├── sync_fetch_and_and_8.S │ │ │ │ │ │ ├── sync_fetch_and_max_4.S │ │ │ │ │ │ ├── sync_fetch_and_max_8.S │ │ │ │ │ │ ├── sync_fetch_and_min_4.S │ │ │ │ │ │ ├── sync_fetch_and_min_8.S │ │ │ │ │ │ ├── sync_fetch_and_nand_4.S │ │ │ │ │ │ ├── sync_fetch_and_nand_8.S │ │ │ │ │ │ ├── sync_fetch_and_or_4.S │ │ │ │ │ │ ├── sync_fetch_and_or_8.S │ │ │ │ │ │ ├── sync_fetch_and_sub_4.S │ │ │ │ │ │ ├── sync_fetch_and_sub_8.S │ │ │ │ │ │ ├── sync_fetch_and_umax_4.S │ │ │ │ │ │ ├── sync_fetch_and_umax_8.S │ │ │ │ │ │ ├── sync_fetch_and_umin_4.S │ │ │ │ │ │ ├── sync_fetch_and_umin_8.S │ │ │ │ │ │ ├── sync_fetch_and_xor_4.S │ │ │ │ │ │ ├── sync_fetch_and_xor_8.S │ │ │ │ │ │ ├── sync_synchronize.S │ │ │ │ │ │ ├── truncdfsf2vfp.S │ │ │ │ │ │ ├── udivmodsi4.S │ │ │ │ │ │ ├── udivsi3.S │ │ │ │ │ │ ├── umodsi3.S │ │ │ │ │ │ ├── unorddf2vfp.S │ │ │ │ │ │ └── unordsf2vfp.S │ │ │ │ │ ├── arm64/ │ │ │ │ │ │ ├── Makefile.mk │ │ │ │ │ │ └── dummy.c │ │ │ │ │ ├── armv6m/ │ │ │ │ │ │ └── Makefile.mk │ │ │ │ │ ├── ashldi3.c │ │ │ │ │ ├── ashlti3.c │ │ │ │ │ ├── ashrdi3.c │ │ │ │ │ ├── ashrti3.c │ │ │ │ │ ├── assembly.h │ │ │ │ │ ├── atomic.c │ │ │ │ │ ├── atomic_flag_clear.c │ │ │ │ │ ├── atomic_flag_clear_explicit.c │ │ │ │ │ ├── atomic_flag_test_and_set.c │ │ │ │ │ ├── atomic_flag_test_and_set_explicit.c │ │ │ │ │ ├── atomic_signal_fence.c │ │ │ │ │ ├── atomic_thread_fence.c │ │ │ │ │ ├── clear_cache.c │ │ │ │ │ ├── clzdi2.c │ │ │ │ │ ├── clzsi2.c │ │ │ │ │ ├── clzti2.c │ │ │ │ │ ├── cmpdi2.c │ │ │ │ │ ├── cmpti2.c │ │ │ │ │ ├── comparedf2.c │ │ │ │ │ ├── comparesf2.c │ │ │ │ │ ├── comparetf2.c │ │ │ │ │ ├── ctzdi2.c │ │ │ │ │ ├── ctzsi2.c │ │ │ │ │ ├── ctzti2.c │ │ │ │ │ ├── divdc3.c │ │ │ │ │ ├── divdf3.c │ │ │ │ │ ├── divdi3.c │ │ │ │ │ ├── divmoddi4.c │ │ │ │ │ ├── divmodsi4.c │ │ │ │ │ ├── divsc3.c │ │ │ │ │ ├── divsf3.c │ │ │ │ │ ├── divsi3.c │ │ │ │ │ ├── divtc3.c │ │ │ │ │ ├── divtf3.c │ │ │ │ │ ├── divti3.c │ │ │ │ │ ├── divxc3.c │ │ │ │ │ ├── emutls.c │ │ │ │ │ ├── enable_execute_stack.c │ │ │ │ │ ├── eprintf.c │ │ │ │ │ ├── extenddftf2.c │ │ │ │ │ ├── extendhfsf2.c │ │ │ │ │ ├── extendsfdf2.c │ │ │ │ │ ├── extendsftf2.c │ │ │ │ │ ├── ffsdi2.c │ │ │ │ │ ├── ffsti2.c │ │ │ │ │ ├── fixdfdi.c │ │ │ │ │ ├── fixdfsi.c │ │ │ │ │ ├── fixdfti.c │ │ │ │ │ ├── fixsfdi.c │ │ │ │ │ ├── fixsfsi.c │ │ │ │ │ ├── fixsfti.c │ │ │ │ │ ├── fixtfdi.c │ │ │ │ │ ├── fixtfsi.c │ │ │ │ │ ├── fixtfti.c │ │ │ │ │ ├── fixunsdfdi.c │ │ │ │ │ ├── fixunsdfsi.c │ │ │ │ │ ├── fixunsdfti.c │ │ │ │ │ ├── fixunssfdi.c │ │ │ │ │ ├── fixunssfsi.c │ │ │ │ │ ├── fixunssfti.c │ │ │ │ │ ├── fixunstfdi.c │ │ │ │ │ ├── fixunstfsi.c │ │ │ │ │ ├── fixunstfti.c │ │ │ │ │ ├── fixunsxfdi.c │ │ │ │ │ ├── fixunsxfsi.c │ │ │ │ │ ├── fixunsxfti.c │ │ │ │ │ ├── fixxfdi.c │ │ │ │ │ ├── fixxfti.c │ │ │ │ │ ├── floatdidf.c │ │ │ │ │ ├── floatdisf.c │ │ │ │ │ ├── floatditf.c │ │ │ │ │ ├── floatdixf.c │ │ │ │ │ ├── floatsidf.c │ │ │ │ │ ├── floatsisf.c │ │ │ │ │ ├── floatsitf.c │ │ │ │ │ ├── floattidf.c │ │ │ │ │ ├── floattisf.c │ │ │ │ │ ├── floattixf.c │ │ │ │ │ ├── floatundidf.c │ │ │ │ │ ├── floatundisf.c │ │ │ │ │ ├── floatunditf.c │ │ │ │ │ ├── floatundixf.c │ │ │ │ │ ├── floatunsidf.c │ │ │ │ │ ├── floatunsisf.c │ │ │ │ │ ├── floatunsitf.c │ │ │ │ │ ├── floatuntidf.c │ │ │ │ │ ├── floatuntisf.c │ │ │ │ │ ├── floatuntixf.c │ │ │ │ │ ├── fp_add_impl.inc │ │ │ │ │ ├── fp_extend.h │ │ │ │ │ ├── fp_extend_impl.inc │ │ │ │ │ ├── fp_fixint_impl.inc │ │ │ │ │ ├── fp_fixuint_impl.inc │ │ │ │ │ ├── fp_lib.h │ │ │ │ │ ├── fp_mul_impl.inc │ │ │ │ │ ├── fp_trunc.h │ │ │ │ │ ├── fp_trunc_impl.inc │ │ │ │ │ ├── gcc_personality_v0.c │ │ │ │ │ ├── i386/ │ │ │ │ │ │ ├── Makefile.mk │ │ │ │ │ │ ├── ashldi3.S │ │ │ │ │ │ ├── ashrdi3.S │ │ │ │ │ │ ├── chkstk.S │ │ │ │ │ │ ├── chkstk2.S │ │ │ │ │ │ ├── divdi3.S │ │ │ │ │ │ ├── floatdidf.S │ │ │ │ │ │ ├── floatdisf.S │ │ │ │ │ │ ├── floatdixf.S │ │ │ │ │ │ ├── floatundidf.S │ │ │ │ │ │ ├── floatundisf.S │ │ │ │ │ │ ├── floatundixf.S │ │ │ │ │ │ ├── lshrdi3.S │ │ │ │ │ │ ├── moddi3.S │ │ │ │ │ │ ├── muldi3.S │ │ │ │ │ │ ├── udivdi3.S │ │ │ │ │ │ └── umoddi3.S │ │ │ │ │ ├── int_endianness.h │ │ │ │ │ ├── int_lib.h │ │ │ │ │ ├── int_math.h │ │ │ │ │ ├── int_types.h │ │ │ │ │ ├── int_util.c │ │ │ │ │ ├── int_util.h │ │ │ │ │ ├── lshrdi3.c │ │ │ │ │ ├── lshrti3.c │ │ │ │ │ ├── macho_embedded/ │ │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ │ ├── arm.txt │ │ │ │ │ │ ├── common.txt │ │ │ │ │ │ ├── i386.txt │ │ │ │ │ │ ├── thumb2-64.txt │ │ │ │ │ │ └── thumb2.txt │ │ │ │ │ ├── moddi3.c │ │ │ │ │ ├── modsi3.c │ │ │ │ │ ├── modti3.c │ │ │ │ │ ├── muldc3.c │ │ │ │ │ ├── muldf3.c │ │ │ │ │ ├── muldi3.c │ │ │ │ │ ├── mulodi4.c │ │ │ │ │ ├── mulosi4.c │ │ │ │ │ ├── muloti4.c │ │ │ │ │ ├── mulsc3.c │ │ │ │ │ ├── mulsf3.c │ │ │ │ │ ├── multc3.c │ │ │ │ │ ├── multf3.c │ │ │ │ │ ├── multi3.c │ │ │ │ │ ├── mulvdi3.c │ │ │ │ │ ├── mulvsi3.c │ │ │ │ │ ├── mulvti3.c │ │ │ │ │ ├── mulxc3.c │ │ │ │ │ ├── negdf2.c │ │ │ │ │ ├── negdi2.c │ │ │ │ │ ├── negsf2.c │ │ │ │ │ ├── negti2.c │ │ │ │ │ ├── negvdi2.c │ │ │ │ │ ├── negvsi2.c │ │ │ │ │ ├── negvti2.c │ │ │ │ │ ├── paritydi2.c │ │ │ │ │ ├── paritysi2.c │ │ │ │ │ ├── parityti2.c │ │ │ │ │ ├── popcountdi2.c │ │ │ │ │ ├── popcountsi2.c │ │ │ │ │ ├── popcountti2.c │ │ │ │ │ ├── powidf2.c │ │ │ │ │ ├── powisf2.c │ │ │ │ │ ├── powitf2.c │ │ │ │ │ ├── powixf2.c │ │ │ │ │ ├── ppc/ │ │ │ │ │ │ ├── DD.h │ │ │ │ │ │ ├── Makefile.mk │ │ │ │ │ │ ├── divtc3.c │ │ │ │ │ │ ├── fixtfdi.c │ │ │ │ │ │ ├── fixunstfdi.c │ │ │ │ │ │ ├── floatditf.c │ │ │ │ │ │ ├── floatunditf.c │ │ │ │ │ │ ├── gcc_qadd.c │ │ │ │ │ │ ├── gcc_qdiv.c │ │ │ │ │ │ ├── gcc_qmul.c │ │ │ │ │ │ ├── gcc_qsub.c │ │ │ │ │ │ ├── multc3.c │ │ │ │ │ │ ├── restFP.S │ │ │ │ │ │ └── saveFP.S │ │ │ │ │ ├── subdf3.c │ │ │ │ │ ├── subsf3.c │ │ │ │ │ ├── subtf3.c │ │ │ │ │ ├── subvdi3.c │ │ │ │ │ ├── subvsi3.c │ │ │ │ │ ├── subvti3.c │ │ │ │ │ ├── trampoline_setup.c │ │ │ │ │ ├── truncdfhf2.c │ │ │ │ │ ├── truncdfsf2.c │ │ │ │ │ ├── truncsfhf2.c │ │ │ │ │ ├── trunctfdf2.c │ │ │ │ │ ├── trunctfsf2.c │ │ │ │ │ ├── ucmpdi2.c │ │ │ │ │ ├── ucmpti2.c │ │ │ │ │ ├── udivdi3.c │ │ │ │ │ ├── udivmoddi4.c │ │ │ │ │ ├── udivmodsi4.c │ │ │ │ │ ├── udivmodti4.c │ │ │ │ │ ├── udivsi3.c │ │ │ │ │ ├── udivti3.c │ │ │ │ │ ├── umoddi3.c │ │ │ │ │ ├── umodsi3.c │ │ │ │ │ ├── umodti3.c │ │ │ │ │ └── x86_64/ │ │ │ │ │ ├── Makefile.mk │ │ │ │ │ ├── chkstk.S │ │ │ │ │ ├── chkstk2.S │ │ │ │ │ ├── floatdidf.c │ │ │ │ │ ├── floatdisf.c │ │ │ │ │ ├── floatdixf.c │ │ │ │ │ ├── floatundidf.S │ │ │ │ │ ├── floatundisf.S │ │ │ │ │ └── floatundixf.S │ │ │ │ ├── cfi/ │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── cfi.cc │ │ │ │ │ └── cfi_blacklist.txt │ │ │ │ ├── dfsan/ │ │ │ │ │ ├── .clang-format │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── dfsan.cc │ │ │ │ │ ├── dfsan.h │ │ │ │ │ ├── dfsan.syms.extra │ │ │ │ │ ├── dfsan_custom.cc │ │ │ │ │ ├── dfsan_flags.inc │ │ │ │ │ ├── dfsan_interceptors.cc │ │ │ │ │ ├── dfsan_platform.h │ │ │ │ │ ├── done_abilist.txt │ │ │ │ │ ├── libc_ubuntu1404_abilist.txt │ │ │ │ │ └── scripts/ │ │ │ │ │ ├── build-libc-list.py │ │ │ │ │ └── check_custom_wrappers.sh │ │ │ │ ├── interception/ │ │ │ │ │ ├── .clang-format │ │ │ │ │ ├── Android.mk │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── Makefile.mk │ │ │ │ │ ├── interception.h │ │ │ │ │ ├── interception_linux.cc │ │ │ │ │ ├── interception_linux.h │ │ │ │ │ ├── interception_mac.cc │ │ │ │ │ ├── interception_mac.h │ │ │ │ │ ├── interception_type_test.cc │ │ │ │ │ ├── interception_win.cc │ │ │ │ │ └── interception_win.h │ │ │ │ ├── lsan/ │ │ │ │ │ ├── .clang-format │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── Makefile.mk │ │ │ │ │ ├── lsan.cc │ │ │ │ │ ├── lsan.h │ │ │ │ │ ├── lsan_allocator.cc │ │ │ │ │ ├── lsan_allocator.h │ │ │ │ │ ├── lsan_common.cc │ │ │ │ │ ├── lsan_common.h │ │ │ │ │ ├── lsan_common_linux.cc │ │ │ │ │ ├── lsan_flags.inc │ │ │ │ │ ├── lsan_interceptors.cc │ │ │ │ │ ├── lsan_preinit.cc │ │ │ │ │ ├── lsan_thread.cc │ │ │ │ │ └── lsan_thread.h │ │ │ │ ├── msan/ │ │ │ │ │ ├── .clang-format │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── msan.cc │ │ │ │ │ ├── msan.h │ │ │ │ │ ├── msan.syms.extra │ │ │ │ │ ├── msan_allocator.cc │ │ │ │ │ ├── msan_allocator.h │ │ │ │ │ ├── msan_blacklist.txt │ │ │ │ │ ├── msan_chained_origin_depot.cc │ │ │ │ │ ├── msan_chained_origin_depot.h │ │ │ │ │ ├── msan_flags.h │ │ │ │ │ ├── msan_flags.inc │ │ │ │ │ ├── msan_interceptors.cc │ │ │ │ │ ├── msan_interface_internal.h │ │ │ │ │ ├── msan_linux.cc │ │ │ │ │ ├── msan_new_delete.cc │ │ │ │ │ ├── msan_origin.h │ │ │ │ │ ├── msan_poisoning.cc │ │ │ │ │ ├── msan_poisoning.h │ │ │ │ │ ├── msan_report.cc │ │ │ │ │ ├── msan_thread.cc │ │ │ │ │ ├── msan_thread.h │ │ │ │ │ └── tests/ │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── msan_loadable.cc │ │ │ │ │ ├── msan_test.cc │ │ │ │ │ ├── msan_test_config.h │ │ │ │ │ └── msan_test_main.cc │ │ │ │ ├── profile/ │ │ │ │ │ ├── Android.mk │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── GCDAProfiling.c │ │ │ │ │ ├── InstrProfData.inc │ │ │ │ │ ├── InstrProfiling.c │ │ │ │ │ ├── InstrProfiling.h │ │ │ │ │ ├── InstrProfilingBuffer.c │ │ │ │ │ ├── InstrProfilingFile.c │ │ │ │ │ ├── InstrProfilingInternal.h │ │ │ │ │ ├── InstrProfilingPlatformDarwin.c │ │ │ │ │ ├── InstrProfilingPlatformLinux.c │ │ │ │ │ ├── InstrProfilingPlatformOther.c │ │ │ │ │ ├── InstrProfilingPort.h │ │ │ │ │ ├── InstrProfilingRuntime.cc │ │ │ │ │ ├── InstrProfilingUtil.c │ │ │ │ │ ├── InstrProfilingUtil.h │ │ │ │ │ ├── InstrProfilingValue.c │ │ │ │ │ ├── InstrProfilingWriter.c │ │ │ │ │ └── Makefile.mk │ │ │ │ ├── safestack/ │ │ │ │ │ ├── .clang-format │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ └── safestack.cc │ │ │ │ ├── sanitizer_common/ │ │ │ │ │ ├── .clang-format │ │ │ │ │ ├── Android.mk │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── Makefile.mk │ │ │ │ │ ├── sanitizer_addrhashmap.h │ │ │ │ │ ├── sanitizer_allocator.cc │ │ │ │ │ ├── sanitizer_allocator.h │ │ │ │ │ ├── sanitizer_allocator_interface.h │ │ │ │ │ ├── sanitizer_allocator_internal.h │ │ │ │ │ ├── sanitizer_asm.h │ │ │ │ │ ├── sanitizer_atomic.h │ │ │ │ │ ├── sanitizer_atomic_clang.h │ │ │ │ │ ├── sanitizer_atomic_clang_other.h │ │ │ │ │ ├── sanitizer_atomic_clang_x86.h │ │ │ │ │ ├── sanitizer_atomic_msvc.h │ │ │ │ │ ├── sanitizer_bitvector.h │ │ │ │ │ ├── sanitizer_bvgraph.h │ │ │ │ │ ├── sanitizer_common.cc │ │ │ │ │ ├── sanitizer_common.h │ │ │ │ │ ├── sanitizer_common_interceptors.inc │ │ │ │ │ ├── sanitizer_common_interceptors_format.inc │ │ │ │ │ ├── sanitizer_common_interceptors_ioctl.inc │ │ │ │ │ ├── sanitizer_common_libcdep.cc │ │ │ │ │ ├── sanitizer_common_nolibc.cc │ │ │ │ │ ├── sanitizer_common_syscalls.inc │ │ │ │ │ ├── sanitizer_coverage_libcdep.cc │ │ │ │ │ ├── sanitizer_coverage_mapping_libcdep.cc │ │ │ │ │ ├── sanitizer_deadlock_detector.h │ │ │ │ │ ├── sanitizer_deadlock_detector1.cc │ │ │ │ │ ├── sanitizer_deadlock_detector2.cc │ │ │ │ │ ├── sanitizer_deadlock_detector_interface.h │ │ │ │ │ ├── sanitizer_flag_parser.cc │ │ │ │ │ ├── sanitizer_flag_parser.h │ │ │ │ │ ├── sanitizer_flags.cc │ │ │ │ │ ├── sanitizer_flags.h │ │ │ │ │ ├── sanitizer_flags.inc │ │ │ │ │ ├── sanitizer_freebsd.h │ │ │ │ │ ├── sanitizer_interface_internal.h │ │ │ │ │ ├── sanitizer_internal_defs.h │ │ │ │ │ ├── sanitizer_lfstack.h │ │ │ │ │ ├── sanitizer_libc.cc │ │ │ │ │ ├── sanitizer_libc.h │ │ │ │ │ ├── sanitizer_libignore.cc │ │ │ │ │ ├── sanitizer_libignore.h │ │ │ │ │ ├── sanitizer_linux.cc │ │ │ │ │ ├── sanitizer_linux.h │ │ │ │ │ ├── sanitizer_linux_libcdep.cc │ │ │ │ │ ├── sanitizer_list.h │ │ │ │ │ ├── sanitizer_mac.cc │ │ │ │ │ ├── sanitizer_mac.h │ │ │ │ │ ├── sanitizer_malloc_mac.inc │ │ │ │ │ ├── sanitizer_mutex.h │ │ │ │ │ ├── sanitizer_persistent_allocator.cc │ │ │ │ │ ├── sanitizer_persistent_allocator.h │ │ │ │ │ ├── sanitizer_placement_new.h │ │ │ │ │ ├── sanitizer_platform.h │ │ │ │ │ ├── sanitizer_platform_interceptors.h │ │ │ │ │ ├── sanitizer_platform_limits_linux.cc │ │ │ │ │ ├── sanitizer_platform_limits_posix.cc │ │ │ │ │ ├── sanitizer_platform_limits_posix.h │ │ │ │ │ ├── sanitizer_posix.cc │ │ │ │ │ ├── sanitizer_posix.h │ │ │ │ │ ├── sanitizer_posix_libcdep.cc │ │ │ │ │ ├── sanitizer_printf.cc │ │ │ │ │ ├── sanitizer_procmaps.h │ │ │ │ │ ├── sanitizer_procmaps_common.cc │ │ │ │ │ ├── sanitizer_procmaps_freebsd.cc │ │ │ │ │ ├── sanitizer_procmaps_linux.cc │ │ │ │ │ ├── sanitizer_procmaps_mac.cc │ │ │ │ │ ├── sanitizer_quarantine.h │ │ │ │ │ ├── sanitizer_report_decorator.h │ │ │ │ │ ├── sanitizer_stackdepot.cc │ │ │ │ │ ├── sanitizer_stackdepot.h │ │ │ │ │ ├── sanitizer_stackdepotbase.h │ │ │ │ │ ├── sanitizer_stacktrace.cc │ │ │ │ │ ├── sanitizer_stacktrace.h │ │ │ │ │ ├── sanitizer_stacktrace_libcdep.cc │ │ │ │ │ ├── sanitizer_stacktrace_printer.cc │ │ │ │ │ ├── sanitizer_stacktrace_printer.h │ │ │ │ │ ├── sanitizer_stoptheworld.h │ │ │ │ │ ├── sanitizer_stoptheworld_linux_libcdep.cc │ │ │ │ │ ├── sanitizer_suppressions.cc │ │ │ │ │ ├── sanitizer_suppressions.h │ │ │ │ │ ├── sanitizer_symbolizer.cc │ │ │ │ │ ├── sanitizer_symbolizer.h │ │ │ │ │ ├── sanitizer_symbolizer_internal.h │ │ │ │ │ ├── sanitizer_symbolizer_libbacktrace.cc │ │ │ │ │ ├── sanitizer_symbolizer_libbacktrace.h │ │ │ │ │ ├── sanitizer_symbolizer_libcdep.cc │ │ │ │ │ ├── sanitizer_symbolizer_mac.cc │ │ │ │ │ ├── sanitizer_symbolizer_mac.h │ │ │ │ │ ├── sanitizer_symbolizer_posix_libcdep.cc │ │ │ │ │ ├── sanitizer_symbolizer_win.cc │ │ │ │ │ ├── sanitizer_syscall_generic.inc │ │ │ │ │ ├── sanitizer_syscall_linux_aarch64.inc │ │ │ │ │ ├── sanitizer_syscall_linux_x86_64.inc │ │ │ │ │ ├── sanitizer_thread_registry.cc │ │ │ │ │ ├── sanitizer_thread_registry.h │ │ │ │ │ ├── sanitizer_tls_get_addr.cc │ │ │ │ │ ├── sanitizer_tls_get_addr.h │ │ │ │ │ ├── sanitizer_unwind_linux_libcdep.cc │ │ │ │ │ ├── sanitizer_win.cc │ │ │ │ │ ├── scripts/ │ │ │ │ │ │ ├── check_lint.sh │ │ │ │ │ │ ├── cpplint.py │ │ │ │ │ │ ├── gen_dynamic_list.py │ │ │ │ │ │ ├── litlint.py │ │ │ │ │ │ ├── litlint_test.py │ │ │ │ │ │ └── sancov.py │ │ │ │ │ └── tests/ │ │ │ │ │ ├── Android.mk │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── sanitizer_allocator_test.cc │ │ │ │ │ ├── sanitizer_allocator_testlib.cc │ │ │ │ │ ├── sanitizer_atomic_test.cc │ │ │ │ │ ├── sanitizer_bitvector_test.cc │ │ │ │ │ ├── sanitizer_bvgraph_test.cc │ │ │ │ │ ├── sanitizer_common_test.cc │ │ │ │ │ ├── sanitizer_deadlock_detector_test.cc │ │ │ │ │ ├── sanitizer_flags_test.cc │ │ │ │ │ ├── sanitizer_format_interceptor_test.cc │ │ │ │ │ ├── sanitizer_ioctl_test.cc │ │ │ │ │ ├── sanitizer_libc_test.cc │ │ │ │ │ ├── sanitizer_linux_test.cc │ │ │ │ │ ├── sanitizer_list_test.cc │ │ │ │ │ ├── sanitizer_mutex_test.cc │ │ │ │ │ ├── sanitizer_nolibc_test.cc │ │ │ │ │ ├── sanitizer_nolibc_test_main.cc │ │ │ │ │ ├── sanitizer_posix_test.cc │ │ │ │ │ ├── sanitizer_printf_test.cc │ │ │ │ │ ├── sanitizer_procmaps_test.cc │ │ │ │ │ ├── sanitizer_pthread_wrappers.h │ │ │ │ │ ├── sanitizer_stackdepot_test.cc │ │ │ │ │ ├── sanitizer_stacktrace_printer_test.cc │ │ │ │ │ ├── sanitizer_stacktrace_test.cc │ │ │ │ │ ├── sanitizer_stoptheworld_test.cc │ │ │ │ │ ├── sanitizer_stoptheworld_testlib.cc │ │ │ │ │ ├── sanitizer_suppressions_test.cc │ │ │ │ │ ├── sanitizer_symbolizer_test.cc │ │ │ │ │ ├── sanitizer_test_config.h │ │ │ │ │ ├── sanitizer_test_main.cc │ │ │ │ │ ├── sanitizer_test_utils.h │ │ │ │ │ ├── sanitizer_thread_registry_test.cc │ │ │ │ │ └── standalone_malloc_test.cc │ │ │ │ ├── tsan/ │ │ │ │ │ ├── .clang-format │ │ │ │ │ ├── Android.mk │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── analyze_libtsan.sh │ │ │ │ │ ├── benchmarks/ │ │ │ │ │ │ ├── mini_bench_local.cc │ │ │ │ │ │ ├── mini_bench_shared.cc │ │ │ │ │ │ ├── start_many_threads.cc │ │ │ │ │ │ └── vts_many_threads_bench.cc │ │ │ │ │ ├── check_analyze.sh │ │ │ │ │ ├── check_cmake.sh │ │ │ │ │ ├── dd/ │ │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ │ ├── dd_interceptors.cc │ │ │ │ │ │ ├── dd_rtl.cc │ │ │ │ │ │ └── dd_rtl.h │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── build.bat │ │ │ │ │ │ ├── buildgo.sh │ │ │ │ │ │ ├── test.c │ │ │ │ │ │ └── tsan_go.cc │ │ │ │ │ ├── rtl/ │ │ │ │ │ │ ├── tsan.syms.extra │ │ │ │ │ │ ├── tsan_clock.cc │ │ │ │ │ │ ├── tsan_clock.h │ │ │ │ │ │ ├── tsan_defs.h │ │ │ │ │ │ ├── tsan_dense_alloc.h │ │ │ │ │ │ ├── tsan_fd.cc │ │ │ │ │ │ ├── tsan_fd.h │ │ │ │ │ │ ├── tsan_flags.cc │ │ │ │ │ │ ├── tsan_flags.h │ │ │ │ │ │ ├── tsan_flags.inc │ │ │ │ │ │ ├── tsan_ignoreset.cc │ │ │ │ │ │ ├── tsan_ignoreset.h │ │ │ │ │ │ ├── tsan_interceptors.cc │ │ │ │ │ │ ├── tsan_interceptors.h │ │ │ │ │ │ ├── tsan_interceptors_mac.cc │ │ │ │ │ │ ├── tsan_interface.cc │ │ │ │ │ │ ├── tsan_interface.h │ │ │ │ │ │ ├── tsan_interface_ann.cc │ │ │ │ │ │ ├── tsan_interface_ann.h │ │ │ │ │ │ ├── tsan_interface_atomic.cc │ │ │ │ │ │ ├── tsan_interface_inl.h │ │ │ │ │ │ ├── tsan_interface_java.cc │ │ │ │ │ │ ├── tsan_interface_java.h │ │ │ │ │ │ ├── tsan_libdispatch_mac.cc │ │ │ │ │ │ ├── tsan_malloc_mac.cc │ │ │ │ │ │ ├── tsan_md5.cc │ │ │ │ │ │ ├── tsan_mman.cc │ │ │ │ │ │ ├── tsan_mman.h │ │ │ │ │ │ ├── tsan_mutex.cc │ │ │ │ │ │ ├── tsan_mutex.h │ │ │ │ │ │ ├── tsan_mutexset.cc │ │ │ │ │ │ ├── tsan_mutexset.h │ │ │ │ │ │ ├── tsan_new_delete.cc │ │ │ │ │ │ ├── tsan_platform.h │ │ │ │ │ │ ├── tsan_platform_linux.cc │ │ │ │ │ │ ├── tsan_platform_mac.cc │ │ │ │ │ │ ├── tsan_platform_posix.cc │ │ │ │ │ │ ├── tsan_platform_windows.cc │ │ │ │ │ │ ├── tsan_ppc_regs.h │ │ │ │ │ │ ├── tsan_report.cc │ │ │ │ │ │ ├── tsan_report.h │ │ │ │ │ │ ├── tsan_rtl.cc │ │ │ │ │ │ ├── tsan_rtl.h │ │ │ │ │ │ ├── tsan_rtl_aarch64.S │ │ │ │ │ │ ├── tsan_rtl_amd64.S │ │ │ │ │ │ ├── tsan_rtl_mutex.cc │ │ │ │ │ │ ├── tsan_rtl_ppc64.S │ │ │ │ │ │ ├── tsan_rtl_report.cc │ │ │ │ │ │ ├── tsan_rtl_thread.cc │ │ │ │ │ │ ├── tsan_stack_trace.cc │ │ │ │ │ │ ├── tsan_stack_trace.h │ │ │ │ │ │ ├── tsan_stat.cc │ │ │ │ │ │ ├── tsan_stat.h │ │ │ │ │ │ ├── tsan_suppressions.cc │ │ │ │ │ │ ├── tsan_suppressions.h │ │ │ │ │ │ ├── tsan_symbolize.cc │ │ │ │ │ │ ├── tsan_symbolize.h │ │ │ │ │ │ ├── tsan_sync.cc │ │ │ │ │ │ ├── tsan_sync.h │ │ │ │ │ │ ├── tsan_trace.h │ │ │ │ │ │ ├── tsan_update_shadow_word_inl.h │ │ │ │ │ │ └── tsan_vector.h │ │ │ │ │ └── tests/ │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── rtl/ │ │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ │ ├── tsan_bench.cc │ │ │ │ │ │ ├── tsan_mop.cc │ │ │ │ │ │ ├── tsan_mutex.cc │ │ │ │ │ │ ├── tsan_posix.cc │ │ │ │ │ │ ├── tsan_string.cc │ │ │ │ │ │ ├── tsan_test.cc │ │ │ │ │ │ ├── tsan_test_util.h │ │ │ │ │ │ ├── tsan_test_util_linux.cc │ │ │ │ │ │ └── tsan_thread.cc │ │ │ │ │ └── unit/ │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── tsan_clock_test.cc │ │ │ │ │ ├── tsan_dense_alloc_test.cc │ │ │ │ │ ├── tsan_flags_test.cc │ │ │ │ │ ├── tsan_mman_test.cc │ │ │ │ │ ├── tsan_mutex_test.cc │ │ │ │ │ ├── tsan_mutexset_test.cc │ │ │ │ │ ├── tsan_shadow_test.cc │ │ │ │ │ ├── tsan_stack_test.cc │ │ │ │ │ ├── tsan_sync_test.cc │ │ │ │ │ ├── tsan_unit_test_main.cc │ │ │ │ │ └── tsan_vector_test.cc │ │ │ │ └── ubsan/ │ │ │ │ ├── Android.mk │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── Makefile.mk │ │ │ │ ├── ubsan.syms.extra │ │ │ │ ├── ubsan_checks.inc │ │ │ │ ├── ubsan_diag.cc │ │ │ │ ├── ubsan_diag.h │ │ │ │ ├── ubsan_flags.cc │ │ │ │ ├── ubsan_flags.h │ │ │ │ ├── ubsan_flags.inc │ │ │ │ ├── ubsan_handlers.cc │ │ │ │ ├── ubsan_handlers.h │ │ │ │ ├── ubsan_handlers_cxx.cc │ │ │ │ ├── ubsan_handlers_cxx.h │ │ │ │ ├── ubsan_init.cc │ │ │ │ ├── ubsan_init.h │ │ │ │ ├── ubsan_init_standalone.cc │ │ │ │ ├── ubsan_platform.h │ │ │ │ ├── ubsan_type_hash.cc │ │ │ │ ├── ubsan_type_hash.h │ │ │ │ ├── ubsan_type_hash_itanium.cc │ │ │ │ ├── ubsan_type_hash_win.cc │ │ │ │ ├── ubsan_value.cc │ │ │ │ └── ubsan_value.h │ │ │ └── make/ │ │ │ ├── AppleBI.mk │ │ │ ├── config.mk │ │ │ ├── filter-inputs │ │ │ ├── lib_info.mk │ │ │ ├── lib_platforms.mk │ │ │ ├── lib_util.mk │ │ │ ├── options.mk │ │ │ ├── platform/ │ │ │ │ ├── clang_darwin.mk │ │ │ │ ├── clang_darwin_test_input.c │ │ │ │ ├── clang_linux.mk │ │ │ │ ├── clang_linux_test_input.c │ │ │ │ ├── clang_macho_embedded.mk │ │ │ │ ├── clang_macho_embedded_test_input.c │ │ │ │ ├── clang_mingw.mk │ │ │ │ ├── darwin_bni.mk │ │ │ │ └── multi_arch.mk │ │ │ ├── subdir.mk │ │ │ ├── test/ │ │ │ │ └── test-util.mk │ │ │ └── util.mk │ │ ├── expat/ │ │ │ ├── Android.mk │ │ │ ├── Changes │ │ │ ├── CleanSpec.mk │ │ │ ├── MODULE_LICENSE_BSD_LIKE │ │ │ ├── NOTICE │ │ │ ├── README │ │ │ ├── README.android │ │ │ ├── README.version │ │ │ ├── expat_config.h │ │ │ ├── import_expat.sh │ │ │ └── lib/ │ │ │ ├── ascii.h │ │ │ ├── asciitab.h │ │ │ ├── expat.h │ │ │ ├── expat_external.h │ │ │ ├── iasciitab.h │ │ │ ├── internal.h │ │ │ ├── latin1tab.h │ │ │ ├── nametab.h │ │ │ ├── utf8tab.h │ │ │ ├── xmlparse.c │ │ │ ├── xmlrole.c │ │ │ ├── xmlrole.h │ │ │ ├── xmltok.c │ │ │ ├── xmltok.h │ │ │ ├── xmltok_impl.c │ │ │ ├── xmltok_impl.h │ │ │ └── xmltok_ns.c │ │ ├── libcxx/ │ │ │ ├── .arcconfig │ │ │ ├── .gitignore │ │ │ ├── Android.bp │ │ │ ├── Android.mk │ │ │ ├── CMakeLists.txt │ │ │ ├── CREDITS.TXT │ │ │ ├── LICENSE.TXT │ │ │ ├── MODULE_LICENSE_BSD_LIKE │ │ │ ├── Makefile │ │ │ ├── NOTICE │ │ │ ├── TODO.TXT │ │ │ ├── buildcmds/ │ │ │ │ ├── .gitignore │ │ │ │ ├── Android.mk │ │ │ │ ├── buildcmdscc │ │ │ │ └── dummy.cpp │ │ │ ├── cmake/ │ │ │ │ ├── Modules/ │ │ │ │ │ ├── CodeCoverage.cmake │ │ │ │ │ ├── HandleLibCXXABI.cmake │ │ │ │ │ ├── HandleLibcxxFlags.cmake │ │ │ │ │ ├── HandleOutOfTreeLLVM.cmake │ │ │ │ │ └── MacroEnsureOutOfSourceBuild.cmake │ │ │ │ └── config-ix.cmake │ │ │ ├── include/ │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── __bit_reference │ │ │ │ ├── __config │ │ │ │ ├── __debug │ │ │ │ ├── __functional_03 │ │ │ │ ├── __functional_base │ │ │ │ ├── __functional_base_03 │ │ │ │ ├── __hash_table │ │ │ │ ├── __locale │ │ │ │ ├── __mutex_base │ │ │ │ ├── __refstring │ │ │ │ ├── __split_buffer │ │ │ │ ├── __sso_allocator │ │ │ │ ├── __std_stream │ │ │ │ ├── __tree │ │ │ │ ├── __tuple │ │ │ │ ├── __undef___deallocate │ │ │ │ ├── __undef_min_max │ │ │ │ ├── algorithm │ │ │ │ ├── array │ │ │ │ ├── atomic │ │ │ │ ├── bitset │ │ │ │ ├── cassert │ │ │ │ ├── ccomplex │ │ │ │ ├── cctype │ │ │ │ ├── cerrno │ │ │ │ ├── cfenv │ │ │ │ ├── cfloat │ │ │ │ ├── chrono │ │ │ │ ├── cinttypes │ │ │ │ ├── ciso646 │ │ │ │ ├── climits │ │ │ │ ├── clocale │ │ │ │ ├── cmath │ │ │ │ ├── codecvt │ │ │ │ ├── complex │ │ │ │ ├── complex.h │ │ │ │ ├── condition_variable │ │ │ │ ├── csetjmp │ │ │ │ ├── csignal │ │ │ │ ├── cstdarg │ │ │ │ ├── cstdbool │ │ │ │ ├── cstddef │ │ │ │ ├── cstdint │ │ │ │ ├── cstdio │ │ │ │ ├── cstdlib │ │ │ │ ├── cstring │ │ │ │ ├── ctgmath │ │ │ │ ├── ctime │ │ │ │ ├── cwchar │ │ │ │ ├── cwctype │ │ │ │ ├── deque │ │ │ │ ├── exception │ │ │ │ ├── experimental/ │ │ │ │ │ ├── __config │ │ │ │ │ ├── algorithm │ │ │ │ │ ├── any │ │ │ │ │ ├── chrono │ │ │ │ │ ├── dynarray │ │ │ │ │ ├── functional │ │ │ │ │ ├── optional │ │ │ │ │ ├── ratio │ │ │ │ │ ├── string_view │ │ │ │ │ ├── system_error │ │ │ │ │ ├── tuple │ │ │ │ │ ├── type_traits │ │ │ │ │ └── utility │ │ │ │ ├── ext/ │ │ │ │ │ ├── __hash │ │ │ │ │ ├── hash_map │ │ │ │ │ └── hash_set │ │ │ │ ├── forward_list │ │ │ │ ├── fstream │ │ │ │ ├── functional │ │ │ │ ├── future │ │ │ │ ├── initializer_list │ │ │ │ ├── iomanip │ │ │ │ ├── ios │ │ │ │ ├── iosfwd │ │ │ │ ├── iostream │ │ │ │ ├── istream │ │ │ │ ├── iterator │ │ │ │ ├── limits │ │ │ │ ├── list │ │ │ │ ├── locale │ │ │ │ ├── map │ │ │ │ ├── memory │ │ │ │ ├── module.modulemap │ │ │ │ ├── mutex │ │ │ │ ├── new │ │ │ │ ├── numeric │ │ │ │ ├── ostream │ │ │ │ ├── queue │ │ │ │ ├── random │ │ │ │ ├── ratio │ │ │ │ ├── regex │ │ │ │ ├── scoped_allocator │ │ │ │ ├── set │ │ │ │ ├── shared_mutex │ │ │ │ ├── sstream │ │ │ │ ├── stack │ │ │ │ ├── stdexcept │ │ │ │ ├── streambuf │ │ │ │ ├── string │ │ │ │ ├── strstream │ │ │ │ ├── support/ │ │ │ │ │ ├── android/ │ │ │ │ │ │ └── locale_bionic.h │ │ │ │ │ ├── ibm/ │ │ │ │ │ │ ├── limits.h │ │ │ │ │ │ ├── support.h │ │ │ │ │ │ └── xlocale.h │ │ │ │ │ ├── newlib/ │ │ │ │ │ │ └── xlocale.h │ │ │ │ │ ├── solaris/ │ │ │ │ │ │ ├── floatingpoint.h │ │ │ │ │ │ ├── wchar.h │ │ │ │ │ │ └── xlocale.h │ │ │ │ │ ├── win32/ │ │ │ │ │ │ ├── limits_win32.h │ │ │ │ │ │ ├── locale_win32.h │ │ │ │ │ │ ├── math_win32.h │ │ │ │ │ │ └── support.h │ │ │ │ │ └── xlocale/ │ │ │ │ │ └── xlocale.h │ │ │ │ ├── system_error │ │ │ │ ├── tgmath.h │ │ │ │ ├── thread │ │ │ │ ├── tuple │ │ │ │ ├── type_traits │ │ │ │ ├── typeindex │ │ │ │ ├── typeinfo │ │ │ │ ├── unordered_map │ │ │ │ ├── unordered_set │ │ │ │ ├── utility │ │ │ │ ├── valarray │ │ │ │ └── vector │ │ │ ├── lib/ │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── buildit │ │ │ │ ├── libc++abi.exp │ │ │ │ ├── libc++abi2.exp │ │ │ │ ├── libc++sjlj-abi.exp │ │ │ │ ├── libc++unexp.exp │ │ │ │ ├── notweak.exp │ │ │ │ └── weak.exp │ │ │ ├── lit.site.cfg │ │ │ ├── ndk-test.sh │ │ │ ├── run-tests.py │ │ │ ├── src/ │ │ │ │ ├── algorithm.cpp │ │ │ │ ├── any.cpp │ │ │ │ ├── bind.cpp │ │ │ │ ├── chrono.cpp │ │ │ │ ├── condition_variable.cpp │ │ │ │ ├── config_elast.h │ │ │ │ ├── debug.cpp │ │ │ │ ├── exception.cpp │ │ │ │ ├── future.cpp │ │ │ │ ├── hash.cpp │ │ │ │ ├── ios.cpp │ │ │ │ ├── iostream.cpp │ │ │ │ ├── locale.cpp │ │ │ │ ├── memory.cpp │ │ │ │ ├── mutex.cpp │ │ │ │ ├── new.cpp │ │ │ │ ├── optional.cpp │ │ │ │ ├── random.cpp │ │ │ │ ├── regex.cpp │ │ │ │ ├── shared_mutex.cpp │ │ │ │ ├── stdexcept.cpp │ │ │ │ ├── string.cpp │ │ │ │ ├── strstream.cpp │ │ │ │ ├── support/ │ │ │ │ │ ├── atomic_support.h │ │ │ │ │ ├── solaris/ │ │ │ │ │ │ ├── README │ │ │ │ │ │ ├── mbsnrtowcs.inc │ │ │ │ │ │ ├── wcsnrtombs.inc │ │ │ │ │ │ └── xlocale.c │ │ │ │ │ └── win32/ │ │ │ │ │ ├── locale_win32.cpp │ │ │ │ │ └── support.cpp │ │ │ │ ├── system_error.cpp │ │ │ │ ├── thread.cpp │ │ │ │ ├── typeinfo.cpp │ │ │ │ ├── utility.cpp │ │ │ │ └── valarray.cpp │ │ │ ├── test.mk │ │ │ └── utils/ │ │ │ ├── not/ │ │ │ │ └── not.py │ │ │ └── sym_check/ │ │ │ ├── linux_blacklist.txt │ │ │ ├── osx_blacklist.txt │ │ │ ├── sym_check/ │ │ │ │ ├── __init__.py │ │ │ │ ├── diff.py │ │ │ │ ├── extract.py │ │ │ │ ├── match.py │ │ │ │ └── util.py │ │ │ ├── sym_diff.py │ │ │ ├── sym_extract.py │ │ │ └── sym_match.py │ │ ├── libcxxabi/ │ │ │ ├── .arcconfig │ │ │ ├── .gitignore │ │ │ ├── Android.bp │ │ │ ├── Android.mk │ │ │ ├── CMakeLists.txt │ │ │ ├── CREDITS.TXT │ │ │ ├── LICENSE.TXT │ │ │ ├── MODULE_LICENSE_BSD_LIKE │ │ │ ├── NOTICE │ │ │ ├── cmake/ │ │ │ │ └── config-ix.cmake │ │ │ ├── include/ │ │ │ │ ├── __cxxabi_config.h │ │ │ │ └── cxxabi.h │ │ │ ├── lib/ │ │ │ │ └── buildit │ │ │ └── src/ │ │ │ ├── CMakeLists.txt │ │ │ ├── abort_message.cpp │ │ │ ├── abort_message.h │ │ │ ├── config.h │ │ │ ├── cxa_aux_runtime.cpp │ │ │ ├── cxa_default_handlers.cpp │ │ │ ├── cxa_demangle.cpp │ │ │ ├── cxa_exception.cpp │ │ │ ├── cxa_exception.hpp │ │ │ ├── cxa_exception_storage.cpp │ │ │ ├── cxa_guard.cpp │ │ │ ├── cxa_handlers.cpp │ │ │ ├── cxa_handlers.hpp │ │ │ ├── cxa_new_delete.cpp │ │ │ ├── cxa_personality.cpp │ │ │ ├── cxa_thread_atexit.cpp │ │ │ ├── cxa_unexpected.cpp │ │ │ ├── cxa_vector.cpp │ │ │ ├── cxa_virtual.cpp │ │ │ ├── exception.cpp │ │ │ ├── fallback_malloc.ipp │ │ │ ├── private_typeinfo.cpp │ │ │ ├── private_typeinfo.h │ │ │ ├── stdexcept.cpp │ │ │ └── typeinfo.cpp │ │ ├── libpng/ │ │ │ ├── ANNOUNCE │ │ │ ├── Android.mk │ │ │ ├── CHANGES │ │ │ ├── CMakeLists.txt │ │ │ ├── CleanSpec.mk │ │ │ ├── INSTALL │ │ │ ├── LICENSE │ │ │ ├── MODULE_LICENSE_BSD_LIKE │ │ │ ├── Makefile.am │ │ │ ├── README │ │ │ ├── README.android │ │ │ ├── README.version │ │ │ ├── TODO │ │ │ ├── arm/ │ │ │ │ ├── arm_init.c │ │ │ │ ├── filter_neon.S │ │ │ │ └── filter_neon_intrinsics.c │ │ │ ├── autogen.sh │ │ │ ├── configure.ac │ │ │ ├── contrib/ │ │ │ │ ├── README.txt │ │ │ │ ├── arm-neon/ │ │ │ │ │ ├── README │ │ │ │ │ ├── android-ndk.c │ │ │ │ │ ├── linux-auxv.c │ │ │ │ │ └── linux.c │ │ │ │ ├── conftest/ │ │ │ │ │ ├── README │ │ │ │ │ ├── read.dfa │ │ │ │ │ ├── s_read.dfa │ │ │ │ │ ├── s_write.dfa │ │ │ │ │ ├── simple.dfa │ │ │ │ │ └── write.dfa │ │ │ │ ├── examples/ │ │ │ │ │ ├── README.txt │ │ │ │ │ ├── iccfrompng.c │ │ │ │ │ ├── pngpixel.c │ │ │ │ │ └── pngtopng.c │ │ │ │ ├── gregbook/ │ │ │ │ │ ├── COPYING │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── Makefile.mingw32 │ │ │ │ │ ├── Makefile.sgi │ │ │ │ │ ├── Makefile.unx │ │ │ │ │ ├── Makefile.w32 │ │ │ │ │ ├── README │ │ │ │ │ ├── makevms.com │ │ │ │ │ ├── readpng.c │ │ │ │ │ ├── readpng.h │ │ │ │ │ ├── readpng2.c │ │ │ │ │ ├── readpng2.h │ │ │ │ │ ├── readppm.c │ │ │ │ │ ├── rpng-win.c │ │ │ │ │ ├── rpng-x.c │ │ │ │ │ ├── rpng2-win.c │ │ │ │ │ ├── rpng2-x.c │ │ │ │ │ ├── wpng.c │ │ │ │ │ ├── writepng.c │ │ │ │ │ └── writepng.h │ │ │ │ ├── intel/ │ │ │ │ │ ├── INSTALL │ │ │ │ │ ├── Makefile.am.patch │ │ │ │ │ ├── configure.ac.patch │ │ │ │ │ ├── filter_sse2_intrinsics.c │ │ │ │ │ └── intel_init.c │ │ │ │ ├── libtests/ │ │ │ │ │ ├── fakepng.c │ │ │ │ │ ├── gentests.sh │ │ │ │ │ ├── makepng.c │ │ │ │ │ ├── pngimage.c │ │ │ │ │ ├── pngstest-errors.h │ │ │ │ │ ├── pngstest.c │ │ │ │ │ ├── pngunknown.c │ │ │ │ │ ├── pngvalid.c │ │ │ │ │ ├── readpng.c │ │ │ │ │ ├── tarith.c │ │ │ │ │ └── timepng.c │ │ │ │ ├── pngminim/ │ │ │ │ │ ├── README │ │ │ │ │ ├── decoder/ │ │ │ │ │ │ ├── README │ │ │ │ │ │ ├── makefile │ │ │ │ │ │ ├── pngusr.dfa │ │ │ │ │ │ └── pngusr.h │ │ │ │ │ ├── encoder/ │ │ │ │ │ │ ├── README │ │ │ │ │ │ ├── makefile │ │ │ │ │ │ ├── pngusr.dfa │ │ │ │ │ │ └── pngusr.h │ │ │ │ │ └── preader/ │ │ │ │ │ ├── README │ │ │ │ │ ├── makefile │ │ │ │ │ ├── pngusr.dfa │ │ │ │ │ └── pngusr.h │ │ │ │ ├── pngminus/ │ │ │ │ │ ├── README │ │ │ │ │ ├── makefile.std │ │ │ │ │ ├── makefile.tc3 │ │ │ │ │ ├── makevms.com │ │ │ │ │ ├── png2pnm.bat │ │ │ │ │ ├── png2pnm.c │ │ │ │ │ ├── png2pnm.sh │ │ │ │ │ ├── pngminus.bat │ │ │ │ │ ├── pngminus.sh │ │ │ │ │ ├── pnm2png.bat │ │ │ │ │ ├── pnm2png.c │ │ │ │ │ └── pnm2png.sh │ │ │ │ ├── pngsuite/ │ │ │ │ │ └── README │ │ │ │ ├── tools/ │ │ │ │ │ ├── README.txt │ │ │ │ │ ├── checksum-icc.c │ │ │ │ │ ├── chkfmt │ │ │ │ │ ├── cvtcolor.c │ │ │ │ │ ├── genpng.c │ │ │ │ │ ├── intgamma.sh │ │ │ │ │ ├── makesRGB.c │ │ │ │ │ ├── png-fix-itxt.c │ │ │ │ │ ├── pngfix.c │ │ │ │ │ └── sRGB.h │ │ │ │ └── visupng/ │ │ │ │ ├── PngFile.c │ │ │ │ ├── PngFile.h │ │ │ │ ├── README.txt │ │ │ │ ├── VisualPng.c │ │ │ │ ├── VisualPng.dsp │ │ │ │ ├── VisualPng.dsw │ │ │ │ ├── VisualPng.rc │ │ │ │ ├── cexcept.h │ │ │ │ └── resource.h │ │ │ ├── example.c │ │ │ ├── libpng-config.in │ │ │ ├── libpng-manual.txt │ │ │ ├── libpng.3 │ │ │ ├── libpng.pc.in │ │ │ ├── libpngpf.3 │ │ │ ├── png.5 │ │ │ ├── png.c │ │ │ ├── png.h │ │ │ ├── pngconf.h │ │ │ ├── pngdebug.h │ │ │ ├── pngerror.c │ │ │ ├── pngget.c │ │ │ ├── pnginfo.h │ │ │ ├── pnglibconf.h │ │ │ ├── pngmem.c │ │ │ ├── pngpread.c │ │ │ ├── pngpriv.h │ │ │ ├── pngread.c │ │ │ ├── pngrio.c │ │ │ ├── pngrtran.c │ │ │ ├── pngrutil.c │ │ │ ├── pngset.c │ │ │ ├── pngstruct.h │ │ │ ├── pngtest.c │ │ │ ├── pngtrans.c │ │ │ ├── pngusr.dfa │ │ │ ├── pngusr.h │ │ │ ├── pngwio.c │ │ │ ├── pngwrite.c │ │ │ ├── pngwtran.c │ │ │ ├── pngwutil.c │ │ │ ├── projects/ │ │ │ │ ├── owatcom/ │ │ │ │ │ ├── libpng.tgt │ │ │ │ │ ├── libpng.wpj │ │ │ │ │ ├── pngconfig.mak │ │ │ │ │ ├── pngstest.tgt │ │ │ │ │ ├── pngtest.tgt │ │ │ │ │ └── pngvalid.tgt │ │ │ │ ├── visualc71/ │ │ │ │ │ ├── PRJ0041.mak │ │ │ │ │ ├── README.txt │ │ │ │ │ ├── README_zlib.txt │ │ │ │ │ ├── libpng.sln │ │ │ │ │ ├── libpng.vcproj │ │ │ │ │ ├── pngtest.vcproj │ │ │ │ │ └── zlib.vcproj │ │ │ │ └── vstudio/ │ │ │ │ ├── README.txt │ │ │ │ ├── libpng/ │ │ │ │ │ └── libpng.vcxproj │ │ │ │ ├── pnglibconf/ │ │ │ │ │ └── pnglibconf.vcxproj │ │ │ │ ├── pngstest/ │ │ │ │ │ └── pngstest.vcxproj │ │ │ │ ├── pngtest/ │ │ │ │ │ └── pngtest.vcxproj │ │ │ │ ├── pngunknown/ │ │ │ │ │ └── pngunknown.vcxproj │ │ │ │ ├── pngvalid/ │ │ │ │ │ └── pngvalid.vcxproj │ │ │ │ ├── vstudio.sln │ │ │ │ ├── zlib/ │ │ │ │ │ └── zlib.vcxproj │ │ │ │ └── zlib.props │ │ │ └── scripts/ │ │ │ ├── README.txt │ │ │ ├── SCOPTIONS.ppc │ │ │ ├── checksym.awk │ │ │ ├── def.c │ │ │ ├── descrip.mms │ │ │ ├── dfn.awk │ │ │ ├── genchk.cmake.in │ │ │ ├── genout.cmake.in │ │ │ ├── gensrc.cmake.in │ │ │ ├── intprefix.c │ │ │ ├── libpng-config-body.in │ │ │ ├── libpng-config-head.in │ │ │ ├── libpng.pc.in │ │ │ ├── macro.lst │ │ │ ├── makefile.32sunu │ │ │ ├── makefile.64sunu │ │ │ ├── makefile.acorn │ │ │ ├── makefile.aix │ │ │ ├── makefile.amiga │ │ │ ├── makefile.atari │ │ │ ├── makefile.bc32 │ │ │ ├── makefile.beos │ │ │ ├── makefile.bor │ │ │ ├── makefile.cegcc │ │ │ ├── makefile.darwin │ │ │ ├── makefile.dec │ │ │ ├── makefile.dj2 │ │ │ ├── makefile.freebsd │ │ │ ├── makefile.gcc │ │ │ ├── makefile.hp64 │ │ │ ├── makefile.hpgcc │ │ │ ├── makefile.hpux │ │ │ ├── makefile.ibmc │ │ │ ├── makefile.intel │ │ │ ├── makefile.knr │ │ │ ├── makefile.linux │ │ │ ├── makefile.mips │ │ │ ├── makefile.msc │ │ │ ├── makefile.msys │ │ │ ├── makefile.ne12bsd │ │ │ ├── makefile.netbsd │ │ │ ├── makefile.openbsd │ │ │ ├── makefile.sco │ │ │ ├── makefile.sggcc │ │ │ ├── makefile.sgi │ │ │ ├── makefile.so9 │ │ │ ├── makefile.solaris │ │ │ ├── makefile.solaris-x86 │ │ │ ├── makefile.std │ │ │ ├── makefile.sunos │ │ │ ├── makefile.tc3 │ │ │ ├── makefile.vcwin32 │ │ │ ├── makevms.com │ │ │ ├── options.awk │ │ │ ├── pnglibconf.dfa │ │ │ ├── pnglibconf.h.prebuilt │ │ │ ├── pnglibconf.mak │ │ │ ├── pngwin.rc │ │ │ ├── prefix.c │ │ │ ├── smakefile.ppc │ │ │ ├── sym.c │ │ │ ├── symbols.c │ │ │ ├── symbols.def │ │ │ ├── test.cmake.in │ │ │ └── vers.c │ │ ├── safe-iop/ │ │ │ ├── Android.mk │ │ │ ├── CleanSpec.mk │ │ │ ├── MODULE_LICENSE_BSD_LIKE │ │ │ ├── NOTICE │ │ │ ├── README.version │ │ │ ├── include/ │ │ │ │ └── safe_iop.h │ │ │ ├── src/ │ │ │ │ └── safe_iop.c │ │ │ └── testsuite/ │ │ │ └── Android.mk │ │ └── zlib/ │ │ ├── Android.mk │ │ ├── CleanSpec.mk │ │ ├── MODULE_LICENSE_BSD_LIKE │ │ ├── NOTICE │ │ ├── src/ │ │ │ ├── CMakeLists.txt │ │ │ ├── ChangeLog │ │ │ ├── FAQ │ │ │ ├── INDEX │ │ │ ├── Makefile.in │ │ │ ├── README │ │ │ ├── adler32.c │ │ │ ├── amiga/ │ │ │ │ ├── Makefile.pup │ │ │ │ └── Makefile.sas │ │ │ ├── as400/ │ │ │ │ ├── bndsrc │ │ │ │ ├── compile.clp │ │ │ │ ├── readme.txt │ │ │ │ └── zlib.inc │ │ │ ├── compress.c │ │ │ ├── configure │ │ │ ├── contrib/ │ │ │ │ ├── README.contrib │ │ │ │ ├── ada/ │ │ │ │ │ ├── buffer_demo.adb │ │ │ │ │ ├── mtest.adb │ │ │ │ │ ├── read.adb │ │ │ │ │ ├── readme.txt │ │ │ │ │ ├── test.adb │ │ │ │ │ ├── zlib-streams.adb │ │ │ │ │ ├── zlib-streams.ads │ │ │ │ │ ├── zlib-thin.adb │ │ │ │ │ ├── zlib-thin.ads │ │ │ │ │ ├── zlib.adb │ │ │ │ │ ├── zlib.ads │ │ │ │ │ └── zlib.gpr │ │ │ │ ├── amd64/ │ │ │ │ │ └── amd64-match.S │ │ │ │ ├── asm686/ │ │ │ │ │ ├── README.686 │ │ │ │ │ └── match.S │ │ │ │ ├── blast/ │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── README │ │ │ │ │ ├── blast.c │ │ │ │ │ ├── blast.h │ │ │ │ │ ├── test.pk │ │ │ │ │ └── test.txt │ │ │ │ ├── delphi/ │ │ │ │ │ ├── ZLib.pas │ │ │ │ │ ├── ZLibConst.pas │ │ │ │ │ ├── readme.txt │ │ │ │ │ └── zlibd32.mak │ │ │ │ ├── dotzlib/ │ │ │ │ │ ├── DotZLib/ │ │ │ │ │ │ ├── AssemblyInfo.cs │ │ │ │ │ │ ├── ChecksumImpl.cs │ │ │ │ │ │ ├── CircularBuffer.cs │ │ │ │ │ │ ├── CodecBase.cs │ │ │ │ │ │ ├── Deflater.cs │ │ │ │ │ │ ├── DotZLib.cs │ │ │ │ │ │ ├── DotZLib.csproj │ │ │ │ │ │ ├── GZipStream.cs │ │ │ │ │ │ ├── Inflater.cs │ │ │ │ │ │ └── UnitTests.cs │ │ │ │ │ ├── DotZLib.build │ │ │ │ │ ├── DotZLib.chm │ │ │ │ │ ├── DotZLib.sln │ │ │ │ │ ├── LICENSE_1_0.txt │ │ │ │ │ └── readme.txt │ │ │ │ ├── gcc_gvmat64/ │ │ │ │ │ └── gvmat64.S │ │ │ │ ├── infback9/ │ │ │ │ │ ├── README │ │ │ │ │ ├── infback9.c │ │ │ │ │ ├── infback9.h │ │ │ │ │ ├── inffix9.h │ │ │ │ │ ├── inflate9.h │ │ │ │ │ ├── inftree9.c │ │ │ │ │ └── inftree9.h │ │ │ │ ├── inflate86/ │ │ │ │ │ ├── inffas86.c │ │ │ │ │ └── inffast.S │ │ │ │ ├── iostream/ │ │ │ │ │ ├── test.cpp │ │ │ │ │ ├── zfstream.cpp │ │ │ │ │ └── zfstream.h │ │ │ │ ├── iostream2/ │ │ │ │ │ ├── zstream.h │ │ │ │ │ └── zstream_test.cpp │ │ │ │ ├── iostream3/ │ │ │ │ │ ├── README │ │ │ │ │ ├── TODO │ │ │ │ │ ├── test.cc │ │ │ │ │ ├── zfstream.cc │ │ │ │ │ └── zfstream.h │ │ │ │ ├── masmx64/ │ │ │ │ │ ├── bld_ml64.bat │ │ │ │ │ ├── gvmat64.asm │ │ │ │ │ ├── inffas8664.c │ │ │ │ │ ├── inffasx64.asm │ │ │ │ │ └── readme.txt │ │ │ │ ├── masmx86/ │ │ │ │ │ ├── bld_ml32.bat │ │ │ │ │ ├── inffas32.asm │ │ │ │ │ ├── match686.asm │ │ │ │ │ └── readme.txt │ │ │ │ ├── minizip/ │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── Makefile.am │ │ │ │ │ ├── MiniZip64_Changes.txt │ │ │ │ │ ├── MiniZip64_info.txt │ │ │ │ │ ├── configure.ac │ │ │ │ │ ├── crypt.h │ │ │ │ │ ├── ioapi.c │ │ │ │ │ ├── ioapi.h │ │ │ │ │ ├── iowin32.c │ │ │ │ │ ├── iowin32.h │ │ │ │ │ ├── make_vms.com │ │ │ │ │ ├── miniunz.c │ │ │ │ │ ├── miniunzip.1 │ │ │ │ │ ├── minizip.1 │ │ │ │ │ ├── minizip.c │ │ │ │ │ ├── minizip.pc.in │ │ │ │ │ ├── mztools.c │ │ │ │ │ ├── mztools.h │ │ │ │ │ ├── unzip.c │ │ │ │ │ ├── unzip.h │ │ │ │ │ ├── zip.c │ │ │ │ │ └── zip.h │ │ │ │ ├── pascal/ │ │ │ │ │ ├── example.pas │ │ │ │ │ ├── readme.txt │ │ │ │ │ ├── zlibd32.mak │ │ │ │ │ └── zlibpas.pas │ │ │ │ ├── puff/ │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── README │ │ │ │ │ ├── puff.c │ │ │ │ │ ├── puff.h │ │ │ │ │ ├── pufftest.c │ │ │ │ │ └── zeros.raw │ │ │ │ ├── testzlib/ │ │ │ │ │ ├── testzlib.c │ │ │ │ │ └── testzlib.txt │ │ │ │ ├── untgz/ │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── Makefile.msc │ │ │ │ │ └── untgz.c │ │ │ │ └── vstudio/ │ │ │ │ ├── readme.txt │ │ │ │ ├── vc10/ │ │ │ │ │ ├── miniunz.vcxproj │ │ │ │ │ ├── miniunz.vcxproj.filters │ │ │ │ │ ├── minizip.vcxproj │ │ │ │ │ ├── minizip.vcxproj.filters │ │ │ │ │ ├── testzlib.vcxproj │ │ │ │ │ ├── testzlib.vcxproj.filters │ │ │ │ │ ├── testzlibdll.vcxproj │ │ │ │ │ ├── testzlibdll.vcxproj.filters │ │ │ │ │ ├── zlib.rc │ │ │ │ │ ├── zlibstat.vcxproj │ │ │ │ │ ├── zlibstat.vcxproj.filters │ │ │ │ │ ├── zlibvc.def │ │ │ │ │ ├── zlibvc.sln │ │ │ │ │ ├── zlibvc.vcxproj │ │ │ │ │ └── zlibvc.vcxproj.filters │ │ │ │ ├── vc11/ │ │ │ │ │ ├── miniunz.vcxproj │ │ │ │ │ ├── minizip.vcxproj │ │ │ │ │ ├── testzlib.vcxproj │ │ │ │ │ ├── testzlibdll.vcxproj │ │ │ │ │ ├── zlib.rc │ │ │ │ │ ├── zlibstat.vcxproj │ │ │ │ │ ├── zlibvc.def │ │ │ │ │ ├── zlibvc.sln │ │ │ │ │ └── zlibvc.vcxproj │ │ │ │ └── vc9/ │ │ │ │ ├── miniunz.vcproj │ │ │ │ ├── minizip.vcproj │ │ │ │ ├── testzlib.vcproj │ │ │ │ ├── testzlibdll.vcproj │ │ │ │ ├── zlib.rc │ │ │ │ ├── zlibstat.vcproj │ │ │ │ ├── zlibvc.def │ │ │ │ ├── zlibvc.sln │ │ │ │ └── zlibvc.vcproj │ │ │ ├── crc32.c │ │ │ ├── crc32.h │ │ │ ├── deflate.c │ │ │ ├── deflate.h │ │ │ ├── doc/ │ │ │ │ ├── algorithm.txt │ │ │ │ ├── rfc1950.txt │ │ │ │ ├── rfc1951.txt │ │ │ │ ├── rfc1952.txt │ │ │ │ └── txtvsbin.txt │ │ │ ├── examples/ │ │ │ │ ├── README.examples │ │ │ │ ├── enough.c │ │ │ │ ├── fitblk.c │ │ │ │ ├── gun.c │ │ │ │ ├── gzappend.c │ │ │ │ ├── gzjoin.c │ │ │ │ ├── gzlog.c │ │ │ │ ├── gzlog.h │ │ │ │ ├── zlib_how.html │ │ │ │ ├── zpipe.c │ │ │ │ └── zran.c │ │ │ ├── gzclose.c │ │ │ ├── gzguts.h │ │ │ ├── gzlib.c │ │ │ ├── gzread.c │ │ │ ├── gzwrite.c │ │ │ ├── infback.c │ │ │ ├── inffast.c │ │ │ ├── inffast.h │ │ │ ├── inffixed.h │ │ │ ├── inflate.c │ │ │ ├── inflate.h │ │ │ ├── inftrees.c │ │ │ ├── inftrees.h │ │ │ ├── make_vms.com │ │ │ ├── msdos/ │ │ │ │ ├── Makefile.bor │ │ │ │ ├── Makefile.dj2 │ │ │ │ ├── Makefile.emx │ │ │ │ ├── Makefile.msc │ │ │ │ └── Makefile.tc │ │ │ ├── nintendods/ │ │ │ │ ├── Makefile │ │ │ │ └── README │ │ │ ├── old/ │ │ │ │ ├── Makefile.emx │ │ │ │ ├── Makefile.riscos │ │ │ │ ├── README │ │ │ │ ├── descrip.mms │ │ │ │ ├── os2/ │ │ │ │ │ ├── Makefile.os2 │ │ │ │ │ └── zlib.def │ │ │ │ └── visual-basic.txt │ │ │ ├── qnx/ │ │ │ │ └── package.qpg │ │ │ ├── test/ │ │ │ │ ├── example.c │ │ │ │ ├── infcover.c │ │ │ │ └── minigzip.c │ │ │ ├── treebuild.xml │ │ │ ├── trees.c │ │ │ ├── trees.h │ │ │ ├── uncompr.c │ │ │ ├── watcom/ │ │ │ │ ├── watcom_f.mak │ │ │ │ └── watcom_l.mak │ │ │ ├── win32/ │ │ │ │ ├── DLL_FAQ.txt │ │ │ │ ├── Makefile.bor │ │ │ │ ├── Makefile.gcc │ │ │ │ ├── Makefile.msc │ │ │ │ ├── README-WIN32.txt │ │ │ │ ├── VisualC.txt │ │ │ │ ├── zlib.def │ │ │ │ └── zlib1.rc │ │ │ ├── zconf.h │ │ │ ├── zconf.h.cmakein │ │ │ ├── zconf.h.in │ │ │ ├── zlib.3 │ │ │ ├── zlib.h │ │ │ ├── zlib.pc │ │ │ ├── zlib.pc.cmakein │ │ │ ├── zlib.pc.in │ │ │ ├── zlib2ansi │ │ │ ├── zutil.c │ │ │ └── zutil.h │ │ └── update_zlib.sh │ ├── frameworks/ │ │ ├── base/ │ │ │ ├── include/ │ │ │ │ ├── android_runtime/ │ │ │ │ │ ├── AndroidRuntime.h │ │ │ │ │ ├── Log.h │ │ │ │ │ ├── android_app_NativeActivity.h │ │ │ │ │ ├── android_content_res_Configuration.h │ │ │ │ │ ├── android_graphics_SurfaceTexture.h │ │ │ │ │ ├── android_hardware_camera2_CameraMetadata.h │ │ │ │ │ ├── android_util_AssetManager.h │ │ │ │ │ ├── android_view_InputQueue.h │ │ │ │ │ ├── android_view_Surface.h │ │ │ │ │ └── android_view_SurfaceSession.h │ │ │ │ ├── androidfw/ │ │ │ │ │ ├── Asset.h │ │ │ │ │ ├── AssetDir.h │ │ │ │ │ ├── AssetManager.h │ │ │ │ │ ├── AttributeFinder.h │ │ │ │ │ ├── BackupHelpers.h │ │ │ │ │ ├── ByteBucketArray.h │ │ │ │ │ ├── CursorWindow.h │ │ │ │ │ ├── DisplayEventDispatcher.h │ │ │ │ │ ├── LocaleData.h │ │ │ │ │ ├── ObbFile.h │ │ │ │ │ ├── ResourcePackageId.h │ │ │ │ │ ├── ResourceTypes.h │ │ │ │ │ ├── StreamingZipInflater.h │ │ │ │ │ ├── TypeWrappers.h │ │ │ │ │ ├── ZipFileRO.h │ │ │ │ │ ├── ZipUtils.h │ │ │ │ │ └── misc.h │ │ │ │ ├── private/ │ │ │ │ │ ├── README │ │ │ │ │ └── hwui/ │ │ │ │ │ └── DrawGlInfo.h │ │ │ │ └── storage/ │ │ │ │ ├── IMountService.h │ │ │ │ ├── IMountServiceListener.h │ │ │ │ ├── IMountShutdownObserver.h │ │ │ │ └── IObbActionListener.h │ │ │ ├── libs/ │ │ │ │ └── androidfw/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Asset.cpp │ │ │ │ ├── AssetDir.cpp │ │ │ │ ├── AssetManager.cpp │ │ │ │ ├── BackupData.cpp │ │ │ │ ├── BackupHelpers.cpp │ │ │ │ ├── CursorWindow.cpp │ │ │ │ ├── DisplayEventDispatcher.cpp │ │ │ │ ├── LocaleData.cpp │ │ │ │ ├── LocaleDataTables.cpp │ │ │ │ ├── MODULE_LICENSE_APACHE2 │ │ │ │ ├── NOTICE │ │ │ │ ├── ObbFile.cpp │ │ │ │ ├── ResourceTypes.cpp │ │ │ │ ├── StreamingZipInflater.cpp │ │ │ │ ├── TypeWrappers.cpp │ │ │ │ ├── ZipFileRO.cpp │ │ │ │ ├── ZipUtils.cpp │ │ │ │ ├── misc.cpp │ │ │ │ └── tests/ │ │ │ │ ├── Android.mk │ │ │ │ ├── AttributeFinder_test.cpp │ │ │ │ ├── BackupData_test.cpp │ │ │ │ ├── ByteBucketArray_test.cpp │ │ │ │ ├── ConfigLocale_test.cpp │ │ │ │ ├── Config_test.cpp │ │ │ │ ├── Idmap_test.cpp │ │ │ │ ├── ObbFile_test.cpp │ │ │ │ ├── ResTable_test.cpp │ │ │ │ ├── Split_test.cpp │ │ │ │ ├── TestHelpers.cpp │ │ │ │ ├── TestHelpers.h │ │ │ │ ├── Theme_test.cpp │ │ │ │ ├── TypeWrappers_test.cpp │ │ │ │ ├── ZipUtils_test.cpp │ │ │ │ └── data/ │ │ │ │ ├── .gitignore │ │ │ │ ├── app/ │ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ │ ├── R.h │ │ │ │ │ ├── app_arsc.h │ │ │ │ │ ├── build │ │ │ │ │ └── res/ │ │ │ │ │ └── values/ │ │ │ │ │ └── values.xml │ │ │ │ ├── basic/ │ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ │ ├── R.h │ │ │ │ │ ├── basic_arsc.h │ │ │ │ │ ├── build │ │ │ │ │ ├── res/ │ │ │ │ │ │ ├── layout/ │ │ │ │ │ │ │ └── main.xml │ │ │ │ │ │ ├── layout-fr-sw600dp/ │ │ │ │ │ │ │ └── main.xml │ │ │ │ │ │ ├── values/ │ │ │ │ │ │ │ └── values.xml │ │ │ │ │ │ ├── values-de/ │ │ │ │ │ │ │ └── values.xml │ │ │ │ │ │ ├── values-fr/ │ │ │ │ │ │ │ └── values.xml │ │ │ │ │ │ ├── values-hdpi/ │ │ │ │ │ │ │ └── values.xml │ │ │ │ │ │ ├── values-sv/ │ │ │ │ │ │ │ └── values.xml │ │ │ │ │ │ ├── values-xhdpi/ │ │ │ │ │ │ │ └── values.xml │ │ │ │ │ │ └── values-xxhdpi/ │ │ │ │ │ │ └── values.xml │ │ │ │ │ ├── split_de_fr_arsc.h │ │ │ │ │ ├── split_hdpi_v4_arsc.h │ │ │ │ │ ├── split_xhdpi_v4_arsc.h │ │ │ │ │ └── split_xxhdpi_v4_arsc.h │ │ │ │ ├── feature/ │ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ │ ├── build │ │ │ │ │ ├── feature_arsc.h │ │ │ │ │ └── res/ │ │ │ │ │ └── values/ │ │ │ │ │ └── values.xml │ │ │ │ ├── lib/ │ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ │ ├── R.h │ │ │ │ │ ├── build │ │ │ │ │ ├── lib_arsc.h │ │ │ │ │ └── res/ │ │ │ │ │ └── values/ │ │ │ │ │ └── values.xml │ │ │ │ ├── overlay/ │ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ │ ├── build │ │ │ │ │ ├── overlay_arsc.h │ │ │ │ │ └── res/ │ │ │ │ │ └── values/ │ │ │ │ │ └── values.xml │ │ │ │ └── system/ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ ├── R.h │ │ │ │ ├── build │ │ │ │ ├── res/ │ │ │ │ │ └── values/ │ │ │ │ │ └── themes.xml │ │ │ │ └── system_arsc.h │ │ │ └── tools/ │ │ │ └── aapt/ │ │ │ ├── AaptAssets.cpp │ │ │ ├── AaptAssets.h │ │ │ ├── AaptConfig.cpp │ │ │ ├── AaptConfig.h │ │ │ ├── AaptUtil.cpp │ │ │ ├── AaptUtil.h │ │ │ ├── AaptXml.cpp │ │ │ ├── AaptXml.h │ │ │ ├── Android.mk │ │ │ ├── ApkBuilder.cpp │ │ │ ├── ApkBuilder.h │ │ │ ├── Bundle.h │ │ │ ├── CacheUpdater.h │ │ │ ├── Command.cpp │ │ │ ├── ConfigDescription.h │ │ │ ├── CrunchCache.cpp │ │ │ ├── CrunchCache.h │ │ │ ├── DirectoryWalker.h │ │ │ ├── FileFinder.cpp │ │ │ ├── FileFinder.h │ │ │ ├── Images.cpp │ │ │ ├── Images.h │ │ │ ├── IndentPrinter.h │ │ │ ├── Main.cpp │ │ │ ├── Main.h │ │ │ ├── NOTICE │ │ │ ├── OutputSet.h │ │ │ ├── Package.cpp │ │ │ ├── Resource.cpp │ │ │ ├── ResourceFilter.cpp │ │ │ ├── ResourceFilter.h │ │ │ ├── ResourceIdCache.cpp │ │ │ ├── ResourceIdCache.h │ │ │ ├── ResourceTable.cpp │ │ │ ├── ResourceTable.h │ │ │ ├── SdkConstants.h │ │ │ ├── SourcePos.cpp │ │ │ ├── SourcePos.h │ │ │ ├── StringPool.cpp │ │ │ ├── StringPool.h │ │ │ ├── Symbol.h │ │ │ ├── WorkQueue.cpp │ │ │ ├── WorkQueue.h │ │ │ ├── XMLNode.cpp │ │ │ ├── XMLNode.h │ │ │ ├── ZipEntry.cpp │ │ │ ├── ZipEntry.h │ │ │ ├── ZipFile.cpp │ │ │ ├── ZipFile.h │ │ │ ├── pseudolocalize.cpp │ │ │ ├── pseudolocalize.h │ │ │ └── tests/ │ │ │ ├── AaptConfig_test.cpp │ │ │ ├── AaptGroupEntry_test.cpp │ │ │ ├── CrunchCache_test.cpp │ │ │ ├── FileFinder_test.cpp │ │ │ ├── MockCacheUpdater.h │ │ │ ├── MockDirectoryWalker.h │ │ │ ├── MockFileFinder.h │ │ │ ├── Pseudolocales_test.cpp │ │ │ ├── ResourceFilter_test.cpp │ │ │ ├── ResourceTable_test.cpp │ │ │ ├── TestHelper.h │ │ │ └── plurals/ │ │ │ ├── AndroidManifest.xml │ │ │ ├── res/ │ │ │ │ └── values/ │ │ │ │ └── strings.xml │ │ │ └── run.sh │ │ └── native/ │ │ └── include/ │ │ ├── android/ │ │ │ ├── asset_manager.h │ │ │ ├── asset_manager_jni.h │ │ │ ├── bitmap.h │ │ │ ├── choreographer.h │ │ │ ├── configuration.h │ │ │ ├── input.h │ │ │ ├── keycodes.h │ │ │ ├── looper.h │ │ │ ├── multinetwork.h │ │ │ ├── native_activity.h │ │ │ ├── native_window.h │ │ │ ├── native_window_jni.h │ │ │ ├── obb.h │ │ │ ├── rect.h │ │ │ ├── sensor.h │ │ │ ├── storage_manager.h │ │ │ ├── trace.h │ │ │ └── window.h │ │ ├── batteryservice/ │ │ │ ├── BatteryService.h │ │ │ ├── IBatteryPropertiesListener.h │ │ │ └── IBatteryPropertiesRegistrar.h │ │ ├── binder/ │ │ │ ├── AppOpsManager.h │ │ │ ├── Binder.h │ │ │ ├── BinderService.h │ │ │ ├── BpBinder.h │ │ │ ├── BufferedTextOutput.h │ │ │ ├── Debug.h │ │ │ ├── IAppOpsCallback.h │ │ │ ├── IAppOpsService.h │ │ │ ├── IBatteryStats.h │ │ │ ├── IBinder.h │ │ │ ├── IInterface.h │ │ │ ├── IMediaResourceMonitor.h │ │ │ ├── IMemory.h │ │ │ ├── IPCThreadState.h │ │ │ ├── IPermissionController.h │ │ │ ├── IProcessInfoService.h │ │ │ ├── IResultReceiver.h │ │ │ ├── IServiceManager.h │ │ │ ├── MemoryBase.h │ │ │ ├── MemoryDealer.h │ │ │ ├── MemoryHeapBase.h │ │ │ ├── Parcel.h │ │ │ ├── Parcelable.h │ │ │ ├── PermissionCache.h │ │ │ ├── PersistableBundle.h │ │ │ ├── ProcessInfoService.h │ │ │ ├── ProcessState.h │ │ │ ├── Status.h │ │ │ └── TextOutput.h │ │ ├── diskusage/ │ │ │ └── dirsize.h │ │ ├── gui/ │ │ │ ├── BitTube.h │ │ │ ├── BufferItem.h │ │ │ ├── BufferItemConsumer.h │ │ │ ├── BufferQueue.h │ │ │ ├── BufferQueueConsumer.h │ │ │ ├── BufferQueueCore.h │ │ │ ├── BufferQueueDefs.h │ │ │ ├── BufferQueueProducer.h │ │ │ ├── BufferSlot.h │ │ │ ├── ConsumerBase.h │ │ │ ├── CpuConsumer.h │ │ │ ├── DisplayEventReceiver.h │ │ │ ├── GLConsumer.h │ │ │ ├── GraphicBufferAlloc.h │ │ │ ├── GuiConfig.h │ │ │ ├── IConsumerListener.h │ │ │ ├── IDisplayEventConnection.h │ │ │ ├── IGraphicBufferAlloc.h │ │ │ ├── IGraphicBufferConsumer.h │ │ │ ├── IGraphicBufferProducer.h │ │ │ ├── IProducerListener.h │ │ │ ├── ISensorEventConnection.h │ │ │ ├── ISensorServer.h │ │ │ ├── ISurfaceComposer.h │ │ │ ├── ISurfaceComposerClient.h │ │ │ ├── Sensor.h │ │ │ ├── SensorEventQueue.h │ │ │ ├── SensorManager.h │ │ │ ├── StreamSplitter.h │ │ │ ├── Surface.h │ │ │ ├── SurfaceComposerClient.h │ │ │ └── SurfaceControl.h │ │ ├── input/ │ │ │ ├── IInputFlinger.h │ │ │ ├── Input.h │ │ │ ├── InputDevice.h │ │ │ ├── InputEventLabels.h │ │ │ ├── InputTransport.h │ │ │ ├── KeyCharacterMap.h │ │ │ ├── KeyLayoutMap.h │ │ │ ├── Keyboard.h │ │ │ ├── VelocityControl.h │ │ │ ├── VelocityTracker.h │ │ │ └── VirtualKeyMap.h │ │ ├── media/ │ │ │ ├── drm/ │ │ │ │ └── DrmAPI.h │ │ │ ├── editor/ │ │ │ │ └── II420ColorConverter.h │ │ │ ├── hardware/ │ │ │ │ ├── CryptoAPI.h │ │ │ │ ├── HDCPAPI.h │ │ │ │ ├── HardwareAPI.h │ │ │ │ ├── MetadataBufferType.h │ │ │ │ ├── OMXPluginBase.h │ │ │ │ └── VideoAPI.h │ │ │ └── openmax/ │ │ │ ├── OMX_AsString.h │ │ │ ├── OMX_Audio.h │ │ │ ├── OMX_AudioExt.h │ │ │ ├── OMX_Component.h │ │ │ ├── OMX_ContentPipe.h │ │ │ ├── OMX_Core.h │ │ │ ├── OMX_IVCommon.h │ │ │ ├── OMX_Image.h │ │ │ ├── OMX_Index.h │ │ │ ├── OMX_IndexExt.h │ │ │ ├── OMX_Other.h │ │ │ ├── OMX_Types.h │ │ │ ├── OMX_Video.h │ │ │ └── OMX_VideoExt.h │ │ ├── powermanager/ │ │ │ ├── IPowerManager.h │ │ │ └── PowerManager.h │ │ ├── private/ │ │ │ ├── binder/ │ │ │ │ ├── Static.h │ │ │ │ └── binder_module.h │ │ │ ├── gui/ │ │ │ │ ├── ComposerService.h │ │ │ │ ├── LayerState.h │ │ │ │ └── SyncFeatures.h │ │ │ └── ui/ │ │ │ └── RegionHelper.h │ │ └── ui/ │ │ ├── ANativeObjectBase.h │ │ ├── DisplayInfo.h │ │ ├── DisplayStatInfo.h │ │ ├── Fence.h │ │ ├── FrameStats.h │ │ ├── GraphicBuffer.h │ │ ├── GraphicBufferAllocator.h │ │ ├── GraphicBufferMapper.h │ │ ├── HdrCapabilities.h │ │ ├── PixelFormat.h │ │ ├── Point.h │ │ ├── Rect.h │ │ ├── Region.h │ │ ├── TMatHelpers.h │ │ ├── TVecHelpers.h │ │ ├── UiConfig.h │ │ ├── mat4.h │ │ ├── vec2.h │ │ ├── vec3.h │ │ └── vec4.h │ ├── libnativehelper/ │ │ ├── ALog-priv.h │ │ ├── Android.mk │ │ ├── AsynchronousCloseMonitor.cpp │ │ ├── JNIHelp.cpp │ │ ├── JniConstants.cpp │ │ ├── JniInvocation.cpp │ │ ├── MODULE_LICENSE_APACHE2 │ │ ├── NOTICE │ │ ├── README │ │ ├── include/ │ │ │ └── nativehelper/ │ │ │ ├── AsynchronousCloseMonitor.h │ │ │ ├── JNIHelp.h │ │ │ ├── JniConstants.h │ │ │ ├── JniInvocation.h │ │ │ ├── ScopedBytes.h │ │ │ ├── ScopedFd.h │ │ │ ├── ScopedLocalFrame.h │ │ │ ├── ScopedLocalRef.h │ │ │ ├── ScopedPrimitiveArray.h │ │ │ ├── ScopedStringChars.h │ │ │ ├── ScopedUtfChars.h │ │ │ ├── UniquePtr.h │ │ │ ├── jni.h │ │ │ └── toStringArray.h │ │ ├── tests/ │ │ │ ├── Android.mk │ │ │ └── JniInvocation_test.cpp │ │ └── toStringArray.cpp │ ├── patch/ │ │ ├── 0001-patch-code.patch │ │ ├── 0002-static-build.patch │ │ └── 003-rewrite-parseResourceName.patch │ └── system/ │ └── core/ │ ├── base/ │ │ ├── .clang-format │ │ ├── Android.mk │ │ ├── CPPLINT.cfg │ │ ├── errors_test.cpp │ │ ├── errors_unix.cpp │ │ ├── errors_windows.cpp │ │ ├── file.cpp │ │ ├── file_test.cpp │ │ ├── include/ │ │ │ └── android-base/ │ │ │ ├── errors.h │ │ │ ├── file.h │ │ │ ├── logging.h │ │ │ ├── macros.h │ │ │ ├── memory.h │ │ │ ├── parseint.h │ │ │ ├── parsenetaddress.h │ │ │ ├── stringprintf.h │ │ │ ├── strings.h │ │ │ ├── test_utils.h │ │ │ ├── thread_annotations.h │ │ │ ├── unique_fd.h │ │ │ └── utf8.h │ │ ├── logging.cpp │ │ ├── logging_test.cpp │ │ ├── parseint_test.cpp │ │ ├── parsenetaddress.cpp │ │ ├── parsenetaddress_test.cpp │ │ ├── stringprintf.cpp │ │ ├── stringprintf_test.cpp │ │ ├── strings.cpp │ │ ├── strings_test.cpp │ │ ├── test_main.cpp │ │ ├── test_utils.cpp │ │ ├── utf8.cpp │ │ └── utf8_test.cpp │ ├── include/ │ │ ├── android/ │ │ │ └── log.h │ │ ├── backtrace/ │ │ │ ├── Backtrace.h │ │ │ ├── BacktraceMap.h │ │ │ └── backtrace_constants.h │ │ ├── binderwrapper/ │ │ │ ├── binder_test_base.h │ │ │ ├── binder_wrapper.h │ │ │ └── stub_binder_wrapper.h │ │ ├── cutils/ │ │ │ ├── android_reboot.h │ │ │ ├── ashmem.h │ │ │ ├── atomic.h │ │ │ ├── bitops.h │ │ │ ├── compiler.h │ │ │ ├── config_utils.h │ │ │ ├── debugger.h │ │ │ ├── fs.h │ │ │ ├── hashmap.h │ │ │ ├── iosched_policy.h │ │ │ ├── jstring.h │ │ │ ├── klog.h │ │ │ ├── list.h │ │ │ ├── log.h │ │ │ ├── memory.h │ │ │ ├── misc.h │ │ │ ├── multiuser.h │ │ │ ├── native_handle.h │ │ │ ├── open_memstream.h │ │ │ ├── partition_utils.h │ │ │ ├── process_name.h │ │ │ ├── properties.h │ │ │ ├── qtaguid.h │ │ │ ├── record_stream.h │ │ │ ├── sched_policy.h │ │ │ ├── sockets.h │ │ │ ├── str_parms.h │ │ │ ├── threads.h │ │ │ ├── trace.h │ │ │ └── uevent.h │ │ ├── diskconfig/ │ │ │ └── diskconfig.h │ │ ├── log/ │ │ │ ├── event_tag_map.h │ │ │ ├── log.h │ │ │ ├── log_read.h │ │ │ ├── logd.h │ │ │ ├── logger.h │ │ │ ├── logprint.h │ │ │ └── uio.h │ │ ├── memtrack/ │ │ │ └── memtrack.h │ │ ├── mincrypt/ │ │ │ ├── dsa_sig.h │ │ │ ├── hash-internal.h │ │ │ ├── p256.h │ │ │ ├── p256_ecdsa.h │ │ │ ├── rsa.h │ │ │ ├── sha.h │ │ │ └── sha256.h │ │ ├── nativebridge/ │ │ │ └── native_bridge.h │ │ ├── netutils/ │ │ │ └── ifc.h │ │ ├── private/ │ │ │ ├── android_filesystem_capability.h │ │ │ ├── android_filesystem_config.h │ │ │ ├── android_logger.h │ │ │ └── canned_fs_config.h │ │ ├── system/ │ │ │ ├── camera.h │ │ │ ├── graphics.h │ │ │ ├── radio.h │ │ │ ├── thread_defs.h │ │ │ └── window.h │ │ ├── sysutils/ │ │ │ ├── FrameworkClient.h │ │ │ ├── FrameworkCommand.h │ │ │ ├── FrameworkListener.h │ │ │ ├── List.h │ │ │ ├── NetlinkEvent.h │ │ │ ├── NetlinkListener.h │ │ │ ├── ServiceManager.h │ │ │ ├── SocketClient.h │ │ │ ├── SocketClientCommand.h │ │ │ └── SocketListener.h │ │ ├── usbhost/ │ │ │ └── usbhost.h │ │ ├── utils/ │ │ │ ├── AndroidThreads.h │ │ │ ├── Atomic.h │ │ │ ├── BitSet.h │ │ │ ├── BlobCache.h │ │ │ ├── ByteOrder.h │ │ │ ├── CallStack.h │ │ │ ├── Compat.h │ │ │ ├── Condition.h │ │ │ ├── Debug.h │ │ │ ├── Endian.h │ │ │ ├── Errors.h │ │ │ ├── FileMap.h │ │ │ ├── Flattenable.h │ │ │ ├── Functor.h │ │ │ ├── JenkinsHash.h │ │ │ ├── KeyedVector.h │ │ │ ├── LinearTransform.h │ │ │ ├── List.h │ │ │ ├── Log.h │ │ │ ├── Looper.h │ │ │ ├── LruCache.h │ │ │ ├── Mutex.h │ │ │ ├── NativeHandle.h │ │ │ ├── Printer.h │ │ │ ├── ProcessCallStack.h │ │ │ ├── PropertyMap.h │ │ │ ├── RWLock.h │ │ │ ├── RefBase.h │ │ │ ├── Singleton.h │ │ │ ├── SortedVector.h │ │ │ ├── StopWatch.h │ │ │ ├── String16.h │ │ │ ├── String8.h │ │ │ ├── StrongPointer.h │ │ │ ├── SystemClock.h │ │ │ ├── Thread.h │ │ │ ├── ThreadDefs.h │ │ │ ├── Timers.h │ │ │ ├── Tokenizer.h │ │ │ ├── Trace.h │ │ │ ├── TypeHelpers.h │ │ │ ├── Unicode.h │ │ │ ├── Vector.h │ │ │ ├── VectorImpl.h │ │ │ ├── ashmem.h │ │ │ ├── misc.h │ │ │ └── threads.h │ │ └── ziparchive/ │ │ ├── zip_archive.h │ │ ├── zip_archive_stream_entry.h │ │ └── zip_writer.h │ ├── libcutils/ │ │ ├── Android.mk │ │ ├── MODULE_LICENSE_APACHE2 │ │ ├── NOTICE │ │ ├── android_reboot.c │ │ ├── arch-arm/ │ │ │ └── memset32.S │ │ ├── arch-arm64/ │ │ │ └── android_memset.S │ │ ├── arch-mips/ │ │ │ └── android_memset.c │ │ ├── arch-x86/ │ │ │ ├── android_memset16.S │ │ │ ├── android_memset32.S │ │ │ └── cache.h │ │ ├── arch-x86_64/ │ │ │ ├── android_memset16.S │ │ │ ├── android_memset32.S │ │ │ └── cache.h │ │ ├── ashmem-dev.c │ │ ├── ashmem-host.c │ │ ├── atomic.c │ │ ├── canned_fs_config.c │ │ ├── config_utils.c │ │ ├── debugger.c │ │ ├── dlmalloc_stubs.c │ │ ├── fs.c │ │ ├── fs_config.c │ │ ├── hashmap.c │ │ ├── iosched_policy.c │ │ ├── klog.c │ │ ├── load_file.c │ │ ├── multiuser.c │ │ ├── native_handle.c │ │ ├── open_memstream.c │ │ ├── partition_utils.c │ │ ├── process_name.c │ │ ├── properties.c │ │ ├── qtaguid.c │ │ ├── record_stream.c │ │ ├── sched_policy.c │ │ ├── socket_inaddr_any_server_unix.c │ │ ├── socket_inaddr_any_server_windows.c │ │ ├── socket_local_client_unix.c │ │ ├── socket_local_server_unix.c │ │ ├── socket_local_unix.h │ │ ├── socket_loopback_client_unix.c │ │ ├── socket_loopback_server_unix.c │ │ ├── socket_network_client_unix.c │ │ ├── socket_network_client_windows.c │ │ ├── sockets.cpp │ │ ├── sockets_unix.cpp │ │ ├── sockets_windows.cpp │ │ ├── str_parms.c │ │ ├── strdup16to8.c │ │ ├── strdup8to16.c │ │ ├── strlcpy.c │ │ ├── tests/ │ │ │ ├── Android.mk │ │ │ ├── MemsetTest.cpp │ │ │ ├── PropertiesTest.cpp │ │ │ └── test_str_parms.cpp │ │ ├── threads.c │ │ ├── trace-dev.c │ │ ├── trace-host.c │ │ └── uevent.c │ ├── liblog/ │ │ ├── Android.bp │ │ ├── Android.mk │ │ ├── NOTICE │ │ ├── README │ │ ├── config_read.c │ │ ├── config_read.h │ │ ├── config_write.c │ │ ├── config_write.h │ │ ├── event.logtags │ │ ├── event_tag_map.c │ │ ├── fake_log_device.c │ │ ├── fake_log_device.h │ │ ├── fake_writer.c │ │ ├── log_event_list.c │ │ ├── log_event_write.c │ │ ├── log_is_loggable.c │ │ ├── log_portability.h │ │ ├── log_time.cpp │ │ ├── logd_reader.c │ │ ├── logd_writer.c │ │ ├── logger.h │ │ ├── logger_lock.c │ │ ├── logger_name.c │ │ ├── logger_read.c │ │ ├── logger_write.c │ │ ├── logprint.c │ │ ├── pmsg_reader.c │ │ ├── pmsg_writer.c │ │ ├── tests/ │ │ │ ├── Android.mk │ │ │ ├── benchmark.h │ │ │ ├── benchmark_main.cpp │ │ │ ├── libc_test.cpp │ │ │ ├── liblog_benchmark.cpp │ │ │ └── liblog_test.cpp │ │ └── uio.c │ ├── libutils/ │ │ ├── Android.mk │ │ ├── BlobCache.cpp │ │ ├── CallStack.cpp │ │ ├── CleanSpec.mk │ │ ├── FileMap.cpp │ │ ├── JenkinsHash.cpp │ │ ├── LinearTransform.cpp │ │ ├── Log.cpp │ │ ├── Looper.cpp │ │ ├── MODULE_LICENSE_APACHE2 │ │ ├── NOTICE │ │ ├── NativeHandle.cpp │ │ ├── Printer.cpp │ │ ├── ProcessCallStack.cpp │ │ ├── PropertyMap.cpp │ │ ├── README │ │ ├── RefBase.cpp │ │ ├── SharedBuffer.cpp │ │ ├── SharedBuffer.h │ │ ├── SharedBufferTest.cpp │ │ ├── Static.cpp │ │ ├── StopWatch.cpp │ │ ├── String16.cpp │ │ ├── String8.cpp │ │ ├── SystemClock.cpp │ │ ├── Threads.cpp │ │ ├── Timers.cpp │ │ ├── Tokenizer.cpp │ │ ├── Trace.cpp │ │ ├── Unicode.cpp │ │ ├── VectorImpl.cpp │ │ ├── misc.cpp │ │ ├── primes.py │ │ └── tests/ │ │ ├── Android.mk │ │ ├── BitSet_test.cpp │ │ ├── BlobCache_test.cpp │ │ ├── Looper_test.cpp │ │ ├── LruCache_test.cpp │ │ ├── String8_test.cpp │ │ ├── StrongPointer_test.cpp │ │ ├── TestHelpers.h │ │ ├── Unicode_test.cpp │ │ └── Vector_test.cpp │ └── libziparchive/ │ ├── Android.mk │ ├── entry_name_utils-inl.h │ ├── entry_name_utils_test.cc │ ├── zip_archive.cc │ ├── zip_archive_common.h │ ├── zip_archive_private.h │ ├── zip_archive_stream_entry.cc │ ├── zip_archive_test.cc │ ├── zip_writer.cc │ └── zip_writer_test.cc ├── atlas-aapt-old/ │ └── frameworks/ │ └── base/ │ ├── include/ │ │ └── androidfw/ │ │ ├── Asset.h │ │ ├── AssetDir.h │ │ ├── AssetManager.h │ │ ├── BackupHelpers.h │ │ ├── ByteBucketArray.h │ │ ├── CursorWindow.h │ │ ├── ObbFile.h │ │ ├── ResourcePackageId.h │ │ ├── ResourceTypes.h │ │ ├── StreamingZipInflater.h │ │ ├── TypeWrappers.h │ │ ├── ZipFileRO.h │ │ ├── ZipUtils.h │ │ └── misc.h │ ├── libs/ │ │ └── androidfw/ │ │ ├── Android.mk │ │ ├── Asset.cpp │ │ ├── AssetDir.cpp │ │ ├── AssetManager.cpp │ │ ├── BackupData.cpp │ │ ├── BackupHelpers.cpp │ │ ├── CursorWindow.cpp │ │ ├── MODULE_LICENSE_APACHE2 │ │ ├── NOTICE │ │ ├── ObbFile.cpp │ │ ├── ResourceTypes.cpp │ │ ├── StreamingZipInflater.cpp │ │ ├── TypeWrappers.cpp │ │ ├── ZipFileRO.cpp │ │ ├── ZipUtils.cpp │ │ ├── misc.cpp │ │ └── tests/ │ │ ├── Android.mk │ │ ├── BackupData_test.cpp │ │ ├── ByteBucketArray_test.cpp │ │ ├── ConfigLocale_test.cpp │ │ ├── Config_test.cpp │ │ ├── Idmap_test.cpp │ │ ├── ObbFile_test.cpp │ │ ├── ResTable_test.cpp │ │ ├── Split_test.cpp │ │ ├── TestHelpers.h │ │ ├── Theme_test.cpp │ │ ├── TypeWrappers_test.cpp │ │ ├── ZipUtils_test.cpp │ │ └── data/ │ │ ├── .gitignore │ │ ├── app/ │ │ │ ├── AndroidManifest.xml │ │ │ ├── R.h │ │ │ ├── app_arsc.h │ │ │ └── res/ │ │ │ └── values/ │ │ │ └── values.xml │ │ ├── basic/ │ │ │ ├── AndroidManifest.xml │ │ │ ├── R.h │ │ │ ├── basic_arsc.h │ │ │ ├── res/ │ │ │ │ ├── layout/ │ │ │ │ │ └── main.xml │ │ │ │ ├── layout-fr-sw600dp/ │ │ │ │ │ └── main.xml │ │ │ │ ├── values/ │ │ │ │ │ └── values.xml │ │ │ │ ├── values-de/ │ │ │ │ │ └── values.xml │ │ │ │ ├── values-fr/ │ │ │ │ │ └── values.xml │ │ │ │ └── values-sv/ │ │ │ │ └── values.xml │ │ │ └── split_de_fr_arsc.h │ │ ├── feature/ │ │ │ ├── AndroidManifest.xml │ │ │ ├── feature_arsc.h │ │ │ └── res/ │ │ │ └── values/ │ │ │ └── values.xml │ │ ├── lib/ │ │ │ ├── AndroidManifest.xml │ │ │ ├── R.h │ │ │ ├── lib_arsc.h │ │ │ └── res/ │ │ │ └── values/ │ │ │ └── values.xml │ │ ├── overlay/ │ │ │ ├── AndroidManifest.xml │ │ │ ├── overlay_arsc.h │ │ │ └── res/ │ │ │ └── values/ │ │ │ └── values.xml │ │ └── system/ │ │ ├── AndroidManifest.xml │ │ ├── R.h │ │ ├── res/ │ │ │ └── values/ │ │ │ └── themes.xml │ │ └── system_arsc.h │ └── tools/ │ └── aapt/ │ ├── AaptAssets.cpp │ ├── AaptAssets.h │ ├── AaptConfig.cpp │ ├── AaptConfig.h │ ├── AaptUtil.cpp │ ├── AaptUtil.h │ ├── AaptXml.cpp │ ├── AaptXml.h │ ├── Android.mk │ ├── ApkBuilder.cpp │ ├── ApkBuilder.h │ ├── Bundle.h │ ├── CacheUpdater.h │ ├── Command.cpp │ ├── ConfigDescription.h │ ├── CrunchCache.cpp │ ├── CrunchCache.h │ ├── DirectoryWalker.h │ ├── FileFinder.cpp │ ├── FileFinder.h │ ├── Images.cpp │ ├── Images.h │ ├── IndentPrinter.h │ ├── Main.cpp │ ├── Main.h │ ├── NOTICE │ ├── OutputSet.h │ ├── Package.cpp │ ├── Resource.cpp │ ├── ResourceFilter.cpp │ ├── ResourceFilter.h │ ├── ResourceIdCache.cpp │ ├── ResourceIdCache.h │ ├── ResourceTable.cpp │ ├── ResourceTable.h │ ├── SourcePos.cpp │ ├── SourcePos.h │ ├── StringPool.cpp │ ├── StringPool.h │ ├── WorkQueue.cpp │ ├── WorkQueue.h │ ├── XMLNode.cpp │ ├── XMLNode.h │ ├── ZipEntry.cpp │ ├── ZipEntry.h │ ├── ZipFile.cpp │ ├── ZipFile.h │ ├── printapk.cpp │ ├── pseudolocalize.cpp │ ├── pseudolocalize.h │ ├── qsort_r_compat.c │ ├── qsort_r_compat.h │ └── tests/ │ ├── AaptConfig_test.cpp │ ├── AaptGroupEntry_test.cpp │ ├── CrunchCache_test.cpp │ ├── FileFinder_test.cpp │ ├── MockCacheUpdater.h │ ├── MockDirectoryWalker.h │ ├── MockFileFinder.h │ ├── ResourceFilter_test.cpp │ ├── TestHelper.h │ └── plurals/ │ ├── AndroidManifest.xml │ ├── res/ │ │ └── values/ │ │ └── strings.xml │ └── run.sh ├── atlas-core/ │ ├── .gitignore │ ├── README.md │ ├── README.zh_cn.md │ ├── build.gradle │ ├── gradle/ │ │ └── wrapper/ │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ ├── lint.xml │ ├── proguard.cfg │ ├── project.properties │ ├── publish.sh │ ├── settings.gradle │ └── src/ │ └── main/ │ ├── AndroidManifest.xml │ ├── aidl/ │ │ └── android/ │ │ ├── app/ │ │ │ ├── IActivityManager/ │ │ │ │ └── ContentProviderHolder.aidl │ │ │ └── IServiceConnection.aidl │ │ └── taobao/ │ │ └── atlas/ │ │ └── runtime/ │ │ ├── ApplicationInitException.java │ │ └── newcomponent/ │ │ └── service/ │ │ └── IDelegateBinder.aidl │ ├── java/ │ │ ├── android/ │ │ │ ├── support/ │ │ │ │ └── multidex/ │ │ │ │ ├── DexElementsMaker.java │ │ │ │ ├── DexElementsMethodInvokerV14.java │ │ │ │ ├── DexElementsMethodInvokerV19.java │ │ │ │ ├── IDexElementsMaker.java │ │ │ │ ├── IDexElementsMethodInvoker.java │ │ │ │ ├── MultiDex.java │ │ │ │ ├── MultiDexExtractor.java │ │ │ │ └── ZipUtil.java │ │ │ └── taobao/ │ │ │ └── atlas/ │ │ │ ├── bridge/ │ │ │ │ └── BridgeApplicationDelegate.java │ │ │ ├── bundleInfo/ │ │ │ │ ├── AtlasBundleInfoGenerator.java │ │ │ │ ├── AtlasBundleInfoManager.java │ │ │ │ ├── BundleListing.java │ │ │ │ └── BundleListingUtil.java │ │ │ ├── framework/ │ │ │ │ ├── Atlas.java │ │ │ │ ├── Framework.java │ │ │ │ └── FrameworkProperties.java │ │ │ ├── hack/ │ │ │ │ ├── AndroidHack.java │ │ │ │ ├── AssertionArrayException.java │ │ │ │ ├── AtlasHacks.java │ │ │ │ ├── Hack.java │ │ │ │ └── Interception.java │ │ │ ├── profile/ │ │ │ │ └── AtlasProfile.java │ │ │ ├── runtime/ │ │ │ │ ├── ActivityLifeCycleObserver.java │ │ │ │ ├── ActivityTaskMgr.java │ │ │ │ ├── ApplicationInvoker.java │ │ │ │ ├── AtlasPreLauncher.java │ │ │ │ ├── BundleIniter.java │ │ │ │ ├── FrameworkLifecycleHandler.java │ │ │ │ ├── LowDiskException.java │ │ │ │ └── RuntimeVariables.java │ │ │ ├── startup/ │ │ │ │ ├── AtlasBridgeApplication.java │ │ │ │ ├── DexFileCompat.java │ │ │ │ ├── KernalVersionManager.java │ │ │ │ ├── NClassLoader.java │ │ │ │ └── patch/ │ │ │ │ ├── CombineDexMerger.java │ │ │ │ ├── CombineDexVerifier.java │ │ │ │ ├── KernalBundle.java │ │ │ │ ├── KernalBundleArchive.java │ │ │ │ ├── KernalConstants.java │ │ │ │ ├── KernalFileLock.java │ │ │ │ ├── PatchMerger.java │ │ │ │ ├── PatchVerifier.java │ │ │ │ └── releaser/ │ │ │ │ ├── BundleReleaser.java │ │ │ │ ├── DexReleaser.java │ │ │ │ ├── PatchDexProfile.java │ │ │ │ └── ReleaseType.java │ │ │ ├── util/ │ │ │ │ ├── ApkUtils.java │ │ │ │ ├── AtlasFileLock.java │ │ │ │ ├── BundleLock.java │ │ │ │ ├── FileUtils.java │ │ │ │ ├── IOUtil.java │ │ │ │ ├── RefectUtils.java │ │ │ │ ├── SoLoader.java │ │ │ │ ├── StringUtils.java │ │ │ │ ├── WrapperUtil.java │ │ │ │ └── log/ │ │ │ │ ├── IAlarmer.java │ │ │ │ ├── ILog.java │ │ │ │ ├── IMonitor.java │ │ │ │ └── impl/ │ │ │ │ ├── AtlasAlarmer.java │ │ │ │ ├── AtlasLog.java │ │ │ │ └── AtlasMonitor.java │ │ │ └── versionInfo/ │ │ │ └── BaselineInfoManager.java │ │ └── org/ │ │ └── osgi/ │ │ └── framework/ │ │ ├── Bundle.java │ │ ├── BundleEvent.java │ │ ├── BundleException.java │ │ ├── BundleListener.java │ │ ├── Constants.java │ │ ├── FrameworkEvent.java │ │ ├── FrameworkListener.java │ │ └── SynchronousBundleListener.java │ └── res/ │ ├── drawable/ │ │ └── atlas_waitview.xml │ ├── layout/ │ │ └── atlas_progress.xml │ └── values/ │ └── style_atlas.xml ├── atlas-demo/ │ ├── .gitignore │ ├── AtlasDemo/ │ │ ├── .gitignore │ │ ├── AwoForBundle.txt │ │ ├── AwoForHost.txt │ │ ├── README.md │ │ ├── Tpatch.txt │ │ ├── activitygroupcompat/ │ │ │ ├── .gitignore │ │ │ ├── build.gradle │ │ │ ├── proguard-rules.pro │ │ │ └── src/ │ │ │ └── main/ │ │ │ ├── AndroidManifest.xml │ │ │ ├── java/ │ │ │ │ └── com/ │ │ │ │ └── taobao/ │ │ │ │ └── android/ │ │ │ │ ├── ActivityGroupDelegate.java │ │ │ │ └── LocalActivityManager.java │ │ │ └── res/ │ │ │ └── values/ │ │ │ └── strings.xml │ │ ├── app/ │ │ │ ├── .gitignore │ │ │ ├── .gradletasknamecache │ │ │ ├── build.gradle │ │ │ ├── dexPatchWraper.gradle │ │ │ ├── jd-gui.cfg │ │ │ ├── proguard-rules.pro │ │ │ ├── push_dexpatch_out.sh │ │ │ └── src/ │ │ │ ├── androidTest/ │ │ │ │ └── java/ │ │ │ │ └── com/ │ │ │ │ └── taobao/ │ │ │ │ └── demo/ │ │ │ │ └── ExampleInstrumentedTest.java │ │ │ └── main/ │ │ │ ├── AndroidManifest.xml │ │ │ ├── java/ │ │ │ │ └── com/ │ │ │ │ └── taobao/ │ │ │ │ ├── demo/ │ │ │ │ │ ├── DemoApplication.java │ │ │ │ │ ├── DemoPreLaunch.java │ │ │ │ │ ├── MainActivity.java │ │ │ │ │ ├── MyContentProvider.java │ │ │ │ │ ├── RemoteDemoActivity.java │ │ │ │ │ ├── UpdateDemoActivity.java │ │ │ │ │ └── databind/ │ │ │ │ │ ├── DataBundleAarActivity.java │ │ │ │ │ └── User.java │ │ │ │ └── update/ │ │ │ │ └── Updater.java │ │ │ └── res/ │ │ │ ├── drawable/ │ │ │ │ ├── ic_dashboard_black_24dp.xml │ │ │ │ ├── ic_home_black_24dp.xml │ │ │ │ ├── ic_notifications_black_24dp.xml │ │ │ │ └── side_nav_bar.xml │ │ │ ├── layout/ │ │ │ │ ├── aar_databind_main.xml │ │ │ │ ├── activity_main.xml │ │ │ │ ├── activity_navigation.xml │ │ │ │ ├── activity_scrolling.xml │ │ │ │ ├── activity_update.xml │ │ │ │ ├── app_bar_main.xml │ │ │ │ ├── content_main.xml │ │ │ │ ├── content_navigation_main.xml │ │ │ │ ├── content_scrolling.xml │ │ │ │ ├── guild_remote_bundle.xml │ │ │ │ └── nav_header_main.xml │ │ │ ├── menu/ │ │ │ │ ├── activity_main_drawer.xml │ │ │ │ ├── main.xml │ │ │ │ └── navigation.xml │ │ │ └── values/ │ │ │ ├── colors.xml │ │ │ ├── dimens.xml │ │ │ ├── main_style.xml │ │ │ └── strings.xml │ │ ├── build.gradle │ │ ├── databindbundle/ │ │ │ ├── .gitignore │ │ │ ├── build.gradle │ │ │ ├── proguard-rules.pro │ │ │ └── src/ │ │ │ └── main/ │ │ │ ├── AndroidManifest.xml │ │ │ ├── java/ │ │ │ │ └── com/ │ │ │ │ └── taobao/ │ │ │ │ └── databindbundle/ │ │ │ │ └── databind/ │ │ │ │ ├── DataBundleSampleActivity.java │ │ │ │ └── User.java │ │ │ └── res/ │ │ │ ├── layout/ │ │ │ │ └── bundle_databind_main.xml │ │ │ └── values/ │ │ │ └── strings.xml │ │ ├── databindinglibrary/ │ │ │ ├── .gitignore │ │ │ ├── build.gradle │ │ │ ├── proguard-rules.pro │ │ │ └── src/ │ │ │ └── main/ │ │ │ ├── AndroidManifest.xml │ │ │ ├── java/ │ │ │ │ └── com/ │ │ │ │ └── taobao/ │ │ │ │ └── databinding/ │ │ │ │ └── library/ │ │ │ │ ├── DataBingAarActivity.java │ │ │ │ └── User.java │ │ │ └── res/ │ │ │ └── layout/ │ │ │ └── aar_databind.xml │ │ ├── firstbundle/ │ │ │ ├── .gitignore │ │ │ ├── build.gradle │ │ │ ├── proguard-rules.pro │ │ │ └── src/ │ │ │ └── main/ │ │ │ ├── AndroidManifest.xml │ │ │ ├── java/ │ │ │ │ └── com/ │ │ │ │ └── taobao/ │ │ │ │ └── firstbundle/ │ │ │ │ ├── FirstBundleActivity.java │ │ │ │ ├── FirstBundleService.java │ │ │ │ ├── UseremoteActivity.java │ │ │ │ └── fragment/ │ │ │ │ ├── BlankFragment.java │ │ │ │ ├── DummyContent.java │ │ │ │ ├── ItemFragment.java │ │ │ │ └── MyItemRecyclerViewAdapter.java │ │ │ └── res/ │ │ │ ├── layout/ │ │ │ │ ├── activity_firstbundle.xml │ │ │ │ ├── activity_useremote.xml │ │ │ │ ├── activity_web_view.xml │ │ │ │ ├── fragment_blank.xml │ │ │ │ ├── fragment_item.xml │ │ │ │ └── fragment_item_list.xml │ │ │ └── values/ │ │ │ └── strings.xml │ │ ├── gradle/ │ │ │ └── wrapper/ │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ │ ├── gradle.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ ├── lottie/ │ │ │ ├── .gitignore │ │ │ ├── build.gradle │ │ │ ├── gradle.properties │ │ │ └── src/ │ │ │ └── main/ │ │ │ ├── AndroidManifest.xml │ │ │ ├── java/ │ │ │ │ └── com/ │ │ │ │ └── airbnb/ │ │ │ │ └── lottie/ │ │ │ │ ├── AnimatableColorValue.java │ │ │ │ ├── AnimatableFloatValue.java │ │ │ │ ├── AnimatableIntegerValue.java │ │ │ │ ├── AnimatablePathValue.java │ │ │ │ ├── AnimatablePointValue.java │ │ │ │ ├── AnimatableScaleValue.java │ │ │ │ ├── AnimatableShapeValue.java │ │ │ │ ├── AnimatableSplitDimensionPathValue.java │ │ │ │ ├── AnimatableTransform.java │ │ │ │ ├── AnimatableValue.java │ │ │ │ ├── AnimatableValueParser.java │ │ │ │ ├── BaseAnimatableValue.java │ │ │ │ ├── BaseKeyframeAnimation.java │ │ │ │ ├── BaseLayer.java │ │ │ │ ├── BitmapCanvas.java │ │ │ │ ├── Cancellable.java │ │ │ │ ├── CanvasPool.java │ │ │ │ ├── CircleShape.java │ │ │ │ ├── ColorFactory.java │ │ │ │ ├── ColorKeyframeAnimation.java │ │ │ │ ├── CompositionLayer.java │ │ │ │ ├── CompositionLoader.java │ │ │ │ ├── Content.java │ │ │ │ ├── ContentGroup.java │ │ │ │ ├── CubicCurveData.java │ │ │ │ ├── DrawingContent.java │ │ │ │ ├── EllipseContent.java │ │ │ │ ├── FileCompositionLoader.java │ │ │ │ ├── FillContent.java │ │ │ │ ├── FloatKeyframeAnimation.java │ │ │ │ ├── GammaEvaluator.java │ │ │ │ ├── ImageAssetBitmapManager.java │ │ │ │ ├── ImageAssetDelegate.java │ │ │ │ ├── ImageLayer.java │ │ │ │ ├── IntegerKeyframeAnimation.java │ │ │ │ ├── JsonCompositionLoader.java │ │ │ │ ├── JsonUtils.java │ │ │ │ ├── Keyframe.java │ │ │ │ ├── KeyframeAnimation.java │ │ │ │ ├── L.java │ │ │ │ ├── Layer.java │ │ │ │ ├── LottieAnimationView.java │ │ │ │ ├── LottieComposition.java │ │ │ │ ├── LottieDrawable.java │ │ │ │ ├── LottieImageAsset.java │ │ │ │ ├── Mask.java │ │ │ │ ├── MaskKeyframeAnimation.java │ │ │ │ ├── MergePaths.java │ │ │ │ ├── MergePathsContent.java │ │ │ │ ├── MiscUtils.java │ │ │ │ ├── ModifierContent.java │ │ │ │ ├── NullLayer.java │ │ │ │ ├── OnCompositionLoadedListener.java │ │ │ │ ├── PathContent.java │ │ │ │ ├── PathKeyframe.java │ │ │ │ ├── PathKeyframeAnimation.java │ │ │ │ ├── PointFFactory.java │ │ │ │ ├── PointKeyframeAnimation.java │ │ │ │ ├── PolystarContent.java │ │ │ │ ├── PolystarShape.java │ │ │ │ ├── RectangleContent.java │ │ │ │ ├── RectangleShape.java │ │ │ │ ├── ScaleKeyframeAnimation.java │ │ │ │ ├── ScaleXY.java │ │ │ │ ├── ShapeContent.java │ │ │ │ ├── ShapeData.java │ │ │ │ ├── ShapeFill.java │ │ │ │ ├── ShapeGroup.java │ │ │ │ ├── ShapeKeyframeAnimation.java │ │ │ │ ├── ShapeLayer.java │ │ │ │ ├── ShapePath.java │ │ │ │ ├── ShapeStroke.java │ │ │ │ ├── ShapeTrimPath.java │ │ │ │ ├── SolidLayer.java │ │ │ │ ├── SplitDimensionPathKeyframeAnimation.java │ │ │ │ ├── StaticKeyframeAnimation.java │ │ │ │ ├── StrokeContent.java │ │ │ │ ├── TransformKeyframeAnimation.java │ │ │ │ ├── TrimPathContent.java │ │ │ │ └── Utils.java │ │ │ └── res/ │ │ │ └── values/ │ │ │ ├── attrs.xml │ │ │ └── ids.xml │ │ ├── middlewarelibrary/ │ │ │ ├── .gitignore │ │ │ ├── build.gradle │ │ │ ├── proguard-rules.pro │ │ │ └── src/ │ │ │ ├── androidTest/ │ │ │ │ └── java/ │ │ │ │ └── com/ │ │ │ │ └── taobao/ │ │ │ │ └── middleware/ │ │ │ │ └── ExampleInstrumentedTest.java │ │ │ ├── main/ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ ├── java/ │ │ │ │ │ └── com/ │ │ │ │ │ ├── middleware/ │ │ │ │ │ │ └── dialog/ │ │ │ │ │ │ ├── Button.java │ │ │ │ │ │ ├── ButtonFlat.java │ │ │ │ │ │ ├── CustomView.java │ │ │ │ │ │ ├── Dialog.java │ │ │ │ │ │ └── Utils.java │ │ │ │ │ └── taobao/ │ │ │ │ │ └── middleware/ │ │ │ │ │ ├── ICaculator.java │ │ │ │ │ ├── ItemDetailActivity.java │ │ │ │ │ ├── ItemDetailFragment.java │ │ │ │ │ ├── ItemListActivity.java │ │ │ │ │ ├── StringUtil.java │ │ │ │ │ └── dummy/ │ │ │ │ │ └── DummyContent.java │ │ │ │ └── res/ │ │ │ │ ├── anim/ │ │ │ │ │ ├── dialog_main_hide_amination.xml │ │ │ │ │ ├── dialog_main_show_amination.xml │ │ │ │ │ ├── dialog_root_hide_amin.xml │ │ │ │ │ └── dialog_root_show_amin.xml │ │ │ │ ├── drawable/ │ │ │ │ │ └── background_transparent.xml │ │ │ │ ├── layout/ │ │ │ │ │ ├── activity_item_detail.xml │ │ │ │ │ ├── activity_item_list.xml │ │ │ │ │ ├── item_detail.xml │ │ │ │ │ ├── item_list.xml │ │ │ │ │ ├── item_list_content.xml │ │ │ │ │ └── update_dialog.xml │ │ │ │ ├── layout-w900dp/ │ │ │ │ │ └── item_list.xml │ │ │ │ └── values/ │ │ │ │ ├── colors.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ │ └── test/ │ │ │ └── java/ │ │ │ └── com/ │ │ │ └── taobao/ │ │ │ └── middleware/ │ │ │ └── ExampleUnitTest.java │ │ ├── publicbundle/ │ │ │ ├── .gitignore │ │ │ ├── build.gradle │ │ │ ├── proguard-rules.pro │ │ │ └── src/ │ │ │ ├── androidTest/ │ │ │ │ └── java/ │ │ │ │ └── com/ │ │ │ │ └── taobao/ │ │ │ │ └── publicBundle/ │ │ │ │ └── ExampleInstrumentedTest.java │ │ │ ├── main/ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ ├── java/ │ │ │ │ │ └── com/ │ │ │ │ │ └── taobao/ │ │ │ │ │ └── publicBundle/ │ │ │ │ │ └── Tools.java │ │ │ │ └── res/ │ │ │ │ └── values/ │ │ │ │ └── strings.xml │ │ │ └── test/ │ │ │ └── java/ │ │ │ └── com/ │ │ │ └── taobao/ │ │ │ └── publicBundle/ │ │ │ └── ExampleUnitTest.java │ │ ├── remotebundle/ │ │ │ ├── .gitignore │ │ │ ├── build.gradle │ │ │ ├── proguard-rules.pro │ │ │ └── src/ │ │ │ ├── androidTest/ │ │ │ │ └── java/ │ │ │ │ └── com/ │ │ │ │ └── taobao/ │ │ │ │ └── remotebunle/ │ │ │ │ └── ExampleInstrumentedTest.java │ │ │ ├── main/ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ ├── java/ │ │ │ │ │ └── com/ │ │ │ │ │ └── taobao/ │ │ │ │ │ └── remotebunle/ │ │ │ │ │ └── RemoteBundleActivity.java │ │ │ │ └── res/ │ │ │ │ ├── layout/ │ │ │ │ │ └── activity_remote_bundle.xml │ │ │ │ └── values/ │ │ │ │ └── strings.xml │ │ │ └── test/ │ │ │ └── java/ │ │ │ └── com/ │ │ │ └── taobao/ │ │ │ └── remotebunle/ │ │ │ └── ExampleUnitTest.java │ │ ├── secondbundle/ │ │ │ ├── .gitignore │ │ │ ├── build.gradle │ │ │ ├── proguard-rules.pro │ │ │ └── src/ │ │ │ ├── main/ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ ├── java/ │ │ │ │ │ └── com/ │ │ │ │ │ └── taobao/ │ │ │ │ │ └── secondbundle/ │ │ │ │ │ ├── MyRichView.java │ │ │ │ │ ├── PlusOneFragment.java │ │ │ │ │ ├── SecondBundleActivity.java │ │ │ │ │ ├── SecondBundleApplication.java │ │ │ │ │ ├── SecondBundleFragment.java │ │ │ │ │ └── SecondBundleIniter.java │ │ │ │ └── res/ │ │ │ │ ├── layout/ │ │ │ │ │ ├── activity_secondbundle.xml │ │ │ │ │ ├── fragment_plus_one.xml │ │ │ │ │ └── test_layout.xml │ │ │ │ └── values/ │ │ │ │ └── strings.xml │ │ │ └── test/ │ │ │ └── java/ │ │ │ └── com/ │ │ │ └── taobao/ │ │ │ └── secondbundle/ │ │ │ └── ExampleUnitTest.java │ │ ├── secondbundlelibrary/ │ │ │ ├── .gitignore │ │ │ ├── build.gradle │ │ │ ├── proguard-rules.pro │ │ │ └── src/ │ │ │ ├── androidTest/ │ │ │ │ └── java/ │ │ │ │ └── com/ │ │ │ │ └── taobao/ │ │ │ │ └── secondbundlelibrary/ │ │ │ │ └── ExampleInstrumentedTest.java │ │ │ ├── main/ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ ├── java/ │ │ │ │ │ └── com/ │ │ │ │ │ └── taobao/ │ │ │ │ │ └── secondbundlelibrary/ │ │ │ │ │ └── SecondbundleShareActivity.java │ │ │ │ └── res/ │ │ │ │ ├── layout/ │ │ │ │ │ └── activity_secondbundle_share.xml │ │ │ │ └── values/ │ │ │ │ └── strings.xml │ │ │ └── test/ │ │ │ └── java/ │ │ │ └── com/ │ │ │ └── taobao/ │ │ │ └── secondbundlelibrary/ │ │ │ └── ExampleUnitTest.java │ │ ├── settings.gradle │ │ ├── splashscreen/ │ │ │ ├── .gitignore │ │ │ ├── build.gradle │ │ │ ├── proguard-rules.pro │ │ │ └── src/ │ │ │ ├── androidTest/ │ │ │ │ └── java/ │ │ │ │ └── com/ │ │ │ │ └── taobao/ │ │ │ │ └── splashscreen/ │ │ │ │ └── ExampleInstrumentedTest.java │ │ │ ├── main/ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ ├── assets/ │ │ │ │ │ ├── A.json │ │ │ │ │ ├── L.json │ │ │ │ │ ├── S.json │ │ │ │ │ └── T.json │ │ │ │ ├── java/ │ │ │ │ │ └── com/ │ │ │ │ │ ├── airbnb/ │ │ │ │ │ │ └── lottiesplash/ │ │ │ │ │ │ └── LottieFontViewGroup.java │ │ │ │ │ └── taobao/ │ │ │ │ │ └── splashscreen/ │ │ │ │ │ └── WelcomeActivity.java │ │ │ │ └── res/ │ │ │ │ ├── layout/ │ │ │ │ │ └── activity_welcome.xml │ │ │ │ └── values/ │ │ │ │ ├── attrs.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ │ └── test/ │ │ │ └── java/ │ │ │ └── com/ │ │ │ └── taobao/ │ │ │ └── splashscreen/ │ │ │ └── ExampleUnitTest.java │ │ └── structor.md │ ├── IncrementAtlasDemo/ │ │ ├── .gitignore │ │ ├── build.gradle │ │ ├── gradle/ │ │ │ └── wrapper/ │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ │ ├── gradle.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ ├── increment_app/ │ │ │ ├── build.gradle │ │ │ └── src/ │ │ │ └── main/ │ │ │ └── AndroidManifest.xml │ │ └── settings.gradle │ ├── MyApplication/ │ │ ├── gradle/ │ │ │ └── wrapper/ │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ │ └── gradlew │ ├── README.md │ ├── multi-feature-module/ │ │ ├── .google/ │ │ │ └── packaging.yaml │ │ ├── LICENSE │ │ ├── NOTICE │ │ ├── README.md │ │ ├── base/ │ │ │ ├── build.gradle │ │ │ └── src/ │ │ │ └── main/ │ │ │ ├── AndroidManifest.xml │ │ │ ├── java/ │ │ │ │ └── com/ │ │ │ │ └── example/ │ │ │ │ └── android/ │ │ │ │ └── unsplash/ │ │ │ │ ├── IntentUtil.kt │ │ │ │ ├── data/ │ │ │ │ │ ├── PhotoService.java │ │ │ │ │ ├── UnsplashService.java │ │ │ │ │ └── model/ │ │ │ │ │ └── Photo.java │ │ │ │ ├── test.kt │ │ │ │ ├── transition/ │ │ │ │ │ └── TextResize.java │ │ │ │ └── ui/ │ │ │ │ ├── DetailSharedElementEnterCallback.java │ │ │ │ ├── ForegroundImageView.java │ │ │ │ ├── ImageSize.java │ │ │ │ ├── ThreeTwoImageView.java │ │ │ │ ├── TransitionCallback.java │ │ │ │ ├── grid/ │ │ │ │ │ ├── GridMarginDecoration.java │ │ │ │ │ ├── OnItemSelectedListener.java │ │ │ │ │ ├── PhotoAdapter.java │ │ │ │ │ └── PhotoViewHolder.java │ │ │ │ └── pager/ │ │ │ │ └── DetailViewPagerAdapter.java │ │ │ └── res/ │ │ │ ├── animator/ │ │ │ │ └── raise.xml │ │ │ ├── drawable/ │ │ │ │ ├── grey_ripple.xml │ │ │ │ └── ic_arrow_back.xml │ │ │ ├── layout/ │ │ │ │ ├── detail_view.xml │ │ │ │ └── photo_item.xml │ │ │ ├── transition/ │ │ │ │ ├── grid_exit.xml │ │ │ │ ├── grid_reenter.xml │ │ │ │ └── shared_main_detail.xml │ │ │ └── values/ │ │ │ ├── attrs_foreground_view.xml │ │ │ ├── colors.xml │ │ │ ├── dimens.xml │ │ │ ├── ids.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ │ ├── build.gradle │ │ ├── detail/ │ │ │ ├── build.gradle │ │ │ └── src/ │ │ │ ├── androidTest/ │ │ │ │ └── java/ │ │ │ │ └── com/ │ │ │ │ └── example/ │ │ │ │ └── android/ │ │ │ │ └── unsplash/ │ │ │ │ └── DetailActivityTest.java │ │ │ └── main/ │ │ │ ├── AndroidManifest.xml │ │ │ ├── java/ │ │ │ │ └── com/ │ │ │ │ └── example/ │ │ │ │ └── android/ │ │ │ │ └── unsplash/ │ │ │ │ └── DetailActivity.java │ │ │ └── res/ │ │ │ ├── drawable/ │ │ │ │ └── page_margin.xml │ │ │ └── layout/ │ │ │ └── activity_detail.xml │ │ ├── gradle/ │ │ │ └── wrapper/ │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ │ ├── gradle.properties │ │ ├── gradlew │ │ ├── installed/ │ │ │ ├── .gitignore │ │ │ ├── build.gradle │ │ │ └── src/ │ │ │ └── main/ │ │ │ └── AndroidManifest.xml │ │ ├── instant/ │ │ │ └── build.gradle │ │ ├── main/ │ │ │ ├── build.gradle │ │ │ └── src/ │ │ │ ├── androidTest/ │ │ │ │ └── java/ │ │ │ │ └── com/ │ │ │ │ └── example/ │ │ │ │ └── android/ │ │ │ │ └── unsplash/ │ │ │ │ └── MainActivityTest.java │ │ │ └── main/ │ │ │ ├── AndroidManifest.xml │ │ │ ├── java/ │ │ │ │ └── com/ │ │ │ │ └── example/ │ │ │ │ └── android/ │ │ │ │ └── unsplash/ │ │ │ │ └── MainActivity.java │ │ │ └── res/ │ │ │ └── layout/ │ │ │ └── activity_main.xml │ │ ├── proguard.pro │ │ └── settings.gradle │ └── 基于版本打包的demo/ │ ├── FirstBundle/ │ │ ├── build.gradle │ │ ├── gradle/ │ │ │ └── wrapper/ │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ └── src/ │ │ └── main/ │ │ ├── AndroidManifest.xml │ │ ├── java/ │ │ │ └── com/ │ │ │ └── taobao/ │ │ │ └── firstbundle/ │ │ │ ├── FirstBundleActivity.java │ │ │ └── FirstBundleApplication.java │ │ └── res/ │ │ ├── layout/ │ │ │ └── first_main.xml │ │ └── values/ │ │ └── strings.xml │ ├── README.md │ ├── README.zh_cn.md │ ├── app/ │ │ ├── activitygroupdelegate/ │ │ │ ├── .gitignore │ │ │ ├── build.gradle │ │ │ ├── proguard-rules.pro │ │ │ └── src/ │ │ │ ├── androidTest/ │ │ │ │ └── java/ │ │ │ │ └── com/ │ │ │ │ └── taoboa/ │ │ │ │ └── activitygroupdelegate/ │ │ │ │ └── ExampleInstrumentedTest.java │ │ │ ├── main/ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ └── res/ │ │ │ │ └── values/ │ │ │ │ └── strings.xml │ │ │ └── test/ │ │ │ └── java/ │ │ │ └── com/ │ │ │ └── taoboa/ │ │ │ └── activitygroupdelegate/ │ │ │ └── ExampleUnitTest.java │ │ ├── build.gradle │ │ ├── buildApk.sh │ │ ├── buildTpatch.sh │ │ ├── firstbundle/ │ │ │ ├── .gitignore │ │ │ ├── build.gradle │ │ │ ├── proguard-rules.pro │ │ │ └── src/ │ │ │ ├── androidTest/ │ │ │ │ └── java/ │ │ │ │ └── com/ │ │ │ │ └── taobao/ │ │ │ │ └── firstbundle/ │ │ │ │ └── ExampleInstrumentedTest.java │ │ │ ├── main/ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ ├── java/ │ │ │ │ │ └── com/ │ │ │ │ │ └── taobao/ │ │ │ │ │ └── firstbundle/ │ │ │ │ │ └── MainActivity.java │ │ │ │ └── res/ │ │ │ │ ├── drawable/ │ │ │ │ │ ├── ic_dashboard_black_24dp.xml │ │ │ │ │ ├── ic_home_black_24dp.xml │ │ │ │ │ └── ic_notifications_black_24dp.xml │ │ │ │ ├── layout/ │ │ │ │ │ └── activity_main.xml │ │ │ │ ├── menu/ │ │ │ │ │ └── navigation.xml │ │ │ │ └── values/ │ │ │ │ ├── colors.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ │ └── test/ │ │ │ └── java/ │ │ │ └── com/ │ │ │ └── taobao/ │ │ │ └── firstbundle/ │ │ │ └── ExampleUnitTest.java │ │ ├── gradle/ │ │ │ └── wrapper/ │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ │ ├── gradle.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ ├── proguard.cfg │ │ ├── secondbundle/ │ │ │ ├── .gitignore │ │ │ ├── build.gradle │ │ │ ├── proguard-rules.pro │ │ │ └── src/ │ │ │ ├── androidTest/ │ │ │ │ └── java/ │ │ │ │ └── com/ │ │ │ │ └── taobao/ │ │ │ │ └── secondbundle/ │ │ │ │ └── ExampleInstrumentedTest.java │ │ │ ├── main/ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ ├── java/ │ │ │ │ │ └── com/ │ │ │ │ │ └── taobao/ │ │ │ │ │ └── secondbundle/ │ │ │ │ │ └── LoginActivity.java │ │ │ │ └── res/ │ │ │ │ ├── layout/ │ │ │ │ │ └── activity_login.xml │ │ │ │ └── values/ │ │ │ │ ├── colors.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ │ └── test/ │ │ │ └── java/ │ │ │ └── com/ │ │ │ └── taobao/ │ │ │ └── secondbundle/ │ │ │ └── ExampleUnitTest.java │ │ ├── settings.gradle │ │ ├── sharebundle/ │ │ │ ├── .gitignore │ │ │ ├── build.gradle │ │ │ ├── proguard-rules.pro │ │ │ └── src/ │ │ │ ├── androidTest/ │ │ │ │ └── java/ │ │ │ │ └── com/ │ │ │ │ └── taobao/ │ │ │ │ └── sharebundle/ │ │ │ │ └── ExampleInstrumentedTest.java │ │ │ ├── main/ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ └── res/ │ │ │ │ └── values/ │ │ │ │ └── strings.xml │ │ │ └── test/ │ │ │ └── java/ │ │ │ └── com/ │ │ │ └── taobao/ │ │ │ └── sharebundle/ │ │ │ └── ExampleUnitTest.java │ │ ├── sharedlibrary/ │ │ │ ├── .gitignore │ │ │ ├── build.gradle │ │ │ ├── proguard-rules.pro │ │ │ └── src/ │ │ │ ├── androidTest/ │ │ │ │ └── java/ │ │ │ │ └── taobao/ │ │ │ │ └── sharedlibrary/ │ │ │ │ └── ExampleInstrumentedTest.java │ │ │ ├── main/ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ └── res/ │ │ │ │ └── values/ │ │ │ │ └── strings.xml │ │ │ └── test/ │ │ │ └── java/ │ │ │ └── taobao/ │ │ │ └── sharedlibrary/ │ │ │ └── ExampleUnitTest.java │ │ └── src/ │ │ └── main/ │ │ ├── AndroidManifest.xml │ │ ├── java/ │ │ │ └── com/ │ │ │ └── taobao/ │ │ │ └── demo/ │ │ │ ├── DemoApplication.java │ │ │ ├── WelcomActivity.java │ │ │ └── update/ │ │ │ └── Updater.java │ │ └── res/ │ │ ├── layout/ │ │ │ └── main.xml │ │ └── values/ │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── styles.xml │ ├── build.gradle │ ├── gradle/ │ │ └── wrapper/ │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle ├── atlas-docs/ │ ├── .gitignore │ ├── .si.yml │ ├── README.md │ ├── SUMMARY.md │ ├── _book/ │ │ ├── .gitignore │ │ ├── .si.yml │ │ ├── code_read/ │ │ │ ├── atlas_bundle_load/ │ │ │ │ ├── atlas_bundle_load.html │ │ │ │ ├── bundle_load.uml │ │ │ │ └── bundle_load_part_2.uml │ │ │ ├── atlas_gradle_apk/ │ │ │ │ └── atlas_atlas_gradle_apk.html │ │ │ └── atlas_start/ │ │ │ ├── atlas_core_start.uml │ │ │ ├── atlas_core_start_callback.uml │ │ │ ├── atlas_core_start_provider.uml │ │ │ ├── atlas_java_startup.uml │ │ │ ├── atlas_start_1.html │ │ │ └── atlas_start_2.html │ │ ├── faq/ │ │ │ ├── dynamic_failed_help.html │ │ │ ├── help.html │ │ │ ├── question.html │ │ │ └── variant.html │ │ ├── gitbook/ │ │ │ ├── fonts/ │ │ │ │ └── fontawesome/ │ │ │ │ └── FontAwesome.otf │ │ │ ├── gitbook-plugin-fontsettings/ │ │ │ │ ├── fontsettings.js │ │ │ │ └── website.css │ │ │ ├── gitbook-plugin-highlight/ │ │ │ │ ├── ebook.css │ │ │ │ └── website.css │ │ │ ├── gitbook-plugin-livereload/ │ │ │ │ └── plugin.js │ │ │ ├── gitbook-plugin-lunr/ │ │ │ │ └── search-lunr.js │ │ │ ├── gitbook-plugin-search/ │ │ │ │ ├── search-engine.js │ │ │ │ ├── search.css │ │ │ │ └── search.js │ │ │ ├── gitbook-plugin-sharing/ │ │ │ │ └── buttons.js │ │ │ ├── gitbook.js │ │ │ ├── style.css │ │ │ └── theme.js │ │ ├── guide-for-use/ │ │ │ ├── bundleCommunicate.html │ │ │ ├── guide_for_build.html │ │ │ ├── guide_for_bundle.html │ │ │ ├── guide_for_compile.html │ │ │ └── index.html │ │ ├── index.html │ │ ├── principle-intro/ │ │ │ ├── Apk_architecture.html │ │ │ ├── File_architecture_runtime.html │ │ │ ├── Project_architectured.html │ │ │ └── Runtime_principle.html │ │ ├── search_index.json │ │ └── update/ │ │ ├── dexpatch.html │ │ ├── dexpatch_use_guide.html │ │ ├── guide.html │ │ ├── index.html │ │ └── principle.html │ ├── code_read/ │ │ ├── atlas_bundle_load/ │ │ │ ├── atlas_bundle_load.md │ │ │ ├── bundle_load.uml │ │ │ └── bundle_load_part_2.uml │ │ ├── atlas_gradle_apk/ │ │ │ └── atlas_atlas_gradle_apk.md │ │ └── atlas_start/ │ │ ├── atlas_core_start.uml │ │ ├── atlas_core_start_callback.uml │ │ ├── atlas_core_start_provider.uml │ │ ├── atlas_java_startup.uml │ │ ├── atlas_start_1.md │ │ └── atlas_start_2.md │ ├── faq/ │ │ ├── dynamic_failed_help.md │ │ ├── help.md │ │ ├── question.md │ │ └── variant.md │ ├── guide-for-use/ │ │ ├── README.md │ │ ├── _book/ │ │ │ ├── bundleCommunicate.md │ │ │ ├── gitbook/ │ │ │ │ ├── fonts/ │ │ │ │ │ └── fontawesome/ │ │ │ │ │ └── FontAwesome.otf │ │ │ │ ├── gitbook-plugin-fontsettings/ │ │ │ │ │ ├── fontsettings.js │ │ │ │ │ └── website.css │ │ │ │ ├── gitbook-plugin-highlight/ │ │ │ │ │ ├── ebook.css │ │ │ │ │ └── website.css │ │ │ │ ├── gitbook-plugin-livereload/ │ │ │ │ │ └── plugin.js │ │ │ │ ├── gitbook-plugin-lunr/ │ │ │ │ │ └── search-lunr.js │ │ │ │ ├── gitbook-plugin-search/ │ │ │ │ │ ├── search-engine.js │ │ │ │ │ ├── search.css │ │ │ │ │ └── search.js │ │ │ │ ├── gitbook-plugin-sharing/ │ │ │ │ │ └── buttons.js │ │ │ │ ├── gitbook.js │ │ │ │ ├── style.css │ │ │ │ └── theme.js │ │ │ ├── guide_for_build.md │ │ │ ├── guide_for_bundle.md │ │ │ ├── guide_for_compile.md │ │ │ ├── index.html │ │ │ └── search_index.json │ │ ├── bundleCommunicate.md │ │ ├── guide_for_build.md │ │ ├── guide_for_bundle.md │ │ ├── guide_for_compile.md │ │ └── guide_for_progurad.md │ ├── principle-intro/ │ │ ├── Apk_architecture.md │ │ ├── File_architecture_runtime.md │ │ ├── Project_architectured.md │ │ └── Runtime_principle.md │ └── update/ │ ├── README.md │ ├── dexpatch.md │ ├── dexpatch_use_guide.md │ ├── guide.md │ └── principle.md ├── atlas-gradle-plugin/ │ ├── README.md │ ├── aapt/ │ │ ├── build.gradle │ │ └── src/ │ │ └── main/ │ │ ├── java/ │ │ │ └── com/ │ │ │ └── taobao/ │ │ │ └── android/ │ │ │ └── AaptLib.java │ │ └── resources/ │ │ └── aapt/ │ │ ├── linux/ │ │ │ └── aapt │ │ └── mac/ │ │ └── aapt │ ├── atlas-plugin/ │ │ ├── .gradletasknamecache │ │ ├── build/ │ │ │ └── resources/ │ │ │ └── main/ │ │ │ └── META-INF/ │ │ │ └── gradle-plugins/ │ │ │ ├── com.taobao.atlas.feature.properties │ │ │ └── com.taobao.atlas.instantapp.properties │ │ ├── build.gradle │ │ ├── increment.sh │ │ ├── libs/ │ │ │ └── libarsc.jar │ │ ├── publish.sh │ │ ├── src/ │ │ │ ├── main/ │ │ │ │ ├── java/ │ │ │ │ │ ├── android/ │ │ │ │ │ │ └── aapt/ │ │ │ │ │ │ └── pb/ │ │ │ │ │ │ └── internal/ │ │ │ │ │ │ └── ResourcesInternal.java │ │ │ │ │ ├── com/ │ │ │ │ │ │ ├── android/ │ │ │ │ │ │ │ ├── aapt/ │ │ │ │ │ │ │ │ └── Resources.java │ │ │ │ │ │ │ ├── build/ │ │ │ │ │ │ │ │ └── gradle/ │ │ │ │ │ │ │ │ ├── internal/ │ │ │ │ │ │ │ │ │ ├── AndroidComponent.java │ │ │ │ │ │ │ │ │ ├── ApkDataUtils.java │ │ │ │ │ │ │ │ │ ├── AtlasDependencyManager.java │ │ │ │ │ │ │ │ │ ├── AtlasDependencyManager2.java │ │ │ │ │ │ │ │ │ ├── api/ │ │ │ │ │ │ │ │ │ │ ├── ApContext.java │ │ │ │ │ │ │ │ │ │ ├── ApkFiles.java │ │ │ │ │ │ │ │ │ │ ├── AppVariantContext.java │ │ │ │ │ │ │ │ │ │ ├── AppVariantOutputContext.java │ │ │ │ │ │ │ │ │ │ ├── AwbTransform.java │ │ │ │ │ │ │ │ │ │ ├── FeatureVariantContext.java │ │ │ │ │ │ │ │ │ │ ├── LibVariantContext.java │ │ │ │ │ │ │ │ │ │ └── VariantContext.java │ │ │ │ │ │ │ │ │ ├── ide/ │ │ │ │ │ │ │ │ │ │ ├── AtlasAndroidLibraryImpl.java │ │ │ │ │ │ │ │ │ │ ├── AtlasDependencyGraph.java │ │ │ │ │ │ │ │ │ │ └── DependencyConvertUtils.java │ │ │ │ │ │ │ │ │ ├── incremental/ │ │ │ │ │ │ │ │ │ │ ├── TBConstructorRedirection.java │ │ │ │ │ │ │ │ │ │ ├── TBIncrementalChangeVisitor.java │ │ │ │ │ │ │ │ │ │ ├── TBIncrementalSupportVisitor.java │ │ │ │ │ │ │ │ │ │ ├── TBIncrementalVisitor.java │ │ │ │ │ │ │ │ │ │ └── TBMethodRedirection.java │ │ │ │ │ │ │ │ │ ├── pipeline/ │ │ │ │ │ │ │ │ │ │ ├── AtlasExtendedContentType.java │ │ │ │ │ │ │ │ │ │ ├── AtlasIncrementalFileMergeTransformUtils.java │ │ │ │ │ │ │ │ │ │ ├── AtlasIntermediateFolderUtils.java │ │ │ │ │ │ │ │ │ │ ├── AtlasIntermediateStreamHelper.java │ │ │ │ │ │ │ │ │ │ ├── InjectTransform.java │ │ │ │ │ │ │ │ │ │ └── InjectTransformManager.java │ │ │ │ │ │ │ │ │ ├── publishing/ │ │ │ │ │ │ │ │ │ │ └── AtlasAndroidArtifacts.java │ │ │ │ │ │ │ │ │ ├── scope/ │ │ │ │ │ │ │ │ │ │ └── ConventionMappingHelper.java │ │ │ │ │ │ │ │ │ └── transforms/ │ │ │ │ │ │ │ │ │ ├── ApTransform.java │ │ │ │ │ │ │ │ │ ├── ExtractApTransform.java │ │ │ │ │ │ │ │ │ ├── ExtractAwbTransform.java │ │ │ │ │ │ │ │ │ ├── ExtractSolibTransform.java │ │ │ │ │ │ │ │ │ ├── LoadSolibFromLibsTransform.java │ │ │ │ │ │ │ │ │ └── LoadSolibTransform.java │ │ │ │ │ │ │ │ └── tasks/ │ │ │ │ │ │ │ │ ├── PackageAwb.java │ │ │ │ │ │ │ │ └── factory/ │ │ │ │ │ │ │ │ └── AwbAndroidJavaCompile.java │ │ │ │ │ │ │ ├── builder/ │ │ │ │ │ │ │ │ └── core/ │ │ │ │ │ │ │ │ ├── AtlasAapt.java │ │ │ │ │ │ │ │ └── AtlasBuilder.java │ │ │ │ │ │ │ ├── ide/ │ │ │ │ │ │ │ │ └── common/ │ │ │ │ │ │ │ │ └── process/ │ │ │ │ │ │ │ │ ├── CmdExecutor.java │ │ │ │ │ │ │ │ ├── MtlProcessExecutor.java │ │ │ │ │ │ │ │ ├── MtlProcessInfo.java │ │ │ │ │ │ │ │ └── MtlProcessInfoBuilder.java │ │ │ │ │ │ │ └── tools/ │ │ │ │ │ │ │ └── r8/ │ │ │ │ │ │ │ ├── AtlasD8.java │ │ │ │ │ │ │ ├── AtlasD8DexArchiveBuilder.java │ │ │ │ │ │ │ ├── AtlasD8Merger.java │ │ │ │ │ │ │ └── dex/ │ │ │ │ │ │ │ ├── AtlasApplicationWriter.java │ │ │ │ │ │ │ └── AtlasVirtualFile.java │ │ │ │ │ │ └── taobao/ │ │ │ │ │ │ └── android/ │ │ │ │ │ │ └── builder/ │ │ │ │ │ │ ├── AtlasAppPlugin.java │ │ │ │ │ │ ├── AtlasBasePlugin.java │ │ │ │ │ │ ├── AtlasBuildContext.java │ │ │ │ │ │ ├── AtlasFeaturePlugin.java │ │ │ │ │ │ ├── AtlasInstantAppPlugin.java │ │ │ │ │ │ ├── AtlasLibPlugin.java │ │ │ │ │ │ ├── AtlasMainDexHelper.java │ │ │ │ │ │ ├── AtlasPlugin.java │ │ │ │ │ │ ├── adapter/ │ │ │ │ │ │ │ ├── AppVariantContextFactory.java │ │ │ │ │ │ │ ├── AtlasExtensionFactory.java │ │ │ │ │ │ │ └── BuilderAdapter.java │ │ │ │ │ │ ├── dependency/ │ │ │ │ │ │ │ ├── AtlasDependencyTree.java │ │ │ │ │ │ │ ├── AtlasProjectDependencyManager.java │ │ │ │ │ │ │ ├── ap/ │ │ │ │ │ │ │ │ └── ApDependency.java │ │ │ │ │ │ │ ├── diff/ │ │ │ │ │ │ │ │ ├── DependencyCompareUtils.java │ │ │ │ │ │ │ │ └── DependencyDiff.java │ │ │ │ │ │ │ ├── model/ │ │ │ │ │ │ │ │ ├── ApLibrary.java │ │ │ │ │ │ │ │ ├── ApkLibrary.java │ │ │ │ │ │ │ │ ├── AwbBundle.java │ │ │ │ │ │ │ │ └── SoLibrary.java │ │ │ │ │ │ │ ├── output/ │ │ │ │ │ │ │ │ └── DependencyJson.java │ │ │ │ │ │ │ └── parser/ │ │ │ │ │ │ │ ├── AtlasDepHelper.java │ │ │ │ │ │ │ ├── AtlasDepTreeParser.java │ │ │ │ │ │ │ ├── CircleDependencyCheck.java │ │ │ │ │ │ │ ├── DependencyLocationManager.java │ │ │ │ │ │ │ ├── ResolvedDependencyInfo.java │ │ │ │ │ │ │ └── helper/ │ │ │ │ │ │ │ ├── DependencyGroup.java │ │ │ │ │ │ │ └── DependencyResolver.java │ │ │ │ │ │ ├── extension/ │ │ │ │ │ │ │ ├── AtlasExtension.java │ │ │ │ │ │ │ ├── BundleConfig.java │ │ │ │ │ │ │ ├── DefaultChannelConfig.java │ │ │ │ │ │ │ ├── DexConfig.java │ │ │ │ │ │ │ ├── EnhanceConfig.java │ │ │ │ │ │ │ ├── ManifestOptions.java │ │ │ │ │ │ │ ├── MultiDexConfig.java │ │ │ │ │ │ │ ├── PatchConfig.java │ │ │ │ │ │ │ ├── TBuildConfig.java │ │ │ │ │ │ │ ├── TBuildType.java │ │ │ │ │ │ │ ├── annotation/ │ │ │ │ │ │ │ │ ├── Config.java │ │ │ │ │ │ │ │ └── ConfigGroup.java │ │ │ │ │ │ │ └── factory/ │ │ │ │ │ │ │ ├── DefaultChannelConfigFactory.java │ │ │ │ │ │ │ ├── DexConfigFactory.java │ │ │ │ │ │ │ ├── EnhanceConfigFactory.java │ │ │ │ │ │ │ ├── MultiDexConfigFactory.java │ │ │ │ │ │ │ ├── PatchConfigFactory.java │ │ │ │ │ │ │ └── TBuildTypeFactory.java │ │ │ │ │ │ ├── hook/ │ │ │ │ │ │ │ ├── AppPluginHook.java │ │ │ │ │ │ │ └── dex/ │ │ │ │ │ │ │ ├── AtlasD8Creator.java │ │ │ │ │ │ │ ├── AtlasDexArchiveMerger.java │ │ │ │ │ │ │ ├── DexArchiveMergerHook.java │ │ │ │ │ │ │ ├── DexByteCodeConverterHook.java │ │ │ │ │ │ │ ├── DexWrapperHook.java │ │ │ │ │ │ │ ├── DirDexArchiveHook.java │ │ │ │ │ │ │ └── NonIncrementalJarDexArchiveHook.java │ │ │ │ │ │ ├── insant/ │ │ │ │ │ │ │ ├── DelegateProguardTransform.java │ │ │ │ │ │ │ ├── InstantInfo.java │ │ │ │ │ │ │ ├── TaobaoExtractJarsTransform.java │ │ │ │ │ │ │ ├── TaobaoInstantRunDependenciesApkBuilder.java │ │ │ │ │ │ │ ├── TaobaoInstantRunDex.java │ │ │ │ │ │ │ ├── TaobaoInstantRunSlicer.java │ │ │ │ │ │ │ ├── TaobaoInstantRunTransform.java │ │ │ │ │ │ │ ├── matcher/ │ │ │ │ │ │ │ │ ├── AllMatcher.java │ │ │ │ │ │ │ │ ├── ClassMatcher.java │ │ │ │ │ │ │ │ ├── ExcludeMatcher.java │ │ │ │ │ │ │ │ ├── Imatcher.java │ │ │ │ │ │ │ │ ├── ImplementsMatcher.java │ │ │ │ │ │ │ │ ├── MatcherCreator.java │ │ │ │ │ │ │ │ ├── NoMatcher.java │ │ │ │ │ │ │ │ ├── PackageMatcher.java │ │ │ │ │ │ │ │ ├── SeveralExcludeMatcher.java │ │ │ │ │ │ │ │ └── SubPackgeMatcher.java │ │ │ │ │ │ │ └── visitor/ │ │ │ │ │ │ │ ├── ModifyClassVisitor.java │ │ │ │ │ │ │ ├── ModifyFieldVisitor.java │ │ │ │ │ │ │ └── ModifyMethodVisitor.java │ │ │ │ │ │ ├── manager/ │ │ │ │ │ │ │ ├── AtlasAppTaskManager.java │ │ │ │ │ │ │ ├── AtlasBaseTaskManager.java │ │ │ │ │ │ │ ├── AtlasConfigurationHelper.java │ │ │ │ │ │ │ ├── AtlasFeatureTaskManager.java │ │ │ │ │ │ │ ├── AtlasLibTaskManager.java │ │ │ │ │ │ │ ├── PluginManager.java │ │ │ │ │ │ │ └── Version.java │ │ │ │ │ │ ├── tasks/ │ │ │ │ │ │ │ ├── PrepareAPTask.java │ │ │ │ │ │ │ ├── app/ │ │ │ │ │ │ │ │ ├── ApBuildTask.java │ │ │ │ │ │ │ │ ├── BuildAtlasEnvTask.java │ │ │ │ │ │ │ │ ├── GenerateAtlasSourceTask.java │ │ │ │ │ │ │ │ ├── LogDependenciesTask.java │ │ │ │ │ │ │ │ ├── ResourcePatch.java │ │ │ │ │ │ │ │ ├── ScanDupResTask.java │ │ │ │ │ │ │ │ ├── bundle/ │ │ │ │ │ │ │ │ │ ├── AtlasSymbolIo.java │ │ │ │ │ │ │ │ │ ├── AwbApkPackageTask.java │ │ │ │ │ │ │ │ │ ├── AwbJavaCompileConfigAction.java │ │ │ │ │ │ │ │ │ ├── AwbPackagingScope.java │ │ │ │ │ │ │ │ │ ├── Dex.java │ │ │ │ │ │ │ │ │ ├── JavacAwbsTask.java │ │ │ │ │ │ │ │ │ ├── PackageAwbsTask.java │ │ │ │ │ │ │ │ │ ├── ProcessAwbAndroidResources.java │ │ │ │ │ │ │ │ │ ├── ProcessResAwbsTask.java │ │ │ │ │ │ │ │ │ └── actions/ │ │ │ │ │ │ │ │ │ ├── FirstApkAction.java │ │ │ │ │ │ │ │ │ ├── LastApkAction.java │ │ │ │ │ │ │ │ │ └── LastBundleAction.java │ │ │ │ │ │ │ │ ├── databinding/ │ │ │ │ │ │ │ │ │ ├── AwbDataBindingExportBuildInfoTask.java │ │ │ │ │ │ │ │ │ ├── AwbDataBindingMergeArtifactsTask.java │ │ │ │ │ │ │ │ │ ├── AwbDataBindingProcessLayoutTask.java │ │ │ │ │ │ │ │ │ ├── AwbDataBindingRenameTask.java │ │ │ │ │ │ │ │ │ └── AwbXmlProcessor.java │ │ │ │ │ │ │ │ ├── manifest/ │ │ │ │ │ │ │ │ │ ├── PostProcessManifestAction.java │ │ │ │ │ │ │ │ │ ├── PreProcessManifestAction.java │ │ │ │ │ │ │ │ │ └── StandardizeLibManifestTask.java │ │ │ │ │ │ │ │ ├── merge/ │ │ │ │ │ │ │ │ │ ├── AppendMainArtifactsCollection.java │ │ │ │ │ │ │ │ │ ├── MainArtifactsCollection.java │ │ │ │ │ │ │ │ │ ├── MainFilesCollection.java │ │ │ │ │ │ │ │ │ ├── MergeAssetAwbsConfigAction.java │ │ │ │ │ │ │ │ │ ├── MergeAwbsJniFolder.java │ │ │ │ │ │ │ │ │ ├── MergeManifestAwbsConfigAction.java │ │ │ │ │ │ │ │ │ ├── MergeResAwbsConfigAction.java │ │ │ │ │ │ │ │ │ ├── MergeResV4Dir.java │ │ │ │ │ │ │ │ │ ├── MergeSoLibTask.java │ │ │ │ │ │ │ │ │ └── bundle/ │ │ │ │ │ │ │ │ │ ├── AwbDataBindingProcessLayoutsTask.java │ │ │ │ │ │ │ │ │ ├── MergeAwbAssets.java │ │ │ │ │ │ │ │ │ └── MergeAwbResource.java │ │ │ │ │ │ │ │ └── prepare/ │ │ │ │ │ │ │ │ ├── AddLocalJarTask.java │ │ │ │ │ │ │ │ ├── BundleInfoSourceCreator.java │ │ │ │ │ │ │ │ ├── PrepareAaptTask.java │ │ │ │ │ │ │ │ ├── PrepareBundleInfoTask.java │ │ │ │ │ │ │ │ └── PreparePackageIdsTask.java │ │ │ │ │ │ │ ├── awo/ │ │ │ │ │ │ │ │ └── utils/ │ │ │ │ │ │ │ │ └── AwoInstaller.java │ │ │ │ │ │ │ ├── execution/ │ │ │ │ │ │ │ │ └── SkipExecuter.java │ │ │ │ │ │ │ ├── feature/ │ │ │ │ │ │ │ │ ├── FeatureLibManifestTask.java │ │ │ │ │ │ │ │ └── PrePareFeatureTask.java │ │ │ │ │ │ │ ├── helper/ │ │ │ │ │ │ │ │ └── AtlasListTask.java │ │ │ │ │ │ │ ├── instantapp/ │ │ │ │ │ │ │ │ └── AtlasBundleInstantApp.java │ │ │ │ │ │ │ ├── library/ │ │ │ │ │ │ │ │ ├── AndroidComponetCreator.java │ │ │ │ │ │ │ │ ├── AwbGenerator.java │ │ │ │ │ │ │ │ ├── JarExtractTask.java │ │ │ │ │ │ │ │ ├── ModuleInfoWriter.java │ │ │ │ │ │ │ │ └── publish/ │ │ │ │ │ │ │ │ ├── PublishHooker.java │ │ │ │ │ │ │ │ └── UpdatePomTask.java │ │ │ │ │ │ │ ├── manager/ │ │ │ │ │ │ │ │ ├── AbstractBundleTask.java │ │ │ │ │ │ │ │ ├── MtlBaseTaskAction.java │ │ │ │ │ │ │ │ ├── MtlParallelTask.java │ │ │ │ │ │ │ │ ├── MtlTaskContext.java │ │ │ │ │ │ │ │ ├── MtlTaskFactory.java │ │ │ │ │ │ │ │ ├── MtlTaskFactoryImpl.java │ │ │ │ │ │ │ │ ├── MtlTaskInjector.java │ │ │ │ │ │ │ │ ├── TaskCreater.java │ │ │ │ │ │ │ │ ├── TaskQueryHelper.java │ │ │ │ │ │ │ │ └── transform/ │ │ │ │ │ │ │ │ ├── MtlInjectTransform.java │ │ │ │ │ │ │ │ ├── MtlTransformContext.java │ │ │ │ │ │ │ │ ├── MtlTransformInjector.java │ │ │ │ │ │ │ │ └── TransformManager.java │ │ │ │ │ │ │ ├── maven/ │ │ │ │ │ │ │ │ └── PublishToMavenRepositoryHook.java │ │ │ │ │ │ │ ├── tpatch/ │ │ │ │ │ │ │ │ ├── DiffBundleInfoTask.java │ │ │ │ │ │ │ │ ├── PackageTPatchConfigAction.java │ │ │ │ │ │ │ │ ├── TPatchDiffApkBuildTask.java │ │ │ │ │ │ │ │ ├── TPatchDiffResAPBuildTask.java │ │ │ │ │ │ │ │ └── TPatchTask.java │ │ │ │ │ │ │ └── transform/ │ │ │ │ │ │ │ ├── AtlasDataBindingMergeArtifactsTransform.java │ │ │ │ │ │ │ ├── AtlasDesugarTransform.java │ │ │ │ │ │ │ ├── AtlasFixStackFramesTransform.java │ │ │ │ │ │ │ ├── AtlasMergeJavaResourcesTransform.java │ │ │ │ │ │ │ ├── AtlasProguardTransform.java │ │ │ │ │ │ │ ├── AtlasTransformUtils.java │ │ │ │ │ │ │ ├── ClassInjectTransform.java │ │ │ │ │ │ │ ├── ResourcesShrinker.java │ │ │ │ │ │ │ ├── TransformReplacer.java │ │ │ │ │ │ │ └── dex/ │ │ │ │ │ │ │ ├── AtlasDexArchiveBuilderCacheHander.java │ │ │ │ │ │ │ ├── AtlasDexArchiveBuilderTransform.java │ │ │ │ │ │ │ ├── AtlasDexMerger.java │ │ │ │ │ │ │ ├── AtlasDexMergerTransform.java │ │ │ │ │ │ │ ├── AtlasMainDexMerger.java │ │ │ │ │ │ │ ├── AtlasMultiDexListTransform.java │ │ │ │ │ │ │ ├── AwbDexsMerger.java │ │ │ │ │ │ │ └── DexMergeTransformCallable.java │ │ │ │ │ │ └── tools/ │ │ │ │ │ │ ├── BuildHelper.java │ │ │ │ │ │ ├── EnvHelper.java │ │ │ │ │ │ ├── FileNameUtils.java │ │ │ │ │ │ ├── JarUtils.java │ │ │ │ │ │ ├── MD5Util.java │ │ │ │ │ │ ├── OSUtils.java │ │ │ │ │ │ ├── PathUtil.java │ │ │ │ │ │ ├── PluginTypeUtils.java │ │ │ │ │ │ ├── Profiler.java │ │ │ │ │ │ ├── ReflectUtils.java │ │ │ │ │ │ ├── TransformInputUtils.java │ │ │ │ │ │ ├── VersionUtils.java │ │ │ │ │ │ ├── asm/ │ │ │ │ │ │ │ ├── ClassNameRenamer.java │ │ │ │ │ │ │ ├── ClazzBasicHandler.java │ │ │ │ │ │ │ ├── ClazzReplacer.java │ │ │ │ │ │ │ ├── MethodReplacer.java │ │ │ │ │ │ │ ├── field/ │ │ │ │ │ │ │ │ ├── AsmFieldEditor.java │ │ │ │ │ │ │ │ ├── Field.java │ │ │ │ │ │ │ │ └── ModifyClassVisiter.java │ │ │ │ │ │ │ └── method/ │ │ │ │ │ │ │ ├── Method.java │ │ │ │ │ │ │ ├── MethodReplaceClazzVisitor.java │ │ │ │ │ │ │ ├── MethodReplaceMethodVisitor.java │ │ │ │ │ │ │ └── MethodStore.java │ │ │ │ │ │ ├── bundleinfo/ │ │ │ │ │ │ │ ├── ApkFileListUtils.java │ │ │ │ │ │ │ ├── BundleGraphExecutor.java │ │ │ │ │ │ │ ├── BundleInfoUtils.java │ │ │ │ │ │ │ ├── BundleItem.java │ │ │ │ │ │ │ ├── BundleItemRunner.java │ │ │ │ │ │ │ ├── DynamicBundleInfo.java │ │ │ │ │ │ │ └── model/ │ │ │ │ │ │ │ ├── BasicBundleInfo.java │ │ │ │ │ │ │ └── BundleInfo.java │ │ │ │ │ │ ├── cache/ │ │ │ │ │ │ │ ├── Cache.java │ │ │ │ │ │ │ ├── FileCacheCenter.java │ │ │ │ │ │ │ ├── FileCacheException.java │ │ │ │ │ │ │ ├── FileLockUtils.java │ │ │ │ │ │ │ ├── SimpleLocalCache.java │ │ │ │ │ │ │ └── SimpleNetworkCache.java │ │ │ │ │ │ ├── classinject/ │ │ │ │ │ │ │ ├── ApkInjectInfoCreator.java │ │ │ │ │ │ │ ├── ClazzInjecter.java │ │ │ │ │ │ │ ├── CodeInjectByJavassist.java │ │ │ │ │ │ │ ├── FrameworkProperties.java │ │ │ │ │ │ │ └── InjectParam.java │ │ │ │ │ │ ├── command/ │ │ │ │ │ │ │ ├── CommandExecutor.java │ │ │ │ │ │ │ └── ExecutionException.java │ │ │ │ │ │ ├── concurrent/ │ │ │ │ │ │ │ └── ExecutorServicesHelper.java │ │ │ │ │ │ ├── diff/ │ │ │ │ │ │ │ └── DiffResExtractor.java │ │ │ │ │ │ ├── groovy/ │ │ │ │ │ │ │ └── ClosureFactory.java │ │ │ │ │ │ ├── guide/ │ │ │ │ │ │ │ ├── AtlasConfigField.java │ │ │ │ │ │ │ ├── AtlasConfigHelper.java │ │ │ │ │ │ │ └── AtlasExtensionOutput.java │ │ │ │ │ │ ├── ideaplugin/ │ │ │ │ │ │ │ ├── ApDownloader.java │ │ │ │ │ │ │ └── AwoPropHandler.java │ │ │ │ │ │ ├── jarmerge/ │ │ │ │ │ │ │ └── JarMergerWithOverride.java │ │ │ │ │ │ ├── log/ │ │ │ │ │ │ │ ├── FileLogger.java │ │ │ │ │ │ │ └── LogOutputListener.java │ │ │ │ │ │ ├── manifest/ │ │ │ │ │ │ │ ├── AtlasProxy.java │ │ │ │ │ │ │ ├── ManifestFileUtils.java │ │ │ │ │ │ │ ├── ManifestHelper.java │ │ │ │ │ │ │ ├── ManifestInfo.java │ │ │ │ │ │ │ ├── Permission.java │ │ │ │ │ │ │ └── Result.java │ │ │ │ │ │ ├── multidex/ │ │ │ │ │ │ │ ├── FastMultiDexer.java │ │ │ │ │ │ │ ├── dex/ │ │ │ │ │ │ │ │ ├── DexGroup.java │ │ │ │ │ │ │ │ ├── DexMerger.java │ │ │ │ │ │ │ │ └── FileComparator.java │ │ │ │ │ │ │ └── mutli/ │ │ │ │ │ │ │ ├── JarRefactor.java │ │ │ │ │ │ │ ├── MainDexLister.java │ │ │ │ │ │ │ ├── MappingReaderProcess.java │ │ │ │ │ │ │ └── NameComparator.java │ │ │ │ │ │ ├── process/ │ │ │ │ │ │ │ └── ApkProcessor.java │ │ │ │ │ │ ├── proguard/ │ │ │ │ │ │ │ ├── AtlasProguardHelper.java │ │ │ │ │ │ │ ├── AwbProguardConfiguration.java │ │ │ │ │ │ │ ├── BundleProguarder.java │ │ │ │ │ │ │ ├── KeepOnlyConfigurationParser.java │ │ │ │ │ │ │ ├── ProGuardPercentPrinter.java │ │ │ │ │ │ │ ├── domain/ │ │ │ │ │ │ │ │ ├── Input.java │ │ │ │ │ │ │ │ └── Result.java │ │ │ │ │ │ │ └── dump/ │ │ │ │ │ │ │ ├── AbstractClasslVisitor.java │ │ │ │ │ │ │ ├── BundleProguardDumper.java │ │ │ │ │ │ │ ├── ClassDetailVisitor.java │ │ │ │ │ │ │ ├── ClassStructVisitor.java │ │ │ │ │ │ │ ├── ClazzRefInfo.java │ │ │ │ │ │ │ ├── ClazzRefInfoContainer.java │ │ │ │ │ │ │ ├── KeepConverter.java │ │ │ │ │ │ │ ├── VisitorDTO.java │ │ │ │ │ │ │ └── utils/ │ │ │ │ │ │ │ └── ReflectUtils.java │ │ │ │ │ │ ├── sign/ │ │ │ │ │ │ │ ├── AndroidSigner.java │ │ │ │ │ │ │ ├── LocalSignHelper.java │ │ │ │ │ │ │ └── LocalSignedJarBuilder.java │ │ │ │ │ │ ├── solib/ │ │ │ │ │ │ │ ├── NativeSoFilter.java │ │ │ │ │ │ │ └── NativeSoUtils.java │ │ │ │ │ │ ├── xml/ │ │ │ │ │ │ │ └── XmlHelper.java │ │ │ │ │ │ ├── zip/ │ │ │ │ │ │ │ ├── BetterZip.java │ │ │ │ │ │ │ ├── FileMkUtils.java │ │ │ │ │ │ │ └── ZipUtils.java │ │ │ │ │ │ └── zipalign/ │ │ │ │ │ │ └── ZipAlignUtils.java │ │ │ │ │ └── proguard/ │ │ │ │ │ ├── AtlasProguardConstants.java │ │ │ │ │ └── io/ │ │ │ │ │ └── JarWriter.java │ │ │ │ └── resources/ │ │ │ │ └── META-INF/ │ │ │ │ └── gradle-plugins/ │ │ │ │ ├── com.taobao.atlas.application.properties │ │ │ │ ├── com.taobao.atlas.dexpatch.properties │ │ │ │ ├── com.taobao.atlas.feature.properties │ │ │ │ ├── com.taobao.atlas.instantapp.properties │ │ │ │ ├── com.taobao.atlas.library.properties │ │ │ │ └── com.taobao.atlas.properties │ │ │ └── test/ │ │ │ ├── java/ │ │ │ │ ├── com/ │ │ │ │ │ └── taobao/ │ │ │ │ │ ├── asm/ │ │ │ │ │ │ ├── AsmExample.java │ │ │ │ │ │ ├── AsmFieldTest.java │ │ │ │ │ │ ├── AsmTest.java │ │ │ │ │ │ └── Config.java │ │ │ │ │ └── atlas/ │ │ │ │ │ ├── bundle/ │ │ │ │ │ │ └── BundleDependenyTest.java │ │ │ │ │ ├── cache/ │ │ │ │ │ │ └── FileLockTest.java │ │ │ │ │ ├── dex/ │ │ │ │ │ │ └── FastDexMergeTest.java │ │ │ │ │ └── manifest/ │ │ │ │ │ ├── ManifestHelperTest.java │ │ │ │ │ └── ManifestTest.java │ │ │ │ └── proguard/ │ │ │ │ └── KeepOnlyConfigurationParserTest.java │ │ │ └── resources/ │ │ │ ├── AndroidManifest.xml │ │ │ ├── AndroidManifest2.xml │ │ │ ├── bundleInfoList.json │ │ │ └── log4j.properties │ │ ├── test.sh │ │ └── todo.txt │ ├── build.gradle │ ├── dexpatch/ │ │ ├── .gitignore │ │ ├── build.gradle │ │ ├── gradle/ │ │ │ └── wrapper/ │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ │ ├── gradlew │ │ └── src/ │ │ └── main/ │ │ ├── java/ │ │ │ ├── android/ │ │ │ │ └── content/ │ │ │ │ └── res/ │ │ │ │ ├── AXMLResource.java │ │ │ │ ├── IntReader.java │ │ │ │ └── chunk/ │ │ │ │ ├── AttributeType.java │ │ │ │ ├── ChunkType.java │ │ │ │ ├── ChunkUtil.java │ │ │ │ ├── PoolItem.java │ │ │ │ ├── sections/ │ │ │ │ │ ├── ChunkSection.java │ │ │ │ │ ├── GenericChunkSection.java │ │ │ │ │ ├── ResourceSection.java │ │ │ │ │ └── StringSection.java │ │ │ │ └── types/ │ │ │ │ ├── AXMLHeader.java │ │ │ │ ├── Attribute.java │ │ │ │ ├── Buffer.java │ │ │ │ ├── Chunk.java │ │ │ │ ├── EndTag.java │ │ │ │ ├── GenericChunk.java │ │ │ │ ├── NameSpace.java │ │ │ │ ├── StartTag.java │ │ │ │ └── TextTag.java │ │ │ └── com/ │ │ │ └── taobao/ │ │ │ ├── android/ │ │ │ │ ├── PatchManager.java │ │ │ │ ├── PatchType.java │ │ │ │ ├── apatch/ │ │ │ │ │ ├── AndFixFilterImpl.java │ │ │ │ │ ├── ApkPatch.java │ │ │ │ │ ├── Build.java │ │ │ │ │ ├── FastBuild.java │ │ │ │ │ ├── MergePatch.java │ │ │ │ │ ├── annotation/ │ │ │ │ │ │ └── MethodReplaceAnnotation.java │ │ │ │ │ ├── builder/ │ │ │ │ │ │ ├── PatchBuilder.java │ │ │ │ │ │ └── SignedJarBuilder.java │ │ │ │ │ └── utils/ │ │ │ │ │ ├── Formater.java │ │ │ │ │ ├── HexUtil.java │ │ │ │ │ ├── MappingParser.java │ │ │ │ │ ├── SmaliDiffUtils.java │ │ │ │ │ └── TypeGenUtil.java │ │ │ │ ├── baksmali/ │ │ │ │ │ ├── Renderers/ │ │ │ │ │ │ ├── BooleanRenderer.java │ │ │ │ │ │ ├── ByteRenderer.java │ │ │ │ │ │ ├── CharRenderer.java │ │ │ │ │ │ ├── DoubleRenderer.java │ │ │ │ │ │ ├── FloatRenderer.java │ │ │ │ │ │ ├── IntegerRenderer.java │ │ │ │ │ │ ├── LongRenderer.java │ │ │ │ │ │ └── ShortRenderer.java │ │ │ │ │ ├── adaptors/ │ │ │ │ │ │ ├── AnnotationFormatter.java │ │ │ │ │ │ ├── BlankMethodItem.java │ │ │ │ │ │ ├── CatchMethodItem.java │ │ │ │ │ │ ├── ClassDefinition.java │ │ │ │ │ │ ├── CommentMethodItem.java │ │ │ │ │ │ ├── CommentedOutMethodItem.java │ │ │ │ │ │ ├── CommentingIndentingWriter.java │ │ │ │ │ │ ├── Debug/ │ │ │ │ │ │ │ ├── BeginEpilogueMethodItem.java │ │ │ │ │ │ │ ├── DebugMethodItem.java │ │ │ │ │ │ │ ├── EndLocalMethodItem.java │ │ │ │ │ │ │ ├── EndPrologueMethodItem.java │ │ │ │ │ │ │ ├── LineNumberMethodItem.java │ │ │ │ │ │ │ ├── LocalFormatter.java │ │ │ │ │ │ │ ├── RestartLocalMethodItem.java │ │ │ │ │ │ │ ├── SetSourceFileMethodItem.java │ │ │ │ │ │ │ └── StartLocalMethodItem.java │ │ │ │ │ │ ├── EncodedValue/ │ │ │ │ │ │ │ ├── AnnotationEncodedValueAdaptor.java │ │ │ │ │ │ │ ├── ArrayEncodedValueAdaptor.java │ │ │ │ │ │ │ └── EncodedValueAdaptor.java │ │ │ │ │ │ ├── EndTryLabelMethodItem.java │ │ │ │ │ │ ├── FieldDefinition.java │ │ │ │ │ │ ├── Format/ │ │ │ │ │ │ │ ├── ArrayDataMethodItem.java │ │ │ │ │ │ │ ├── InstructionMethodItem.java │ │ │ │ │ │ │ ├── InstructionMethodItemFactory.java │ │ │ │ │ │ │ ├── OffsetInstructionFormatMethodItem.java │ │ │ │ │ │ │ ├── PackedSwitchMethodItem.java │ │ │ │ │ │ │ ├── SparseSwitchMethodItem.java │ │ │ │ │ │ │ └── UnresolvedOdexInstructionMethodItem.java │ │ │ │ │ │ ├── LabelMethodItem.java │ │ │ │ │ │ ├── MethodDefinition.java │ │ │ │ │ │ ├── MethodItem.java │ │ │ │ │ │ ├── PostInstructionRegisterInfoMethodItem.java │ │ │ │ │ │ ├── PreInstructionRegisterInfoMethodItem.java │ │ │ │ │ │ ├── ReferenceFormatter.java │ │ │ │ │ │ ├── RegisterFormatter.java │ │ │ │ │ │ └── SyntheticAccessCommentMethodItem.java │ │ │ │ │ └── util/ │ │ │ │ │ └── ReferenceUtil.java │ │ │ │ ├── dex/ │ │ │ │ │ ├── Annotation.java │ │ │ │ │ ├── ClassData.java │ │ │ │ │ ├── ClassDef.java │ │ │ │ │ ├── Code.java │ │ │ │ │ ├── Dex.java │ │ │ │ │ ├── DexException.java │ │ │ │ │ ├── DexFormat.java │ │ │ │ │ ├── DexIndexOverflowException.java │ │ │ │ │ ├── EncodedValue.java │ │ │ │ │ ├── EncodedValueCodec.java │ │ │ │ │ ├── EncodedValueReader.java │ │ │ │ │ ├── FieldId.java │ │ │ │ │ ├── Leb128.java │ │ │ │ │ ├── MethodId.java │ │ │ │ │ ├── Mutf8.java │ │ │ │ │ ├── ProtoId.java │ │ │ │ │ ├── SizeOf.java │ │ │ │ │ ├── TableOfContents.java │ │ │ │ │ ├── TypeList.java │ │ │ │ │ └── util/ │ │ │ │ │ ├── ByteArrayByteInput.java │ │ │ │ │ ├── ByteInput.java │ │ │ │ │ ├── ByteOutput.java │ │ │ │ │ ├── ExceptionWithContext.java │ │ │ │ │ ├── FileUtils.java │ │ │ │ │ └── Unsigned.java │ │ │ │ ├── differ/ │ │ │ │ │ └── dex/ │ │ │ │ │ ├── ApkDiff.java │ │ │ │ │ ├── BundleDiffResult.java │ │ │ │ │ ├── DexDiffer.java │ │ │ │ │ └── PatchException.java │ │ │ │ ├── dx/ │ │ │ │ │ ├── Version.java │ │ │ │ │ ├── cf/ │ │ │ │ │ │ ├── attrib/ │ │ │ │ │ │ │ ├── AttAnnotationDefault.java │ │ │ │ │ │ │ ├── AttCode.java │ │ │ │ │ │ │ ├── AttConstantValue.java │ │ │ │ │ │ │ ├── AttDeprecated.java │ │ │ │ │ │ │ ├── AttEnclosingMethod.java │ │ │ │ │ │ │ ├── AttExceptions.java │ │ │ │ │ │ │ ├── AttInnerClasses.java │ │ │ │ │ │ │ ├── AttLineNumberTable.java │ │ │ │ │ │ │ ├── AttLocalVariableTable.java │ │ │ │ │ │ │ ├── AttLocalVariableTypeTable.java │ │ │ │ │ │ │ ├── AttRuntimeInvisibleAnnotations.java │ │ │ │ │ │ │ ├── AttRuntimeInvisibleParameterAnnotations.java │ │ │ │ │ │ │ ├── AttRuntimeVisibleAnnotations.java │ │ │ │ │ │ │ ├── AttRuntimeVisibleParameterAnnotations.java │ │ │ │ │ │ │ ├── AttSignature.java │ │ │ │ │ │ │ ├── AttSourceFile.java │ │ │ │ │ │ │ ├── AttSynthetic.java │ │ │ │ │ │ │ ├── BaseAnnotations.java │ │ │ │ │ │ │ ├── BaseAttribute.java │ │ │ │ │ │ │ ├── BaseLocalVariables.java │ │ │ │ │ │ │ ├── BaseParameterAnnotations.java │ │ │ │ │ │ │ ├── InnerClassList.java │ │ │ │ │ │ │ ├── RawAttribute.java │ │ │ │ │ │ │ └── package.html │ │ │ │ │ │ ├── code/ │ │ │ │ │ │ │ ├── BaseMachine.java │ │ │ │ │ │ │ ├── BasicBlocker.java │ │ │ │ │ │ │ ├── ByteBlock.java │ │ │ │ │ │ │ ├── ByteBlockList.java │ │ │ │ │ │ │ ├── ByteCatchList.java │ │ │ │ │ │ │ ├── ByteOps.java │ │ │ │ │ │ │ ├── BytecodeArray.java │ │ │ │ │ │ │ ├── ConcreteMethod.java │ │ │ │ │ │ │ ├── ExecutionStack.java │ │ │ │ │ │ │ ├── Frame.java │ │ │ │ │ │ │ ├── LineNumberList.java │ │ │ │ │ │ │ ├── LocalVariableList.java │ │ │ │ │ │ │ ├── LocalsArray.java │ │ │ │ │ │ │ ├── LocalsArraySet.java │ │ │ │ │ │ │ ├── Machine.java │ │ │ │ │ │ │ ├── Merger.java │ │ │ │ │ │ │ ├── OneLocalsArray.java │ │ │ │ │ │ │ ├── ReturnAddress.java │ │ │ │ │ │ │ ├── Ropper.java │ │ │ │ │ │ │ ├── RopperMachine.java │ │ │ │ │ │ │ ├── SimException.java │ │ │ │ │ │ │ ├── Simulator.java │ │ │ │ │ │ │ ├── SwitchList.java │ │ │ │ │ │ │ ├── ValueAwareMachine.java │ │ │ │ │ │ │ └── package.html │ │ │ │ │ │ ├── cst/ │ │ │ │ │ │ │ ├── ConstantPoolParser.java │ │ │ │ │ │ │ └── ConstantTags.java │ │ │ │ │ │ ├── direct/ │ │ │ │ │ │ │ ├── AnnotationParser.java │ │ │ │ │ │ │ ├── AttributeFactory.java │ │ │ │ │ │ │ ├── AttributeListParser.java │ │ │ │ │ │ │ ├── ClassPathOpener.java │ │ │ │ │ │ │ ├── CodeObserver.java │ │ │ │ │ │ │ ├── DirectClassFile.java │ │ │ │ │ │ │ ├── FieldListParser.java │ │ │ │ │ │ │ ├── MemberListParser.java │ │ │ │ │ │ │ ├── MethodListParser.java │ │ │ │ │ │ │ ├── StdAttributeFactory.java │ │ │ │ │ │ │ └── package.html │ │ │ │ │ │ └── iface/ │ │ │ │ │ │ ├── Attribute.java │ │ │ │ │ │ ├── AttributeList.java │ │ │ │ │ │ ├── ClassFile.java │ │ │ │ │ │ ├── Field.java │ │ │ │ │ │ ├── FieldList.java │ │ │ │ │ │ ├── HasAttribute.java │ │ │ │ │ │ ├── Member.java │ │ │ │ │ │ ├── Method.java │ │ │ │ │ │ ├── MethodList.java │ │ │ │ │ │ ├── ParseException.java │ │ │ │ │ │ ├── ParseObserver.java │ │ │ │ │ │ ├── StdAttributeList.java │ │ │ │ │ │ ├── StdField.java │ │ │ │ │ │ ├── StdFieldList.java │ │ │ │ │ │ ├── StdMember.java │ │ │ │ │ │ ├── StdMethod.java │ │ │ │ │ │ ├── StdMethodList.java │ │ │ │ │ │ └── package.html │ │ │ │ │ ├── command/ │ │ │ │ │ │ ├── DxConsole.java │ │ │ │ │ │ ├── Main.java │ │ │ │ │ │ ├── UsageException.java │ │ │ │ │ │ ├── annotool/ │ │ │ │ │ │ │ ├── AnnotationLister.java │ │ │ │ │ │ │ └── Main.java │ │ │ │ │ │ ├── dexer/ │ │ │ │ │ │ │ └── Main.java │ │ │ │ │ │ ├── dump/ │ │ │ │ │ │ │ ├── Args.java │ │ │ │ │ │ │ ├── BaseDumper.java │ │ │ │ │ │ │ ├── BlockDumper.java │ │ │ │ │ │ │ ├── ClassDumper.java │ │ │ │ │ │ │ ├── DotDumper.java │ │ │ │ │ │ │ ├── Main.java │ │ │ │ │ │ │ └── SsaDumper.java │ │ │ │ │ │ ├── findusages/ │ │ │ │ │ │ │ ├── FindUsages.java │ │ │ │ │ │ │ └── Main.java │ │ │ │ │ │ └── grep/ │ │ │ │ │ │ ├── Grep.java │ │ │ │ │ │ └── Main.java │ │ │ │ │ ├── dex/ │ │ │ │ │ │ ├── DexOptions.java │ │ │ │ │ │ ├── cf/ │ │ │ │ │ │ │ ├── AttributeTranslator.java │ │ │ │ │ │ │ ├── CfOptions.java │ │ │ │ │ │ │ ├── CfTranslator.java │ │ │ │ │ │ │ ├── CodeStatistics.java │ │ │ │ │ │ │ ├── OptimizerOptions.java │ │ │ │ │ │ │ └── package.html │ │ │ │ │ │ ├── code/ │ │ │ │ │ │ │ ├── ArrayData.java │ │ │ │ │ │ │ ├── BlockAddresses.java │ │ │ │ │ │ │ ├── CatchBuilder.java │ │ │ │ │ │ │ ├── CatchHandlerList.java │ │ │ │ │ │ │ ├── CatchTable.java │ │ │ │ │ │ │ ├── CodeAddress.java │ │ │ │ │ │ │ ├── CstInsn.java │ │ │ │ │ │ │ ├── DalvCode.java │ │ │ │ │ │ │ ├── DalvInsn.java │ │ │ │ │ │ │ ├── DalvInsnList.java │ │ │ │ │ │ │ ├── Dop.java │ │ │ │ │ │ │ ├── Dops.java │ │ │ │ │ │ │ ├── FixedSizeInsn.java │ │ │ │ │ │ │ ├── HighRegisterPrefix.java │ │ │ │ │ │ │ ├── InsnFormat.java │ │ │ │ │ │ │ ├── LocalList.java │ │ │ │ │ │ │ ├── LocalSnapshot.java │ │ │ │ │ │ │ ├── LocalStart.java │ │ │ │ │ │ │ ├── OddSpacer.java │ │ │ │ │ │ │ ├── OutputCollector.java │ │ │ │ │ │ │ ├── OutputFinisher.java │ │ │ │ │ │ │ ├── PositionList.java │ │ │ │ │ │ │ ├── RopToDop.java │ │ │ │ │ │ │ ├── RopTranslator.java │ │ │ │ │ │ │ ├── SimpleInsn.java │ │ │ │ │ │ │ ├── StdCatchBuilder.java │ │ │ │ │ │ │ ├── SwitchData.java │ │ │ │ │ │ │ ├── TargetInsn.java │ │ │ │ │ │ │ ├── VariableSizeInsn.java │ │ │ │ │ │ │ ├── ZeroSizeInsn.java │ │ │ │ │ │ │ └── form/ │ │ │ │ │ │ │ ├── Form10t.java │ │ │ │ │ │ │ ├── Form10x.java │ │ │ │ │ │ │ ├── Form11n.java │ │ │ │ │ │ │ ├── Form11x.java │ │ │ │ │ │ │ ├── Form12x.java │ │ │ │ │ │ │ ├── Form20t.java │ │ │ │ │ │ │ ├── Form21c.java │ │ │ │ │ │ │ ├── Form21h.java │ │ │ │ │ │ │ ├── Form21s.java │ │ │ │ │ │ │ ├── Form21t.java │ │ │ │ │ │ │ ├── Form22b.java │ │ │ │ │ │ │ ├── Form22c.java │ │ │ │ │ │ │ ├── Form22s.java │ │ │ │ │ │ │ ├── Form22t.java │ │ │ │ │ │ │ ├── Form22x.java │ │ │ │ │ │ │ ├── Form23x.java │ │ │ │ │ │ │ ├── Form30t.java │ │ │ │ │ │ │ ├── Form31c.java │ │ │ │ │ │ │ ├── Form31i.java │ │ │ │ │ │ │ ├── Form31t.java │ │ │ │ │ │ │ ├── Form32x.java │ │ │ │ │ │ │ ├── Form35c.java │ │ │ │ │ │ │ ├── Form3rc.java │ │ │ │ │ │ │ ├── Form51l.java │ │ │ │ │ │ │ └── SpecialFormat.java │ │ │ │ │ │ └── file/ │ │ │ │ │ │ ├── AnnotationItem.java │ │ │ │ │ │ ├── AnnotationSetItem.java │ │ │ │ │ │ ├── AnnotationSetRefItem.java │ │ │ │ │ │ ├── AnnotationUtils.java │ │ │ │ │ │ ├── AnnotationsDirectoryItem.java │ │ │ │ │ │ ├── CatchStructs.java │ │ │ │ │ │ ├── ClassDataItem.java │ │ │ │ │ │ ├── ClassDefItem.java │ │ │ │ │ │ ├── ClassDefsSection.java │ │ │ │ │ │ ├── CodeItem.java │ │ │ │ │ │ ├── DebugInfoConstants.java │ │ │ │ │ │ ├── DebugInfoDecoder.java │ │ │ │ │ │ ├── DebugInfoEncoder.java │ │ │ │ │ │ ├── DebugInfoItem.java │ │ │ │ │ │ ├── DexFile.java │ │ │ │ │ │ ├── EncodedArrayItem.java │ │ │ │ │ │ ├── EncodedField.java │ │ │ │ │ │ ├── EncodedMember.java │ │ │ │ │ │ ├── EncodedMethod.java │ │ │ │ │ │ ├── FieldAnnotationStruct.java │ │ │ │ │ │ ├── FieldIdItem.java │ │ │ │ │ │ ├── FieldIdsSection.java │ │ │ │ │ │ ├── HeaderItem.java │ │ │ │ │ │ ├── HeaderSection.java │ │ │ │ │ │ ├── IdItem.java │ │ │ │ │ │ ├── IndexedItem.java │ │ │ │ │ │ ├── Item.java │ │ │ │ │ │ ├── ItemType.java │ │ │ │ │ │ ├── MapItem.java │ │ │ │ │ │ ├── MemberIdItem.java │ │ │ │ │ │ ├── MemberIdsSection.java │ │ │ │ │ │ ├── MethodAnnotationStruct.java │ │ │ │ │ │ ├── MethodIdItem.java │ │ │ │ │ │ ├── MethodIdsSection.java │ │ │ │ │ │ ├── MixedItemSection.java │ │ │ │ │ │ ├── OffsettedItem.java │ │ │ │ │ │ ├── ParameterAnnotationStruct.java │ │ │ │ │ │ ├── ProtoIdItem.java │ │ │ │ │ │ ├── ProtoIdsSection.java │ │ │ │ │ │ ├── Section.java │ │ │ │ │ │ ├── Statistics.java │ │ │ │ │ │ ├── StringDataItem.java │ │ │ │ │ │ ├── StringIdItem.java │ │ │ │ │ │ ├── StringIdsSection.java │ │ │ │ │ │ ├── TypeIdItem.java │ │ │ │ │ │ ├── TypeIdsSection.java │ │ │ │ │ │ ├── TypeListItem.java │ │ │ │ │ │ ├── UniformItemSection.java │ │ │ │ │ │ ├── UniformListItem.java │ │ │ │ │ │ └── ValueEncoder.java │ │ │ │ │ ├── io/ │ │ │ │ │ │ ├── CodeReader.java │ │ │ │ │ │ ├── DexIndexPrinter.java │ │ │ │ │ │ ├── IndexType.java │ │ │ │ │ │ ├── OpcodeInfo.java │ │ │ │ │ │ ├── Opcodes.java │ │ │ │ │ │ └── instructions/ │ │ │ │ │ │ ├── AddressMap.java │ │ │ │ │ │ ├── BaseCodeCursor.java │ │ │ │ │ │ ├── CodeCursor.java │ │ │ │ │ │ ├── CodeInput.java │ │ │ │ │ │ ├── CodeOutput.java │ │ │ │ │ │ ├── DecodedInstruction.java │ │ │ │ │ │ ├── FillArrayDataPayloadDecodedInstruction.java │ │ │ │ │ │ ├── FiveRegisterDecodedInstruction.java │ │ │ │ │ │ ├── FourRegisterDecodedInstruction.java │ │ │ │ │ │ ├── InstructionCodec.java │ │ │ │ │ │ ├── OneRegisterDecodedInstruction.java │ │ │ │ │ │ ├── PackedSwitchPayloadDecodedInstruction.java │ │ │ │ │ │ ├── RegisterRangeDecodedInstruction.java │ │ │ │ │ │ ├── ShortArrayCodeInput.java │ │ │ │ │ │ ├── ShortArrayCodeOutput.java │ │ │ │ │ │ ├── SparseSwitchPayloadDecodedInstruction.java │ │ │ │ │ │ ├── ThreeRegisterDecodedInstruction.java │ │ │ │ │ │ ├── TwoRegisterDecodedInstruction.java │ │ │ │ │ │ └── ZeroRegisterDecodedInstruction.java │ │ │ │ │ ├── merge/ │ │ │ │ │ │ ├── CollisionPolicy.java │ │ │ │ │ │ ├── DexMerger.java │ │ │ │ │ │ ├── IndexMap.java │ │ │ │ │ │ ├── InstructionTransformer.java │ │ │ │ │ │ └── SortableType.java │ │ │ │ │ ├── rop/ │ │ │ │ │ │ ├── annotation/ │ │ │ │ │ │ │ ├── Annotation.java │ │ │ │ │ │ │ ├── AnnotationVisibility.java │ │ │ │ │ │ │ ├── Annotations.java │ │ │ │ │ │ │ ├── AnnotationsList.java │ │ │ │ │ │ │ └── NameValuePair.java │ │ │ │ │ │ ├── code/ │ │ │ │ │ │ │ ├── AccessFlags.java │ │ │ │ │ │ │ ├── BasicBlock.java │ │ │ │ │ │ │ ├── BasicBlockList.java │ │ │ │ │ │ │ ├── ConservativeTranslationAdvice.java │ │ │ │ │ │ │ ├── CstInsn.java │ │ │ │ │ │ │ ├── DexTranslationAdvice.java │ │ │ │ │ │ │ ├── Exceptions.java │ │ │ │ │ │ │ ├── FillArrayDataInsn.java │ │ │ │ │ │ │ ├── Insn.java │ │ │ │ │ │ │ ├── InsnList.java │ │ │ │ │ │ │ ├── LocalItem.java │ │ │ │ │ │ │ ├── LocalVariableExtractor.java │ │ │ │ │ │ │ ├── LocalVariableInfo.java │ │ │ │ │ │ │ ├── PlainCstInsn.java │ │ │ │ │ │ │ ├── PlainInsn.java │ │ │ │ │ │ │ ├── RegOps.java │ │ │ │ │ │ │ ├── RegisterSpec.java │ │ │ │ │ │ │ ├── RegisterSpecList.java │ │ │ │ │ │ │ ├── RegisterSpecSet.java │ │ │ │ │ │ │ ├── Rop.java │ │ │ │ │ │ │ ├── RopMethod.java │ │ │ │ │ │ │ ├── Rops.java │ │ │ │ │ │ │ ├── SourcePosition.java │ │ │ │ │ │ │ ├── SwitchInsn.java │ │ │ │ │ │ │ ├── ThrowingCstInsn.java │ │ │ │ │ │ │ ├── ThrowingInsn.java │ │ │ │ │ │ │ ├── TranslationAdvice.java │ │ │ │ │ │ │ └── package.html │ │ │ │ │ │ ├── cst/ │ │ │ │ │ │ │ ├── Constant.java │ │ │ │ │ │ │ ├── ConstantPool.java │ │ │ │ │ │ │ ├── CstAnnotation.java │ │ │ │ │ │ │ ├── CstArray.java │ │ │ │ │ │ │ ├── CstBaseMethodRef.java │ │ │ │ │ │ │ ├── CstBoolean.java │ │ │ │ │ │ │ ├── CstByte.java │ │ │ │ │ │ │ ├── CstChar.java │ │ │ │ │ │ │ ├── CstDouble.java │ │ │ │ │ │ │ ├── CstEnumRef.java │ │ │ │ │ │ │ ├── CstFieldRef.java │ │ │ │ │ │ │ ├── CstFloat.java │ │ │ │ │ │ │ ├── CstInteger.java │ │ │ │ │ │ │ ├── CstInterfaceMethodRef.java │ │ │ │ │ │ │ ├── CstKnownNull.java │ │ │ │ │ │ │ ├── CstLiteral32.java │ │ │ │ │ │ │ ├── CstLiteral64.java │ │ │ │ │ │ │ ├── CstLiteralBits.java │ │ │ │ │ │ │ ├── CstLong.java │ │ │ │ │ │ │ ├── CstMemberRef.java │ │ │ │ │ │ │ ├── CstMethodRef.java │ │ │ │ │ │ │ ├── CstNat.java │ │ │ │ │ │ │ ├── CstShort.java │ │ │ │ │ │ │ ├── CstString.java │ │ │ │ │ │ │ ├── CstType.java │ │ │ │ │ │ │ ├── StdConstantPool.java │ │ │ │ │ │ │ ├── TypedConstant.java │ │ │ │ │ │ │ ├── Zeroes.java │ │ │ │ │ │ │ └── package.html │ │ │ │ │ │ ├── package-info.java │ │ │ │ │ │ └── type/ │ │ │ │ │ │ ├── Prototype.java │ │ │ │ │ │ ├── StdTypeList.java │ │ │ │ │ │ ├── Type.java │ │ │ │ │ │ ├── TypeBearer.java │ │ │ │ │ │ ├── TypeList.java │ │ │ │ │ │ └── package.html │ │ │ │ │ ├── ssa/ │ │ │ │ │ │ ├── BasicRegisterMapper.java │ │ │ │ │ │ ├── ConstCollector.java │ │ │ │ │ │ ├── DeadCodeRemover.java │ │ │ │ │ │ ├── DomFront.java │ │ │ │ │ │ ├── Dominators.java │ │ │ │ │ │ ├── EscapeAnalysis.java │ │ │ │ │ │ ├── InterferenceRegisterMapper.java │ │ │ │ │ │ ├── LiteralOpUpgrader.java │ │ │ │ │ │ ├── LocalVariableExtractor.java │ │ │ │ │ │ ├── LocalVariableInfo.java │ │ │ │ │ │ ├── MoveParamCombiner.java │ │ │ │ │ │ ├── NormalSsaInsn.java │ │ │ │ │ │ ├── Optimizer.java │ │ │ │ │ │ ├── PhiInsn.java │ │ │ │ │ │ ├── PhiTypeResolver.java │ │ │ │ │ │ ├── RegisterMapper.java │ │ │ │ │ │ ├── SCCP.java │ │ │ │ │ │ ├── SetFactory.java │ │ │ │ │ │ ├── SsaBasicBlock.java │ │ │ │ │ │ ├── SsaConverter.java │ │ │ │ │ │ ├── SsaInsn.java │ │ │ │ │ │ ├── SsaMethod.java │ │ │ │ │ │ ├── SsaRenamer.java │ │ │ │ │ │ ├── back/ │ │ │ │ │ │ │ ├── FirstFitAllocator.java │ │ │ │ │ │ │ ├── FirstFitLocalCombiningAllocator.java │ │ │ │ │ │ │ ├── IdenticalBlockCombiner.java │ │ │ │ │ │ │ ├── InterferenceGraph.java │ │ │ │ │ │ │ ├── LivenessAnalyzer.java │ │ │ │ │ │ │ ├── NullRegisterAllocator.java │ │ │ │ │ │ │ ├── RegisterAllocator.java │ │ │ │ │ │ │ └── SsaToRop.java │ │ │ │ │ │ └── package-info.java │ │ │ │ │ └── util/ │ │ │ │ │ ├── AnnotatedOutput.java │ │ │ │ │ ├── BitIntSet.java │ │ │ │ │ ├── Bits.java │ │ │ │ │ ├── ByteArray.java │ │ │ │ │ ├── ByteArrayAnnotatedOutput.java │ │ │ │ │ ├── FixedSizeList.java │ │ │ │ │ ├── Hex.java │ │ │ │ │ ├── HexParser.java │ │ │ │ │ ├── IndentingWriter.java │ │ │ │ │ ├── IntIterator.java │ │ │ │ │ ├── IntList.java │ │ │ │ │ ├── IntSet.java │ │ │ │ │ ├── LabeledItem.java │ │ │ │ │ ├── LabeledList.java │ │ │ │ │ ├── ListIntSet.java │ │ │ │ │ ├── MutabilityControl.java │ │ │ │ │ ├── MutabilityException.java │ │ │ │ │ ├── Output.java │ │ │ │ │ ├── ToHuman.java │ │ │ │ │ ├── TwoColumnOutput.java │ │ │ │ │ ├── Warning.java │ │ │ │ │ ├── Writers.java │ │ │ │ │ └── package.html │ │ │ │ ├── filter/ │ │ │ │ │ ├── AbstractDexFilter.java │ │ │ │ │ ├── DexDiffFilter.java │ │ │ │ │ └── Filter.java │ │ │ │ ├── inputs/ │ │ │ │ │ ├── ApatchInput.java │ │ │ │ │ ├── BaseInput.java │ │ │ │ │ ├── DexPatchInput.java │ │ │ │ │ ├── HotPatchInput.java │ │ │ │ │ └── TpatchInput.java │ │ │ │ ├── multidex/ │ │ │ │ │ ├── ArchivePathElement.java │ │ │ │ │ ├── ClassPathElement.java │ │ │ │ │ ├── ClassReferenceListBuilder.java │ │ │ │ │ ├── FolderPathElement.java │ │ │ │ │ ├── MainDexListBuilder.java │ │ │ │ │ └── Path.java │ │ │ │ ├── object/ │ │ │ │ │ ├── ApkFileList.java │ │ │ │ │ ├── ArtifactBundleInfo.java │ │ │ │ │ ├── BuildPatchInfos.java │ │ │ │ │ ├── ClassDiffInfo.java │ │ │ │ │ ├── DexDiffInfo.java │ │ │ │ │ ├── DiffType.java │ │ │ │ │ ├── FieldDiffInfo.java │ │ │ │ │ ├── FieldObject.java │ │ │ │ │ ├── MethodDiffInfo.java │ │ │ │ │ ├── MethodDiffInfoObject.java │ │ │ │ │ ├── MethodObject.java │ │ │ │ │ ├── PatchBundleInfo.java │ │ │ │ │ ├── PatchInfo.java │ │ │ │ │ └── SoFileDef.java │ │ │ │ ├── outputs/ │ │ │ │ │ ├── APatchFile.java │ │ │ │ │ ├── DexPatchFile.java │ │ │ │ │ ├── PatchFile.java │ │ │ │ │ └── TpatchFile.java │ │ │ │ ├── reader/ │ │ │ │ │ ├── AtlasFrameworkPropertiesReader.java │ │ │ │ │ ├── BundleListing.java │ │ │ │ │ ├── BundleListingUtil.java │ │ │ │ │ ├── ClassReader.java │ │ │ │ │ ├── DexReader.java │ │ │ │ │ ├── FieldReader.java │ │ │ │ │ ├── MethodReader.java │ │ │ │ │ └── Reader.java │ │ │ │ ├── repatch/ │ │ │ │ │ ├── AbIClassDef.java │ │ │ │ │ ├── ClassReIClassDef.java │ │ │ │ │ ├── FastPatchObject.java │ │ │ │ │ ├── IClassDef.java │ │ │ │ │ ├── InsTructionsReIClassDef.java │ │ │ │ │ ├── MethodImplReIClassDef.java │ │ │ │ │ ├── MethodReIClassDef.java │ │ │ │ │ ├── Utils/ │ │ │ │ │ │ └── DefineUtils.java │ │ │ │ │ ├── mapping/ │ │ │ │ │ │ ├── MappingProcessor.java │ │ │ │ │ │ ├── MappingProcessorImpl.java │ │ │ │ │ │ └── MappingReader.java │ │ │ │ │ └── processor/ │ │ │ │ │ ├── ClassProcessor.java │ │ │ │ │ └── MappingClassProcessor.java │ │ │ │ ├── smali/ │ │ │ │ │ ├── AfBakSmali.java │ │ │ │ │ ├── BakSmali.java │ │ │ │ │ └── SmaliMod.java │ │ │ │ ├── task/ │ │ │ │ │ └── ExecutorServicesHelper.java │ │ │ │ ├── tools/ │ │ │ │ │ ├── APatchTool.java │ │ │ │ │ ├── AbstractTool.java │ │ │ │ │ ├── DexObfuscatedTool.java │ │ │ │ │ ├── DexPatchDexTool.java │ │ │ │ │ ├── DexPatchTool.java │ │ │ │ │ ├── FastPatchTool.java │ │ │ │ │ ├── HotDexPatchDexTool.java │ │ │ │ │ ├── HotPatchTool.java │ │ │ │ │ ├── PatchDexTool.java │ │ │ │ │ ├── PatchFieldTool.java │ │ │ │ │ ├── PatchMethodTool.java │ │ │ │ │ ├── TPatchTool.java │ │ │ │ │ └── TpatchDexTool.java │ │ │ │ ├── tpatch/ │ │ │ │ │ ├── builder/ │ │ │ │ │ │ └── PatchFileBuilder.java │ │ │ │ │ ├── manifest/ │ │ │ │ │ │ ├── AXMLPrint.java │ │ │ │ │ │ ├── AndroidManifestDiffFactory.java │ │ │ │ │ │ └── Manifest.java │ │ │ │ │ ├── model/ │ │ │ │ │ │ ├── ApkBO.java │ │ │ │ │ │ ├── BundleBO.java │ │ │ │ │ │ └── PatchFile.java │ │ │ │ │ └── utils/ │ │ │ │ │ ├── DexBuilderUtils.java │ │ │ │ │ ├── FileLock.java │ │ │ │ │ ├── HttpClientUtils.java │ │ │ │ │ ├── JarSplitUtils.java │ │ │ │ │ ├── MD5Util.java │ │ │ │ │ ├── PatchUtils.java │ │ │ │ │ ├── PathUtils.java │ │ │ │ │ └── SmaliUtils.java │ │ │ │ ├── transform/ │ │ │ │ │ └── DexTransform.java │ │ │ │ └── utils/ │ │ │ │ ├── CommandUtils.java │ │ │ │ ├── DexCompareUtils.java │ │ │ │ ├── PathMatcher.java │ │ │ │ ├── Profiler.java │ │ │ │ ├── SmaliCodeUtils.java │ │ │ │ ├── SoDiffUtils.java │ │ │ │ ├── SystemUtils.java │ │ │ │ └── ZipUtils.java │ │ │ ├── checker/ │ │ │ │ ├── Checker.java │ │ │ │ └── PatchChecker.java │ │ │ ├── update/ │ │ │ │ └── UpdateInfo.java │ │ │ └── utils/ │ │ │ └── SparseIntArray.java │ │ └── resources/ │ │ ├── linux/ │ │ │ ├── bsdiff │ │ │ └── bspatch │ │ └── mac/ │ │ ├── bsdiff │ │ └── bspatch │ ├── gradle/ │ │ └── wrapper/ │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties │ ├── gradle.properties │ ├── gradlew │ ├── gradlew.bat │ ├── publish_bintray.gradle │ ├── publish_mvn.gradle │ └── settings.gradle └── atlas-update/ ├── README.md ├── README.zh-cn.md ├── build.gradle ├── gradle/ │ └── wrapper/ │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradle.properties ├── gradlew ├── settings.gradle └── src/ └── main/ ├── AndroidManifest.xml └── java/ └── com/ └── taobao/ ├── MainThreadDisposable.java ├── atlas/ │ ├── dex/ │ │ ├── Annotation.java │ │ ├── ClassData.java │ │ ├── ClassDef.java │ │ ├── Code.java │ │ ├── Dex.java │ │ ├── DexException2.java │ │ ├── DexFormat.java │ │ ├── DexIndexOverflowException.java │ │ ├── EncodedValue.java │ │ ├── EncodedValueCodec.java │ │ ├── EncodedValueReader.java │ │ ├── FieldId.java │ │ ├── Leb128.java │ │ ├── MethodId.java │ │ ├── Mutf8.java │ │ ├── ProtoId.java │ │ ├── SizeOf.java │ │ ├── TableOfContents.java │ │ ├── TypeList.java │ │ └── util/ │ │ ├── AnnotatedOutput.java │ │ ├── ByteArrayByteInput.java │ │ ├── ByteInput.java │ │ ├── ByteOutput.java │ │ ├── ExceptionWithContext.java │ │ ├── FileUtils.java │ │ ├── Iterators.java │ │ ├── NaturalOrdering.java │ │ ├── PeekingIterator.java │ │ └── Unsigned.java │ ├── dexmerge/ │ │ ├── DexMergeClient.java │ │ ├── DexMergeService.java │ │ ├── IDexMergeBinder.java │ │ ├── IDexMergeCallback.java │ │ ├── MergeCallback.java │ │ ├── MergeConstants.java │ │ ├── MergeException.java │ │ ├── MergeExcutorServices.java │ │ ├── MergeObject.java │ │ ├── MergeTool.java │ │ ├── PatchVersionReceiver.java │ │ └── dx/ │ │ ├── io/ │ │ │ ├── CodeReader.java │ │ │ ├── DexIndexPrinter.java │ │ │ ├── IndexType.java │ │ │ ├── OpcodeInfo.java │ │ │ ├── Opcodes.java │ │ │ └── instructions/ │ │ │ ├── AddressMap.java │ │ │ ├── BaseCodeCursor.java │ │ │ ├── CodeCursor.java │ │ │ ├── CodeInput.java │ │ │ ├── CodeOutput.java │ │ │ ├── DecodedInstruction.java │ │ │ ├── FillArrayDataPayloadDecodedInstruction.java │ │ │ ├── FiveRegisterDecodedInstruction.java │ │ │ ├── FourRegisterDecodedInstruction.java │ │ │ ├── InstructionCodec.java │ │ │ ├── OneRegisterDecodedInstruction.java │ │ │ ├── PackedSwitchPayloadDecodedInstruction.java │ │ │ ├── RegisterRangeDecodedInstruction.java │ │ │ ├── ShortArrayCodeInput.java │ │ │ ├── ShortArrayCodeOutput.java │ │ │ ├── SparseSwitchPayloadDecodedInstruction.java │ │ │ ├── ThreeRegisterDecodedInstruction.java │ │ │ ├── TwoRegisterDecodedInstruction.java │ │ │ └── ZeroRegisterDecodedInstruction.java │ │ ├── merge/ │ │ │ ├── CollisionPolicy.java │ │ │ ├── DexMerger.java │ │ │ ├── DexSectionItem.java │ │ │ ├── DexTransform.java │ │ │ ├── IndexMap.java │ │ │ ├── InstructionTransformer.java │ │ │ └── SortableType.java │ │ └── util/ │ │ ├── AnnotatedOutput.java │ │ ├── BitIntSet.java │ │ ├── Bits.java │ │ ├── ByteArray.java │ │ ├── ByteArrayAnnotatedOutput.java │ │ ├── FixedSizeList.java │ │ ├── Hex.java │ │ ├── HexParser.java │ │ ├── IndentingWriter.java │ │ ├── IntIterator.java │ │ ├── IntList.java │ │ ├── IntSet.java │ │ ├── LabeledItem.java │ │ ├── LabeledList.java │ │ ├── ListIntSet.java │ │ ├── MutabilityControl.java │ │ ├── MutabilityException.java │ │ ├── Output.java │ │ ├── ToHuman.java │ │ ├── TwoColumnOutput.java │ │ ├── Warning.java │ │ └── Writers.java │ └── update/ │ ├── AtlasUpdater.java │ ├── AwoPatchReceiver.java │ ├── DexPatchUpdater.java │ ├── UpdateBundleDivider.java │ ├── exception/ │ │ └── MergeException.java │ ├── model/ │ │ └── UpdateInfo.java │ └── util/ │ ├── PatchCleaner.java │ ├── PatchInstaller.java │ ├── PatchMerger.java │ └── ZipUtils.java ├── plugins/ │ └── RxAndroidPlugins.java ├── schedulers/ │ ├── AndroidSchedulers.java │ └── HandlerScheduler.java └── utils/ └── SparseIntArray.java ================================================ FILE CONTENTS ================================================ ================================================ FILE: .github/ISSUE_TEMPLATE.md ================================================ 请按照下面的规则提交您的issue,符合标准的issue会被优先处理, 请先查看有没有同类型的issue已经存在. 1. demo问题的issue格式: [demo]:title title尽量反应问题的状况,如果是编译问题或者无法运行,正文写明是windows还是mac,如果是不清楚如何使用demo,请先查看https://github.com/alibaba/atlas/blob/master/atlas-demo/README.zh_cn.md 2. 容器功能接入或者如何使用的答疑:[use]:title 3. 提新需求的格式:[feature]:title ================================================ FILE: .gitignore ================================================ *.iml .gradle .idea/ /local.properties /.idea/workspace.xml /.idea/libraries !.idea/codeStyleSettings.xml .DS_Store #/build /captures .vscode/ # Taken from Android.gitignore https://github.com/github/gitignore/blob/master/Android.gitignore # # Built application files *.apk *.ap_ # Files for the Dalvik VM *.dex # Java class files *.class # Generated files bin/ gen/ out/ # Gradle files .gradle/ #build/ !**/atlas-aapt/**/build/ !**/src/**/build/ # Local configuration file (sdk path, etc) local.properties # Proguard folder generated by Eclipse #proguard/ !**/src/**/proguard/ # Log Files *.log # Android Studio Navigation editor temp files .navigation/ # Android Studio captures folder captures/ # Intellij *.iml atlas-demo/AtlasDemo/hisTpatch/ ================================================ FILE: .gitmodules ================================================ [submodule "atlas-aapt/build"] path = atlas-aapt/build url = https://android.googlesource.com/platform/build [submodule "atlas-aapt/prebuilts/clang/darwin-x86/host/3.6"] path = atlas-aapt/prebuilts/clang/darwin-x86/host/3.6 url = https://android.googlesource.com/platform/prebuilts/clang/darwin-x86/host/3.6 [submodule "atlas-aapt/prebuilts/clang/host/darwin-x86"] path = atlas-aapt/prebuilts/clang/host/darwin-x86 url = https://android.googlesource.com/platform/prebuilts/clang/host/darwin-x86 ================================================ FILE: CONTRIBUTING.md ================================================ # Atlas Contributing Guide Welcome to create [Pull Requests](https://github.com/alibaba/atlas/compare) or open [Issues](https://github.com/alibaba/atlas/issues/new) for bugfix, doc, example, suggestion and anything. ## Branch Management ``` master ↑ dev <--- PR(hotfix/typo/3rd-PR) ↑ PR {domain}-feature-{date} ``` Atlas Branches 0. `master` branch 0. `master` is the latest (pre-)release branch. 0. `dev` branch 0. `dev` is the stable developing branch. [Github Release](https://help.github.com/articles/creating-releases/) is used to publish a (pre-)release version to `master` branch. 0. ***It's RECOMMENDED to commit hotfix (like typo) or feature PR to `dev`***. 0. `{domain}-feature-{date}` branch 0. The branch for a developing iteration, e.g. `core-feature-20170118` is an atlas-core developing iteration which is done at 2017.01.18. `{domain}` consists of `core`, `update`, `plugin` and `aapt`. 0. **DO NOT commit any PR to such a branch**. ### Branch Name ``` {module}-{action}-{shortName} ``` * `{module}`, see [commit log module](#commit-log) * `{action}` * `feature`: checkout from `{module}` and merge to `{module}` later. If `{module}` not exists, merge to `dev` * `bugfix`: like `feature`, for bugfix only * `hotfix`: checkout from `master` or release `tag`, merge to `master` and `{module}` later. If `{module}` not exists, merge to `dev` for example: * `core-bugfix-memory` * `plugin-feature-redex` * `update-hotfix-sequence` ## Commit Log ``` [{module}] {description} ``` * `{module}` * Including: atlas-core, atlas-aapt, atlas-update, atlas-gradle-plugin, atlas-doc, atlas-website, atlas-demo, test, all * `{description}` * It's ***RECOMMENDED*** to close issue with syntax `close #66` or `fix #66`, see [the doc](https://help.github.com/articles/closing-issues-via-commit-messages/) for more detail. It's useful for responding issues. for example: * `[all] close #66, add refreshing for memory` * `[atlas-doc] fix #68, update some instruction` * `[atlas-demo] remove abc` ## Pull Request [Create Pull Requests](https://github.com/alibaba/atlas/compare). ## Contributor License Agreement In order to contribute code to Atlas, you (or the legal entity you represent) must sign the Contributor License Agreement (CLA). You can read and sign the [Alibaba CLA](https://cla-assistant.io/alibaba/atlas) online. For CLA assistant service works properly, please make sure you have added email address that your commits linked to GitHub account. Please read [How to setting your Email address in Git](https://help.github.com/articles/setting-your-email-in-git/) and [How to adding an email address to your GitHub Account](https://help.github.com/articles/adding-an-email-address-to-your-github-account/). ================================================ FILE: LICENSE ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright {yyyy} {name of copyright owner} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: NOTICE ================================================ Atlas-Framework Copyright 2016 Alibaba Group This product includes software developed at Alibaba Group. (http://www.alibabagroup.com). This product modifed software aapt(https://android.googlesource.com/platform/frameworks/base/+/master/tools/aapt/) developed by The Android Open Source Project (http://source.android.com). This product modifed software Android Gradle Build System(https://android.googlesource.com/platform/tools/base/+/gradle-dev/build-system/) developed by The Android Open Source Project (http://source.android.com). ================================================ FILE: README.md ================================================ # Atlas [![license](http://img.shields.io/badge/license-Apache2.0-brightgreen.svg?style=flat)](https://github.com/alibaba/atlas/blob/master/LICENSE) [![Release Version](https://img.shields.io/badge/atlas__core-5.1.0.9--rc26-orange.svg)](https://github.com/alibaba/atlas/releases/tag/v5.1.0.9-rc26) [![Release Version](https://img.shields.io/badge/atlasplugin-3.0.1--rc88-green.svg)](https://github.com/alibaba/atlas/releases/tag/v5.1.0.9-rc26) > A powerful Android Dynamic Component Framework. Atlas is an Android client-side containerization framework. we call it android dynamic component framework. Atlas provides decoupled, component, and dynamic support. Atlas covers various issues in the project coding period, Apk run-time and follow-up operation and maintenance. In the project period, Atlas enable engineers independent development, independent debug, because their project were physical isolation. In the apk run-time, Atlas has complete component life cycle, class isolation and other mechanisms. In the operation and maintenance period, Atlas provide rapid incremental update and rapid upgrade capacity. Atlas put the work into the project period as much as possible, to ensure runtime simple and stable, maintenance easy. ------ Compared with multidex solution, Atlas not only solved the limitation of the method count(65535), but also clarified the boundary of development, provied the powerful capabilities for Android development, such as Parallel Iteration, Rapid Development, Flexible Release, Dynamically Update, Quick Fix Online Failure. Unlike some Android plugin frameworks, Atlas is a component framework (we call it Bundle), Atlas is not a multi-process framework. ------ You can see there were three main library in this project ([atlas-core](./atlas-core)/[atlas-update](./atlas-update)/[atlas-gradle-plugin](./atlas-gradle-plugin)) * [atlas-core](./atlas-core): This is client-side core library, it's job is to install each bundle, load the classes and resources on-demand when runtime. * [atlas-update](./atlas-update): This is client-side update library, which provide dexmerge capacity for update or upgrade. * [atlas-gradle-plugin](./atlas-gradle-plugin): This is Android Studio Gradle Plugin for engineers developing in project period, because we change some android default package mechanisms, include android aapt [atlas-aapt](./atlas-aapt). ## Use Atlas * [Demo](./atlas-demo) * Doc: [English](), [中文](./atlas-docs) * DingTalk im group: Scan the follow QR code or Search group 11727755 using DingTalk(钉钉) app. ![dingtalk.jpg](assets/dingtalk.jpg) ## Support ---------- Atlas support all Android version from Android 4.0 to 9.0. Follow is support status. Runtime | Android Version | Support ------ | --------------- | -------- Dalvik | 2.2 | Not Test Dalvik | 2.3 | Not Test Dalvik | 3.0 | Not Test Dalvik | 4.0-4.4 | Yes ART | 5.0 | Yes ART | 5.1 | Yes ART | M | Yes ART | N | Yes ART | 8.0 | Yes ART | 9.0 | Yes ================================================ FILE: _config.yml ================================================ theme: jekyll-theme-cayman ================================================ FILE: atlas-aapt/.gitignore ================================================ .idea/ .ccache/ out/ out-x86_64/ out-x86/ ShakaAaptBin/ ================================================ FILE: atlas-aapt/CMakeLists.txt ================================================ cmake_minimum_required(VERSION 3.3) project(ShakaAapt) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") set(AAPTROOT frameworks/base/tools/aapt) set(aaptMain ${AAPTROOT}/Main.cpp) set(aaptSources ${AAPTROOT}/AaptAssets.cpp ${AAPTROOT}/AaptConfig.cpp ${AAPTROOT}/AaptUtil.cpp ${AAPTROOT}/AaptXml.cpp ${AAPTROOT}/ApkBuilder.cpp ${AAPTROOT}/Command.cpp ${AAPTROOT}/CrunchCache.cpp ${AAPTROOT}/FileFinder.cpp ${AAPTROOT}/Images.cpp ${AAPTROOT}/Package.cpp ${AAPTROOT}/pseudolocalize.cpp ${AAPTROOT}/Resource.cpp ${AAPTROOT}/ResourceFilter.cpp ${AAPTROOT}/ResourceIdCache.cpp ${AAPTROOT}/ResourceTable.cpp ${AAPTROOT}/SourcePos.cpp ${AAPTROOT}/StringPool.cpp ${AAPTROOT}/WorkQueue.cpp ${AAPTROOT}/XMLNode.cpp ${AAPTROOT}/ZipEntry.cpp ${AAPTROOT}/ZipFile.cpp ) set(LIB_androidfw_ROOT frameworks/base/libs/androidfw) set(LIB_androidfw_commonSources ${LIB_androidfw_ROOT}/Asset.cpp ${LIB_androidfw_ROOT}/AssetDir.cpp ${LIB_androidfw_ROOT}/AssetManager.cpp ${LIB_androidfw_ROOT}/misc.cpp ${LIB_androidfw_ROOT}/ObbFile.cpp ${LIB_androidfw_ROOT}/ResourceTypes.cpp ${LIB_androidfw_ROOT}/StreamingZipInflater.cpp ${LIB_androidfw_ROOT}/TypeWrappers.cpp ${LIB_androidfw_ROOT}/ZipFileRO.cpp ${LIB_androidfw_ROOT}/ZipUtils.cpp) set(LIB_LIBUTILS system/core/libutils) set(LIB_LIBUTILS_commonSources ${LIB_LIBUTILS}/BlobCache.cpp ${LIB_LIBUTILS}/CallStack.cpp ${LIB_LIBUTILS}/FileMap.cpp ${LIB_LIBUTILS}/JenkinsHash.cpp ${LIB_LIBUTILS}/LinearTransform.cpp ${LIB_LIBUTILS}/Log.cpp ${LIB_LIBUTILS}/NativeHandle.cpp ${LIB_LIBUTILS}/Printer.cpp ${LIB_LIBUTILS}/ProcessCallStack.cpp ${LIB_LIBUTILS}/PropertyMap.cpp ${LIB_LIBUTILS}/RefBase.cpp ${LIB_LIBUTILS}/SharedBuffer.cpp ${LIB_LIBUTILS}/Static.cpp ${LIB_LIBUTILS}/StopWatch.cpp ${LIB_LIBUTILS}/String8.cpp ${LIB_LIBUTILS}/String16.cpp ${LIB_LIBUTILS}/SystemClock.cpp ${LIB_LIBUTILS}/Threads.cpp ${LIB_LIBUTILS}/Timers.cpp ${LIB_LIBUTILS}/Tokenizer.cpp ${LIB_LIBUTILS}/Unicode.cpp ${LIB_LIBUTILS}/VectorImpl.cpp ${LIB_LIBUTILS}/misc.cpp ) set(LIB_EXPAT external/expat) set(LIB_EXPAT_commonSources ${LIB_EXPAT}/lib/xmlparse.c ${LIB_EXPAT}/lib/xmlrole.c ${LIB_EXPAT}/lib/xmltok.c ${LIB_EXPAT}/lib/xmltok_impl.c ${LIB_EXPAT}/lib/xmltok_ns.c ) set(SOURCE_FILES ${SOURCE_FILES} ${aaptMain} ${aaptSources} ${LIB_androidfw_commonSources} ${LIB_LIBUTILS_commonSources} ${LIB_EXPAT_commonSources} ) include_directories(${AAPTROOT}) include_directories(frameworks/base/include external/safe-iop/include system/core/include external/zlib external/expat/lib ) add_definitions(-DXML_TOK_IMPL_C) add_executable(ShakaAapt ${SOURCE_FILES}) ================================================ FILE: atlas-aapt/Makefile ================================================ ### DO NOT EDIT THIS FILE ### include build/core/main.mk ### DO NOT EDIT THIS FILE ### ================================================ FILE: atlas-aapt/README.md ================================================ # atlas-aapt This project base on [ShakaAapt](https://github.com/rover12421/ShakaAapt),which strip the necessary aapt code from AOSP android-7.0.0_r6 branch. ## Compile Env Please refer to AOSP ## atlas-aapt atlas-aapt expand follow options base on AOSP aapt: 1. --customized-package-id: generally aapt typed package resource id is 0x7f, this is the application bundle package-id of resources. Use this option to specify the resource package-id for other values, but must be less than or equal to 0x7f. (example: - customized package - id 126). 2. --use-skt-package-name: generally a package reference another package of resources, resources must be combined with the package name for reference, such as a reference when android resource must be combined with '@ android:' for reference. Use this option, can eliminate the process of writing a package name, find resources directly. The name of this package is usually the main atlas package name. 3. -B: used for dynamic deployment of resources, if you want to hit this package based on the a package of resources patch package, so use this option to specify the basic package. ================================================ FILE: atlas-aapt/README.zh-cn.md ================================================ ## atlas-aapt 此项目基于[ShakaAapt](https://github.com/rover12421/ShakaAapt),该项目抽离了AOSP——android-7.0.0_r6中编译aapt的必要代码。 ## 编译环境 具体参考AOSP编译官方文档 ## atlas-aapt提供的功能 atlas-aapt在官方aapt的基础上添加了以下扩展选项: 1. --customized-package-id:一般aapt打出来包的资源id都是以7f开头,这个就是应用包资源的package-id。使用这个选项可以指定资源的package-id为其他数值,但是必须小于等于7f。(示例:--customized-package-id 126)。 2. --use-skt-package-name:一般一个包引用另一个包的资源的时候,都必须加上资源的包名来进行引用,比如引用android的资源的时候必须加上`@android:`来进行引用。使用这个选项,可以省去写包名的过程,直接找到资源。这个包的名字通常是atlas中主包的包名。 3. -B:资源动态部署用,如果你想基于一个包来打出这个包的资源patch包,那么使用该选项来指定基础包。 ================================================ FILE: atlas-aapt/UpdateAndroidSource.sh ================================================ #! /bin/bash SRCROOT=/Develop/android/source/android-last DESROOT=. array=( \ bionic/libc/include \ external/compiler-rt \ external/expat \ external/libcxx \ external/libcxxabi \ external/libpng \ external/safe-iop \ external/zlib \ frameworks/base/include \ frameworks/base/libs/androidfw \ frameworks/base/tools/aapt \ frameworks/native/include \ libnativehelper \ prebuilts/clang/darwin-x86 \ prebuilts/clang/host \ prebuilts/gcc \ sdk/build \ system/core/base \ system/core/include \ system/core/libcutils \ system/core/liblog \ system/core/libutils \ system/core/libziparchive \ ) for var in ${array[@]};do rsync -aP --delete $SRCROOT/$var/ $DESROOT/$var/ \ --exclude .git \ --exclude test \ --exclude tests \ --exclude testdata \ --exclude examples \ --exclude doc \ --exclude www \ --exclude unittests \ --exclude common \ --exclude linux-x86/mips \ --exclude linux-x86/arm \ --exclude linux-x86/aarch64 \ --exclude linux-x86/x86 \ --exclude linux-x86/host/x86_64-linux-glibc2.11-4.8 \ --exclude linux-x86/host/x86_64-w64-mingw32-4.8 \ --exclude darwin-x86/mips \ --exclude darwin-x86/arm \ --exclude darwin-x86/aarch64 \ --exclude darwin-x86/x86 done ================================================ FILE: atlas-aapt/bionic/libc/include/alloca.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _ALLOCA_H #define _ALLOCA_H #define alloca(size) __builtin_alloca(size) #endif /* _ALLOCA_H */ ================================================ FILE: atlas-aapt/bionic/libc/include/android/api-level.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef ANDROID_API_LEVEL_H #define ANDROID_API_LEVEL_H /* * Magic version number for a current development build, which has * not yet turned into an official release. */ #define __ANDROID_API__ 10000 #endif /* ANDROID_API_LEVEL_H */ ================================================ FILE: atlas-aapt/bionic/libc/include/android/dlext.h ================================================ /* * Copyright (C) 2014 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __ANDROID_DLEXT_H__ #define __ANDROID_DLEXT_H__ #include #include #include #include /* for off64_t */ __BEGIN_DECLS /* bitfield definitions for android_dlextinfo.flags */ enum { /* When set, the reserved_addr and reserved_size fields must point to an * already-reserved region of address space which will be used to load the * library if it fits. If the reserved region is not large enough, the load * will fail. */ ANDROID_DLEXT_RESERVED_ADDRESS = 0x1, /* As DLEXT_RESERVED_ADDRESS, but if the reserved region is not large enough, * the linker will choose an available address instead. */ ANDROID_DLEXT_RESERVED_ADDRESS_HINT = 0x2, /* When set, write the GNU RELRO section of the mapped library to relro_fd * after relocation has been performed, to allow it to be reused by another * process loading the same library at the same address. This implies * ANDROID_DLEXT_USE_RELRO. */ ANDROID_DLEXT_WRITE_RELRO = 0x4, /* When set, compare the GNU RELRO section of the mapped library to relro_fd * after relocation has been performed, and replace any relocated pages that * are identical with a version mapped from the file. */ ANDROID_DLEXT_USE_RELRO = 0x8, /* Instruct dlopen to use library_fd instead of opening file by name. * The filename parameter is still used to identify the library. */ ANDROID_DLEXT_USE_LIBRARY_FD = 0x10, /* If opening a library using library_fd read it starting at library_fd_offset. * This flag is only valid when ANDROID_DLEXT_USE_LIBRARY_FD is set. */ ANDROID_DLEXT_USE_LIBRARY_FD_OFFSET = 0x20, /* When set, do not check if the library has already been loaded by file stat(2)s. * * This flag allows forced loading of the library in the case when for some * reason multiple ELF files share the same filename (because the already-loaded * library has been removed and overwritten, for example). * * Note that if the library has the same dt_soname as an old one and some other * library has the soname in DT_NEEDED list, the first one will be used to resolve any * dependencies. */ ANDROID_DLEXT_FORCE_LOAD = 0x40, /* When set, if the minimum p_vaddr of the ELF file's PT_LOAD segments is non-zero, * the dynamic linker will load it at that address. * * This flag is for ART internal use only. */ ANDROID_DLEXT_FORCE_FIXED_VADDR = 0x80, /* Instructs dlopen to load the library at the address specified by reserved_addr. * * The difference between ANDROID_DLEXT_LOAD_AT_FIXED_ADDRESS and ANDROID_DLEXT_RESERVED_ADDRESS * is that for ANDROID_DLEXT_LOAD_AT_FIXED_ADDRESS the linker reserves memory at reserved_addr * whereas for ANDROID_DLEXT_RESERVED_ADDRESS the linker relies on the caller to reserve the memory. * * This flag can be used with ANDROID_DLEXT_FORCE_FIXED_VADDR; when ANDROID_DLEXT_FORCE_FIXED_VADDR * is set and load_bias is not 0 (load_bias is min(p_vaddr) of PT_LOAD segments) this flag is ignored. * This is implemented this way because the linker has to pick one address over the other and this * way is more convenient for art. Note that ANDROID_DLEXT_FORCE_FIXED_VADDR does not generate * an error when min(p_vaddr) is 0. * * Cannot be used with ANDROID_DLEXT_RESERVED_ADDRESS or ANDROID_DLEXT_RESERVED_ADDRESS_HINT. * * This flag is for ART internal use only. */ ANDROID_DLEXT_LOAD_AT_FIXED_ADDRESS = 0x100, /* This flag used to load library in a different namespace. The namespace is * specified in library_namespace. */ ANDROID_DLEXT_USE_NAMESPACE = 0x200, /* Mask of valid bits */ ANDROID_DLEXT_VALID_FLAG_BITS = ANDROID_DLEXT_RESERVED_ADDRESS | ANDROID_DLEXT_RESERVED_ADDRESS_HINT | ANDROID_DLEXT_WRITE_RELRO | ANDROID_DLEXT_USE_RELRO | ANDROID_DLEXT_USE_LIBRARY_FD | ANDROID_DLEXT_USE_LIBRARY_FD_OFFSET | ANDROID_DLEXT_FORCE_LOAD | ANDROID_DLEXT_FORCE_FIXED_VADDR | ANDROID_DLEXT_LOAD_AT_FIXED_ADDRESS | ANDROID_DLEXT_USE_NAMESPACE, }; struct android_namespace_t; typedef struct { uint64_t flags; void* reserved_addr; size_t reserved_size; int relro_fd; int library_fd; off64_t library_fd_offset; struct android_namespace_t* library_namespace; } android_dlextinfo; extern void* android_dlopen_ext(const char* filename, int flag, const android_dlextinfo* extinfo); __END_DECLS #endif /* __ANDROID_DLEXT_H__ */ ================================================ FILE: atlas-aapt/bionic/libc/include/android/legacy_errno_inlines.h ================================================ /* * Copyright (C) 2015 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _ANDROID_LEGACY_ERRNO_INLINES_H #define _ANDROID_LEGACY_ERRNO_INLINES_H #include __BEGIN_DECLS static __inline int __attribute__((deprecated)) __set_errno(int n) { errno = n; return -1; } __END_DECLS #endif /* _ANDROID_LEGACY_ERRNO_INLINES_H */ ================================================ FILE: atlas-aapt/bionic/libc/include/android/legacy_signal_inlines.h ================================================ /* * Copyright (C) 2015 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _ANDROID_LEGACY_SIGNAL_INLINES_H_ #define _ANDROID_LEGACY_SIGNAL_INLINES_H_ #include #include __BEGIN_DECLS extern sighandler_t bsd_signal(int signum, sighandler_t handler); static __inline int sigismember(sigset_t *set, int signum) { /* Signal numbers start at 1, but bit positions start at 0. */ int bit = signum - 1; const unsigned long *local_set = (const unsigned long *)set; if (set == NULL || bit < 0 || bit >= (int)(8 * sizeof(sigset_t))) { errno = EINVAL; return -1; } return (int)((local_set[bit / LONG_BIT] >> (bit % LONG_BIT)) & 1); } static __inline int sigaddset(sigset_t *set, int signum) { /* Signal numbers start at 1, but bit positions start at 0. */ int bit = signum - 1; unsigned long *local_set = (unsigned long *)set; if (set == NULL || bit < 0 || bit >= (int)(8 * sizeof(sigset_t))) { errno = EINVAL; return -1; } local_set[bit / LONG_BIT] |= 1UL << (bit % LONG_BIT); return 0; } static __inline int sigdelset(sigset_t *set, int signum) { /* Signal numbers start at 1, but bit positions start at 0. */ int bit = signum - 1; unsigned long *local_set = (unsigned long *)set; if (set == NULL || bit < 0 || bit >= (int)(8 * sizeof(sigset_t))) { errno = EINVAL; return -1; } local_set[bit / LONG_BIT] &= ~(1UL << (bit % LONG_BIT)); return 0; } static __inline int sigemptyset(sigset_t *set) { if (set == NULL) { errno = EINVAL; return -1; } memset(set, 0, sizeof(sigset_t)); return 0; } static __inline int sigfillset(sigset_t *set) { if (set == NULL) { errno = EINVAL; return -1; } memset(set, ~0, sizeof(sigset_t)); return 0; } static __inline sighandler_t signal(int s, sighandler_t f) { return bsd_signal(s, f); } __END_DECLS #endif /* _ANDROID_LEGACY_SIGNAL_INLINES_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/android/legacy_stdlib_inlines.h ================================================ /* * Copyright (C) 2015 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _ANDROID_LEGACY_STDLIB_INLINES_H_ #define _ANDROID_LEGACY_STDLIB_INLINES_H_ #include __BEGIN_DECLS static __inline float strtof(const char *nptr, char **endptr) { return (float)strtod(nptr, endptr); } static __inline double atof(const char *nptr) { return (strtod(nptr, NULL)); } static __inline int abs(int __n) { return (__n < 0) ? -__n : __n; } static __inline long labs(long __n) { return (__n < 0L) ? -__n : __n; } static __inline long long llabs(long long __n) { return (__n < 0LL) ? -__n : __n; } static __inline int rand(void) { return (int)lrand48(); } static __inline void srand(unsigned int __s) { srand48(__s); } static __inline long random(void) { return lrand48(); } static __inline void srandom(unsigned int __s) { srand48(__s); } static __inline int grantpt(int __fd __attribute((unused))) { return 0; /* devpts does this all for us! */ } __END_DECLS #endif /* _ANDROID_LEGACY_STDLIB_INLINES_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/android/legacy_sys_atomics_inlines.h ================================================ /* * Copyright (C) 2015 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _ANDROID_LEGACY_SYS_ATOMICS_INLINES_H_ #define _ANDROID_LEGACY_SYS_ATOMICS_INLINES_H_ #include __BEGIN_DECLS /* Note: atomic operations that were exported by the C library didn't * provide any memory barriers, which created potential issues on * multi-core devices. We now define them as inlined calls to * GCC sync builtins, which always provide a full barrier. * * NOTE: The C library still exports atomic functions by the same * name to ensure ABI stability for existing NDK machine code. * * If you are an NDK developer, we encourage you to rebuild your * unmodified sources against this header as soon as possible. */ #define __ATOMIC_INLINE__ static __inline __attribute__((always_inline)) __ATOMIC_INLINE__ int __atomic_cmpxchg(int old, int _new, volatile int *ptr) { /* We must return 0 on success */ return __sync_val_compare_and_swap(ptr, old, _new) != old; } __ATOMIC_INLINE__ int __atomic_swap(int _new, volatile int *ptr) { int prev; do { prev = *ptr; } while (__sync_val_compare_and_swap(ptr, prev, _new) != prev); return prev; } __ATOMIC_INLINE__ int __atomic_dec(volatile int *ptr) { return __sync_fetch_and_sub(ptr, 1); } __ATOMIC_INLINE__ int __atomic_inc(volatile int *ptr) { return __sync_fetch_and_add(ptr, 1); } __END_DECLS #endif /* _ANDROID_LEGACY_SYS_ATOMICS_INLINES_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/android/legacy_sys_stat_inlines.h ================================================ /* * Copyright (C) 2015 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _ANDROID_LEGACY_SYS_STAT_INLINES_H_ #define _ANDROID_LEGACY_SYS_STAT_INLINES_H_ #include __BEGIN_DECLS static __inline int mkfifo(const char *__p, mode_t __m) { return mknod(__p, (__m & ~S_IFMT) | S_IFIFO, (dev_t)0); } __END_DECLS #endif /* _ANDROID_LEGACY_SYS_STAT_INLINES_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/android/legacy_termios_inlines.h ================================================ /* * Copyright (C) 2015 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _ANDROID_LEGACY_TERMIOS_INLINES_H_ #define _ANDROID_LEGACY_TERMIOS_INLINES_H_ #include #include #include #include __BEGIN_DECLS static __inline int tcgetattr(int fd, struct termios *s) { return ioctl(fd, TCGETS, s); } static __inline int tcsetattr(int fd, int __opt, const struct termios *s) { return ioctl(fd, __opt, (void *)s); } static __inline int tcflow(int fd, int action) { return ioctl(fd, TCXONC, (void *)(intptr_t)action); } static __inline int tcflush(int fd, int __queue) { return ioctl(fd, TCFLSH, (void *)(intptr_t)__queue); } static __inline pid_t tcgetsid(int fd) { pid_t _pid; return ioctl(fd, TIOCGSID, &_pid) ? (pid_t)-1 : _pid; } static __inline int tcsendbreak(int fd, int __duration) { return ioctl(fd, TCSBRKP, (void *)(uintptr_t)__duration); } static __inline speed_t cfgetospeed(const struct termios *s) { return (speed_t)(s->c_cflag & CBAUD); } static __inline int cfsetospeed(struct termios *s, speed_t speed) { s->c_cflag = (s->c_cflag & ~CBAUD) | (speed & CBAUD); return 0; } static __inline speed_t cfgetispeed(const struct termios *s) { return (speed_t)(s->c_cflag & CBAUD); } static __inline int cfsetispeed(struct termios *s, speed_t speed) { s->c_cflag = (s->c_cflag & ~CBAUD) | (speed & CBAUD); return 0; } static __inline void cfmakeraw(struct termios *s) { s->c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | IGNCR | ICRNL | IXON); s->c_oflag &= ~OPOST; s->c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN); s->c_cflag &= ~(CSIZE | PARENB); s->c_cflag |= CS8; } __END_DECLS #endif /* _ANDROID_LEGACY_TERMIOS_INLINES_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/android/set_abort_message.h ================================================ /* * Copyright (C) 2014 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SET_ABORT_MESSAGE_H #define _SET_ABORT_MESSAGE_H #include __BEGIN_DECLS void android_set_abort_message(const char* msg); __END_DECLS #endif // _SET_ABORT_MESSAGE_H ================================================ FILE: atlas-aapt/bionic/libc/include/ar.h ================================================ /* $OpenBSD: ar.h,v 1.3 2003/06/02 19:34:12 millert Exp $ */ /* $NetBSD: ar.h,v 1.4 1994/10/26 00:55:43 cgd Exp $ */ /*- * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * (c) UNIX System Laboratories, Inc. * All or some portions of this file are derived from material licensed * to the University of California by American Telephone and Telegraph * Co. or Unix System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * * This code is derived from software contributed to Berkeley by * Hugh Smith at The University of Guelph. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)ar.h 8.2 (Berkeley) 1/21/94 */ #ifndef _AR_H_ #define _AR_H_ /* Pre-4BSD archives had these magic numbers in them. */ #define OARMAG1 0177555 #define OARMAG2 0177545 #define ARMAG "!\n" /* ar "magic number" */ #define SARMAG 8 /* strlen(ARMAG); */ #define AR_EFMT1 "#1/" /* extended format #1 */ struct ar_hdr { char ar_name[16]; /* name */ char ar_date[12]; /* modification time */ char ar_uid[6]; /* user id */ char ar_gid[6]; /* group id */ char ar_mode[8]; /* octal file permissions */ char ar_size[10]; /* size in bytes */ #define ARFMAG "`\n" char ar_fmag[2]; /* consistency check */ }; #endif /* !_AR_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/arpa/inet.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _ARPA_INET_H_ #define _ARPA_INET_H_ #include #include #include __BEGIN_DECLS in_addr_t inet_addr(const char*); int inet_aton(const char*, struct in_addr*); in_addr_t inet_lnaof(struct in_addr); struct in_addr inet_makeaddr(in_addr_t, in_addr_t); in_addr_t inet_netof(struct in_addr); in_addr_t inet_network(const char*); char* inet_ntoa(struct in_addr); const char* inet_ntop(int, const void*, char*, socklen_t); unsigned int inet_nsap_addr(const char*, unsigned char*, int); char* inet_nsap_ntoa(int, const unsigned char*, char*); int inet_pton(int, const char*, void*); __END_DECLS #endif /* _ARPA_INET_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/arpa/nameser.h ================================================ /* $NetBSD: nameser.h,v 1.25 2009/04/12 17:07:34 christos Exp $ */ /* * Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") * Portions Copyright (C) 1996-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ /* * Copyright (c) 1983, 1989, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /* * Id: nameser.h,v 1.16 2009/03/03 01:52:48 each Exp */ #ifndef _ARPA_NAMESER_H_ #define _ARPA_NAMESER_H_ #define BIND_4_COMPAT #include #include /* * Revision information. This is the release date in YYYYMMDD format. * It can change every day so the right thing to do with it is use it * in preprocessor commands such as "#if (__NAMESER > 19931104)". Do not * compare for equality; rather, use it to determine whether your libbind.a * contains a new enough lib/nameser/ to support the feature you need. */ #define __NAMESER 20090302 /*%< New interface version stamp. */ /* * Define constants based on RFC0883, RFC1034, RFC 1035 */ #define NS_PACKETSZ 512 /* default UDP packet size */ #define NS_MAXDNAME 1025 /* maximum domain name (presentation format)*/ #define NS_MAXMSG 65535 /* maximum message size */ #define NS_MAXCDNAME 255 /* maximum compressed domain name */ #define NS_MAXLABEL 63 /* maximum length of domain label */ #define NS_MAXLABELS 128 /* theoretical max #/labels per domain name */ #define NS_MAXNNAME 256 /* maximum uncompressed (binary) domain name*/ #define NS_MAXPADDR (sizeof "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff") #define NS_HFIXEDSZ 12 /* #/bytes of fixed data in header */ #define NS_QFIXEDSZ 4 /* #/bytes of fixed data in query */ #define NS_RRFIXEDSZ 10 /* #/bytes of fixed data in r record */ #define NS_INT32SZ 4 /* #/bytes of data in a uint32_t */ #define NS_INT16SZ 2 /* #/bytes of data in a uint16_t */ #define NS_INT8SZ 1 /* #/bytes of data in a uint8_t */ #define NS_INADDRSZ 4 /* IPv4 T_A */ #define NS_IN6ADDRSZ 16 /* IPv6 T_AAAA */ #define NS_CMPRSFLGS 0xc0 /* Flag bits indicating name compression. */ #define NS_DEFAULTPORT 53 /* For both TCP and UDP. */ /* * These can be expanded with synonyms, just keep ns_parse.c:ns_parserecord() * in synch with it. */ typedef enum __ns_sect { ns_s_qd = 0, /* Query: Question. */ ns_s_zn = 0, /* Update: Zone. */ ns_s_an = 1, /* Query: Answer. */ ns_s_pr = 1, /* Update: Prerequisites. */ ns_s_ns = 2, /* Query: Name servers. */ ns_s_ud = 2, /* Update: Update. */ ns_s_ar = 3, /* Query|Update: Additional records. */ ns_s_max = 4 } ns_sect; /* * Network name (compressed or not) type. Equivilent to a pointer when used * in a function prototype. Can be const'd. */ typedef u_char ns_nname[NS_MAXNNAME]; typedef const u_char *ns_nname_ct; typedef u_char *ns_nname_t; struct ns_namemap { ns_nname_ct base; int len; }; typedef struct ns_namemap *ns_namemap_t; typedef const struct ns_namemap *ns_namemap_ct; /* * This is a message handle. It is caller allocated and has no dynamic data. * This structure is intended to be opaque to all but ns_parse.c, thus the * leading _'s on the member names. Use the accessor functions, not the _'s. */ typedef struct __ns_msg { const u_char *_msg, *_eom; uint16_t _id, _flags, _counts[ns_s_max]; const u_char *_sections[ns_s_max]; ns_sect _sect; int _rrnum; const u_char *_msg_ptr; } ns_msg; /* * This is a newmsg handle, used when constructing new messages with * ns_newmsg_init, et al. */ struct ns_newmsg { ns_msg msg; const u_char *dnptrs[25]; const u_char **lastdnptr; }; typedef struct ns_newmsg ns_newmsg; /* Private data structure - do not use from outside library. */ struct _ns_flagdata { int mask, shift; }; extern const struct _ns_flagdata _ns_flagdata[]; /* Accessor macros - this is part of the public interface. */ #define ns_msg_id(handle) ((handle)._id + 0) #define ns_msg_base(handle) ((handle)._msg + 0) #define ns_msg_end(handle) ((handle)._eom + 0) #define ns_msg_size(handle) ((size_t)((handle)._eom - (handle)._msg)) #define ns_msg_count(handle, section) ((handle)._counts[section] + 0) /* * This is a parsed record. It is caller allocated and has no dynamic data. */ typedef struct __ns_rr { char name[NS_MAXDNAME]; uint16_t type; uint16_t rr_class; uint32_t ttl; uint16_t rdlength; const u_char * rdata; } ns_rr; /* * Same thing, but using uncompressed network binary names, and real C types. */ typedef struct __ns_rr2 { ns_nname nname; size_t nnamel; int type; int rr_class; u_int ttl; int rdlength; const u_char * rdata; } ns_rr2; /* Accessor macros - this is part of the public interface. */ #define ns_rr_name(rr) (((rr).name[0] != '\0') ? (rr).name : ".") #define ns_rr_nname(rr) ((const ns_nname_t)(rr).nname) #define ns_rr_nnamel(rr) ((rr).nnamel + 0) #define ns_rr_type(rr) ((ns_type)((rr).type + 0)) #define ns_rr_class(rr) ((ns_class)((rr).rr_class + 0)) #define ns_rr_ttl(rr) ((u_long)(rr).ttl + 0) #define ns_rr_rdlen(rr) ((size_t)(rr).rdlength + 0) #define ns_rr_rdata(rr) ((rr).rdata + 0) /* * These don't have to be in the same order as in the packet flags word, * and they can even overlap in some cases, but they will need to be kept * in synch with ns_parse.c:ns_flagdata[]. */ typedef enum __ns_flag { ns_f_qr, /* Question/Response. */ ns_f_opcode, /* Operation code. */ ns_f_aa, /* Authoritative Answer. */ ns_f_tc, /* Truncation occurred. */ ns_f_rd, /* Recursion Desired. */ ns_f_ra, /* Recursion Available. */ ns_f_z, /* MBZ. */ ns_f_ad, /* Authentic Data (DNSSEC). */ ns_f_cd, /* Checking Disabled (DNSSEC). */ ns_f_rcode, /* Response code. */ ns_f_max } ns_flag; /* * Currently defined opcodes. */ typedef enum __ns_opcode { ns_o_query = 0, /* Standard query. */ ns_o_iquery = 1, /* Inverse query (deprecated/unsupported). */ ns_o_status = 2, /* Name server status query (unsupported). */ /* Opcode 3 is undefined/reserved. */ ns_o_notify = 4, /* Zone change notification. */ ns_o_update = 5, /* Zone update message. */ ns_o_max = 6 } ns_opcode; /* * Currently defined response codes. */ typedef enum __ns_rcode { ns_r_noerror = 0, /* No error occurred. */ ns_r_formerr = 1, /* Format error. */ ns_r_servfail = 2, /* Server failure. */ ns_r_nxdomain = 3, /* Name error. */ ns_r_notimpl = 4, /* Unimplemented. */ ns_r_refused = 5, /* Operation refused. */ /* these are for BIND_UPDATE */ ns_r_yxdomain = 6, /* Name exists */ ns_r_yxrrset = 7, /* RRset exists */ ns_r_nxrrset = 8, /* RRset does not exist */ ns_r_notauth = 9, /* Not authoritative for zone */ ns_r_notzone = 10, /* Zone of record different from zone section */ ns_r_max = 11, /* The following are EDNS extended rcodes */ ns_r_badvers = 16, /* The following are TSIG errors */ ns_r_badsig = 16, ns_r_badkey = 17, ns_r_badtime = 18 } ns_rcode; /* BIND_UPDATE */ typedef enum __ns_update_operation { ns_uop_delete = 0, ns_uop_add = 1, ns_uop_max = 2 } ns_update_operation; /* * This structure is used for TSIG authenticated messages */ struct ns_tsig_key { char name[NS_MAXDNAME], alg[NS_MAXDNAME]; unsigned char *data; int len; }; typedef struct ns_tsig_key ns_tsig_key; /* * This structure is used for TSIG authenticated TCP messages */ struct ns_tcp_tsig_state { int counter; struct dst_key *key; void *ctx; unsigned char sig[NS_PACKETSZ]; int siglen; }; typedef struct ns_tcp_tsig_state ns_tcp_tsig_state; #define NS_TSIG_FUDGE 300 #define NS_TSIG_TCP_COUNT 100 #define NS_TSIG_ALG_HMAC_MD5 "HMAC-MD5.SIG-ALG.REG.INT" #define NS_TSIG_ERROR_NO_TSIG -10 #define NS_TSIG_ERROR_NO_SPACE -11 #define NS_TSIG_ERROR_FORMERR -12 /* * Currently defined type values for resources and queries. */ typedef enum __ns_type { ns_t_invalid = 0, /* Cookie. */ ns_t_a = 1, /* Host address. */ ns_t_ns = 2, /* Authoritative server. */ ns_t_md = 3, /* Mail destination. */ ns_t_mf = 4, /* Mail forwarder. */ ns_t_cname = 5, /* Canonical name. */ ns_t_soa = 6, /* Start of authority zone. */ ns_t_mb = 7, /* Mailbox domain name. */ ns_t_mg = 8, /* Mail group member. */ ns_t_mr = 9, /* Mail rename name. */ ns_t_null = 10, /* Null resource record. */ ns_t_wks = 11, /* Well known service. */ ns_t_ptr = 12, /* Domain name pointer. */ ns_t_hinfo = 13, /* Host information. */ ns_t_minfo = 14, /* Mailbox information. */ ns_t_mx = 15, /* Mail routing information. */ ns_t_txt = 16, /* Text strings. */ ns_t_rp = 17, /* Responsible person. */ ns_t_afsdb = 18, /* AFS cell database. */ ns_t_x25 = 19, /* X_25 calling address. */ ns_t_isdn = 20, /* ISDN calling address. */ ns_t_rt = 21, /* Router. */ ns_t_nsap = 22, /* NSAP address. */ ns_t_nsap_ptr = 23, /* Reverse NSAP lookup (deprecated). */ ns_t_sig = 24, /* Security signature. */ ns_t_key = 25, /* Security key. */ ns_t_px = 26, /* X.400 mail mapping. */ ns_t_gpos = 27, /* Geographical position (withdrawn). */ ns_t_aaaa = 28, /* IPv6 Address. */ ns_t_loc = 29, /* Location Information. */ ns_t_nxt = 30, /* Next domain (security). */ ns_t_eid = 31, /* Endpoint identifier. */ ns_t_nimloc = 32, /* Nimrod Locator. */ ns_t_srv = 33, /* Server Selection. */ ns_t_atma = 34, /* ATM Address */ ns_t_naptr = 35, /* Naming Authority PoinTeR */ ns_t_kx = 36, /* Key Exchange */ ns_t_cert = 37, /* Certification record */ ns_t_a6 = 38, /* IPv6 address (experimental) */ ns_t_dname = 39, /* Non-terminal DNAME */ ns_t_sink = 40, /* Kitchen sink (experimentatl) */ ns_t_opt = 41, /* EDNS0 option (meta-RR) */ ns_t_apl = 42, /* Address prefix list (RFC 3123) */ ns_t_ds = 43, /* Delegation Signer */ ns_t_sshfp = 44, /* SSH Fingerprint */ ns_t_ipseckey = 45, /* IPSEC Key */ ns_t_rrsig = 46, /* RRset Signature */ ns_t_nsec = 47, /* Negative security */ ns_t_dnskey = 48, /* DNS Key */ ns_t_dhcid = 49, /* Dynamic host configuratin identifier */ ns_t_nsec3 = 50, /* Negative security type 3 */ ns_t_nsec3param = 51, /* Negative security type 3 parameters */ ns_t_hip = 55, /* Host Identity Protocol */ ns_t_spf = 99, /* Sender Policy Framework */ ns_t_tkey = 249, /* Transaction key */ ns_t_tsig = 250, /* Transaction signature. */ ns_t_ixfr = 251, /* Incremental zone transfer. */ ns_t_axfr = 252, /* Transfer zone of authority. */ ns_t_mailb = 253, /* Transfer mailbox records. */ ns_t_maila = 254, /* Transfer mail agent records. */ ns_t_any = 255, /* Wildcard match. */ ns_t_zxfr = 256, /* BIND-specific, nonstandard. */ ns_t_dlv = 32769, /* DNSSEC look-aside validatation. */ ns_t_max = 65536 } ns_type; /* Exclusively a QTYPE? (not also an RTYPE) */ #define ns_t_qt_p(t) (ns_t_xfr_p(t) || (t) == ns_t_any || \ (t) == ns_t_mailb || (t) == ns_t_maila) /* Some kind of meta-RR? (not a QTYPE, but also not an RTYPE) */ #define ns_t_mrr_p(t) ((t) == ns_t_tsig || (t) == ns_t_opt) /* Exclusively an RTYPE? (not also a QTYPE or a meta-RR) */ #define ns_t_rr_p(t) (!ns_t_qt_p(t) && !ns_t_mrr_p(t)) #define ns_t_udp_p(t) ((t) != ns_t_axfr && (t) != ns_t_zxfr) #define ns_t_xfr_p(t) ((t) == ns_t_axfr || (t) == ns_t_ixfr || \ (t) == ns_t_zxfr) /* * Values for class field */ typedef enum __ns_class { ns_c_invalid = 0, /* Cookie. */ ns_c_in = 1, /* Internet. */ ns_c_2 = 2, /* unallocated/unsupported. */ ns_c_chaos = 3, /* MIT Chaos-net. */ ns_c_hs = 4, /* MIT Hesiod. */ /* Query class values which do not appear in resource records */ ns_c_none = 254, /* for prereq. sections in update requests */ ns_c_any = 255, /* Wildcard match. */ ns_c_max = 65536 } ns_class; /* DNSSEC constants. */ typedef enum __ns_key_types { ns_kt_rsa = 1, /* key type RSA/MD5 */ ns_kt_dh = 2, /* Diffie Hellman */ ns_kt_dsa = 3, /* Digital Signature Standard (MANDATORY) */ ns_kt_private = 254 /* Private key type starts with OID */ } ns_key_types; typedef enum __ns_cert_types { cert_t_pkix = 1, /* PKIX (X.509v3) */ cert_t_spki = 2, /* SPKI */ cert_t_pgp = 3, /* PGP */ cert_t_url = 253, /* URL private type */ cert_t_oid = 254 /* OID private type */ } ns_cert_types; /* Flags field of the KEY RR rdata. */ #define NS_KEY_TYPEMASK 0xC000 /* Mask for "type" bits */ #define NS_KEY_TYPE_AUTH_CONF 0x0000 /* Key usable for both */ #define NS_KEY_TYPE_CONF_ONLY 0x8000 /* Key usable for confidentiality */ #define NS_KEY_TYPE_AUTH_ONLY 0x4000 /* Key usable for authentication */ #define NS_KEY_TYPE_NO_KEY 0xC000 /* No key usable for either; no key */ /* The type bits can also be interpreted independently, as single bits: */ #define NS_KEY_NO_AUTH 0x8000 /* Key unusable for authentication */ #define NS_KEY_NO_CONF 0x4000 /* Key unusable for confidentiality */ #define NS_KEY_RESERVED2 0x2000 /* Security is *mandatory* if bit=0 */ #define NS_KEY_EXTENDED_FLAGS 0x1000 /* reserved - must be zero */ #define NS_KEY_RESERVED4 0x0800 /* reserved - must be zero */ #define NS_KEY_RESERVED5 0x0400 /* reserved - must be zero */ #define NS_KEY_NAME_TYPE 0x0300 /* these bits determine the type */ #define NS_KEY_NAME_USER 0x0000 /* key is assoc. with user */ #define NS_KEY_NAME_ENTITY 0x0200 /* key is assoc. with entity eg host */ #define NS_KEY_NAME_ZONE 0x0100 /* key is zone key */ #define NS_KEY_NAME_RESERVED 0x0300 /* reserved meaning */ #define NS_KEY_RESERVED8 0x0080 /* reserved - must be zero */ #define NS_KEY_RESERVED9 0x0040 /* reserved - must be zero */ #define NS_KEY_RESERVED10 0x0020 /* reserved - must be zero */ #define NS_KEY_RESERVED11 0x0010 /* reserved - must be zero */ #define NS_KEY_SIGNATORYMASK 0x000F /* key can sign RR's of same name */ #define NS_KEY_RESERVED_BITMASK ( NS_KEY_RESERVED2 | \ NS_KEY_RESERVED4 | \ NS_KEY_RESERVED5 | \ NS_KEY_RESERVED8 | \ NS_KEY_RESERVED9 | \ NS_KEY_RESERVED10 | \ NS_KEY_RESERVED11 ) #define NS_KEY_RESERVED_BITMASK2 0xFFFF /* no bits defined here */ /* The Algorithm field of the KEY and SIG RR's is an integer, {1..254} */ #define NS_ALG_MD5RSA 1 /* MD5 with RSA */ #define NS_ALG_DH 2 /* Diffie Hellman KEY */ #define NS_ALG_DSA 3 /* DSA KEY */ #define NS_ALG_DSS NS_ALG_DSA #define NS_ALG_EXPIRE_ONLY 253 /* No alg, no security */ #define NS_ALG_PRIVATE_OID 254 /* Key begins with OID giving alg */ /* Protocol values */ /* value 0 is reserved */ #define NS_KEY_PROT_TLS 1 #define NS_KEY_PROT_EMAIL 2 #define NS_KEY_PROT_DNSSEC 3 #define NS_KEY_PROT_IPSEC 4 #define NS_KEY_PROT_ANY 255 /* Signatures */ #define NS_MD5RSA_MIN_BITS 512 /* Size of a mod or exp in bits */ #define NS_MD5RSA_MAX_BITS 4096 /* Total of binary mod and exp */ #define NS_MD5RSA_MAX_BYTES ((NS_MD5RSA_MAX_BITS+7/8)*2+3) /* Max length of text sig block */ #define NS_MD5RSA_MAX_BASE64 (((NS_MD5RSA_MAX_BYTES+2)/3)*4) #define NS_MD5RSA_MIN_SIZE ((NS_MD5RSA_MIN_BITS+7)/8) #define NS_MD5RSA_MAX_SIZE ((NS_MD5RSA_MAX_BITS+7)/8) #define NS_DSA_SIG_SIZE 41 #define NS_DSA_MIN_SIZE 213 #define NS_DSA_MAX_BYTES 405 /* Offsets into SIG record rdata to find various values */ #define NS_SIG_TYPE 0 /* Type flags */ #define NS_SIG_ALG 2 /* Algorithm */ #define NS_SIG_LABELS 3 /* How many labels in name */ #define NS_SIG_OTTL 4 /* Original TTL */ #define NS_SIG_EXPIR 8 /* Expiration time */ #define NS_SIG_SIGNED 12 /* Signature time */ #define NS_SIG_FOOT 16 /* Key footprint */ #define NS_SIG_SIGNER 18 /* Domain name of who signed it */ /* How RR types are represented as bit-flags in NXT records */ #define NS_NXT_BITS 8 #define NS_NXT_BIT_SET( n,p) (p[(n)/NS_NXT_BITS] |= (0x80>>((n)%NS_NXT_BITS))) #define NS_NXT_BIT_CLEAR(n,p) (p[(n)/NS_NXT_BITS] &= ~(0x80>>((n)%NS_NXT_BITS))) #define NS_NXT_BIT_ISSET(n,p) (p[(n)/NS_NXT_BITS] & (0x80>>((n)%NS_NXT_BITS))) #define NS_NXT_MAX 127 /* * EDNS0 extended flags and option codes, host order. */ #define NS_OPT_DNSSEC_OK 0x8000U #define NS_OPT_NSID 3 /* * Inline versions of get/put short/long. Pointer is advanced. */ #define NS_GET16(s, cp) do { \ const u_char *t_cp = (const u_char *)(cp); \ (s) = ((uint16_t)t_cp[0] << 8) \ | ((uint16_t)t_cp[1]) \ ; \ (cp) += NS_INT16SZ; \ } while (/*CONSTCOND*/0) #define NS_GET32(l, cp) do { \ const u_char *t_cp = (const u_char *)(cp); \ (l) = ((uint32_t)t_cp[0] << 24) \ | ((uint32_t)t_cp[1] << 16) \ | ((uint32_t)t_cp[2] << 8) \ | ((uint32_t)t_cp[3]) \ ; \ (cp) += NS_INT32SZ; \ } while (/*CONSTCOND*/0) #define NS_PUT16(s, cp) do { \ uint32_t t_s = (uint32_t)(s); \ u_char *t_cp = (u_char *)(cp); \ *t_cp++ = t_s >> 8; \ *t_cp = t_s; \ (cp) += NS_INT16SZ; \ } while (/*CONSTCOND*/0) #define NS_PUT32(l, cp) do { \ uint32_t t_l = (uint32_t)(l); \ u_char *t_cp = (u_char *)(cp); \ *t_cp++ = t_l >> 24; \ *t_cp++ = t_l >> 16; \ *t_cp++ = t_l >> 8; \ *t_cp = t_l; \ (cp) += NS_INT32SZ; \ } while (/*CONSTCOND*/0) #if !defined(__LP64__) /* Annoyingly, LP32 shipped with __ names. */ #define ns_msg_getflag __ns_msg_getflag #define ns_get16 __ns_get16 #define ns_get32 __ns_get32 #define ns_put16 __ns_put16 #define ns_put32 __ns_put32 #define ns_initparse __ns_initparse #define ns_skiprr __ns_skiprr #define ns_parserr __ns_parserr #define ns_parserr2 __ns_parserr2 #define ns_sprintrr __ns_sprintrr #define ns_sprintrrf __ns_sprintrrf #define ns_format_ttl __ns_format_ttl #define ns_parse_ttl __ns_parse_ttl #define ns_datetosecs __ns_datetosecs #define ns_name_ntol __ns_name_ntol #define ns_name_ntop __ns_name_ntop #define ns_name_pton __ns_name_pton #define ns_name_pton2 __ns_name_pton2 #define ns_name_unpack __ns_name_unpack #define ns_name_unpack2 __ns_name_unpack2 #define ns_name_pack __ns_name_pack #define ns_name_compress __ns_name_compress #define ns_name_uncompress __ns_name_uncompress #define ns_name_skip __ns_name_skip #define ns_name_rollback __ns_name_rollback #define ns_name_length __ns_name_length #define ns_name_eq __ns_name_eq #define ns_name_owned __ns_name_owned #define ns_name_map __ns_name_map #define ns_name_labels __ns_name_labels #define ns_sign __ns_sign #define ns_sign2 __ns_sign2 #define ns_sign_tcp __ns_sign_tcp #define ns_sign_tcp2 __ns_sign_tcp2 #define ns_sign_tcp_init __ns_sign_tcp_init #define ns_find_tsig __ns_find_tsig #define ns_verify __ns_verify #define ns_verify_tcp __ns_verify_tcp #define ns_verify_tcp_init __ns_verify_tcp_init #define ns_samedomain __ns_samedomain #define ns_subdomain __ns_subdomain #define ns_makecanon __ns_makecanon #define ns_samename __ns_samename #endif __BEGIN_DECLS int ns_msg_getflag(ns_msg, int) __LIBC_ABI_PUBLIC__; uint16_t ns_get16(const u_char *) __LIBC_ABI_PUBLIC__; uint32_t ns_get32(const u_char *) __LIBC_ABI_PUBLIC__; void ns_put16(uint16_t, u_char *) __LIBC_ABI_PUBLIC__; void ns_put32(uint32_t, u_char *) __LIBC_ABI_PUBLIC__; int ns_initparse(const u_char *, int, ns_msg *) __LIBC_ABI_PUBLIC__; int ns_skiprr(const u_char *, const u_char *, ns_sect, int) __LIBC_ABI_PUBLIC__; int ns_parserr(ns_msg *, ns_sect, int, ns_rr *) __LIBC_ABI_PUBLIC__; int ns_parserr2(ns_msg *, ns_sect, int, ns_rr2 *) __LIBC_HIDDEN__; int ns_sprintrr(const ns_msg *, const ns_rr *, const char *, const char *, char *, size_t) __LIBC_ABI_PUBLIC__; int ns_sprintrrf(const u_char *, size_t, const char *, ns_class, ns_type, u_long, const u_char *, size_t, const char *, const char *, char *, size_t) __LIBC_ABI_PUBLIC__; int ns_format_ttl(u_long, char *, size_t) __LIBC_ABI_PUBLIC__; int ns_parse_ttl(const char *, u_long *) __LIBC_ABI_PUBLIC__; uint32_t ns_datetosecs(const char *cp, int *errp) __LIBC_ABI_PUBLIC__; int ns_name_ntol(const u_char *, u_char *, size_t) __LIBC_ABI_PUBLIC__; int ns_name_ntop(const u_char *, char *, size_t) __LIBC_ABI_PUBLIC__; int ns_name_pton(const char *, u_char *, size_t) __LIBC_ABI_PUBLIC__; int ns_name_pton2(const char *, u_char *, size_t, size_t *) __LIBC_HIDDEN__; int ns_name_unpack(const u_char *, const u_char *, const u_char *, u_char *, size_t) __LIBC_ABI_PUBLIC__; int ns_name_unpack2(const u_char *, const u_char *, const u_char *, u_char *, size_t, size_t *) __LIBC_HIDDEN__; int ns_name_pack(const u_char *, u_char *, int, const u_char **, const u_char **) __LIBC_ABI_PUBLIC__; int ns_name_uncompress(const u_char *, const u_char *, const u_char *, char *, size_t) __LIBC_ABI_PUBLIC__; int ns_name_compress(const char *, u_char *, size_t, const u_char **, const u_char **) __LIBC_ABI_PUBLIC__; int ns_name_skip(const u_char **, const u_char *) __LIBC_ABI_PUBLIC__; void ns_name_rollback(const u_char *, const u_char **, const u_char **) __LIBC_ABI_PUBLIC__; int ns_sign(u_char *, int *, int, int, void *, const u_char *, int, u_char *, int *, time_t) __LIBC_ABI_PUBLIC__; int ns_sign2(u_char *, int *, int, int, void *, const u_char *, int, u_char *, int *, time_t, u_char **, u_char **) __LIBC_ABI_PUBLIC__; ssize_t ns_name_length(ns_nname_ct, size_t) __LIBC_HIDDEN__; int ns_name_eq(ns_nname_ct, size_t, ns_nname_ct, size_t) __LIBC_HIDDEN__; int ns_name_owned(ns_namemap_ct, int, ns_namemap_ct, int) __LIBC_HIDDEN__; int ns_name_map(ns_nname_ct, size_t, ns_namemap_t, int) __LIBC_HIDDEN__; int ns_name_labels(ns_nname_ct, size_t) __LIBC_HIDDEN__; int ns_sign_tcp(u_char *, int *, int, int, ns_tcp_tsig_state *, int) __LIBC_ABI_PUBLIC__; int ns_sign_tcp2(u_char *, int *, int, int, ns_tcp_tsig_state *, int, u_char **, u_char **) __LIBC_ABI_PUBLIC__; int ns_sign_tcp_init(void *, const u_char *, int, ns_tcp_tsig_state *) __LIBC_ABI_PUBLIC__; u_char *ns_find_tsig(u_char *, u_char *) __LIBC_ABI_PUBLIC__; int ns_verify(u_char *, int *, void *, const u_char *, int, u_char *, int *, time_t *, int) __LIBC_ABI_PUBLIC__; int ns_verify_tcp(u_char *, int *, ns_tcp_tsig_state *, int); int ns_verify_tcp_init(void *, const u_char *, int, ns_tcp_tsig_state *) __LIBC_ABI_PUBLIC__; int ns_samedomain(const char *, const char *) __LIBC_ABI_PUBLIC__; int ns_subdomain(const char *, const char *) __LIBC_ABI_PUBLIC__; int ns_makecanon(const char *, char *, size_t) __LIBC_ABI_PUBLIC__; int ns_samename(const char *, const char *) __LIBC_ABI_PUBLIC__; __END_DECLS #ifdef BIND_4_COMPAT #include #endif #endif /* !_ARPA_NAMESER_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/arpa/nameser_compat.h ================================================ /* $NetBSD: nameser_compat.h,v 1.1.1.2 2004/11/07 01:28:27 christos Exp $ */ /* Copyright (c) 1983, 1989 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /* * from nameser.h 8.1 (Berkeley) 6/2/93 * Id: nameser_compat.h,v 1.8 2006/05/19 02:33:40 marka Exp */ #ifndef _ARPA_NAMESER_COMPAT_ #define _ARPA_NAMESER_COMPAT_ #define __BIND 19950621 /* (DEAD) interface version stamp. */ #include /* * Structure for query header. The order of the fields is machine- and * compiler-dependent, depending on the byte/bit order and the layout * of bit fields. We use bit fields only in int variables, as this * is all ANSI requires. This requires a somewhat confusing rearrangement. */ typedef struct { unsigned id :16; /* query identification number */ #if BYTE_ORDER == BIG_ENDIAN /* fields in third byte */ unsigned qr: 1; /* response flag */ unsigned opcode: 4; /* purpose of message */ unsigned aa: 1; /* authoritive answer */ unsigned tc: 1; /* truncated message */ unsigned rd: 1; /* recursion desired */ /* fields in fourth byte */ unsigned ra: 1; /* recursion available */ unsigned unused :1; /* unused bits (MBZ as of 4.9.3a3) */ unsigned ad: 1; /* authentic data from named */ unsigned cd: 1; /* checking disabled by resolver */ unsigned rcode :4; /* response code */ #endif #if BYTE_ORDER == LITTLE_ENDIAN || BYTE_ORDER == PDP_ENDIAN /* fields in third byte */ unsigned rd :1; /* recursion desired */ unsigned tc :1; /* truncated message */ unsigned aa :1; /* authoritive answer */ unsigned opcode :4; /* purpose of message */ unsigned qr :1; /* response flag */ /* fields in fourth byte */ unsigned rcode :4; /* response code */ unsigned cd: 1; /* checking disabled by resolver */ unsigned ad: 1; /* authentic data from named */ unsigned unused :1; /* unused bits (MBZ as of 4.9.3a3) */ unsigned ra :1; /* recursion available */ #endif /* remaining bytes */ unsigned qdcount :16; /* number of question entries */ unsigned ancount :16; /* number of answer entries */ unsigned nscount :16; /* number of authority entries */ unsigned arcount :16; /* number of resource entries */ } HEADER; #define PACKETSZ NS_PACKETSZ #define MAXDNAME NS_MAXDNAME #define MAXCDNAME NS_MAXCDNAME #define MAXLABEL NS_MAXLABEL #define HFIXEDSZ NS_HFIXEDSZ #define QFIXEDSZ NS_QFIXEDSZ #define RRFIXEDSZ NS_RRFIXEDSZ #define INT32SZ NS_INT32SZ #define INT16SZ NS_INT16SZ #define INT8SZ NS_INT8SZ #define INADDRSZ NS_INADDRSZ #define IN6ADDRSZ NS_IN6ADDRSZ #define INDIR_MASK NS_CMPRSFLGS #define NAMESERVER_PORT NS_DEFAULTPORT #define S_ZONE ns_s_zn #define S_PREREQ ns_s_pr #define S_UPDATE ns_s_ud #define S_ADDT ns_s_ar #define QUERY ns_o_query #define IQUERY ns_o_iquery #define STATUS ns_o_status #define NS_NOTIFY_OP ns_o_notify #define NS_UPDATE_OP ns_o_update #define NOERROR ns_r_noerror #define FORMERR ns_r_formerr #define SERVFAIL ns_r_servfail #define NXDOMAIN ns_r_nxdomain #define NOTIMP ns_r_notimpl #define REFUSED ns_r_refused #define YXDOMAIN ns_r_yxdomain #define YXRRSET ns_r_yxrrset #define NXRRSET ns_r_nxrrset #define NOTAUTH ns_r_notauth #define NOTZONE ns_r_notzone /*#define BADSIG ns_r_badsig*/ /*#define BADKEY ns_r_badkey*/ /*#define BADTIME ns_r_badtime*/ #define DELETE ns_uop_delete #define ADD ns_uop_add #define T_A ns_t_a #define T_NS ns_t_ns #define T_MD ns_t_md #define T_MF ns_t_mf #define T_CNAME ns_t_cname #define T_SOA ns_t_soa #define T_MB ns_t_mb #define T_MG ns_t_mg #define T_MR ns_t_mr #define T_NULL ns_t_null #define T_WKS ns_t_wks #define T_PTR ns_t_ptr #define T_HINFO ns_t_hinfo #define T_MINFO ns_t_minfo #define T_MX ns_t_mx #define T_TXT ns_t_txt #define T_RP ns_t_rp #define T_AFSDB ns_t_afsdb #define T_X25 ns_t_x25 #define T_ISDN ns_t_isdn #define T_RT ns_t_rt #define T_NSAP ns_t_nsap #define T_NSAP_PTR ns_t_nsap_ptr #define T_SIG ns_t_sig #define T_KEY ns_t_key #define T_PX ns_t_px #define T_GPOS ns_t_gpos #define T_AAAA ns_t_aaaa #define T_LOC ns_t_loc #define T_NXT ns_t_nxt #define T_EID ns_t_eid #define T_NIMLOC ns_t_nimloc #define T_SRV ns_t_srv #define T_ATMA ns_t_atma #define T_NAPTR ns_t_naptr #define T_A6 ns_t_a6 #define T_TSIG ns_t_tsig #define T_IXFR ns_t_ixfr #define T_AXFR ns_t_axfr #define T_MAILB ns_t_mailb #define T_MAILA ns_t_maila #define T_ANY ns_t_any #define C_IN ns_c_in #define C_CHAOS ns_c_chaos #define C_HS ns_c_hs /* BIND_UPDATE */ #define C_NONE ns_c_none #define C_ANY ns_c_any #define GETSHORT NS_GET16 #define GETLONG NS_GET32 #define PUTSHORT NS_PUT16 #define PUTLONG NS_PUT32 #endif /* _ARPA_NAMESER_COMPAT_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/arpa/telnet.h ================================================ /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)telnet.h 8.2 (Berkeley) 12/15/93 */ #ifndef _ARPA_TELNET_H #define _ARPA_TELNET_H 1 /* * Definitions for the TELNET protocol. */ #define IAC 255 /* interpret as command: */ #define DONT 254 /* you are not to use option */ #define DO 253 /* please, you use option */ #define WONT 252 /* I won't use option */ #define WILL 251 /* I will use option */ #define SB 250 /* interpret as subnegotiation */ #define GA 249 /* you may reverse the line */ #define EL 248 /* erase the current line */ #define EC 247 /* erase the current character */ #define AYT 246 /* are you there */ #define AO 245 /* abort output--but let prog finish */ #define IP 244 /* interrupt process--permanently */ #define BREAK 243 /* break */ #define DM 242 /* data mark--for connect. cleaning */ #define NOP 241 /* nop */ #define SE 240 /* end sub negotiation */ #define EOR 239 /* end of record (transparent mode) */ #define ABORT 238 /* Abort process */ #define SUSP 237 /* Suspend process */ #define xEOF 236 /* End of file: EOF is already used... */ #define SYNCH 242 /* for telfunc calls */ #ifdef TELCMDS char *telcmds[] = { "EOF", "SUSP", "ABORT", "EOR", "SE", "NOP", "DMARK", "BRK", "IP", "AO", "AYT", "EC", "EL", "GA", "SB", "WILL", "WONT", "DO", "DONT", "IAC", 0, }; #else extern char *telcmds[]; #endif #define TELCMD_FIRST xEOF #define TELCMD_LAST IAC #define TELCMD_OK(x) ((unsigned int)(x) <= TELCMD_LAST && \ (unsigned int)(x) >= TELCMD_FIRST) #define TELCMD(x) telcmds[(x)-TELCMD_FIRST] /* telnet options */ #define TELOPT_BINARY 0 /* 8-bit data path */ #define TELOPT_ECHO 1 /* echo */ #define TELOPT_RCP 2 /* prepare to reconnect */ #define TELOPT_SGA 3 /* suppress go ahead */ #define TELOPT_NAMS 4 /* approximate message size */ #define TELOPT_STATUS 5 /* give status */ #define TELOPT_TM 6 /* timing mark */ #define TELOPT_RCTE 7 /* remote controlled transmission and echo */ #define TELOPT_NAOL 8 /* negotiate about output line width */ #define TELOPT_NAOP 9 /* negotiate about output page size */ #define TELOPT_NAOCRD 10 /* negotiate about CR disposition */ #define TELOPT_NAOHTS 11 /* negotiate about horizontal tabstops */ #define TELOPT_NAOHTD 12 /* negotiate about horizontal tab disposition */ #define TELOPT_NAOFFD 13 /* negotiate about formfeed disposition */ #define TELOPT_NAOVTS 14 /* negotiate about vertical tab stops */ #define TELOPT_NAOVTD 15 /* negotiate about vertical tab disposition */ #define TELOPT_NAOLFD 16 /* negotiate about output LF disposition */ #define TELOPT_XASCII 17 /* extended ascii character set */ #define TELOPT_LOGOUT 18 /* force logout */ #define TELOPT_BM 19 /* byte macro */ #define TELOPT_DET 20 /* data entry terminal */ #define TELOPT_SUPDUP 21 /* supdup protocol */ #define TELOPT_SUPDUPOUTPUT 22 /* supdup output */ #define TELOPT_SNDLOC 23 /* send location */ #define TELOPT_TTYPE 24 /* terminal type */ #define TELOPT_EOR 25 /* end or record */ #define TELOPT_TUID 26 /* TACACS user identification */ #define TELOPT_OUTMRK 27 /* output marking */ #define TELOPT_TTYLOC 28 /* terminal location number */ #define TELOPT_3270REGIME 29 /* 3270 regime */ #define TELOPT_X3PAD 30 /* X.3 PAD */ #define TELOPT_NAWS 31 /* window size */ #define TELOPT_TSPEED 32 /* terminal speed */ #define TELOPT_LFLOW 33 /* remote flow control */ #define TELOPT_LINEMODE 34 /* Linemode option */ #define TELOPT_XDISPLOC 35 /* X Display Location */ #define TELOPT_OLD_ENVIRON 36 /* Old - Environment variables */ #define TELOPT_AUTHENTICATION 37/* Authenticate */ #define TELOPT_ENCRYPT 38 /* Encryption option */ #define TELOPT_NEW_ENVIRON 39 /* New - Environment variables */ #define TELOPT_EXOPL 255 /* extended-options-list */ #define NTELOPTS (1+TELOPT_NEW_ENVIRON) #ifdef TELOPTS const char *telopts[NTELOPTS+1] = { "BINARY", "ECHO", "RCP", "SUPPRESS GO AHEAD", "NAME", "STATUS", "TIMING MARK", "RCTE", "NAOL", "NAOP", "NAOCRD", "NAOHTS", "NAOHTD", "NAOFFD", "NAOVTS", "NAOVTD", "NAOLFD", "EXTEND ASCII", "LOGOUT", "BYTE MACRO", "DATA ENTRY TERMINAL", "SUPDUP", "SUPDUP OUTPUT", "SEND LOCATION", "TERMINAL TYPE", "END OF RECORD", "TACACS UID", "OUTPUT MARKING", "TTYLOC", "3270 REGIME", "X.3 PAD", "NAWS", "TSPEED", "LFLOW", "LINEMODE", "XDISPLOC", "OLD-ENVIRON", "AUTHENTICATION", "ENCRYPT", "NEW-ENVIRON", 0, }; #define TELOPT_FIRST TELOPT_BINARY #define TELOPT_LAST TELOPT_NEW_ENVIRON #define TELOPT_OK(x) ((unsigned int)(x) <= TELOPT_LAST) #define TELOPT(x) telopts[(x)-TELOPT_FIRST] #endif /* sub-option qualifiers */ #define TELQUAL_IS 0 /* option is... */ #define TELQUAL_SEND 1 /* send option */ #define TELQUAL_INFO 2 /* ENVIRON: informational version of IS */ #define TELQUAL_REPLY 2 /* AUTHENTICATION: client version of IS */ #define TELQUAL_NAME 3 /* AUTHENTICATION: client version of IS */ #define LFLOW_OFF 0 /* Disable remote flow control */ #define LFLOW_ON 1 /* Enable remote flow control */ #define LFLOW_RESTART_ANY 2 /* Restart output on any char */ #define LFLOW_RESTART_XON 3 /* Restart output only on XON */ /* * LINEMODE suboptions */ #define LM_MODE 1 #define LM_FORWARDMASK 2 #define LM_SLC 3 #define MODE_EDIT 0x01 #define MODE_TRAPSIG 0x02 #define MODE_ACK 0x04 #define MODE_SOFT_TAB 0x08 #define MODE_LIT_ECHO 0x10 #define MODE_MASK 0x1f /* Not part of protocol, but needed to simplify things... */ #define MODE_FLOW 0x0100 #define MODE_ECHO 0x0200 #define MODE_INBIN 0x0400 #define MODE_OUTBIN 0x0800 #define MODE_FORCE 0x1000 #define SLC_SYNCH 1 #define SLC_BRK 2 #define SLC_IP 3 #define SLC_AO 4 #define SLC_AYT 5 #define SLC_EOR 6 #define SLC_ABORT 7 #define SLC_EOF 8 #define SLC_SUSP 9 #define SLC_EC 10 #define SLC_EL 11 #define SLC_EW 12 #define SLC_RP 13 #define SLC_LNEXT 14 #define SLC_XON 15 #define SLC_XOFF 16 #define SLC_FORW1 17 #define SLC_FORW2 18 #define NSLC 18 /* * For backwards compatibility, we define SLC_NAMES to be the * list of names if SLC_NAMES is not defined. */ #define SLC_NAMELIST "0", "SYNCH", "BRK", "IP", "AO", "AYT", "EOR", \ "ABORT", "EOF", "SUSP", "EC", "EL", "EW", "RP", \ "LNEXT", "XON", "XOFF", "FORW1", "FORW2", 0, #ifdef SLC_NAMES const char *slc_names[] = { SLC_NAMELIST }; #else extern char *slc_names[]; #define SLC_NAMES SLC_NAMELIST #endif #define SLC_NAME_OK(x) ((unsigned int)(x) <= NSLC) #define SLC_NAME(x) slc_names[x] #define SLC_NOSUPPORT 0 #define SLC_CANTCHANGE 1 #define SLC_VARIABLE 2 #define SLC_DEFAULT 3 #define SLC_LEVELBITS 0x03 #define SLC_FUNC 0 #define SLC_FLAGS 1 #define SLC_VALUE 2 #define SLC_ACK 0x80 #define SLC_FLUSHIN 0x40 #define SLC_FLUSHOUT 0x20 #define OLD_ENV_VAR 1 #define OLD_ENV_VALUE 0 #define NEW_ENV_VAR 0 #define NEW_ENV_VALUE 1 #define ENV_ESC 2 #define ENV_USERVAR 3 /* * AUTHENTICATION suboptions */ /* * Who is authenticating who ... */ #define AUTH_WHO_CLIENT 0 /* Client authenticating server */ #define AUTH_WHO_SERVER 1 /* Server authenticating client */ #define AUTH_WHO_MASK 1 /* * amount of authentication done */ #define AUTH_HOW_ONE_WAY 0 #define AUTH_HOW_MUTUAL 2 #define AUTH_HOW_MASK 2 #define AUTHTYPE_NULL 0 #define AUTHTYPE_KERBEROS_V4 1 #define AUTHTYPE_KERBEROS_V5 2 #define AUTHTYPE_SPX 3 #define AUTHTYPE_MINK 4 #define AUTHTYPE_CNT 5 #define AUTHTYPE_TEST 99 #ifdef AUTH_NAMES const char *authtype_names[] = { "NULL", "KERBEROS_V4", "KERBEROS_V5", "SPX", "MINK", 0, }; #else extern char *authtype_names[]; #endif #define AUTHTYPE_NAME_OK(x) ((unsigned int)(x) < AUTHTYPE_CNT) #define AUTHTYPE_NAME(x) authtype_names[x] /* * ENCRYPTion suboptions */ #define ENCRYPT_IS 0 /* I pick encryption type ... */ #define ENCRYPT_SUPPORT 1 /* I support encryption types ... */ #define ENCRYPT_REPLY 2 /* Initial setup response */ #define ENCRYPT_START 3 /* Am starting to send encrypted */ #define ENCRYPT_END 4 /* Am ending encrypted */ #define ENCRYPT_REQSTART 5 /* Request you start encrypting */ #define ENCRYPT_REQEND 6 /* Request you send encrypting */ #define ENCRYPT_ENC_KEYID 7 #define ENCRYPT_DEC_KEYID 8 #define ENCRYPT_CNT 9 #define ENCTYPE_ANY 0 #define ENCTYPE_DES_CFB64 1 #define ENCTYPE_DES_OFB64 2 #define ENCTYPE_CNT 3 #ifdef ENCRYPT_NAMES const char *encrypt_names[] = { "IS", "SUPPORT", "REPLY", "START", "END", "REQUEST-START", "REQUEST-END", "ENC-KEYID", "DEC-KEYID", 0, }; const char *enctype_names[] = { "ANY", "DES_CFB64", "DES_OFB64", 0, }; #else extern const char *encrypt_names[]; extern const char *enctype_names[]; #endif #define ENCRYPT_NAME_OK(x) ((unsigned int)(x) < ENCRYPT_CNT) #define ENCRYPT_NAME(x) encrypt_names[x] #define ENCTYPE_NAME_OK(x) ((unsigned int)(x) < ENCTYPE_CNT) #define ENCTYPE_NAME(x) enctype_names[x] #endif /* arpa/telnet.h */ ================================================ FILE: atlas-aapt/bionic/libc/include/assert.h ================================================ /* $OpenBSD: assert.h,v 1.12 2006/01/31 10:53:51 hshoexer Exp $ */ /* $NetBSD: assert.h,v 1.6 1994/10/26 00:55:44 cgd Exp $ */ /*- * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. * (c) UNIX System Laboratories, Inc. * All or some portions of this file are derived from material licensed * to the University of California by American Telephone and Telegraph * Co. or Unix System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)assert.h 8.2 (Berkeley) 1/21/94 */ /* * Unlike other ANSI header files, may usefully be included * multiple times, with and without NDEBUG defined. */ #include #undef assert #undef _assert #ifdef NDEBUG # define assert(e) ((void)0) # define _assert(e) ((void)0) #else # define _assert(e) assert(e) # if __ISO_C_VISIBLE >= 1999 # define assert(e) ((e) ? (void)0 : __assert2(__FILE__, __LINE__, __func__, #e)) # else # define assert(e) ((e) ? (void)0 : __assert(__FILE__, __LINE__, #e)) # endif #endif __BEGIN_DECLS __dead void __assert(const char *, int, const char *) __noreturn; __dead void __assert2(const char *, int, const char *, const char *) __noreturn; __END_DECLS ================================================ FILE: atlas-aapt/bionic/libc/include/bits/lockf.h ================================================ /* * Copyright (C) 2016 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _BITS_LOCKF_H_ #define _BITS_LOCKF_H_ #include #define F_ULOCK 0 #define F_LOCK 1 #define F_TLOCK 2 #define F_TEST 3 __BEGIN_DECLS #if defined(__USE_FILE_OFFSET64) int lockf(int, int, off_t) __RENAME(lockf64); #else int lockf(int, int, off_t); #endif int lockf64(int, int, off64_t); __END_DECLS #endif ================================================ FILE: atlas-aapt/bionic/libc/include/bits/posix_limits.h ================================================ /* * Copyright (C) 2014 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _BITS_POSIX_LIMITS_H_ #define _BITS_POSIX_LIMITS_H_ /* Any constant values here other than -1 or 200809L are explicitly specified by POSIX.1-2008. */ /* Keep it sorted. */ #define _POSIX_ADVISORY_INFO 200809L #define _POSIX_AIO_LISTIO_MAX 2 #define _POSIX_AIO_MAX 1 #define _POSIX_ARG_MAX 4096 #define _POSIX_ASYNCHRONOUS_IO -1 /* not implemented */ #define _POSIX_BARRIERS -1 /* not implemented */ #define _POSIX_CHILD_MAX 25 #define _POSIX_CHOWN_RESTRICTED 1 /* yes, chown requires appropriate privileges */ #define _POSIX_CLOCK_SELECTION 200809L #define _POSIX_CPUTIME 0 /* Use sysconf to detect support at runtime. */ #define _POSIX_DELAYTIMER_MAX 32 #define _POSIX_FSYNC 200809L /* fdatasync() supported */ #define _POSIX_HOST_NAME_MAX 255 #define _POSIX_IPV6 200809L #define _POSIX_JOB_CONTROL 1 /* job control is a Linux feature */ #define _POSIX_LINK_MAX 8 #define _POSIX_LOGIN_NAME_MAX 9 /* includes trailing NUL */ #define _POSIX_MAPPED_FILES 200809L /* mmap-ed files supported */ #define _POSIX_MAX_CANON 255 #define _POSIX_MAX_INPUT 255 #define _POSIX_MEMLOCK 200809L #define _POSIX_MEMLOCK_RANGE 200809L #define _POSIX_MEMORY_PROTECTION 200809L #define _POSIX_MESSAGE_PASSING -1 /* not implemented */ #define _POSIX_MONOTONIC_CLOCK 0 /* the monotonic clock may be available; ask sysconf */ #define _POSIX_MQ_OPEN_MAX 8 #define _POSIX_MQ_PRIO_MAX 32 #define _POSIX_NAME_MAX 14 #define _POSIX_NGROUPS_MAX 8 #define _POSIX_NO_TRUNC 1 /* very long pathnames generate an error */ #define _POSIX_OPEN_MAX 20 #define _POSIX_PATH_MAX 256 #define _POSIX_PIPE_BUF 512 #define _POSIX_PRIORITY_SCHEDULING 200809L /* priority scheduling is a Linux feature */ #define _POSIX_PRIORITIZED_IO -1 /* not implemented */ #define _POSIX_RAW_SOCKETS 200809L #define _POSIX_READER_WRITER_LOCKS 200809L #define _POSIX_REALTIME_SIGNALS 200809L #define _POSIX_REGEXP 1 #define _POSIX_RE_DUP_MAX 255 #define _POSIX_SAVED_IDS 1 /* saved user ids is a Linux feature */ #define _POSIX_SEMAPHORES 200809L #define _POSIX_SEM_NSEMS_MAX 256 #define _POSIX_SEM_VALUE_MAX 32767 #define _POSIX_SHARED_MEMORY_OBJECTS -1 /* shm_open()/shm_unlink() not implemented */ #define _POSIX_SHELL 1 /* system() supported */ #define _POSIX_SIGQUEUE_MAX 32 #define _POSIX_SPAWN -1 /* not implemented */ #define _POSIX_SPIN_LOCKS -1 /* not implemented */ #define _POSIX_SPORADIC_SERVER -1 /* not implemented */ #define _POSIX_SSIZE_MAX 32767 #define _POSIX_STREAM_MAX 8 #define _POSIX_SYMLINK_MAX 255 #define _POSIX_SYMLOOP_MAX 8 #define _POSIX_SYNCHRONIZED_IO 200809L /* synchronized i/o supported */ #define _POSIX_THREADS 200809L /* we support threads */ #define _POSIX_THREAD_ATTR_STACKADDR 200809L #define _POSIX_THREAD_ATTR_STACKSIZE 200809L #define _POSIX_THREAD_CPUTIME 0 /* Use sysconf to detect support at runtime. */ #define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 #define _POSIX_THREAD_KEYS_MAX 128 #define _POSIX_THREAD_PRIORITY_SCHEDULING 200809L #define _POSIX_THREAD_PRIO_INHERIT 200809L /* linux feature */ #define _POSIX_THREAD_PRIO_PROTECT 200809L /* linux feature */ #define _POSIX_THREAD_PROCESS_SHARED -1 /* not implemented */ #define _POSIX_THREAD_ROBUST_PRIO_INHERIT -1 /* not implemented */ #define _POSIX_THREAD_ROBUST_PRIO_PROTECT -1 /* not implemented */ #define _POSIX_THREAD_SAFE_FUNCTIONS 200809L #define _POSIX_THREAD_SPORADIC_SERVER -1 /* not implemented */ #define _POSIX_THREAD_THREADS_MAX 64 #define _POSIX_TIMEOUTS 200809L #define _POSIX_TIMERS 200809L /* Posix timers are supported */ #define _POSIX_TIMER_MAX 32 #define _POSIX_TRACE -1 /* not implemented */ #define _POSIX_TRACE_EVENT_FILTER -1 /* not implemented */ #define _POSIX_TRACE_INHERIT -1 /* not implemented */ #define _POSIX_TRACE_LOG -1 /* not implemented */ #define _POSIX_TRACE_NAME_MAX 8 #define _POSIX_TRACE_SYS_MAX 8 #define _POSIX_TRACE_USER_EVENT_MAX 32 #define _POSIX_TTY_NAME_MAX 9 /* includes trailing NUL */ #define _POSIX_TYPED_MEMORY_OBJECTS -1 /* not implemented */ #define _POSIX_TZNAME_MAX 6 #define _POSIX_VDISABLE '\0' #if defined(__LP64__) #define _POSIX_V7_ILP32_OFF32 -1 #define _POSIX_V7_ILP32_OFFBIG -1 #define _POSIX_V7_LP64_OFF64 1 #define _POSIX_V7_LPBIG_OFFBIG 1 #else #define _POSIX_V7_ILP32_OFF32 1 #define _POSIX_V7_ILP32_OFFBIG -1 #define _POSIX_V7_LP64_OFF64 -1 #define _POSIX_V7_LPBIG_OFFBIG -1 #endif #define _POSIX2_BC_BASE_MAX 99 #define _POSIX2_BC_DIM_MAX 2048 #define _POSIX2_BC_SCALE_MAX 99 #define _POSIX2_BC_STRING_MAX 1000 #define _POSIX2_CHARCLASS_NAME_MAX 14 #define _POSIX2_CHAR_TERM -1 /* not implemented */ #define _POSIX2_COLL_WEIGHTS_MAX 2 #define _POSIX2_C_BIND _POSIX_VERSION #define _POSIX2_C_DEV -1 /* c dev utilities not implemented */ #define _POSIX2_EXPR_NEST_MAX 32 #define _POSIX2_LINE_MAX 2048 #define _POSIX2_LOCALEDEF -1 /* localedef utilitiy not implemented */ #define _POSIX2_RE_DUP_MAX _POSIX_RE_DUP_MAX #define _POSIX2_SW_DEV -1 /* software dev utilities not implemented */ #define _POSIX2_UPE -1 /* user portability utilities not implemented */ #define _XOPEN_ENH_I18N -1 /* we don't support internationalization in the C library */ #define _XOPEN_CRYPT -1 /* don't support X/Open Encryption */ #define _XOPEN_IOV_MAX 16 #define _XOPEN_LEGACY -1 /* not support all */ #define _XOPEN_REALTIME -1 /* we don't support all these functions */ #define _XOPEN_REALTIME_THREADS -1 /* same here */ #define _XOPEN_SHM -1 #define _XOPEN_UNIX 1 #endif ================================================ FILE: atlas-aapt/bionic/libc/include/bits/pthread_types.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _BITS_PTHREAD_TYPES_H_ #define _BITS_PTHREAD_TYPES_H_ #include typedef long pthread_t; typedef struct { uint32_t flags; void* stack_base; size_t stack_size; size_t guard_size; int32_t sched_policy; int32_t sched_priority; #ifdef __LP64__ char __reserved[16]; #endif } pthread_attr_t; #endif ================================================ FILE: atlas-aapt/bionic/libc/include/bits/timespec.h ================================================ /* * Copyright (C) 2014 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _BITS_TIMESPEC_H_ #define _BITS_TIMESPEC_H_ #include /* * This file is used to include timespec definition without introducing the whole * , or . */ #ifndef _STRUCT_TIMESPEC #define _STRUCT_TIMESPEC struct timespec { time_t tv_sec; long tv_nsec; }; #endif #endif ================================================ FILE: atlas-aapt/bionic/libc/include/bits/wchar_limits.h ================================================ /* * Copyright (C) 2014 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _BITS_WCHAR_LIMITS_H_ #define _BITS_WCHAR_LIMITS_H_ /* Both GCC and clang define __WCHAR_MAX__. */ #define WCHAR_MAX __WCHAR_MAX__ /* As of 3.4, clang still doesn't define __WCHAR_MIN__. */ #if defined(__WCHAR_UNSIGNED__) # define WCHAR_MIN L'\0' #else # define WCHAR_MIN (-(WCHAR_MAX) - 1) #endif #endif ================================================ FILE: atlas-aapt/bionic/libc/include/byteswap.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _BYTESWAP_H_ #define _BYTESWAP_H_ #include #define bswap_16(x) __swap16(x) #define bswap_32(x) __swap32(x) #define bswap_64(x) __swap64(x) #endif /* _BYTESWAP_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/ctype.h ================================================ /* $OpenBSD: ctype.h,v 1.19 2005/12/13 00:35:22 millert Exp $ */ /* $NetBSD: ctype.h,v 1.14 1994/10/26 00:55:47 cgd Exp $ */ /* * Copyright (c) 1989 The Regents of the University of California. * All rights reserved. * (c) UNIX System Laboratories, Inc. * All or some portions of this file are derived from material licensed * to the University of California by American Telephone and Telegraph * Co. or Unix System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)ctype.h 5.3 (Berkeley) 4/3/91 */ #ifndef _CTYPE_H_ #define _CTYPE_H_ #include #include #define _CTYPE_U 0x01 #define _CTYPE_L 0x02 #define _CTYPE_D 0x04 #define _CTYPE_S 0x08 #define _CTYPE_P 0x10 #define _CTYPE_C 0x20 #define _CTYPE_X 0x40 #define _CTYPE_B 0x80 #define _CTYPE_R (_CTYPE_P|_CTYPE_U|_CTYPE_L|_CTYPE_D|_CTYPE_B) #define _CTYPE_A (_CTYPE_L|_CTYPE_U) __BEGIN_DECLS extern const char *_ctype_; #if defined(__GNUC__) || defined(_ANSI_LIBRARY) || defined(lint) int isalnum(int); int isalpha(int); int iscntrl(int); int isdigit(int); int isgraph(int); int islower(int); int isprint(int); int ispunct(int); int isspace(int); int isupper(int); int isxdigit(int); int tolower(int); int toupper(int); #if __ANDROID_API__ >= 21 int isalnum_l(int, locale_t); int isalpha_l(int, locale_t); int isblank_l(int, locale_t); int iscntrl_l(int, locale_t); int isdigit_l(int, locale_t); int isgraph_l(int, locale_t); int islower_l(int, locale_t); int isprint_l(int, locale_t); int ispunct_l(int, locale_t); int isspace_l(int, locale_t); int isupper_l(int, locale_t); int isxdigit_l(int, locale_t); int tolower_l(int, locale_t); int toupper_l(int, locale_t); #endif /* __ANDROID_API__ >= 21 */ #if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 || __POSIX_VISIBLE > 200112 \ || __XPG_VISIBLE > 600 int isblank(int); #endif #if __BSD_VISIBLE || __XPG_VISIBLE int isascii(int); int toascii(int); int _tolower(int); int _toupper(int); #endif /* __BSD_VISIBLE || __XPG_VISIBLE */ #endif /* __GNUC__ || _ANSI_LIBRARY || lint */ __END_DECLS #endif /* !_CTYPE_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/dirent.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _DIRENT_H_ #define _DIRENT_H_ #include #include __BEGIN_DECLS #ifndef DT_UNKNOWN #define DT_UNKNOWN 0 #define DT_FIFO 1 #define DT_CHR 2 #define DT_DIR 4 #define DT_BLK 6 #define DT_REG 8 #define DT_LNK 10 #define DT_SOCK 12 #define DT_WHT 14 #endif #define __DIRENT64_BODY \ uint64_t d_ino; \ int64_t d_off; \ unsigned short d_reclen; \ unsigned char d_type; \ char d_name[256]; \ struct dirent { __DIRENT64_BODY }; struct dirent64 { __DIRENT64_BODY }; #undef __DIRENT64_BODY /* glibc compatibility. */ #undef _DIRENT_HAVE_D_NAMLEN /* Linux doesn't have a d_namlen field. */ #define _DIRENT_HAVE_D_RECLEN #define _DIRENT_HAVE_D_OFF #define _DIRENT_HAVE_D_TYPE #define d_fileno d_ino typedef struct DIR DIR; extern DIR* opendir(const char*); extern DIR* fdopendir(int); extern struct dirent* readdir(DIR*); extern struct dirent64* readdir64(DIR*); extern int readdir_r(DIR*, struct dirent*, struct dirent**); extern int readdir64_r(DIR*, struct dirent64*, struct dirent64**); extern int closedir(DIR*); extern void rewinddir(DIR*); extern void seekdir(DIR*, long); extern long telldir(DIR*); extern int dirfd(DIR*); extern int alphasort(const struct dirent**, const struct dirent**); extern int alphasort64(const struct dirent64**, const struct dirent64**); extern int scandir64(const char*, struct dirent64***, int (*)(const struct dirent64*), int (*)(const struct dirent64**, const struct dirent64**)); extern int scandir(const char*, struct dirent***, int (*)(const struct dirent*), int (*)(const struct dirent**, const struct dirent**)); #if defined(__USE_GNU) int scandirat64(int, const char*, struct dirent64***, int (*)(const struct dirent64*), int (*)(const struct dirent64**, const struct dirent64**)); int scandirat(int, const char*, struct dirent***, int (*)(const struct dirent*), int (*)(const struct dirent**, const struct dirent**)); #endif __END_DECLS #endif /* _DIRENT_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/dlfcn.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef __DLFCN_H__ #define __DLFCN_H__ #include __BEGIN_DECLS typedef struct { const char *dli_fname; /* Pathname of shared object that contains address */ void *dli_fbase; /* Address at which shared object is loaded */ const char *dli_sname; /* Name of nearest symbol with address lower than addr */ void *dli_saddr; /* Exact address of symbol named in dli_sname */ } Dl_info; extern void* dlopen(const char* filename, int flag); extern int dlclose(void* handle); extern const char* dlerror(void); extern void* dlsym(void* handle, const char* symbol) __nonnull((2)); extern void* dlvsym(void* handle, const char* symbol, const char* version) __nonnull((2, 3)); extern int dladdr(const void* addr, Dl_info *info); enum { #if defined(__LP64__) RTLD_NOW = 2, #else RTLD_NOW = 0, #endif RTLD_LAZY = 1, RTLD_LOCAL = 0, #if defined(__LP64__) RTLD_GLOBAL = 0x00100, #else RTLD_GLOBAL = 2, #endif RTLD_NOLOAD = 4, RTLD_NODELETE = 0x01000, }; #if defined (__LP64__) #define RTLD_DEFAULT ((void*) 0) #define RTLD_NEXT ((void*) -1L) #else #define RTLD_DEFAULT ((void*) 0xffffffff) #define RTLD_NEXT ((void*) 0xfffffffe) #endif __END_DECLS #endif /* __DLFCN_H */ ================================================ FILE: atlas-aapt/bionic/libc/include/elf.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _ELF_H #define _ELF_H #include #include #include #include #define ELF32_R_INFO(sym, type) ((((Elf32_Word)sym) << 8) | ((type) & 0xff)) #define ELF64_R_INFO(sym, type) ((((Elf64_Xword)sym) << 32) | ((type) & 0xffffffff)) typedef __s64 Elf32_Sxword; typedef struct { __u32 a_type; union { __u32 a_val; } a_un; } Elf32_auxv_t; typedef struct { __u64 a_type; union { __u64 a_val; } a_un; } Elf64_auxv_t; typedef Elf32_Half Elf32_Versym; typedef Elf64_Half Elf64_Versym; typedef struct { Elf32_Half vd_version; Elf32_Half vd_flags; Elf32_Half vd_ndx; Elf32_Half vd_cnt; Elf32_Word vd_hash; Elf32_Word vd_aux; Elf32_Word vd_next; } Elf32_Verdef; typedef struct { Elf32_Word vda_name; Elf32_Word vda_next; } Elf32_Verdaux; typedef struct { Elf64_Half vd_version; Elf64_Half vd_flags; Elf64_Half vd_ndx; Elf64_Half vd_cnt; Elf64_Word vd_hash; Elf64_Word vd_aux; Elf64_Word vd_next; } Elf64_Verdef; typedef struct { Elf64_Word vda_name; Elf64_Word vda_next; } Elf64_Verdaux; typedef struct { Elf32_Half vn_version; Elf32_Half vn_cnt; Elf32_Word vn_file; Elf32_Word vn_aux; Elf32_Word vn_next; } Elf32_Verneed; typedef struct { Elf32_Word vna_hash; Elf32_Half vna_flags; Elf32_Half vna_other; Elf32_Word vna_name; Elf32_Word vna_next; } Elf32_Vernaux; typedef struct { Elf64_Half vn_version; Elf64_Half vn_cnt; Elf64_Word vn_file; Elf64_Word vn_aux; Elf64_Word vn_next; } Elf64_Verneed; typedef struct { Elf64_Word vna_hash; Elf64_Half vna_flags; Elf64_Half vna_other; Elf64_Word vna_name; Elf64_Word vna_next; } Elf64_Vernaux; #define DF_ORIGIN 0x00000001 #define DF_SYMBOLIC 0x00000002 #define DF_TEXTREL 0x00000004 #define DF_BIND_NOW 0x00000008 #define DF_STATIC_TLS 0x00000010 #define DF_1_NOW 0x00000001 /* Perform complete relocation processing. */ #define DF_1_GLOBAL 0x00000002 /* implies RTLD_GLOBAL */ #define DF_1_GROUP 0x00000004 #define DF_1_NODELETE 0x00000008 /* implies RTLD_NODELETE */ #define DF_1_LOADFLTR 0x00000010 #define DF_1_INITFIRST 0x00000020 #define DF_1_NOOPEN 0x00000040 /* Object can not be used with dlopen(3) */ #define DF_1_ORIGIN 0x00000080 #define DF_1_DIRECT 0x00000100 #define DF_1_TRANS 0x00000200 #define DF_1_INTERPOSE 0x00000400 #define DF_1_NODEFLIB 0x00000800 #define DF_1_NODUMP 0x00001000 /* Object cannot be dumped with dldump(3) */ #define DF_1_CONFALT 0x00002000 #define DF_1_ENDFILTEE 0x00004000 #define DF_1_DISPRELDNE 0x00008000 #define DF_1_DISPRELPND 0x00010000 #define DF_1_NODIRECT 0x00020000 #define DF_1_IGNMULDEF 0x00040000 /* Internal use */ #define DF_1_NOKSYMS 0x00080000 /* Internal use */ #define DF_1_NOHDR 0x00100000 /* Internal use */ #define DF_1_EDITED 0x00200000 #define DF_1_NORELOC 0x00400000 /* Internal use */ #define DF_1_SYMINTPOSE 0x00800000 #define DF_1_GLOBAUDIT 0x01000000 #define DF_1_SINGLETON 0x02000000 #define DF_1_STUB 0x04000000 #define DF_1_PIE 0x08000000 #define DT_BIND_NOW 24 #define DT_INIT_ARRAY 25 #define DT_FINI_ARRAY 26 #define DT_INIT_ARRAYSZ 27 #define DT_FINI_ARRAYSZ 28 #define DT_RUNPATH 29 #define DT_FLAGS 30 /* glibc and BSD disagree for DT_ENCODING; glibc looks wrong. */ #define DT_PREINIT_ARRAY 32 #define DT_PREINIT_ARRAYSZ 33 /* Android compressed rel/rela sections */ #define DT_ANDROID_REL (DT_LOOS + 2) #define DT_ANDROID_RELSZ (DT_LOOS + 3) #define DT_ANDROID_RELA (DT_LOOS + 4) #define DT_ANDROID_RELASZ (DT_LOOS + 5) /* gnu hash entry */ #define DT_GNU_HASH 0x6ffffef5 #define ELFOSABI_SYSV 0 /* Synonym for ELFOSABI_NONE used by valgrind. */ #define PT_GNU_RELRO 0x6474e552 #define STB_LOOS 10 #define STB_HIOS 12 #define STB_LOPROC 13 #define STB_HIPROC 15 #define SHT_LOOS 0x60000000 #define SHT_HIOS 0x6fffffff #define STT_GNU_IFUNC 10 #define STT_LOOS 10 #define STT_HIOS 12 #define STT_LOPROC 13 #define STT_HIPROC 15 #define STV_DEFAULT 0 #define STV_INTERNAL 1 #define STV_HIDDEN 2 #define STV_PROTECTED 3 /* The kernel uses NT_PRFPREG but glibc also offers NT_FPREGSET */ #define NT_FPREGSET NT_PRFPREG #define ELF_NOTE_GNU "GNU" #define NT_GNU_BUILD_ID 3 #define VER_FLG_BASE 0x1 #define VER_FLG_WEAK 0x2 #define VER_NDX_LOCAL 0 #define VER_NDX_GLOBAL 1 #endif /* _ELF_H */ ================================================ FILE: atlas-aapt/bionic/libc/include/endian.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _ENDIAN_H_ #define _ENDIAN_H_ #include #endif /* _ENDIAN_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/err.h ================================================ /* $OpenBSD: err.h,v 1.10 2006/01/06 18:53:04 millert Exp $ */ /* $NetBSD: err.h,v 1.11 1994/10/26 00:55:52 cgd Exp $ */ /*- * Copyright (c) 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)err.h 8.1 (Berkeley) 6/2/93 */ #ifndef _ERR_H_ #define _ERR_H_ #include #include __BEGIN_DECLS /* printf's format string isn't nullable; the err family's one is, * so we can't use __errlike here. */ #define __errlike(x, y) __attribute__((__format__(printf, x, y))) __noreturn void err(int, const char *, ...) __errlike(2, 3); __noreturn void verr(int, const char *, __va_list) __errlike(2, 0); __noreturn void errx(int, const char *, ...) __errlike(2, 3); __noreturn void verrx(int, const char *, __va_list) __errlike(2, 0); void warn(const char *, ...) __errlike(1, 2); void vwarn(const char *, __va_list) __errlike(1, 0); void warnx(const char *, ...) __errlike(1, 2); void vwarnx(const char *, __va_list) __errlike(1, 0); __END_DECLS #endif /* !_ERR_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/errno.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _ERRNO_H #define _ERRNO_H #include #include __BEGIN_DECLS /* on Linux, ENOTSUP and EOPNOTSUPP are defined as the same error code * even if 1000.3 states that they should be different */ #ifndef ENOTSUP #define ENOTSUP EOPNOTSUPP #endif /* internal function returning the address of the thread-specific errno */ extern volatile int* __errno(void) __pure2; /* a macro expanding to the errno l-value */ #define errno (*__errno()) #if __ANDROID_API__ < 21 #include #endif __END_DECLS #endif /* _ERRNO_H */ ================================================ FILE: atlas-aapt/bionic/libc/include/error.h ================================================ /* * Copyright (C) 2015 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _ERROR_H #define _ERROR_H 1 #include __BEGIN_DECLS void error(int, int, const char*, ...) __printflike(3, 4); void error_at_line(int, int, const char*, unsigned int, const char*, ...) __printflike(5, 6); extern void (*error_print_progname)(void); extern unsigned int error_message_count; extern int error_one_per_line; __END_DECLS #endif ================================================ FILE: atlas-aapt/bionic/libc/include/fcntl.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _FCNTL_H #define _FCNTL_H #include #include #include #include #include #include #if defined(__USE_GNU) || defined(__USE_BSD) #include #endif __BEGIN_DECLS #ifdef __LP64__ /* LP64 kernels don't have F_*64 defines because their flock is 64-bit. */ #define F_GETLK64 F_GETLK #define F_SETLK64 F_SETLK #define F_SETLKW64 F_SETLKW #endif #define O_ASYNC FASYNC #define O_RSYNC O_SYNC #define SPLICE_F_MOVE 1 #define SPLICE_F_NONBLOCK 2 #define SPLICE_F_MORE 4 #define SPLICE_F_GIFT 8 #define SYNC_FILE_RANGE_WAIT_BEFORE 1 #define SYNC_FILE_RANGE_WRITE 2 #define SYNC_FILE_RANGE_WAIT_AFTER 4 extern int creat(const char*, mode_t); extern int creat64(const char*, mode_t); extern int fcntl(int, int, ...); extern int openat(int, const char*, int, ...); extern int openat64(int, const char*, int, ...); extern int open(const char*, int, ...); extern int open64(const char*, int, ...); extern ssize_t splice(int, off64_t*, int, off64_t*, size_t, unsigned int); extern ssize_t tee(int, int, size_t, unsigned int); extern int unlinkat(int, const char*, int); extern ssize_t vmsplice(int, const struct iovec*, size_t, unsigned int); #if defined(__USE_FILE_OFFSET64) extern int fallocate(int, int, off_t, off_t) __RENAME(fallocate64); extern int posix_fadvise(int, off_t, off_t, int) __RENAME(posix_fadvise64); extern int posix_fallocate(int, off_t, off_t) __RENAME(posix_fallocate); #else extern int fallocate(int, int, off_t, off_t); extern int posix_fadvise(int, off_t, off_t, int); extern int posix_fallocate(int, off_t, off_t); #endif extern int fallocate64(int, int, off64_t, off64_t); extern int posix_fadvise64(int, off64_t, off64_t, int); extern int posix_fallocate64(int, off64_t, off64_t); extern int __open_2(const char*, int); extern int __open_real(const char*, int, ...) __RENAME(open); extern int __openat_2(int, const char*, int); extern int __openat_real(int, const char*, int, ...) __RENAME(openat); __errordecl(__creat_missing_mode, "called with O_CREAT, but missing mode"); __errordecl(__creat_too_many_args, "too many arguments"); #if defined(__BIONIC_FORTIFY) #if !defined(__clang__) __BIONIC_FORTIFY_INLINE int open(const char* pathname, int flags, ...) { if (__builtin_constant_p(flags)) { if ((flags & O_CREAT) && __builtin_va_arg_pack_len() == 0) { __creat_missing_mode(); // compile time error } } if (__builtin_va_arg_pack_len() > 1) { __creat_too_many_args(); // compile time error } if ((__builtin_va_arg_pack_len() == 0) && !__builtin_constant_p(flags)) { return __open_2(pathname, flags); } return __open_real(pathname, flags, __builtin_va_arg_pack()); } __BIONIC_FORTIFY_INLINE int openat(int dirfd, const char* pathname, int flags, ...) { if (__builtin_constant_p(flags)) { if ((flags & O_CREAT) && __builtin_va_arg_pack_len() == 0) { __creat_missing_mode(); // compile time error } } if (__builtin_va_arg_pack_len() > 1) { __creat_too_many_args(); // compile time error } if ((__builtin_va_arg_pack_len() == 0) && !__builtin_constant_p(flags)) { return __openat_2(dirfd, pathname, flags); } return __openat_real(dirfd, pathname, flags, __builtin_va_arg_pack()); } #endif /* !defined(__clang__) */ #endif /* defined(__BIONIC_FORTIFY) */ __END_DECLS #endif /* _FCNTL_H */ ================================================ FILE: atlas-aapt/bionic/libc/include/features.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _FEATURES_H_ #define _FEATURES_H_ /* Our macro fun is all in . */ #include #endif /* _FEATURES_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/fnmatch.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _FNMATCH_H #define _FNMATCH_H #include __BEGIN_DECLS #define FNM_NOMATCH 1 /* Match failed. */ #define FNM_NOSYS 2 /* Function not supported (unused). */ #define FNM_NOESCAPE 0x01 /* Disable backslash escaping. */ #define FNM_PATHNAME 0x02 /* Slash must be matched by slash. */ #define FNM_PERIOD 0x04 /* Period must be matched by period. */ #define FNM_LEADING_DIR 0x08 /* Ignore / after Imatch. */ #define FNM_CASEFOLD 0x10 /* Case insensitive search. */ #define FNM_IGNORECASE FNM_CASEFOLD #define FNM_FILE_NAME FNM_PATHNAME extern int fnmatch(const char *pattern, const char *string, int flags); __END_DECLS #endif /* _FNMATCH_H */ ================================================ FILE: atlas-aapt/bionic/libc/include/fts.h ================================================ /* $OpenBSD: fts.h,v 1.12 2009/08/27 16:19:27 millert Exp $ */ /* $NetBSD: fts.h,v 1.5 1994/12/28 01:41:50 mycroft Exp $ */ /* * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)fts.h 8.3 (Berkeley) 8/14/94 */ #ifndef _FTS_H_ #define _FTS_H_ #include typedef struct { struct _ftsent *fts_cur; /* current node */ struct _ftsent *fts_child; /* linked list of children */ struct _ftsent **fts_array; /* sort array */ dev_t fts_dev; /* starting device # */ char *fts_path; /* path for this descent */ int fts_rfd; /* fd for root */ size_t fts_pathlen; /* sizeof(path) */ int fts_nitems; /* elements in the sort array */ int (*fts_compar)(); /* compare function */ #define FTS_COMFOLLOW 0x0001 /* follow command line symlinks */ #define FTS_LOGICAL 0x0002 /* logical walk */ #define FTS_NOCHDIR 0x0004 /* don't change directories */ #define FTS_NOSTAT 0x0008 /* don't get stat info */ #define FTS_PHYSICAL 0x0010 /* physical walk */ #define FTS_SEEDOT 0x0020 /* return dot and dot-dot */ #define FTS_XDEV 0x0040 /* don't cross devices */ #define FTS_OPTIONMASK 0x00ff /* valid user option mask */ #define FTS_NAMEONLY 0x1000 /* (private) child names only */ #define FTS_STOP 0x2000 /* (private) unrecoverable error */ int fts_options; /* fts_open options, global flags */ } FTS; typedef struct _ftsent { struct _ftsent *fts_cycle; /* cycle node */ struct _ftsent *fts_parent; /* parent directory */ struct _ftsent *fts_link; /* next file in directory */ long fts_number; /* local numeric value */ void *fts_pointer; /* local address value */ char *fts_accpath; /* access path */ char *fts_path; /* root path */ int fts_errno; /* errno for this node */ int fts_symfd; /* fd for symlink */ size_t fts_pathlen; /* strlen(fts_path) */ size_t fts_namelen; /* strlen(fts_name) */ ino_t fts_ino; /* inode */ dev_t fts_dev; /* device */ nlink_t fts_nlink; /* link count */ #define FTS_ROOTPARENTLEVEL -1 #define FTS_ROOTLEVEL 0 #define FTS_MAXLEVEL 0x7fff short fts_level; /* depth (-1 to N) */ #define FTS_D 1 /* preorder directory */ #define FTS_DC 2 /* directory that causes cycles */ #define FTS_DEFAULT 3 /* none of the above */ #define FTS_DNR 4 /* unreadable directory */ #define FTS_DOT 5 /* dot or dot-dot */ #define FTS_DP 6 /* postorder directory */ #define FTS_ERR 7 /* error; errno is set */ #define FTS_F 8 /* regular file */ #define FTS_INIT 9 /* initialized only */ #define FTS_NS 10 /* stat(2) failed */ #define FTS_NSOK 11 /* no stat(2) requested */ #define FTS_SL 12 /* symbolic link */ #define FTS_SLNONE 13 /* symbolic link without target */ unsigned short fts_info; /* user flags for FTSENT structure */ #define FTS_DONTCHDIR 0x01 /* don't chdir .. to the parent */ #define FTS_SYMFOLLOW 0x02 /* followed a symlink to get here */ unsigned short fts_flags; /* private flags for FTSENT structure */ #define FTS_AGAIN 1 /* read node again */ #define FTS_FOLLOW 2 /* follow symbolic link */ #define FTS_NOINSTR 3 /* no instructions */ #define FTS_SKIP 4 /* discard node */ unsigned short fts_instr; /* fts_set() instructions */ struct stat *fts_statp; /* stat(2) information */ char fts_name[1]; /* file name */ } FTSENT; __BEGIN_DECLS FTSENT *fts_children(FTS *, int); int fts_close(FTS *); FTS *fts_open(char * const *, int, int (*)(const FTSENT **, const FTSENT **)); FTSENT *fts_read(FTS *); int fts_set(FTS *, FTSENT *, int); __END_DECLS #endif /* !_FTS_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/ftw.h ================================================ /* $NetBSD: ftw.h,v 1.1 2005/12/30 23:07:33 agc Exp $ */ /* From OpenBSD: ftw.h,v 1.1 2003/07/21 21:13:18 millert Exp */ /* * Copyright (c) 2003 Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Sponsored in part by the Defense Advanced Research Projects * Agency (DARPA) and Air Force Research Laboratory, Air Force * Materiel Command, USAF, under agreement number F39502-99-1-0512. */ #ifndef _FTW_H #define _FTW_H #include #include /* * Valid flags for the 3rd argument to the function that is passed as the * second argument to ftw(3) and nftw(3). Say it three times fast! */ #define FTW_F 0 /* File. */ #define FTW_D 1 /* Directory. */ #define FTW_DNR 2 /* Directory without read permission. */ #define FTW_DP 3 /* Directory with subdirectories visited. */ #define FTW_NS 4 /* Unknown type; stat() failed. */ #define FTW_SL 5 /* Symbolic link. */ #define FTW_SLN 6 /* Sym link that names a nonexistent file. */ /* * Flags for use as the 4th argument to nftw(3). These may be ORed together. */ #define FTW_PHYS 0x01 /* Physical walk, don't follow sym links. */ #define FTW_MOUNT 0x02 /* The walk does not cross a mount point. */ #define FTW_DEPTH 0x04 /* Subdirs visited before the dir itself. */ #define FTW_CHDIR 0x08 /* Change to a directory before reading it. */ struct FTW { int base; int level; }; __BEGIN_DECLS int ftw(const char *, int (*)(const char *, const struct stat *, int), int); int nftw(const char *, int (*)(const char *, const struct stat *, int, struct FTW *), int, int); int ftw64(const char *, int (*)(const char *, const struct stat64 *, int), int); int nftw64(const char *, int (*)(const char *, const struct stat64 *, int, struct FTW *), int, int); __END_DECLS #endif /* !_FTW_H */ ================================================ FILE: atlas-aapt/bionic/libc/include/getopt.h ================================================ /* $NetBSD: getopt.h,v 1.4 2000/07/07 10:43:54 ad Exp $ */ /* $FreeBSD$ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Dieter Baron and Thomas Klausner. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef _GETOPT_H_ #define _GETOPT_H_ #include /* * GNU-like getopt_long()/getopt_long_only() with 4.4BSD optreset extension. * getopt() is declared here too for GNU programs. */ #define no_argument 0 #define required_argument 1 #define optional_argument 2 struct option { /* name of long option */ const char *name; /* * one of no_argument, required_argument, and optional_argument: * whether option takes an argument */ int has_arg; /* if not NULL, set *flag to val when option found */ int *flag; /* if flag not NULL, value to set *flag to; else return value */ int val; }; __BEGIN_DECLS int getopt_long(int, char * const *, const char *, const struct option *, int *); int getopt_long_only(int, char * const *, const char *, const struct option *, int *); #ifndef _GETOPT_DECLARED #define _GETOPT_DECLARED int getopt(int, char * const [], const char *); extern char *optarg; /* getopt(3) external variables */ extern int optind, opterr, optopt; #endif #ifndef _OPTRESET_DECLARED #define _OPTRESET_DECLARED extern int optreset; /* getopt(3) external variable */ #endif __END_DECLS #endif /* !_GETOPT_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/grp.h ================================================ /* $OpenBSD: grp.h,v 1.8 2005/12/13 00:35:22 millert Exp $ */ /* $NetBSD: grp.h,v 1.7 1995/04/29 05:30:40 cgd Exp $ */ /*- * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. * (c) UNIX System Laboratories, Inc. * All or some portions of this file are derived from material licensed * to the University of California by American Telephone and Telegraph * Co. or Unix System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)grp.h 8.2 (Berkeley) 1/21/94 */ #ifndef _GRP_H_ #define _GRP_H_ #include #include struct group { char *gr_name; /* group name */ char *gr_passwd; /* group password */ gid_t gr_gid; /* group id */ char **gr_mem; /* group members */ }; __BEGIN_DECLS struct group *getgrgid(gid_t); struct group *getgrnam(const char *); #if __POSIX_VISIBLE >= 200112 || __XPG_VISIBLE struct group *getgrent(void) __attribute__((deprecated("getgrent is meaningless on Android"))); void setgrent(void) __attribute__((deprecated("setgrent is meaningless on Android"))); void endgrent(void) __attribute__((deprecated("endgrent is meaningless on Android"))); int getgrgid_r(gid_t, struct group *, char *, size_t, struct group **); int getgrnam_r(const char *, struct group *, char *, size_t, struct group **); #endif int getgrouplist (const char *user, gid_t group, gid_t *groups, int *ngroups); int initgroups (const char *user, gid_t group); __END_DECLS #endif /* !_GRP_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/ifaddrs.h ================================================ /* * Copyright (C) 2015 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _IFADDRS_H_ #define _IFADDRS_H_ #include #include #include __BEGIN_DECLS struct ifaddrs { struct ifaddrs* ifa_next; char* ifa_name; unsigned int ifa_flags; struct sockaddr* ifa_addr; struct sockaddr* ifa_netmask; union { struct sockaddr* ifu_broadaddr; struct sockaddr* ifu_dstaddr; } ifa_ifu; void* ifa_data; }; #define ifa_broadaddr ifa_ifu.ifu_broadaddr #define ifa_dstaddr ifa_ifu.ifu_dstaddr void freeifaddrs(struct ifaddrs*); int getifaddrs(struct ifaddrs**); __END_DECLS #endif ================================================ FILE: atlas-aapt/bionic/libc/include/inttypes.h ================================================ /* $OpenBSD: inttypes.h,v 1.9 2006/01/15 00:47:51 millert Exp $ */ /* * Copyright (c) 1997, 2005 Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifndef _INTTYPES_H_ #define _INTTYPES_H_ #include #include #ifdef __LP64__ #define __PRI_64_prefix "l" #define __PRI_PTR_prefix "l" #else #define __PRI_64_prefix "ll" #define __PRI_PTR_prefix #endif /* * 7.8.1 Macros for format specifiers * * Each of the following object-like macros expands to a string * literal containing a conversion specifier, possibly modified by * a prefix such as hh, h, l, or ll, suitable for use within the * format argument of a formatted input/output function when * converting the corresponding integer type. These macro names * have the general form of PRI (character string literals for the * fprintf family) or SCN (character string literals for the fscanf * family), followed by the conversion specifier, followed by a * name corresponding to a similar typedef name. For example, * PRIdFAST32 can be used in a format string to print the value of * an integer of type int_fast32_t. */ /* fprintf macros for signed integers */ #define PRId8 "d" /* int8_t */ #define PRId16 "d" /* int16_t */ #define PRId32 "d" /* int32_t */ #define PRId64 __PRI_64_prefix"d" /* int64_t */ #define PRIdLEAST8 "d" /* int_least8_t */ #define PRIdLEAST16 "d" /* int_least16_t */ #define PRIdLEAST32 "d" /* int_least32_t */ #define PRIdLEAST64 __PRI_64_prefix"d" /* int_least64_t */ #define PRIdFAST8 "d" /* int_fast8_t */ #define PRIdFAST16 "d" /* int_fast16_t */ #define PRIdFAST32 "d" /* int_fast32_t */ #define PRIdFAST64 __PRI_64_prefix"d" /* int_fast64_t */ #define PRIdMAX "jd" /* intmax_t */ #define PRIdPTR __PRI_PTR_prefix"d" /* intptr_t */ #define PRIi8 "i" /* int8_t */ #define PRIi16 "i" /* int16_t */ #define PRIi32 "i" /* int32_t */ #define PRIi64 __PRI_64_prefix"i" /* int64_t */ #define PRIiLEAST8 "i" /* int_least8_t */ #define PRIiLEAST16 "i" /* int_least16_t */ #define PRIiLEAST32 "i" /* int_least32_t */ #define PRIiLEAST64 __PRI_64_prefix"i" /* int_least64_t */ #define PRIiFAST8 "i" /* int_fast8_t */ #define PRIiFAST16 "i" /* int_fast16_t */ #define PRIiFAST32 "i" /* int_fast32_t */ #define PRIiFAST64 __PRI_64_prefix"i" /* int_fast64_t */ #define PRIiMAX "ji" /* intmax_t */ #define PRIiPTR __PRI_PTR_prefix"i" /* intptr_t */ /* fprintf macros for unsigned integers */ #define PRIo8 "o" /* int8_t */ #define PRIo16 "o" /* int16_t */ #define PRIo32 "o" /* int32_t */ #define PRIo64 __PRI_64_prefix"o" /* int64_t */ #define PRIoLEAST8 "o" /* int_least8_t */ #define PRIoLEAST16 "o" /* int_least16_t */ #define PRIoLEAST32 "o" /* int_least32_t */ #define PRIoLEAST64 __PRI_64_prefix"o" /* int_least64_t */ #define PRIoFAST8 "o" /* int_fast8_t */ #define PRIoFAST16 "o" /* int_fast16_t */ #define PRIoFAST32 "o" /* int_fast32_t */ #define PRIoFAST64 __PRI_64_prefix"o" /* int_fast64_t */ #define PRIoMAX "jo" /* intmax_t */ #define PRIoPTR __PRI_PTR_prefix"o" /* intptr_t */ #define PRIu8 "u" /* uint8_t */ #define PRIu16 "u" /* uint16_t */ #define PRIu32 "u" /* uint32_t */ #define PRIu64 __PRI_64_prefix"u" /* uint64_t */ #define PRIuLEAST8 "u" /* uint_least8_t */ #define PRIuLEAST16 "u" /* uint_least16_t */ #define PRIuLEAST32 "u" /* uint_least32_t */ #define PRIuLEAST64 __PRI_64_prefix"u" /* uint_least64_t */ #define PRIuFAST8 "u" /* uint_fast8_t */ #define PRIuFAST16 "u" /* uint_fast16_t */ #define PRIuFAST32 "u" /* uint_fast32_t */ #define PRIuFAST64 __PRI_64_prefix"u" /* uint_fast64_t */ #define PRIuMAX "ju" /* uintmax_t */ #define PRIuPTR __PRI_PTR_prefix"u" /* uintptr_t */ #define PRIx8 "x" /* uint8_t */ #define PRIx16 "x" /* uint16_t */ #define PRIx32 "x" /* uint32_t */ #define PRIx64 __PRI_64_prefix"x" /* uint64_t */ #define PRIxLEAST8 "x" /* uint_least8_t */ #define PRIxLEAST16 "x" /* uint_least16_t */ #define PRIxLEAST32 "x" /* uint_least32_t */ #define PRIxLEAST64 __PRI_64_prefix"x" /* uint_least64_t */ #define PRIxFAST8 "x" /* uint_fast8_t */ #define PRIxFAST16 "x" /* uint_fast16_t */ #define PRIxFAST32 "x" /* uint_fast32_t */ #define PRIxFAST64 __PRI_64_prefix"x" /* uint_fast64_t */ #define PRIxMAX "jx" /* uintmax_t */ #define PRIxPTR __PRI_PTR_prefix"x" /* uintptr_t */ #define PRIX8 "X" /* uint8_t */ #define PRIX16 "X" /* uint16_t */ #define PRIX32 "X" /* uint32_t */ #define PRIX64 __PRI_64_prefix"X" /* uint64_t */ #define PRIXLEAST8 "X" /* uint_least8_t */ #define PRIXLEAST16 "X" /* uint_least16_t */ #define PRIXLEAST32 "X" /* uint_least32_t */ #define PRIXLEAST64 __PRI_64_prefix"X" /* uint_least64_t */ #define PRIXFAST8 "X" /* uint_fast8_t */ #define PRIXFAST16 "X" /* uint_fast16_t */ #define PRIXFAST32 "X" /* uint_fast32_t */ #define PRIXFAST64 __PRI_64_prefix"X" /* uint_fast64_t */ #define PRIXMAX "jX" /* uintmax_t */ #define PRIXPTR __PRI_PTR_prefix"X" /* uintptr_t */ /* fscanf macros for signed integers */ #define SCNd8 "hhd" /* int8_t */ #define SCNd16 "hd" /* int16_t */ #define SCNd32 "d" /* int32_t */ #define SCNd64 __PRI_64_prefix"d" /* int64_t */ #define SCNdLEAST8 "hhd" /* int_least8_t */ #define SCNdLEAST16 "hd" /* int_least16_t */ #define SCNdLEAST32 "d" /* int_least32_t */ #define SCNdLEAST64 __PRI_64_prefix"d" /* int_least64_t */ #define SCNdFAST8 "hhd" /* int_fast8_t */ #define SCNdFAST16 "hd" /* int_fast16_t */ #define SCNdFAST32 "d" /* int_fast32_t */ #define SCNdFAST64 __PRI_64_prefix"d" /* int_fast64_t */ #define SCNdMAX "jd" /* intmax_t */ #define SCNdPTR __PRI_PTR_prefix"d" /* intptr_t */ #define SCNi8 "hhi" /* int8_t */ #define SCNi16 "hi" /* int16_t */ #define SCNi32 "i" /* int32_t */ #define SCNi64 __PRI_64_prefix"i" /* int64_t */ #define SCNiLEAST8 "hhi" /* int_least8_t */ #define SCNiLEAST16 "hi" /* int_least16_t */ #define SCNiLEAST32 "i" /* int_least32_t */ #define SCNiLEAST64 __PRI_64_prefix"i" /* int_least64_t */ #define SCNiFAST8 "hhi" /* int_fast8_t */ #define SCNiFAST16 "hi" /* int_fast16_t */ #define SCNiFAST32 "i" /* int_fast32_t */ #define SCNiFAST64 __PRI_64_prefix"i" /* int_fast64_t */ #define SCNiMAX "ji" /* intmax_t */ #define SCNiPTR __PRI_PTR_prefix"i" /* intptr_t */ /* fscanf macros for unsigned integers */ #define SCNo8 "hho" /* uint8_t */ #define SCNo16 "ho" /* uint16_t */ #define SCNo32 "o" /* uint32_t */ #define SCNo64 __PRI_64_prefix"o" /* uint64_t */ #define SCNoLEAST8 "hho" /* uint_least8_t */ #define SCNoLEAST16 "ho" /* uint_least16_t */ #define SCNoLEAST32 "o" /* uint_least32_t */ #define SCNoLEAST64 __PRI_64_prefix"o" /* uint_least64_t */ #define SCNoFAST8 "hho" /* uint_fast8_t */ #define SCNoFAST16 "ho" /* uint_fast16_t */ #define SCNoFAST32 "o" /* uint_fast32_t */ #define SCNoFAST64 __PRI_64_prefix"o" /* uint_fast64_t */ #define SCNoMAX "jo" /* uintmax_t */ #define SCNoPTR __PRI_PTR_prefix"o" /* uintptr_t */ #define SCNu8 "hhu" /* uint8_t */ #define SCNu16 "hu" /* uint16_t */ #define SCNu32 "u" /* uint32_t */ #define SCNu64 __PRI_64_prefix"u" /* uint64_t */ #define SCNuLEAST8 "hhu" /* uint_least8_t */ #define SCNuLEAST16 "hu" /* uint_least16_t */ #define SCNuLEAST32 "u" /* uint_least32_t */ #define SCNuLEAST64 __PRI_64_prefix"u" /* uint_least64_t */ #define SCNuFAST8 "hhu" /* uint_fast8_t */ #define SCNuFAST16 "hu" /* uint_fast16_t */ #define SCNuFAST32 "u" /* uint_fast32_t */ #define SCNuFAST64 __PRI_64_prefix"u" /* uint_fast64_t */ #define SCNuMAX "ju" /* uintmax_t */ #define SCNuPTR __PRI_PTR_prefix"u" /* uintptr_t */ #define SCNx8 "hhx" /* uint8_t */ #define SCNx16 "hx" /* uint16_t */ #define SCNx32 "x" /* uint32_t */ #define SCNx64 __PRI_64_prefix"x" /* uint64_t */ #define SCNxLEAST8 "hhx" /* uint_least8_t */ #define SCNxLEAST16 "hx" /* uint_least16_t */ #define SCNxLEAST32 "x" /* uint_least32_t */ #define SCNxLEAST64 __PRI_64_prefix"x" /* uint_least64_t */ #define SCNxFAST8 "hhx" /* uint_fast8_t */ #define SCNxFAST16 "hx" /* uint_fast16_t */ #define SCNxFAST32 "x" /* uint_fast32_t */ #define SCNxFAST64 __PRI_64_prefix"x" /* uint_fast64_t */ #define SCNxMAX "jx" /* uintmax_t */ #define SCNxPTR __PRI_PTR_prefix"x" /* uintptr_t */ typedef struct { intmax_t quot; /* quotient */ intmax_t rem; /* remainder */ } imaxdiv_t; __BEGIN_DECLS intmax_t imaxabs(intmax_t) __pure2; imaxdiv_t imaxdiv(intmax_t, intmax_t) __pure2; intmax_t strtoimax(const char *, char **, int); uintmax_t strtoumax(const char *, char **, int); intmax_t wcstoimax(const wchar_t * __restrict, wchar_t ** __restrict, int); uintmax_t wcstoumax(const wchar_t * __restrict, wchar_t ** __restrict, int); __END_DECLS #endif /* _INTTYPES_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/lastlog.h ================================================ ================================================ FILE: atlas-aapt/bionic/libc/include/libgen.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _LIBGEN_H #define _LIBGEN_H #include #include __BEGIN_DECLS /* * Including will get you the GNU basename, unless is * included, either before or after including . * * Note that this has the wrong argument cv-qualifiers, but doesn't modify its * input and uses thread-local storage for the result if necessary. */ extern char* __posix_basename(const char*) __RENAME(basename); #define basename __posix_basename /* This has the wrong argument cv-qualifiers, but doesn't modify its input and uses thread-local storage for the result if necessary. */ extern char* dirname(const char*); #if !defined(__LP64__) /* These non-standard functions are not needed on Android; basename and dirname use thread-local storage. */ extern int dirname_r(const char*, char*, size_t); extern int basename_r(const char*, char*, size_t); #endif __END_DECLS #endif /* _LIBGEN_H */ ================================================ FILE: atlas-aapt/bionic/libc/include/limits.h ================================================ /* $OpenBSD: limits.h,v 1.13 2005/12/31 19:29:38 millert Exp $ */ /* $NetBSD: limits.h,v 1.7 1994/10/26 00:56:00 cgd Exp $ */ /* * Copyright (c) 1988 The Regents of the University of California. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)limits.h 5.9 (Berkeley) 4/3/91 */ #ifndef _LIMITS_H_ #define _LIMITS_H_ #include #if __XPG_VISIBLE #define PASS_MAX 128 /* _PASSWORD_LEN from */ #define NL_ARGMAX 9 #define NL_LANGMAX 14 #define NL_MSGMAX 32767 #define NL_NMAX 1 #define NL_SETMAX 255 #define NL_TEXTMAX 255 #define TMP_MAX 308915776 #endif /* __XPG_VISIBLE */ #include #if __POSIX_VISIBLE #include #endif /* GLibc compatibility definitions. Note that these are defined by GCC's only when __GNU_LIBRARY__ is defined, i.e. when targetting GLibc. */ #ifndef LONG_LONG_MIN #define LONG_LONG_MIN LLONG_MIN #endif #ifndef LONG_LONG_MAX #define LONG_LONG_MAX LLONG_MAX #endif #ifndef ULONG_LONG_MAX #define ULONG_LONG_MAX ULLONG_MAX #endif /* BSD compatibility definitions. */ #if __BSD_VISIBLE #define SIZE_T_MAX ULONG_MAX #endif /* __BSD_VISIBLE */ #define SSIZE_MAX LONG_MAX #define MB_LEN_MAX 4 #define SEM_VALUE_MAX 0x3fffffff /* POSIX says these belong in but BSD has some in . */ #include #define HOST_NAME_MAX _POSIX_HOST_NAME_MAX #endif /* !_LIMITS_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/link.h ================================================ /* * Copyright (C) 2012 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _LINK_H_ #define _LINK_H_ #include #include __BEGIN_DECLS #if __LP64__ #define ElfW(type) Elf64_ ## type #else #define ElfW(type) Elf32_ ## type #endif struct dl_phdr_info { ElfW(Addr) dlpi_addr; const char* dlpi_name; const ElfW(Phdr)* dlpi_phdr; ElfW(Half) dlpi_phnum; }; int dl_iterate_phdr(int (*)(struct dl_phdr_info*, size_t, void*), void*); #ifdef __arm__ typedef long unsigned int* _Unwind_Ptr; _Unwind_Ptr dl_unwind_find_exidx(_Unwind_Ptr, int*); #endif /* Used by the dynamic linker to communicate with the debugger. */ struct link_map { ElfW(Addr) l_addr; char* l_name; ElfW(Dyn)* l_ld; struct link_map* l_next; struct link_map* l_prev; }; /* Used by the dynamic linker to communicate with the debugger. */ struct r_debug { int32_t r_version; struct link_map* r_map; ElfW(Addr) r_brk; enum { RT_CONSISTENT, RT_ADD, RT_DELETE } r_state; ElfW(Addr) r_ldbase; }; __END_DECLS #endif /* _LINK_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/locale.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _LOCALE_H_ #define _LOCALE_H_ #include #include __BEGIN_DECLS #define LC_CTYPE 0 #define LC_NUMERIC 1 #define LC_TIME 2 #define LC_COLLATE 3 #define LC_MONETARY 4 #define LC_MESSAGES 5 #define LC_ALL 6 #define LC_PAPER 7 #define LC_NAME 8 #define LC_ADDRESS 9 #define LC_TELEPHONE 10 #define LC_MEASUREMENT 11 #define LC_IDENTIFICATION 12 #define LC_CTYPE_MASK (1 << LC_CTYPE) #define LC_NUMERIC_MASK (1 << LC_NUMERIC) #define LC_TIME_MASK (1 << LC_TIME) #define LC_COLLATE_MASK (1 << LC_COLLATE) #define LC_MONETARY_MASK (1 << LC_MONETARY) #define LC_MESSAGES_MASK (1 << LC_MESSAGES) #define LC_PAPER_MASK (1 << LC_PAPER) #define LC_NAME_MASK (1 << LC_NAME) #define LC_ADDRESS_MASK (1 << LC_ADDRESS) #define LC_TELEPHONE_MASK (1 << LC_TELEPHONE) #define LC_MEASUREMENT_MASK (1 << LC_MEASUREMENT) #define LC_IDENTIFICATION_MASK (1 << LC_IDENTIFICATION) #define LC_ALL_MASK (LC_CTYPE_MASK | LC_NUMERIC_MASK | LC_TIME_MASK | LC_COLLATE_MASK | \ LC_MONETARY_MASK | LC_MESSAGES_MASK | LC_PAPER_MASK | LC_NAME_MASK | \ LC_ADDRESS_MASK | LC_TELEPHONE_MASK | LC_MEASUREMENT_MASK | \ LC_IDENTIFICATION_MASK) struct lconv { char* decimal_point; char* thousands_sep; char* grouping; char* int_curr_symbol; char* currency_symbol; char* mon_decimal_point; char* mon_thousands_sep; char* mon_grouping; char* positive_sign; char* negative_sign; char int_frac_digits; char frac_digits; char p_cs_precedes; char p_sep_by_space; char n_cs_precedes; char n_sep_by_space; char p_sign_posn; char n_sign_posn; char int_p_cs_precedes; char int_p_sep_by_space; char int_n_cs_precedes; char int_n_sep_by_space; char int_p_sign_posn; char int_n_sign_posn; }; struct lconv* localeconv(void); locale_t duplocale(locale_t); void freelocale(locale_t); locale_t newlocale(int, const char*, locale_t); char* setlocale(int, const char*); locale_t uselocale(locale_t); #define LC_GLOBAL_LOCALE ((locale_t) -1L) __END_DECLS #endif /* _LOCALE_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/machine/endian.h ================================================ /* * Copyright (C) 2014 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _MACHINE_ENDIAN_H_ #define _MACHINE_ENDIAN_H_ /* This file is for BSD source compatibility only. Use or instead. */ #include #endif /* _MACHINE_ENDIAN_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/machine/ieee.h ================================================ /* $OpenBSD: ieee.h,v 1.4 2011/11/08 17:06:51 deraadt Exp $ */ /* $NetBSD: ieee.h,v 1.2 2001/02/21 17:43:50 bjh21 Exp $ */ /* * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. * * This software was developed by the Computer Systems Engineering group * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and * contributed to Berkeley. * * All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Lawrence Berkeley Laboratory. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)ieee.h 8.1 (Berkeley) 6/11/93 */ #ifndef _MACHINE_IEEE_H_ #define _MACHINE_IEEE_H_ #include __BEGIN_DECLS #define SNG_EXPBITS 8 #define SNG_FRACBITS 23 #define SNG_EXP_INFNAN 255 #define SNG_EXP_BIAS 127 struct ieee_single { unsigned sng_frac:23; unsigned sng_exp:8; unsigned sng_sign:1; }; #define DBL_EXPBITS 11 #define DBL_FRACHBITS 20 #define DBL_FRACLBITS 32 #define DBL_FRACBITS 52 #define DBL_EXP_INFNAN 2047 #define DBL_EXP_BIAS 1023 struct ieee_double { unsigned dbl_fracl; unsigned dbl_frach:20; unsigned dbl_exp:11; unsigned dbl_sign:1; }; #if __LP64__ /* 64-bit Android uses ld128 long doubles. */ #define EXT_EXPBITS 15 #define EXT_FRACHBITS 16 #define EXT_FRACHMBITS 32 #define EXT_FRACLMBITS 32 #define EXT_FRACLBITS 32 #define EXT_FRACBITS 112 #define EXT_EXP_INFNAN 32767 #define EXT_EXP_BIAS 16383 #define EXT_IMPLICIT_NBIT #define EXT_TO_ARRAY32(p, a) do { \ (a)[0] = (uint32_t)(p)->ext_fracl; \ (a)[1] = (uint32_t)(p)->ext_fraclm; \ (a)[2] = (uint32_t)(p)->ext_frachm; \ (a)[3] = (uint32_t)(p)->ext_frach; \ } while(0) struct ieee_ext { unsigned ext_fracl; unsigned ext_fraclm; unsigned ext_frachm; unsigned ext_frach:16; unsigned ext_exp:15; unsigned ext_sign:1; }; #endif __END_DECLS #endif /* _MACHINE_IEEE_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/malloc.h ================================================ /* * Copyright (C) 2012 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef LIBC_INCLUDE_MALLOC_H_ #define LIBC_INCLUDE_MALLOC_H_ #include #include #include __BEGIN_DECLS extern void* malloc(size_t byte_count) __mallocfunc __wur __attribute__((alloc_size(1))); extern void* calloc(size_t item_count, size_t item_size) __mallocfunc __wur __attribute__((alloc_size(1,2))); extern void* realloc(void* p, size_t byte_count) __wur __attribute__((alloc_size(2))); extern void free(void* p); extern void* memalign(size_t alignment, size_t byte_count) __mallocfunc __wur __attribute__((alloc_size(2))); extern size_t malloc_usable_size(const void* p); #ifndef STRUCT_MALLINFO_DECLARED #define STRUCT_MALLINFO_DECLARED 1 struct mallinfo { size_t arena; /* Total number of non-mmapped bytes currently allocated from OS. */ size_t ordblks; /* Number of free chunks. */ size_t smblks; /* (Unused.) */ size_t hblks; /* (Unused.) */ size_t hblkhd; /* Total number of bytes in mmapped regions. */ size_t usmblks; /* Maximum total allocated space; greater than total if trimming has occurred. */ size_t fsmblks; /* (Unused.) */ size_t uordblks; /* Total allocated space (normal or mmapped.) */ size_t fordblks; /* Total free space. */ size_t keepcost; /* Upper bound on number of bytes releasable by malloc_trim. */ }; #endif /* STRUCT_MALLINFO_DECLARED */ extern struct mallinfo mallinfo(void); /* * XML structure for malloc_info(3) is in the following format: * * * * INT * INT * INT * INT * * INT * INT * INT * * * * * */ extern int malloc_info(int, FILE *); __END_DECLS #endif /* LIBC_INCLUDE_MALLOC_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/memory.h ================================================ #include ================================================ FILE: atlas-aapt/bionic/libc/include/mntent.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _MNTENT_H_ #define _MNTENT_H_ #include #include #include /* for _PATH_MOUNTED */ #define MOUNTED _PATH_MOUNTED #define MNTTYPE_IGNORE "ignore" struct mntent { char* mnt_fsname; char* mnt_dir; char* mnt_type; char* mnt_opts; int mnt_freq; int mnt_passno; }; __BEGIN_DECLS int endmntent(FILE*); struct mntent* getmntent(FILE*); struct mntent* getmntent_r(FILE*, struct mntent*, char*, int); FILE* setmntent(const char*, const char*); __END_DECLS #endif ================================================ FILE: atlas-aapt/bionic/libc/include/net/ethernet.h ================================================ /* * Copyright (C) 2011 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _NET_ETHERNET_H_ #define _NET_ETHERNET_H_ #include #include #endif ================================================ FILE: atlas-aapt/bionic/libc/include/net/ethertypes.h ================================================ /* $NetBSD: ethertypes.h,v 1.17 2005/12/10 23:21:38 elad Exp $ */ /* * Copyright (c) 1982, 1986, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)if_ether.h 8.1 (Berkeley) 6/10/93 */ /* * Ethernet protocol types. * * According to "assigned numbers", the Ethernet protocol numbers are also * used as ARP protocol type numbers. * * I factor them out here to avoid pulling all the Ethernet header file * into the hardware independent ARP code. -is * * Additional sources of information: * http://www.mit.edu/~map/Ethernet/Ethernet.txt * ftp://venera.isi.edu/in-notes/iana/assignments/ethernet-numbers * */ #ifndef _NET_ETHERTYPES_H_ #define _NET_ETHERTYPES_H_ /* * NOTE: 0x0000-0x05DC (0..1500) are generally IEEE 802.3 length fields. * However, there are some conflicts. */ #define ETHERTYPE_8023 0x0004 /* IEEE 802.3 packet */ /* 0x0101 .. 0x1FF Experimental */ #define ETHERTYPE_PUP 0x0200 /* Xerox PUP protocol - see 0A00 */ #define ETHERTYPE_PUPAT 0x0200 /* PUP Address Translation - see 0A01 */ #define ETHERTYPE_SPRITE 0x0500 /* ??? */ /* 0x0400 Nixdorf */ #define ETHERTYPE_NS 0x0600 /* XNS */ #define ETHERTYPE_NSAT 0x0601 /* XNS Address Translation (3Mb only) */ #define ETHERTYPE_DLOG1 0x0660 /* DLOG (?) */ #define ETHERTYPE_DLOG2 0x0661 /* DLOG (?) */ #define ETHERTYPE_IP 0x0800 /* IP protocol */ #define ETHERTYPE_X75 0x0801 /* X.75 Internet */ #define ETHERTYPE_NBS 0x0802 /* NBS Internet */ #define ETHERTYPE_ECMA 0x0803 /* ECMA Internet */ #define ETHERTYPE_CHAOS 0x0804 /* CHAOSnet */ #define ETHERTYPE_X25 0x0805 /* X.25 Level 3 */ #define ETHERTYPE_ARP 0x0806 /* Address resolution protocol */ #define ETHERTYPE_NSCOMPAT 0x0807 /* XNS Compatibility */ #define ETHERTYPE_FRARP 0x0808 /* Frame Relay ARP (RFC1701) */ /* 0x081C Symbolics Private */ /* 0x0888 - 0x088A Xyplex */ #define ETHERTYPE_UBDEBUG 0x0900 /* Ungermann-Bass network debugger */ #define ETHERTYPE_IEEEPUP 0x0A00 /* Xerox IEEE802.3 PUP */ #define ETHERTYPE_IEEEPUPAT 0x0A01 /* Xerox IEEE802.3 PUP Address Translation */ #define ETHERTYPE_VINES 0x0BAD /* Banyan VINES */ #define ETHERTYPE_VINESLOOP 0x0BAE /* Banyan VINES Loopback */ #define ETHERTYPE_VINESECHO 0x0BAF /* Banyan VINES Echo */ /* 0x1000 - 0x100F Berkeley Trailer */ /* * The ETHERTYPE_NTRAILER packet types starting at ETHERTYPE_TRAIL have * (type-ETHERTYPE_TRAIL)*512 bytes of data followed * by an ETHER type (as given above) and then the (variable-length) header. */ #define ETHERTYPE_TRAIL 0x1000 /* Trailer packet */ #define ETHERTYPE_NTRAILER 16 #define ETHERTYPE_DCA 0x1234 /* DCA - Multicast */ #define ETHERTYPE_VALID 0x1600 /* VALID system protocol */ #define ETHERTYPE_DOGFIGHT 0x1989 /* Artificial Horizons ("Aviator" dogfight simulator [on Sun]) */ #define ETHERTYPE_RCL 0x1995 /* Datapoint Corporation (RCL lan protocol) */ /* The following 3C0x types are unregistered: */ #define ETHERTYPE_NBPVCD 0x3C00 /* 3Com NBP virtual circuit datagram (like XNS SPP) not registered */ #define ETHERTYPE_NBPSCD 0x3C01 /* 3Com NBP System control datagram not registered */ #define ETHERTYPE_NBPCREQ 0x3C02 /* 3Com NBP Connect request (virtual cct) not registered */ #define ETHERTYPE_NBPCRSP 0x3C03 /* 3Com NBP Connect repsonse not registered */ #define ETHERTYPE_NBPCC 0x3C04 /* 3Com NBP Connect complete not registered */ #define ETHERTYPE_NBPCLREQ 0x3C05 /* 3Com NBP Close request (virtual cct) not registered */ #define ETHERTYPE_NBPCLRSP 0x3C06 /* 3Com NBP Close response not registered */ #define ETHERTYPE_NBPDG 0x3C07 /* 3Com NBP Datagram (like XNS IDP) not registered */ #define ETHERTYPE_NBPDGB 0x3C08 /* 3Com NBP Datagram broadcast not registered */ #define ETHERTYPE_NBPCLAIM 0x3C09 /* 3Com NBP Claim NetBIOS name not registered */ #define ETHERTYPE_NBPDLTE 0x3C0A /* 3Com NBP Delete Netbios name not registered */ #define ETHERTYPE_NBPRAS 0x3C0B /* 3Com NBP Remote adaptor status request not registered */ #define ETHERTYPE_NBPRAR 0x3C0C /* 3Com NBP Remote adaptor response not registered */ #define ETHERTYPE_NBPRST 0x3C0D /* 3Com NBP Reset not registered */ #define ETHERTYPE_PCS 0x4242 /* PCS Basic Block Protocol */ #define ETHERTYPE_IMLBLDIAG 0x424C /* Information Modes Little Big LAN diagnostic */ #define ETHERTYPE_DIDDLE 0x4321 /* THD - Diddle */ #define ETHERTYPE_IMLBL 0x4C42 /* Information Modes Little Big LAN */ #define ETHERTYPE_SIMNET 0x5208 /* BBN Simnet Private */ #define ETHERTYPE_DECEXPER 0x6000 /* DEC Unassigned, experimental */ #define ETHERTYPE_MOPDL 0x6001 /* DEC MOP dump/load */ #define ETHERTYPE_MOPRC 0x6002 /* DEC MOP remote console */ #define ETHERTYPE_DECnet 0x6003 /* DEC DECNET Phase IV route */ #define ETHERTYPE_DN ETHERTYPE_DECnet /* libpcap, tcpdump */ #define ETHERTYPE_LAT 0x6004 /* DEC LAT */ #define ETHERTYPE_DECDIAG 0x6005 /* DEC diagnostic protocol (at interface initialization?) */ #define ETHERTYPE_DECCUST 0x6006 /* DEC customer protocol */ #define ETHERTYPE_SCA 0x6007 /* DEC LAVC, SCA */ #define ETHERTYPE_AMBER 0x6008 /* DEC AMBER */ #define ETHERTYPE_DECMUMPS 0x6009 /* DEC MUMPS */ /* 0x6010 - 0x6014 3Com Corporation */ #define ETHERTYPE_TRANSETHER 0x6558 /* Trans Ether Bridging (RFC1701)*/ #define ETHERTYPE_RAWFR 0x6559 /* Raw Frame Relay (RFC1701) */ #define ETHERTYPE_UBDL 0x7000 /* Ungermann-Bass download */ #define ETHERTYPE_UBNIU 0x7001 /* Ungermann-Bass NIUs */ #define ETHERTYPE_UBDIAGLOOP 0x7002 /* Ungermann-Bass diagnostic/loopback */ #define ETHERTYPE_UBNMC 0x7003 /* Ungermann-Bass ??? (NMC to/from UB Bridge) */ #define ETHERTYPE_UBBST 0x7005 /* Ungermann-Bass Bridge Spanning Tree */ #define ETHERTYPE_OS9 0x7007 /* OS/9 Microware */ #define ETHERTYPE_OS9NET 0x7009 /* OS/9 Net? */ /* 0x7020 - 0x7029 LRT (England) (now Sintrom) */ #define ETHERTYPE_RACAL 0x7030 /* Racal-Interlan */ #define ETHERTYPE_PRIMENTS 0x7031 /* Prime NTS (Network Terminal Service) */ #define ETHERTYPE_CABLETRON 0x7034 /* Cabletron */ #define ETHERTYPE_CRONUSVLN 0x8003 /* Cronus VLN */ #define ETHERTYPE_CRONUS 0x8004 /* Cronus Direct */ #define ETHERTYPE_HP 0x8005 /* HP Probe */ #define ETHERTYPE_NESTAR 0x8006 /* Nestar */ #define ETHERTYPE_ATTSTANFORD 0x8008 /* AT&T/Stanford (local use) */ #define ETHERTYPE_EXCELAN 0x8010 /* Excelan */ #define ETHERTYPE_SG_DIAG 0x8013 /* SGI diagnostic type */ #define ETHERTYPE_SG_NETGAMES 0x8014 /* SGI network games */ #define ETHERTYPE_SG_RESV 0x8015 /* SGI reserved type */ #define ETHERTYPE_SG_BOUNCE 0x8016 /* SGI bounce server */ #define ETHERTYPE_APOLLODOMAIN 0x8019 /* Apollo DOMAIN */ #define ETHERTYPE_TYMSHARE 0x802E /* Tymeshare */ #define ETHERTYPE_TIGAN 0x802F /* Tigan, Inc. */ #define ETHERTYPE_REVARP 0x8035 /* Reverse addr resolution protocol */ #define ETHERTYPE_AEONIC 0x8036 /* Aeonic Systems */ #define ETHERTYPE_IPXNEW 0x8037 /* IPX (Novell Netware?) */ #define ETHERTYPE_LANBRIDGE 0x8038 /* DEC LANBridge */ #define ETHERTYPE_DSMD 0x8039 /* DEC DSM/DDP */ #define ETHERTYPE_ARGONAUT 0x803A /* DEC Argonaut Console */ #define ETHERTYPE_VAXELN 0x803B /* DEC VAXELN */ #define ETHERTYPE_DECDNS 0x803C /* DEC DNS Naming Service */ #define ETHERTYPE_ENCRYPT 0x803D /* DEC Ethernet Encryption */ #define ETHERTYPE_DECDTS 0x803E /* DEC Distributed Time Service */ #define ETHERTYPE_DECLTM 0x803F /* DEC LAN Traffic Monitor */ #define ETHERTYPE_DECNETBIOS 0x8040 /* DEC PATHWORKS DECnet NETBIOS Emulation */ #define ETHERTYPE_DECLAST 0x8041 /* DEC Local Area System Transport */ /* 0x8042 DEC Unassigned */ #define ETHERTYPE_PLANNING 0x8044 /* Planning Research Corp. */ /* 0x8046 - 0x8047 AT&T */ #define ETHERTYPE_DECAM 0x8048 /* DEC Availability Manager for Distributed Systems DECamds (but someone at DEC says not) */ #define ETHERTYPE_EXPERDATA 0x8049 /* ExperData */ #define ETHERTYPE_VEXP 0x805B /* Stanford V Kernel exp. */ #define ETHERTYPE_VPROD 0x805C /* Stanford V Kernel prod. */ #define ETHERTYPE_ES 0x805D /* Evans & Sutherland */ #define ETHERTYPE_LITTLE 0x8060 /* Little Machines */ #define ETHERTYPE_COUNTERPOINT 0x8062 /* Counterpoint Computers */ /* 0x8065 - 0x8066 Univ. of Mass @ Amherst */ #define ETHERTYPE_VEECO 0x8067 /* Veeco Integrated Auto. */ #define ETHERTYPE_GENDYN 0x8068 /* General Dynamics */ #define ETHERTYPE_ATT 0x8069 /* AT&T */ #define ETHERTYPE_AUTOPHON 0x806A /* Autophon */ #define ETHERTYPE_COMDESIGN 0x806C /* ComDesign */ #define ETHERTYPE_COMPUGRAPHIC 0x806D /* Compugraphic Corporation */ /* 0x806E - 0x8077 Landmark Graphics Corp. */ #define ETHERTYPE_MATRA 0x807A /* Matra */ #define ETHERTYPE_DDE 0x807B /* Dansk Data Elektronik */ #define ETHERTYPE_MERIT 0x807C /* Merit Internodal (or Univ of Michigan?) */ /* 0x807D - 0x807F Vitalink Communications */ #define ETHERTYPE_VLTLMAN 0x8080 /* Vitalink TransLAN III Management */ /* 0x8081 - 0x8083 Counterpoint Computers */ /* 0x8088 - 0x808A Xyplex */ #define ETHERTYPE_ATALK 0x809B /* AppleTalk */ #define ETHERTYPE_AT ETHERTYPE_ATALK /* old NetBSD */ #define ETHERTYPE_APPLETALK ETHERTYPE_ATALK /* HP-UX */ /* 0x809C - 0x809E Datability */ #define ETHERTYPE_SPIDER 0x809F /* Spider Systems Ltd. */ /* 0x80A3 Nixdorf */ /* 0x80A4 - 0x80B3 Siemens Gammasonics Inc. */ /* 0x80C0 - 0x80C3 DCA (Digital Comm. Assoc.) Data Exchange Cluster */ /* 0x80C4 - 0x80C5 Banyan Systems */ #define ETHERTYPE_PACER 0x80C6 /* Pacer Software */ #define ETHERTYPE_APPLITEK 0x80C7 /* Applitek Corporation */ /* 0x80C8 - 0x80CC Intergraph Corporation */ /* 0x80CD - 0x80CE Harris Corporation */ /* 0x80CF - 0x80D2 Taylor Instrument */ /* 0x80D3 - 0x80D4 Rosemount Corporation */ #define ETHERTYPE_SNA 0x80D5 /* IBM SNA Services over Ethernet */ #define ETHERTYPE_VARIAN 0x80DD /* Varian Associates */ /* 0x80DE - 0x80DF TRFS (Integrated Solutions Transparent Remote File System) */ /* 0x80E0 - 0x80E3 Allen-Bradley */ /* 0x80E4 - 0x80F0 Datability */ #define ETHERTYPE_RETIX 0x80F2 /* Retix */ #define ETHERTYPE_AARP 0x80F3 /* AppleTalk AARP */ /* 0x80F4 - 0x80F5 Kinetics */ #define ETHERTYPE_APOLLO 0x80F7 /* Apollo Computer */ #define ETHERTYPE_VLAN 0x8100 /* IEEE 802.1Q VLAN tagging (XXX conflicts) */ /* 0x80FF - 0x8101 Wellfleet Communications (XXX conflicts) */ #define ETHERTYPE_BOFL 0x8102 /* Wellfleet; BOFL (Breath OF Life) pkts [every 5-10 secs.] */ #define ETHERTYPE_WELLFLEET 0x8103 /* Wellfleet Communications */ /* 0x8107 - 0x8109 Symbolics Private */ #define ETHERTYPE_TALARIS 0x812B /* Talaris */ #define ETHERTYPE_WATERLOO 0x8130 /* Waterloo Microsystems Inc. (XXX which?) */ #define ETHERTYPE_HAYES 0x8130 /* Hayes Microcomputers (XXX which?) */ #define ETHERTYPE_VGLAB 0x8131 /* VG Laboratory Systems */ /* 0x8132 - 0x8137 Bridge Communications */ #define ETHERTYPE_IPX 0x8137 /* Novell (old) NetWare IPX (ECONFIG E option) */ #define ETHERTYPE_NOVELL 0x8138 /* Novell, Inc. */ /* 0x8139 - 0x813D KTI */ #define ETHERTYPE_MUMPS 0x813F /* M/MUMPS data sharing */ #define ETHERTYPE_AMOEBA 0x8145 /* Vrije Universiteit (NL) Amoeba 4 RPC (obsolete) */ #define ETHERTYPE_FLIP 0x8146 /* Vrije Universiteit (NL) FLIP (Fast Local Internet Protocol) */ #define ETHERTYPE_VURESERVED 0x8147 /* Vrije Universiteit (NL) [reserved] */ #define ETHERTYPE_LOGICRAFT 0x8148 /* Logicraft */ #define ETHERTYPE_NCD 0x8149 /* Network Computing Devices */ #define ETHERTYPE_ALPHA 0x814A /* Alpha Micro */ #define ETHERTYPE_SNMP 0x814C /* SNMP over Ethernet (see RFC1089) */ /* 0x814D - 0x814E BIIN */ #define ETHERTYPE_TEC 0x814F /* Technically Elite Concepts */ #define ETHERTYPE_RATIONAL 0x8150 /* Rational Corp */ /* 0x8151 - 0x8153 Qualcomm */ /* 0x815C - 0x815E Computer Protocol Pty Ltd */ /* 0x8164 - 0x8166 Charles River Data Systems */ #define ETHERTYPE_XTP 0x817D /* Protocol Engines XTP */ #define ETHERTYPE_SGITW 0x817E /* SGI/Time Warner prop. */ #define ETHERTYPE_HIPPI_FP 0x8180 /* HIPPI-FP encapsulation */ #define ETHERTYPE_STP 0x8181 /* Scheduled Transfer STP, HIPPI-ST */ /* 0x8182 - 0x8183 Reserved for HIPPI-6400 */ /* 0x8184 - 0x818C SGI prop. */ #define ETHERTYPE_MOTOROLA 0x818D /* Motorola */ #define ETHERTYPE_NETBEUI 0x8191 /* PowerLAN NetBIOS/NetBEUI (PC) */ /* 0x819A - 0x81A3 RAD Network Devices */ /* 0x81B7 - 0x81B9 Xyplex */ /* 0x81CC - 0x81D5 Apricot Computers */ /* 0x81D6 - 0x81DD Artisoft Lantastic */ /* 0x81E6 - 0x81EF Polygon */ /* 0x81F0 - 0x81F2 Comsat Labs */ /* 0x81F3 - 0x81F5 SAIC */ /* 0x81F6 - 0x81F8 VG Analytical */ /* 0x8203 - 0x8205 QNX Software Systems Ltd. */ /* 0x8221 - 0x8222 Ascom Banking Systems */ /* 0x823E - 0x8240 Advanced Encryption Systems */ /* 0x8263 - 0x826A Charles River Data Systems */ /* 0x827F - 0x8282 Athena Programming */ /* 0x829A - 0x829B Inst Ind Info Tech */ /* 0x829C - 0x82AB Taurus Controls */ /* 0x82AC - 0x8693 Walker Richer & Quinn */ #define ETHERTYPE_ACCTON 0x8390 /* Accton Technologies (unregistered) */ #define ETHERTYPE_TALARISMC 0x852B /* Talaris multicast */ #define ETHERTYPE_KALPANA 0x8582 /* Kalpana */ /* 0x8694 - 0x869D Idea Courier */ /* 0x869E - 0x86A1 Computer Network Tech */ /* 0x86A3 - 0x86AC Gateway Communications */ #define ETHERTYPE_SECTRA 0x86DB /* SECTRA */ #define ETHERTYPE_IPV6 0x86DD /* IP protocol version 6 */ #define ETHERTYPE_DELTACON 0x86DE /* Delta Controls */ #define ETHERTYPE_ATOMIC 0x86DF /* ATOMIC */ /* 0x86E0 - 0x86EF Landis & Gyr Powers */ /* 0x8700 - 0x8710 Motorola */ #define ETHERTYPE_RDP 0x8739 /* Control Technology Inc. RDP Without IP */ #define ETHERTYPE_MICP 0x873A /* Control Technology Inc. Mcast Industrial Ctrl Proto. */ /* 0x873B - 0x873C Control Technology Inc. Proprietary */ #define ETHERTYPE_TCPCOMP 0x876B /* TCP/IP Compression (RFC1701) */ #define ETHERTYPE_IPAS 0x876C /* IP Autonomous Systems (RFC1701) */ #define ETHERTYPE_SECUREDATA 0x876D /* Secure Data (RFC1701) */ #define ETHERTYPE_FLOWCONTROL 0x8808 /* 802.3x flow control packet */ #define ETHERTYPE_SLOWPROTOCOLS 0x8809 /* Slow protocols */ #define ETHERTYPE_PPP 0x880B /* PPP (obsolete by PPPOE) */ #define ETHERTYPE_HITACHI 0x8820 /* Hitachi Cable (Optoelectronic Systems Laboratory) */ #define ETHERTYPE_MPLS 0x8847 /* MPLS Unicast */ #define ETHERTYPE_MPLS_MCAST 0x8848 /* MPLS Multicast */ #define ETHERTYPE_AXIS 0x8856 /* Axis Communications AB proprietary bootstrap/config */ #define ETHERTYPE_PPPOEDISC 0x8863 /* PPP Over Ethernet Discovery Stage */ #define ETHERTYPE_PPPOE 0x8864 /* PPP Over Ethernet Session Stage */ #define ETHERTYPE_LANPROBE 0x8888 /* HP LanProbe test? */ #define ETHERTYPE_PAE 0x888e /* EAPOL PAE/802.1x */ #define ETHERTYPE_LOOPBACK 0x9000 /* Loopback */ #define ETHERTYPE_LBACK ETHERTYPE_LOOPBACK /* DEC MOP loopback */ #define ETHERTYPE_XNSSM 0x9001 /* 3Com (Formerly Bridge Communications), XNS Systems Management */ #define ETHERTYPE_TCPSM 0x9002 /* 3Com (Formerly Bridge Communications), TCP/IP Systems Management */ #define ETHERTYPE_BCLOOP 0x9003 /* 3Com (Formerly Bridge Communications), loopback detection */ #define ETHERTYPE_DEBNI 0xAAAA /* DECNET? Used by VAX 6220 DEBNI */ #define ETHERTYPE_SONIX 0xFAF5 /* Sonix Arpeggio */ #define ETHERTYPE_VITAL 0xFF00 /* BBN VITAL-LanBridge cache wakeups */ /* 0xFF00 - 0xFFOF ISC Bunker Ramo */ #define ETHERTYPE_MAX 0xFFFF /* Maximum valid ethernet type, reserved */ #endif /* !_NET_ETHERTYPES_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/net/if.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _NET_IF_H_ #define _NET_IF_H_ #include #include #include #ifndef IF_NAMESIZE #define IF_NAMESIZE IFNAMSIZ #endif __BEGIN_DECLS struct if_nameindex { unsigned if_index; char* if_name; }; char* if_indextoname(unsigned, char*); unsigned if_nametoindex(const char*); struct if_nameindex* if_nameindex(void); void if_freenameindex(struct if_nameindex*); __END_DECLS #endif ================================================ FILE: atlas-aapt/bionic/libc/include/net/if_arp.h ================================================ #include #include ================================================ FILE: atlas-aapt/bionic/libc/include/net/if_ether.h ================================================ /* $NetBSD: if_ether.h,v 1.43 2006/11/24 01:04:30 rpaulo Exp $ */ /* * Copyright (c) 1982, 1986, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)if_ether.h 8.1 (Berkeley) 6/10/93 */ #ifndef _NET_IF_ETHER_H_ #define _NET_IF_ETHER_H_ #include #ifdef _KERNEL #ifdef _KERNEL_OPT #include "opt_mbuftrace.h" #endif #include #endif /* * Some basic Ethernet constants. */ #define ETHER_ADDR_LEN 6 /* length of an Ethernet address */ #define ETHER_TYPE_LEN 2 /* length of the Ethernet type field */ #define ETHER_CRC_LEN 4 /* length of the Ethernet CRC */ #define ETHER_HDR_LEN ((ETHER_ADDR_LEN * 2) + ETHER_TYPE_LEN) #define ETHER_MIN_LEN 64 /* minimum frame length, including CRC */ #define ETHER_MAX_LEN 1518 /* maximum frame length, including CRC */ #define ETHER_MAX_LEN_JUMBO 9018 /* maximum jumbo frame len, including CRC */ /* * Some Ethernet extensions. */ #define ETHER_VLAN_ENCAP_LEN 4 /* length of 802.1Q VLAN encapsulation */ /* * Ethernet address - 6 octets * this is only used by the ethers(3) functions. */ struct ether_addr { u_int8_t ether_addr_octet[ETHER_ADDR_LEN]; } __attribute__((__packed__)); /* * Structure of a 10Mb/s Ethernet header. */ struct ether_header { u_int8_t ether_dhost[ETHER_ADDR_LEN]; u_int8_t ether_shost[ETHER_ADDR_LEN]; u_int16_t ether_type; } __attribute__((__packed__)); #include #define ETHER_IS_MULTICAST(addr) (*(addr) & 0x01) /* is address mcast/bcast? */ #define ETHERMTU_JUMBO (ETHER_MAX_LEN_JUMBO - ETHER_HDR_LEN - ETHER_CRC_LEN) #define ETHERMTU (ETHER_MAX_LEN - ETHER_HDR_LEN - ETHER_CRC_LEN) #define ETHERMIN (ETHER_MIN_LEN - ETHER_HDR_LEN - ETHER_CRC_LEN) /* * Compute the maximum frame size based on ethertype (i.e. possible * encapsulation) and whether or not an FCS is present. */ #define ETHER_MAX_FRAME(ifp, etype, hasfcs) \ ((ifp)->if_mtu + ETHER_HDR_LEN + \ ((hasfcs) ? ETHER_CRC_LEN : 0) + \ (((etype) == ETHERTYPE_VLAN) ? ETHER_VLAN_ENCAP_LEN : 0)) /* * Ethernet CRC32 polynomials (big- and little-endian verions). */ #define ETHER_CRC_POLY_LE 0xedb88320 #define ETHER_CRC_POLY_BE 0x04c11db6 #ifndef _STANDALONE /* * Ethernet-specific mbuf flags. */ #define M_HASFCS M_LINK0 /* FCS included at end of frame */ #define M_PROMISC M_LINK1 /* this packet is not for us */ #ifdef _KERNEL /* * Macro to map an IP multicast address to an Ethernet multicast address. * The high-order 25 bits of the Ethernet address are statically assigned, * and the low-order 23 bits are taken from the low end of the IP address. */ #define ETHER_MAP_IP_MULTICAST(ipaddr, enaddr) \ /* struct in_addr *ipaddr; */ \ /* u_int8_t enaddr[ETHER_ADDR_LEN]; */ \ { \ (enaddr)[0] = 0x01; \ (enaddr)[1] = 0x00; \ (enaddr)[2] = 0x5e; \ (enaddr)[3] = ((u_int8_t *)ipaddr)[1] & 0x7f; \ (enaddr)[4] = ((u_int8_t *)ipaddr)[2]; \ (enaddr)[5] = ((u_int8_t *)ipaddr)[3]; \ } /* * Macro to map an IP6 multicast address to an Ethernet multicast address. * The high-order 16 bits of the Ethernet address are statically assigned, * and the low-order 32 bits are taken from the low end of the IP6 address. */ #define ETHER_MAP_IPV6_MULTICAST(ip6addr, enaddr) \ /* struct in6_addr *ip6addr; */ \ /* u_int8_t enaddr[ETHER_ADDR_LEN]; */ \ { \ (enaddr)[0] = 0x33; \ (enaddr)[1] = 0x33; \ (enaddr)[2] = ((u_int8_t *)ip6addr)[12]; \ (enaddr)[3] = ((u_int8_t *)ip6addr)[13]; \ (enaddr)[4] = ((u_int8_t *)ip6addr)[14]; \ (enaddr)[5] = ((u_int8_t *)ip6addr)[15]; \ } #endif #define ETHERCAP_VLAN_MTU 0x00000001 /* VLAN-compatible MTU */ #define ETHERCAP_VLAN_HWTAGGING 0x00000002 /* hardware VLAN tag support */ #define ETHERCAP_JUMBO_MTU 0x00000004 /* 9000 byte MTU supported */ #ifdef _KERNEL extern const uint8_t etherbroadcastaddr[ETHER_ADDR_LEN]; extern const uint8_t ethermulticastaddr_slowprotocols[ETHER_ADDR_LEN]; extern const uint8_t ether_ipmulticast_min[ETHER_ADDR_LEN]; extern const uint8_t ether_ipmulticast_max[ETHER_ADDR_LEN]; int ether_ioctl(struct ifnet *, u_long, caddr_t); int ether_addmulti (struct ifreq *, struct ethercom *); int ether_delmulti (struct ifreq *, struct ethercom *); int ether_changeaddr (struct ifreq *, struct ethercom *); int ether_multiaddr(struct sockaddr *, u_int8_t[], u_int8_t[]); /* * Ethernet 802.1Q VLAN structures. */ /* add VLAN tag to input/received packet */ #define VLAN_INPUT_TAG(ifp, m, vlanid, _errcase) \ do { \ struct m_tag *mtag = \ m_tag_get(PACKET_TAG_VLAN, sizeof(u_int), M_NOWAIT);\ if (mtag == NULL) { \ ifp->if_ierrors++; \ printf("%s: unable to allocate VLAN tag\n", \ ifp->if_xname); \ m_freem(m); \ _errcase; \ } \ *(u_int *)(mtag + 1) = vlanid; \ m_tag_prepend(m, mtag); \ } while(0) /* extract VLAN tag from output/trasmit packet */ #define VLAN_OUTPUT_TAG(ec, m0) \ VLAN_ATTACHED(ec) ? m_tag_find((m0), PACKET_TAG_VLAN, NULL) : NULL /* extract VLAN ID value from a VLAN tag */ #define VLAN_TAG_VALUE(mtag) \ ((*(u_int *)(mtag + 1)) & 4095) /* test if any VLAN is configured for this interface */ #define VLAN_ATTACHED(ec) ((ec)->ec_nvlans > 0) void ether_ifattach(struct ifnet *, const u_int8_t *); void ether_ifdetach(struct ifnet *); char *ether_sprintf(const u_int8_t *); char *ether_snprintf(char *, size_t, const u_int8_t *); u_int32_t ether_crc32_le(const u_int8_t *, size_t); u_int32_t ether_crc32_be(const u_int8_t *, size_t); int ether_nonstatic_aton(u_char *, char *); #else /* * Prototype ethers(3) functions. */ #include __BEGIN_DECLS char * ether_ntoa __P((const struct ether_addr *)); struct ether_addr * ether_aton __P((const char *)); int ether_ntohost __P((char *, const struct ether_addr *)); int ether_hostton __P((const char *, struct ether_addr *)); int ether_line __P((const char *, struct ether_addr *, char *)); __END_DECLS #endif #endif /* _STANDALONE */ #endif /* !_NET_IF_ETHER_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/net/if_ieee1394.h ================================================ /* $NetBSD: if_ieee1394.h,v 1.6 2005/12/10 23:21:38 elad Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Atsushi Onoe. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the NetBSD * Foundation, Inc. and its contributors. * 4. Neither the name of The NetBSD Foundation nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef _NET_IF_IEEE1394_H_ #define _NET_IF_IEEE1394_H_ /* hardware address information for arp / nd */ struct ieee1394_hwaddr { u_int8_t iha_uid[8]; /* node unique ID */ u_int8_t iha_maxrec; /* max_rec in the config ROM */ u_int8_t iha_speed; /* min of link/PHY speed */ u_int8_t iha_offset[6]; /* unicast FIFO address */ }; /* * BPF wants to see one of these. */ struct ieee1394_bpfhdr { uint8_t ibh_dhost[8]; uint8_t ibh_shost[8]; uint16_t ibh_type; }; #ifdef _KERNEL /* pseudo header */ struct ieee1394_header { u_int8_t ih_uid[8]; /* dst/src uid */ u_int8_t ih_maxrec; /* dst maxrec for tx */ u_int8_t ih_speed; /* speed */ u_int8_t ih_offset[6]; /* dst offset */ }; /* unfragment encapsulation header */ struct ieee1394_unfraghdr { u_int16_t iuh_ft; /* fragment type == 0 */ u_int16_t iuh_etype; /* ether_type */ }; /* fragmented encapsulation header */ struct ieee1394_fraghdr { u_int16_t ifh_ft_size; /* fragment type, data size-1 */ u_int16_t ifh_etype_off; /* etype for first fragment */ /* offset for subseq frag */ u_int16_t ifh_dgl; /* datagram label */ u_int16_t ifh_reserved; }; #define IEEE1394_FT_SUBSEQ 0x8000 #define IEEE1394_FT_MORE 0x4000 #define IEEE1394MTU 1500 #define IEEE1394_GASP_LEN 8 /* GASP header for Stream */ #define IEEE1394_ADDR_LEN 8 #define IEEE1394_CRC_LEN 4 struct ieee1394_reass_pkt { LIST_ENTRY(ieee1394_reass_pkt) rp_next; struct mbuf *rp_m; u_int16_t rp_size; u_int16_t rp_etype; u_int16_t rp_off; u_int16_t rp_dgl; u_int16_t rp_len; u_int16_t rp_ttl; }; struct ieee1394_reassq { LIST_ENTRY(ieee1394_reassq) rq_node; LIST_HEAD(, ieee1394_reass_pkt) rq_pkt; u_int32_t fr_id; }; struct ieee1394com { struct ifnet fc_if; struct ieee1394_hwaddr ic_hwaddr; u_int16_t ic_dgl; LIST_HEAD(, ieee1394_reassq) ic_reassq; }; const char *ieee1394_sprintf(const u_int8_t *); void ieee1394_input(struct ifnet *, struct mbuf *, u_int16_t); void ieee1394_ifattach(struct ifnet *, const struct ieee1394_hwaddr *); void ieee1394_ifdetach(struct ifnet *); int ieee1394_ioctl(struct ifnet *, u_long, caddr_t); struct mbuf * ieee1394_fragment(struct ifnet *, struct mbuf *, int, u_int16_t); void ieee1394_drain(struct ifnet *); void ieee1394_watchdog(struct ifnet *); #endif /* _KERNEL */ #endif /* !_NET_IF_IEEE1394_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/net/if_packet.h ================================================ #include ================================================ FILE: atlas-aapt/bionic/libc/include/net/if_types.h ================================================ /* $NetBSD: if_types.h,v 1.26 2012/08/05 21:21:41 wiz Exp $ */ /* * Copyright (c) 1989, 1993, 1994 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)if_types.h 8.3 (Berkeley) 4/28/95 */ #ifndef _NET_IF_TYPES_H_ #define _NET_IF_TYPES_H_ /* * Interface types for benefit of parsing media address headers. * This list is derived from the SNMP list of ifTypes, originally * documented in RFC1573, now maintained as: * * */ #define IFT_OTHER 0x1 /* none of the following */ #define IFT_1822 0x2 /* old-style arpanet imp */ #define IFT_HDH1822 0x3 /* HDH arpanet imp */ #define IFT_X25DDN 0x4 /* x25 to imp */ #define IFT_X25 0x5 /* PDN X25 interface (RFC877) */ #define IFT_ETHER 0x6 /* Ethernet CSMA/CD */ #define IFT_ISO88023 0x7 /* CSMA/CD */ #define IFT_ISO88024 0x8 /* Token Bus */ #define IFT_ISO88025 0x9 /* Token Ring */ #define IFT_ISO88026 0xa /* MAN */ #define IFT_STARLAN 0xb #define IFT_P10 0xc /* Proteon 10MBit ring */ #define IFT_P80 0xd /* Proteon 80MBit ring */ #define IFT_HY 0xe /* Hyperchannel */ #define IFT_FDDI 0xf #define IFT_LAPB 0x10 #define IFT_SDLC 0x11 #define IFT_T1 0x12 #define IFT_CEPT 0x13 /* E1 - european T1 */ #define IFT_ISDNBASIC 0x14 #define IFT_ISDNPRIMARY 0x15 #define IFT_PTPSERIAL 0x16 /* Proprietary PTP serial */ #define IFT_PPP 0x17 /* RFC 1331 */ #define IFT_LOOP 0x18 /* loopback */ #define IFT_EON 0x19 /* ISO over IP */ #define IFT_XETHER 0x1a /* obsolete 3MB experimental ethernet */ #define IFT_NSIP 0x1b /* XNS over IP */ #define IFT_SLIP 0x1c /* IP over generic TTY */ #define IFT_ULTRA 0x1d /* Ultra Technologies */ #define IFT_DS3 0x1e /* Generic T3 */ #define IFT_SIP 0x1f /* SMDS */ #define IFT_FRELAY 0x20 /* Frame Relay DTE only */ #define IFT_RS232 0x21 #define IFT_PARA 0x22 /* parallel-port */ #define IFT_ARCNET 0x23 #define IFT_ARCNETPLUS 0x24 #define IFT_ATM 0x25 /* ATM cells */ #define IFT_MIOX25 0x26 #define IFT_SONET 0x27 /* SONET or SDH */ #define IFT_X25PLE 0x28 #define IFT_ISO88022LLC 0x29 #define IFT_LOCALTALK 0x2a #define IFT_SMDSDXI 0x2b #define IFT_FRELAYDCE 0x2c /* Frame Relay DCE */ #define IFT_V35 0x2d #define IFT_HSSI 0x2e #define IFT_HIPPI 0x2f #define IFT_MODEM 0x30 /* Generic Modem */ #define IFT_AAL5 0x31 /* AAL5 over ATM */ #define IFT_SONETPATH 0x32 #define IFT_SONETVT 0x33 #define IFT_SMDSICIP 0x34 /* SMDS InterCarrier Interface */ #define IFT_PROPVIRTUAL 0x35 /* Proprietary Virtual/internal */ #define IFT_PROPMUX 0x36 /* Proprietary Multiplexing */ #define IFT_IEEE80212 0x37 /* 100BaseVG */ #define IFT_FIBRECHANNEL 0x38 /* Fibre Channel */ #define IFT_HIPPIINTERFACE 0x39 /* HIPPI interfaces */ #define IFT_FRAMERELAYINTERCONNECT 0x3a /* Obsolete, use either 0x20 or 0x2c */ #define IFT_AFLANE8023 0x3b /* ATM Emulated LAN for 802.3 */ #define IFT_AFLANE8025 0x3c /* ATM Emulated LAN for 802.5 */ #define IFT_CCTEMUL 0x3d /* ATM Emulated circuit */ #define IFT_FASTETHER 0x3e /* Fast Ethernet (100BaseT) */ #define IFT_ISDN 0x3f /* ISDN and X.25 */ #define IFT_V11 0x40 /* CCITT V.11/X.21 */ #define IFT_V36 0x41 /* CCITT V.36 */ #define IFT_G703AT64K 0x42 /* CCITT G703 at 64Kbps */ #define IFT_G703AT2MB 0x43 /* Obsolete see DS1-MIB */ #define IFT_QLLC 0x44 /* SNA QLLC */ #define IFT_FASTETHERFX 0x45 /* Fast Ethernet (100BaseFX) */ #define IFT_CHANNEL 0x46 /* channel */ #define IFT_IEEE80211 0x47 /* radio spread spectrum */ #define IFT_IBM370PARCHAN 0x48 /* IBM System 360/370 OEMI Channel */ #define IFT_ESCON 0x49 /* IBM Enterprise Systems Connection */ #define IFT_DLSW 0x4a /* Data Link Switching */ #define IFT_ISDNS 0x4b /* ISDN S/T interface */ #define IFT_ISDNU 0x4c /* ISDN U interface */ #define IFT_LAPD 0x4d /* Link Access Protocol D */ #define IFT_IPSWITCH 0x4e /* IP Switching Objects */ #define IFT_RSRB 0x4f /* Remote Source Route Bridging */ #define IFT_ATMLOGICAL 0x50 /* ATM Logical Port */ #define IFT_DS0 0x51 /* Digital Signal Level 0 */ #define IFT_DS0BUNDLE 0x52 /* group of ds0s on the same ds1 */ #define IFT_BSC 0x53 /* Bisynchronous Protocol */ #define IFT_ASYNC 0x54 /* Asynchronous Protocol */ #define IFT_CNR 0x55 /* Combat Net Radio */ #define IFT_ISO88025DTR 0x56 /* ISO 802.5r DTR */ #define IFT_EPLRS 0x57 /* Ext Pos Loc Report Sys */ #define IFT_ARAP 0x58 /* Appletalk Remote Access Protocol */ #define IFT_PROPCNLS 0x59 /* Proprietary Connectionless Protocol*/ #define IFT_HOSTPAD 0x5a /* CCITT-ITU X.29 PAD Protocol */ #define IFT_TERMPAD 0x5b /* CCITT-ITU X.3 PAD Facility */ #define IFT_FRAMERELAYMPI 0x5c /* Multiproto Interconnect over FR */ #define IFT_X213 0x5d /* CCITT-ITU X213 */ #define IFT_ADSL 0x5e /* Asymmetric Digital Subscriber Loop */ #define IFT_RADSL 0x5f /* Rate-Adapt. Digital Subscriber Loop*/ #define IFT_SDSL 0x60 /* Symmetric Digital Subscriber Loop */ #define IFT_VDSL 0x61 /* Very H-Speed Digital Subscrib. Loop*/ #define IFT_ISO88025CRFPINT 0x62 /* ISO 802.5 CRFP */ #define IFT_MYRINET 0x63 /* Myricom Myrinet */ #define IFT_VOICEEM 0x64 /* voice recEive and transMit */ #define IFT_VOICEFXO 0x65 /* voice Foreign Exchange Office */ #define IFT_VOICEFXS 0x66 /* voice Foreign Exchange Station */ #define IFT_VOICEENCAP 0x67 /* voice encapsulation */ #define IFT_VOICEOVERIP 0x68 /* voice over IP encapsulation */ #define IFT_ATMDXI 0x69 /* ATM DXI */ #define IFT_ATMFUNI 0x6a /* ATM FUNI */ #define IFT_ATMIMA 0x6b /* ATM IMA */ #define IFT_PPPMULTILINKBUNDLE 0x6c /* PPP Multilink Bundle */ #define IFT_IPOVERCDLC 0x6d /* IBM ipOverCdlc */ #define IFT_IPOVERCLAW 0x6e /* IBM Common Link Access to Workstn */ #define IFT_STACKTOSTACK 0x6f /* IBM stackToStack */ #define IFT_VIRTUALIPADDRESS 0x70 /* IBM VIPA */ #define IFT_MPC 0x71 /* IBM multi-protocol channel support */ #define IFT_IPOVERATM 0x72 /* IBM ipOverAtm */ #define IFT_ISO88025FIBER 0x73 /* ISO 802.5j Fiber Token Ring */ #define IFT_TDLC 0x74 /* IBM twinaxial data link control */ #define IFT_GIGABITETHERNET 0x75 /* Gigabit Ethernet */ #define IFT_HDLC 0x76 /* HDLC */ #define IFT_LAPF 0x77 /* LAP F */ #define IFT_V37 0x78 /* V.37 */ #define IFT_X25MLP 0x79 /* Multi-Link Protocol */ #define IFT_X25HUNTGROUP 0x7a /* X25 Hunt Group */ #define IFT_TRANSPHDLC 0x7b /* Transp HDLC */ #define IFT_INTERLEAVE 0x7c /* Interleave channel */ #define IFT_FAST 0x7d /* Fast channel */ #define IFT_IP 0x7e /* IP (for APPN HPR in IP networks) */ #define IFT_DOCSCABLEMACLAYER 0x7f /* CATV Mac Layer */ #define IFT_DOCSCABLEDOWNSTREAM 0x80 /* CATV Downstream interface */ #define IFT_DOCSCABLEUPSTREAM 0x81 /* CATV Upstream interface */ #define IFT_A12MPPSWITCH 0x82 /* Avalon Parallel Processor */ #define IFT_TUNNEL 0x83 /* Encapsulation interface */ #define IFT_COFFEE 0x84 /* coffee pot */ #define IFT_CES 0x85 /* Circiut Emulation Service */ #define IFT_ATMSUBINTERFACE 0x86 /* (x) ATM Sub Interface */ #define IFT_L2VLAN 0x87 /* Layer 2 Virtual LAN using 802.1Q */ #define IFT_L3IPVLAN 0x88 /* Layer 3 Virtual LAN - IP Protocol */ #define IFT_L3IPXVLAN 0x89 /* Layer 3 Virtual LAN - IPX Prot. */ #define IFT_DIGITALPOWERLINE 0x8a /* IP over Power Lines */ #define IFT_MEDIAMAILOVERIP 0x8b /* (xxx) Multimedia Mail over IP */ #define IFT_DTM 0x8c /* Dynamic synchronous Transfer Mode */ #define IFT_DCN 0x8d /* Data Communications Network */ #define IFT_IPFORWARD 0x8e /* IP Forwarding Interface */ #define IFT_MSDSL 0x8f /* Multi-rate Symmetric DSL */ #define IFT_IEEE1394 0x90 /* IEEE1394 High Performance SerialBus*/ #define IFT_IFGSN 0x91 /* HIPPI-6400 */ #define IFT_DVBRCCMACLAYER 0x92 /* DVB-RCC MAC Layer */ #define IFT_DVBRCCDOWNSTREAM 0x93 /* DVB-RCC Downstream Channel */ #define IFT_DVBRCCUPSTREAM 0x94 /* DVB-RCC Upstream Channel */ #define IFT_ATMVIRTUAL 0x95 /* ATM Virtual Interface */ #define IFT_MPLSTUNNEL 0x96 /* MPLS Tunnel Virtual Interface */ #define IFT_SRP 0x97 /* Spatial Reuse Protocol */ #define IFT_VOICEOVERATM 0x98 /* Voice over ATM */ #define IFT_VOICEOVERFRAMERELAY 0x99 /* Voice Over Frame Relay */ #define IFT_IDSL 0x9a /* Digital Subscriber Loop over ISDN */ #define IFT_COMPOSITELINK 0x9b /* Avici Composite Link Interface */ #define IFT_SS7SIGLINK 0x9c /* SS7 Signaling Link */ #define IFT_PROPWIRELESSP2P 0x9d /* Prop. P2P wireless interface */ #define IFT_FRFORWARD 0x9e /* Frame forward Interface */ #define IFT_RFC1483 0x9f /* Multiprotocol over ATM AAL5 */ #define IFT_USB 0xa0 /* USB Interface */ #define IFT_IEEE8023ADLAG 0xa1 /* IEEE 802.3ad Link Aggregate*/ #define IFT_BGPPOLICYACCOUNTING 0xa2 /* BGP Policy Accounting */ #define IFT_FRF16MFRBUNDLE 0xa3 /* FRF.16 Multilik Frame Relay*/ #define IFT_H323GATEKEEPER 0xa4 /* H323 Gatekeeper */ #define IFT_H323PROXY 0xa5 /* H323 Voice and Video Proxy */ #define IFT_MPLS 0xa6 /* MPLS */ #define IFT_MFSIGLINK 0xa7 /* Multi-frequency signaling link */ #define IFT_HDSL2 0xa8 /* High Bit-Rate DSL, 2nd gen. */ #define IFT_SHDSL 0xa9 /* Multirate HDSL2 */ #define IFT_DS1FDL 0xaa /* Facility Data Link (4Kbps) on a DS1*/ #define IFT_POS 0xab /* Packet over SONET/SDH Interface */ #define IFT_DVBASILN 0xac /* DVB-ASI Input */ #define IFT_DVBASIOUT 0xad /* DVB-ASI Output */ #define IFT_PLC 0xae /* Power Line Communications */ #define IFT_NFAS 0xaf /* Non-Facility Associated Signaling */ #define IFT_TR008 0xb0 /* TROO8 */ #define IFT_GR303RDT 0xb1 /* Remote Digital Terminal */ #define IFT_GR303IDT 0xb2 /* Integrated Digital Terminal */ #define IFT_ISUP 0xb3 /* ISUP */ #define IFT_PROPDOCSWIRELESSMACLAYER 0xb4 /* prop/Wireless MAC Layer */ #define IFT_PROPDOCSWIRELESSDOWNSTREAM 0xb5 /* prop/Wireless Downstream */ #define IFT_PROPDOCSWIRELESSUPSTREAM 0xb6 /* prop/Wireless Upstream */ #define IFT_HIPERLAN2 0xb7 /* HIPERLAN Type 2 Radio Interface */ #define IFT_PROPBWAP2MP 0xb8 /* PropBroadbandWirelessAccess P2MP*/ #define IFT_SONETOVERHEADCHANNEL 0xb9 /* SONET Overhead Channel */ #define IFT_DIGITALWRAPPEROVERHEADCHANNEL 0xba /* Digital Wrapper Overhead */ #define IFT_AAL2 0xbb /* ATM adaptation layer 2 */ #define IFT_RADIOMAC 0xbc /* MAC layer over radio links */ #define IFT_ATMRADIO 0xbd /* ATM over radio links */ #define IFT_IMT 0xbe /* Inter-Machine Trunks */ #define IFT_MVL 0xbf /* Multiple Virtual Lines DSL */ #define IFT_REACHDSL 0xc0 /* Long Reach DSL */ #define IFT_FRDLCIENDPT 0xc1 /* Frame Relay DLCI End Point */ #define IFT_ATMVCIENDPT 0xc2 /* ATM VCI End Point */ #define IFT_OPTICALCHANNEL 0xc3 /* Optical Channel */ #define IFT_OPTICALTRANSPORT 0xc4 /* Optical Transport */ #define IFT_PROPATM 0xc5 /* Proprietary ATM */ #define IFT_VOICEOVERCABLE 0xc6 /* Voice Over Cable Interface */ #define IFT_INFINIBAND 0xc7 /* Infiniband */ #define IFT_TELINK 0xc8 /* TE Link */ #define IFT_Q2931 0xc9 /* Q.2931 */ #define IFT_VIRTUALTG 0xca /* Virtual Trunk Group */ #define IFT_SIPTG 0xcb /* SIP Trunk Group */ #define IFT_SIPSIG 0xcc /* SIP Signaling */ #define IFT_DOCSCABLEUPSTREAMCHANNEL 0xcd /* CATV Upstream Channel */ #define IFT_ECONET 0xce /* Acorn Econet */ #define IFT_PON155 0xcf /* FSAN 155Mb Symetrical PON interface */ #define IFT_PON622 0xd0 /* FSAN 622Mb Symetrical PON interface */ #define IFT_BRIDGE 0xd1 /* Transparent bridge interface */ #define IFT_LINEGROUP 0xd2 /* Interface common to multiple lines */ #define IFT_VOICEEMFGD 0xd3 /* voice E&M Feature Group D */ #define IFT_VOICEFGDEANA 0xd4 /* voice FGD Exchange Access North American */ #define IFT_VOICEDID 0xd5 /* voice Direct Inward Dialing */ #define IFT_STF 0xd7 /* 6to4 interface */ /* not based on IANA assignments - how should we treat these? */ #define IFT_GIF 0xf0 #define IFT_PVC 0xf1 #define IFT_FAITH 0xf2 #define IFT_PFLOG 0xf5 /* Packet filter logging */ #define IFT_PFSYNC 0xf6 /* Packet filter state syncing */ #define IFT_CARP 0xf8 /* Common Address Redundancy Protocol */ #endif /* !_NET_IF_TYPES_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/net/route.h ================================================ /* * Copyright (C) 2014 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _NET_ROUTE_H_ #define _NET_ROUTE_H_ #include #include #include #include #endif ================================================ FILE: atlas-aapt/bionic/libc/include/netdb.h ================================================ /*- * Copyright (c) 1980, 1983, 1988, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * - * Portions Copyright (c) 1993 by Digital Equipment Corporation. * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies, and that * the name of Digital Equipment Corporation not be used in advertising or * publicity pertaining to distribution of the document or software without * specific, written prior permission. * * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. * - * --Copyright-- */ /* * @(#)netdb.h 8.1 (Berkeley) 6/2/93 * From: Id: netdb.h,v 8.9 1996/11/19 08:39:29 vixie Exp $ * $FreeBSD: /repoman/r/ncvs/src/include/netdb.h,v 1.41 2006/04/15 16:20:26 ume Exp $ */ #ifndef _NETDB_H_ #define _NETDB_H_ #include #include #include #ifndef _PATH_HEQUIV # define _PATH_HEQUIV "/system/etc/hosts.equiv" #endif #define _PATH_HOSTS "/system/etc/hosts" #define _PATH_NETWORKS "/system/etc/networks" #define _PATH_PROTOCOLS "/system/etc/protocols" #define _PATH_SERVICES "/system/etc/services" /* * Structures returned by network data base library. All addresses are * supplied in host order, and returned in network order (suitable for * use in system calls). */ struct hostent { char *h_name; /* official name of host */ char **h_aliases; /* alias list */ int h_addrtype; /* host address type */ int h_length; /* length of address */ char **h_addr_list; /* list of addresses from name server */ #define h_addr h_addr_list[0] /* address, for backward compatibility */ }; struct netent { char *n_name; /* official name of net */ char **n_aliases; /* alias list */ int n_addrtype; /* net address type */ uint32_t n_net; /* network # */ }; struct servent { char *s_name; /* official service name */ char **s_aliases; /* alias list */ int s_port; /* port # */ char *s_proto; /* protocol to use */ }; struct protoent { char *p_name; /* official protocol name */ char **p_aliases; /* alias list */ int p_proto; /* protocol # */ }; struct addrinfo { int ai_flags; /* AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST */ int ai_family; /* PF_xxx */ int ai_socktype; /* SOCK_xxx */ int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */ socklen_t ai_addrlen; /* length of ai_addr */ char *ai_canonname; /* canonical name for hostname */ struct sockaddr *ai_addr; /* binary address */ struct addrinfo *ai_next; /* next structure in linked list */ }; /* * Error return codes from gethostbyname() and gethostbyaddr() * (left in h_errno). */ #define NETDB_INTERNAL -1 /* see errno */ #define NETDB_SUCCESS 0 /* no problem */ #define HOST_NOT_FOUND 1 /* Authoritative Answer Host not found */ #define TRY_AGAIN 2 /* Non-Authoritative Host not found, or SERVERFAIL */ #define NO_RECOVERY 3 /* Non recoverable errors, FORMERR, REFUSED, NOTIMP */ #define NO_DATA 4 /* Valid name, no data record of requested type */ #define NO_ADDRESS NO_DATA /* no address, look for MX record */ /* * Error return codes from getaddrinfo() */ #define EAI_ADDRFAMILY 1 /* address family for hostname not supported */ #define EAI_AGAIN 2 /* temporary failure in name resolution */ #define EAI_BADFLAGS 3 /* invalid value for ai_flags */ #define EAI_FAIL 4 /* non-recoverable failure in name resolution */ #define EAI_FAMILY 5 /* ai_family not supported */ #define EAI_MEMORY 6 /* memory allocation failure */ #define EAI_NODATA 7 /* no address associated with hostname */ #define EAI_NONAME 8 /* hostname nor servname provided, or not known */ #define EAI_SERVICE 9 /* servname not supported for ai_socktype */ #define EAI_SOCKTYPE 10 /* ai_socktype not supported */ #define EAI_SYSTEM 11 /* system error returned in errno */ #define EAI_BADHINTS 12 /* invalid value for hints */ #define EAI_PROTOCOL 13 /* resolved protocol is unknown */ #define EAI_OVERFLOW 14 /* argument buffer overflow */ #define EAI_MAX 15 /* * Flag values for getaddrinfo() */ #define AI_PASSIVE 0x00000001 /* get address to use bind() */ #define AI_CANONNAME 0x00000002 /* fill ai_canonname */ #define AI_NUMERICHOST 0x00000004 /* prevent host name resolution */ #define AI_NUMERICSERV 0x00000008 /* prevent service name resolution */ /* valid flags for addrinfo (not a standard def, apps should not use it) */ #define AI_MASK \ (AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST | AI_NUMERICSERV | \ AI_ADDRCONFIG) #define AI_ALL 0x00000100 /* IPv6 and IPv4-mapped (with AI_V4MAPPED) */ #define AI_V4MAPPED_CFG 0x00000200 /* accept IPv4-mapped if kernel supports */ #define AI_ADDRCONFIG 0x00000400 /* only if any address is assigned */ #define AI_V4MAPPED 0x00000800 /* accept IPv4-mapped IPv6 address */ /* special recommended flags for getipnodebyname */ #define AI_DEFAULT (AI_V4MAPPED_CFG | AI_ADDRCONFIG) /* * Constants for getnameinfo() */ #define NI_MAXHOST 1025 #define NI_MAXSERV 32 /* * Flag values for getnameinfo() */ #define NI_NOFQDN 0x00000001 #define NI_NUMERICHOST 0x00000002 #define NI_NAMEREQD 0x00000004 #define NI_NUMERICSERV 0x00000008 #define NI_DGRAM 0x00000010 #if 0 /* obsolete */ #define NI_WITHSCOPEID 0x00000020 #endif /* * Scope delimit character */ #define SCOPE_DELIMITER '%' __BEGIN_DECLS #pragma GCC visibility push(default) /* BIONIC-BEGIN */ #define h_errno (*__get_h_errno()) int* __get_h_errno(void); /* BIONIC-END */ void endhostent(void); void endnetent(void); void endnetgrent(void); void endprotoent(void); void endservent(void); void freehostent(struct hostent *); struct hostent *gethostbyaddr(const void *, socklen_t, int); int gethostbyaddr_r(const void *, socklen_t, int, struct hostent *, char *, size_t, struct hostent **, int *); struct hostent *gethostbyname(const char *); int gethostbyname_r(const char *, struct hostent *, char *, size_t, struct hostent **, int *); struct hostent *gethostbyname2(const char *, int); int gethostbyname2_r(const char *, int, struct hostent *, char *, size_t, struct hostent **, int *); struct hostent *gethostent(void); int gethostent_r(struct hostent *, char *, size_t, struct hostent **, int *); struct hostent *getipnodebyaddr(const void *, size_t, int, int *); struct hostent *getipnodebyname(const char *, int, int, int *); struct netent *getnetbyaddr(uint32_t, int); int getnetbyaddr_r(uint32_t, int, struct netent *, char *, size_t, struct netent**, int *); struct netent *getnetbyname(const char *); int getnetbyname_r(const char *, struct netent *, char *, size_t, struct netent **, int *); struct netent *getnetent(void); int getnetent_r(struct netent *, char *, size_t, struct netent **, int *); int getnetgrent(char **, char **, char **); struct protoent *getprotobyname(const char *); int getprotobyname_r(const char *, struct protoent *, char *, size_t, struct protoent **); struct protoent *getprotobynumber(int); int getprotobynumber_r(int, struct protoent *, char *, size_t, struct protoent **); struct protoent *getprotoent(void); int getprotoent_r(struct protoent *, char *, size_t, struct protoent **); struct servent *getservbyname(const char *, const char *); struct servent *getservbyport(int, const char *); struct servent *getservent(void); void herror(const char *); const char *hstrerror(int); int innetgr(const char *, const char *, const char *, const char *); void sethostent(int); void setnetent(int); void setprotoent(int); int getaddrinfo(const char *, const char *, const struct addrinfo *, struct addrinfo **); int getnameinfo(const struct sockaddr *, socklen_t, char *, size_t, char *, size_t, int); void freeaddrinfo(struct addrinfo *); const char *gai_strerror(int); void setnetgrent(const char *); void setservent(int); #pragma GCC visibility pop __END_DECLS #endif /* !_NETDB_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/netinet/ether.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include ================================================ FILE: atlas-aapt/bionic/libc/include/netinet/icmp6.h ================================================ /* $NetBSD: icmp6.h,v 1.47 2013/07/01 12:43:15 christos Exp $ */ /* $KAME: icmp6.h,v 1.84 2003/04/23 10:26:51 itojun Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the project nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /* * Copyright (c) 1982, 1986, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)ip_icmp.h 8.1 (Berkeley) 6/10/93 */ #ifndef _NETINET_ICMP6_H_ #define _NETINET_ICMP6_H_ #include /* android-added: glibc source compatibility. */ #define ICMPV6_PLD_MAXLEN 1232 /* IPV6_MMTU - sizeof(struct ip6_hdr) - sizeof(struct icmp6_hdr) */ struct icmp6_hdr { u_int8_t icmp6_type; /* type field */ u_int8_t icmp6_code; /* code field */ u_int16_t icmp6_cksum; /* checksum field */ union { u_int32_t icmp6_un_data32[1]; /* type-specific field */ u_int16_t icmp6_un_data16[2]; /* type-specific field */ u_int8_t icmp6_un_data8[4]; /* type-specific field */ } icmp6_dataun; } __packed; #define icmp6_data32 icmp6_dataun.icmp6_un_data32 #define icmp6_data16 icmp6_dataun.icmp6_un_data16 #define icmp6_data8 icmp6_dataun.icmp6_un_data8 #define icmp6_pptr icmp6_data32[0] /* parameter prob */ #define icmp6_mtu icmp6_data32[0] /* packet too big */ #define icmp6_id icmp6_data16[0] /* echo request/reply */ #define icmp6_seq icmp6_data16[1] /* echo request/reply */ #define icmp6_maxdelay icmp6_data16[0] /* mcast group membership */ #define ICMP6_DST_UNREACH 1 /* dest unreachable, codes: */ #define ICMP6_PACKET_TOO_BIG 2 /* packet too big */ #define ICMP6_TIME_EXCEEDED 3 /* time exceeded, code: */ #define ICMP6_PARAM_PROB 4 /* ip6 header bad */ #define ICMP6_ECHO_REQUEST 128 /* echo service */ #define ICMP6_ECHO_REPLY 129 /* echo reply */ #define MLD_LISTENER_QUERY 130 /* multicast listener query */ #define MLD_LISTENER_REPORT 131 /* multicast listener report */ #define MLD_LISTENER_DONE 132 /* multicast listener done */ #define MLD_LISTENER_REDUCTION MLD_LISTENER_DONE /* RFC3542 definition */ /* RFC2292 decls */ #define ICMP6_MEMBERSHIP_QUERY 130 /* group membership query */ #define ICMP6_MEMBERSHIP_REPORT 131 /* group membership report */ #define ICMP6_MEMBERSHIP_REDUCTION 132 /* group membership termination */ #ifndef _KERNEL /* the followings are for backward compatibility to old KAME apps. */ #define MLD6_LISTENER_QUERY MLD_LISTENER_QUERY #define MLD6_LISTENER_REPORT MLD_LISTENER_REPORT #define MLD6_LISTENER_DONE MLD_LISTENER_DONE #endif #define ND_ROUTER_SOLICIT 133 /* router solicitation */ #define ND_ROUTER_ADVERT 134 /* router advertisement */ #define ND_NEIGHBOR_SOLICIT 135 /* neighbor solicitation */ #define ND_NEIGHBOR_ADVERT 136 /* neighbor advertisement */ #define ND_REDIRECT 137 /* redirect */ #define ICMP6_ROUTER_RENUMBERING 138 /* router renumbering */ #define ICMP6_WRUREQUEST 139 /* who are you request */ #define ICMP6_WRUREPLY 140 /* who are you reply */ #define ICMP6_FQDN_QUERY 139 /* FQDN query */ #define ICMP6_FQDN_REPLY 140 /* FQDN reply */ #define ICMP6_NI_QUERY 139 /* node information request */ #define ICMP6_NI_REPLY 140 /* node information reply */ #define MLDV2_LISTENER_REPORT 143 /* RFC3810 listener report */ /* The definitions below are experimental. TBA */ #define MLD_MTRACE_RESP 200 /* mtrace response(to sender) */ #define MLD_MTRACE 201 /* mtrace messages */ #ifndef _KERNEL /* the followings are for backward compatibility to old KAME apps. */ #define MLD6_MTRACE_RESP MLD_MTRACE_RESP #define MLD6_MTRACE MLD_MTRACE #endif #define ICMP6_MAXTYPE 201 #define ICMP6_DST_UNREACH_NOROUTE 0 /* no route to destination */ #define ICMP6_DST_UNREACH_ADMIN 1 /* administratively prohibited */ #define ICMP6_DST_UNREACH_NOTNEIGHBOR 2 /* not a neighbor(obsolete) */ #define ICMP6_DST_UNREACH_BEYONDSCOPE 2 /* beyond scope of source address */ #define ICMP6_DST_UNREACH_ADDR 3 /* address unreachable */ #define ICMP6_DST_UNREACH_NOPORT 4 /* port unreachable */ #define ICMP6_DST_UNREACH_POLICY 5 /* source address failed ingress/egress policy */ #define ICMP6_DST_UNREACH_REJROUTE 6 /* reject route to destination */ #define ICMP6_DST_UNREACH_SOURCERT 7 /* error in source routing header */ #define ICMP6_TIME_EXCEED_TRANSIT 0 /* ttl==0 in transit */ #define ICMP6_TIME_EXCEED_REASSEMBLY 1 /* ttl==0 in reass */ #define ICMP6_PARAMPROB_HEADER 0 /* erroneous header field */ #define ICMP6_PARAMPROB_NEXTHEADER 1 /* unrecognized next header */ #define ICMP6_PARAMPROB_OPTION 2 /* unrecognized option */ #define ICMP6_INFOMSG_MASK 0x80 /* all informational messages */ #define ICMP6_NI_SUBJ_IPV6 0 /* Query Subject is an IPv6 address */ #define ICMP6_NI_SUBJ_FQDN 1 /* Query Subject is a Domain name */ #define ICMP6_NI_SUBJ_IPV4 2 /* Query Subject is an IPv4 address */ #define ICMP6_NI_SUCCESS 0 /* node information successful reply */ #define ICMP6_NI_REFUSED 1 /* node information request is refused */ #define ICMP6_NI_UNKNOWN 2 /* unknown Qtype */ #define ICMP6_ROUTER_RENUMBERING_COMMAND 0 /* rr command */ #define ICMP6_ROUTER_RENUMBERING_RESULT 1 /* rr result */ #define ICMP6_ROUTER_RENUMBERING_SEQNUM_RESET 255 /* rr seq num reset */ /* Used in kernel only */ #define ND_REDIRECT_ONLINK 0 /* redirect to an on-link node */ #define ND_REDIRECT_ROUTER 1 /* redirect to a better router */ /* * Multicast Listener Discovery */ struct mld_hdr { struct icmp6_hdr mld_icmp6_hdr; struct in6_addr mld_addr; /* multicast address */ } __packed; /* definitions to provide backward compatibility to old KAME applications */ #ifndef _KERNEL #define mld6_hdr mld_hdr #define mld6_type mld_type #define mld6_code mld_code #define mld6_cksum mld_cksum #define mld6_maxdelay mld_maxdelay #define mld6_reserved mld_reserved #define mld6_addr mld_addr #endif /* shortcut macro definitions */ #define mld_type mld_icmp6_hdr.icmp6_type #define mld_code mld_icmp6_hdr.icmp6_code #define mld_cksum mld_icmp6_hdr.icmp6_cksum #define mld_maxdelay mld_icmp6_hdr.icmp6_data16[0] #define mld_reserved mld_icmp6_hdr.icmp6_data16[1] #define MLD_MINLEN 24 /* * Neighbor Discovery */ struct nd_router_solicit { /* router solicitation */ struct icmp6_hdr nd_rs_hdr; /* could be followed by options */ } __packed; #define nd_rs_type nd_rs_hdr.icmp6_type #define nd_rs_code nd_rs_hdr.icmp6_code #define nd_rs_cksum nd_rs_hdr.icmp6_cksum #define nd_rs_reserved nd_rs_hdr.icmp6_data32[0] struct nd_router_advert { /* router advertisement */ struct icmp6_hdr nd_ra_hdr; u_int32_t nd_ra_reachable; /* reachable time */ u_int32_t nd_ra_retransmit; /* retransmit timer */ /* could be followed by options */ } __packed; #define nd_ra_type nd_ra_hdr.icmp6_type #define nd_ra_code nd_ra_hdr.icmp6_code #define nd_ra_cksum nd_ra_hdr.icmp6_cksum #define nd_ra_curhoplimit nd_ra_hdr.icmp6_data8[0] #define nd_ra_flags_reserved nd_ra_hdr.icmp6_data8[1] #define ND_RA_FLAG_MANAGED 0x80 #define ND_RA_FLAG_OTHER 0x40 #define ND_RA_FLAG_HOME_AGENT 0x20 /* * Router preference values based on RFC4191. */ #define ND_RA_FLAG_RTPREF_MASK 0x18 /* 00011000 */ #define ND_RA_FLAG_RTPREF_HIGH 0x08 /* 00001000 */ #define ND_RA_FLAG_RTPREF_MEDIUM 0x00 /* 00000000 */ #define ND_RA_FLAG_RTPREF_LOW 0x18 /* 00011000 */ #define ND_RA_FLAG_RTPREF_RSV 0x10 /* 00010000 */ #define nd_ra_router_lifetime nd_ra_hdr.icmp6_data16[1] struct nd_neighbor_solicit { /* neighbor solicitation */ struct icmp6_hdr nd_ns_hdr; struct in6_addr nd_ns_target; /*target address */ /* could be followed by options */ } __packed; #define nd_ns_type nd_ns_hdr.icmp6_type #define nd_ns_code nd_ns_hdr.icmp6_code #define nd_ns_cksum nd_ns_hdr.icmp6_cksum #define nd_ns_reserved nd_ns_hdr.icmp6_data32[0] struct nd_neighbor_advert { /* neighbor advertisement */ struct icmp6_hdr nd_na_hdr; struct in6_addr nd_na_target; /* target address */ /* could be followed by options */ } __packed; #define nd_na_type nd_na_hdr.icmp6_type #define nd_na_code nd_na_hdr.icmp6_code #define nd_na_cksum nd_na_hdr.icmp6_cksum #define nd_na_flags_reserved nd_na_hdr.icmp6_data32[0] #if BYTE_ORDER == BIG_ENDIAN #define ND_NA_FLAG_ROUTER 0x80000000 #define ND_NA_FLAG_SOLICITED 0x40000000 #define ND_NA_FLAG_OVERRIDE 0x20000000 #else #if BYTE_ORDER == LITTLE_ENDIAN #define ND_NA_FLAG_ROUTER 0x80 #define ND_NA_FLAG_SOLICITED 0x40 #define ND_NA_FLAG_OVERRIDE 0x20 #endif #endif struct nd_redirect { /* redirect */ struct icmp6_hdr nd_rd_hdr; struct in6_addr nd_rd_target; /* target address */ struct in6_addr nd_rd_dst; /* destination address */ /* could be followed by options */ } __packed; #define nd_rd_type nd_rd_hdr.icmp6_type #define nd_rd_code nd_rd_hdr.icmp6_code #define nd_rd_cksum nd_rd_hdr.icmp6_cksum #define nd_rd_reserved nd_rd_hdr.icmp6_data32[0] struct nd_opt_hdr { /* Neighbor discovery option header */ u_int8_t nd_opt_type; u_int8_t nd_opt_len; /* followed by option specific data*/ } __packed; #define ND_OPT_SOURCE_LINKADDR 1 #define ND_OPT_TARGET_LINKADDR 2 #define ND_OPT_PREFIX_INFORMATION 3 #define ND_OPT_REDIRECTED_HEADER 4 #define ND_OPT_MTU 5 #define ND_OPT_ADVINTERVAL 7 #define ND_OPT_HOMEAGENT_INFO 8 #define ND_OPT_SOURCE_ADDRLIST 9 #define ND_OPT_TARGET_ADDRLIST 10 #define ND_OPT_MAP 23 /* RFC 5380 */ #define ND_OPT_ROUTE_INFO 24 /* RFC 4191 */ #define ND_OPT_RDNSS 25 /* RFC 6016 */ #define ND_OPT_DNSSL 31 /* RFC 6016 */ struct nd_opt_route_info { /* route info */ u_int8_t nd_opt_rti_type; u_int8_t nd_opt_rti_len; u_int8_t nd_opt_rti_prefixlen; u_int8_t nd_opt_rti_flags; u_int32_t nd_opt_rti_lifetime; /* prefix follows */ }; struct nd_opt_prefix_info { /* prefix information */ u_int8_t nd_opt_pi_type; u_int8_t nd_opt_pi_len; u_int8_t nd_opt_pi_prefix_len; u_int8_t nd_opt_pi_flags_reserved; u_int32_t nd_opt_pi_valid_time; u_int32_t nd_opt_pi_preferred_time; u_int32_t nd_opt_pi_reserved2; struct in6_addr nd_opt_pi_prefix; } __packed; #define ND_OPT_PI_FLAG_ONLINK 0x80 #define ND_OPT_PI_FLAG_AUTO 0x40 struct nd_opt_rd_hdr { /* redirected header */ u_int8_t nd_opt_rh_type; u_int8_t nd_opt_rh_len; u_int16_t nd_opt_rh_reserved1; u_int32_t nd_opt_rh_reserved2; /* followed by IP header and data */ } __packed; struct nd_opt_mtu { /* MTU option */ u_int8_t nd_opt_mtu_type; u_int8_t nd_opt_mtu_len; u_int16_t nd_opt_mtu_reserved; u_int32_t nd_opt_mtu_mtu; } __packed; struct nd_opt_rdnss { /* RDNSS option RFC 6106 */ u_int8_t nd_opt_rdnss_type; u_int8_t nd_opt_rdnss_len; u_int16_t nd_opt_rdnss_reserved; u_int32_t nd_opt_rdnss_lifetime; /* followed by list of IP prefixes */ } __packed; struct nd_opt_dnssl { /* DNSSL option RFC 6106 */ u_int8_t nd_opt_dnssl_type; u_int8_t nd_opt_dnssl_len; u_int16_t nd_opt_dnssl_reserved; u_int32_t nd_opt_dnssl_lifetime; /* followed by list of IP prefixes */ } __packed; /* * icmp6 namelookup */ struct icmp6_namelookup { struct icmp6_hdr icmp6_nl_hdr; u_int8_t icmp6_nl_nonce[8]; int32_t icmp6_nl_ttl; #if 0 u_int8_t icmp6_nl_len; u_int8_t icmp6_nl_name[3]; #endif /* could be followed by options */ } __packed; /* * icmp6 node information */ struct icmp6_nodeinfo { struct icmp6_hdr icmp6_ni_hdr; u_int8_t icmp6_ni_nonce[8]; /* could be followed by reply data */ } __packed; /* * BEGIN android-removed: glibc doesn't have these, and external/ping declares them itself. #define ni_type icmp6_ni_hdr.icmp6_type #define ni_code icmp6_ni_hdr.icmp6_code #define ni_cksum icmp6_ni_hdr.icmp6_cksum #define ni_qtype icmp6_ni_hdr.icmp6_data16[0] #define ni_flags icmp6_ni_hdr.icmp6_data16[1] * END android-removed */ #define NI_QTYPE_NOOP 0 /* NOOP */ #define NI_QTYPE_SUPTYPES 1 /* Supported Qtypes */ #define NI_QTYPE_FQDN 2 /* FQDN (draft 04) */ #define NI_QTYPE_DNSNAME 2 /* DNS Name */ #define NI_QTYPE_NODEADDR 3 /* Node Addresses */ #define NI_QTYPE_IPV4ADDR 4 /* IPv4 Addresses */ #if BYTE_ORDER == BIG_ENDIAN #define NI_SUPTYPE_FLAG_COMPRESS 0x1 #define NI_FQDN_FLAG_VALIDTTL 0x1 #elif BYTE_ORDER == LITTLE_ENDIAN #define NI_SUPTYPE_FLAG_COMPRESS 0x0100 #define NI_FQDN_FLAG_VALIDTTL 0x0100 #endif #ifdef NAME_LOOKUPS_04 #if BYTE_ORDER == BIG_ENDIAN #define NI_NODEADDR_FLAG_LINKLOCAL 0x1 #define NI_NODEADDR_FLAG_SITELOCAL 0x2 #define NI_NODEADDR_FLAG_GLOBAL 0x4 #define NI_NODEADDR_FLAG_ALL 0x8 #define NI_NODEADDR_FLAG_TRUNCATE 0x10 #define NI_NODEADDR_FLAG_ANYCAST 0x20 /* just experimental. not in spec */ #elif BYTE_ORDER == LITTLE_ENDIAN #define NI_NODEADDR_FLAG_LINKLOCAL 0x0100 #define NI_NODEADDR_FLAG_SITELOCAL 0x0200 #define NI_NODEADDR_FLAG_GLOBAL 0x0400 #define NI_NODEADDR_FLAG_ALL 0x0800 #define NI_NODEADDR_FLAG_TRUNCATE 0x1000 #define NI_NODEADDR_FLAG_ANYCAST 0x2000 /* just experimental. not in spec */ #endif #else /* draft-ietf-ipngwg-icmp-name-lookups-05 (and later?) */ #if BYTE_ORDER == BIG_ENDIAN #define NI_NODEADDR_FLAG_TRUNCATE 0x1 #define NI_NODEADDR_FLAG_ALL 0x2 #define NI_NODEADDR_FLAG_COMPAT 0x4 #define NI_NODEADDR_FLAG_LINKLOCAL 0x8 #define NI_NODEADDR_FLAG_SITELOCAL 0x10 #define NI_NODEADDR_FLAG_GLOBAL 0x20 #define NI_NODEADDR_FLAG_ANYCAST 0x40 /* just experimental. not in spec */ #elif BYTE_ORDER == LITTLE_ENDIAN #define NI_NODEADDR_FLAG_TRUNCATE 0x0100 #define NI_NODEADDR_FLAG_ALL 0x0200 #define NI_NODEADDR_FLAG_COMPAT 0x0400 #define NI_NODEADDR_FLAG_LINKLOCAL 0x0800 #define NI_NODEADDR_FLAG_SITELOCAL 0x1000 #define NI_NODEADDR_FLAG_GLOBAL 0x2000 #define NI_NODEADDR_FLAG_ANYCAST 0x4000 /* just experimental. not in spec */ #endif #endif struct ni_reply_fqdn { u_int32_t ni_fqdn_ttl; /* TTL */ u_int8_t ni_fqdn_namelen; /* length in octets of the FQDN */ u_int8_t ni_fqdn_name[3]; /* XXX: alignment */ } __packed; /* * Router Renumbering. as router-renum-08.txt */ struct icmp6_router_renum { /* router renumbering header */ struct icmp6_hdr rr_hdr; u_int8_t rr_segnum; u_int8_t rr_flags; u_int16_t rr_maxdelay; u_int32_t rr_reserved; } __packed; #define ICMP6_RR_FLAGS_TEST 0x80 #define ICMP6_RR_FLAGS_REQRESULT 0x40 #define ICMP6_RR_FLAGS_FORCEAPPLY 0x20 #define ICMP6_RR_FLAGS_SPECSITE 0x10 #define ICMP6_RR_FLAGS_PREVDONE 0x08 #define rr_type rr_hdr.icmp6_type #define rr_code rr_hdr.icmp6_code #define rr_cksum rr_hdr.icmp6_cksum #define rr_seqnum rr_hdr.icmp6_data32[0] struct rr_pco_match { /* match prefix part */ u_int8_t rpm_code; u_int8_t rpm_len; u_int8_t rpm_ordinal; u_int8_t rpm_matchlen; u_int8_t rpm_minlen; u_int8_t rpm_maxlen; u_int16_t rpm_reserved; struct in6_addr rpm_prefix; } __packed; #define RPM_PCO_ADD 1 #define RPM_PCO_CHANGE 2 #define RPM_PCO_SETGLOBAL 3 #define RPM_PCO_MAX 4 struct rr_pco_use { /* use prefix part */ u_int8_t rpu_uselen; u_int8_t rpu_keeplen; u_int8_t rpu_ramask; u_int8_t rpu_raflags; u_int32_t rpu_vltime; u_int32_t rpu_pltime; u_int32_t rpu_flags; struct in6_addr rpu_prefix; } __packed; #define ICMP6_RR_PCOUSE_RAFLAGS_ONLINK 0x80 #define ICMP6_RR_PCOUSE_RAFLAGS_AUTO 0x40 #if BYTE_ORDER == BIG_ENDIAN #define ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME 0x80000000 #define ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME 0x40000000 #elif BYTE_ORDER == LITTLE_ENDIAN #define ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME 0x80 #define ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME 0x40 #endif struct rr_result { /* router renumbering result message */ u_int16_t rrr_flags; u_int8_t rrr_ordinal; u_int8_t rrr_matchedlen; u_int32_t rrr_ifid; struct in6_addr rrr_prefix; } __packed; #if BYTE_ORDER == BIG_ENDIAN #define ICMP6_RR_RESULT_FLAGS_OOB 0x0002 #define ICMP6_RR_RESULT_FLAGS_FORBIDDEN 0x0001 #elif BYTE_ORDER == LITTLE_ENDIAN #define ICMP6_RR_RESULT_FLAGS_OOB 0x0200 #define ICMP6_RR_RESULT_FLAGS_FORBIDDEN 0x0100 #endif /* * icmp6 filter structures. */ struct icmp6_filter { u_int32_t icmp6_filt[8]; }; /* * BEGIN android-changed * Linux and *BSD kernels use opposite values to indicate pass/block in ICMPv6 * filters, and assign a different value to the ICMP6_FILTER sockopt. */ #define ICMP6_FILTER 1 #define ICMP6_FILTER_SETPASSALL(filterp) \ (void)memset(filterp, 0x00, sizeof(struct icmp6_filter)) #define ICMP6_FILTER_SETBLOCKALL(filterp) \ (void)memset(filterp, 0xff, sizeof(struct icmp6_filter)) #define ICMP6_FILTER_SETPASS(type, filterp) \ (((filterp)->icmp6_filt[(type) >> 5]) &= ~(1 << ((type) & 31))) #define ICMP6_FILTER_SETBLOCK(type, filterp) \ (((filterp)->icmp6_filt[(type) >> 5]) |= (1 << ((type) & 31))) #define ICMP6_FILTER_WILLPASS(type, filterp) \ ((((filterp)->icmp6_filt[(type) >> 5]) & (1 << ((type) & 31))) == 0) #define ICMP6_FILTER_WILLBLOCK(type, filterp) \ ((((filterp)->icmp6_filt[(type) >> 5]) & (1 << ((type) & 31))) != 0) /* * END android-changed */ /* * Variables related to this implementation * of the internet control message protocol version 6. */ /* * IPv6 ICMP statistics. * Each counter is an unsigned 64-bit value. */ #define ICMP6_STAT_ERROR 0 /* # of calls to icmp6_error */ #define ICMP6_STAT_CANTERROR 1 /* no error (old was icmp) */ #define ICMP6_STAT_TOOFREQ 2 /* no error (rate limitation) */ #define ICMP6_STAT_OUTHIST 3 /* # of output messages */ /* space for 256 counters */ #define ICMP6_STAT_BADCODE 259 /* icmp6_code out of range */ #define ICMP6_STAT_TOOSHORT 260 /* packet < sizeof(struct icmp6_hdr) */ #define ICMP6_STAT_CHECKSUM 261 /* bad checksum */ #define ICMP6_STAT_BADLEN 262 /* calculated bound mismatch */ /* * number of responses; this member is inherited from the netinet code, * but for netinet6 code, it is already available in outhist[]. */ #define ICMP6_STAT_REFLECT 263 #define ICMP6_STAT_INHIST 264 /* # of input messages */ /* space for 256 counters */ #define ICMP6_STAT_ND_TOOMANYOPT 520 /* too many ND options */ #define ICMP6_STAT_OUTERRHIST 521 /* space for 13 counters */ #define ICMP6_STAT_PMTUCHG 534 /* path MTU changes */ #define ICMP6_STAT_ND_BADOPT 535 /* bad ND options */ #define ICMP6_STAT_BADNS 536 /* bad neighbor solicititation */ #define ICMP6_STAT_BADNA 537 /* bad neighbor advertisement */ #define ICMP6_STAT_BADRS 538 /* bad router solicitiation */ #define ICMP6_STAT_BADRA 539 /* bad router advertisement */ #define ICMP6_STAT_BADREDIRECT 540 /* bad redirect message */ #define ICMP6_STAT_DROPPED_RAROUTE 541 /* discarded routes from router advertisement */ #define ICMP6_NSTATS 542 #define ICMP6_ERRSTAT_DST_UNREACH_NOROUTE 0 #define ICMP6_ERRSTAT_DST_UNREACH_ADMIN 1 #define ICMP6_ERRSTAT_DST_UNREACH_BEYONDSCOPE 2 #define ICMP6_ERRSTAT_DST_UNREACH_ADDR 3 #define ICMP6_ERRSTAT_DST_UNREACH_NOPORT 4 #define ICMP6_ERRSTAT_PACKET_TOO_BIG 5 #define ICMP6_ERRSTAT_TIME_EXCEED_TRANSIT 6 #define ICMP6_ERRSTAT_TIME_EXCEED_REASSEMBLY 7 #define ICMP6_ERRSTAT_PARAMPROB_HEADER 8 #define ICMP6_ERRSTAT_PARAMPROB_NEXTHEADER 9 #define ICMP6_ERRSTAT_PARAMPROB_OPTION 10 #define ICMP6_ERRSTAT_REDIRECT 11 #define ICMP6_ERRSTAT_UNKNOWN 12 /* * Names for ICMP sysctl objects */ #define ICMPV6CTL_STATS 1 #define ICMPV6CTL_REDIRACCEPT 2 /* accept/process redirects */ #define ICMPV6CTL_REDIRTIMEOUT 3 /* redirect cache time */ #if 0 /*obsoleted*/ #define ICMPV6CTL_ERRRATELIMIT 5 /* ICMPv6 error rate limitation */ #endif #define ICMPV6CTL_ND6_PRUNE 6 #define ICMPV6CTL_ND6_DELAY 8 #define ICMPV6CTL_ND6_UMAXTRIES 9 #define ICMPV6CTL_ND6_MMAXTRIES 10 #define ICMPV6CTL_ND6_USELOOPBACK 11 /*#define ICMPV6CTL_ND6_PROXYALL 12 obsoleted, do not reuse here */ #define ICMPV6CTL_NODEINFO 13 #define ICMPV6CTL_ERRPPSLIMIT 14 /* ICMPv6 error pps limitation */ #define ICMPV6CTL_ND6_MAXNUDHINT 15 #define ICMPV6CTL_MTUDISC_HIWAT 16 #define ICMPV6CTL_MTUDISC_LOWAT 17 #define ICMPV6CTL_ND6_DEBUG 18 #define ICMPV6CTL_ND6_DRLIST 19 #define ICMPV6CTL_ND6_PRLIST 20 #define ICMPV6CTL_ND6_MAXQLEN 24 #define ICMPV6CTL_MAXID 25 #define ICMPV6CTL_NAMES { \ { 0, 0 }, \ { 0, 0 }, \ { "rediraccept", CTLTYPE_INT }, \ { "redirtimeout", CTLTYPE_INT }, \ { 0, 0 }, \ { 0, 0 }, \ { "nd6_prune", CTLTYPE_INT }, \ { 0, 0 }, \ { "nd6_delay", CTLTYPE_INT }, \ { "nd6_umaxtries", CTLTYPE_INT }, \ { "nd6_mmaxtries", CTLTYPE_INT }, \ { "nd6_useloopback", CTLTYPE_INT }, \ { 0, 0 }, \ { "nodeinfo", CTLTYPE_INT }, \ { "errppslimit", CTLTYPE_INT }, \ { "nd6_maxnudhint", CTLTYPE_INT }, \ { "mtudisc_hiwat", CTLTYPE_INT }, \ { "mtudisc_lowat", CTLTYPE_INT }, \ { "nd6_debug", CTLTYPE_INT }, \ { 0, 0 }, \ { 0, 0 }, \ { 0, 0 }, \ { 0, 0 }, \ { 0, 0 }, \ { "nd6_maxqueuelen", CTLTYPE_INT }, \ } #ifdef _KERNEL struct rtentry; struct rttimer; struct in6_multi; void icmp6_init(void); void icmp6_paramerror(struct mbuf *, int); void icmp6_error(struct mbuf *, int, int, int); void icmp6_error2(struct mbuf *, int, int, int, struct ifnet *); int icmp6_input(struct mbuf **, int *, int); void icmp6_fasttimo(void); void icmp6_reflect(struct mbuf *, size_t); void icmp6_prepare(struct mbuf *); void icmp6_redirect_input(struct mbuf *, int); void icmp6_redirect_output(struct mbuf *, struct rtentry *); int icmp6_sysctl(int *, u_int, void *, size_t *, void *, size_t); void icmp6_statinc(u_int); struct ip6ctlparam; void icmp6_mtudisc_update(struct ip6ctlparam *, int); void icmp6_mtudisc_callback_register(void (*)(struct in6_addr *)); /* XXX: is this the right place for these macros? */ #define icmp6_ifstat_inc(ifp, tag) \ do { \ if (ifp) \ ((struct in6_ifextra *)((ifp)->if_afdata[AF_INET6]))->icmp6_ifstat->tag++; \ } while (/*CONSTCOND*/ 0) #define icmp6_ifoutstat_inc(ifp, type, code) \ do { \ icmp6_ifstat_inc(ifp, ifs6_out_msg); \ switch(type) { \ case ICMP6_DST_UNREACH: \ icmp6_ifstat_inc(ifp, ifs6_out_dstunreach); \ if (code == ICMP6_DST_UNREACH_ADMIN) \ icmp6_ifstat_inc(ifp, ifs6_out_adminprohib); \ break; \ case ICMP6_PACKET_TOO_BIG: \ icmp6_ifstat_inc(ifp, ifs6_out_pkttoobig); \ break; \ case ICMP6_TIME_EXCEEDED: \ icmp6_ifstat_inc(ifp, ifs6_out_timeexceed); \ break; \ case ICMP6_PARAM_PROB: \ icmp6_ifstat_inc(ifp, ifs6_out_paramprob); \ break; \ case ICMP6_ECHO_REQUEST: \ icmp6_ifstat_inc(ifp, ifs6_out_echo); \ break; \ case ICMP6_ECHO_REPLY: \ icmp6_ifstat_inc(ifp, ifs6_out_echoreply); \ break; \ case MLD_LISTENER_QUERY: \ icmp6_ifstat_inc(ifp, ifs6_out_mldquery); \ break; \ case MLD_LISTENER_REPORT: \ icmp6_ifstat_inc(ifp, ifs6_out_mldreport); \ break; \ case MLD_LISTENER_DONE: \ icmp6_ifstat_inc(ifp, ifs6_out_mlddone); \ break; \ case ND_ROUTER_SOLICIT: \ icmp6_ifstat_inc(ifp, ifs6_out_routersolicit); \ break; \ case ND_ROUTER_ADVERT: \ icmp6_ifstat_inc(ifp, ifs6_out_routeradvert); \ break; \ case ND_NEIGHBOR_SOLICIT: \ icmp6_ifstat_inc(ifp, ifs6_out_neighborsolicit); \ break; \ case ND_NEIGHBOR_ADVERT: \ icmp6_ifstat_inc(ifp, ifs6_out_neighboradvert); \ break; \ case ND_REDIRECT: \ icmp6_ifstat_inc(ifp, ifs6_out_redirect); \ break; \ } \ } while (/*CONSTCOND*/ 0) extern int icmp6_rediraccept; /* accept/process redirects */ extern int icmp6_redirtimeout; /* cache time for redirect routes */ #endif /* _KERNEL */ #ifdef ICMP6_STRINGS /* Info: http://www.iana.org/assignments/icmpv6-parameters */ static const char * const icmp6_type_err[] = { "reserved0", "unreach", "packet_too_big", "timxceed", "paramprob", NULL }; static const char * const icmp6_type_info[] = { "echo", "echoreply", "mcastlistenq", "mcastlistenrep", "mcastlistendone", "rtsol", "rtadv", "neighsol", "neighadv", "redirect", "routerrenum", "nodeinfoq", "nodeinfor", "invneighsol", "invneighrep", "mcastlistenrep2", "haad_req", "haad_rep", "mobile_psol", "mobile_padv", "cga_sol", "cga_adv", "experimental150", "mcast_rtadv", "mcast_rtsol", "mcast_rtterm", "fmipv6_msg", "rpl_control", NULL }; static const char * const icmp6_code_none[] = { "none", NULL }; static const char * const icmp6_code_unreach[] = { "noroute", "admin", "beyondscope", "addr", "port", "srcaddr_policy", "reject_route", "source_route_err", NULL }; static const char * const icmp6_code_timxceed[] = { "intrans", "reass", NULL }; static const char * const icmp6_code_paramprob[] = { "hdr_field", "nxthdr_type", "option", NULL }; /* not all informational icmps that have codes have a names array */ #endif #endif /* !_NETINET_ICMP6_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/netinet/if_ether.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #ifndef ETHER_ADDR_LEN #define ETHER_ADDR_LEN ETH_ALEN #include #endif ================================================ FILE: atlas-aapt/bionic/libc/include/netinet/in.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _NETINET_IN_H_ #define _NETINET_IN_H_ #include #include #include #include #include #include #include __BEGIN_DECLS #define IPPORT_RESERVED 1024 #define INET_ADDRSTRLEN 16 typedef uint16_t in_port_t; typedef uint32_t in_addr_t; int bindresvport(int, struct sockaddr_in*); extern const struct in6_addr in6addr_any; extern const struct in6_addr in6addr_loopback; __END_DECLS #endif /* _NETINET_IN_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/netinet/in6.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _NETINET_IN6_H #define _NETINET_IN6_H #include #define IN6_IS_ADDR_UNSPECIFIED(a) \ ((*(const uint32_t*)(&(a)->s6_addr[0]) == 0) && \ (*(const uint32_t*)(&(a)->s6_addr[4]) == 0) && \ (*(const uint32_t*)(&(a)->s6_addr[8]) == 0) && \ (*(const uint32_t*)(&(a)->s6_addr[12]) == 0)) #define IN6_IS_ADDR_LOOPBACK(a) \ ((*(const uint32_t*)(&(a)->s6_addr[0]) == 0) && \ (*(const uint32_t*)(&(a)->s6_addr[4]) == 0) && \ (*(const uint32_t*)(&(a)->s6_addr[8]) == 0) && \ (*(const uint32_t*)(&(a)->s6_addr[12]) == ntohl(1))) #define IN6_IS_ADDR_V4COMPAT(a) \ ((*(const uint32_t*)(&(a)->s6_addr[0]) == 0) && \ (*(const uint32_t*)(&(a)->s6_addr[4]) == 0) && \ (*(const uint32_t*)(&(a)->s6_addr[8]) == 0) && \ (*(const uint32_t*)(&(a)->s6_addr[12]) != 0) && \ (*(const uint32_t*)(&(a)->s6_addr[12]) != ntohl(1))) #define IN6_IS_ADDR_V4MAPPED(a) \ ((*(const uint32_t*)(&(a)->s6_addr[0]) == 0) && \ (*(const uint32_t*)(&(a)->s6_addr[4]) == 0) && \ (*(const uint32_t*)(&(a)->s6_addr[8]) == ntohl(0x0000ffff))) #define __bionic_s6_addr(a) ((const uint8_t*)(a)) #define IN6_IS_ADDR_LINKLOCAL(a) \ ((__bionic_s6_addr(a)[0] == 0xfe) && ((__bionic_s6_addr(a)[1] & 0xc0) == 0x80)) #define IN6_IS_ADDR_SITELOCAL(a) \ ((__bionic_s6_addr(a)[0] == 0xfe) && ((__bionic_s6_addr(a)[1] & 0xc0) == 0xc0)) #define IN6_IS_ADDR_MULTICAST(a) (__bionic_s6_addr(a)[0] == 0xff) #define IN6_IS_ADDR_ULA(a) ((__bionic_s6_addr(a)[0] & 0xfe) == 0xfc) #define IPV6_ADDR_SCOPE_NODELOCAL 0x01 #define IPV6_ADDR_SCOPE_INTFACELOCAL 0x01 #define IPV6_ADDR_SCOPE_LINKLOCAL 0x02 #define IPV6_ADDR_SCOPE_SITELOCAL 0x05 #define IPV6_ADDR_SCOPE_ORGLOCAL 0x08 #define IPV6_ADDR_SCOPE_GLOBAL 0x0e #define IPV6_ADDR_MC_SCOPE(a) (__bionic_s6_addr(a)[1] & 0x0f) #define IN6_IS_ADDR_MC_NODELOCAL(a) \ (IN6_IS_ADDR_MULTICAST(a) && (IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_NODELOCAL)) #define IN6_IS_ADDR_MC_LINKLOCAL(a) \ (IN6_IS_ADDR_MULTICAST(a) && (IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_LINKLOCAL)) #define IN6_IS_ADDR_MC_SITELOCAL(a) \ (IN6_IS_ADDR_MULTICAST(a) && (IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_SITELOCAL)) #define IN6_IS_ADDR_MC_ORGLOCAL(a) \ (IN6_IS_ADDR_MULTICAST(a) && (IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_ORGLOCAL)) #define IN6_IS_ADDR_MC_GLOBAL(a) \ (IN6_IS_ADDR_MULTICAST(a) && (IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_GLOBAL)) #define IN6_ARE_ADDR_EQUAL(a, b) \ (memcmp(&(a)->s6_addr[0], &(b)->s6_addr[0], sizeof(struct in6_addr)) == 0) #define INET6_ADDRSTRLEN 46 #define IPV6_JOIN_GROUP IPV6_ADD_MEMBERSHIP #define IPV6_LEAVE_GROUP IPV6_DROP_MEMBERSHIP #define IN6ADDR_ANY_INIT {{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}} #define IN6ADDR_LOOPBACK_INIT {{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}}} #define ipv6mr_interface ipv6mr_ifindex #endif /* _NETINET_IN6_H */ ================================================ FILE: atlas-aapt/bionic/libc/include/netinet/in_systm.h ================================================ /* $NetBSD: in_systm.h,v 1.13 2005/12/10 23:36:23 elad Exp $ */ /* * Copyright (c) 1982, 1986, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)in_systm.h 8.1 (Berkeley) 6/10/93 */ #ifndef _NETINET_IN_SYSTM_H_ #define _NETINET_IN_SYSTM_H_ /* * Miscellaneous internetwork * definitions for kernel. */ /* * Network types. * * Internally the system keeps counters in the headers with the bytes * swapped so that VAX instructions will work on them. It reverses * the bytes before transmission at each protocol level. The n_ types * represent the types with the bytes in ``high-ender'' order. */ typedef u_int16_t n_short; /* short as received from the net */ typedef u_int32_t n_long; /* long as received from the net */ typedef u_int32_t n_time; /* ms since 00:00 GMT, byte rev */ #ifdef _KERNEL n_time iptime (void); #endif #endif /* !_NETINET_IN_SYSTM_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/netinet/ip.h ================================================ /* $OpenBSD: ip.h,v 1.12 2006/04/27 02:19:32 tedu Exp $ */ /* $NetBSD: ip.h,v 1.9 1995/05/15 01:22:44 cgd Exp $ */ /* * Copyright (c) 1982, 1986, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)ip.h 8.1 (Berkeley) 6/10/93 */ #ifndef _NETINET_IP_H_ #define _NETINET_IP_H_ #include #include #include #include #include __BEGIN_DECLS /* * Definitions for internet protocol version 4. * Per RFC 791, September 1981. */ #define IPVERSION 4 /* * Structure of an internet header, naked of options. */ struct ip { #if BYTE_ORDER == LITTLE_ENDIAN u_int32_t ip_hl:4, /* header length */ ip_v:4; /* version */ #endif #if BYTE_ORDER == BIG_ENDIAN u_int32_t ip_v:4, /* version */ ip_hl:4; /* header length */ #endif u_int8_t ip_tos; /* type of service */ u_int16_t ip_len; /* total length */ u_int16_t ip_id; /* identification */ u_int16_t ip_off; /* fragment offset field */ #define IP_RF 0x8000 /* reserved fragment flag */ #define IP_DF 0x4000 /* dont fragment flag */ #define IP_MF 0x2000 /* more fragments flag */ #define IP_OFFMASK 0x1fff /* mask for fragmenting bits */ u_int8_t ip_ttl; /* time to live */ u_int8_t ip_p; /* protocol */ u_int16_t ip_sum; /* checksum */ struct in_addr ip_src, ip_dst; /* source and dest address */ }; #define IP_MAXPACKET 65535 /* maximum packet size */ /* * Definitions for IP type of service (ip_tos) */ #define IPTOS_LOWDELAY 0x10 #define IPTOS_THROUGHPUT 0x08 #define IPTOS_RELIABILITY 0x04 #define IPTOS_MINCOST 0x02 #if 1 /* ECN RFC3168 obsoletes RFC2481, and these will be deprecated soon. */ #define IPTOS_CE 0x01 /* congestion experienced */ #define IPTOS_ECT 0x02 /* ECN-capable transport */ #endif /* * Definitions for IP precedence (also in ip_tos) (hopefully unused) */ #define IPTOS_PREC_NETCONTROL 0xe0 #define IPTOS_PREC_INTERNETCONTROL 0xc0 #define IPTOS_PREC_CRITIC_ECP 0xa0 #define IPTOS_PREC_FLASHOVERRIDE 0x80 #define IPTOS_PREC_FLASH 0x60 #define IPTOS_PREC_IMMEDIATE 0x40 #define IPTOS_PREC_PRIORITY 0x20 #define IPTOS_PREC_ROUTINE 0x00 /* * ECN (Explicit Congestion Notification) codepoints in RFC3168 * mapped to the lower 2 bits of the TOS field. */ #define IPTOS_ECN_NOTECT 0x00 /* not-ECT */ #define IPTOS_ECN_ECT1 0x01 /* ECN-capable transport (1) */ #define IPTOS_ECN_ECT0 0x02 /* ECN-capable transport (0) */ #define IPTOS_ECN_CE 0x03 /* congestion experienced */ #define IPTOS_ECN_MASK 0x03 /* ECN field mask */ /* * Definitions for options. */ #define IPOPT_COPIED(o) ((o)&0x80) #define IPOPT_CLASS(o) ((o)&0x60) #define IPOPT_NUMBER(o) ((o)&0x1f) #define IPOPT_CONTROL 0x00 #define IPOPT_RESERVED1 0x20 #define IPOPT_DEBMEAS 0x40 #define IPOPT_RESERVED2 0x60 #define IPOPT_EOL 0 /* end of option list */ #define IPOPT_NOP 1 /* no operation */ #define IPOPT_RR 7 /* record packet route */ #define IPOPT_TS 68 /* timestamp */ #define IPOPT_SECURITY 130 /* provide s,c,h,tcc */ #define IPOPT_LSRR 131 /* loose source route */ #define IPOPT_SATID 136 /* satnet id */ #define IPOPT_SSRR 137 /* strict source route */ /* * Offsets to fields in options other than EOL and NOP. */ #define IPOPT_OPTVAL 0 /* option ID */ #define IPOPT_OLEN 1 /* option length */ #define IPOPT_OFFSET 2 /* offset within option */ #define IPOPT_MINOFF 4 /* min value of above */ /* * Time stamp option structure. */ struct ip_timestamp { u_int8_t ipt_code; /* IPOPT_TS */ u_int8_t ipt_len; /* size of structure (variable) */ u_int8_t ipt_ptr; /* index of current entry */ #if _BYTE_ORDER == _LITTLE_ENDIAN u_int32_t ipt_flg:4, /* flags, see below */ ipt_oflw:4; /* overflow counter */ #endif #if _BYTE_ORDER == _BIG_ENDIAN u_int32_t ipt_oflw:4, /* overflow counter */ ipt_flg:4; /* flags, see below */ #endif union ipt_timestamp { n_time ipt_time[1]; struct ipt_ta { struct in_addr ipt_addr; n_time ipt_time; } ipt_ta[1]; } ipt_timestamp; }; /* flag bits for ipt_flg */ #define IPOPT_TS_TSONLY 0 /* timestamps only */ #define IPOPT_TS_TSANDADDR 1 /* timestamps and addresses */ #define IPOPT_TS_PRESPEC 3 /* specified modules only */ /* bits for security (not byte swapped) */ #define IPOPT_SECUR_UNCLASS 0x0000 #define IPOPT_SECUR_CONFID 0xf135 #define IPOPT_SECUR_EFTO 0x789a #define IPOPT_SECUR_MMMM 0xbc4d #define IPOPT_SECUR_RESTR 0xaf13 #define IPOPT_SECUR_SECRET 0xd788 #define IPOPT_SECUR_TOPSECRET 0x6bc5 /* * Internet implementation parameters. */ #define MAXTTL 255 /* maximum time to live (seconds) */ #define IPDEFTTL 64 /* default ttl, from RFC 1340 */ #define IPFRAGTTL 60 /* time to live for frags, slowhz */ #define IPTTLDEC 1 /* subtracted when forwarding */ #define IP_MSS 576 /* default maximum segment size */ /* * This is the real IPv4 pseudo header, used for computing the TCP and UDP * checksums. For the Internet checksum, struct ipovly can be used instead. * For stronger checksums, the real thing must be used. */ struct ippseudo { struct in_addr ippseudo_src; /* source internet address */ struct in_addr ippseudo_dst; /* destination internet address */ u_int8_t ippseudo_pad; /* pad, must be zero */ u_int8_t ippseudo_p; /* protocol */ u_int16_t ippseudo_len; /* protocol length */ }; /* BIONIC addition: declarations matching the Linux kernel */ /* some programs expect these... */ #define IPOPT_OPTVAL 0 #define IPOPT_OLEN 1 #define IPOPT_OFFSET 2 #define IPOPT_MINOFF 4 #define MAX_IPOPTLEN 40 #define IPOPT_COPY 0x80 #define IPOPT_CLASS_MASK 0x60 #define IPOPT_NUMBER_MASK 0x1f #define IPOPT_CONTROL 0x00 #define IPOPT_RESERVED1 0x20 #define IPOPT_MEASUREMENT 0x40 #define IPOPT_RESERVED2 0x60 #define IPOPT_END (0 |IPOPT_CONTROL) #define IPOPT_NOOP (1 |IPOPT_CONTROL) #define IPOPT_SEC (2 |IPOPT_CONTROL|IPOPT_COPY) #define IPOPT_TIMESTAMP (4 |IPOPT_MEASUREMENT) #define IPOPT_SID (8 |IPOPT_CONTROL|IPOPT_COPY) #define IPOPT_RA (20|IPOPT_CONTROL|IPOPT_COPY) struct iphdr { #if defined(__LITTLE_ENDIAN_BITFIELD) uint8_t ihl :4, version:4; #elif defined (__BIG_ENDIAN_BITFIELD) uint8_t version:4, ihl :4; #else #error "Please fix " #endif uint8_t tos; uint16_t tot_len; uint16_t id; uint16_t frag_off; uint8_t ttl; uint8_t protocol; uint16_t check; int32_t saddr; int32_t daddr; }; struct ip_auth_hdr { uint8_t nexthdr; uint8_t hdrlen; uint16_t reserved; uint32_t spi; uint32_t seq_no; uint8_t auth_data[0]; }; struct ip_esp_hdr { uint32_t spi; uint32_t seq_no; uint8_t enc_data[0]; }; struct ip_comp_hdr { uint8_t nexthdr; uint8_t flags; uint16_t cpi; }; __END_DECLS #endif /* _NETINET_IP_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/netinet/ip6.h ================================================ /* $NetBSD: ip6.h,v 1.23 2007/12/25 18:33:46 perry Exp $ */ /* $KAME: ip6.h,v 1.45 2003/06/05 04:46:38 keiichi Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the project nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /* * Copyright (c) 1982, 1986, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)ip.h 8.1 (Berkeley) 6/10/93 */ #ifndef _NETINET_IP6_H_ #define _NETINET_IP6_H_ /* * Definition for internet protocol version 6. * RFC 2460 */ struct ip6_hdr { union { struct ip6_hdrctl { u_int32_t ip6_un1_flow; /* 20 bits of flow-ID */ u_int16_t ip6_un1_plen; /* payload length */ u_int8_t ip6_un1_nxt; /* next header */ u_int8_t ip6_un1_hlim; /* hop limit */ } ip6_un1; u_int8_t ip6_un2_vfc; /* 4 bits version, top 4 bits class */ } ip6_ctlun; struct in6_addr ip6_src; /* source address */ struct in6_addr ip6_dst; /* destination address */ } __packed; #define ip6_vfc ip6_ctlun.ip6_un2_vfc #define ip6_flow ip6_ctlun.ip6_un1.ip6_un1_flow #define ip6_plen ip6_ctlun.ip6_un1.ip6_un1_plen #define ip6_nxt ip6_ctlun.ip6_un1.ip6_un1_nxt #define ip6_hlim ip6_ctlun.ip6_un1.ip6_un1_hlim #define ip6_hops ip6_ctlun.ip6_un1.ip6_un1_hlim #define IPV6_VERSION 0x60 #define IPV6_VERSION_MASK 0xf0 #if BYTE_ORDER == BIG_ENDIAN #define IPV6_FLOWINFO_MASK 0x0fffffff /* flow info (28 bits) */ #define IPV6_FLOWLABEL_MASK 0x000fffff /* flow label (20 bits) */ #else #if BYTE_ORDER == LITTLE_ENDIAN #define IPV6_FLOWINFO_MASK 0xffffff0f /* flow info (28 bits) */ #define IPV6_FLOWLABEL_MASK 0xffff0f00 /* flow label (20 bits) */ #endif /* LITTLE_ENDIAN */ #endif #if 1 /* ECN bits proposed by Sally Floyd */ #define IP6TOS_CE 0x01 /* congestion experienced */ #define IP6TOS_ECT 0x02 /* ECN-capable transport */ #endif #ifdef _KERNEL /* * for IPv6 pseudo header checksum * XXX nonstandard */ struct ip6_hdr_pseudo { struct in6_addr ip6ph_src; struct in6_addr ip6ph_dst; u_int32_t ip6ph_len; u_int8_t ip6ph_zero[3]; u_int8_t ip6ph_nxt; } __packed; #endif /* * Extension Headers */ struct ip6_ext { u_int8_t ip6e_nxt; u_int8_t ip6e_len; } __packed; /* Hop-by-Hop options header */ /* XXX should we pad it to force alignment on an 8-byte boundary? */ struct ip6_hbh { u_int8_t ip6h_nxt; /* next header */ u_int8_t ip6h_len; /* length in units of 8 octets */ /* followed by options */ } __packed; /* Destination options header */ /* XXX should we pad it to force alignment on an 8-byte boundary? */ struct ip6_dest { u_int8_t ip6d_nxt; /* next header */ u_int8_t ip6d_len; /* length in units of 8 octets */ /* followed by options */ } __packed; /* Option types and related macros */ #define IP6OPT_PAD1 0x00 /* 00 0 00000 */ #define IP6OPT_PADN 0x01 /* 00 0 00001 */ #define IP6OPT_JUMBO 0xC2 /* 11 0 00010 = 194 */ #define IP6OPT_NSAP_ADDR 0xC3 /* 11 0 00011 */ #define IP6OPT_TUNNEL_LIMIT 0x04 /* 00 0 00100 */ #define IP6OPT_RTALERT 0x05 /* 00 0 00101 (KAME definition) */ #define IP6OPT_ROUTER_ALERT 0x05 /* (RFC3542 def, recommended) */ #define IP6OPT_RTALERT_LEN 4 #define IP6OPT_RTALERT_MLD 0 /* Datagram contains an MLD message */ #define IP6OPT_RTALERT_RSVP 1 /* Datagram contains an RSVP message */ #define IP6OPT_RTALERT_ACTNET 2 /* contains an Active Networks msg */ #define IP6OPT_MINLEN 2 #define IP6OPT_TYPE(o) ((o) & 0xC0) #define IP6OPT_TYPE_SKIP 0x00 #define IP6OPT_TYPE_DISCARD 0x40 #define IP6OPT_TYPE_FORCEICMP 0x80 #define IP6OPT_TYPE_ICMP 0xC0 #define IP6OPT_MUTABLE 0x20 /* IPv6 options: common part */ struct ip6_opt { u_int8_t ip6o_type; u_int8_t ip6o_len; } __packed; /* Jumbo Payload Option */ struct ip6_opt_jumbo { u_int8_t ip6oj_type; u_int8_t ip6oj_len; u_int8_t ip6oj_jumbo_len[4]; } __packed; #define IP6OPT_JUMBO_LEN 6 /* NSAP Address Option */ struct ip6_opt_nsap { u_int8_t ip6on_type; u_int8_t ip6on_len; u_int8_t ip6on_src_nsap_len; u_int8_t ip6on_dst_nsap_len; /* followed by source NSAP */ /* followed by destination NSAP */ } __packed; /* Tunnel Limit Option */ struct ip6_opt_tunnel { u_int8_t ip6ot_type; u_int8_t ip6ot_len; u_int8_t ip6ot_encap_limit; } __packed; /* Router Alert Option */ struct ip6_opt_router { u_int8_t ip6or_type; u_int8_t ip6or_len; u_int8_t ip6or_value[2]; } __packed; /* Router alert values (in network byte order) */ #if BYTE_ORDER == BIG_ENDIAN #define IP6_ALERT_MLD 0x0000 #define IP6_ALERT_RSVP 0x0001 #define IP6_ALERT_AN 0x0002 #else #if BYTE_ORDER == LITTLE_ENDIAN #define IP6_ALERT_MLD 0x0000 #define IP6_ALERT_RSVP 0x0100 #define IP6_ALERT_AN 0x0200 #endif /* LITTLE_ENDIAN */ #endif /* Routing header */ struct ip6_rthdr { u_int8_t ip6r_nxt; /* next header */ u_int8_t ip6r_len; /* length in units of 8 octets */ u_int8_t ip6r_type; /* routing type */ u_int8_t ip6r_segleft; /* segments left */ /* followed by routing type specific data */ } __packed; /* Type 0 Routing header */ struct ip6_rthdr0 { u_int8_t ip6r0_nxt; /* next header */ u_int8_t ip6r0_len; /* length in units of 8 octets */ u_int8_t ip6r0_type; /* always zero */ u_int8_t ip6r0_segleft; /* segments left */ u_int32_t ip6r0_reserved; /* reserved field */ } __packed; /* Fragment header */ struct ip6_frag { u_int8_t ip6f_nxt; /* next header */ u_int8_t ip6f_reserved; /* reserved field */ u_int16_t ip6f_offlg; /* offset, reserved, and flag */ u_int32_t ip6f_ident; /* identification */ } __packed; #if BYTE_ORDER == BIG_ENDIAN #define IP6F_OFF_MASK 0xfff8 /* mask out offset from _offlg */ #define IP6F_RESERVED_MASK 0x0006 /* reserved bits in ip6f_offlg */ #define IP6F_MORE_FRAG 0x0001 /* more-fragments flag */ #else /* BYTE_ORDER == LITTLE_ENDIAN */ #define IP6F_OFF_MASK 0xf8ff /* mask out offset from _offlg */ #define IP6F_RESERVED_MASK 0x0600 /* reserved bits in ip6f_offlg */ #define IP6F_MORE_FRAG 0x0100 /* more-fragments flag */ #endif /* BYTE_ORDER == LITTLE_ENDIAN */ /* * Internet implementation parameters. */ #define IPV6_MAXHLIM 255 /* maximum hoplimit */ #define IPV6_DEFHLIM 64 /* default hlim */ #define IPV6_FRAGTTL 120 /* ttl for fragment packets, in slowtimo tick */ #define IPV6_HLIMDEC 1 /* subtracted when forwarding */ #define IPV6_MMTU 1280 /* minimal MTU and reassembly. 1024 + 256 */ #define IPV6_MAXPACKET 65535 /* ip6 max packet size without Jumbo payload*/ #ifdef _KERNEL /* * IP6_EXTHDR_GET ensures that intermediate protocol header (from "off" to * "len") is located in single mbuf, on contiguous memory region. * The pointer to the region will be returned to pointer variable "val", * with type "typ". * IP6_EXTHDR_GET0 does the same, except that it aligns the structure at the * very top of mbuf. GET0 is likely to make memory copy than GET. * * XXX we're now testing this, needs m_pulldown() */ #define IP6_EXTHDR_GET(val, typ, m, off, len) \ do { \ struct mbuf *_t; \ int _tmp; \ if ((m)->m_len >= (off) + (len)) \ (val) = (typ)(mtod((m), char *) + (off)); \ else { \ _t = m_pulldown((m), (off), (len), &_tmp); \ if (_t) { \ if (_t->m_len < _tmp + (len)) \ panic("m_pulldown malfunction"); \ (val) = (typ)(mtod(_t, char *) + _tmp); \ } else { \ (val) = (typ)NULL; \ (m) = NULL; \ } \ } \ } while (/*CONSTCOND*/ 0) #define IP6_EXTHDR_GET0(val, typ, m, off, len) \ do { \ struct mbuf *_t; \ if ((off) == 0 && (m)->m_len >= len) \ (val) = (typ)mtod((m), void *); \ else { \ _t = m_pulldown((m), (off), (len), NULL); \ if (_t) { \ if (_t->m_len < (len)) \ panic("m_pulldown malfunction"); \ (val) = (typ)mtod(_t, void *); \ } else { \ (val) = (typ)NULL; \ (m) = NULL; \ } \ } \ } while (/*CONSTCOND*/ 0) #endif /*_KERNEL*/ #endif /* !_NETINET_IP6_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/netinet/ip_icmp.h ================================================ /* $OpenBSD: ip_icmp.h,v 1.21 2005/07/31 03:30:55 pascoe Exp $ */ /* $NetBSD: ip_icmp.h,v 1.10 1996/02/13 23:42:28 christos Exp $ */ /* * Copyright (c) 1982, 1986, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)ip_icmp.h 8.1 (Berkeley) 6/10/93 */ #ifndef _NETINET_IP_ICMP_H_ #define _NETINET_IP_ICMP_H_ #include #include __BEGIN_DECLS /* * Interface Control Message Protocol Definitions. * Per RFC 792, September 1981. * RFC 950, August 1985. (Address Mask Request / Reply) * RFC 1256, September 1991. (Router Advertisement and Solicitation) * RFC 1108, November 1991. (Param Problem, Missing Req. Option) * RFC 1393, January 1993. (Traceroute) * RFC 1475, June 1993. (Datagram Conversion Error) * RFC 1812, June 1995. (adm prohib, host precedence, precedence cutoff) * RFC 2002, October 1996. (Mobility changes to Router Advertisement) */ /* * ICMP Router Advertisement data */ struct icmp_ra_addr { uint32_t ira_addr; uint32_t ira_preference; }; /* * Structure of an icmp header. */ struct icmp { uint8_t icmp_type; /* type of message, see below */ uint8_t icmp_code; /* type sub code */ uint16_t icmp_cksum; /* ones complement cksum of struct */ union { uint8_t ih_pptr; /* ICMP_PARAMPROB */ struct in_addr ih_gwaddr; /* ICMP_REDIRECT */ struct ih_idseq { uint16_t icd_id; uint16_t icd_seq; } ih_idseq; int32_t ih_void; /* ICMP_UNREACH_NEEDFRAG -- Path MTU Discovery (RFC1191) */ struct ih_pmtu { uint16_t ipm_void; uint16_t ipm_nextmtu; } ih_pmtu; struct ih_rtradv { uint8_t irt_num_addrs; uint8_t irt_wpa; uint16_t irt_lifetime; } ih_rtradv; } icmp_hun; #define icmp_pptr icmp_hun.ih_pptr #define icmp_gwaddr icmp_hun.ih_gwaddr #define icmp_id icmp_hun.ih_idseq.icd_id #define icmp_seq icmp_hun.ih_idseq.icd_seq #define icmp_void icmp_hun.ih_void #define icmp_pmvoid icmp_hun.ih_pmtu.ipm_void #define icmp_nextmtu icmp_hun.ih_pmtu.ipm_nextmtu #define icmp_num_addrs icmp_hun.ih_rtradv.irt_num_addrs #define icmp_wpa icmp_hun.ih_rtradv.irt_wpa #define icmp_lifetime icmp_hun.ih_rtradv.irt_lifetime union { struct id_ts { uint32_t its_otime; uint32_t its_rtime; uint32_t its_ttime; } id_ts; struct id_ip { struct ip idi_ip; /* options and then 64 bits of data */ } id_ip; uint32_t id_mask; int8_t id_data[1]; } icmp_dun; #define icmp_otime icmp_dun.id_ts.its_otime #define icmp_rtime icmp_dun.id_ts.its_rtime #define icmp_ttime icmp_dun.id_ts.its_ttime #define icmp_ip icmp_dun.id_ip.idi_ip #define icmp_mask icmp_dun.id_mask #define icmp_data icmp_dun.id_data }; /* * For IPv6 transition related ICMP errors. */ #define ICMP_V6ADVLENMIN (8 + sizeof(struct ip) + 40) #define ICMP_V6ADVLEN(p) (8 + ((p)->icmp_ip.ip_hl << 2) + 40) /* * Lower bounds on packet lengths for various types. * For the error advice packets must first insure that the * packet is large enough to contain the returned ip header. * Only then can we do the check to see if 64 bits of packet * data have been returned, since we need to check the returned * ip header length. */ #define ICMP_MINLEN 8 /* abs minimum */ #define ICMP_TSLEN (8 + 3 * sizeof (n_time)) /* timestamp */ #define ICMP_MASKLEN 12 /* address mask */ #define ICMP_ADVLENMIN (8 + sizeof (struct ip) + 8) /* min */ #define ICMP_ADVLEN(p) (8 + ((p)->icmp_ip.ip_hl << 2) + 8) /* N.B.: must separately check that ip_hl >= 5 */ /* * Definition of type and code field values. * http://www.iana.org/assignments/icmp-parameters */ #define ICMP_ECHOREPLY 0 /* echo reply */ #define ICMP_UNREACH 3 /* dest unreachable, codes: */ #define ICMP_UNREACH_NET 0 /* bad net */ #define ICMP_UNREACH_HOST 1 /* bad host */ #define ICMP_UNREACH_PROTOCOL 2 /* bad protocol */ #define ICMP_UNREACH_PORT 3 /* bad port */ #define ICMP_UNREACH_NEEDFRAG 4 /* IP_DF caused drop */ #define ICMP_UNREACH_SRCFAIL 5 /* src route failed */ #define ICMP_UNREACH_NET_UNKNOWN 6 /* unknown net */ #define ICMP_UNREACH_HOST_UNKNOWN 7 /* unknown host */ #define ICMP_UNREACH_ISOLATED 8 /* src host isolated */ #define ICMP_UNREACH_NET_PROHIB 9 /* for crypto devs */ #define ICMP_UNREACH_HOST_PROHIB 10 /* ditto */ #define ICMP_UNREACH_TOSNET 11 /* bad tos for net */ #define ICMP_UNREACH_TOSHOST 12 /* bad tos for host */ #define ICMP_UNREACH_FILTER_PROHIB 13 /* prohibited access */ #define ICMP_UNREACH_HOST_PRECEDENCE 14 /* precedence violat'n*/ #define ICMP_UNREACH_PRECEDENCE_CUTOFF 15 /* precedence cutoff */ #define ICMP_SOURCEQUENCH 4 /* packet lost, slow down */ #define ICMP_REDIRECT 5 /* shorter route, codes: */ #define ICMP_REDIRECT_NET 0 /* for network */ #define ICMP_REDIRECT_HOST 1 /* for host */ #define ICMP_REDIRECT_TOSNET 2 /* for tos and net */ #define ICMP_REDIRECT_TOSHOST 3 /* for tos and host */ #define ICMP_ALTHOSTADDR 6 /* alternate host address */ #define ICMP_ECHO 8 /* echo service */ #define ICMP_ROUTERADVERT 9 /* router advertisement */ #define ICMP_ROUTERADVERT_NORMAL 0 /* normal advertisement */ #define ICMP_ROUTERADVERT_NOROUTE_COMMON 16 /* selective routing */ #define ICMP_ROUTERSOLICIT 10 /* router solicitation */ #define ICMP_TIMXCEED 11 /* time exceeded, code: */ #define ICMP_TIMXCEED_INTRANS 0 /* ttl==0 in transit */ #define ICMP_TIMXCEED_REASS 1 /* ttl==0 in reass */ #define ICMP_PARAMPROB 12 /* ip header bad */ #define ICMP_PARAMPROB_ERRATPTR 0 /* req. opt. absent */ #define ICMP_PARAMPROB_OPTABSENT 1 /* req. opt. absent */ #define ICMP_PARAMPROB_LENGTH 2 /* bad length */ #define ICMP_TSTAMP 13 /* timestamp request */ #define ICMP_TSTAMPREPLY 14 /* timestamp reply */ #define ICMP_IREQ 15 /* information request */ #define ICMP_IREQREPLY 16 /* information reply */ #define ICMP_MASKREQ 17 /* address mask request */ #define ICMP_MASKREPLY 18 /* address mask reply */ #define ICMP_TRACEROUTE 30 /* traceroute */ #define ICMP_DATACONVERR 31 /* data conversion error */ #define ICMP_MOBILE_REDIRECT 32 /* mobile host redirect */ #define ICMP_IPV6_WHEREAREYOU 33 /* IPv6 where-are-you */ #define ICMP_IPV6_IAMHERE 34 /* IPv6 i-am-here */ #define ICMP_MOBILE_REGREQUEST 35 /* mobile registration req */ #define ICMP_MOBILE_REGREPLY 36 /* mobile registration reply */ #define ICMP_SKIP 39 /* SKIP */ #define ICMP_PHOTURIS 40 /* Photuris */ #define ICMP_PHOTURIS_UNKNOWN_INDEX 1 /* unknown sec index */ #define ICMP_PHOTURIS_AUTH_FAILED 2 /* auth failed */ #define ICMP_PHOTURIS_DECRYPT_FAILED 3 /* decrypt failed */ #define ICMP_MAXTYPE 40 #define ICMP_INFOTYPE(type) \ ((type) == ICMP_ECHOREPLY || (type) == ICMP_ECHO || \ (type) == ICMP_ROUTERADVERT || (type) == ICMP_ROUTERSOLICIT || \ (type) == ICMP_TSTAMP || (type) == ICMP_TSTAMPREPLY || \ (type) == ICMP_IREQ || (type) == ICMP_IREQREPLY || \ (type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY) __END_DECLS #endif /* _NETINET_IP_ICMP_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/netinet/tcp.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _NETINET_TCP_H #define _NETINET_TCP_H #include __BEGIN_DECLS enum { TCP_ESTABLISHED = 1, TCP_SYN_SENT, TCP_SYN_RECV, TCP_FIN_WAIT1, TCP_FIN_WAIT2, TCP_TIME_WAIT, TCP_CLOSE, TCP_CLOSE_WAIT, TCP_LAST_ACK, TCP_LISTEN, TCP_CLOSING }; #define TCPOPT_EOL 0 #define TCPOPT_NOP 1 #define TCPOPT_MAXSEG 2 #define TCPOLEN_MAXSEG 4 #define TCPOPT_WINDOW 3 #define TCPOLEN_WINDOW 3 #define TCPOPT_SACK_PERMITTED 4 #define TCPOLEN_SACK_PERMITTED 2 #define TCPOPT_SACK 5 #define TCPOPT_TIMESTAMP 8 #define TCPOLEN_TIMESTAMP 10 #define TCPOLEN_TSTAMP_APPA (TCPOLEN_TIMESTAMP+2) #define TCPOPT_TSTAMP_HDR (TCPOPT_NOP<<24|TCPOPT_NOP<<16|TCPOPT_TIMESTAMP<<8|TCPOLEN_TIMESTAMP) __END_DECLS #endif /* _NETINET_TCP_H */ ================================================ FILE: atlas-aapt/bionic/libc/include/netinet/udp.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _NETINET_UDP_H #define _NETINET_UDP_H #include #include struct udphdr { __extension__ union { struct /* BSD names */ { u_int16_t uh_sport; u_int16_t uh_dport; u_int16_t uh_ulen; u_int16_t uh_sum; }; struct /* Linux names */ { u_int16_t source; u_int16_t dest; u_int16_t len; u_int16_t check; }; }; }; #endif /* _NETINET_UDP_H */ ================================================ FILE: atlas-aapt/bionic/libc/include/netpacket/packet.h ================================================ #include ================================================ FILE: atlas-aapt/bionic/libc/include/nsswitch.h ================================================ /* $NetBSD: nsswitch.h,v 1.21 2011/07/17 20:54:34 joerg Exp $ */ /*- * Copyright (c) 1997, 1998, 1999, 2004 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Luke Mewburn. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef _NSSWITCH_H #define _NSSWITCH_H 1 #include #include #define NSS_MODULE_INTERFACE_VERSION 0 #ifndef _PATH_NS_CONF #define _PATH_NS_CONF "/etc/nsswitch.conf" #endif #define NS_CONTINUE 0 #define NS_RETURN 1 /* * Layout of: * uint32_t ns_src.flags */ /* nsswitch.conf status codes and nsdispatch(3) return values */ #define NS_SUCCESS (1<<0) /* entry was found */ #define NS_UNAVAIL (1<<1) /* source not responding, or corrupt */ #define NS_NOTFOUND (1<<2) /* source responded 'no such entry' */ #define NS_TRYAGAIN (1<<3) /* source busy, may respond to retrys */ #define NS_STATUSMASK 0x000000ff /* bitmask to get the status flags */ /* internal nsdispatch(3) flags; not settable in nsswitch.conf(5) */ #define NS_FORCEALL (1<<8) /* force all methods to be invoked; */ /* * Currently implemented sources. */ #define NSSRC_FILES "files" /* local files */ #define NSSRC_DNS "dns" /* DNS; IN for hosts, HS for others */ #define NSSRC_NIS "nis" /* YP/NIS */ #define NSSRC_COMPAT "compat" /* passwd,group in YP compat mode */ /* * Currently implemented databases. */ #define NSDB_HOSTS "hosts" #define NSDB_GROUP "group" #define NSDB_GROUP_COMPAT "group_compat" #define NSDB_NETGROUP "netgroup" #define NSDB_NETWORKS "networks" #define NSDB_PASSWD "passwd" #define NSDB_PASSWD_COMPAT "passwd_compat" #define NSDB_SHELLS "shells" /* * Suggested databases to implement. */ #define NSDB_ALIASES "aliases" #define NSDB_AUTH "auth" #define NSDB_AUTOMOUNT "automount" #define NSDB_BOOTPARAMS "bootparams" #define NSDB_ETHERS "ethers" #define NSDB_EXPORTS "exports" #define NSDB_NETMASKS "netmasks" #define NSDB_PHONES "phones" #define NSDB_PRINTCAP "printcap" #define NSDB_PROTOCOLS "protocols" #define NSDB_REMOTE "remote" #define NSDB_RPC "rpc" #define NSDB_SENDMAILVARS "sendmailvars" #define NSDB_SERVICES "services" #define NSDB_TERMCAP "termcap" #define NSDB_TTYS "ttys" /* * ns_dtab `callback' function signature. */ typedef int (*nss_method)(void *, void *, va_list); /* * ns_dtab - `nsswitch dispatch table' * Contains an entry for each source and the appropriate function to call. */ typedef struct { const char *src; nss_method callback; void *cb_data; } ns_dtab; /* * Macros to help build an ns_dtab[] */ #define NS_FILES_CB(F,C) { NSSRC_FILES, F, __UNCONST(C) }, #define NS_COMPAT_CB(F,C) { NSSRC_COMPAT, F, __UNCONST(C) }, #ifdef HESIOD # define NS_DNS_CB(F,C) { NSSRC_DNS, F, __UNCONST(C) }, #else # define NS_DNS_CB(F,C) #endif #ifdef YP # define NS_NIS_CB(F,C) { NSSRC_NIS, F, __UNCONST(C) }, #else # define NS_NIS_CB(F,C) #endif #define NS_NULL_CB { .src = NULL }, /* * ns_src - `nsswitch source' * Used by the nsparser routines to store a mapping between a source * and its dispatch control flags for a given database. */ typedef struct { const char *name; uint32_t flags; } ns_src; /* * Default sourcelists (if nsswitch.conf is missing, corrupt, * or the requested database doesn't have an entry) */ extern const ns_src __nsdefaultsrc[]; extern const ns_src __nsdefaultcompat[]; extern const ns_src __nsdefaultcompat_forceall[]; extern const ns_src __nsdefaultfiles[]; extern const ns_src __nsdefaultfiles_forceall[]; extern const ns_src __nsdefaultnis[]; extern const ns_src __nsdefaultnis_forceall[]; /* * ns_mtab - `nsswitch method table' * An nsswitch module provides a mapping from (database name, method name) * tuples to the nss_method and associated callback data. Effectively, * ns_dtab, but used for dynamically loaded modules. */ typedef struct { const char *database; const char *name; nss_method method; void *mdata; } ns_mtab; /* * nss_module_register_fn - module registration function * called at module load * nss_module_unregister_fn - module un-registration function * called at module unload */ typedef void (*nss_module_unregister_fn)(ns_mtab *, u_int); typedef ns_mtab *(*nss_module_register_fn)(const char *, u_int *, nss_module_unregister_fn *); #ifdef _NS_PRIVATE /* * Private data structures for back-end nsswitch implementation. */ /* * ns_dbt - `nsswitch database thang' * For each database in /etc/nsswitch.conf there is a ns_dbt, with its * name and a list of ns_src's containing the source information. */ typedef struct { const char *name; /* name of database */ ns_src *srclist; /* list of sources */ u_int srclistsize; /* size of srclist */ } ns_dbt; /* * ns_mod - `nsswitch module' */ typedef struct { const char *name; /* module name */ void *handle; /* handle from dlopen() */ ns_mtab *mtab; /* method table */ u_int mtabsize; /* size of mtab */ /* called to unload module */ nss_module_unregister_fn unregister; } ns_mod; #endif /* _NS_PRIVATE */ #include __BEGIN_DECLS int nsdispatch(void *, const ns_dtab [], const char *, const char *, const ns_src [], ...) __LIBC_ABI_PUBLIC__; #ifdef _NS_PRIVATE int _nsdbtaddsrc(ns_dbt *, const ns_src *); void _nsdbtdump(const ns_dbt *); int _nsdbtput(const ns_dbt *); void _nsyyerror(const char *); int _nsyylex(void); #endif /* _NS_PRIVATE */ __END_DECLS #endif /* !_NSSWITCH_H */ ================================================ FILE: atlas-aapt/bionic/libc/include/paths.h ================================================ /* * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)paths.h 8.1 (Berkeley) 6/2/93 */ #ifndef _PATHS_H_ #define _PATHS_H_ #define _PATH_BSHELL "/system/bin/sh" #define _PATH_CONSOLE "/dev/console" #define _PATH_DEFPATH "/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin" #define _PATH_DEV "/dev/" #define _PATH_DEVNULL "/dev/null" #define _PATH_KLOG "/proc/kmsg" #define _PATH_MOUNTED "/proc/mounts" #define _PATH_TTY "/dev/tty" #endif /* !_PATHS_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/poll.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _POLL_H_ #define _POLL_H_ #include #include #include /* For sigset_t. */ #include /* For timespec. */ __BEGIN_DECLS typedef unsigned int nfds_t; int poll(struct pollfd*, nfds_t, int); int ppoll(struct pollfd*, nfds_t, const struct timespec*, const sigset_t*); int __poll_chk(struct pollfd*, nfds_t, int, size_t); int __poll_real(struct pollfd*, nfds_t, int) __RENAME(poll); __errordecl(__poll_too_small_error, "poll: pollfd array smaller than fd count"); int __ppoll_chk(struct pollfd*, nfds_t, const struct timespec*, const sigset_t*, size_t); int __ppoll_real(struct pollfd*, nfds_t, const struct timespec*, const sigset_t*) __RENAME(ppoll); __errordecl(__ppoll_too_small_error, "ppoll: pollfd array smaller than fd count"); #if defined(__BIONIC_FORTIFY) __BIONIC_FORTIFY_INLINE int poll(struct pollfd* fds, nfds_t fd_count, int timeout) { #if defined(__clang__) return __poll_chk(fds, fd_count, timeout, __bos(fds)); #else if (__bos(fds) != __BIONIC_FORTIFY_UNKNOWN_SIZE) { if (!__builtin_constant_p(fd_count)) { return __poll_chk(fds, fd_count, timeout, __bos(fds)); } else if (__bos(fds) / sizeof(*fds) < fd_count) { __poll_too_small_error(); } } return __poll_real(fds, fd_count, timeout); #endif } __BIONIC_FORTIFY_INLINE int ppoll(struct pollfd* fds, nfds_t fd_count, const struct timespec* timeout, const sigset_t* mask) { #if defined(__clang__) return __ppoll_chk(fds, fd_count, timeout, mask, __bos(fds)); #else if (__bos(fds) != __BIONIC_FORTIFY_UNKNOWN_SIZE) { if (!__builtin_constant_p(fd_count)) { return __ppoll_chk(fds, fd_count, timeout, mask, __bos(fds)); } else if (__bos(fds) / sizeof(*fds) < fd_count) { __ppoll_too_small_error(); } } return __ppoll_real(fds, fd_count, timeout, mask); #endif } #endif __END_DECLS #endif /* _POLL_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/pthread.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _PTHREAD_H_ #define _PTHREAD_H_ #include #include #include #include #include #include typedef struct { #if defined(__LP64__) int32_t __private[10]; #else int32_t __private[1]; #endif } pthread_mutex_t; typedef long pthread_mutexattr_t; enum { PTHREAD_MUTEX_NORMAL = 0, PTHREAD_MUTEX_RECURSIVE = 1, PTHREAD_MUTEX_ERRORCHECK = 2, PTHREAD_MUTEX_ERRORCHECK_NP = PTHREAD_MUTEX_ERRORCHECK, PTHREAD_MUTEX_RECURSIVE_NP = PTHREAD_MUTEX_RECURSIVE, PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL }; #define PTHREAD_MUTEX_INITIALIZER { { ((PTHREAD_MUTEX_NORMAL & 3) << 14) } } #define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP { { ((PTHREAD_MUTEX_RECURSIVE & 3) << 14) } } #define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP { { ((PTHREAD_MUTEX_ERRORCHECK & 3) << 14) } } typedef struct { #if defined(__LP64__) int32_t __private[12]; #else int32_t __private[1]; #endif } pthread_cond_t; typedef long pthread_condattr_t; #define PTHREAD_COND_INITIALIZER { { 0 } } typedef struct { #if defined(__LP64__) int32_t __private[14]; #else int32_t __private[10]; #endif } pthread_rwlock_t; typedef long pthread_rwlockattr_t; #define PTHREAD_RWLOCK_INITIALIZER { { 0 } } enum { PTHREAD_RWLOCK_PREFER_READER_NP = 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP = 1, }; typedef int pthread_key_t; typedef int pthread_once_t; #define PTHREAD_ONCE_INIT 0 typedef struct { #if defined(__LP64__) int64_t __private[4]; #else int32_t __private[8]; #endif } pthread_barrier_t; typedef int pthread_barrierattr_t; #define PTHREAD_BARRIER_SERIAL_THREAD -1 typedef struct { #if defined(__LP64__) int64_t __private; #else int32_t __private[2]; #endif } pthread_spinlock_t; #if defined(__LP64__) #define PTHREAD_STACK_MIN (4 * PAGE_SIZE) #else #define PTHREAD_STACK_MIN (2 * PAGE_SIZE) #endif #define PTHREAD_CREATE_DETACHED 0x00000001 #define PTHREAD_CREATE_JOINABLE 0x00000000 #define PTHREAD_PROCESS_PRIVATE 0 #define PTHREAD_PROCESS_SHARED 1 #define PTHREAD_SCOPE_SYSTEM 0 #define PTHREAD_SCOPE_PROCESS 1 __BEGIN_DECLS int pthread_atfork(void (*)(void), void (*)(void), void(*)(void)); int pthread_attr_destroy(pthread_attr_t*) __nonnull((1)); int pthread_attr_getdetachstate(const pthread_attr_t*, int*) __nonnull((1, 2)); int pthread_attr_getguardsize(const pthread_attr_t*, size_t*) __nonnull((1, 2)); int pthread_attr_getschedparam(const pthread_attr_t*, struct sched_param*) __nonnull((1, 2)); int pthread_attr_getschedpolicy(const pthread_attr_t*, int*) __nonnull((1, 2)); int pthread_attr_getscope(const pthread_attr_t*, int*) __nonnull((1, 2)); int pthread_attr_getstack(const pthread_attr_t*, void**, size_t*) __nonnull((1, 2, 3)); int pthread_attr_getstacksize(const pthread_attr_t*, size_t*) __nonnull((1, 2)); int pthread_attr_init(pthread_attr_t*) __nonnull((1)); int pthread_attr_setdetachstate(pthread_attr_t*, int) __nonnull((1)); int pthread_attr_setguardsize(pthread_attr_t*, size_t) __nonnull((1)); int pthread_attr_setschedparam(pthread_attr_t*, const struct sched_param*) __nonnull((1, 2)); int pthread_attr_setschedpolicy(pthread_attr_t*, int) __nonnull((1)); int pthread_attr_setscope(pthread_attr_t*, int) __nonnull((1)); int pthread_attr_setstack(pthread_attr_t*, void*, size_t) __nonnull((1)); int pthread_attr_setstacksize(pthread_attr_t*, size_t) __nonnull((1)); int pthread_condattr_destroy(pthread_condattr_t*) __nonnull((1)); int pthread_condattr_getclock(const pthread_condattr_t*, clockid_t*) __nonnull((1, 2)); int pthread_condattr_getpshared(const pthread_condattr_t*, int*) __nonnull((1, 2)); int pthread_condattr_init(pthread_condattr_t*) __nonnull((1)); int pthread_condattr_setclock(pthread_condattr_t*, clockid_t) __nonnull((1)); int pthread_condattr_setpshared(pthread_condattr_t*, int) __nonnull((1)); int pthread_cond_broadcast(pthread_cond_t*) __nonnull((1)); int pthread_cond_destroy(pthread_cond_t*) __nonnull((1)); int pthread_cond_init(pthread_cond_t*, const pthread_condattr_t*) __nonnull((1)); int pthread_cond_signal(pthread_cond_t*) __nonnull((1)); int pthread_cond_timedwait(pthread_cond_t*, pthread_mutex_t*, const struct timespec*) __nonnull((1, 2, 3)); int pthread_cond_wait(pthread_cond_t*, pthread_mutex_t*) __nonnull((1, 2)); int pthread_create(pthread_t*, pthread_attr_t const*, void *(*)(void*), void*) __nonnull((1, 3)); int pthread_detach(pthread_t); void pthread_exit(void*) __noreturn; int pthread_equal(pthread_t, pthread_t); int pthread_getattr_np(pthread_t, pthread_attr_t*) __nonnull((2)); int pthread_getcpuclockid(pthread_t, clockid_t*) __nonnull((2)); int pthread_getschedparam(pthread_t, int*, struct sched_param*) __nonnull((2, 3)); void* pthread_getspecific(pthread_key_t); pid_t pthread_gettid_np(pthread_t); int pthread_join(pthread_t, void**); int pthread_key_create(pthread_key_t*, void (*)(void*)) __nonnull((1)); int pthread_key_delete(pthread_key_t); int pthread_mutexattr_destroy(pthread_mutexattr_t*) __nonnull((1)); int pthread_mutexattr_getpshared(const pthread_mutexattr_t*, int*) __nonnull((1, 2)); int pthread_mutexattr_gettype(const pthread_mutexattr_t*, int*) __nonnull((1, 2)); int pthread_mutexattr_init(pthread_mutexattr_t*) __nonnull((1)); int pthread_mutexattr_setpshared(pthread_mutexattr_t*, int) __nonnull((1)); int pthread_mutexattr_settype(pthread_mutexattr_t*, int) __nonnull((1)); int pthread_mutex_destroy(pthread_mutex_t*) __nonnull((1)); int pthread_mutex_init(pthread_mutex_t*, const pthread_mutexattr_t*) __nonnull((1)); #if !defined(__LP64__) int pthread_mutex_lock(pthread_mutex_t*) /* __nonnull((1)) */; #else int pthread_mutex_lock(pthread_mutex_t*) __nonnull((1)); #endif int pthread_mutex_timedlock(pthread_mutex_t*, const struct timespec*) __nonnull((1, 2)); int pthread_mutex_trylock(pthread_mutex_t*) __nonnull((1)); #if !defined(__LP4__) int pthread_mutex_unlock(pthread_mutex_t*) /* __nonnull((1)) */; #else int pthread_mutex_unlock(pthread_mutex_t*) __nonnull((1)); #endif int pthread_once(pthread_once_t*, void (*)(void)) __nonnull((1, 2)); int pthread_rwlockattr_init(pthread_rwlockattr_t*) __nonnull((1)); int pthread_rwlockattr_destroy(pthread_rwlockattr_t*) __nonnull((1)); int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t*, int*) __nonnull((1, 2)); int pthread_rwlockattr_setpshared(pthread_rwlockattr_t*, int) __nonnull((1)); int pthread_rwlockattr_getkind_np(const pthread_rwlockattr_t*, int*) __nonnull((1, 2)); int pthread_rwlockattr_setkind_np(pthread_rwlockattr_t*, int) __nonnull((1)); int pthread_rwlock_destroy(pthread_rwlock_t*) __nonnull((1)); int pthread_rwlock_init(pthread_rwlock_t*, const pthread_rwlockattr_t*) __nonnull((1)); int pthread_rwlock_rdlock(pthread_rwlock_t*) __nonnull((1)); int pthread_rwlock_timedrdlock(pthread_rwlock_t*, const struct timespec*) __nonnull((1, 2)); int pthread_rwlock_timedwrlock(pthread_rwlock_t*, const struct timespec*) __nonnull((1, 2)); int pthread_rwlock_tryrdlock(pthread_rwlock_t*) __nonnull((1)); int pthread_rwlock_trywrlock(pthread_rwlock_t*) __nonnull((1)); int pthread_rwlock_unlock(pthread_rwlock_t *) __nonnull((1)); int pthread_rwlock_wrlock(pthread_rwlock_t*) __nonnull((1)); int pthread_barrierattr_init(pthread_barrierattr_t* attr) __nonnull((1)); int pthread_barrierattr_destroy(pthread_barrierattr_t* attr) __nonnull((1)); int pthread_barrierattr_getpshared(pthread_barrierattr_t* attr, int* pshared) __nonnull((1, 2)); int pthread_barrierattr_setpshared(pthread_barrierattr_t* attr, int pshared) __nonnull((1)); int pthread_barrier_init(pthread_barrier_t*, const pthread_barrierattr_t*, unsigned) __nonnull((1)); int pthread_barrier_destroy(pthread_barrier_t*) __nonnull((1)); int pthread_barrier_wait(pthread_barrier_t*) __nonnull((1)); int pthread_spin_destroy(pthread_spinlock_t*) __nonnull((1)); int pthread_spin_init(pthread_spinlock_t*, int) __nonnull((1)); int pthread_spin_lock(pthread_spinlock_t*) __nonnull((1)); int pthread_spin_trylock(pthread_spinlock_t*) __nonnull((1)); int pthread_spin_unlock(pthread_spinlock_t*) __nonnull((1)); pthread_t pthread_self(void) __pure2; int pthread_setname_np(pthread_t, const char*) __nonnull((2)); int pthread_setschedparam(pthread_t, int, const struct sched_param*) __nonnull((3)); int pthread_setspecific(pthread_key_t, const void*); typedef void (*__pthread_cleanup_func_t)(void*); typedef struct __pthread_cleanup_t { struct __pthread_cleanup_t* __cleanup_prev; __pthread_cleanup_func_t __cleanup_routine; void* __cleanup_arg; } __pthread_cleanup_t; extern void __pthread_cleanup_push(__pthread_cleanup_t* c, __pthread_cleanup_func_t, void*); extern void __pthread_cleanup_pop(__pthread_cleanup_t*, int); /* Believe or not, the definitions of pthread_cleanup_push and * pthread_cleanup_pop below are correct. Posix states that these * can be implemented as macros that might introduce opening and * closing braces, and that using setjmp/longjmp/return/break/continue * between them results in undefined behavior. */ #define pthread_cleanup_push(routine, arg) \ do { \ __pthread_cleanup_t __cleanup; \ __pthread_cleanup_push( &__cleanup, (routine), (arg) ); \ #define pthread_cleanup_pop(execute) \ __pthread_cleanup_pop( &__cleanup, (execute)); \ } while (0); \ #if !defined(__LP64__) // Bionic additions that are deprecated even in the 32-bit ABI. // // TODO: Remove them once chromium_org / NFC have switched over. int pthread_cond_timedwait_monotonic_np(pthread_cond_t*, pthread_mutex_t*, const struct timespec*); int pthread_cond_timedwait_monotonic(pthread_cond_t*, pthread_mutex_t*, const struct timespec*); int pthread_cond_timedwait_relative_np(pthread_cond_t*, pthread_mutex_t*, const struct timespec*) /* TODO: __attribute__((deprecated("use pthread_cond_timedwait instead")))*/; #define HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE 1 /* TODO: stop defining this to push LP32 off this API sooner. */ int pthread_cond_timeout_np(pthread_cond_t*, pthread_mutex_t*, unsigned) /* TODO: __attribute__((deprecated("use pthread_cond_timedwait instead")))*/; int pthread_mutex_lock_timeout_np(pthread_mutex_t*, unsigned) __attribute__((deprecated("use pthread_mutex_timedlock instead"))); #endif /* !defined(__LP64__) */ __END_DECLS #endif /* _PTHREAD_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/pty.h ================================================ /* * Copyright (C) 2014 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _PTY_H #define _PTY_H #include #include #include __BEGIN_DECLS int openpty(int*, int*, char*, const struct termios*, const struct winsize*); int forkpty(int*, char*, const struct termios*, const struct winsize*); __END_DECLS #endif /* _PTY_H */ ================================================ FILE: atlas-aapt/bionic/libc/include/pwd.h ================================================ /*- * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. * (c) UNIX System Laboratories, Inc. * All or some portions of this file are derived from material licensed * to the University of California by American Telephone and Telegraph * Co. or Unix System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)pwd.h 8.2 (Berkeley) 1/21/94 */ /*- * Portions Copyright(C) 1995, Jason Downs. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _PWD_H_ #define _PWD_H_ #include #include #define _PATH_PASSWD "/etc/passwd" #define _PATH_MASTERPASSWD "/etc/master.passwd" #define _PATH_MASTERPASSWD_LOCK "/etc/ptmp" #define _PATH_PASSWD_CONF "/etc/passwd.conf" #define _PATH_PASSWDCONF _PATH_PASSWD_CONF /* XXX: compat */ #define _PATH_USERMGMT_CONF "/etc/usermgmt.conf" #define _PATH_MP_DB "/etc/pwd.db" #define _PATH_SMP_DB "/etc/spwd.db" #define _PATH_PWD_MKDB "/usr/sbin/pwd_mkdb" #define _PW_KEYBYNAME '1' /* stored by name */ #define _PW_KEYBYNUM '2' /* stored by entry in the "file" */ #define _PW_KEYBYUID '3' /* stored by uid */ #define _PASSWORD_EFMT1 '_' /* extended DES encryption format */ #define _PASSWORD_NONDES '$' /* non-DES encryption formats */ #define _PASSWORD_LEN 128 /* max length, not counting NUL */ #define _PASSWORD_NOUID 0x01 /* flag for no specified uid. */ #define _PASSWORD_NOGID 0x02 /* flag for no specified gid. */ #define _PASSWORD_NOCHG 0x04 /* flag for no specified change. */ #define _PASSWORD_NOEXP 0x08 /* flag for no specified expire. */ #define _PASSWORD_OLDFMT 0x10 /* flag to expect an old style entry */ #define _PASSWORD_NOWARN 0x20 /* no warnings for bad entries */ #define _PASSWORD_WARNDAYS 14 /* days to warn about expiry */ #define _PASSWORD_CHGNOW -1 /* special day to force password change at next login */ struct passwd { char* pw_name; char* pw_passwd; uid_t pw_uid; gid_t pw_gid; #ifdef __LP64__ char* pw_gecos; #else // Note: On LP32, we define pw_gecos to pw_passwd since they're both NULL. # define pw_gecos pw_passwd #endif char* pw_dir; char* pw_shell; }; __BEGIN_DECLS struct passwd* getpwnam(const char*); struct passwd* getpwuid(uid_t); int getpwnam_r(const char*, struct passwd*, char*, size_t, struct passwd**); int getpwuid_r(uid_t, struct passwd*, char*, size_t, struct passwd**); __END_DECLS #endif ================================================ FILE: atlas-aapt/bionic/libc/include/regex.h ================================================ /* $OpenBSD: regex.h,v 1.6 2003/06/02 19:34:12 millert Exp $ */ /* $NetBSD: regex.h,v 1.4.6.1 1996/06/10 18:57:07 explorer Exp $ */ /*- * Copyright (c) 1992 Henry Spencer. * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Henry Spencer of the University of Toronto. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)regex.h 8.1 (Berkeley) 6/2/93 */ #ifndef _REGEX_H_ #define _REGEX_H_ #include #include /* POSIX says regoff_t is at least as large as the larger of ptrdiff_t and * ssize_t. BSD uses off_t, but that interacts badly with _FILE_OFFSET_BITS. */ typedef ssize_t regoff_t; typedef struct { int re_magic; size_t re_nsub; /* number of parenthesized subexpressions */ const char *re_endp; /* end pointer for REG_PEND */ struct re_guts *re_g; /* none of your business :-) */ } regex_t; typedef struct { regoff_t rm_so; /* start of match */ regoff_t rm_eo; /* end of match */ } regmatch_t; /* regcomp() flags */ #define REG_BASIC 0000 #define REG_EXTENDED 0001 #define REG_ICASE 0002 #define REG_NOSUB 0004 #define REG_NEWLINE 0010 #define REG_NOSPEC 0020 #define REG_PEND 0040 #define REG_DUMP 0200 /* regerror() flags */ #define REG_NOMATCH 1 #define REG_BADPAT 2 #define REG_ECOLLATE 3 #define REG_ECTYPE 4 #define REG_EESCAPE 5 #define REG_ESUBREG 6 #define REG_EBRACK 7 #define REG_EPAREN 8 #define REG_EBRACE 9 #define REG_BADBR 10 #define REG_ERANGE 11 #define REG_ESPACE 12 #define REG_BADRPT 13 #define REG_EMPTY 14 #define REG_ASSERT 15 #define REG_INVARG 16 #define REG_ATOI 255 /* convert name to number (!) */ #define REG_ITOA 0400 /* convert number to name (!) */ /* regexec() flags */ #define REG_NOTBOL 00001 #define REG_NOTEOL 00002 #define REG_STARTEND 00004 #define REG_TRACE 00400 /* tracing of execution */ #define REG_LARGE 01000 /* force large representation */ #define REG_BACKR 02000 /* force use of backref code */ __BEGIN_DECLS int regcomp(regex_t *, const char *, int); size_t regerror(int, const regex_t *, char *, size_t); int regexec(const regex_t *, const char *, size_t, regmatch_t [], int); void regfree(regex_t *); __END_DECLS #endif /* !_REGEX_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/resolv.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _RESOLV_H_ #define _RESOLV_H_ #include #include #include #include #include #include #include __BEGIN_DECLS #pragma GCC visibility push(default) struct res_state; extern struct __res_state *__res_state(void); #define _res (*__res_state()) #define b64_ntop __b64_ntop #define b64_pton __b64_pton extern int b64_ntop(u_char const*, size_t, char*, size_t); extern int b64_pton(char const*, u_char*, size_t); #define dn_comp __dn_comp extern int dn_comp(const char*, u_char*, int, u_char**, u_char**); extern int dn_expand(const u_char*, const u_char*, const u_char*, char*, int); #pragma GCC visibility pop __END_DECLS #endif /* _RESOLV_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sched.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SCHED_H_ #define _SCHED_H_ #include #include #include __BEGIN_DECLS /* This name is used by glibc, but not by the kernel. */ #define SCHED_OTHER SCHED_NORMAL struct sched_param { int sched_priority; }; extern int sched_setscheduler(pid_t, int, const struct sched_param*); extern int sched_getscheduler(pid_t); extern int sched_yield(void); extern int sched_get_priority_max(int); extern int sched_get_priority_min(int); extern int sched_setparam(pid_t, const struct sched_param*); extern int sched_getparam(pid_t, struct sched_param*); extern int sched_rr_get_interval(pid_t, struct timespec*); #if defined(__USE_GNU) extern int clone(int (*)(void*), void*, int, void*, ...); extern int unshare(int); extern int sched_getcpu(void); extern int setns(int, int); #ifdef __LP64__ #define CPU_SETSIZE 1024 #else #define CPU_SETSIZE 32 #endif #define __CPU_BITTYPE unsigned long int /* mandated by the kernel */ #define __CPU_BITS (8 * sizeof(__CPU_BITTYPE)) #define __CPU_ELT(x) ((x) / __CPU_BITS) #define __CPU_MASK(x) ((__CPU_BITTYPE)1 << ((x) & (__CPU_BITS - 1))) typedef struct { __CPU_BITTYPE __bits[ CPU_SETSIZE / __CPU_BITS ]; } cpu_set_t; extern int sched_setaffinity(pid_t pid, size_t setsize, const cpu_set_t* set); extern int sched_getaffinity(pid_t pid, size_t setsize, cpu_set_t* set); #define CPU_ZERO(set) CPU_ZERO_S(sizeof(cpu_set_t), set) #define CPU_SET(cpu, set) CPU_SET_S(cpu, sizeof(cpu_set_t), set) #define CPU_CLR(cpu, set) CPU_CLR_S(cpu, sizeof(cpu_set_t), set) #define CPU_ISSET(cpu, set) CPU_ISSET_S(cpu, sizeof(cpu_set_t), set) #define CPU_COUNT(set) CPU_COUNT_S(sizeof(cpu_set_t), set) #define CPU_EQUAL(set1, set2) CPU_EQUAL_S(sizeof(cpu_set_t), set1, set2) #define CPU_AND(dst, set1, set2) __CPU_OP(dst, set1, set2, &) #define CPU_OR(dst, set1, set2) __CPU_OP(dst, set1, set2, |) #define CPU_XOR(dst, set1, set2) __CPU_OP(dst, set1, set2, ^) #define __CPU_OP(dst, set1, set2, op) __CPU_OP_S(sizeof(cpu_set_t), dst, set1, set2, op) /* Support for dynamically-allocated cpu_set_t */ #define CPU_ALLOC_SIZE(count) \ __CPU_ELT((count) + (__CPU_BITS - 1)) * sizeof(__CPU_BITTYPE) #define CPU_ALLOC(count) __sched_cpualloc((count)) #define CPU_FREE(set) __sched_cpufree((set)) extern cpu_set_t* __sched_cpualloc(size_t count); extern void __sched_cpufree(cpu_set_t* set); #define CPU_ZERO_S(setsize, set) __builtin_memset(set, 0, setsize) #define CPU_SET_S(cpu, setsize, set) \ do { \ size_t __cpu = (cpu); \ if (__cpu < 8 * (setsize)) \ (set)->__bits[__CPU_ELT(__cpu)] |= __CPU_MASK(__cpu); \ } while (0) #define CPU_CLR_S(cpu, setsize, set) \ do { \ size_t __cpu = (cpu); \ if (__cpu < 8 * (setsize)) \ (set)->__bits[__CPU_ELT(__cpu)] &= ~__CPU_MASK(__cpu); \ } while (0) #define CPU_ISSET_S(cpu, setsize, set) \ (__extension__ ({ \ size_t __cpu = (cpu); \ (__cpu < 8 * (setsize)) \ ? ((set)->__bits[__CPU_ELT(__cpu)] & __CPU_MASK(__cpu)) != 0 \ : 0; \ })) #define CPU_EQUAL_S(setsize, set1, set2) (__builtin_memcmp(set1, set2, setsize) == 0) #define CPU_AND_S(setsize, dst, set1, set2) __CPU_OP_S(setsize, dst, set1, set2, &) #define CPU_OR_S(setsize, dst, set1, set2) __CPU_OP_S(setsize, dst, set1, set2, |) #define CPU_XOR_S(setsize, dst, set1, set2) __CPU_OP_S(setsize, dst, set1, set2, ^) #define __CPU_OP_S(setsize, dstset, srcset1, srcset2, op) \ do { \ cpu_set_t* __dst = (dstset); \ const __CPU_BITTYPE* __src1 = (srcset1)->__bits; \ const __CPU_BITTYPE* __src2 = (srcset2)->__bits; \ size_t __nn = 0, __nn_max = (setsize)/sizeof(__CPU_BITTYPE); \ for (; __nn < __nn_max; __nn++) \ (__dst)->__bits[__nn] = __src1[__nn] op __src2[__nn]; \ } while (0) #define CPU_COUNT_S(setsize, set) __sched_cpucount((setsize), (set)) extern int __sched_cpucount(size_t setsize, cpu_set_t* set); #endif /* __USE_GNU */ __END_DECLS #endif /* _SCHED_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/search.h ================================================ /*- * Written by J.T. Conklin * Public domain. * * $NetBSD: search.h,v 1.12 1999/02/22 10:34:28 christos Exp $ * $FreeBSD: release/9.0.0/include/search.h 105250 2002-10-16 14:29:23Z robert $ */ #ifndef _SEARCH_H_ #define _SEARCH_H_ #include #include typedef enum { preorder, postorder, endorder, leaf } VISIT; #ifdef _SEARCH_PRIVATE typedef struct node { char* key; struct node* llink; struct node* rlink; } node_t; #endif __BEGIN_DECLS void insque(void*, void*); void remque(void*); void* lfind(const void*, const void*, size_t*, size_t, int (*)(const void*, const void*)); void* lsearch(const void*, void*, size_t*, size_t, int (*)(const void*, const void*)); void* tdelete(const void* __restrict, void** __restrict, int (*)(const void*, const void*)); void tdestroy(void*, void (*)(void*)); void* tfind(const void*, void* const*, int (*)(const void*, const void*)); void* tsearch(const void*, void**, int (*)(const void*, const void*)); void twalk(const void*, void (*)(const void*, VISIT, int)); __END_DECLS #endif /* !_SEARCH_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/semaphore.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SEMAPHORE_H #define _SEMAPHORE_H #include __BEGIN_DECLS struct timespec; typedef struct { unsigned int count; #ifdef __LP64__ int __reserved[3]; #endif } sem_t; #define SEM_FAILED NULL int sem_destroy(sem_t*); int sem_getvalue(sem_t*, int*); int sem_init(sem_t*, int, unsigned int); int sem_post(sem_t*); int sem_timedwait(sem_t*, const struct timespec*); int sem_trywait(sem_t*); int sem_wait(sem_t*); /* These aren't actually implemented. */ sem_t* sem_open(const char*, int, ...); int sem_close(sem_t*); int sem_unlink(const char*); __END_DECLS #endif /* _SEMAPHORE_H */ ================================================ FILE: atlas-aapt/bionic/libc/include/setjmp.h ================================================ /* $OpenBSD: setjmp.h,v 1.5 2005/12/13 00:35:22 millert Exp $ */ /* $NetBSD: setjmp.h,v 1.11 1994/12/20 10:35:44 cgd Exp $ */ /*- * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. * (c) UNIX System Laboratories, Inc. * All or some portions of this file are derived from material licensed * to the University of California by American Telephone and Telegraph * Co. or Unix System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)setjmp.h 8.2 (Berkeley) 1/21/94 */ #ifndef _SETJMP_H_ #define _SETJMP_H_ #include #include typedef long sigjmp_buf[_JBLEN + 1]; typedef long jmp_buf[_JBLEN]; __BEGIN_DECLS int _setjmp(jmp_buf); void _longjmp(jmp_buf, int); int setjmp(jmp_buf); void longjmp(jmp_buf, int); int sigsetjmp(sigjmp_buf, int); void siglongjmp(sigjmp_buf, int); __END_DECLS #endif /* !_SETJMP_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sgtty.h ================================================ /* $NetBSD: sgtty.h,v 1.8 2005/02/03 04:39:32 perry Exp $ */ /* * Copyright (c) 1985, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)sgtty.h 8.1 (Berkeley) 6/2/93 */ #ifndef _SGTTY_H_ #define _SGTTY_H_ #ifndef USE_OLD_TTY #define USE_OLD_TTY #endif #include #include __BEGIN_DECLS int gtty(int, struct sgttyb *); int stty(int, struct sgttyb *); __END_DECLS #endif /* _SGTTY_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/signal.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SIGNAL_H_ #define _SIGNAL_H_ #include #include #include #include #include #include #if defined(__LP64__) || defined(__mips__) /* For 64-bit (and mips), the kernel's struct sigaction doesn't match the POSIX one, * so we need to expose our own and translate behind the scenes. */ # define sigaction __kernel_sigaction # include # undef sigaction #else /* For 32-bit, we're stuck with the definitions we already shipped, * even though they contain a sigset_t that's too small. */ # include #endif #include #define __BIONIC_HAVE_UCONTEXT_T __BEGIN_DECLS typedef int sig_atomic_t; /* The arm and x86 kernel header files don't define _NSIG. */ #ifndef _KERNEL__NSIG #define _KERNEL__NSIG 64 #endif /* Userspace's NSIG is the kernel's _NSIG + 1. */ #define _NSIG (_KERNEL__NSIG + 1) #define NSIG _NSIG /* We take a few real-time signals for ourselves. May as well use the same names as glibc. */ #define SIGRTMIN (__libc_current_sigrtmin()) #define SIGRTMAX (__libc_current_sigrtmax()) extern int __libc_current_sigrtmin(void); extern int __libc_current_sigrtmax(void); extern const char* const sys_siglist[]; extern const char* const sys_signame[]; /* BSD compatibility. */ typedef __sighandler_t sig_t; /* BSD compatibility. */ typedef __sighandler_t sighandler_t; /* glibc compatibility. */ #define si_timerid si_tid /* glibc compatibility. */ #if defined(__LP64__) struct sigaction { unsigned int sa_flags; union { sighandler_t sa_handler; void (*sa_sigaction)(int, struct siginfo*, void*); }; sigset_t sa_mask; void (*sa_restorer)(void); }; #elif defined(__mips__) struct sigaction { unsigned int sa_flags; union { sighandler_t sa_handler; void (*sa_sigaction) (int, struct siginfo*, void*); }; sigset_t sa_mask; }; #endif extern int sigaction(int, const struct sigaction*, struct sigaction*); extern sighandler_t signal(int, sighandler_t) __INTRODUCED_IN(21); extern int siginterrupt(int, int); extern int sigaddset(sigset_t*, int) __INTRODUCED_IN(21); extern int sigdelset(sigset_t*, int) __INTRODUCED_IN(21); extern int sigemptyset(sigset_t*) __INTRODUCED_IN(21); extern int sigfillset(sigset_t*) __INTRODUCED_IN(21); extern int sigismember(const sigset_t*, int) __INTRODUCED_IN(21); extern int sigpending(sigset_t*) __nonnull((1)); extern int sigprocmask(int, const sigset_t*, sigset_t*); extern int sigsuspend(const sigset_t*) __nonnull((1)); extern int sigwait(const sigset_t*, int*) __nonnull((1, 2)); extern int raise(int); extern int kill(pid_t, int); extern int killpg(int, int); extern int sigaltstack(const stack_t*, stack_t*); extern void psiginfo(const siginfo_t*, const char*); extern void psignal(int, const char*); extern int pthread_kill(pthread_t, int); extern int pthread_sigmask(int, const sigset_t*, sigset_t*); extern int sigqueue(pid_t, int, const union sigval); extern int sigtimedwait(const sigset_t*, siginfo_t*, const struct timespec*); extern int sigwaitinfo(const sigset_t*, siginfo_t*); #if __ANDROID_API__ < 21 #include #endif __END_DECLS #endif /* _SIGNAL_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/stdatomic.h ================================================ /*- * Copyright (c) 2011 Ed Schouten * David Chisnall * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $FreeBSD$ */ #ifndef _STDATOMIC_H_ #define _STDATOMIC_H_ #include #if defined(__GNUC__) && !defined(__GNUC_PREREQ) /* Duplicate definition here, since the mingw sys/cdefs.h omits the */ /* definition, and this needs to be usable there. */ #define __GNUC_PREREQ(x, y) \ ((__GNUC__ == (x) && __GNUC_MINOR__ >= (y)) || (__GNUC__ > (x))) #endif /* __GNUC__ && ... */ #if defined(__cplusplus) && __cplusplus >= 201103L && defined(_USING_LIBCXX) # ifdef __clang__ # if __has_feature(cxx_atomic) # define _STDATOMIC_HAVE_ATOMIC # endif # else /* gcc */ # if __GNUC_PREREQ(4, 7) # define _STDATOMIC_HAVE_ATOMIC # endif # endif #endif #ifdef _STDATOMIC_HAVE_ATOMIC /* We have a usable C++ ; use it instead. */ #include #undef _Atomic /* Also defined by for gcc. But not used in macros. */ /* Also a clang intrinsic. */ /* Should not be used by client code before this file is */ /* included. The definitions in themselves see */ /* the old definition, as they should. */ /* Client code sees the following definition. */ #define _Atomic(t) std::atomic using std::atomic_is_lock_free; using std::atomic_init; using std::atomic_store; using std::atomic_store_explicit; using std::atomic_load; using std::atomic_load_explicit; using std::atomic_exchange; using std::atomic_exchange_explicit; using std::atomic_compare_exchange_strong; using std::atomic_compare_exchange_strong_explicit; using std::atomic_compare_exchange_weak; using std::atomic_compare_exchange_weak_explicit; using std::atomic_fetch_add; using std::atomic_fetch_add_explicit; using std::atomic_fetch_sub; using std::atomic_fetch_sub_explicit; using std::atomic_fetch_or; using std::atomic_fetch_or_explicit; using std::atomic_fetch_xor; using std::atomic_fetch_xor_explicit; using std::atomic_fetch_and; using std::atomic_fetch_and_explicit; using std::atomic_thread_fence; using std::atomic_signal_fence; using std::memory_order; using std::memory_order_relaxed; using std::memory_order_consume; using std::memory_order_acquire; using std::memory_order_release; using std::memory_order_acq_rel; using std::memory_order_seq_cst; using std::atomic_bool; using std::atomic_char; using std::atomic_schar; using std::atomic_uchar; using std::atomic_short; using std::atomic_ushort; using std::atomic_int; using std::atomic_uint; using std::atomic_long; using std::atomic_ulong; using std::atomic_llong; using std::atomic_ullong; using std::atomic_char16_t; using std::atomic_char32_t; using std::atomic_wchar_t; using std::atomic_int_least8_t; using std::atomic_uint_least8_t; using std::atomic_int_least16_t; using std::atomic_uint_least16_t; using std::atomic_int_least32_t; using std::atomic_uint_least32_t; using std::atomic_int_least64_t; using std::atomic_uint_least64_t; using std::atomic_int_fast8_t; using std::atomic_uint_fast8_t; using std::atomic_int_fast16_t; using std::atomic_uint_fast16_t; using std::atomic_int_fast32_t; using std::atomic_uint_fast32_t; using std::atomic_int_fast64_t; using std::atomic_uint_fast64_t; using std::atomic_intptr_t; using std::atomic_uintptr_t; using std::atomic_size_t; using std::atomic_ptrdiff_t; using std::atomic_intmax_t; using std::atomic_uintmax_t; #else /* unavailable, possibly because this is C, not C++ */ #include #include /* * C: Do it ourselves. * Note that the runtime representation defined here should be compatible * with the C++ one, i.e. an _Atomic(T) needs to contain the same * bits as a T. */ #include /* For ptrdiff_t. */ #include /* TODO: Should pollute namespace less. */ #if __STDC_VERSION__ >= 201112L # include /* For char16_t and char32_t. */ #endif #ifdef __clang__ # if __has_extension(c_atomic) || __has_extension(cxx_atomic) # define __CLANG_ATOMICS # else # error "stdatomic.h does not support your compiler" # endif # if __has_builtin(__sync_swap) # define __HAS_BUILTIN_SYNC_SWAP # endif #else # if __GNUC_PREREQ(4, 7) # define __GNUC_ATOMICS # else # define __SYNC_ATOMICS # ifdef __cplusplus # define __ATOMICS_AVOID_DOT_INIT # endif # endif #endif /* * 7.17.1 Atomic lock-free macros. */ #ifdef __GCC_ATOMIC_BOOL_LOCK_FREE #define ATOMIC_BOOL_LOCK_FREE __GCC_ATOMIC_BOOL_LOCK_FREE #elif defined(__SYNC_ATOMICS) #define ATOMIC_BOOL_LOCK_FREE 2 /* For all modern platforms */ #endif #ifdef __GCC_ATOMIC_CHAR_LOCK_FREE #define ATOMIC_CHAR_LOCK_FREE __GCC_ATOMIC_CHAR_LOCK_FREE #elif defined(__SYNC_ATOMICS) #define ATOMIC_CHAR_LOCK_FREE 2 #endif #ifdef __GCC_ATOMIC_CHAR16_T_LOCK_FREE #define ATOMIC_CHAR16_T_LOCK_FREE __GCC_ATOMIC_CHAR16_T_LOCK_FREE #elif defined(__SYNC_ATOMICS) #define ATOMIC_CHAR16_T_LOCK_FREE 2 #endif #ifdef __GCC_ATOMIC_CHAR32_T_LOCK_FREE #define ATOMIC_CHAR32_T_LOCK_FREE __GCC_ATOMIC_CHAR32_T_LOCK_FREE #elif defined(__SYNC_ATOMICS) #define ATOMIC_CHAR32_T_LOCK_FREE 2 #endif #ifdef __GCC_ATOMIC_WCHAR_T_LOCK_FREE #define ATOMIC_WCHAR_T_LOCK_FREE __GCC_ATOMIC_WCHAR_T_LOCK_FREE #elif defined(__SYNC_ATOMICS) #define ATOMIC_WCHAR_T_LOCK_FREE 2 #endif #ifdef __GCC_ATOMIC_SHORT_LOCK_FREE #define ATOMIC_SHORT_LOCK_FREE __GCC_ATOMIC_SHORT_LOCK_FREE #elif defined(__SYNC_ATOMICS) #define ATOMIC_SHORT_LOCK_FREE 2 #endif #ifdef __GCC_ATOMIC_INT_LOCK_FREE #define ATOMIC_INT_LOCK_FREE __GCC_ATOMIC_INT_LOCK_FREE #elif defined(__SYNC_ATOMICS) #define ATOMIC_INT_LOCK_FREE 2 #endif #ifdef __GCC_ATOMIC_LONG_LOCK_FREE #define ATOMIC_LONG_LOCK_FREE __GCC_ATOMIC_LONG_LOCK_FREE #elif defined(__SYNC_ATOMICS) #define ATOMIC_LONG_LOCK_FREE 2 #endif #ifdef __GCC_ATOMIC_LLONG_LOCK_FREE #define ATOMIC_LLONG_LOCK_FREE __GCC_ATOMIC_LLONG_LOCK_FREE #elif defined(__SYNC_ATOMICS) #define ATOMIC_LLONG_LOCK_FREE 1 /* maybe */ #endif #ifdef __GCC_ATOMIC_POINTER_LOCK_FREE #define ATOMIC_POINTER_LOCK_FREE __GCC_ATOMIC_POINTER_LOCK_FREE #elif defined(__SYNC_ATOMICS) #define ATOMIC_POINTER_LOCK_FREE 2 #endif /* * 7.17.2 Initialization. */ #if defined(__CLANG_ATOMICS) #define ATOMIC_VAR_INIT(value) (value) #define atomic_init(obj, value) __c11_atomic_init(obj, value) #else #ifdef __ATOMICS_AVOID_DOT_INIT #define ATOMIC_VAR_INIT(value) { value } #else #define ATOMIC_VAR_INIT(value) { .__val = (value) } #endif #define atomic_init(obj, value) ((void)((obj)->__val = (value))) #endif /* * Clang and recent GCC both provide predefined macros for the memory * orderings. If we are using a compiler that doesn't define them, use the * clang values - these will be ignored in the fallback path. */ #ifndef __ATOMIC_RELAXED #define __ATOMIC_RELAXED 0 #endif #ifndef __ATOMIC_CONSUME #define __ATOMIC_CONSUME 1 #endif #ifndef __ATOMIC_ACQUIRE #define __ATOMIC_ACQUIRE 2 #endif #ifndef __ATOMIC_RELEASE #define __ATOMIC_RELEASE 3 #endif #ifndef __ATOMIC_ACQ_REL #define __ATOMIC_ACQ_REL 4 #endif #ifndef __ATOMIC_SEQ_CST #define __ATOMIC_SEQ_CST 5 #endif /* * 7.17.3 Order and consistency. * * The memory_order_* constants that denote the barrier behaviour of the * atomic operations. * The enum values must be identical to those used by the * C++ header. */ typedef enum { memory_order_relaxed = __ATOMIC_RELAXED, memory_order_consume = __ATOMIC_CONSUME, memory_order_acquire = __ATOMIC_ACQUIRE, memory_order_release = __ATOMIC_RELEASE, memory_order_acq_rel = __ATOMIC_ACQ_REL, memory_order_seq_cst = __ATOMIC_SEQ_CST } memory_order; /* * 7.17.4 Fences. */ static __inline void atomic_thread_fence(memory_order __order __attribute__((unused))) { #ifdef __CLANG_ATOMICS __c11_atomic_thread_fence(__order); #elif defined(__GNUC_ATOMICS) __atomic_thread_fence(__order); #else __sync_synchronize(); #endif } static __inline void atomic_signal_fence(memory_order __order __attribute__((unused))) { #ifdef __CLANG_ATOMICS __c11_atomic_signal_fence(__order); #elif defined(__GNUC_ATOMICS) __atomic_signal_fence(__order); #else __asm volatile ("" ::: "memory"); #endif } /* * 7.17.5 Lock-free property. */ #if defined(_KERNEL) /* Atomics in kernelspace are always lock-free. */ #define atomic_is_lock_free(obj) \ ((void)(obj), (_Bool)1) #elif defined(__CLANG_ATOMICS) #define atomic_is_lock_free(obj) \ __c11_atomic_is_lock_free(sizeof(*(obj))) #elif defined(__GNUC_ATOMICS) #define atomic_is_lock_free(obj) \ __atomic_is_lock_free(sizeof((obj)->__val), &(obj)->__val) #else #define atomic_is_lock_free(obj) \ ((void)(obj), sizeof((obj)->__val) <= sizeof(void *)) #endif /* * 7.17.6 Atomic integer types. */ #ifndef __CLANG_ATOMICS /* * No native support for _Atomic(). Place object in structure to prevent * most forms of direct non-atomic access. */ #define _Atomic(T) struct { T volatile __val; } #endif typedef _Atomic(bool) atomic_bool; typedef _Atomic(char) atomic_char; typedef _Atomic(signed char) atomic_schar; typedef _Atomic(unsigned char) atomic_uchar; typedef _Atomic(short) atomic_short; typedef _Atomic(unsigned short) atomic_ushort; typedef _Atomic(int) atomic_int; typedef _Atomic(unsigned int) atomic_uint; typedef _Atomic(long) atomic_long; typedef _Atomic(unsigned long) atomic_ulong; typedef _Atomic(long long) atomic_llong; typedef _Atomic(unsigned long long) atomic_ullong; #if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L typedef _Atomic(char16_t) atomic_char16_t; typedef _Atomic(char32_t) atomic_char32_t; #endif typedef _Atomic(wchar_t) atomic_wchar_t; typedef _Atomic(int_least8_t) atomic_int_least8_t; typedef _Atomic(uint_least8_t) atomic_uint_least8_t; typedef _Atomic(int_least16_t) atomic_int_least16_t; typedef _Atomic(uint_least16_t) atomic_uint_least16_t; typedef _Atomic(int_least32_t) atomic_int_least32_t; typedef _Atomic(uint_least32_t) atomic_uint_least32_t; typedef _Atomic(int_least64_t) atomic_int_least64_t; typedef _Atomic(uint_least64_t) atomic_uint_least64_t; typedef _Atomic(int_fast8_t) atomic_int_fast8_t; typedef _Atomic(uint_fast8_t) atomic_uint_fast8_t; typedef _Atomic(int_fast16_t) atomic_int_fast16_t; typedef _Atomic(uint_fast16_t) atomic_uint_fast16_t; typedef _Atomic(int_fast32_t) atomic_int_fast32_t; typedef _Atomic(uint_fast32_t) atomic_uint_fast32_t; typedef _Atomic(int_fast64_t) atomic_int_fast64_t; typedef _Atomic(uint_fast64_t) atomic_uint_fast64_t; typedef _Atomic(intptr_t) atomic_intptr_t; typedef _Atomic(uintptr_t) atomic_uintptr_t; typedef _Atomic(size_t) atomic_size_t; typedef _Atomic(ptrdiff_t) atomic_ptrdiff_t; typedef _Atomic(intmax_t) atomic_intmax_t; typedef _Atomic(uintmax_t) atomic_uintmax_t; /* * 7.17.7 Operations on atomic types. */ /* * Compiler-specific operations. */ #if defined(__CLANG_ATOMICS) #define atomic_compare_exchange_strong_explicit(object, expected, \ desired, success, failure) \ __c11_atomic_compare_exchange_strong(object, expected, desired, \ success, failure) #define atomic_compare_exchange_weak_explicit(object, expected, \ desired, success, failure) \ __c11_atomic_compare_exchange_weak(object, expected, desired, \ success, failure) #define atomic_exchange_explicit(object, desired, order) \ __c11_atomic_exchange(object, desired, order) #define atomic_fetch_add_explicit(object, operand, order) \ __c11_atomic_fetch_add(object, operand, order) #define atomic_fetch_and_explicit(object, operand, order) \ __c11_atomic_fetch_and(object, operand, order) #define atomic_fetch_or_explicit(object, operand, order) \ __c11_atomic_fetch_or(object, operand, order) #define atomic_fetch_sub_explicit(object, operand, order) \ __c11_atomic_fetch_sub(object, operand, order) #define atomic_fetch_xor_explicit(object, operand, order) \ __c11_atomic_fetch_xor(object, operand, order) #define atomic_load_explicit(object, order) \ __c11_atomic_load(object, order) #define atomic_store_explicit(object, desired, order) \ __c11_atomic_store(object, desired, order) #elif defined(__GNUC_ATOMICS) #define atomic_compare_exchange_strong_explicit(object, expected, \ desired, success, failure) \ __atomic_compare_exchange_n(&(object)->__val, expected, \ desired, 0, success, failure) #define atomic_compare_exchange_weak_explicit(object, expected, \ desired, success, failure) \ __atomic_compare_exchange_n(&(object)->__val, expected, \ desired, 1, success, failure) #define atomic_exchange_explicit(object, desired, order) \ __atomic_exchange_n(&(object)->__val, desired, order) #define atomic_fetch_add_explicit(object, operand, order) \ __atomic_fetch_add(&(object)->__val, operand, order) #define atomic_fetch_and_explicit(object, operand, order) \ __atomic_fetch_and(&(object)->__val, operand, order) #define atomic_fetch_or_explicit(object, operand, order) \ __atomic_fetch_or(&(object)->__val, operand, order) #define atomic_fetch_sub_explicit(object, operand, order) \ __atomic_fetch_sub(&(object)->__val, operand, order) #define atomic_fetch_xor_explicit(object, operand, order) \ __atomic_fetch_xor(&(object)->__val, operand, order) #define atomic_load_explicit(object, order) \ __atomic_load_n(&(object)->__val, order) #define atomic_store_explicit(object, desired, order) \ __atomic_store_n(&(object)->__val, desired, order) #else #define __atomic_apply_stride(object, operand) \ (((__typeof__((object)->__val))0) + (operand)) #define atomic_compare_exchange_strong_explicit(object, expected, \ desired, success, failure) __extension__ ({ \ __typeof__(expected) __ep = (expected); \ __typeof__(*__ep) __e = *__ep; \ (void)(success); (void)(failure); \ (bool)((*__ep = __sync_val_compare_and_swap(&(object)->__val, \ __e, desired)) == __e); \ }) #define atomic_compare_exchange_weak_explicit(object, expected, \ desired, success, failure) \ atomic_compare_exchange_strong_explicit(object, expected, \ desired, success, failure) #ifdef __HAS_BUILTIN_SYNC_SWAP /* Clang provides a full-barrier atomic exchange - use it if available. */ #define atomic_exchange_explicit(object, desired, order) \ ((void)(order), __sync_swap(&(object)->__val, desired)) #else /* * __sync_lock_test_and_set() is only an acquire barrier in theory (although in * practice it is usually a full barrier) so we need an explicit barrier before * it. */ #define atomic_exchange_explicit(object, desired, order) \ __extension__ ({ \ __typeof__(object) __o = (object); \ __typeof__(desired) __d = (desired); \ (void)(order); \ __sync_synchronize(); \ __sync_lock_test_and_set(&(__o)->__val, __d); \ }) #endif #define atomic_fetch_add_explicit(object, operand, order) \ ((void)(order), __sync_fetch_and_add(&(object)->__val, \ __atomic_apply_stride(object, operand))) #define atomic_fetch_and_explicit(object, operand, order) \ ((void)(order), __sync_fetch_and_and(&(object)->__val, operand)) #define atomic_fetch_or_explicit(object, operand, order) \ ((void)(order), __sync_fetch_and_or(&(object)->__val, operand)) #define atomic_fetch_sub_explicit(object, operand, order) \ ((void)(order), __sync_fetch_and_sub(&(object)->__val, \ __atomic_apply_stride(object, operand))) #define atomic_fetch_xor_explicit(object, operand, order) \ ((void)(order), __sync_fetch_and_xor(&(object)->__val, operand)) #define atomic_load_explicit(object, order) \ ((void)(order), __sync_fetch_and_add(&(object)->__val, 0)) #define atomic_store_explicit(object, desired, order) \ ((void)atomic_exchange_explicit(object, desired, order)) #endif /* * Convenience functions. * * Don't provide these in kernel space. In kernel space, we should be * disciplined enough to always provide explicit barriers. */ #ifndef _KERNEL #define atomic_compare_exchange_strong(object, expected, desired) \ atomic_compare_exchange_strong_explicit(object, expected, \ desired, memory_order_seq_cst, memory_order_seq_cst) #define atomic_compare_exchange_weak(object, expected, desired) \ atomic_compare_exchange_weak_explicit(object, expected, \ desired, memory_order_seq_cst, memory_order_seq_cst) #define atomic_exchange(object, desired) \ atomic_exchange_explicit(object, desired, memory_order_seq_cst) #define atomic_fetch_add(object, operand) \ atomic_fetch_add_explicit(object, operand, memory_order_seq_cst) #define atomic_fetch_and(object, operand) \ atomic_fetch_and_explicit(object, operand, memory_order_seq_cst) #define atomic_fetch_or(object, operand) \ atomic_fetch_or_explicit(object, operand, memory_order_seq_cst) #define atomic_fetch_sub(object, operand) \ atomic_fetch_sub_explicit(object, operand, memory_order_seq_cst) #define atomic_fetch_xor(object, operand) \ atomic_fetch_xor_explicit(object, operand, memory_order_seq_cst) #define atomic_load(object) \ atomic_load_explicit(object, memory_order_seq_cst) #define atomic_store(object, desired) \ atomic_store_explicit(object, desired, memory_order_seq_cst) #endif /* !_KERNEL */ /* * 7.17.8 Atomic flag type and operations. * * XXX: Assume atomic_bool can be used as an atomic_flag. Is there some * kind of compiler built-in type we could use? */ typedef struct { atomic_bool __flag; } atomic_flag; #define ATOMIC_FLAG_INIT { ATOMIC_VAR_INIT(false) } static __inline bool atomic_flag_test_and_set_explicit(volatile atomic_flag *__object, memory_order __order) { return (atomic_exchange_explicit(&__object->__flag, 1, __order)); } static __inline void atomic_flag_clear_explicit(volatile atomic_flag *__object, memory_order __order) { atomic_store_explicit(&__object->__flag, 0, __order); } #ifndef _KERNEL static __inline bool atomic_flag_test_and_set(volatile atomic_flag *__object) { return (atomic_flag_test_and_set_explicit(__object, memory_order_seq_cst)); } static __inline void atomic_flag_clear(volatile atomic_flag *__object) { atomic_flag_clear_explicit(__object, memory_order_seq_cst); } #endif /* !_KERNEL */ #endif /* unavailable */ #endif /* !_STDATOMIC_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/stdint.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _STDINT_H #define _STDINT_H #include #include typedef __signed char __int8_t; typedef unsigned char __uint8_t; typedef short __int16_t; typedef unsigned short __uint16_t; typedef int __int32_t; typedef unsigned int __uint32_t; #if __LP64__ typedef long __int64_t; typedef unsigned long __uint64_t; #else typedef long long __int64_t; typedef unsigned long long __uint64_t; #endif #if __LP64__ typedef long __intptr_t; typedef unsigned long __uintptr_t; #else typedef int __intptr_t; typedef unsigned int __uintptr_t; #endif typedef __int8_t int8_t; typedef __uint8_t uint8_t; typedef __int16_t int16_t; typedef __uint16_t uint16_t; typedef __int32_t int32_t; typedef __uint32_t uint32_t; typedef __int64_t int64_t; typedef __uint64_t uint64_t; typedef __intptr_t intptr_t; typedef __uintptr_t uintptr_t; typedef int8_t int_least8_t; typedef uint8_t uint_least8_t; typedef int16_t int_least16_t; typedef uint16_t uint_least16_t; typedef int32_t int_least32_t; typedef uint32_t uint_least32_t; typedef int64_t int_least64_t; typedef uint64_t uint_least64_t; typedef int8_t int_fast8_t; typedef uint8_t uint_fast8_t; typedef int64_t int_fast64_t; typedef uint64_t uint_fast64_t; #if defined(__LP64__) typedef int64_t int_fast16_t; typedef uint64_t uint_fast16_t; typedef int64_t int_fast32_t; typedef uint64_t uint_fast32_t; #else typedef int32_t int_fast16_t; typedef uint32_t uint_fast16_t; typedef int32_t int_fast32_t; typedef uint32_t uint_fast32_t; #endif typedef uint64_t uintmax_t; typedef int64_t intmax_t; /* Keep the kernel from trying to define these types... */ #define __BIT_TYPES_DEFINED__ #define INT8_C(c) c #define INT_LEAST8_C(c) INT8_C(c) #define INT_FAST8_C(c) INT8_C(c) #define UINT8_C(c) c #define UINT_LEAST8_C(c) UINT8_C(c) #define UINT_FAST8_C(c) UINT8_C(c) #define INT16_C(c) c #define INT_LEAST16_C(c) INT16_C(c) #define INT_FAST16_C(c) INT32_C(c) #define UINT16_C(c) c #define UINT_LEAST16_C(c) UINT16_C(c) #define UINT_FAST16_C(c) UINT32_C(c) #define INT32_C(c) c #define INT_LEAST32_C(c) INT32_C(c) #define INT_FAST32_C(c) INT32_C(c) #define UINT32_C(c) c ## U #define UINT_LEAST32_C(c) UINT32_C(c) #define UINT_FAST32_C(c) UINT32_C(c) #define INT_LEAST64_C(c) INT64_C(c) #define INT_FAST64_C(c) INT64_C(c) #define UINT_LEAST64_C(c) UINT64_C(c) #define UINT_FAST64_C(c) UINT64_C(c) #define INTMAX_C(c) INT64_C(c) #define UINTMAX_C(c) UINT64_C(c) #if defined(__LP64__) # define INT64_C(c) c ## L # define UINT64_C(c) c ## UL # define INTPTR_C(c) INT64_C(c) # define UINTPTR_C(c) UINT64_C(c) # define PTRDIFF_C(c) INT64_C(c) #else # define INT64_C(c) c ## LL # define UINT64_C(c) c ## ULL # define INTPTR_C(c) INT32_C(c) # define UINTPTR_C(c) UINT32_C(c) # define PTRDIFF_C(c) INT32_C(c) #endif #define INT8_MIN (-128) #define INT8_MAX (127) #define INT_LEAST8_MIN INT8_MIN #define INT_LEAST8_MAX INT8_MAX #define INT_FAST8_MIN INT8_MIN #define INT_FAST8_MAX INT8_MAX #define UINT8_MAX (255) #define UINT_LEAST8_MAX UINT8_MAX #define UINT_FAST8_MAX UINT8_MAX #define INT16_MIN (-32768) #define INT16_MAX (32767) #define INT_LEAST16_MIN INT16_MIN #define INT_LEAST16_MAX INT16_MAX #define INT_FAST16_MIN INT32_MIN #define INT_FAST16_MAX INT32_MAX #define UINT16_MAX (65535) #define UINT_LEAST16_MAX UINT16_MAX #define UINT_FAST16_MAX UINT32_MAX #define INT32_MIN (-2147483647-1) #define INT32_MAX (2147483647) #define INT_LEAST32_MIN INT32_MIN #define INT_LEAST32_MAX INT32_MAX #define INT_FAST32_MIN INT32_MIN #define INT_FAST32_MAX INT32_MAX #define UINT32_MAX (4294967295U) #define UINT_LEAST32_MAX UINT32_MAX #define UINT_FAST32_MAX UINT32_MAX #define INT64_MIN (INT64_C(-9223372036854775807)-1) #define INT64_MAX (INT64_C(9223372036854775807)) #define INT_LEAST64_MIN INT64_MIN #define INT_LEAST64_MAX INT64_MAX #define INT_FAST64_MIN INT64_MIN #define INT_FAST64_MAX INT64_MAX #define UINT64_MAX (UINT64_C(18446744073709551615)) #define UINT_LEAST64_MAX UINT64_MAX #define UINT_FAST64_MAX UINT64_MAX #define INTMAX_MIN INT64_MIN #define INTMAX_MAX INT64_MAX #define UINTMAX_MAX UINT64_MAX #define SIG_ATOMIC_MAX INT32_MAX #define SIG_ATOMIC_MIN INT32_MIN #if defined(__WINT_UNSIGNED__) # define WINT_MAX UINT32_MAX # define WINT_MIN 0 #else # define WINT_MAX INT32_MAX # define WINT_MIN INT32_MIN #endif #if defined(__LP64__) # define INTPTR_MIN INT64_MIN # define INTPTR_MAX INT64_MAX # define UINTPTR_MAX UINT64_MAX # define PTRDIFF_MIN INT64_MIN # define PTRDIFF_MAX INT64_MAX # define SIZE_MAX UINT64_MAX #else # define INTPTR_MIN INT32_MIN # define INTPTR_MAX INT32_MAX # define UINTPTR_MAX UINT32_MAX # define PTRDIFF_MIN INT32_MIN # define PTRDIFF_MAX INT32_MAX # define SIZE_MAX UINT32_MAX #endif #endif /* _STDINT_H */ ================================================ FILE: atlas-aapt/bionic/libc/include/stdio.h ================================================ /* $OpenBSD: stdio.h,v 1.35 2006/01/13 18:10:09 miod Exp $ */ /* $NetBSD: stdio.h,v 1.18 1996/04/25 18:29:21 jtc Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. * * This code is derived from software contributed to Berkeley by * Chris Torek. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)stdio.h 5.17 (Berkeley) 6/3/91 */ #ifndef _STDIO_H_ #define _STDIO_H_ #include #include #include #include #define __need_NULL #include __BEGIN_DECLS typedef off_t fpos_t; typedef off64_t fpos64_t; struct __sFILE; typedef struct __sFILE FILE; extern FILE* stdin; extern FILE* stdout; extern FILE* stderr; /* C99 and earlier plus current C++ standards say these must be macros. */ #define stdin stdin #define stdout stdout #define stderr stderr /* * The following three definitions are for ANSI C, which took them * from System V, which brilliantly took internal interface macros and * made them official arguments to setvbuf(), without renaming them. * Hence, these ugly _IOxxx names are *supposed* to appear in user code. * * Although numbered as their counterparts above, the implementation * does not rely on this. */ #define _IOFBF 0 /* setvbuf should set fully buffered */ #define _IOLBF 1 /* setvbuf should set line buffered */ #define _IONBF 2 /* setvbuf should set unbuffered */ #define BUFSIZ 1024 /* size of buffer used by setbuf */ #define EOF (-1) /* * FOPEN_MAX is a minimum maximum, and is the number of streams that * stdio can provide without attempting to allocate further resources * (which could fail). Do not use this for anything. */ #define FOPEN_MAX 20 /* must be <= OPEN_MAX */ #define FILENAME_MAX 1024 /* must be <= PATH_MAX */ /* System V/ANSI C; this is the wrong way to do this, do *not* use these. */ #if __BSD_VISIBLE || __XPG_VISIBLE #define P_tmpdir "/tmp/" #endif #define L_tmpnam 1024 /* XXX must be == PATH_MAX */ #define TMP_MAX 308915776 #define SEEK_SET 0 #define SEEK_CUR 1 #define SEEK_END 2 /* * Functions defined in ANSI C standard. */ void clearerr(FILE *); int fclose(FILE *); int feof(FILE *); int ferror(FILE *); int fflush(FILE *); int fgetc(FILE *); char *fgets(char * __restrict, int, FILE * __restrict); int fprintf(FILE * __restrict , const char * __restrict, ...) __printflike(2, 3); int fputc(int, FILE *); int fputs(const char * __restrict, FILE * __restrict); size_t fread(void * __restrict, size_t, size_t, FILE * __restrict); int fscanf(FILE * __restrict, const char * __restrict, ...) __scanflike(2, 3); size_t fwrite(const void * __restrict, size_t, size_t, FILE * __restrict); int getc(FILE *); int getchar(void); ssize_t getdelim(char ** __restrict, size_t * __restrict, int, FILE * __restrict); ssize_t getline(char ** __restrict, size_t * __restrict, FILE * __restrict); void perror(const char *); int printf(const char * __restrict, ...) __printflike(1, 2); int putc(int, FILE *); int putchar(int); int puts(const char *); int remove(const char *); void rewind(FILE *); int scanf(const char * __restrict, ...) __scanflike(1, 2); void setbuf(FILE * __restrict, char * __restrict); int setvbuf(FILE * __restrict, char * __restrict, int, size_t); int sscanf(const char * __restrict, const char * __restrict, ...) __scanflike(2, 3); int ungetc(int, FILE *); int vfprintf(FILE * __restrict, const char * __restrict, __va_list) __printflike(2, 0); int vprintf(const char * __restrict, __va_list) __printflike(1, 0); int dprintf(int, const char * __restrict, ...) __printflike(2, 3); int vdprintf(int, const char * __restrict, __va_list) __printflike(2, 0); #ifndef __AUDIT__ #if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L char* gets(char*) __attribute__((deprecated("gets is unsafe, use fgets instead"))); #endif int sprintf(char* __restrict, const char* __restrict, ...) __printflike(2, 3) __warnattr("sprintf is often misused; please use snprintf"); int vsprintf(char* __restrict, const char* __restrict, __va_list) __printflike(2, 0) __warnattr("vsprintf is often misused; please use vsnprintf"); char* tmpnam(char*) __attribute__((deprecated("tmpnam is unsafe, use mkstemp or tmpfile instead"))); #if __XPG_VISIBLE char* tempnam(const char*, const char*) __attribute__((deprecated("tempnam is unsafe, use mkstemp or tmpfile instead"))); #endif #endif int rename(const char*, const char*); int renameat(int, const char*, int, const char*); int fseek(FILE*, long, int); long ftell(FILE*); #if defined(__USE_FILE_OFFSET64) int fgetpos(FILE*, fpos_t*) __RENAME(fgetpos64); int fsetpos(FILE*, const fpos_t*) __RENAME(fsetpos64); int fseeko(FILE*, off_t, int) __RENAME(fseeko64); off_t ftello(FILE*) __RENAME(ftello64); # if defined(__USE_BSD) FILE* funopen(const void*, int (*)(void*, char*, int), int (*)(void*, const char*, int), fpos_t (*)(void*, fpos_t, int), int (*)(void*)) __RENAME(funopen64); # endif #else int fgetpos(FILE*, fpos_t*); int fsetpos(FILE*, const fpos_t*); int fseeko(FILE*, off_t, int); off_t ftello(FILE*); # if defined(__USE_BSD) FILE* funopen(const void*, int (*)(void*, char*, int), int (*)(void*, const char*, int), fpos_t (*)(void*, fpos_t, int), int (*)(void*)); # endif #endif int fgetpos64(FILE*, fpos64_t*); int fsetpos64(FILE*, const fpos64_t*); int fseeko64(FILE*, off64_t, int); off64_t ftello64(FILE*); #if defined(__USE_BSD) FILE* funopen64(const void*, int (*)(void*, char*, int), int (*)(void*, const char*, int), fpos64_t (*)(void*, fpos64_t, int), int (*)(void*)); #endif FILE* fopen(const char* __restrict, const char* __restrict); FILE* fopen64(const char* __restrict, const char* __restrict); FILE* freopen(const char* __restrict, const char* __restrict, FILE* __restrict); FILE* freopen64(const char* __restrict, const char* __restrict, FILE* __restrict); FILE* tmpfile(void); FILE* tmpfile64(void); #if __ISO_C_VISIBLE >= 1999 || __BSD_VISIBLE int snprintf(char * __restrict, size_t, const char * __restrict, ...) __printflike(3, 4); int vfscanf(FILE * __restrict, const char * __restrict, __va_list) __scanflike(2, 0); int vscanf(const char *, __va_list) __scanflike(1, 0); int vsnprintf(char * __restrict, size_t, const char * __restrict, __va_list) __printflike(3, 0); int vsscanf(const char * __restrict, const char * __restrict, __va_list) __scanflike(2, 0); #endif /* __ISO_C_VISIBLE >= 1999 || __BSD_VISIBLE */ /* * Functions defined in POSIX 1003.1. */ #if __BSD_VISIBLE || __POSIX_VISIBLE || __XPG_VISIBLE #define L_ctermid 1024 /* size for ctermid(); PATH_MAX */ FILE *fdopen(int, const char *); int fileno(FILE *); #if (__POSIX_VISIBLE >= 199209) int pclose(FILE *); FILE *popen(const char *, const char *); #endif #if __POSIX_VISIBLE >= 199506 void flockfile(FILE *); int ftrylockfile(FILE *); void funlockfile(FILE *); /* * These are normally used through macros as defined below, but POSIX * requires functions as well. */ int getc_unlocked(FILE *); int getchar_unlocked(void); int putc_unlocked(int, FILE *); int putchar_unlocked(int); #endif /* __POSIX_VISIBLE >= 199506 */ #if __POSIX_VISIBLE >= 200809 FILE* fmemopen(void*, size_t, const char*); FILE* open_memstream(char**, size_t*); #endif /* __POSIX_VISIBLE >= 200809 */ #endif /* __BSD_VISIBLE || __POSIX_VISIBLE || __XPG_VISIBLE */ /* * Routines that are purely local. */ #if __BSD_VISIBLE int asprintf(char ** __restrict, const char * __restrict, ...) __printflike(2, 3); char *fgetln(FILE * __restrict, size_t * __restrict); int fpurge(FILE *); void setbuffer(FILE *, char *, int); int setlinebuf(FILE *); int vasprintf(char ** __restrict, const char * __restrict, __va_list) __printflike(2, 0); void clearerr_unlocked(FILE*); int feof_unlocked(FILE*); int ferror_unlocked(FILE*); int fileno_unlocked(FILE*); #define fropen(cookie, fn) funopen(cookie, fn, 0, 0, 0) #define fwopen(cookie, fn) funopen(cookie, 0, fn, 0, 0) #endif /* __BSD_VISIBLE */ extern char* __fgets_chk(char*, int, FILE*, size_t); extern char* __fgets_real(char*, int, FILE*) __RENAME(fgets); __errordecl(__fgets_too_big_error, "fgets called with size bigger than buffer"); __errordecl(__fgets_too_small_error, "fgets called with size less than zero"); extern size_t __fread_chk(void * __restrict, size_t, size_t, FILE * __restrict, size_t); extern size_t __fread_real(void * __restrict, size_t, size_t, FILE * __restrict) __RENAME(fread); __errordecl(__fread_too_big_error, "fread called with size * count bigger than buffer"); __errordecl(__fread_overflow, "fread called with overflowing size * count"); extern size_t __fwrite_chk(const void * __restrict, size_t, size_t, FILE * __restrict, size_t); extern size_t __fwrite_real(const void * __restrict, size_t, size_t, FILE * __restrict) __RENAME(fwrite); __errordecl(__fwrite_too_big_error, "fwrite called with size * count bigger than buffer"); __errordecl(__fwrite_overflow, "fwrite called with overflowing size * count"); #if defined(__BIONIC_FORTIFY) __BIONIC_FORTIFY_INLINE __printflike(3, 0) int vsnprintf(char *dest, size_t size, const char *format, __va_list ap) { return __builtin___vsnprintf_chk(dest, size, 0, __bos(dest), format, ap); } __BIONIC_FORTIFY_INLINE __printflike(2, 0) int vsprintf(char *dest, const char *format, __va_list ap) { return __builtin___vsprintf_chk(dest, 0, __bos(dest), format, ap); } #if defined(__clang__) #if !defined(snprintf) #define __wrap_snprintf(dest, size, ...) __builtin___snprintf_chk(dest, size, 0, __bos(dest), __VA_ARGS__) #define snprintf(...) __wrap_snprintf(__VA_ARGS__) #endif #else __BIONIC_FORTIFY_INLINE __printflike(3, 4) int snprintf(char *dest, size_t size, const char *format, ...) { return __builtin___snprintf_chk(dest, size, 0, __bos(dest), format, __builtin_va_arg_pack()); } #endif #if defined(__clang__) #if !defined(sprintf) #define __wrap_sprintf(dest, ...) __builtin___sprintf_chk(dest, 0, __bos(dest), __VA_ARGS__) #define sprintf(...) __wrap_sprintf(__VA_ARGS__) #endif #else __BIONIC_FORTIFY_INLINE __printflike(2, 3) int sprintf(char *dest, const char *format, ...) { return __builtin___sprintf_chk(dest, 0, __bos(dest), format, __builtin_va_arg_pack()); } #endif __BIONIC_FORTIFY_INLINE size_t fread(void * __restrict buf, size_t size, size_t count, FILE * __restrict stream) { size_t bos = __bos0(buf); #if !defined(__clang__) if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) { return __fread_real(buf, size, count, stream); } if (__builtin_constant_p(size) && __builtin_constant_p(count)) { size_t total; if (__size_mul_overflow(size, count, &total)) { __fread_overflow(); } if (total > bos) { __fread_too_big_error(); } return __fread_real(buf, size, count, stream); } #endif return __fread_chk(buf, size, count, stream, bos); } __BIONIC_FORTIFY_INLINE size_t fwrite(const void * __restrict buf, size_t size, size_t count, FILE * __restrict stream) { size_t bos = __bos0(buf); #if !defined(__clang__) if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) { return __fwrite_real(buf, size, count, stream); } if (__builtin_constant_p(size) && __builtin_constant_p(count)) { size_t total; if (__size_mul_overflow(size, count, &total)) { __fwrite_overflow(); } if (total > bos) { __fwrite_too_big_error(); } return __fwrite_real(buf, size, count, stream); } #endif return __fwrite_chk(buf, size, count, stream, bos); } #if !defined(__clang__) __BIONIC_FORTIFY_INLINE char *fgets(char* dest, int size, FILE* stream) { size_t bos = __bos(dest); // Compiler can prove, at compile time, that the passed in size // is always negative. Force a compiler error. if (__builtin_constant_p(size) && (size < 0)) { __fgets_too_small_error(); } // Compiler doesn't know destination size. Don't call __fgets_chk if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) { return __fgets_real(dest, size, stream); } // Compiler can prove, at compile time, that the passed in size // is always <= the actual object size. Don't call __fgets_chk if (__builtin_constant_p(size) && (size <= (int) bos)) { return __fgets_real(dest, size, stream); } // Compiler can prove, at compile time, that the passed in size // is always > the actual object size. Force a compiler error. if (__builtin_constant_p(size) && (size > (int) bos)) { __fgets_too_big_error(); } return __fgets_chk(dest, size, stream, bos); } #endif /* !defined(__clang__) */ #endif /* defined(__BIONIC_FORTIFY) */ __END_DECLS #endif /* _STDIO_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/stdio_ext.h ================================================ /* * Copyright (C) 2014 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _STDIO_EXT_H #define _STDIO_EXT_H #include #include #define FSETLOCKING_QUERY 0 #define FSETLOCKING_INTERNAL 1 #define FSETLOCKING_BYCALLER 2 __BEGIN_DECLS size_t __fbufsize(FILE*); int __freading(FILE*); int __fwriting(FILE*); int __freadable(FILE*); int __fwritable(FILE*); int __flbf(FILE*); void __fpurge(FILE*); size_t __fpending(FILE*); void _flushlbf(void); int __fsetlocking(FILE*, int); __END_DECLS #endif /* _STDIO_EXT_H */ ================================================ FILE: atlas-aapt/bionic/libc/include/stdlib.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _STDLIB_H #define _STDLIB_H #include #include #include #include #include __BEGIN_DECLS #define EXIT_FAILURE 1 #define EXIT_SUCCESS 0 extern __noreturn void abort(void); extern __noreturn void exit(int); extern __noreturn void _Exit(int); extern int atexit(void (*)(void)); #if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L int at_quick_exit(void (*)(void)); void quick_exit(int) __noreturn; #endif extern char* getenv(const char*); extern int putenv(char*); extern int setenv(const char*, const char*, int); extern int unsetenv(const char*); extern int clearenv(void); extern char* mkdtemp(char*); extern char* mktemp(char*) __attribute__((deprecated("mktemp is unsafe, use mkstemp or tmpfile instead"))); extern int mkostemp64(char*, int); extern int mkostemp(char*, int); extern int mkostemps64(char*, int, int); extern int mkostemps(char*, int, int); extern int mkstemp64(char*); extern int mkstemp(char*); extern int mkstemps64(char*, int); extern int mkstemps(char*, int); extern long strtol(const char *, char **, int); extern long long strtoll(const char *, char **, int); extern unsigned long strtoul(const char *, char **, int); extern unsigned long long strtoull(const char *, char **, int); extern int posix_memalign(void **memptr, size_t alignment, size_t size); extern double atof(const char*) __INTRODUCED_IN(21); extern double strtod(const char*, char**) __LIBC_ABI_PUBLIC__; extern float strtof(const char*, char**) __LIBC_ABI_PUBLIC__ __INTRODUCED_IN(21); extern long double strtold(const char*, char**) __LIBC_ABI_PUBLIC__; extern long double strtold_l(const char *, char **, locale_t) __LIBC_ABI_PUBLIC__; extern long long strtoll_l(const char *, char **, int, locale_t) __LIBC_ABI_PUBLIC__; extern unsigned long long strtoull_l(const char *, char **, int, locale_t) __LIBC_ABI_PUBLIC__; extern int atoi(const char*) __purefunc; extern long atol(const char*) __purefunc; extern long long atoll(const char*) __purefunc; extern int abs(int) __pure2 __INTRODUCED_IN(21); extern long labs(long) __pure2 __INTRODUCED_IN(21); extern long long llabs(long long) __pure2 __INTRODUCED_IN(21); extern char * realpath(const char *path, char *resolved); extern int system(const char *string); extern void * bsearch(const void *key, const void *base0, size_t nmemb, size_t size, int (*compar)(const void *, const void *)); extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *)); uint32_t arc4random(void); uint32_t arc4random_uniform(uint32_t); void arc4random_buf(void*, size_t); #define RAND_MAX 0x7fffffff int rand(void) __INTRODUCED_IN(21); int rand_r(unsigned int*); void srand(unsigned int) __INTRODUCED_IN(21); double drand48(void); double erand48(unsigned short[3]); long jrand48(unsigned short[3]); void lcong48(unsigned short[7]); long lrand48(void); long mrand48(void); long nrand48(unsigned short[3]); unsigned short* seed48(unsigned short[3]); void srand48(long); char* initstate(unsigned int, char*, size_t); long random(void) __INTRODUCED_IN(21); char* setstate(char*); void srandom(unsigned int) __INTRODUCED_IN(21); int getpt(void); int grantpt(int) __INTRODUCED_IN(21); int posix_openpt(int); char* ptsname(int); int ptsname_r(int, char*, size_t); int unlockpt(int); typedef struct { int quot; int rem; } div_t; extern div_t div(int, int) __pure2; typedef struct { long int quot; long int rem; } ldiv_t; extern ldiv_t ldiv(long, long) __pure2; typedef struct { long long int quot; long long int rem; } lldiv_t; extern lldiv_t lldiv(long long, long long) __pure2; /* BSD compatibility. */ extern const char* getprogname(void); extern void setprogname(const char*); /* make STLPort happy */ extern int mblen(const char *, size_t); extern size_t mbstowcs(wchar_t *, const char *, size_t); extern int mbtowc(wchar_t *, const char *, size_t); /* Likewise, make libstdc++-v3 happy. */ extern int wctomb(char *, wchar_t); extern size_t wcstombs(char *, const wchar_t *, size_t); extern size_t __ctype_get_mb_cur_max(void); #define MB_CUR_MAX __ctype_get_mb_cur_max() #if __ANDROID_API__ < 21 #include #endif #if defined(__BIONIC_FORTIFY) extern char* __realpath_real(const char*, char*) __RENAME(realpath); __errordecl(__realpath_size_error, "realpath output parameter must be NULL or a >= PATH_MAX bytes buffer"); #if !defined(__clang__) __BIONIC_FORTIFY_INLINE char* realpath(const char* path, char* resolved) { size_t bos = __bos(resolved); /* PATH_MAX is unavailable without polluting the namespace, but it's always 4096 on Linux */ if (bos != __BIONIC_FORTIFY_UNKNOWN_SIZE && bos < 4096) { __realpath_size_error(); } return __realpath_real(path, resolved); } #endif #endif /* defined(__BIONIC_FORTIFY) */ __END_DECLS #endif /* _STDLIB_H */ ================================================ FILE: atlas-aapt/bionic/libc/include/string.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _STRING_H #define _STRING_H #include #include #include __BEGIN_DECLS #if defined(__USE_BSD) #include #endif extern void* memccpy(void* __restrict, const void* __restrict, int, size_t); extern void* memchr(const void *, int, size_t) __purefunc; extern void* memrchr(const void *, int, size_t) __purefunc; extern int memcmp(const void *, const void *, size_t) __purefunc; extern void* memcpy(void* __restrict, const void* __restrict, size_t); #if defined(__USE_GNU) extern void* mempcpy(void* __restrict, const void* __restrict, size_t); #endif extern void* memmove(void *, const void *, size_t); extern void* memset(void *, int, size_t); extern void* memmem(const void *, size_t, const void *, size_t) __purefunc; extern char* strchr(const char *, int) __purefunc; extern char* __strchr_chk(const char *, int, size_t); #if defined(__USE_GNU) #if defined(__cplusplus) extern "C++" char* strchrnul(char*, int) __RENAME(strchrnul) __purefunc; extern "C++" const char* strchrnul(const char*, int) __RENAME(strchrnul) __purefunc; #else char* strchrnul(const char*, int) __purefunc; #endif #endif extern char* strrchr(const char *, int) __purefunc; extern char* __strrchr_chk(const char *, int, size_t); extern size_t strlen(const char *) __purefunc; extern size_t __strlen_chk(const char *, size_t); extern int strcmp(const char *, const char *) __purefunc; extern char* stpcpy(char* __restrict, const char* __restrict); extern char* strcpy(char* __restrict, const char* __restrict); extern char* strcat(char* __restrict, const char* __restrict); int strcasecmp(const char*, const char*) __purefunc; int strcasecmp_l(const char*, const char*, locale_t) __purefunc; int strncasecmp(const char*, const char*, size_t) __purefunc; int strncasecmp_l(const char*, const char*, size_t, locale_t) __purefunc; extern char* strdup(const char *); extern char* strstr(const char *, const char *) __purefunc; extern char* strcasestr(const char *haystack, const char *needle) __purefunc; extern char* strtok(char* __restrict, const char* __restrict); extern char* strtok_r(char* __restrict, const char* __restrict, char** __restrict); extern char* strerror(int); extern char* strerror_l(int, locale_t); #if defined(__USE_GNU) extern char* strerror_r(int, char*, size_t) __RENAME(__gnu_strerror_r); #else /* POSIX */ extern int strerror_r(int, char*, size_t); #endif extern size_t strnlen(const char *, size_t) __purefunc; extern char* strncat(char* __restrict, const char* __restrict, size_t); extern char* strndup(const char *, size_t); extern int strncmp(const char *, const char *, size_t) __purefunc; extern char* stpncpy(char* __restrict, const char* __restrict, size_t); extern char* strncpy(char* __restrict, const char* __restrict, size_t); extern size_t strlcat(char* __restrict, const char* __restrict, size_t); extern size_t strlcpy(char* __restrict, const char* __restrict, size_t); extern size_t strcspn(const char *, const char *) __purefunc; extern char* strpbrk(const char *, const char *) __purefunc; extern char* strsep(char** __restrict, const char* __restrict); extern size_t strspn(const char *, const char *); extern char* strsignal(int sig); extern int strcoll(const char *, const char *) __purefunc; extern size_t strxfrm(char* __restrict, const char* __restrict, size_t); extern int strcoll_l(const char *, const char *, locale_t) __purefunc; extern size_t strxfrm_l(char* __restrict, const char* __restrict, size_t, locale_t); #if defined(__USE_GNU) && !defined(basename) /* * glibc has a basename in that's different to the POSIX one in . * It doesn't modify its argument, and in C++ it's const-correct. */ #if defined(__cplusplus) extern "C++" char* basename(char*) __RENAME(__gnu_basename) __nonnull((1)); extern "C++" const char* basename(const char*) __RENAME(__gnu_basename) __nonnull((1)); #else extern char* basename(const char*) __RENAME(__gnu_basename) __nonnull((1)); #endif #endif extern void* __memchr_chk(const void*, int, size_t, size_t); __errordecl(__memchr_buf_size_error, "memchr called with size bigger than buffer"); extern void* __memrchr_chk(const void*, int, size_t, size_t); __errordecl(__memrchr_buf_size_error, "memrchr called with size bigger than buffer"); extern void* __memrchr_real(const void*, int, size_t) __RENAME(memrchr); extern char* __stpncpy_chk2(char* __restrict, const char* __restrict, size_t, size_t, size_t); extern char* __strncpy_chk2(char* __restrict, const char* __restrict, size_t, size_t, size_t); extern size_t __strlcpy_real(char* __restrict, const char* __restrict, size_t) __RENAME(strlcpy); extern size_t __strlcpy_chk(char *, const char *, size_t, size_t); extern size_t __strlcat_real(char* __restrict, const char* __restrict, size_t) __RENAME(strlcat); extern size_t __strlcat_chk(char* __restrict, const char* __restrict, size_t, size_t); #if defined(__BIONIC_FORTIFY) __BIONIC_FORTIFY_INLINE void* memchr(const void *s, int c, size_t n) { size_t bos = __bos(s); #if !defined(__clang__) if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) { return __builtin_memchr(s, c, n); } if (__builtin_constant_p(n) && (n > bos)) { __memchr_buf_size_error(); } if (__builtin_constant_p(n) && (n <= bos)) { return __builtin_memchr(s, c, n); } #endif return __memchr_chk(s, c, n, bos); } __BIONIC_FORTIFY_INLINE void* memrchr(const void *s, int c, size_t n) { size_t bos = __bos(s); #if !defined(__clang__) if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) { return __memrchr_real(s, c, n); } if (__builtin_constant_p(n) && (n > bos)) { __memrchr_buf_size_error(); } if (__builtin_constant_p(n) && (n <= bos)) { return __memrchr_real(s, c, n); } #endif return __memrchr_chk(s, c, n, bos); } __BIONIC_FORTIFY_INLINE void* memcpy(void* __restrict dest, const void* __restrict src, size_t copy_amount) { return __builtin___memcpy_chk(dest, src, copy_amount, __bos0(dest)); } __BIONIC_FORTIFY_INLINE void* memmove(void *dest, const void *src, size_t len) { return __builtin___memmove_chk(dest, src, len, __bos0(dest)); } __BIONIC_FORTIFY_INLINE char* stpcpy(char* __restrict dest, const char* __restrict src) { return __builtin___stpcpy_chk(dest, src, __bos(dest)); } __BIONIC_FORTIFY_INLINE char* strcpy(char* __restrict dest, const char* __restrict src) { return __builtin___strcpy_chk(dest, src, __bos(dest)); } __BIONIC_FORTIFY_INLINE char* stpncpy(char* __restrict dest, const char* __restrict src, size_t n) { size_t bos_dest = __bos(dest); size_t bos_src = __bos(src); if (bos_src == __BIONIC_FORTIFY_UNKNOWN_SIZE) { return __builtin___stpncpy_chk(dest, src, n, bos_dest); } if (__builtin_constant_p(n) && (n <= bos_src)) { return __builtin___stpncpy_chk(dest, src, n, bos_dest); } size_t slen = __builtin_strlen(src); if (__builtin_constant_p(slen)) { return __builtin___stpncpy_chk(dest, src, n, bos_dest); } return __stpncpy_chk2(dest, src, n, bos_dest, bos_src); } __BIONIC_FORTIFY_INLINE char* strncpy(char* __restrict dest, const char* __restrict src, size_t n) { size_t bos_dest = __bos(dest); size_t bos_src = __bos(src); if (bos_src == __BIONIC_FORTIFY_UNKNOWN_SIZE) { return __builtin___strncpy_chk(dest, src, n, bos_dest); } if (__builtin_constant_p(n) && (n <= bos_src)) { return __builtin___strncpy_chk(dest, src, n, bos_dest); } size_t slen = __builtin_strlen(src); if (__builtin_constant_p(slen)) { return __builtin___strncpy_chk(dest, src, n, bos_dest); } return __strncpy_chk2(dest, src, n, bos_dest, bos_src); } __BIONIC_FORTIFY_INLINE char* strcat(char* __restrict dest, const char* __restrict src) { return __builtin___strcat_chk(dest, src, __bos(dest)); } __BIONIC_FORTIFY_INLINE char *strncat(char* __restrict dest, const char* __restrict src, size_t n) { return __builtin___strncat_chk(dest, src, n, __bos(dest)); } __BIONIC_FORTIFY_INLINE void* memset(void *s, int c, size_t n) { return __builtin___memset_chk(s, c, n, __bos0(s)); } __BIONIC_FORTIFY_INLINE size_t strlcpy(char* __restrict dest, const char* __restrict src, size_t size) { size_t bos = __bos(dest); #if !defined(__clang__) // Compiler doesn't know destination size. Don't call __strlcpy_chk if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) { return __strlcpy_real(dest, src, size); } // Compiler can prove, at compile time, that the passed in size // is always <= the actual object size. Don't call __strlcpy_chk if (__builtin_constant_p(size) && (size <= bos)) { return __strlcpy_real(dest, src, size); } #endif /* !defined(__clang__) */ return __strlcpy_chk(dest, src, size, bos); } __BIONIC_FORTIFY_INLINE size_t strlcat(char* __restrict dest, const char* __restrict src, size_t size) { size_t bos = __bos(dest); #if !defined(__clang__) // Compiler doesn't know destination size. Don't call __strlcat_chk if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) { return __strlcat_real(dest, src, size); } // Compiler can prove, at compile time, that the passed in size // is always <= the actual object size. Don't call __strlcat_chk if (__builtin_constant_p(size) && (size <= bos)) { return __strlcat_real(dest, src, size); } #endif /* !defined(__clang__) */ return __strlcat_chk(dest, src, size, bos); } __BIONIC_FORTIFY_INLINE size_t strlen(const char *s) { size_t bos = __bos(s); #if !defined(__clang__) // Compiler doesn't know destination size. Don't call __strlen_chk if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) { return __builtin_strlen(s); } size_t slen = __builtin_strlen(s); if (__builtin_constant_p(slen)) { return slen; } #endif /* !defined(__clang__) */ return __strlen_chk(s, bos); } __BIONIC_FORTIFY_INLINE char* strchr(const char *s, int c) { size_t bos = __bos(s); #if !defined(__clang__) // Compiler doesn't know destination size. Don't call __strchr_chk if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) { return __builtin_strchr(s, c); } size_t slen = __builtin_strlen(s); if (__builtin_constant_p(slen) && (slen < bos)) { return __builtin_strchr(s, c); } #endif /* !defined(__clang__) */ return __strchr_chk(s, c, bos); } __BIONIC_FORTIFY_INLINE char* strrchr(const char *s, int c) { size_t bos = __bos(s); #if !defined(__clang__) // Compiler doesn't know destination size. Don't call __strrchr_chk if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) { return __builtin_strrchr(s, c); } size_t slen = __builtin_strlen(s); if (__builtin_constant_p(slen) && (slen < bos)) { return __builtin_strrchr(s, c); } #endif /* !defined(__clang__) */ return __strrchr_chk(s, c, bos); } #endif /* defined(__BIONIC_FORTIFY) */ __END_DECLS #endif /* _STRING_H */ ================================================ FILE: atlas-aapt/bionic/libc/include/strings.h ================================================ /* $NetBSD: strings.h,v 1.10 2005/02/03 04:39:32 perry Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Klaus Klein. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the NetBSD * Foundation, Inc. and its contributors. * 4. Neither the name of The NetBSD Foundation nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef _STRINGS_H_ #define _STRINGS_H_ #include #include #include __BEGIN_DECLS #if defined(__BIONIC_FORTIFY) #define bcopy(b1, b2, len) (void)(__builtin___memmove_chk((b2), (b1), (len), __bos0(b2))) #define bzero(b, len) (void)(__builtin___memset_chk((b), '\0', (len), __bos0(b))) #else #define bcopy(b1, b2, len) (void)(__builtin_memmove((b2), (b1), (len))) #define bzero(b, len) (void)(__builtin_memset((b), '\0', (len))) #endif int ffs(int); int strcasecmp(const char*, const char*) __purefunc; int strcasecmp_l(const char*, const char*, locale_t) __purefunc; int strncasecmp(const char*, const char*, size_t) __purefunc; int strncasecmp_l(const char*, const char*, size_t, locale_t) __purefunc; __END_DECLS #endif /* !defined(_STRINGS_H_) */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/_errdefs.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /* the following corresponds to the error codes of the Linux kernel used by the Android platform * these are distinct from the OpenBSD ones, which is why we need to redeclare them here * * this file may be included several times to define either error constants or their * string representation */ #ifndef __BIONIC_ERRDEF #error "__BIONIC_ERRDEF must be defined before including this file" #endif __BIONIC_ERRDEF( 0 , 0, "Success" ) __BIONIC_ERRDEF( EPERM , 1, "Operation not permitted" ) __BIONIC_ERRDEF( ENOENT , 2, "No such file or directory" ) __BIONIC_ERRDEF( ESRCH , 3, "No such process" ) __BIONIC_ERRDEF( EINTR , 4, "Interrupted system call" ) __BIONIC_ERRDEF( EIO , 5, "I/O error" ) __BIONIC_ERRDEF( ENXIO , 6, "No such device or address" ) __BIONIC_ERRDEF( E2BIG , 7, "Argument list too long" ) __BIONIC_ERRDEF( ENOEXEC , 8, "Exec format error" ) __BIONIC_ERRDEF( EBADF , 9, "Bad file descriptor" ) __BIONIC_ERRDEF( ECHILD , 10, "No child processes" ) __BIONIC_ERRDEF( EAGAIN , 11, "Try again" ) __BIONIC_ERRDEF( ENOMEM , 12, "Out of memory" ) __BIONIC_ERRDEF( EACCES , 13, "Permission denied" ) __BIONIC_ERRDEF( EFAULT , 14, "Bad address" ) __BIONIC_ERRDEF( ENOTBLK , 15, "Block device required" ) __BIONIC_ERRDEF( EBUSY , 16, "Device or resource busy" ) __BIONIC_ERRDEF( EEXIST , 17, "File exists" ) __BIONIC_ERRDEF( EXDEV , 18, "Cross-device link" ) __BIONIC_ERRDEF( ENODEV , 19, "No such device" ) __BIONIC_ERRDEF( ENOTDIR , 20, "Not a directory" ) __BIONIC_ERRDEF( EISDIR , 21, "Is a directory" ) __BIONIC_ERRDEF( EINVAL , 22, "Invalid argument" ) __BIONIC_ERRDEF( ENFILE , 23, "File table overflow" ) __BIONIC_ERRDEF( EMFILE , 24, "Too many open files" ) __BIONIC_ERRDEF( ENOTTY , 25, "Not a typewriter" ) __BIONIC_ERRDEF( ETXTBSY , 26, "Text file busy" ) __BIONIC_ERRDEF( EFBIG , 27, "File too large" ) __BIONIC_ERRDEF( ENOSPC , 28, "No space left on device" ) __BIONIC_ERRDEF( ESPIPE , 29, "Illegal seek" ) __BIONIC_ERRDEF( EROFS , 30, "Read-only file system" ) __BIONIC_ERRDEF( EMLINK , 31, "Too many links" ) __BIONIC_ERRDEF( EPIPE , 32, "Broken pipe" ) __BIONIC_ERRDEF( EDOM , 33, "Math argument out of domain of func" ) __BIONIC_ERRDEF( ERANGE , 34, "Math result not representable" ) __BIONIC_ERRDEF( EDEADLK , 35, "Resource deadlock would occur" ) __BIONIC_ERRDEF( ENAMETOOLONG , 36, "File name too long" ) __BIONIC_ERRDEF( ENOLCK , 37, "No record locks available" ) __BIONIC_ERRDEF( ENOSYS , 38, "Function not implemented" ) __BIONIC_ERRDEF( ENOTEMPTY , 39, "Directory not empty" ) __BIONIC_ERRDEF( ELOOP , 40, "Too many symbolic links encountered" ) __BIONIC_ERRDEF( ENOMSG , 42, "No message of desired type" ) __BIONIC_ERRDEF( EIDRM , 43, "Identifier removed" ) __BIONIC_ERRDEF( ECHRNG , 44, "Channel number out of range" ) __BIONIC_ERRDEF( EL2NSYNC , 45, "Level 2 not synchronized" ) __BIONIC_ERRDEF( EL3HLT , 46, "Level 3 halted" ) __BIONIC_ERRDEF( EL3RST , 47, "Level 3 reset" ) __BIONIC_ERRDEF( ELNRNG , 48, "Link number out of range" ) __BIONIC_ERRDEF( EUNATCH , 49, "Protocol driver not attached" ) __BIONIC_ERRDEF( ENOCSI , 50, "No CSI structure available" ) __BIONIC_ERRDEF( EL2HLT , 51, "Level 2 halted" ) __BIONIC_ERRDEF( EBADE , 52, "Invalid exchange" ) __BIONIC_ERRDEF( EBADR , 53, "Invalid request descriptor" ) __BIONIC_ERRDEF( EXFULL , 54, "Exchange full" ) __BIONIC_ERRDEF( ENOANO , 55, "No anode" ) __BIONIC_ERRDEF( EBADRQC , 56, "Invalid request code" ) __BIONIC_ERRDEF( EBADSLT , 57, "Invalid slot" ) __BIONIC_ERRDEF( EBFONT , 59, "Bad font file format" ) __BIONIC_ERRDEF( ENOSTR , 60, "Device not a stream" ) __BIONIC_ERRDEF( ENODATA , 61, "No data available" ) __BIONIC_ERRDEF( ETIME , 62, "Timer expired" ) __BIONIC_ERRDEF( ENOSR , 63, "Out of streams resources" ) __BIONIC_ERRDEF( ENONET , 64, "Machine is not on the network" ) __BIONIC_ERRDEF( ENOPKG , 65, "Package not installed" ) __BIONIC_ERRDEF( EREMOTE , 66, "Object is remote" ) __BIONIC_ERRDEF( ENOLINK , 67, "Link has been severed" ) __BIONIC_ERRDEF( EADV , 68, "Advertise error" ) __BIONIC_ERRDEF( ESRMNT , 69, "Srmount error" ) __BIONIC_ERRDEF( ECOMM , 70, "Communication error on send" ) __BIONIC_ERRDEF( EPROTO , 71, "Protocol error" ) __BIONIC_ERRDEF( EMULTIHOP , 72, "Multihop attempted" ) __BIONIC_ERRDEF( EDOTDOT , 73, "RFS specific error" ) __BIONIC_ERRDEF( EBADMSG , 74, "Not a data message" ) __BIONIC_ERRDEF( EOVERFLOW , 75, "Value too large for defined data type" ) __BIONIC_ERRDEF( ENOTUNIQ , 76, "Name not unique on network" ) __BIONIC_ERRDEF( EBADFD , 77, "File descriptor in bad state" ) __BIONIC_ERRDEF( EREMCHG , 78, "Remote address changed" ) __BIONIC_ERRDEF( ELIBACC , 79, "Can not access a needed shared library" ) __BIONIC_ERRDEF( ELIBBAD , 80, "Accessing a corrupted shared library" ) __BIONIC_ERRDEF( ELIBSCN , 81, ".lib section in a.out corrupted" ) __BIONIC_ERRDEF( ELIBMAX , 82, "Attempting to link in too many shared libraries" ) __BIONIC_ERRDEF( ELIBEXEC , 83, "Cannot exec a shared library directly" ) __BIONIC_ERRDEF( EILSEQ , 84, "Illegal byte sequence" ) __BIONIC_ERRDEF( ERESTART , 85, "Interrupted system call should be restarted" ) __BIONIC_ERRDEF( ESTRPIPE , 86, "Streams pipe error" ) __BIONIC_ERRDEF( EUSERS , 87, "Too many users" ) __BIONIC_ERRDEF( ENOTSOCK , 88, "Socket operation on non-socket" ) __BIONIC_ERRDEF( EDESTADDRREQ , 89, "Destination address required" ) __BIONIC_ERRDEF( EMSGSIZE , 90, "Message too long" ) __BIONIC_ERRDEF( EPROTOTYPE , 91, "Protocol wrong type for socket" ) __BIONIC_ERRDEF( ENOPROTOOPT , 92, "Protocol not available" ) __BIONIC_ERRDEF( EPROTONOSUPPORT, 93, "Protocol not supported" ) __BIONIC_ERRDEF( ESOCKTNOSUPPORT, 94, "Socket type not supported" ) __BIONIC_ERRDEF( EOPNOTSUPP , 95, "Operation not supported on transport endpoint" ) __BIONIC_ERRDEF( EPFNOSUPPORT , 96, "Protocol family not supported" ) __BIONIC_ERRDEF( EAFNOSUPPORT , 97, "Address family not supported by protocol" ) __BIONIC_ERRDEF( EADDRINUSE , 98, "Address already in use" ) __BIONIC_ERRDEF( EADDRNOTAVAIL , 99, "Cannot assign requested address" ) __BIONIC_ERRDEF( ENETDOWN , 100, "Network is down" ) __BIONIC_ERRDEF( ENETUNREACH , 101, "Network is unreachable" ) __BIONIC_ERRDEF( ENETRESET , 102, "Network dropped connection because of reset" ) __BIONIC_ERRDEF( ECONNABORTED , 103, "Software caused connection abort" ) __BIONIC_ERRDEF( ECONNRESET , 104, "Connection reset by peer" ) __BIONIC_ERRDEF( ENOBUFS , 105, "No buffer space available" ) __BIONIC_ERRDEF( EISCONN , 106, "Transport endpoint is already connected" ) __BIONIC_ERRDEF( ENOTCONN , 107, "Transport endpoint is not connected" ) __BIONIC_ERRDEF( ESHUTDOWN , 108, "Cannot send after transport endpoint shutdown" ) __BIONIC_ERRDEF( ETOOMANYREFS , 109, "Too many references: cannot splice" ) __BIONIC_ERRDEF( ETIMEDOUT , 110, "Connection timed out" ) __BIONIC_ERRDEF( ECONNREFUSED , 111, "Connection refused" ) __BIONIC_ERRDEF( EHOSTDOWN , 112, "Host is down" ) __BIONIC_ERRDEF( EHOSTUNREACH , 113, "No route to host" ) __BIONIC_ERRDEF( EALREADY , 114, "Operation already in progress" ) __BIONIC_ERRDEF( EINPROGRESS , 115, "Operation now in progress" ) __BIONIC_ERRDEF( ESTALE , 116, "Stale NFS file handle" ) __BIONIC_ERRDEF( EUCLEAN , 117, "Structure needs cleaning" ) __BIONIC_ERRDEF( ENOTNAM , 118, "Not a XENIX named type file" ) __BIONIC_ERRDEF( ENAVAIL , 119, "No XENIX semaphores available" ) __BIONIC_ERRDEF( EISNAM , 120, "Is a named type file" ) __BIONIC_ERRDEF( EREMOTEIO , 121, "Remote I/O error" ) __BIONIC_ERRDEF( EDQUOT , 122, "Quota exceeded" ) __BIONIC_ERRDEF( ENOMEDIUM , 123, "No medium found" ) __BIONIC_ERRDEF( EMEDIUMTYPE , 124, "Wrong medium type" ) __BIONIC_ERRDEF( ECANCELED , 125, "Operation Canceled" ) __BIONIC_ERRDEF( ENOKEY , 126, "Required key not available" ) __BIONIC_ERRDEF( EKEYEXPIRED , 127, "Key has expired" ) __BIONIC_ERRDEF( EKEYREVOKED , 128, "Key has been revoked" ) __BIONIC_ERRDEF( EKEYREJECTED , 129, "Key was rejected by service" ) __BIONIC_ERRDEF( EOWNERDEAD , 130, "Owner died" ) __BIONIC_ERRDEF( ENOTRECOVERABLE, 131, "State not recoverable" ) #undef __BIONIC_ERRDEF ================================================ FILE: atlas-aapt/bionic/libc/include/sys/_sigdefs.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /* * this header is used to define signal constants and names; * it might be included several times */ #ifndef __BIONIC_SIGDEF #error __BIONIC_SIGDEF not defined #endif __BIONIC_SIGDEF(SIGHUP, "Hangup") __BIONIC_SIGDEF(SIGINT, "Interrupt") __BIONIC_SIGDEF(SIGQUIT, "Quit") __BIONIC_SIGDEF(SIGILL, "Illegal instruction") __BIONIC_SIGDEF(SIGTRAP, "Trap") __BIONIC_SIGDEF(SIGABRT, "Aborted") #ifdef SIGEMT __BIONIC_SIGDEF(SIGEMT, "EMT") #endif __BIONIC_SIGDEF(SIGFPE, "Floating point exception") __BIONIC_SIGDEF(SIGKILL, "Killed") __BIONIC_SIGDEF(SIGBUS, "Bus error") __BIONIC_SIGDEF(SIGSEGV, "Segmentation fault") __BIONIC_SIGDEF(SIGPIPE, "Broken pipe") __BIONIC_SIGDEF(SIGALRM, "Alarm clock") __BIONIC_SIGDEF(SIGTERM, "Terminated") __BIONIC_SIGDEF(SIGUSR1, "User signal 1") __BIONIC_SIGDEF(SIGUSR2, "User signal 2") __BIONIC_SIGDEF(SIGCHLD, "Child exited") __BIONIC_SIGDEF(SIGPWR, "Power failure") __BIONIC_SIGDEF(SIGWINCH, "Window size changed") __BIONIC_SIGDEF(SIGURG, "Urgent I/O condition") __BIONIC_SIGDEF(SIGIO, "I/O possible") __BIONIC_SIGDEF(SIGSTOP, "Stopped (signal)") __BIONIC_SIGDEF(SIGTSTP, "Stopped") __BIONIC_SIGDEF(SIGCONT, "Continue") __BIONIC_SIGDEF(SIGTTIN, "Stopped (tty input)") __BIONIC_SIGDEF(SIGTTOU, "Stopped (tty output)") __BIONIC_SIGDEF(SIGVTALRM, "Virtual timer expired") __BIONIC_SIGDEF(SIGPROF, "Profiling timer expired") __BIONIC_SIGDEF(SIGXCPU, "CPU time limit exceeded") __BIONIC_SIGDEF(SIGXFSZ, "File size limit exceeded") #if defined(SIGSTKFLT) __BIONIC_SIGDEF(SIGSTKFLT, "Stack fault") #endif __BIONIC_SIGDEF(SIGSYS, "Bad system call") #undef __BIONIC_SIGDEF ================================================ FILE: atlas-aapt/bionic/libc/include/sys/_system_properties.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _INCLUDE_SYS__SYSTEM_PROPERTIES_H #define _INCLUDE_SYS__SYSTEM_PROPERTIES_H #ifndef _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_ #error you should #include instead #else #include typedef struct prop_msg prop_msg; #define PROP_AREA_MAGIC 0x504f5250 #define PROP_AREA_VERSION 0xfc6ed0ab #define PROP_AREA_VERSION_COMPAT 0x45434f76 #define PROP_SERVICE_NAME "property_service" #define PROP_FILENAME_MAX 1024 #define PROP_FILENAME "/dev/__properties__" #define PA_SIZE (128 * 1024) #define SERIAL_VALUE_LEN(serial) ((serial) >> 24) #define SERIAL_DIRTY(serial) ((serial) & 1) __BEGIN_DECLS struct prop_msg { unsigned cmd; char name[PROP_NAME_MAX]; char value[PROP_VALUE_MAX]; }; #define PROP_MSG_SETPROP 1 /* ** Rules: ** ** - there is only one writer, but many readers ** - prop_area.count will never decrease in value ** - once allocated, a prop_info's name will not change ** - once allocated, a prop_info's offset will not change ** - reading a value requires the following steps ** 1. serial = pi->serial ** 2. if SERIAL_DIRTY(serial), wait*, then goto 1 ** 3. memcpy(local, pi->value, SERIAL_VALUE_LEN(serial) + 1) ** 4. if pi->serial != serial, goto 2 ** ** - writing a value requires the following steps ** 1. pi->serial = pi->serial | 1 ** 2. memcpy(pi->value, local_value, value_len) ** 3. pi->serial = (value_len << 24) | ((pi->serial + 1) & 0xffffff) */ #define PROP_PATH_RAMDISK_DEFAULT "/default.prop" #define PROP_PATH_SYSTEM_BUILD "/system/build.prop" #define PROP_PATH_VENDOR_BUILD "/vendor/build.prop" #define PROP_PATH_LOCAL_OVERRIDE "/data/local.prop" #define PROP_PATH_FACTORY "/factory/factory.prop" /* ** Map the property area from the specified filename. This ** method is for testing only. */ int __system_property_set_filename(const char *filename); /* ** Initialize the area to be used to store properties. Can ** only be done by a single process that has write access to ** the property area. */ int __system_property_area_init(); /* Read the global serial number of the system properties ** ** Called to predict if a series of cached __system_property_find ** objects will have seen __system_property_serial values change. ** But also aids the converse, as changes in the global serial can ** also be used to predict if a failed __system_property_find ** could in-turn now find a new object; thus preventing the ** cycles of effort to poll __system_property_find. ** ** Typically called at beginning of a cache cycle to signal if _any_ possible ** changes have occurred since last. If there is, one may check each individual ** __system_property_serial to confirm dirty, or __system_property_find ** to check if the property now exists. If a call to __system_property_add ** or __system_property_update has completed between two calls to ** __system_property_area_serial then the second call will return a larger ** value than the first call. Beware of race conditions as changes to the ** properties are not atomic, the main value of this call is to determine ** whether the expensive __system_property_find is worth retrying to see if ** a property now exists. ** ** Returns the serial number on success, -1 on error. */ unsigned int __system_property_area_serial(); /* Add a new system property. Can only be done by a single ** process that has write access to the property area, and ** that process must handle sequencing to ensure the property ** does not already exist and that only one property is added ** or updated at a time. ** ** Returns 0 on success, -1 if the property area is full. */ int __system_property_add(const char *name, unsigned int namelen, const char *value, unsigned int valuelen); /* Update the value of a system property returned by ** __system_property_find. Can only be done by a single process ** that has write access to the property area, and that process ** must handle sequencing to ensure that only one property is ** updated at a time. ** ** Returns 0 on success, -1 if the parameters are incorrect. */ int __system_property_update(prop_info *pi, const char *value, unsigned int len); /* Read the serial number of a system property returned by ** __system_property_find. ** ** Returns the serial number on success, -1 on error. */ unsigned int __system_property_serial(const prop_info *pi); /* Wait for any system property to be updated. Caller must pass ** in 0 the first time, and the previous return value on each ** successive call. */ unsigned int __system_property_wait_any(unsigned int serial); /* Compatibility functions to support using an old init with a new libc, ** mostly for the OTA updater binary. These can be deleted once OTAs from ** a pre-K release no longer needed to be supported. */ const prop_info *__system_property_find_compat(const char *name); int __system_property_read_compat(const prop_info *pi, char *name, char *value); int __system_property_foreach_compat( void (*propfn)(const prop_info *pi, void *cookie), void *cookie); /* Initialize the system properties area in read only mode. * Should be done by all processes that need to read system * properties. * * Returns 0 on success, -1 otherwise. */ int __system_properties_init(); __END_DECLS #endif #endif ================================================ FILE: atlas-aapt/bionic/libc/include/sys/atomics.h ================================================ /* * Copyright (C) 2015 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_ATOMICS_H_ #define _SYS_ATOMICS_H_ /* * These got proper out of line definitions in L. Putting the inline definitions * back for old targets brings us closer to being able to use one set of headers * for all API levels. * * The other inlines we put back went in to their appropriate headers, but the * sys/atomics.h header was removed, so we'll just add these somewhere we can be * sure they will be included. */ #if __ANDROID_API__ < 21 #include #endif #endif /* _SYS_ATOMICS_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/auxv.h ================================================ /* * Copyright (C) 2013 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_AUXV_H_ #define _SYS_AUXV_H_ #include #include __BEGIN_DECLS unsigned long int getauxval(unsigned long int type); __END_DECLS #endif /* _SYS_AUXV_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/cachectl.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_CACHECTL_H #define _SYS_CACHECTL_H 1 #ifdef __mips__ #include extern int __cachectl (void *addr, __const int nbytes, __const int op); #endif #endif /* sys/cachectl.h */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/capability.h ================================================ /* * Copyright (C) 2013 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _BIONIC_SYS_CAPABILITY_H #define _BIONIC_SYS_CAPABILITY_H #include #include __BEGIN_DECLS extern int capget(cap_user_header_t hdrp, cap_user_data_t datap); extern int capset(cap_user_header_t hdrp, const cap_user_data_t datap); __END_DECLS #endif /* _BIONIC_SYS_CAPABILITY_H */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/cdefs.h ================================================ /* $NetBSD: cdefs.h,v 1.58 2004/12/11 05:59:00 christos Exp $ */ /* * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Berkeley Software Design, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)cdefs.h 8.8 (Berkeley) 1/9/95 */ #ifndef _SYS_CDEFS_H_ #define _SYS_CDEFS_H_ /* * Testing against Clang-specific extensions. */ #ifndef __has_extension #define __has_extension __has_feature #endif #ifndef __has_feature #define __has_feature(x) 0 #endif #ifndef __has_include #define __has_include(x) 0 #endif #ifndef __has_builtin #define __has_builtin(x) 0 #endif #ifndef __has_attribute #define __has_attribute(x) 0 #endif /* * Macro to test if we're using a GNU C compiler of a specific vintage * or later, for e.g. features that appeared in a particular version * of GNU C. Usage: * * #if __GNUC_PREREQ(major, minor) * ...cool feature... * #else * ...delete feature... * #endif */ #ifdef __GNUC__ #define __GNUC_PREREQ(x, y) \ ((__GNUC__ == (x) && __GNUC_MINOR__ >= (y)) || \ (__GNUC__ > (x))) #else #define __GNUC_PREREQ(x, y) 0 #endif #define __strong_alias(alias, sym) \ __asm__(".global " #alias "\n" \ #alias " = " #sym); #if defined(__cplusplus) #define __BEGIN_DECLS extern "C" { #define __END_DECLS } #define __static_cast(x,y) static_cast(y) #else #define __BEGIN_DECLS #define __END_DECLS #define __static_cast(x,y) (x)y #endif /* * The __CONCAT macro is used to concatenate parts of symbol names, e.g. * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. * The __CONCAT macro is a bit tricky -- make sure you don't put spaces * in between its arguments. __CONCAT can also concatenate double-quoted * strings produced by the __STRING macro, but this only works with ANSI C. */ #define ___STRING(x) __STRING(x) #define ___CONCAT(x,y) __CONCAT(x,y) #if defined(__STDC__) || defined(__cplusplus) #define __P(protos) protos /* full-blown ANSI C */ #define __CONCAT(x,y) x ## y #define __STRING(x) #x #define __const const /* define reserved names to standard */ #define __signed signed #define __volatile volatile #if defined(__cplusplus) #define __inline inline /* convert to C++ keyword */ #else #if !defined(__GNUC__) && !defined(__lint__) #define __inline /* delete GCC keyword */ #endif /* !__GNUC__ && !__lint__ */ #endif /* !__cplusplus */ #else /* !(__STDC__ || __cplusplus) */ #define __P(protos) () /* traditional C preprocessor */ #define __CONCAT(x,y) x/**/y #define __STRING(x) "x" #ifndef __GNUC__ #define __const /* delete pseudo-ANSI C keywords */ #define __inline #define __signed #define __volatile #endif /* !__GNUC__ */ #endif /* !(__STDC__ || __cplusplus) */ /* * The following macro is used to remove const cast-away warnings * from gcc -Wcast-qual; it should be used with caution because it * can hide valid errors; in particular most valid uses are in * situations where the API requires it, not to cast away string * constants. We don't use *intptr_t on purpose here and we are * explicit about unsigned long so that we don't have additional * dependencies. */ #define __UNCONST(a) ((void *)(unsigned long)(const void *)(a)) #define __dead __attribute__((__noreturn__)) #define __pure __attribute__((__const__)) #define __pure2 __attribute__((__const__)) /* Android-added: used by FreeBSD libm */ #define __unused __attribute__((__unused__)) #define __used __attribute__((__used__)) #define __packed __attribute__((__packed__)) #define __aligned(x) __attribute__((__aligned__(x))) #define __section(x) __attribute__((__section__(x))) #define __statement(x) __extension__(x) #define __nonnull(args) __attribute__((__nonnull__ args)) #define __printflike(x, y) __attribute__((__format__(printf, x, y))) __nonnull((x)) #define __scanflike(x, y) __attribute__((__format__(scanf, x, y))) __nonnull((x)) /* * C99 defines the restrict type qualifier keyword. */ #if defined(__STDC__VERSION__) && __STDC_VERSION__ >= 199901L #define __restrict restrict #endif /* * C99 defines __func__ predefined identifier. */ #if !defined(__STDC_VERSION__) || !(__STDC_VERSION__ >= 199901L) #define __func__ __PRETTY_FUNCTION__ #endif /* !(__STDC_VERSION__ >= 199901L) */ /* * GNU C version 2.96 adds explicit branch prediction so that * the CPU back-end can hint the processor and also so that * code blocks can be reordered such that the predicted path * sees a more linear flow, thus improving cache behavior, etc. * * The following two macros provide us with a way to use this * compiler feature. Use __predict_true() if you expect the expression * to evaluate to true, and __predict_false() if you expect the * expression to evaluate to false. * * A few notes about usage: * * * Generally, __predict_false() error condition checks (unless * you have some _strong_ reason to do otherwise, in which case * document it), and/or __predict_true() `no-error' condition * checks, assuming you want to optimize for the no-error case. * * * Other than that, if you don't know the likelihood of a test * succeeding from empirical or other `hard' evidence, don't * make predictions. * * * These are meant to be used in places that are run `a lot'. * It is wasteful to make predictions in code that is run * seldomly (e.g. at subsystem initialization time) as the * basic block reordering that this affects can often generate * larger code. */ #define __predict_true(exp) __builtin_expect((exp) != 0, 1) #define __predict_false(exp) __builtin_expect((exp) != 0, 0) #define __noreturn __attribute__((__noreturn__)) #define __mallocfunc __attribute__((malloc)) #define __purefunc __attribute__((pure)) #define __always_inline __attribute__((__always_inline__)) #define __wur __attribute__((__warn_unused_result__)) #define __errorattr(msg) __attribute__((__error__(msg))) #define __warnattr(msg) __attribute__((__warning__(msg))) #define __errordecl(name, msg) extern void name(void) __errorattr(msg) /* * Some BSD source needs these macros. * Originally they embedded the rcs versions of each source file * in the generated binary. We strip strings during build anyway,. */ #define __IDSTRING(_prefix,_s) /* nothing */ #define __COPYRIGHT(_s) /* nothing */ #define __FBSDID(_s) /* nothing */ #define __RCSID(_s) /* nothing */ #define __SCCSID(_s) /* nothing */ /* * _BSD_SOURCE and _GNU_SOURCE are expected to be defined by callers before * any standard header file is included. In those header files we test * against __USE_BSD and __USE_GNU. glibc does this in but we * do it in instead because that's where our existing * _POSIX_C_SOURCE tests were, and we're already confident that * is included everywhere it should be. * * The _GNU_SOURCE test needs to come before any _BSD_SOURCE or _POSIX* tests * because _GNU_SOURCE implies everything else. */ #if defined(_GNU_SOURCE) # define __USE_GNU 1 # undef _POSIX_SOURCE # define _POSIX_SOURCE 1 # undef _POSIX_C_SOURCE # define _POSIX_C_SOURCE 200809L # undef _BSD_SOURCE # define _BSD_SOURCE 1 #endif #if defined(_BSD_SOURCE) # define __USE_BSD 1 #endif /* * _FILE_OFFSET_BITS 64 support. */ #if !defined(__LP64__) && defined(_FILE_OFFSET_BITS) #if _FILE_OFFSET_BITS == 64 #define __USE_FILE_OFFSET64 1 #endif #endif /*- * POSIX.1 requires that the macros we test be defined before any standard * header file is included. * * Here's a quick run-down of the versions: * defined(_POSIX_SOURCE) 1003.1-1988 * _POSIX_C_SOURCE == 1 1003.1-1990 * _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option * _POSIX_C_SOURCE == 199309 1003.1b-1993 * _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, * and the omnibus ISO/IEC 9945-1: 1996 * _POSIX_C_SOURCE == 200112 1003.1-2001 * _POSIX_C_SOURCE == 200809 1003.1-2008 * * In addition, the X/Open Portability Guide, which is now the Single UNIX * Specification, defines a feature-test macro which indicates the version of * that specification, and which subsumes _POSIX_C_SOURCE. * * Our macros begin with two underscores to avoid namespace screwage. */ /* Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. */ #if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 1 #undef _POSIX_C_SOURCE /* Probably illegal, but beyond caring now. */ #define _POSIX_C_SOURCE 199009 #endif /* Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. */ #if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 2 #undef _POSIX_C_SOURCE #define _POSIX_C_SOURCE 199209 #endif /* Deal with various X/Open Portability Guides and Single UNIX Spec. */ #ifdef _XOPEN_SOURCE #if _XOPEN_SOURCE - 0 >= 700 #define __XSI_VISIBLE 700 #undef _POSIX_C_SOURCE #define _POSIX_C_SOURCE 200809 #elif _XOPEN_SOURCE - 0 >= 600 #define __XSI_VISIBLE 600 #undef _POSIX_C_SOURCE #define _POSIX_C_SOURCE 200112 #elif _XOPEN_SOURCE - 0 >= 500 #define __XSI_VISIBLE 500 #undef _POSIX_C_SOURCE #define _POSIX_C_SOURCE 199506 #endif #endif /* * Deal with all versions of POSIX. The ordering relative to the tests above is * important. */ #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 198808 #endif #ifdef _POSIX_C_SOURCE #if _POSIX_C_SOURCE >= 200809 #define __POSIX_VISIBLE 200809 #define __ISO_C_VISIBLE 1999 #elif _POSIX_C_SOURCE >= 200112 #define __POSIX_VISIBLE 200112 #define __ISO_C_VISIBLE 1999 #elif _POSIX_C_SOURCE >= 199506 #define __POSIX_VISIBLE 199506 #define __ISO_C_VISIBLE 1990 #elif _POSIX_C_SOURCE >= 199309 #define __POSIX_VISIBLE 199309 #define __ISO_C_VISIBLE 1990 #elif _POSIX_C_SOURCE >= 199209 #define __POSIX_VISIBLE 199209 #define __ISO_C_VISIBLE 1990 #elif _POSIX_C_SOURCE >= 199009 #define __POSIX_VISIBLE 199009 #define __ISO_C_VISIBLE 1990 #else #define __POSIX_VISIBLE 198808 #define __ISO_C_VISIBLE 0 #endif /* _POSIX_C_SOURCE */ #else /*- * Deal with _ANSI_SOURCE: * If it is defined, and no other compilation environment is explicitly * requested, then define our internal feature-test macros to zero. This * makes no difference to the preprocessor (undefined symbols in preprocessing * expressions are defined to have value zero), but makes it more convenient for * a test program to print out the values. * * If a program mistakenly defines _ANSI_SOURCE and some other macro such as * _POSIX_C_SOURCE, we will assume that it wants the broader compilation * environment (and in fact we will never get here). */ #if defined(_ANSI_SOURCE) /* Hide almost everything. */ #define __POSIX_VISIBLE 0 #define __XSI_VISIBLE 0 #define __BSD_VISIBLE 0 #define __ISO_C_VISIBLE 1990 #elif defined(_C99_SOURCE) /* Localism to specify strict C99 env. */ #define __POSIX_VISIBLE 0 #define __XSI_VISIBLE 0 #define __BSD_VISIBLE 0 #define __ISO_C_VISIBLE 1999 #else /* Default environment: show everything. */ #define __POSIX_VISIBLE 200809 #define __XSI_VISIBLE 700 #define __BSD_VISIBLE 1 #define __ISO_C_VISIBLE 1999 #endif #endif /* * Default values. */ #ifndef __XPG_VISIBLE # define __XPG_VISIBLE 700 #endif #ifndef __POSIX_VISIBLE # define __POSIX_VISIBLE 200809 #endif #ifndef __ISO_C_VISIBLE # define __ISO_C_VISIBLE 1999 #endif #ifndef __BSD_VISIBLE # define __BSD_VISIBLE 1 #endif #define __BIONIC__ 1 #include /* glibc compatibility. */ #if __POSIX_VISIBLE >= 200809 #define __USE_ISOC99 1 #define __USE_XOPEN2K 1 #define __USE_XOPEN2K8 1 #endif #if __LP64__ #define __WORDSIZE 64 #else #define __WORDSIZE 32 #endif /* * When _FORTIFY_SOURCE is defined, automatic bounds checking is * added to commonly used libc functions. If a buffer overrun is * detected, the program is safely aborted. * * See * http://gcc.gnu.org/onlinedocs/gcc/Object-Size-Checking.html for details. */ #if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 && defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 # define __BIONIC_FORTIFY 1 # if _FORTIFY_SOURCE == 2 # define __bos(s) __builtin_object_size((s), 1) # else # define __bos(s) __builtin_object_size((s), 0) # endif # define __bos0(s) __builtin_object_size((s), 0) # define __BIONIC_FORTIFY_INLINE extern __inline__ __always_inline __attribute__((gnu_inline)) __attribute__((__artificial__)) #endif #define __BIONIC_FORTIFY_UNKNOWN_SIZE ((size_t) -1) /* Used to tag non-static symbols that are private and never exposed by the shared library. */ #define __LIBC_HIDDEN__ __attribute__((visibility("hidden"))) /* Like __LIBC_HIDDEN__, but preserves binary compatibility for LP32. */ #ifdef __LP64__ #define __LIBC32_LEGACY_PUBLIC__ __LIBC_HIDDEN__ #else #define __LIBC32_LEGACY_PUBLIC__ __LIBC_ABI_PUBLIC__ #endif /* Used to tag non-static symbols that are public and exposed by the shared library. */ #define __LIBC_ABI_PUBLIC__ __attribute__((visibility ("default"))) /* Used to rename functions so that the compiler emits a call to 'x' rather than the function this was applied to. */ #define __RENAME(x) __asm__(#x) #ifdef __clang__ #define __AVAILABILITY(...) __attribute__((availability(android,__VA_ARGS__))) #define __INTRODUCED_IN(api_level) __AVAILABILITY(introduced=api_level) #define __DEPRECATED_IN(api_level) __AVAILABILITY(deprecated=api_level) #define __REMOVED_IN(api_level) __AVAILABILITY(obsoleted=api_level) #else #define __AVAILABILITY(...) #define __INTRODUCED_IN(api_level) #define __DEPRECATED_IN(api_level) #define __REMOVED_IN(api_level) #endif // __clang__ #if __has_builtin(__builtin_umul_overflow) || __GNUC__ >= 5 #if __LP64__ #define __size_mul_overflow(a, b, result) __builtin_umull_overflow(a, b, result) #else #define __size_mul_overflow(a, b, result) __builtin_umul_overflow(a, b, result) #endif #else extern __inline__ __always_inline __attribute__((gnu_inline)) int __size_mul_overflow(__SIZE_TYPE__ a, __SIZE_TYPE__ b, __SIZE_TYPE__ *result) { *result = a * b; static const __SIZE_TYPE__ mul_no_overflow = 1UL << (sizeof(__SIZE_TYPE__) * 4); return (a >= mul_no_overflow || b >= mul_no_overflow) && a > 0 && (__SIZE_TYPE__)-1 / a < b; } #endif #endif /* !_SYS_CDEFS_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/endian.h ================================================ /*- * Copyright (c) 1997 Niklas Hallqvist. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _SYS_ENDIAN_H_ #define _SYS_ENDIAN_H_ #include #include #define _LITTLE_ENDIAN 1234 #define _BIG_ENDIAN 4321 #define _PDP_ENDIAN 3412 #define _BYTE_ORDER _LITTLE_ENDIAN #define __LITTLE_ENDIAN_BITFIELD #ifndef __LITTLE_ENDIAN #define __LITTLE_ENDIAN _LITTLE_ENDIAN #endif #ifndef __BIG_ENDIAN #define __BIG_ENDIAN _BIG_ENDIAN #endif #define __BYTE_ORDER _BYTE_ORDER #define __swap16 __builtin_bswap16 #define __swap32 __builtin_bswap32 #define __swap64 __builtin_bswap64 /* glibc compatibility. */ __BEGIN_DECLS uint32_t htonl(uint32_t) __pure2; uint16_t htons(uint16_t) __pure2; uint32_t ntohl(uint32_t) __pure2; uint16_t ntohs(uint16_t) __pure2; __END_DECLS #define htonl(x) __swap32(x) #define htons(x) __swap16(x) #define ntohl(x) __swap32(x) #define ntohs(x) __swap16(x) /* Bionic additions */ #define htonq(x) __swap64(x) #define ntohq(x) __swap64(x) #if __BSD_VISIBLE #define LITTLE_ENDIAN _LITTLE_ENDIAN #define BIG_ENDIAN _BIG_ENDIAN #define PDP_ENDIAN _PDP_ENDIAN #define BYTE_ORDER _BYTE_ORDER #define NTOHL(x) (x) = ntohl((u_int32_t)(x)) #define NTOHS(x) (x) = ntohs((u_int16_t)(x)) #define HTONL(x) (x) = htonl((u_int32_t)(x)) #define HTONS(x) (x) = htons((u_int16_t)(x)) #define htobe16 __swap16 #define htobe32 __swap32 #define htobe64 __swap64 #define betoh16 __swap16 #define betoh32 __swap32 #define betoh64 __swap64 #define htole16(x) (x) #define htole32(x) (x) #define htole64(x) (x) #define letoh16(x) (x) #define letoh32(x) (x) #define letoh64(x) (x) /* * glibc-compatible beXXtoh/leXXtoh synonyms for htobeXX/htoleXX. * The BSDs export both sets of names, bionic historically only * exported the ones above (or on the rhs here), and glibc only * exports these names (on the lhs). */ #define be16toh(x) htobe16(x) #define be32toh(x) htobe32(x) #define be64toh(x) htobe64(x) #define le16toh(x) htole16(x) #define le32toh(x) htole32(x) #define le64toh(x) htole64(x) #endif /* __BSD_VISIBLE */ #endif /* _SYS_ENDIAN_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/epoll.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_EPOLL_H_ #define _SYS_EPOLL_H_ #include #include #include /* For O_CLOEXEC. */ #include /* For sigset_t. */ __BEGIN_DECLS #define EPOLLIN 0x00000001 #define EPOLLPRI 0x00000002 #define EPOLLOUT 0x00000004 #define EPOLLERR 0x00000008 #define EPOLLHUP 0x00000010 #define EPOLLRDNORM 0x00000040 #define EPOLLRDBAND 0x00000080 #define EPOLLWRNORM 0x00000100 #define EPOLLWRBAND 0x00000200 #define EPOLLMSG 0x00000400 #define EPOLLRDHUP 0x00002000 #define EPOLLWAKEUP 0x20000000 #define EPOLLONESHOT 0x40000000 #define EPOLLET 0x80000000 #define EPOLL_CTL_ADD 1 #define EPOLL_CTL_DEL 2 #define EPOLL_CTL_MOD 3 #define EPOLL_CLOEXEC O_CLOEXEC typedef union epoll_data { void* ptr; int fd; uint32_t u32; uint64_t u64; } epoll_data_t; struct epoll_event { uint32_t events; epoll_data_t data; } #ifdef __x86_64__ __packed #endif ; int epoll_create(int); int epoll_create1(int); int epoll_ctl(int, int, int, struct epoll_event*); int epoll_wait(int, struct epoll_event*, int, int); int epoll_pwait(int, struct epoll_event*, int, int, const sigset_t*); __END_DECLS #endif /* _SYS_EPOLL_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/errno.h ================================================ #include ================================================ FILE: atlas-aapt/bionic/libc/include/sys/eventfd.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_EVENTFD_H #define _SYS_EVENTFD_H #include #include __BEGIN_DECLS #define EFD_CLOEXEC O_CLOEXEC #define EFD_NONBLOCK O_NONBLOCK /* type of event counter */ typedef uint64_t eventfd_t; extern int eventfd(unsigned int initial_value, int flags); extern int eventfd_read(int fd, eventfd_t* value); extern int eventfd_write(int fd, eventfd_t value); __END_DECLS #endif /* _SYS_EVENTFD_H */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/fcntl.h ================================================ #include ================================================ FILE: atlas-aapt/bionic/libc/include/sys/file.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_FILE_H_ #define _SYS_FILE_H_ #include #include #include __BEGIN_DECLS int flock(int, int); __END_DECLS #endif /* _SYS_FILE_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/fsuid.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_FSUID_H_ #define _SYS_FSUID_H_ #include #include __BEGIN_DECLS extern int setfsuid(uid_t); extern int setfsgid(gid_t); __END_DECLS #endif /* _SYS_FSUID_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/glibc-syscalls.h ================================================ /* Generated by gensyscalls.py. Do not edit. */ #ifndef _BIONIC_GLIBC_SYSCALLS_H_ #define _BIONIC_GLIBC_SYSCALLS_H_ #if defined(__aarch64__) #define SYS_accept __NR_accept #define SYS_accept4 __NR_accept4 #define SYS_access __NR_access #define SYS_acct __NR_acct #define SYS_add_key __NR_add_key #define SYS_adjtimex __NR_adjtimex #define SYS_alarm __NR_alarm #define SYS_arch_specific_syscall __NR_arch_specific_syscall #define SYS_bdflush __NR_bdflush #define SYS_bind __NR_bind #define SYS_bpf __NR_bpf #define SYS_brk __NR_brk #define SYS_capget __NR_capget #define SYS_capset __NR_capset #define SYS_chdir __NR_chdir #define SYS_chmod __NR_chmod #define SYS_chown __NR_chown #define SYS_chroot __NR_chroot #define SYS_clock_adjtime __NR_clock_adjtime #define SYS_clock_getres __NR_clock_getres #define SYS_clock_gettime __NR_clock_gettime #define SYS_clock_nanosleep __NR_clock_nanosleep #define SYS_clock_settime __NR_clock_settime #define SYS_clone __NR_clone #define SYS_close __NR_close #define SYS_connect __NR_connect #define SYS_creat __NR_creat #define SYS_delete_module __NR_delete_module #define SYS_dup __NR_dup #define SYS_dup2 __NR_dup2 #define SYS_dup3 __NR_dup3 #define SYS_epoll_create __NR_epoll_create #define SYS_epoll_create1 __NR_epoll_create1 #define SYS_epoll_ctl __NR_epoll_ctl #define SYS_epoll_pwait __NR_epoll_pwait #define SYS_epoll_wait __NR_epoll_wait #define SYS_eventfd __NR_eventfd #define SYS_eventfd2 __NR_eventfd2 #define SYS_execve __NR_execve #define SYS_execveat __NR_execveat #define SYS_exit __NR_exit #define SYS_exit_group __NR_exit_group #define SYS_faccessat __NR_faccessat #define SYS_fadvise64 __NR_fadvise64 #define SYS_fadvise64_64 __NR_fadvise64_64 #define SYS_fallocate __NR_fallocate #define SYS_fanotify_init __NR_fanotify_init #define SYS_fanotify_mark __NR_fanotify_mark #define SYS_fchdir __NR_fchdir #define SYS_fchmod __NR_fchmod #define SYS_fchmodat __NR_fchmodat #define SYS_fchown __NR_fchown #define SYS_fchownat __NR_fchownat #define SYS_fcntl __NR_fcntl #define SYS_fcntl64 __NR_fcntl64 #define SYS_fdatasync __NR_fdatasync #define SYS_fgetxattr __NR_fgetxattr #define SYS_finit_module __NR_finit_module #define SYS_flistxattr __NR_flistxattr #define SYS_flock __NR_flock #define SYS_fork __NR_fork #define SYS_fremovexattr __NR_fremovexattr #define SYS_fsetxattr __NR_fsetxattr #define SYS_fstat __NR_fstat #define SYS_fstat64 __NR_fstat64 #define SYS_fstatat64 __NR_fstatat64 #define SYS_fstatfs __NR_fstatfs #define SYS_fstatfs64 __NR_fstatfs64 #define SYS_fsync __NR_fsync #define SYS_ftruncate __NR_ftruncate #define SYS_ftruncate64 __NR_ftruncate64 #define SYS_futex __NR_futex #define SYS_futimesat __NR_futimesat #define SYS_get_mempolicy __NR_get_mempolicy #define SYS_get_robust_list __NR_get_robust_list #define SYS_getcpu __NR_getcpu #define SYS_getcwd __NR_getcwd #define SYS_getdents __NR_getdents #define SYS_getdents64 __NR_getdents64 #define SYS_getegid __NR_getegid #define SYS_geteuid __NR_geteuid #define SYS_getgid __NR_getgid #define SYS_getgroups __NR_getgroups #define SYS_getitimer __NR_getitimer #define SYS_getpeername __NR_getpeername #define SYS_getpgid __NR_getpgid #define SYS_getpgrp __NR_getpgrp #define SYS_getpid __NR_getpid #define SYS_getppid __NR_getppid #define SYS_getpriority __NR_getpriority #define SYS_getrandom __NR_getrandom #define SYS_getresgid __NR_getresgid #define SYS_getresuid __NR_getresuid #define SYS_getrlimit __NR_getrlimit #define SYS_getrusage __NR_getrusage #define SYS_getsid __NR_getsid #define SYS_getsockname __NR_getsockname #define SYS_getsockopt __NR_getsockopt #define SYS_gettid __NR_gettid #define SYS_gettimeofday __NR_gettimeofday #define SYS_getuid __NR_getuid #define SYS_getxattr __NR_getxattr #define SYS_init_module __NR_init_module #define SYS_inotify_add_watch __NR_inotify_add_watch #define SYS_inotify_init __NR_inotify_init #define SYS_inotify_init1 __NR_inotify_init1 #define SYS_inotify_rm_watch __NR_inotify_rm_watch #define SYS_io_cancel __NR_io_cancel #define SYS_io_destroy __NR_io_destroy #define SYS_io_getevents __NR_io_getevents #define SYS_io_setup __NR_io_setup #define SYS_io_submit __NR_io_submit #define SYS_ioctl __NR_ioctl #define SYS_ioprio_get __NR_ioprio_get #define SYS_ioprio_set __NR_ioprio_set #define SYS_kcmp __NR_kcmp #define SYS_kexec_load __NR_kexec_load #define SYS_keyctl __NR_keyctl #define SYS_kill __NR_kill #define SYS_lchown __NR_lchown #define SYS_lgetxattr __NR_lgetxattr #define SYS_link __NR_link #define SYS_linkat __NR_linkat #define SYS_listen __NR_listen #define SYS_listxattr __NR_listxattr #define SYS_llistxattr __NR_llistxattr #define SYS_llseek __NR_llseek #define SYS_lookup_dcookie __NR_lookup_dcookie #define SYS_lremovexattr __NR_lremovexattr #define SYS_lseek __NR_lseek #define SYS_lsetxattr __NR_lsetxattr #define SYS_lstat __NR_lstat #define SYS_lstat64 __NR_lstat64 #define SYS_madvise __NR_madvise #define SYS_mbind __NR_mbind #define SYS_membarrier __NR_membarrier #define SYS_memfd_create __NR_memfd_create #define SYS_migrate_pages __NR_migrate_pages #define SYS_mincore __NR_mincore #define SYS_mkdir __NR_mkdir #define SYS_mkdirat __NR_mkdirat #define SYS_mknod __NR_mknod #define SYS_mknodat __NR_mknodat #define SYS_mlock __NR_mlock #define SYS_mlock2 __NR_mlock2 #define SYS_mlockall __NR_mlockall #define SYS_mmap __NR_mmap #define SYS_mmap2 __NR_mmap2 #define SYS_mount __NR_mount #define SYS_move_pages __NR_move_pages #define SYS_mprotect __NR_mprotect #define SYS_mq_getsetattr __NR_mq_getsetattr #define SYS_mq_notify __NR_mq_notify #define SYS_mq_open __NR_mq_open #define SYS_mq_timedreceive __NR_mq_timedreceive #define SYS_mq_timedsend __NR_mq_timedsend #define SYS_mq_unlink __NR_mq_unlink #define SYS_mremap __NR_mremap #define SYS_msgctl __NR_msgctl #define SYS_msgget __NR_msgget #define SYS_msgrcv __NR_msgrcv #define SYS_msgsnd __NR_msgsnd #define SYS_msync __NR_msync #define SYS_munlock __NR_munlock #define SYS_munlockall __NR_munlockall #define SYS_munmap __NR_munmap #define SYS_name_to_handle_at __NR_name_to_handle_at #define SYS_nanosleep __NR_nanosleep #define SYS_newfstatat __NR_newfstatat #define SYS_nfsservctl __NR_nfsservctl #define SYS_oldwait4 __NR_oldwait4 #define SYS_open __NR_open #define SYS_open_by_handle_at __NR_open_by_handle_at #define SYS_openat __NR_openat #define SYS_pause __NR_pause #define SYS_perf_event_open __NR_perf_event_open #define SYS_personality __NR_personality #define SYS_pipe __NR_pipe #define SYS_pipe2 __NR_pipe2 #define SYS_pivot_root __NR_pivot_root #define SYS_poll __NR_poll #define SYS_ppoll __NR_ppoll #define SYS_prctl __NR_prctl #define SYS_pread64 __NR_pread64 #define SYS_preadv __NR_preadv #define SYS_prlimit64 __NR_prlimit64 #define SYS_process_vm_readv __NR_process_vm_readv #define SYS_process_vm_writev __NR_process_vm_writev #define SYS_pselect6 __NR_pselect6 #define SYS_ptrace __NR_ptrace #define SYS_pwrite64 __NR_pwrite64 #define SYS_pwritev __NR_pwritev #define SYS_quotactl __NR_quotactl #define SYS_read __NR_read #define SYS_readahead __NR_readahead #define SYS_readlink __NR_readlink #define SYS_readlinkat __NR_readlinkat #define SYS_readv __NR_readv #define SYS_reboot __NR_reboot #define SYS_recv __NR_recv #define SYS_recvfrom __NR_recvfrom #define SYS_recvmmsg __NR_recvmmsg #define SYS_recvmsg __NR_recvmsg #define SYS_remap_file_pages __NR_remap_file_pages #define SYS_removexattr __NR_removexattr #define SYS_rename __NR_rename #define SYS_renameat __NR_renameat #define SYS_renameat2 __NR_renameat2 #define SYS_request_key __NR_request_key #define SYS_restart_syscall __NR_restart_syscall #define SYS_rmdir __NR_rmdir #define SYS_rt_sigaction __NR_rt_sigaction #define SYS_rt_sigpending __NR_rt_sigpending #define SYS_rt_sigprocmask __NR_rt_sigprocmask #define SYS_rt_sigqueueinfo __NR_rt_sigqueueinfo #define SYS_rt_sigreturn __NR_rt_sigreturn #define SYS_rt_sigsuspend __NR_rt_sigsuspend #define SYS_rt_sigtimedwait __NR_rt_sigtimedwait #define SYS_rt_tgsigqueueinfo __NR_rt_tgsigqueueinfo #define SYS_sched_get_priority_max __NR_sched_get_priority_max #define SYS_sched_get_priority_min __NR_sched_get_priority_min #define SYS_sched_getaffinity __NR_sched_getaffinity #define SYS_sched_getattr __NR_sched_getattr #define SYS_sched_getparam __NR_sched_getparam #define SYS_sched_getscheduler __NR_sched_getscheduler #define SYS_sched_rr_get_interval __NR_sched_rr_get_interval #define SYS_sched_setaffinity __NR_sched_setaffinity #define SYS_sched_setattr __NR_sched_setattr #define SYS_sched_setparam __NR_sched_setparam #define SYS_sched_setscheduler __NR_sched_setscheduler #define SYS_sched_yield __NR_sched_yield #define SYS_seccomp __NR_seccomp #define SYS_select __NR_select #define SYS_semctl __NR_semctl #define SYS_semget __NR_semget #define SYS_semop __NR_semop #define SYS_semtimedop __NR_semtimedop #define SYS_send __NR_send #define SYS_sendfile __NR_sendfile #define SYS_sendfile64 __NR_sendfile64 #define SYS_sendmmsg __NR_sendmmsg #define SYS_sendmsg __NR_sendmsg #define SYS_sendto __NR_sendto #define SYS_set_mempolicy __NR_set_mempolicy #define SYS_set_robust_list __NR_set_robust_list #define SYS_set_tid_address __NR_set_tid_address #define SYS_setdomainname __NR_setdomainname #define SYS_setfsgid __NR_setfsgid #define SYS_setfsuid __NR_setfsuid #define SYS_setgid __NR_setgid #define SYS_setgroups __NR_setgroups #define SYS_sethostname __NR_sethostname #define SYS_setitimer __NR_setitimer #define SYS_setns __NR_setns #define SYS_setpgid __NR_setpgid #define SYS_setpriority __NR_setpriority #define SYS_setregid __NR_setregid #define SYS_setresgid __NR_setresgid #define SYS_setresuid __NR_setresuid #define SYS_setreuid __NR_setreuid #define SYS_setrlimit __NR_setrlimit #define SYS_setsid __NR_setsid #define SYS_setsockopt __NR_setsockopt #define SYS_settimeofday __NR_settimeofday #define SYS_setuid __NR_setuid #define SYS_setxattr __NR_setxattr #define SYS_shmat __NR_shmat #define SYS_shmctl __NR_shmctl #define SYS_shmdt __NR_shmdt #define SYS_shmget __NR_shmget #define SYS_shutdown __NR_shutdown #define SYS_sigaltstack __NR_sigaltstack #define SYS_signalfd __NR_signalfd #define SYS_signalfd4 __NR_signalfd4 #define SYS_socket __NR_socket #define SYS_socketpair __NR_socketpair #define SYS_splice __NR_splice #define SYS_stat __NR_stat #define SYS_stat64 __NR_stat64 #define SYS_statfs __NR_statfs #define SYS_statfs64 __NR_statfs64 #define SYS_swapoff __NR_swapoff #define SYS_swapon __NR_swapon #define SYS_symlink __NR_symlink #define SYS_symlinkat __NR_symlinkat #define SYS_sync __NR_sync #define SYS_sync_file_range __NR_sync_file_range #define SYS_sync_file_range2 __NR_sync_file_range2 #define SYS_syncfs __NR_syncfs #define SYS_syscalls __NR_syscalls #define SYS_sysinfo __NR_sysinfo #define SYS_syslog __NR_syslog #define SYS_tee __NR_tee #define SYS_tgkill __NR_tgkill #define SYS_time __NR_time #define SYS_timer_create __NR_timer_create #define SYS_timer_delete __NR_timer_delete #define SYS_timer_getoverrun __NR_timer_getoverrun #define SYS_timer_gettime __NR_timer_gettime #define SYS_timer_settime __NR_timer_settime #define SYS_timerfd_create __NR_timerfd_create #define SYS_timerfd_gettime __NR_timerfd_gettime #define SYS_timerfd_settime __NR_timerfd_settime #define SYS_times __NR_times #define SYS_tkill __NR_tkill #define SYS_truncate __NR_truncate #define SYS_truncate64 __NR_truncate64 #define SYS_umask __NR_umask #define SYS_umount __NR_umount #define SYS_umount2 __NR_umount2 #define SYS_uname __NR_uname #define SYS_unlink __NR_unlink #define SYS_unlinkat __NR_unlinkat #define SYS_unshare __NR_unshare #define SYS_uselib __NR_uselib #define SYS_userfaultfd __NR_userfaultfd #define SYS_ustat __NR_ustat #define SYS_utime __NR_utime #define SYS_utimensat __NR_utimensat #define SYS_utimes __NR_utimes #define SYS_vfork __NR_vfork #define SYS_vhangup __NR_vhangup #define SYS_vmsplice __NR_vmsplice #define SYS_wait4 __NR_wait4 #define SYS_waitid __NR_waitid #define SYS_write __NR_write #define SYS_writev __NR_writev #elif defined(__arm__) #define SYS_accept __NR_accept #define SYS_accept4 __NR_accept4 #define SYS_access __NR_access #define SYS_acct __NR_acct #define SYS_add_key __NR_add_key #define SYS_adjtimex __NR_adjtimex #define SYS_alarm __NR_alarm #define SYS_arm_fadvise64_64 __NR_arm_fadvise64_64 #define SYS_arm_sync_file_range __NR_arm_sync_file_range #define SYS_bdflush __NR_bdflush #define SYS_bind __NR_bind #define SYS_bpf __NR_bpf #define SYS_brk __NR_brk #define SYS_capget __NR_capget #define SYS_capset __NR_capset #define SYS_chdir __NR_chdir #define SYS_chmod __NR_chmod #define SYS_chown __NR_chown #define SYS_chown32 __NR_chown32 #define SYS_chroot __NR_chroot #define SYS_clock_adjtime __NR_clock_adjtime #define SYS_clock_getres __NR_clock_getres #define SYS_clock_gettime __NR_clock_gettime #define SYS_clock_nanosleep __NR_clock_nanosleep #define SYS_clock_settime __NR_clock_settime #define SYS_clone __NR_clone #define SYS_close __NR_close #define SYS_connect __NR_connect #define SYS_creat __NR_creat #define SYS_delete_module __NR_delete_module #define SYS_dup __NR_dup #define SYS_dup2 __NR_dup2 #define SYS_dup3 __NR_dup3 #define SYS_epoll_create __NR_epoll_create #define SYS_epoll_create1 __NR_epoll_create1 #define SYS_epoll_ctl __NR_epoll_ctl #define SYS_epoll_pwait __NR_epoll_pwait #define SYS_epoll_wait __NR_epoll_wait #define SYS_eventfd __NR_eventfd #define SYS_eventfd2 __NR_eventfd2 #define SYS_execve __NR_execve #define SYS_execveat __NR_execveat #define SYS_exit __NR_exit #define SYS_exit_group __NR_exit_group #define SYS_faccessat __NR_faccessat #define SYS_fallocate __NR_fallocate #define SYS_fanotify_init __NR_fanotify_init #define SYS_fanotify_mark __NR_fanotify_mark #define SYS_fchdir __NR_fchdir #define SYS_fchmod __NR_fchmod #define SYS_fchmodat __NR_fchmodat #define SYS_fchown __NR_fchown #define SYS_fchown32 __NR_fchown32 #define SYS_fchownat __NR_fchownat #define SYS_fcntl __NR_fcntl #define SYS_fcntl64 __NR_fcntl64 #define SYS_fdatasync __NR_fdatasync #define SYS_fgetxattr __NR_fgetxattr #define SYS_finit_module __NR_finit_module #define SYS_flistxattr __NR_flistxattr #define SYS_flock __NR_flock #define SYS_fork __NR_fork #define SYS_fremovexattr __NR_fremovexattr #define SYS_fsetxattr __NR_fsetxattr #define SYS_fstat __NR_fstat #define SYS_fstat64 __NR_fstat64 #define SYS_fstatat64 __NR_fstatat64 #define SYS_fstatfs __NR_fstatfs #define SYS_fstatfs64 __NR_fstatfs64 #define SYS_fsync __NR_fsync #define SYS_ftruncate __NR_ftruncate #define SYS_ftruncate64 __NR_ftruncate64 #define SYS_futex __NR_futex #define SYS_futimesat __NR_futimesat #define SYS_get_mempolicy __NR_get_mempolicy #define SYS_get_robust_list __NR_get_robust_list #define SYS_getcpu __NR_getcpu #define SYS_getcwd __NR_getcwd #define SYS_getdents __NR_getdents #define SYS_getdents64 __NR_getdents64 #define SYS_getegid __NR_getegid #define SYS_getegid32 __NR_getegid32 #define SYS_geteuid __NR_geteuid #define SYS_geteuid32 __NR_geteuid32 #define SYS_getgid __NR_getgid #define SYS_getgid32 __NR_getgid32 #define SYS_getgroups __NR_getgroups #define SYS_getgroups32 __NR_getgroups32 #define SYS_getitimer __NR_getitimer #define SYS_getpeername __NR_getpeername #define SYS_getpgid __NR_getpgid #define SYS_getpgrp __NR_getpgrp #define SYS_getpid __NR_getpid #define SYS_getppid __NR_getppid #define SYS_getpriority __NR_getpriority #define SYS_getrandom __NR_getrandom #define SYS_getresgid __NR_getresgid #define SYS_getresgid32 __NR_getresgid32 #define SYS_getresuid __NR_getresuid #define SYS_getresuid32 __NR_getresuid32 #define SYS_getrlimit __NR_getrlimit #define SYS_getrusage __NR_getrusage #define SYS_getsid __NR_getsid #define SYS_getsockname __NR_getsockname #define SYS_getsockopt __NR_getsockopt #define SYS_gettid __NR_gettid #define SYS_gettimeofday __NR_gettimeofday #define SYS_getuid __NR_getuid #define SYS_getuid32 __NR_getuid32 #define SYS_getxattr __NR_getxattr #define SYS_init_module __NR_init_module #define SYS_inotify_add_watch __NR_inotify_add_watch #define SYS_inotify_init __NR_inotify_init #define SYS_inotify_init1 __NR_inotify_init1 #define SYS_inotify_rm_watch __NR_inotify_rm_watch #define SYS_io_cancel __NR_io_cancel #define SYS_io_destroy __NR_io_destroy #define SYS_io_getevents __NR_io_getevents #define SYS_io_setup __NR_io_setup #define SYS_io_submit __NR_io_submit #define SYS_ioctl __NR_ioctl #define SYS_ioprio_get __NR_ioprio_get #define SYS_ioprio_set __NR_ioprio_set #define SYS_ipc __NR_ipc #define SYS_kcmp __NR_kcmp #define SYS_kexec_load __NR_kexec_load #define SYS_keyctl __NR_keyctl #define SYS_kill __NR_kill #define SYS_lchown __NR_lchown #define SYS_lchown32 __NR_lchown32 #define SYS_lgetxattr __NR_lgetxattr #define SYS_link __NR_link #define SYS_linkat __NR_linkat #define SYS_listen __NR_listen #define SYS_listxattr __NR_listxattr #define SYS_llistxattr __NR_llistxattr #define SYS_lookup_dcookie __NR_lookup_dcookie #define SYS_lremovexattr __NR_lremovexattr #define SYS_lseek __NR_lseek #define SYS_lsetxattr __NR_lsetxattr #define SYS_lstat __NR_lstat #define SYS_lstat64 __NR_lstat64 #define SYS_madvise __NR_madvise #define SYS_mbind __NR_mbind #define SYS_membarrier __NR_membarrier #define SYS_memfd_create __NR_memfd_create #define SYS_mincore __NR_mincore #define SYS_mkdir __NR_mkdir #define SYS_mkdirat __NR_mkdirat #define SYS_mknod __NR_mknod #define SYS_mknodat __NR_mknodat #define SYS_mlock __NR_mlock #define SYS_mlock2 __NR_mlock2 #define SYS_mlockall __NR_mlockall #define SYS_mmap __NR_mmap #define SYS_mmap2 __NR_mmap2 #define SYS_mount __NR_mount #define SYS_move_pages __NR_move_pages #define SYS_mprotect __NR_mprotect #define SYS_mq_getsetattr __NR_mq_getsetattr #define SYS_mq_notify __NR_mq_notify #define SYS_mq_open __NR_mq_open #define SYS_mq_timedreceive __NR_mq_timedreceive #define SYS_mq_timedsend __NR_mq_timedsend #define SYS_mq_unlink __NR_mq_unlink #define SYS_mremap __NR_mremap #define SYS_msgctl __NR_msgctl #define SYS_msgget __NR_msgget #define SYS_msgrcv __NR_msgrcv #define SYS_msgsnd __NR_msgsnd #define SYS_msync __NR_msync #define SYS_munlock __NR_munlock #define SYS_munlockall __NR_munlockall #define SYS_munmap __NR_munmap #define SYS_name_to_handle_at __NR_name_to_handle_at #define SYS_nanosleep __NR_nanosleep #define SYS_nfsservctl __NR_nfsservctl #define SYS_nice __NR_nice #define SYS_open __NR_open #define SYS_open_by_handle_at __NR_open_by_handle_at #define SYS_openat __NR_openat #define SYS_pause __NR_pause #define SYS_pciconfig_iobase __NR_pciconfig_iobase #define SYS_pciconfig_read __NR_pciconfig_read #define SYS_pciconfig_write __NR_pciconfig_write #define SYS_perf_event_open __NR_perf_event_open #define SYS_personality __NR_personality #define SYS_pipe __NR_pipe #define SYS_pipe2 __NR_pipe2 #define SYS_pivot_root __NR_pivot_root #define SYS_poll __NR_poll #define SYS_ppoll __NR_ppoll #define SYS_prctl __NR_prctl #define SYS_pread64 __NR_pread64 #define SYS_preadv __NR_preadv #define SYS_prlimit64 __NR_prlimit64 #define SYS_process_vm_readv __NR_process_vm_readv #define SYS_process_vm_writev __NR_process_vm_writev #define SYS_pselect6 __NR_pselect6 #define SYS_ptrace __NR_ptrace #define SYS_pwrite64 __NR_pwrite64 #define SYS_pwritev __NR_pwritev #define SYS_quotactl __NR_quotactl #define SYS_read __NR_read #define SYS_readahead __NR_readahead #define SYS_readdir __NR_readdir #define SYS_readlink __NR_readlink #define SYS_readlinkat __NR_readlinkat #define SYS_readv __NR_readv #define SYS_reboot __NR_reboot #define SYS_recv __NR_recv #define SYS_recvfrom __NR_recvfrom #define SYS_recvmmsg __NR_recvmmsg #define SYS_recvmsg __NR_recvmsg #define SYS_remap_file_pages __NR_remap_file_pages #define SYS_removexattr __NR_removexattr #define SYS_rename __NR_rename #define SYS_renameat __NR_renameat #define SYS_renameat2 __NR_renameat2 #define SYS_request_key __NR_request_key #define SYS_restart_syscall __NR_restart_syscall #define SYS_rmdir __NR_rmdir #define SYS_rt_sigaction __NR_rt_sigaction #define SYS_rt_sigpending __NR_rt_sigpending #define SYS_rt_sigprocmask __NR_rt_sigprocmask #define SYS_rt_sigqueueinfo __NR_rt_sigqueueinfo #define SYS_rt_sigreturn __NR_rt_sigreturn #define SYS_rt_sigsuspend __NR_rt_sigsuspend #define SYS_rt_sigtimedwait __NR_rt_sigtimedwait #define SYS_rt_tgsigqueueinfo __NR_rt_tgsigqueueinfo #define SYS_sched_get_priority_max __NR_sched_get_priority_max #define SYS_sched_get_priority_min __NR_sched_get_priority_min #define SYS_sched_getaffinity __NR_sched_getaffinity #define SYS_sched_getattr __NR_sched_getattr #define SYS_sched_getparam __NR_sched_getparam #define SYS_sched_getscheduler __NR_sched_getscheduler #define SYS_sched_rr_get_interval __NR_sched_rr_get_interval #define SYS_sched_setaffinity __NR_sched_setaffinity #define SYS_sched_setattr __NR_sched_setattr #define SYS_sched_setparam __NR_sched_setparam #define SYS_sched_setscheduler __NR_sched_setscheduler #define SYS_sched_yield __NR_sched_yield #define SYS_seccomp __NR_seccomp #define SYS_select __NR_select #define SYS_semctl __NR_semctl #define SYS_semget __NR_semget #define SYS_semop __NR_semop #define SYS_semtimedop __NR_semtimedop #define SYS_send __NR_send #define SYS_sendfile __NR_sendfile #define SYS_sendfile64 __NR_sendfile64 #define SYS_sendmmsg __NR_sendmmsg #define SYS_sendmsg __NR_sendmsg #define SYS_sendto __NR_sendto #define SYS_set_mempolicy __NR_set_mempolicy #define SYS_set_robust_list __NR_set_robust_list #define SYS_set_tid_address __NR_set_tid_address #define SYS_setdomainname __NR_setdomainname #define SYS_setfsgid __NR_setfsgid #define SYS_setfsgid32 __NR_setfsgid32 #define SYS_setfsuid __NR_setfsuid #define SYS_setfsuid32 __NR_setfsuid32 #define SYS_setgid __NR_setgid #define SYS_setgid32 __NR_setgid32 #define SYS_setgroups __NR_setgroups #define SYS_setgroups32 __NR_setgroups32 #define SYS_sethostname __NR_sethostname #define SYS_setitimer __NR_setitimer #define SYS_setns __NR_setns #define SYS_setpgid __NR_setpgid #define SYS_setpriority __NR_setpriority #define SYS_setregid __NR_setregid #define SYS_setregid32 __NR_setregid32 #define SYS_setresgid __NR_setresgid #define SYS_setresgid32 __NR_setresgid32 #define SYS_setresuid __NR_setresuid #define SYS_setresuid32 __NR_setresuid32 #define SYS_setreuid __NR_setreuid #define SYS_setreuid32 __NR_setreuid32 #define SYS_setrlimit __NR_setrlimit #define SYS_setsid __NR_setsid #define SYS_setsockopt __NR_setsockopt #define SYS_settimeofday __NR_settimeofday #define SYS_setuid __NR_setuid #define SYS_setuid32 __NR_setuid32 #define SYS_setxattr __NR_setxattr #define SYS_shmat __NR_shmat #define SYS_shmctl __NR_shmctl #define SYS_shmdt __NR_shmdt #define SYS_shmget __NR_shmget #define SYS_shutdown __NR_shutdown #define SYS_sigaction __NR_sigaction #define SYS_sigaltstack __NR_sigaltstack #define SYS_signalfd __NR_signalfd #define SYS_signalfd4 __NR_signalfd4 #define SYS_sigpending __NR_sigpending #define SYS_sigprocmask __NR_sigprocmask #define SYS_sigreturn __NR_sigreturn #define SYS_sigsuspend __NR_sigsuspend #define SYS_socket __NR_socket #define SYS_socketcall __NR_socketcall #define SYS_socketpair __NR_socketpair #define SYS_splice __NR_splice #define SYS_stat __NR_stat #define SYS_stat64 __NR_stat64 #define SYS_statfs __NR_statfs #define SYS_statfs64 __NR_statfs64 #define SYS_stime __NR_stime #define SYS_swapoff __NR_swapoff #define SYS_swapon __NR_swapon #define SYS_symlink __NR_symlink #define SYS_symlinkat __NR_symlinkat #define SYS_sync __NR_sync #define SYS_sync_file_range2 __NR_sync_file_range2 #define SYS_syncfs __NR_syncfs #define SYS_syscall __NR_syscall #define SYS_sysfs __NR_sysfs #define SYS_sysinfo __NR_sysinfo #define SYS_syslog __NR_syslog #define SYS_tee __NR_tee #define SYS_tgkill __NR_tgkill #define SYS_time __NR_time #define SYS_timer_create __NR_timer_create #define SYS_timer_delete __NR_timer_delete #define SYS_timer_getoverrun __NR_timer_getoverrun #define SYS_timer_gettime __NR_timer_gettime #define SYS_timer_settime __NR_timer_settime #define SYS_timerfd_create __NR_timerfd_create #define SYS_timerfd_gettime __NR_timerfd_gettime #define SYS_timerfd_settime __NR_timerfd_settime #define SYS_times __NR_times #define SYS_tkill __NR_tkill #define SYS_truncate __NR_truncate #define SYS_truncate64 __NR_truncate64 #define SYS_ugetrlimit __NR_ugetrlimit #define SYS_umask __NR_umask #define SYS_umount __NR_umount #define SYS_umount2 __NR_umount2 #define SYS_uname __NR_uname #define SYS_unlink __NR_unlink #define SYS_unlinkat __NR_unlinkat #define SYS_unshare __NR_unshare #define SYS_uselib __NR_uselib #define SYS_userfaultfd __NR_userfaultfd #define SYS_ustat __NR_ustat #define SYS_utime __NR_utime #define SYS_utimensat __NR_utimensat #define SYS_utimes __NR_utimes #define SYS_vfork __NR_vfork #define SYS_vhangup __NR_vhangup #define SYS_vmsplice __NR_vmsplice #define SYS_vserver __NR_vserver #define SYS_wait4 __NR_wait4 #define SYS_waitid __NR_waitid #define SYS_write __NR_write #define SYS_writev __NR_writev #elif defined(__mips__) #define SYS_accept __NR_accept #define SYS_accept4 __NR_accept4 #define SYS_access __NR_access #define SYS_acct __NR_acct #define SYS_add_key __NR_add_key #define SYS_adjtimex __NR_adjtimex #define SYS_afs_syscall __NR_afs_syscall #define SYS_alarm __NR_alarm #define SYS_bdflush __NR_bdflush #define SYS_bind __NR_bind #define SYS_bpf __NR_bpf #define SYS_break __NR_break #define SYS_brk __NR_brk #define SYS_cachectl __NR_cachectl #define SYS_cacheflush __NR_cacheflush #define SYS_capget __NR_capget #define SYS_capset __NR_capset #define SYS_chdir __NR_chdir #define SYS_chmod __NR_chmod #define SYS_chown __NR_chown #define SYS_chroot __NR_chroot #define SYS_clock_adjtime __NR_clock_adjtime #define SYS_clock_getres __NR_clock_getres #define SYS_clock_gettime __NR_clock_gettime #define SYS_clock_nanosleep __NR_clock_nanosleep #define SYS_clock_settime __NR_clock_settime #define SYS_clone __NR_clone #define SYS_close __NR_close #define SYS_connect __NR_connect #define SYS_creat __NR_creat #define SYS_create_module __NR_create_module #define SYS_delete_module __NR_delete_module #define SYS_dup __NR_dup #define SYS_dup2 __NR_dup2 #define SYS_dup3 __NR_dup3 #define SYS_epoll_create __NR_epoll_create #define SYS_epoll_create1 __NR_epoll_create1 #define SYS_epoll_ctl __NR_epoll_ctl #define SYS_epoll_pwait __NR_epoll_pwait #define SYS_epoll_wait __NR_epoll_wait #define SYS_eventfd __NR_eventfd #define SYS_eventfd2 __NR_eventfd2 #define SYS_execve __NR_execve #define SYS_execveat __NR_execveat #define SYS_exit __NR_exit #define SYS_exit_group __NR_exit_group #define SYS_faccessat __NR_faccessat #define SYS_fadvise64 __NR_fadvise64 #define SYS_fallocate __NR_fallocate #define SYS_fanotify_init __NR_fanotify_init #define SYS_fanotify_mark __NR_fanotify_mark #define SYS_fchdir __NR_fchdir #define SYS_fchmod __NR_fchmod #define SYS_fchmodat __NR_fchmodat #define SYS_fchown __NR_fchown #define SYS_fchownat __NR_fchownat #define SYS_fcntl __NR_fcntl #define SYS_fcntl64 __NR_fcntl64 #define SYS_fdatasync __NR_fdatasync #define SYS_fgetxattr __NR_fgetxattr #define SYS_finit_module __NR_finit_module #define SYS_flistxattr __NR_flistxattr #define SYS_flock __NR_flock #define SYS_fork __NR_fork #define SYS_fremovexattr __NR_fremovexattr #define SYS_fsetxattr __NR_fsetxattr #define SYS_fstat __NR_fstat #define SYS_fstat64 __NR_fstat64 #define SYS_fstatat64 __NR_fstatat64 #define SYS_fstatfs __NR_fstatfs #define SYS_fstatfs64 __NR_fstatfs64 #define SYS_fsync __NR_fsync #define SYS_ftime __NR_ftime #define SYS_ftruncate __NR_ftruncate #define SYS_ftruncate64 __NR_ftruncate64 #define SYS_futex __NR_futex #define SYS_futimesat __NR_futimesat #define SYS_get_kernel_syms __NR_get_kernel_syms #define SYS_get_mempolicy __NR_get_mempolicy #define SYS_get_robust_list __NR_get_robust_list #define SYS_getcpu __NR_getcpu #define SYS_getcwd __NR_getcwd #define SYS_getdents __NR_getdents #define SYS_getdents64 __NR_getdents64 #define SYS_getegid __NR_getegid #define SYS_geteuid __NR_geteuid #define SYS_getgid __NR_getgid #define SYS_getgroups __NR_getgroups #define SYS_getitimer __NR_getitimer #define SYS_getpeername __NR_getpeername #define SYS_getpgid __NR_getpgid #define SYS_getpgrp __NR_getpgrp #define SYS_getpid __NR_getpid #define SYS_getpmsg __NR_getpmsg #define SYS_getppid __NR_getppid #define SYS_getpriority __NR_getpriority #define SYS_getrandom __NR_getrandom #define SYS_getresgid __NR_getresgid #define SYS_getresuid __NR_getresuid #define SYS_getrlimit __NR_getrlimit #define SYS_getrusage __NR_getrusage #define SYS_getsid __NR_getsid #define SYS_getsockname __NR_getsockname #define SYS_getsockopt __NR_getsockopt #define SYS_gettid __NR_gettid #define SYS_gettimeofday __NR_gettimeofday #define SYS_getuid __NR_getuid #define SYS_getxattr __NR_getxattr #define SYS_gtty __NR_gtty #define SYS_idle __NR_idle #define SYS_init_module __NR_init_module #define SYS_inotify_add_watch __NR_inotify_add_watch #define SYS_inotify_init __NR_inotify_init #define SYS_inotify_init1 __NR_inotify_init1 #define SYS_inotify_rm_watch __NR_inotify_rm_watch #define SYS_io_cancel __NR_io_cancel #define SYS_io_destroy __NR_io_destroy #define SYS_io_getevents __NR_io_getevents #define SYS_io_setup __NR_io_setup #define SYS_io_submit __NR_io_submit #define SYS_ioctl __NR_ioctl #define SYS_ioperm __NR_ioperm #define SYS_iopl __NR_iopl #define SYS_ioprio_get __NR_ioprio_get #define SYS_ioprio_set __NR_ioprio_set #define SYS_ipc __NR_ipc #define SYS_kcmp __NR_kcmp #define SYS_kexec_load __NR_kexec_load #define SYS_keyctl __NR_keyctl #define SYS_kill __NR_kill #define SYS_lchown __NR_lchown #define SYS_lgetxattr __NR_lgetxattr #define SYS_link __NR_link #define SYS_linkat __NR_linkat #define SYS_listen __NR_listen #define SYS_listxattr __NR_listxattr #define SYS_llistxattr __NR_llistxattr #define SYS_lock __NR_lock #define SYS_lookup_dcookie __NR_lookup_dcookie #define SYS_lremovexattr __NR_lremovexattr #define SYS_lseek __NR_lseek #define SYS_lsetxattr __NR_lsetxattr #define SYS_lstat __NR_lstat #define SYS_lstat64 __NR_lstat64 #define SYS_madvise __NR_madvise #define SYS_mbind __NR_mbind #define SYS_membarrier __NR_membarrier #define SYS_memfd_create __NR_memfd_create #define SYS_migrate_pages __NR_migrate_pages #define SYS_mincore __NR_mincore #define SYS_mkdir __NR_mkdir #define SYS_mkdirat __NR_mkdirat #define SYS_mknod __NR_mknod #define SYS_mknodat __NR_mknodat #define SYS_mlock __NR_mlock #define SYS_mlock2 __NR_mlock2 #define SYS_mlockall __NR_mlockall #define SYS_mmap __NR_mmap #define SYS_mmap2 __NR_mmap2 #define SYS_modify_ldt __NR_modify_ldt #define SYS_mount __NR_mount #define SYS_move_pages __NR_move_pages #define SYS_mprotect __NR_mprotect #define SYS_mpx __NR_mpx #define SYS_mq_getsetattr __NR_mq_getsetattr #define SYS_mq_notify __NR_mq_notify #define SYS_mq_open __NR_mq_open #define SYS_mq_timedreceive __NR_mq_timedreceive #define SYS_mq_timedsend __NR_mq_timedsend #define SYS_mq_unlink __NR_mq_unlink #define SYS_mremap __NR_mremap #define SYS_msgctl __NR_msgctl #define SYS_msgget __NR_msgget #define SYS_msgrcv __NR_msgrcv #define SYS_msgsnd __NR_msgsnd #define SYS_msync __NR_msync #define SYS_munlock __NR_munlock #define SYS_munlockall __NR_munlockall #define SYS_munmap __NR_munmap #define SYS_name_to_handle_at __NR_name_to_handle_at #define SYS_nanosleep __NR_nanosleep #define SYS_newfstatat __NR_newfstatat #define SYS_nfsservctl __NR_nfsservctl #define SYS_nice __NR_nice #define SYS_open __NR_open #define SYS_open_by_handle_at __NR_open_by_handle_at #define SYS_openat __NR_openat #define SYS_pause __NR_pause #define SYS_perf_event_open __NR_perf_event_open #define SYS_personality __NR_personality #define SYS_pipe __NR_pipe #define SYS_pipe2 __NR_pipe2 #define SYS_pivot_root __NR_pivot_root #define SYS_poll __NR_poll #define SYS_ppoll __NR_ppoll #define SYS_prctl __NR_prctl #define SYS_pread64 __NR_pread64 #define SYS_preadv __NR_preadv #define SYS_prlimit64 __NR_prlimit64 #define SYS_process_vm_readv __NR_process_vm_readv #define SYS_process_vm_writev __NR_process_vm_writev #define SYS_prof __NR_prof #define SYS_profil __NR_profil #define SYS_pselect6 __NR_pselect6 #define SYS_ptrace __NR_ptrace #define SYS_putpmsg __NR_putpmsg #define SYS_pwrite64 __NR_pwrite64 #define SYS_pwritev __NR_pwritev #define SYS_query_module __NR_query_module #define SYS_quotactl __NR_quotactl #define SYS_read __NR_read #define SYS_readahead __NR_readahead #define SYS_readdir __NR_readdir #define SYS_readlink __NR_readlink #define SYS_readlinkat __NR_readlinkat #define SYS_readv __NR_readv #define SYS_reboot __NR_reboot #define SYS_recv __NR_recv #define SYS_recvfrom __NR_recvfrom #define SYS_recvmmsg __NR_recvmmsg #define SYS_recvmsg __NR_recvmsg #define SYS_remap_file_pages __NR_remap_file_pages #define SYS_removexattr __NR_removexattr #define SYS_rename __NR_rename #define SYS_renameat __NR_renameat #define SYS_renameat2 __NR_renameat2 #define SYS_request_key __NR_request_key #define SYS_reserved177 __NR_reserved177 #define SYS_reserved193 __NR_reserved193 #define SYS_reserved221 __NR_reserved221 #define SYS_reserved82 __NR_reserved82 #define SYS_restart_syscall __NR_restart_syscall #define SYS_rmdir __NR_rmdir #define SYS_rt_sigaction __NR_rt_sigaction #define SYS_rt_sigpending __NR_rt_sigpending #define SYS_rt_sigprocmask __NR_rt_sigprocmask #define SYS_rt_sigqueueinfo __NR_rt_sigqueueinfo #define SYS_rt_sigreturn __NR_rt_sigreturn #define SYS_rt_sigsuspend __NR_rt_sigsuspend #define SYS_rt_sigtimedwait __NR_rt_sigtimedwait #define SYS_rt_tgsigqueueinfo __NR_rt_tgsigqueueinfo #define SYS_sched_get_priority_max __NR_sched_get_priority_max #define SYS_sched_get_priority_min __NR_sched_get_priority_min #define SYS_sched_getaffinity __NR_sched_getaffinity #define SYS_sched_getattr __NR_sched_getattr #define SYS_sched_getparam __NR_sched_getparam #define SYS_sched_getscheduler __NR_sched_getscheduler #define SYS_sched_rr_get_interval __NR_sched_rr_get_interval #define SYS_sched_setaffinity __NR_sched_setaffinity #define SYS_sched_setattr __NR_sched_setattr #define SYS_sched_setparam __NR_sched_setparam #define SYS_sched_setscheduler __NR_sched_setscheduler #define SYS_sched_yield __NR_sched_yield #define SYS_seccomp __NR_seccomp #define SYS_semctl __NR_semctl #define SYS_semget __NR_semget #define SYS_semop __NR_semop #define SYS_semtimedop __NR_semtimedop #define SYS_send __NR_send #define SYS_sendfile __NR_sendfile #define SYS_sendfile64 __NR_sendfile64 #define SYS_sendmmsg __NR_sendmmsg #define SYS_sendmsg __NR_sendmsg #define SYS_sendto __NR_sendto #define SYS_set_mempolicy __NR_set_mempolicy #define SYS_set_robust_list __NR_set_robust_list #define SYS_set_thread_area __NR_set_thread_area #define SYS_set_tid_address __NR_set_tid_address #define SYS_setdomainname __NR_setdomainname #define SYS_setfsgid __NR_setfsgid #define SYS_setfsuid __NR_setfsuid #define SYS_setgid __NR_setgid #define SYS_setgroups __NR_setgroups #define SYS_sethostname __NR_sethostname #define SYS_setitimer __NR_setitimer #define SYS_setns __NR_setns #define SYS_setpgid __NR_setpgid #define SYS_setpriority __NR_setpriority #define SYS_setregid __NR_setregid #define SYS_setresgid __NR_setresgid #define SYS_setresuid __NR_setresuid #define SYS_setreuid __NR_setreuid #define SYS_setrlimit __NR_setrlimit #define SYS_setsid __NR_setsid #define SYS_setsockopt __NR_setsockopt #define SYS_settimeofday __NR_settimeofday #define SYS_setuid __NR_setuid #define SYS_setxattr __NR_setxattr #define SYS_sgetmask __NR_sgetmask #define SYS_shmat __NR_shmat #define SYS_shmctl __NR_shmctl #define SYS_shmdt __NR_shmdt #define SYS_shmget __NR_shmget #define SYS_shutdown __NR_shutdown #define SYS_sigaction __NR_sigaction #define SYS_sigaltstack __NR_sigaltstack #define SYS_signal __NR_signal #define SYS_signalfd __NR_signalfd #define SYS_signalfd4 __NR_signalfd4 #define SYS_sigpending __NR_sigpending #define SYS_sigprocmask __NR_sigprocmask #define SYS_sigreturn __NR_sigreturn #define SYS_sigsuspend __NR_sigsuspend #define SYS_socket __NR_socket #define SYS_socketcall __NR_socketcall #define SYS_socketpair __NR_socketpair #define SYS_splice __NR_splice #define SYS_ssetmask __NR_ssetmask #define SYS_stat __NR_stat #define SYS_stat64 __NR_stat64 #define SYS_statfs __NR_statfs #define SYS_statfs64 __NR_statfs64 #define SYS_stime __NR_stime #define SYS_stty __NR_stty #define SYS_swapoff __NR_swapoff #define SYS_swapon __NR_swapon #define SYS_symlink __NR_symlink #define SYS_symlinkat __NR_symlinkat #define SYS_sync __NR_sync #define SYS_sync_file_range __NR_sync_file_range #define SYS_syncfs __NR_syncfs #define SYS_syscall __NR_syscall #define SYS_sysfs __NR_sysfs #define SYS_sysinfo __NR_sysinfo #define SYS_syslog __NR_syslog #define SYS_sysmips __NR_sysmips #define SYS_tee __NR_tee #define SYS_tgkill __NR_tgkill #define SYS_time __NR_time #define SYS_timer_create __NR_timer_create #define SYS_timer_delete __NR_timer_delete #define SYS_timer_getoverrun __NR_timer_getoverrun #define SYS_timer_gettime __NR_timer_gettime #define SYS_timer_settime __NR_timer_settime #define SYS_timerfd __NR_timerfd #define SYS_timerfd_create __NR_timerfd_create #define SYS_timerfd_gettime __NR_timerfd_gettime #define SYS_timerfd_settime __NR_timerfd_settime #define SYS_times __NR_times #define SYS_tkill __NR_tkill #define SYS_truncate __NR_truncate #define SYS_truncate64 __NR_truncate64 #define SYS_ulimit __NR_ulimit #define SYS_umask __NR_umask #define SYS_umount __NR_umount #define SYS_umount2 __NR_umount2 #define SYS_uname __NR_uname #define SYS_unlink __NR_unlink #define SYS_unlinkat __NR_unlinkat #define SYS_unshare __NR_unshare #define SYS_unused109 __NR_unused109 #define SYS_unused150 __NR_unused150 #define SYS_unused18 __NR_unused18 #define SYS_unused28 __NR_unused28 #define SYS_unused59 __NR_unused59 #define SYS_unused84 __NR_unused84 #define SYS_uselib __NR_uselib #define SYS_userfaultfd __NR_userfaultfd #define SYS_ustat __NR_ustat #define SYS_utime __NR_utime #define SYS_utimensat __NR_utimensat #define SYS_utimes __NR_utimes #define SYS_vhangup __NR_vhangup #define SYS_vm86 __NR_vm86 #define SYS_vmsplice __NR_vmsplice #define SYS_vserver __NR_vserver #define SYS_wait4 __NR_wait4 #define SYS_waitid __NR_waitid #define SYS_waitpid __NR_waitpid #define SYS_write __NR_write #define SYS_writev __NR_writev #elif defined(__i386__) #define SYS_accept4 __NR_accept4 #define SYS_access __NR_access #define SYS_acct __NR_acct #define SYS_add_key __NR_add_key #define SYS_adjtimex __NR_adjtimex #define SYS_afs_syscall __NR_afs_syscall #define SYS_alarm __NR_alarm #define SYS_bdflush __NR_bdflush #define SYS_bind __NR_bind #define SYS_bpf __NR_bpf #define SYS_break __NR_break #define SYS_brk __NR_brk #define SYS_capget __NR_capget #define SYS_capset __NR_capset #define SYS_chdir __NR_chdir #define SYS_chmod __NR_chmod #define SYS_chown __NR_chown #define SYS_chown32 __NR_chown32 #define SYS_chroot __NR_chroot #define SYS_clock_adjtime __NR_clock_adjtime #define SYS_clock_getres __NR_clock_getres #define SYS_clock_gettime __NR_clock_gettime #define SYS_clock_nanosleep __NR_clock_nanosleep #define SYS_clock_settime __NR_clock_settime #define SYS_clone __NR_clone #define SYS_close __NR_close #define SYS_connect __NR_connect #define SYS_creat __NR_creat #define SYS_create_module __NR_create_module #define SYS_delete_module __NR_delete_module #define SYS_dup __NR_dup #define SYS_dup2 __NR_dup2 #define SYS_dup3 __NR_dup3 #define SYS_epoll_create __NR_epoll_create #define SYS_epoll_create1 __NR_epoll_create1 #define SYS_epoll_ctl __NR_epoll_ctl #define SYS_epoll_pwait __NR_epoll_pwait #define SYS_epoll_wait __NR_epoll_wait #define SYS_eventfd __NR_eventfd #define SYS_eventfd2 __NR_eventfd2 #define SYS_execve __NR_execve #define SYS_execveat __NR_execveat #define SYS_exit __NR_exit #define SYS_exit_group __NR_exit_group #define SYS_faccessat __NR_faccessat #define SYS_fadvise64 __NR_fadvise64 #define SYS_fadvise64_64 __NR_fadvise64_64 #define SYS_fallocate __NR_fallocate #define SYS_fanotify_init __NR_fanotify_init #define SYS_fanotify_mark __NR_fanotify_mark #define SYS_fchdir __NR_fchdir #define SYS_fchmod __NR_fchmod #define SYS_fchmodat __NR_fchmodat #define SYS_fchown __NR_fchown #define SYS_fchown32 __NR_fchown32 #define SYS_fchownat __NR_fchownat #define SYS_fcntl __NR_fcntl #define SYS_fcntl64 __NR_fcntl64 #define SYS_fdatasync __NR_fdatasync #define SYS_fgetxattr __NR_fgetxattr #define SYS_finit_module __NR_finit_module #define SYS_flistxattr __NR_flistxattr #define SYS_flock __NR_flock #define SYS_fork __NR_fork #define SYS_fremovexattr __NR_fremovexattr #define SYS_fsetxattr __NR_fsetxattr #define SYS_fstat __NR_fstat #define SYS_fstat64 __NR_fstat64 #define SYS_fstatat64 __NR_fstatat64 #define SYS_fstatfs __NR_fstatfs #define SYS_fstatfs64 __NR_fstatfs64 #define SYS_fsync __NR_fsync #define SYS_ftime __NR_ftime #define SYS_ftruncate __NR_ftruncate #define SYS_ftruncate64 __NR_ftruncate64 #define SYS_futex __NR_futex #define SYS_futimesat __NR_futimesat #define SYS_get_kernel_syms __NR_get_kernel_syms #define SYS_get_mempolicy __NR_get_mempolicy #define SYS_get_robust_list __NR_get_robust_list #define SYS_get_thread_area __NR_get_thread_area #define SYS_getcpu __NR_getcpu #define SYS_getcwd __NR_getcwd #define SYS_getdents __NR_getdents #define SYS_getdents64 __NR_getdents64 #define SYS_getegid __NR_getegid #define SYS_getegid32 __NR_getegid32 #define SYS_geteuid __NR_geteuid #define SYS_geteuid32 __NR_geteuid32 #define SYS_getgid __NR_getgid #define SYS_getgid32 __NR_getgid32 #define SYS_getgroups __NR_getgroups #define SYS_getgroups32 __NR_getgroups32 #define SYS_getitimer __NR_getitimer #define SYS_getpeername __NR_getpeername #define SYS_getpgid __NR_getpgid #define SYS_getpgrp __NR_getpgrp #define SYS_getpid __NR_getpid #define SYS_getpmsg __NR_getpmsg #define SYS_getppid __NR_getppid #define SYS_getpriority __NR_getpriority #define SYS_getrandom __NR_getrandom #define SYS_getresgid __NR_getresgid #define SYS_getresgid32 __NR_getresgid32 #define SYS_getresuid __NR_getresuid #define SYS_getresuid32 __NR_getresuid32 #define SYS_getrlimit __NR_getrlimit #define SYS_getrusage __NR_getrusage #define SYS_getsid __NR_getsid #define SYS_getsockname __NR_getsockname #define SYS_getsockopt __NR_getsockopt #define SYS_gettid __NR_gettid #define SYS_gettimeofday __NR_gettimeofday #define SYS_getuid __NR_getuid #define SYS_getuid32 __NR_getuid32 #define SYS_getxattr __NR_getxattr #define SYS_gtty __NR_gtty #define SYS_idle __NR_idle #define SYS_init_module __NR_init_module #define SYS_inotify_add_watch __NR_inotify_add_watch #define SYS_inotify_init __NR_inotify_init #define SYS_inotify_init1 __NR_inotify_init1 #define SYS_inotify_rm_watch __NR_inotify_rm_watch #define SYS_io_cancel __NR_io_cancel #define SYS_io_destroy __NR_io_destroy #define SYS_io_getevents __NR_io_getevents #define SYS_io_setup __NR_io_setup #define SYS_io_submit __NR_io_submit #define SYS_ioctl __NR_ioctl #define SYS_ioperm __NR_ioperm #define SYS_iopl __NR_iopl #define SYS_ioprio_get __NR_ioprio_get #define SYS_ioprio_set __NR_ioprio_set #define SYS_ipc __NR_ipc #define SYS_kcmp __NR_kcmp #define SYS_kexec_load __NR_kexec_load #define SYS_keyctl __NR_keyctl #define SYS_kill __NR_kill #define SYS_lchown __NR_lchown #define SYS_lchown32 __NR_lchown32 #define SYS_lgetxattr __NR_lgetxattr #define SYS_link __NR_link #define SYS_linkat __NR_linkat #define SYS_listen __NR_listen #define SYS_listxattr __NR_listxattr #define SYS_llistxattr __NR_llistxattr #define SYS_lock __NR_lock #define SYS_lookup_dcookie __NR_lookup_dcookie #define SYS_lremovexattr __NR_lremovexattr #define SYS_lseek __NR_lseek #define SYS_lsetxattr __NR_lsetxattr #define SYS_lstat __NR_lstat #define SYS_lstat64 __NR_lstat64 #define SYS_madvise __NR_madvise #define SYS_mbind __NR_mbind #define SYS_membarrier __NR_membarrier #define SYS_memfd_create __NR_memfd_create #define SYS_migrate_pages __NR_migrate_pages #define SYS_mincore __NR_mincore #define SYS_mkdir __NR_mkdir #define SYS_mkdirat __NR_mkdirat #define SYS_mknod __NR_mknod #define SYS_mknodat __NR_mknodat #define SYS_mlock __NR_mlock #define SYS_mlock2 __NR_mlock2 #define SYS_mlockall __NR_mlockall #define SYS_mmap __NR_mmap #define SYS_mmap2 __NR_mmap2 #define SYS_modify_ldt __NR_modify_ldt #define SYS_mount __NR_mount #define SYS_move_pages __NR_move_pages #define SYS_mprotect __NR_mprotect #define SYS_mpx __NR_mpx #define SYS_mq_getsetattr __NR_mq_getsetattr #define SYS_mq_notify __NR_mq_notify #define SYS_mq_open __NR_mq_open #define SYS_mq_timedreceive __NR_mq_timedreceive #define SYS_mq_timedsend __NR_mq_timedsend #define SYS_mq_unlink __NR_mq_unlink #define SYS_mremap __NR_mremap #define SYS_msync __NR_msync #define SYS_munlock __NR_munlock #define SYS_munlockall __NR_munlockall #define SYS_munmap __NR_munmap #define SYS_name_to_handle_at __NR_name_to_handle_at #define SYS_nanosleep __NR_nanosleep #define SYS_nfsservctl __NR_nfsservctl #define SYS_nice __NR_nice #define SYS_oldfstat __NR_oldfstat #define SYS_oldlstat __NR_oldlstat #define SYS_oldolduname __NR_oldolduname #define SYS_oldstat __NR_oldstat #define SYS_olduname __NR_olduname #define SYS_open __NR_open #define SYS_open_by_handle_at __NR_open_by_handle_at #define SYS_openat __NR_openat #define SYS_pause __NR_pause #define SYS_perf_event_open __NR_perf_event_open #define SYS_personality __NR_personality #define SYS_pipe __NR_pipe #define SYS_pipe2 __NR_pipe2 #define SYS_pivot_root __NR_pivot_root #define SYS_poll __NR_poll #define SYS_ppoll __NR_ppoll #define SYS_prctl __NR_prctl #define SYS_pread64 __NR_pread64 #define SYS_preadv __NR_preadv #define SYS_prlimit64 __NR_prlimit64 #define SYS_process_vm_readv __NR_process_vm_readv #define SYS_process_vm_writev __NR_process_vm_writev #define SYS_prof __NR_prof #define SYS_profil __NR_profil #define SYS_pselect6 __NR_pselect6 #define SYS_ptrace __NR_ptrace #define SYS_putpmsg __NR_putpmsg #define SYS_pwrite64 __NR_pwrite64 #define SYS_pwritev __NR_pwritev #define SYS_query_module __NR_query_module #define SYS_quotactl __NR_quotactl #define SYS_read __NR_read #define SYS_readahead __NR_readahead #define SYS_readdir __NR_readdir #define SYS_readlink __NR_readlink #define SYS_readlinkat __NR_readlinkat #define SYS_readv __NR_readv #define SYS_reboot __NR_reboot #define SYS_recvfrom __NR_recvfrom #define SYS_recvmmsg __NR_recvmmsg #define SYS_recvmsg __NR_recvmsg #define SYS_remap_file_pages __NR_remap_file_pages #define SYS_removexattr __NR_removexattr #define SYS_rename __NR_rename #define SYS_renameat __NR_renameat #define SYS_renameat2 __NR_renameat2 #define SYS_request_key __NR_request_key #define SYS_restart_syscall __NR_restart_syscall #define SYS_rmdir __NR_rmdir #define SYS_rt_sigaction __NR_rt_sigaction #define SYS_rt_sigpending __NR_rt_sigpending #define SYS_rt_sigprocmask __NR_rt_sigprocmask #define SYS_rt_sigqueueinfo __NR_rt_sigqueueinfo #define SYS_rt_sigreturn __NR_rt_sigreturn #define SYS_rt_sigsuspend __NR_rt_sigsuspend #define SYS_rt_sigtimedwait __NR_rt_sigtimedwait #define SYS_rt_tgsigqueueinfo __NR_rt_tgsigqueueinfo #define SYS_sched_get_priority_max __NR_sched_get_priority_max #define SYS_sched_get_priority_min __NR_sched_get_priority_min #define SYS_sched_getaffinity __NR_sched_getaffinity #define SYS_sched_getattr __NR_sched_getattr #define SYS_sched_getparam __NR_sched_getparam #define SYS_sched_getscheduler __NR_sched_getscheduler #define SYS_sched_rr_get_interval __NR_sched_rr_get_interval #define SYS_sched_setaffinity __NR_sched_setaffinity #define SYS_sched_setattr __NR_sched_setattr #define SYS_sched_setparam __NR_sched_setparam #define SYS_sched_setscheduler __NR_sched_setscheduler #define SYS_sched_yield __NR_sched_yield #define SYS_seccomp __NR_seccomp #define SYS_select __NR_select #define SYS_sendfile __NR_sendfile #define SYS_sendfile64 __NR_sendfile64 #define SYS_sendmmsg __NR_sendmmsg #define SYS_sendmsg __NR_sendmsg #define SYS_sendto __NR_sendto #define SYS_set_mempolicy __NR_set_mempolicy #define SYS_set_robust_list __NR_set_robust_list #define SYS_set_thread_area __NR_set_thread_area #define SYS_set_tid_address __NR_set_tid_address #define SYS_setdomainname __NR_setdomainname #define SYS_setfsgid __NR_setfsgid #define SYS_setfsgid32 __NR_setfsgid32 #define SYS_setfsuid __NR_setfsuid #define SYS_setfsuid32 __NR_setfsuid32 #define SYS_setgid __NR_setgid #define SYS_setgid32 __NR_setgid32 #define SYS_setgroups __NR_setgroups #define SYS_setgroups32 __NR_setgroups32 #define SYS_sethostname __NR_sethostname #define SYS_setitimer __NR_setitimer #define SYS_setns __NR_setns #define SYS_setpgid __NR_setpgid #define SYS_setpriority __NR_setpriority #define SYS_setregid __NR_setregid #define SYS_setregid32 __NR_setregid32 #define SYS_setresgid __NR_setresgid #define SYS_setresgid32 __NR_setresgid32 #define SYS_setresuid __NR_setresuid #define SYS_setresuid32 __NR_setresuid32 #define SYS_setreuid __NR_setreuid #define SYS_setreuid32 __NR_setreuid32 #define SYS_setrlimit __NR_setrlimit #define SYS_setsid __NR_setsid #define SYS_setsockopt __NR_setsockopt #define SYS_settimeofday __NR_settimeofday #define SYS_setuid __NR_setuid #define SYS_setuid32 __NR_setuid32 #define SYS_setxattr __NR_setxattr #define SYS_sgetmask __NR_sgetmask #define SYS_shutdown __NR_shutdown #define SYS_sigaction __NR_sigaction #define SYS_sigaltstack __NR_sigaltstack #define SYS_signal __NR_signal #define SYS_signalfd __NR_signalfd #define SYS_signalfd4 __NR_signalfd4 #define SYS_sigpending __NR_sigpending #define SYS_sigprocmask __NR_sigprocmask #define SYS_sigreturn __NR_sigreturn #define SYS_sigsuspend __NR_sigsuspend #define SYS_socket __NR_socket #define SYS_socketcall __NR_socketcall #define SYS_socketpair __NR_socketpair #define SYS_splice __NR_splice #define SYS_ssetmask __NR_ssetmask #define SYS_stat __NR_stat #define SYS_stat64 __NR_stat64 #define SYS_statfs __NR_statfs #define SYS_statfs64 __NR_statfs64 #define SYS_stime __NR_stime #define SYS_stty __NR_stty #define SYS_swapoff __NR_swapoff #define SYS_swapon __NR_swapon #define SYS_symlink __NR_symlink #define SYS_symlinkat __NR_symlinkat #define SYS_sync __NR_sync #define SYS_sync_file_range __NR_sync_file_range #define SYS_syncfs __NR_syncfs #define SYS_sysfs __NR_sysfs #define SYS_sysinfo __NR_sysinfo #define SYS_syslog __NR_syslog #define SYS_tee __NR_tee #define SYS_tgkill __NR_tgkill #define SYS_time __NR_time #define SYS_timer_create __NR_timer_create #define SYS_timer_delete __NR_timer_delete #define SYS_timer_getoverrun __NR_timer_getoverrun #define SYS_timer_gettime __NR_timer_gettime #define SYS_timer_settime __NR_timer_settime #define SYS_timerfd_create __NR_timerfd_create #define SYS_timerfd_gettime __NR_timerfd_gettime #define SYS_timerfd_settime __NR_timerfd_settime #define SYS_times __NR_times #define SYS_tkill __NR_tkill #define SYS_truncate __NR_truncate #define SYS_truncate64 __NR_truncate64 #define SYS_ugetrlimit __NR_ugetrlimit #define SYS_ulimit __NR_ulimit #define SYS_umask __NR_umask #define SYS_umount __NR_umount #define SYS_umount2 __NR_umount2 #define SYS_uname __NR_uname #define SYS_unlink __NR_unlink #define SYS_unlinkat __NR_unlinkat #define SYS_unshare __NR_unshare #define SYS_uselib __NR_uselib #define SYS_userfaultfd __NR_userfaultfd #define SYS_ustat __NR_ustat #define SYS_utime __NR_utime #define SYS_utimensat __NR_utimensat #define SYS_utimes __NR_utimes #define SYS_vfork __NR_vfork #define SYS_vhangup __NR_vhangup #define SYS_vm86 __NR_vm86 #define SYS_vm86old __NR_vm86old #define SYS_vmsplice __NR_vmsplice #define SYS_vserver __NR_vserver #define SYS_wait4 __NR_wait4 #define SYS_waitid __NR_waitid #define SYS_waitpid __NR_waitpid #define SYS_write __NR_write #define SYS_writev __NR_writev #elif defined(__x86_64__) #define SYS_accept __NR_accept #define SYS_accept4 __NR_accept4 #define SYS_access __NR_access #define SYS_acct __NR_acct #define SYS_add_key __NR_add_key #define SYS_adjtimex __NR_adjtimex #define SYS_afs_syscall __NR_afs_syscall #define SYS_alarm __NR_alarm #define SYS_arch_prctl __NR_arch_prctl #define SYS_bind __NR_bind #define SYS_bpf __NR_bpf #define SYS_brk __NR_brk #define SYS_capget __NR_capget #define SYS_capset __NR_capset #define SYS_chdir __NR_chdir #define SYS_chmod __NR_chmod #define SYS_chown __NR_chown #define SYS_chroot __NR_chroot #define SYS_clock_adjtime __NR_clock_adjtime #define SYS_clock_getres __NR_clock_getres #define SYS_clock_gettime __NR_clock_gettime #define SYS_clock_nanosleep __NR_clock_nanosleep #define SYS_clock_settime __NR_clock_settime #define SYS_clone __NR_clone #define SYS_close __NR_close #define SYS_connect __NR_connect #define SYS_creat __NR_creat #define SYS_create_module __NR_create_module #define SYS_delete_module __NR_delete_module #define SYS_dup __NR_dup #define SYS_dup2 __NR_dup2 #define SYS_dup3 __NR_dup3 #define SYS_epoll_create __NR_epoll_create #define SYS_epoll_create1 __NR_epoll_create1 #define SYS_epoll_ctl __NR_epoll_ctl #define SYS_epoll_ctl_old __NR_epoll_ctl_old #define SYS_epoll_pwait __NR_epoll_pwait #define SYS_epoll_wait __NR_epoll_wait #define SYS_epoll_wait_old __NR_epoll_wait_old #define SYS_eventfd __NR_eventfd #define SYS_eventfd2 __NR_eventfd2 #define SYS_execve __NR_execve #define SYS_execveat __NR_execveat #define SYS_exit __NR_exit #define SYS_exit_group __NR_exit_group #define SYS_faccessat __NR_faccessat #define SYS_fadvise64 __NR_fadvise64 #define SYS_fallocate __NR_fallocate #define SYS_fanotify_init __NR_fanotify_init #define SYS_fanotify_mark __NR_fanotify_mark #define SYS_fchdir __NR_fchdir #define SYS_fchmod __NR_fchmod #define SYS_fchmodat __NR_fchmodat #define SYS_fchown __NR_fchown #define SYS_fchownat __NR_fchownat #define SYS_fcntl __NR_fcntl #define SYS_fdatasync __NR_fdatasync #define SYS_fgetxattr __NR_fgetxattr #define SYS_finit_module __NR_finit_module #define SYS_flistxattr __NR_flistxattr #define SYS_flock __NR_flock #define SYS_fork __NR_fork #define SYS_fremovexattr __NR_fremovexattr #define SYS_fsetxattr __NR_fsetxattr #define SYS_fstat __NR_fstat #define SYS_fstatfs __NR_fstatfs #define SYS_fsync __NR_fsync #define SYS_ftruncate __NR_ftruncate #define SYS_futex __NR_futex #define SYS_futimesat __NR_futimesat #define SYS_get_kernel_syms __NR_get_kernel_syms #define SYS_get_mempolicy __NR_get_mempolicy #define SYS_get_robust_list __NR_get_robust_list #define SYS_get_thread_area __NR_get_thread_area #define SYS_getcpu __NR_getcpu #define SYS_getcwd __NR_getcwd #define SYS_getdents __NR_getdents #define SYS_getdents64 __NR_getdents64 #define SYS_getegid __NR_getegid #define SYS_geteuid __NR_geteuid #define SYS_getgid __NR_getgid #define SYS_getgroups __NR_getgroups #define SYS_getitimer __NR_getitimer #define SYS_getpeername __NR_getpeername #define SYS_getpgid __NR_getpgid #define SYS_getpgrp __NR_getpgrp #define SYS_getpid __NR_getpid #define SYS_getpmsg __NR_getpmsg #define SYS_getppid __NR_getppid #define SYS_getpriority __NR_getpriority #define SYS_getrandom __NR_getrandom #define SYS_getresgid __NR_getresgid #define SYS_getresuid __NR_getresuid #define SYS_getrlimit __NR_getrlimit #define SYS_getrusage __NR_getrusage #define SYS_getsid __NR_getsid #define SYS_getsockname __NR_getsockname #define SYS_getsockopt __NR_getsockopt #define SYS_gettid __NR_gettid #define SYS_gettimeofday __NR_gettimeofday #define SYS_getuid __NR_getuid #define SYS_getxattr __NR_getxattr #define SYS_init_module __NR_init_module #define SYS_inotify_add_watch __NR_inotify_add_watch #define SYS_inotify_init __NR_inotify_init #define SYS_inotify_init1 __NR_inotify_init1 #define SYS_inotify_rm_watch __NR_inotify_rm_watch #define SYS_io_cancel __NR_io_cancel #define SYS_io_destroy __NR_io_destroy #define SYS_io_getevents __NR_io_getevents #define SYS_io_setup __NR_io_setup #define SYS_io_submit __NR_io_submit #define SYS_ioctl __NR_ioctl #define SYS_ioperm __NR_ioperm #define SYS_iopl __NR_iopl #define SYS_ioprio_get __NR_ioprio_get #define SYS_ioprio_set __NR_ioprio_set #define SYS_kcmp __NR_kcmp #define SYS_kexec_file_load __NR_kexec_file_load #define SYS_kexec_load __NR_kexec_load #define SYS_keyctl __NR_keyctl #define SYS_kill __NR_kill #define SYS_lchown __NR_lchown #define SYS_lgetxattr __NR_lgetxattr #define SYS_link __NR_link #define SYS_linkat __NR_linkat #define SYS_listen __NR_listen #define SYS_listxattr __NR_listxattr #define SYS_llistxattr __NR_llistxattr #define SYS_lookup_dcookie __NR_lookup_dcookie #define SYS_lremovexattr __NR_lremovexattr #define SYS_lseek __NR_lseek #define SYS_lsetxattr __NR_lsetxattr #define SYS_lstat __NR_lstat #define SYS_madvise __NR_madvise #define SYS_mbind __NR_mbind #define SYS_membarrier __NR_membarrier #define SYS_memfd_create __NR_memfd_create #define SYS_migrate_pages __NR_migrate_pages #define SYS_mincore __NR_mincore #define SYS_mkdir __NR_mkdir #define SYS_mkdirat __NR_mkdirat #define SYS_mknod __NR_mknod #define SYS_mknodat __NR_mknodat #define SYS_mlock __NR_mlock #define SYS_mlock2 __NR_mlock2 #define SYS_mlockall __NR_mlockall #define SYS_mmap __NR_mmap #define SYS_modify_ldt __NR_modify_ldt #define SYS_mount __NR_mount #define SYS_move_pages __NR_move_pages #define SYS_mprotect __NR_mprotect #define SYS_mq_getsetattr __NR_mq_getsetattr #define SYS_mq_notify __NR_mq_notify #define SYS_mq_open __NR_mq_open #define SYS_mq_timedreceive __NR_mq_timedreceive #define SYS_mq_timedsend __NR_mq_timedsend #define SYS_mq_unlink __NR_mq_unlink #define SYS_mremap __NR_mremap #define SYS_msgctl __NR_msgctl #define SYS_msgget __NR_msgget #define SYS_msgrcv __NR_msgrcv #define SYS_msgsnd __NR_msgsnd #define SYS_msync __NR_msync #define SYS_munlock __NR_munlock #define SYS_munlockall __NR_munlockall #define SYS_munmap __NR_munmap #define SYS_name_to_handle_at __NR_name_to_handle_at #define SYS_nanosleep __NR_nanosleep #define SYS_newfstatat __NR_newfstatat #define SYS_nfsservctl __NR_nfsservctl #define SYS_open __NR_open #define SYS_open_by_handle_at __NR_open_by_handle_at #define SYS_openat __NR_openat #define SYS_pause __NR_pause #define SYS_perf_event_open __NR_perf_event_open #define SYS_personality __NR_personality #define SYS_pipe __NR_pipe #define SYS_pipe2 __NR_pipe2 #define SYS_pivot_root __NR_pivot_root #define SYS_poll __NR_poll #define SYS_ppoll __NR_ppoll #define SYS_prctl __NR_prctl #define SYS_pread64 __NR_pread64 #define SYS_preadv __NR_preadv #define SYS_prlimit64 __NR_prlimit64 #define SYS_process_vm_readv __NR_process_vm_readv #define SYS_process_vm_writev __NR_process_vm_writev #define SYS_pselect6 __NR_pselect6 #define SYS_ptrace __NR_ptrace #define SYS_putpmsg __NR_putpmsg #define SYS_pwrite64 __NR_pwrite64 #define SYS_pwritev __NR_pwritev #define SYS_query_module __NR_query_module #define SYS_quotactl __NR_quotactl #define SYS_read __NR_read #define SYS_readahead __NR_readahead #define SYS_readlink __NR_readlink #define SYS_readlinkat __NR_readlinkat #define SYS_readv __NR_readv #define SYS_reboot __NR_reboot #define SYS_recvfrom __NR_recvfrom #define SYS_recvmmsg __NR_recvmmsg #define SYS_recvmsg __NR_recvmsg #define SYS_remap_file_pages __NR_remap_file_pages #define SYS_removexattr __NR_removexattr #define SYS_rename __NR_rename #define SYS_renameat __NR_renameat #define SYS_renameat2 __NR_renameat2 #define SYS_request_key __NR_request_key #define SYS_restart_syscall __NR_restart_syscall #define SYS_rmdir __NR_rmdir #define SYS_rt_sigaction __NR_rt_sigaction #define SYS_rt_sigpending __NR_rt_sigpending #define SYS_rt_sigprocmask __NR_rt_sigprocmask #define SYS_rt_sigqueueinfo __NR_rt_sigqueueinfo #define SYS_rt_sigreturn __NR_rt_sigreturn #define SYS_rt_sigsuspend __NR_rt_sigsuspend #define SYS_rt_sigtimedwait __NR_rt_sigtimedwait #define SYS_rt_tgsigqueueinfo __NR_rt_tgsigqueueinfo #define SYS_sched_get_priority_max __NR_sched_get_priority_max #define SYS_sched_get_priority_min __NR_sched_get_priority_min #define SYS_sched_getaffinity __NR_sched_getaffinity #define SYS_sched_getattr __NR_sched_getattr #define SYS_sched_getparam __NR_sched_getparam #define SYS_sched_getscheduler __NR_sched_getscheduler #define SYS_sched_rr_get_interval __NR_sched_rr_get_interval #define SYS_sched_setaffinity __NR_sched_setaffinity #define SYS_sched_setattr __NR_sched_setattr #define SYS_sched_setparam __NR_sched_setparam #define SYS_sched_setscheduler __NR_sched_setscheduler #define SYS_sched_yield __NR_sched_yield #define SYS_seccomp __NR_seccomp #define SYS_security __NR_security #define SYS_select __NR_select #define SYS_semctl __NR_semctl #define SYS_semget __NR_semget #define SYS_semop __NR_semop #define SYS_semtimedop __NR_semtimedop #define SYS_sendfile __NR_sendfile #define SYS_sendmmsg __NR_sendmmsg #define SYS_sendmsg __NR_sendmsg #define SYS_sendto __NR_sendto #define SYS_set_mempolicy __NR_set_mempolicy #define SYS_set_robust_list __NR_set_robust_list #define SYS_set_thread_area __NR_set_thread_area #define SYS_set_tid_address __NR_set_tid_address #define SYS_setdomainname __NR_setdomainname #define SYS_setfsgid __NR_setfsgid #define SYS_setfsuid __NR_setfsuid #define SYS_setgid __NR_setgid #define SYS_setgroups __NR_setgroups #define SYS_sethostname __NR_sethostname #define SYS_setitimer __NR_setitimer #define SYS_setns __NR_setns #define SYS_setpgid __NR_setpgid #define SYS_setpriority __NR_setpriority #define SYS_setregid __NR_setregid #define SYS_setresgid __NR_setresgid #define SYS_setresuid __NR_setresuid #define SYS_setreuid __NR_setreuid #define SYS_setrlimit __NR_setrlimit #define SYS_setsid __NR_setsid #define SYS_setsockopt __NR_setsockopt #define SYS_settimeofday __NR_settimeofday #define SYS_setuid __NR_setuid #define SYS_setxattr __NR_setxattr #define SYS_shmat __NR_shmat #define SYS_shmctl __NR_shmctl #define SYS_shmdt __NR_shmdt #define SYS_shmget __NR_shmget #define SYS_shutdown __NR_shutdown #define SYS_sigaltstack __NR_sigaltstack #define SYS_signalfd __NR_signalfd #define SYS_signalfd4 __NR_signalfd4 #define SYS_socket __NR_socket #define SYS_socketpair __NR_socketpair #define SYS_splice __NR_splice #define SYS_stat __NR_stat #define SYS_statfs __NR_statfs #define SYS_swapoff __NR_swapoff #define SYS_swapon __NR_swapon #define SYS_symlink __NR_symlink #define SYS_symlinkat __NR_symlinkat #define SYS_sync __NR_sync #define SYS_sync_file_range __NR_sync_file_range #define SYS_syncfs __NR_syncfs #define SYS_sysfs __NR_sysfs #define SYS_sysinfo __NR_sysinfo #define SYS_syslog __NR_syslog #define SYS_tee __NR_tee #define SYS_tgkill __NR_tgkill #define SYS_time __NR_time #define SYS_timer_create __NR_timer_create #define SYS_timer_delete __NR_timer_delete #define SYS_timer_getoverrun __NR_timer_getoverrun #define SYS_timer_gettime __NR_timer_gettime #define SYS_timer_settime __NR_timer_settime #define SYS_timerfd_create __NR_timerfd_create #define SYS_timerfd_gettime __NR_timerfd_gettime #define SYS_timerfd_settime __NR_timerfd_settime #define SYS_times __NR_times #define SYS_tkill __NR_tkill #define SYS_truncate __NR_truncate #define SYS_tuxcall __NR_tuxcall #define SYS_umask __NR_umask #define SYS_umount2 __NR_umount2 #define SYS_uname __NR_uname #define SYS_unlink __NR_unlink #define SYS_unlinkat __NR_unlinkat #define SYS_unshare __NR_unshare #define SYS_uselib __NR_uselib #define SYS_userfaultfd __NR_userfaultfd #define SYS_ustat __NR_ustat #define SYS_utime __NR_utime #define SYS_utimensat __NR_utimensat #define SYS_utimes __NR_utimes #define SYS_vfork __NR_vfork #define SYS_vhangup __NR_vhangup #define SYS_vmsplice __NR_vmsplice #define SYS_vserver __NR_vserver #define SYS_wait4 __NR_wait4 #define SYS_waitid __NR_waitid #define SYS_write __NR_write #define SYS_writev __NR_writev #endif #endif /* _BIONIC_GLIBC_SYSCALLS_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/inotify.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_INOTIFY_H_ #define _SYS_INOTIFY_H_ #include #include #include #include #include /* For O_CLOEXEC and O_NONBLOCK. */ __BEGIN_DECLS #define IN_CLOEXEC O_CLOEXEC #define IN_NONBLOCK O_NONBLOCK extern int inotify_init(void); extern int inotify_init1(int); extern int inotify_add_watch(int, const char*, uint32_t); extern int inotify_rm_watch(int, uint32_t); __END_DECLS #endif /* _SYS_INOTIFY_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/ioctl.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_IOCTL_H_ #define _SYS_IOCTL_H_ #include #include /* * NetBSD and glibc's provide some of the * terminal-related ioctl data structures such as struct winsize. */ #include #include #include #include #include __BEGIN_DECLS extern int ioctl(int, int, ...); __END_DECLS #endif /* _SYS_IOCTL_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/ioctl_compat.h ================================================ /* $NetBSD: ioctl_compat.h,v 1.15 2005/12/03 17:10:46 christos Exp $ */ /* * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. * (c) UNIX System Laboratories, Inc. * All or some portions of this file are derived from material licensed * to the University of California by American Telephone and Telegraph * Co. or Unix System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)ioctl_compat.h 8.4 (Berkeley) 1/21/94 */ #ifndef _SYS_IOCTL_COMPAT_H_ #define _SYS_IOCTL_COMPAT_H_ /*#include */ /*#include */ #if !defined(__mips__) struct tchars { char t_intrc; /* interrupt */ char t_quitc; /* quit */ char t_startc; /* start output */ char t_stopc; /* stop output */ char t_eofc; /* end-of-file */ char t_brkc; /* input delimiter (like nl) */ }; struct ltchars { char t_suspc; /* stop process signal */ char t_dsuspc; /* delayed stop process signal */ char t_rprntc; /* reprint line */ char t_flushc; /* flush output (toggles) */ char t_werasc; /* word erase */ char t_lnextc; /* literal next character */ }; /* * Structure for TIOCGETP and TIOCSETP ioctls. */ #ifndef _SGTTYB_ #define _SGTTYB_ struct sgttyb { char sg_ispeed; /* input speed */ char sg_ospeed; /* output speed */ char sg_erase; /* erase character */ char sg_kill; /* kill character */ short sg_flags; /* mode flags */ }; #endif #endif #ifdef USE_OLD_TTY # undef TIOCGETD # define TIOCGETD _IOR('t', 0, int) /* get line discipline */ # undef TIOCSETD # define TIOCSETD _IOW('t', 1, int) /* set line discipline */ #else # define OTIOCGETD _IOR('t', 0, int) /* get line discipline */ # define OTIOCSETD _IOW('t', 1, int) /* set line discipline */ #endif #define TIOCHPCL _IO('t', 2) /* hang up on last close */ #if !defined(__mips__) #define TIOCGETP _IOR('t', 8,struct sgttyb)/* get parameters -- gtty */ #define TIOCSETP _IOW('t', 9,struct sgttyb)/* set parameters -- stty */ #define TIOCSETN _IOW('t',10,struct sgttyb)/* as above, but no flushtty*/ #endif #define TIOCSETC _IOW('t',17,struct tchars)/* set special characters */ #define TIOCGETC _IOR('t',18,struct tchars)/* get special characters */ #if 0 /* BUG: a bunch of these conflict with #defines in asm/termbits.h */ #define TANDEM 0x00000001 /* send stopc on out q full */ #define CBREAK 0x00000002 /* half-cooked mode */ #define LCASE 0x00000004 /* simulate lower case */ #define ECHO 0x00000008 /* enable echoing */ #define CRMOD 0x00000010 /* map \r to \r\n on output */ #define RAW 0x00000020 /* no i/o processing */ #define ODDP 0x00000040 /* get/send odd parity */ #define EVENP 0x00000080 /* get/send even parity */ #define ANYP 0x000000c0 /* get any parity/send none */ #define NLDELAY 0x00000300 /* \n delay */ #define NL0 0x00000000 #define NL1 0x00000100 /* tty 37 */ #define NL2 0x00000200 /* vt05 */ #define NL3 0x00000300 #define TBDELAY 0x00000c00 /* horizontal tab delay */ #define TAB0 0x00000000 #define TAB1 0x00000400 /* tty 37 */ #define TAB2 0x00000800 #define XTABS 0x00000c00 /* expand tabs on output */ #define CRDELAY 0x00003000 /* \r delay */ #define CR0 0x00000000 #define CR1 0x00001000 /* tn 300 */ #define CR2 0x00002000 /* tty 37 */ #define CR3 0x00003000 /* concept 100 */ #define VTDELAY 0x00004000 /* vertical tab delay */ #define FF0 0x00000000 #define FF1 0x00004000 /* tty 37 */ #define BSDELAY 0x00008000 /* \b delay */ #define BS0 0x00000000 #define BS1 0x00008000 #define ALLDELAY (NLDELAY|TBDELAY|CRDELAY|VTDELAY|BSDELAY) #define CRTBS 0x00010000 /* do backspacing for crt */ #define PRTERA 0x00020000 /* \ ... / erase */ #define CRTERA 0x00040000 /* " \b " to wipe out char */ #define TILDE 0x00080000 /* hazeltine tilde kludge */ #define MDMBUF 0x00100000 /* DTR/DCD hardware flow control */ #define LITOUT 0x00200000 /* literal output */ #define TOSTOP 0x00400000 /* stop background jobs on output */ #define FLUSHO 0x00800000 /* output being flushed (state) */ #define NOHANG 0x01000000 /* (no-op) was no SIGHUP on carrier drop */ #define L001000 0x02000000 #define CRTKIL 0x04000000 /* kill line with " \b " */ #define PASS8 0x08000000 #define CTLECH 0x10000000 /* echo control chars as ^X */ #define PENDIN 0x20000000 /* re-echo input buffer at next read */ #define DECCTQ 0x40000000 /* only ^Q starts after ^S */ #define NOFLSH 0x80000000 /* don't flush output on signal */ #endif #define TIOCLBIS _IOW('t', 127, int) /* bis local mode bits */ #define TIOCLBIC _IOW('t', 126, int) /* bic local mode bits */ #define TIOCLSET _IOW('t', 125, int) /* set entire local mode word */ #define TIOCLGET _IOR('t', 124, int) /* get local modes */ #define LCRTBS (CRTBS>>16) #define LPRTERA (PRTERA>>16) #define LCRTERA (CRTERA>>16) #define LTILDE (TILDE>>16) #define LMDMBUF (MDMBUF>>16) #define LLITOUT (LITOUT>>16) #define LTOSTOP (TOSTOP>>16) #define LFLUSHO (FLUSHO>>16) #define LNOHANG (NOHANG>>16) #define LCRTKIL (CRTKIL>>16) #define LPASS8 (PASS8>>16) #define LCTLECH (CTLECH>>16) #define LPENDIN (PENDIN>>16) #define LDECCTQ (DECCTQ>>16) #define LNOFLSH (NOFLSH>>16) #if !defined(__mips__) #define TIOCSLTC _IOW('t',117,struct ltchars)/* set local special chars*/ #define TIOCGLTC _IOR('t',116,struct ltchars)/* get local special chars*/ #endif #define OTIOCCONS _IO('t', 98) /* for hp300 -- sans int arg */ #define OTTYDISC 0 #define NETLDISC 1 #define NTTYDISC 2 #endif /* !_SYS_IOCTL_COMPAT_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/ipc.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_IPC_H #define _SYS_IPC_H #include #include #include __BEGIN_DECLS extern key_t ftok(const char* path, int id); __END_DECLS #endif /* _SYS_IPC_H */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/klog.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_KLOG_H_ #define _SYS_KLOG_H_ #include __BEGIN_DECLS /* These correspond to the kernel's SYSLOG_ACTION_whatever constants. */ #define KLOG_CLOSE 0 #define KLOG_OPEN 1 #define KLOG_READ 2 #define KLOG_READ_ALL 3 #define KLOG_READ_CLEAR 4 #define KLOG_CLEAR 5 #define KLOG_CONSOLE_OFF 6 #define KLOG_CONSOLE_ON 7 #define KLOG_CONSOLE_LEVEL 8 #define KLOG_SIZE_UNREAD 9 #define KLOG_SIZE_BUFFER 10 extern int klogctl(int, char *, int); __END_DECLS #endif /* _SYS_KLOG_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/limits.h ================================================ /* $OpenBSD: limits.h,v 1.6 2005/12/13 00:35:23 millert Exp $ */ /* * Copyright (c) 2002 Marc Espie. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE OPENBSD PROJECT AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBSD * PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _SYS_LIMITS_H_ #define _SYS_LIMITS_H_ #include #include /* Common definitions for limits.h. */ #define CHAR_BIT 8 /* number of bits in a char */ #define SCHAR_MAX 0x7f /* max value for a signed char */ #define SCHAR_MIN (-0x7f-1) /* min value for a signed char */ #define UCHAR_MAX 0xffU /* max value for an unsigned char */ #ifdef __CHAR_UNSIGNED__ # define CHAR_MIN 0 /* min value for a char */ # define CHAR_MAX 0xff /* max value for a char */ #else # define CHAR_MAX 0x7f # define CHAR_MIN (-0x7f-1) #endif #define USHRT_MAX 0xffffU /* max value for an unsigned short */ #define SHRT_MAX 0x7fff /* max value for a short */ #define SHRT_MIN (-0x7fff-1) /* min value for a short */ #define UINT_MAX 0xffffffffU /* max value for an unsigned int */ #define INT_MAX 0x7fffffff /* max value for an int */ #define INT_MIN (-0x7fffffff-1) /* min value for an int */ #ifdef __LP64__ # define ULONG_MAX 0xffffffffffffffffUL /* max value for unsigned long */ # define LONG_MAX 0x7fffffffffffffffL /* max value for a signed long */ # define LONG_MIN (-0x7fffffffffffffffL-1) /* min value for a signed long */ #else # define ULONG_MAX 0xffffffffUL /* max value for an unsigned long */ # define LONG_MAX 0x7fffffffL /* max value for a long */ # define LONG_MIN (-0x7fffffffL-1)/* min value for a long */ #endif #if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 # define ULLONG_MAX 0xffffffffffffffffULL /* max value for unsigned long long */ # define LLONG_MAX 0x7fffffffffffffffLL /* max value for a signed long long */ # define LLONG_MIN (-0x7fffffffffffffffLL-1) /* min value for a signed long long */ #endif #if __BSD_VISIBLE # define UID_MAX UINT_MAX /* max value for a uid_t */ # define GID_MAX UINT_MAX /* max value for a gid_t */ #endif #ifdef __LP64__ # define LONG_BIT 64 #else # define LONG_BIT 32 #endif /* float.h defines these as well */ # if !defined(DBL_DIG) # if defined(__DBL_DIG) # define DBL_DIG __DBL_DIG # define DBL_MAX __DBL_MAX # define DBL_MIN __DBL_MIN # define FLT_DIG __FLT_DIG # define FLT_MAX __FLT_MAX # define FLT_MIN __FLT_MIN # else # define DBL_DIG 15 # define DBL_MAX 1.7976931348623157E+308 # define DBL_MIN 2.2250738585072014E-308 # define FLT_DIG 6 # define FLT_MAX 3.40282347E+38F # define FLT_MIN 1.17549435E-38F # endif # endif /* Bionic: the following has been optimized out from our processed kernel headers */ #define CHILD_MAX 999 #define OPEN_MAX 256 /* Bionic-specific definitions */ #define _POSIX_VERSION 200809L /* Posix C language bindings version */ #define _POSIX2_VERSION -1 /* we don't support Posix command-line tools */ #define _XOPEN_VERSION 700 /* by Posix definition */ #define PTHREAD_DESTRUCTOR_ITERATIONS 4 // >= _POSIX_THREAD_DESTRUCTOR_ITERATIONS #define PTHREAD_KEYS_MAX 128 // >= _POSIX_THREAD_KEYS_MAX #define PTHREAD_THREADS_MAX 2048 // bionic has no specific limit #endif ================================================ FILE: atlas-aapt/bionic/libc/include/sys/mman.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_MMAN_H_ #define _SYS_MMAN_H_ #include #include #include __BEGIN_DECLS #ifndef MAP_ANON #define MAP_ANON MAP_ANONYMOUS #endif #define MAP_FAILED ((void *)-1) #define MREMAP_MAYMOVE 1 #define MREMAP_FIXED 2 #define POSIX_MADV_NORMAL MADV_NORMAL #define POSIX_MADV_RANDOM MADV_RANDOM #define POSIX_MADV_SEQUENTIAL MADV_SEQUENTIAL #define POSIX_MADV_WILLNEED MADV_WILLNEED #define POSIX_MADV_DONTNEED MADV_DONTNEED #if defined(__USE_FILE_OFFSET64) extern void* mmap(void*, size_t, int, int, int, off_t) __RENAME(mmap64); #else extern void* mmap(void*, size_t, int, int, int, off_t); #endif extern void* mmap64(void*, size_t, int, int, int, off64_t); extern int munmap(void*, size_t); extern int msync(const void*, size_t, int); extern int mprotect(const void*, size_t, int); extern void* mremap(void*, size_t, size_t, int, ...); extern int mlockall(int); extern int munlockall(void); extern int mlock(const void*, size_t); extern int munlock(const void*, size_t); extern int madvise(void*, size_t, int); extern int mlock(const void*, size_t); extern int munlock(const void*, size_t); extern int mincore(void*, size_t, unsigned char*); extern int posix_madvise(void*, size_t, int); __END_DECLS #endif /* _SYS_MMAN_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/mount.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_MOUNT_H #define _SYS_MOUNT_H #include #include #include __BEGIN_DECLS /* umount2 flags. */ #define MNT_FORCE 1 #define MNT_DETACH 2 #define MNT_EXPIRE 4 #define UMOUNT_NOFOLLOW 8 extern int mount(const char*, const char*, const char*, unsigned long, const void*); extern int umount(const char*); extern int umount2(const char*, int); __END_DECLS #endif /* _SYS_MOUNT_H */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/msg.h ================================================ /* * Copyright (C) 2014 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_MSG_H_ #define _SYS_MSG_H_ #include #endif /* _SYS_MSG_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/param.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_PARAM_H_ #define _SYS_PARAM_H_ #include #include #define MAXPATHLEN PATH_MAX #define MAXSYMLINKS 8 /* Macros for counting and rounding. */ #ifndef howmany #define howmany(x, y) (((x)+((y)-1))/(y)) #endif #define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) #define powerof2(x) ((((x)-1)&(x))==0) /* Macros for min/max. */ #define MIN(a,b) (((a)<(b))?(a):(b)) #define MAX(a,b) (((a)>(b))?(a):(b)) #endif /* _SYS_PARAM_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/personality.h ================================================ /* * Copyright (C) 2012 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_PERSONALITY_H_ #define _SYS_PERSONALITY_H_ #include #include __BEGIN_DECLS extern int personality (unsigned int persona); __END_DECLS #endif /* _SYS_PERSONALITY_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/poll.h ================================================ #include ================================================ FILE: atlas-aapt/bionic/libc/include/sys/prctl.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_PRCTL_H #define _SYS_PRCTL_H #include #include __BEGIN_DECLS extern int prctl(int option, ...); __END_DECLS #endif /* _SYS_PRCTL_H */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/procfs.h ================================================ /* * Copyright (C) 2014 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_PROCFS_H_ #define _SYS_PROCFS_H_ #include #include __BEGIN_DECLS typedef unsigned long elf_greg_t; typedef elf_greg_t elf_gregset_t[NGREG]; typedef fpregset_t elf_fpregset_t; #if defined(__i386__) typedef struct user_fpxregs_struct elf_fpxregset_t; #endif typedef elf_gregset_t prgregset_t; typedef elf_fpregset_t prfpregset_t; typedef pid_t lwpid_t; typedef void* psaddr_t; __END_DECLS #endif /* _SYS_PROCFS_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/ptrace.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_PTRACE_H_ #define _SYS_PTRACE_H_ #include #include #include __BEGIN_DECLS /* glibc uses different PTRACE_ names from the kernel for these two... */ #define PTRACE_POKEUSER PTRACE_POKEUSR #define PTRACE_PEEKUSER PTRACE_PEEKUSR /* glibc exports a different set of PT_ names too... */ #define PT_TRACE_ME PTRACE_TRACEME #define PT_READ_I PTRACE_PEEKTEXT #define PT_READ_D PTRACE_PEEKDATA #define PT_READ_U PTRACE_PEEKUSR #define PT_WRITE_I PTRACE_POKETEXT #define PT_WRITE_D PTRACE_POKEDATA #define PT_WRITE_U PTRACE_POKEUSR #define PT_CONT PTRACE_CONT #define PT_KILL PTRACE_KILL #define PT_STEP PTRACE_SINGLESTEP #define PT_GETFPREGS PTRACE_GETFPREGS #define PT_ATTACH PTRACE_ATTACH #define PT_DETACH PTRACE_DETACH #define PT_SYSCALL PTRACE_SYSCALL #define PT_SETOPTIONS PTRACE_SETOPTIONS #define PT_GETEVENTMSG PTRACE_GETEVENTMSG #define PT_GETSIGINFO PTRACE_GETSIGINFO #define PT_SETSIGINFO PTRACE_SETSIGINFO long ptrace(int, ...); __END_DECLS #endif /* _SYS_PTRACE_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/queue.h ================================================ /* * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)queue.h 8.5 (Berkeley) 8/20/94 */ #ifndef _SYS_QUEUE_H_ #define _SYS_QUEUE_H_ /* * This file defines five types of data structures: singly-linked lists, * lists, simple queues, tail queues, and circular queues. * * A singly-linked list is headed by a single forward pointer. The * elements are singly linked for minimum space and pointer manipulation * overhead at the expense of O(n) removal for arbitrary elements. New * elements can be added to the list after an existing element or at the * head of the list. Elements being removed from the head of the list * should use the explicit macro for this purpose for optimum * efficiency. A singly-linked list may only be traversed in the forward * direction. Singly-linked lists are ideal for applications with large * datasets and few or no removals or for implementing a LIFO queue. * * A list is headed by a single forward pointer (or an array of forward * pointers for a hash table header). The elements are doubly linked * so that an arbitrary element can be removed without a need to * traverse the list. New elements can be added to the list before * or after an existing element or at the head of the list. A list * may only be traversed in the forward direction. * * A simple queue is headed by a pair of pointers, one the head of the * list and the other to the tail of the list. The elements are singly * linked to save space, so elements can only be removed from the * head of the list. New elements can be added to the list after * an existing element, at the head of the list, or at the end of the * list. A simple queue may only be traversed in the forward direction. * * A tail queue is headed by a pair of pointers, one to the head of the * list and the other to the tail of the list. The elements are doubly * linked so that an arbitrary element can be removed without a need to * traverse the list. New elements can be added to the list before or * after an existing element, at the head of the list, or at the end of * the list. A tail queue may be traversed in either direction. * * A circle queue is headed by a pair of pointers, one to the head of the * list and the other to the tail of the list. The elements are doubly * linked so that an arbitrary element can be removed without a need to * traverse the list. New elements can be added to the list before or after * an existing element, at the head of the list, or at the end of the list. * A circle queue may be traversed in either direction, but has a more * complex end of list detection. * * For details on the use of these macros, see the queue(3) manual page. */ /* * List definitions. */ #define LIST_HEAD(name, type) \ struct name { \ struct type *lh_first; /* first element */ \ } #define LIST_HEAD_INITIALIZER(head) \ { NULL } #define LIST_ENTRY(type) \ struct { \ struct type *le_next; /* next element */ \ struct type **le_prev; /* address of previous next element */ \ } /* * List functions. */ #define LIST_INIT(head) do { \ (head)->lh_first = NULL; \ } while (/*CONSTCOND*/0) #define LIST_INSERT_AFTER(listelm, elm, field) do { \ if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \ (listelm)->field.le_next->field.le_prev = \ &(elm)->field.le_next; \ (listelm)->field.le_next = (elm); \ (elm)->field.le_prev = &(listelm)->field.le_next; \ } while (/*CONSTCOND*/0) #define LIST_INSERT_BEFORE(listelm, elm, field) do { \ (elm)->field.le_prev = (listelm)->field.le_prev; \ (elm)->field.le_next = (listelm); \ *(listelm)->field.le_prev = (elm); \ (listelm)->field.le_prev = &(elm)->field.le_next; \ } while (/*CONSTCOND*/0) #define LIST_INSERT_HEAD(head, elm, field) do { \ if (((elm)->field.le_next = (head)->lh_first) != NULL) \ (head)->lh_first->field.le_prev = &(elm)->field.le_next;\ (head)->lh_first = (elm); \ (elm)->field.le_prev = &(head)->lh_first; \ } while (/*CONSTCOND*/0) #define LIST_REMOVE(elm, field) do { \ if ((elm)->field.le_next != NULL) \ (elm)->field.le_next->field.le_prev = \ (elm)->field.le_prev; \ *(elm)->field.le_prev = (elm)->field.le_next; \ } while (/*CONSTCOND*/0) #define LIST_FOREACH(var, head, field) \ for ((var) = ((head)->lh_first); \ (var); \ (var) = ((var)->field.le_next)) /* * List access methods. */ #define LIST_EMPTY(head) ((head)->lh_first == NULL) #define LIST_FIRST(head) ((head)->lh_first) #define LIST_NEXT(elm, field) ((elm)->field.le_next) /* * Singly-linked List definitions. */ #define SLIST_HEAD(name, type) \ struct name { \ struct type *slh_first; /* first element */ \ } #define SLIST_HEAD_INITIALIZER(head) \ { NULL } #define SLIST_ENTRY(type) \ struct { \ struct type *sle_next; /* next element */ \ } /* * Singly-linked List functions. */ #define SLIST_INIT(head) do { \ (head)->slh_first = NULL; \ } while (/*CONSTCOND*/0) #define SLIST_INSERT_AFTER(slistelm, elm, field) do { \ (elm)->field.sle_next = (slistelm)->field.sle_next; \ (slistelm)->field.sle_next = (elm); \ } while (/*CONSTCOND*/0) #define SLIST_INSERT_HEAD(head, elm, field) do { \ (elm)->field.sle_next = (head)->slh_first; \ (head)->slh_first = (elm); \ } while (/*CONSTCOND*/0) #define SLIST_REMOVE_HEAD(head, field) do { \ (head)->slh_first = (head)->slh_first->field.sle_next; \ } while (/*CONSTCOND*/0) #define SLIST_REMOVE(head, elm, type, field) do { \ if ((head)->slh_first == (elm)) { \ SLIST_REMOVE_HEAD((head), field); \ } \ else { \ struct type *curelm = (head)->slh_first; \ while(curelm->field.sle_next != (elm)) \ curelm = curelm->field.sle_next; \ curelm->field.sle_next = \ curelm->field.sle_next->field.sle_next; \ } \ } while (/*CONSTCOND*/0) #define SLIST_FOREACH(var, head, field) \ for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next) /* * Singly-linked List access methods. */ #define SLIST_EMPTY(head) ((head)->slh_first == NULL) #define SLIST_FIRST(head) ((head)->slh_first) #define SLIST_NEXT(elm, field) ((elm)->field.sle_next) /* * Singly-linked Tail queue declarations. */ #define STAILQ_HEAD(name, type) \ struct name { \ struct type *stqh_first; /* first element */ \ struct type **stqh_last; /* addr of last next element */ \ } #define STAILQ_HEAD_INITIALIZER(head) \ { NULL, &(head).stqh_first } #define STAILQ_ENTRY(type) \ struct { \ struct type *stqe_next; /* next element */ \ } /* * Singly-linked Tail queue functions. */ #define STAILQ_INIT(head) do { \ (head)->stqh_first = NULL; \ (head)->stqh_last = &(head)->stqh_first; \ } while (/*CONSTCOND*/0) #define STAILQ_INSERT_HEAD(head, elm, field) do { \ if (((elm)->field.stqe_next = (head)->stqh_first) == NULL) \ (head)->stqh_last = &(elm)->field.stqe_next; \ (head)->stqh_first = (elm); \ } while (/*CONSTCOND*/0) #define STAILQ_INSERT_TAIL(head, elm, field) do { \ (elm)->field.stqe_next = NULL; \ *(head)->stqh_last = (elm); \ (head)->stqh_last = &(elm)->field.stqe_next; \ } while (/*CONSTCOND*/0) #define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\ (head)->stqh_last = &(elm)->field.stqe_next; \ (listelm)->field.stqe_next = (elm); \ } while (/*CONSTCOND*/0) #define STAILQ_REMOVE_HEAD(head, field) do { \ if (((head)->stqh_first = (head)->stqh_first->field.stqe_next) == NULL) \ (head)->stqh_last = &(head)->stqh_first; \ } while (/*CONSTCOND*/0) #define STAILQ_REMOVE(head, elm, type, field) do { \ if ((head)->stqh_first == (elm)) { \ STAILQ_REMOVE_HEAD((head), field); \ } else { \ struct type *curelm = (head)->stqh_first; \ while (curelm->field.stqe_next != (elm)) \ curelm = curelm->field.stqe_next; \ if ((curelm->field.stqe_next = \ curelm->field.stqe_next->field.stqe_next) == NULL) \ (head)->stqh_last = &(curelm)->field.stqe_next; \ } \ } while (/*CONSTCOND*/0) #define STAILQ_FOREACH(var, head, field) \ for ((var) = ((head)->stqh_first); \ (var); \ (var) = ((var)->field.stqe_next)) /* * Singly-linked Tail queue access methods. */ #define STAILQ_EMPTY(head) ((head)->stqh_first == NULL) #define STAILQ_FIRST(head) ((head)->stqh_first) #define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next) /* * Simple queue definitions. */ #define SIMPLEQ_HEAD(name, type) \ struct name { \ struct type *sqh_first; /* first element */ \ struct type **sqh_last; /* addr of last next element */ \ } #define SIMPLEQ_HEAD_INITIALIZER(head) \ { NULL, &(head).sqh_first } #define SIMPLEQ_ENTRY(type) \ struct { \ struct type *sqe_next; /* next element */ \ } /* * Simple queue functions. */ #define SIMPLEQ_INIT(head) do { \ (head)->sqh_first = NULL; \ (head)->sqh_last = &(head)->sqh_first; \ } while (/*CONSTCOND*/0) #define SIMPLEQ_INSERT_HEAD(head, elm, field) do { \ if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \ (head)->sqh_last = &(elm)->field.sqe_next; \ (head)->sqh_first = (elm); \ } while (/*CONSTCOND*/0) #define SIMPLEQ_INSERT_TAIL(head, elm, field) do { \ (elm)->field.sqe_next = NULL; \ *(head)->sqh_last = (elm); \ (head)->sqh_last = &(elm)->field.sqe_next; \ } while (/*CONSTCOND*/0) #define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL)\ (head)->sqh_last = &(elm)->field.sqe_next; \ (listelm)->field.sqe_next = (elm); \ } while (/*CONSTCOND*/0) #define SIMPLEQ_REMOVE_HEAD(head, field) do { \ if (((head)->sqh_first = (head)->sqh_first->field.sqe_next) == NULL) \ (head)->sqh_last = &(head)->sqh_first; \ } while (/*CONSTCOND*/0) #define SIMPLEQ_REMOVE(head, elm, type, field) do { \ if ((head)->sqh_first == (elm)) { \ SIMPLEQ_REMOVE_HEAD((head), field); \ } else { \ struct type *curelm = (head)->sqh_first; \ while (curelm->field.sqe_next != (elm)) \ curelm = curelm->field.sqe_next; \ if ((curelm->field.sqe_next = \ curelm->field.sqe_next->field.sqe_next) == NULL) \ (head)->sqh_last = &(curelm)->field.sqe_next; \ } \ } while (/*CONSTCOND*/0) #define SIMPLEQ_FOREACH(var, head, field) \ for ((var) = ((head)->sqh_first); \ (var); \ (var) = ((var)->field.sqe_next)) /* * Simple queue access methods. */ #define SIMPLEQ_EMPTY(head) ((head)->sqh_first == NULL) #define SIMPLEQ_FIRST(head) ((head)->sqh_first) #define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next) /* * Tail queue definitions. */ #define _TAILQ_HEAD(name, type, qual) \ struct name { \ qual type *tqh_first; /* first element */ \ qual type *qual *tqh_last; /* addr of last next element */ \ } #define TAILQ_HEAD(name, type) _TAILQ_HEAD(name, struct type,) #define TAILQ_HEAD_INITIALIZER(head) \ { NULL, &(head).tqh_first } #define _TAILQ_ENTRY(type, qual) \ struct { \ qual type *tqe_next; /* next element */ \ qual type *qual *tqe_prev; /* address of previous next element */\ } #define TAILQ_ENTRY(type) _TAILQ_ENTRY(struct type,) /* * Tail queue functions. */ #define TAILQ_INIT(head) do { \ (head)->tqh_first = NULL; \ (head)->tqh_last = &(head)->tqh_first; \ } while (/*CONSTCOND*/0) #define TAILQ_INSERT_HEAD(head, elm, field) do { \ if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \ (head)->tqh_first->field.tqe_prev = \ &(elm)->field.tqe_next; \ else \ (head)->tqh_last = &(elm)->field.tqe_next; \ (head)->tqh_first = (elm); \ (elm)->field.tqe_prev = &(head)->tqh_first; \ } while (/*CONSTCOND*/0) #define TAILQ_INSERT_TAIL(head, elm, field) do { \ (elm)->field.tqe_next = NULL; \ (elm)->field.tqe_prev = (head)->tqh_last; \ *(head)->tqh_last = (elm); \ (head)->tqh_last = &(elm)->field.tqe_next; \ } while (/*CONSTCOND*/0) #define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\ (elm)->field.tqe_next->field.tqe_prev = \ &(elm)->field.tqe_next; \ else \ (head)->tqh_last = &(elm)->field.tqe_next; \ (listelm)->field.tqe_next = (elm); \ (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \ } while (/*CONSTCOND*/0) #define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \ (elm)->field.tqe_next = (listelm); \ *(listelm)->field.tqe_prev = (elm); \ (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \ } while (/*CONSTCOND*/0) #define TAILQ_REMOVE(head, elm, field) do { \ if (((elm)->field.tqe_next) != NULL) \ (elm)->field.tqe_next->field.tqe_prev = \ (elm)->field.tqe_prev; \ else \ (head)->tqh_last = (elm)->field.tqe_prev; \ *(elm)->field.tqe_prev = (elm)->field.tqe_next; \ } while (/*CONSTCOND*/0) #define TAILQ_FOREACH(var, head, field) \ for ((var) = ((head)->tqh_first); \ (var); \ (var) = ((var)->field.tqe_next)) #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \ (var); \ (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last))) /* * Tail queue access methods. */ #define TAILQ_EMPTY(head) ((head)->tqh_first == NULL) #define TAILQ_FIRST(head) ((head)->tqh_first) #define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) #define TAILQ_LAST(head, headname) \ (*(((struct headname *)((head)->tqh_last))->tqh_last)) #define TAILQ_PREV(elm, headname, field) \ (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last)) /* * Circular queue definitions. */ #define CIRCLEQ_HEAD(name, type) \ struct name { \ struct type *cqh_first; /* first element */ \ struct type *cqh_last; /* last element */ \ } #define CIRCLEQ_HEAD_INITIALIZER(head) \ { (void *)&head, (void *)&head } #define CIRCLEQ_ENTRY(type) \ struct { \ struct type *cqe_next; /* next element */ \ struct type *cqe_prev; /* previous element */ \ } /* * Circular queue functions. */ #define CIRCLEQ_INIT(head) do { \ (head)->cqh_first = (void *)(head); \ (head)->cqh_last = (void *)(head); \ } while (/*CONSTCOND*/0) #define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ (elm)->field.cqe_next = (listelm)->field.cqe_next; \ (elm)->field.cqe_prev = (listelm); \ if ((listelm)->field.cqe_next == (void *)(head)) \ (head)->cqh_last = (elm); \ else \ (listelm)->field.cqe_next->field.cqe_prev = (elm); \ (listelm)->field.cqe_next = (elm); \ } while (/*CONSTCOND*/0) #define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do { \ (elm)->field.cqe_next = (listelm); \ (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \ if ((listelm)->field.cqe_prev == (void *)(head)) \ (head)->cqh_first = (elm); \ else \ (listelm)->field.cqe_prev->field.cqe_next = (elm); \ (listelm)->field.cqe_prev = (elm); \ } while (/*CONSTCOND*/0) #define CIRCLEQ_INSERT_HEAD(head, elm, field) do { \ (elm)->field.cqe_next = (head)->cqh_first; \ (elm)->field.cqe_prev = (void *)(head); \ if ((head)->cqh_last == (void *)(head)) \ (head)->cqh_last = (elm); \ else \ (head)->cqh_first->field.cqe_prev = (elm); \ (head)->cqh_first = (elm); \ } while (/*CONSTCOND*/0) #define CIRCLEQ_INSERT_TAIL(head, elm, field) do { \ (elm)->field.cqe_next = (void *)(head); \ (elm)->field.cqe_prev = (head)->cqh_last; \ if ((head)->cqh_first == (void *)(head)) \ (head)->cqh_first = (elm); \ else \ (head)->cqh_last->field.cqe_next = (elm); \ (head)->cqh_last = (elm); \ } while (/*CONSTCOND*/0) #define CIRCLEQ_REMOVE(head, elm, field) do { \ if ((elm)->field.cqe_next == (void *)(head)) \ (head)->cqh_last = (elm)->field.cqe_prev; \ else \ (elm)->field.cqe_next->field.cqe_prev = \ (elm)->field.cqe_prev; \ if ((elm)->field.cqe_prev == (void *)(head)) \ (head)->cqh_first = (elm)->field.cqe_next; \ else \ (elm)->field.cqe_prev->field.cqe_next = \ (elm)->field.cqe_next; \ } while (/*CONSTCOND*/0) #define CIRCLEQ_FOREACH(var, head, field) \ for ((var) = ((head)->cqh_first); \ (var) != (const void *)(head); \ (var) = ((var)->field.cqe_next)) #define CIRCLEQ_FOREACH_REVERSE(var, head, field) \ for ((var) = ((head)->cqh_last); \ (var) != (const void *)(head); \ (var) = ((var)->field.cqe_prev)) /* * Circular queue access methods. */ #define CIRCLEQ_EMPTY(head) ((head)->cqh_first == (void *)(head)) #define CIRCLEQ_FIRST(head) ((head)->cqh_first) #define CIRCLEQ_LAST(head) ((head)->cqh_last) #define CIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next) #define CIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev) #define CIRCLEQ_LOOP_NEXT(head, elm, field) \ (((elm)->field.cqe_next == (void *)(head)) \ ? ((head)->cqh_first) \ : (elm->field.cqe_next)) #define CIRCLEQ_LOOP_PREV(head, elm, field) \ (((elm)->field.cqe_prev == (void *)(head)) \ ? ((head)->cqh_last) \ : (elm->field.cqe_prev)) #endif /* sys/queue.h */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/reboot.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_REBOOT_H_ #define _SYS_REBOOT_H_ #include #include __BEGIN_DECLS /* use glibc names as well */ #define RB_AUTOBOOT LINUX_REBOOT_CMD_RESTART #define RB_HALT_SYSTEM LINUX_REBOOT_CMD_HALT #define RB_ENABLE_CAD LINUX_REBOOT_CMD_CAD_ON #define RB_DISABLE_CAD LINUX_REBOOT_CMD_CAD_OFF #define RB_POWER_OFF LINUX_REBOOT_CMD_POWER_OFF extern int reboot(int reboot_type); __END_DECLS #endif /* _SYS_REBOOT_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/reg.h ================================================ /* * Copyright (C) 2014 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_REG_H_ #define _SYS_REG_H_ #if defined(__i386__) #define EBX 0 #define ECX 1 #define EDX 2 #define ESI 3 #define EDI 4 #define EBP 5 #define EAX 6 #define DS 7 #define ES 8 #define FS 9 #define GS 10 #define ORIG_EAX 11 #define EIP 12 #define CS 13 #define EFL 14 #define UESP 15 #define SS 16 #elif defined(__x86_64__) #define R15 0 #define R14 1 #define R13 2 #define R12 3 #define RBP 4 #define RBX 5 #define R11 6 #define R10 7 #define R9 8 #define R8 9 #define RAX 10 #define RCX 11 #define RDX 12 #define RSI 13 #define RDI 14 #define ORIG_RAX 15 #define RIP 16 #define CS 17 #define EFLAGS 18 #define RSP 19 #define SS 20 #define FS_BASE 21 #define GS_BASE 22 #define DS 23 #define ES 24 #define FS 25 #define GS 26 #endif #endif /* _SYS_REG_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/resource.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_RESOURCE_H_ #define _SYS_RESOURCE_H_ #include #include #include __BEGIN_DECLS /* The kernel header doesn't have these, but POSIX does. */ #define RLIM_SAVED_CUR RLIM_INFINITY #define RLIM_SAVED_MAX RLIM_INFINITY typedef unsigned long rlim_t; extern int getrlimit(int, struct rlimit*); extern int setrlimit(int, const struct rlimit*); extern int getrlimit64(int, struct rlimit64*); extern int setrlimit64(int, const struct rlimit64*); extern int getpriority(int, int); extern int setpriority(int, int, int); extern int getrusage(int, struct rusage*); extern int prlimit(pid_t, int, const struct rlimit*, struct rlimit*); extern int prlimit64(pid_t, int, const struct rlimit64*, struct rlimit64*); __END_DECLS #endif /* _SYS_RESOURCE_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/select.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_SELECT_H_ #define _SYS_SELECT_H_ #include #include #include #include __BEGIN_DECLS #define FD_SETSIZE 1024 #define NFDBITS (8 * sizeof(unsigned long)) #define __FDSET_LONGS (FD_SETSIZE/NFDBITS) typedef struct { unsigned long fds_bits[__FDSET_LONGS]; } fd_set; #define __FDELT(fd) ((fd) / NFDBITS) #define __FDMASK(fd) (1UL << ((fd) % NFDBITS)) #define __FDS_BITS(set) (((fd_set*)(set))->fds_bits) /* Inline loop so we don't have to declare memset. */ #define FD_ZERO(set) \ do { \ size_t __i; \ for (__i = 0; __i < __FDSET_LONGS; ++__i) { \ (set)->fds_bits[__i] = 0; \ } \ } while (0) extern void __FD_CLR_chk(int, fd_set*, size_t); extern void __FD_SET_chk(int, fd_set*, size_t); extern int __FD_ISSET_chk(int, fd_set*, size_t); #if defined(__BIONIC_FORTIFY) #define FD_CLR(fd, set) __FD_CLR_chk(fd, set, __bos(set)) #define FD_SET(fd, set) __FD_SET_chk(fd, set, __bos(set)) #define FD_ISSET(fd, set) __FD_ISSET_chk(fd, set, __bos(set)) #else #define FD_CLR(fd, set) (__FDS_BITS(set)[__FDELT(fd)] &= ~__FDMASK(fd)) #define FD_SET(fd, set) (__FDS_BITS(set)[__FDELT(fd)] |= __FDMASK(fd)) #define FD_ISSET(fd, set) ((__FDS_BITS(set)[__FDELT(fd)] & __FDMASK(fd)) != 0) #endif /* defined(__BIONIC_FORTIFY) */ extern int select(int, fd_set*, fd_set*, fd_set*, struct timeval*); extern int pselect(int, fd_set*, fd_set*, fd_set*, const struct timespec*, const sigset_t*); __END_DECLS #endif /* _SYS_SELECT_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/sem.h ================================================ /* * Copyright (C) 2014 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_SEM_H_ #define _SYS_SEM_H_ #include #endif /* _SYS_SEM_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/sendfile.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_SENDFILE_H_ #define _SYS_SENDFILE_H_ #include #include __BEGIN_DECLS #if defined(__USE_FILE_OFFSET64) extern ssize_t sendfile(int out_fd, int in_fd, off_t* offset, size_t count) __RENAME(sendfile64); #else extern ssize_t sendfile(int out_fd, int in_fd, off_t* offset, size_t count); #endif extern ssize_t sendfile64(int out_fd, int in_fd, off64_t* offset, size_t count); __END_DECLS #endif /* _SYS_SENDFILE_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/signal.h ================================================ #include ================================================ FILE: atlas-aapt/bionic/libc/include/sys/signalfd.h ================================================ /* * Copyright (C) 2013 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_SIGNALFD_H_ #define _SYS_SIGNALFD_H_ #include #include #include __BEGIN_DECLS extern int signalfd(int fd, const sigset_t* mask, int flags) __nonnull((2)); __END_DECLS #endif /* _SYS_SIGNALFD_H */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/socket.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_SOCKET_H_ #define _SYS_SOCKET_H_ #include #include #include #include #include #include #include #include #include __BEGIN_DECLS #define sockaddr_storage __kernel_sockaddr_storage typedef unsigned short sa_family_t; struct timespec; #ifdef __mips__ #define SOCK_DGRAM 1 #define SOCK_STREAM 2 #else #define SOCK_STREAM 1 #define SOCK_DGRAM 2 #endif #define SOCK_RAW 3 #define SOCK_RDM 4 #define SOCK_SEQPACKET 5 #define SOCK_DCCP 6 #define SOCK_PACKET 10 #define SOCK_CLOEXEC O_CLOEXEC #define SOCK_NONBLOCK O_NONBLOCK enum { SHUT_RD = 0, #define SHUT_RD SHUT_RD SHUT_WR, #define SHUT_WR SHUT_WR SHUT_RDWR #define SHUT_RDWR SHUT_RDWR }; struct sockaddr { sa_family_t sa_family; char sa_data[14]; }; struct linger { int l_onoff; int l_linger; }; struct msghdr { void* msg_name; socklen_t msg_namelen; struct iovec* msg_iov; size_t msg_iovlen; void* msg_control; size_t msg_controllen; int msg_flags; }; struct mmsghdr { struct msghdr msg_hdr; unsigned int msg_len; }; struct cmsghdr { size_t cmsg_len; int cmsg_level; int cmsg_type; }; #define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr((mhdr), (cmsg)) #define CMSG_ALIGN(len) ( ((len)+sizeof(long)-1) & ~(sizeof(long)-1) ) #define CMSG_DATA(cmsg) (((unsigned char*)(cmsg) + CMSG_ALIGN(sizeof(struct cmsghdr)))) #define CMSG_SPACE(len) (CMSG_ALIGN(sizeof(struct cmsghdr)) + CMSG_ALIGN(len)) #define CMSG_LEN(len) (CMSG_ALIGN(sizeof(struct cmsghdr)) + (len)) #define CMSG_FIRSTHDR(msg) \ ((msg)->msg_controllen >= sizeof(struct cmsghdr) \ ? (struct cmsghdr*) (msg)->msg_control : (struct cmsghdr*) NULL) #define CMSG_OK(mhdr, cmsg) ((cmsg)->cmsg_len >= sizeof(struct cmsghdr) && (cmsg)->cmsg_len <= (unsigned long) ((mhdr)->msg_controllen - ((char*)(cmsg) - (char*)(mhdr)->msg_control))) struct cmsghdr* __cmsg_nxthdr(struct msghdr*, struct cmsghdr*); #define SCM_RIGHTS 0x01 #define SCM_CREDENTIALS 0x02 #define SCM_SECURITY 0x03 struct ucred { pid_t pid; uid_t uid; gid_t gid; }; #define AF_UNSPEC 0 #define AF_UNIX 1 #define AF_LOCAL 1 #define AF_INET 2 #define AF_AX25 3 #define AF_IPX 4 #define AF_APPLETALK 5 #define AF_NETROM 6 #define AF_BRIDGE 7 #define AF_ATMPVC 8 #define AF_X25 9 #define AF_INET6 10 #define AF_ROSE 11 #define AF_DECnet 12 #define AF_NETBEUI 13 #define AF_SECURITY 14 #define AF_KEY 15 #define AF_NETLINK 16 #define AF_ROUTE AF_NETLINK #define AF_PACKET 17 #define AF_ASH 18 #define AF_ECONET 19 #define AF_ATMSVC 20 #define AF_RDS 21 #define AF_SNA 22 #define AF_IRDA 23 #define AF_PPPOX 24 #define AF_WANPIPE 25 #define AF_LLC 26 #define AF_CAN 29 #define AF_TIPC 30 #define AF_BLUETOOTH 31 #define AF_IUCV 32 #define AF_RXRPC 33 #define AF_ISDN 34 #define AF_PHONET 35 #define AF_IEEE802154 36 #define AF_CAIF 37 #define AF_ALG 38 #define AF_NFC 39 #define AF_VSOCK 40 #define AF_MAX 41 #define PF_UNSPEC AF_UNSPEC #define PF_UNIX AF_UNIX #define PF_LOCAL AF_LOCAL #define PF_INET AF_INET #define PF_AX25 AF_AX25 #define PF_IPX AF_IPX #define PF_APPLETALK AF_APPLETALK #define PF_NETROM AF_NETROM #define PF_BRIDGE AF_BRIDGE #define PF_ATMPVC AF_ATMPVC #define PF_X25 AF_X25 #define PF_INET6 AF_INET6 #define PF_ROSE AF_ROSE #define PF_DECnet AF_DECnet #define PF_NETBEUI AF_NETBEUI #define PF_SECURITY AF_SECURITY #define PF_KEY AF_KEY #define PF_NETLINK AF_NETLINK #define PF_ROUTE AF_ROUTE #define PF_PACKET AF_PACKET #define PF_ASH AF_ASH #define PF_ECONET AF_ECONET #define PF_ATMSVC AF_ATMSVC #define PF_RDS AF_RDS #define PF_SNA AF_SNA #define PF_IRDA AF_IRDA #define PF_PPPOX AF_PPPOX #define PF_WANPIPE AF_WANPIPE #define PF_LLC AF_LLC #define PF_CAN AF_CAN #define PF_TIPC AF_TIPC #define PF_BLUETOOTH AF_BLUETOOTH #define PF_IUCV AF_IUCV #define PF_RXRPC AF_RXRPC #define PF_ISDN AF_ISDN #define PF_PHONET AF_PHONET #define PF_IEEE802154 AF_IEEE802154 #define PF_CAIF AF_CAIF #define PF_ALG AF_ALG #define PF_NFC AF_NFC #define PF_VSOCK AF_VSOCK #define PF_MAX AF_MAX #define SOMAXCONN 128 #define MSG_OOB 1 #define MSG_PEEK 2 #define MSG_DONTROUTE 4 #define MSG_TRYHARD 4 #define MSG_CTRUNC 8 #define MSG_PROBE 0x10 #define MSG_TRUNC 0x20 #define MSG_DONTWAIT 0x40 #define MSG_EOR 0x80 #define MSG_WAITALL 0x100 #define MSG_FIN 0x200 #define MSG_SYN 0x400 #define MSG_CONFIRM 0x800 #define MSG_RST 0x1000 #define MSG_ERRQUEUE 0x2000 #define MSG_NOSIGNAL 0x4000 #define MSG_MORE 0x8000 #define MSG_WAITFORONE 0x10000 #define MSG_FASTOPEN 0x20000000 #define MSG_CMSG_CLOEXEC 0x40000000 #define MSG_EOF MSG_FIN #define MSG_CMSG_COMPAT 0 #define SOL_IP 0 #define SOL_TCP 6 #define SOL_UDP 17 #define SOL_IPV6 41 #define SOL_ICMPV6 58 #define SOL_SCTP 132 #define SOL_RAW 255 #define SOL_IPX 256 #define SOL_AX25 257 #define SOL_ATALK 258 #define SOL_NETROM 259 #define SOL_ROSE 260 #define SOL_DECNET 261 #define SOL_X25 262 #define SOL_PACKET 263 #define SOL_ATM 264 #define SOL_AAL 265 #define SOL_IRDA 266 #define SOL_NETBEUI 267 #define SOL_LLC 268 #define SOL_DCCP 269 #define SOL_NETLINK 270 #define SOL_TIPC 271 #define IPX_TYPE 1 #ifdef __i386__ # define __socketcall extern __attribute__((__cdecl__)) #else # define __socketcall extern #endif __socketcall int accept(int, struct sockaddr*, socklen_t*); __socketcall int accept4(int, struct sockaddr*, socklen_t*, int); __socketcall int bind(int, const struct sockaddr*, int); __socketcall int connect(int, const struct sockaddr*, socklen_t); __socketcall int getpeername(int, struct sockaddr*, socklen_t*); __socketcall int getsockname(int, struct sockaddr*, socklen_t*); __socketcall int getsockopt(int, int, int, void*, socklen_t*); __socketcall int listen(int, int); __socketcall int recvmmsg(int, struct mmsghdr*, unsigned int, int, const struct timespec*); __socketcall int recvmsg(int, struct msghdr*, int); __socketcall int sendmmsg(int, const struct mmsghdr*, unsigned int, int); __socketcall int sendmsg(int, const struct msghdr*, int); __socketcall int setsockopt(int, int, int, const void*, socklen_t); __socketcall int shutdown(int, int); __socketcall int socket(int, int, int); __socketcall int socketpair(int, int, int, int*); extern ssize_t send(int, const void*, size_t, int); extern ssize_t recv(int, void*, size_t, int); __socketcall ssize_t sendto(int, const void*, size_t, int, const struct sockaddr*, socklen_t); __socketcall ssize_t recvfrom(int, void*, size_t, int, const struct sockaddr*, socklen_t*); __errordecl(__recvfrom_error, "recvfrom called with size bigger than buffer"); extern ssize_t __recvfrom_chk(int, void*, size_t, size_t, int, const struct sockaddr*, socklen_t*); extern ssize_t __recvfrom_real(int, void*, size_t, int, const struct sockaddr*, socklen_t*) __RENAME(recvfrom); #if defined(__BIONIC_FORTIFY) __BIONIC_FORTIFY_INLINE ssize_t recvfrom(int fd, void* buf, size_t len, int flags, const struct sockaddr* src_addr, socklen_t* addr_len) { size_t bos = __bos0(buf); #if !defined(__clang__) if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) { return __recvfrom_real(fd, buf, len, flags, src_addr, addr_len); } if (__builtin_constant_p(len) && (len <= bos)) { return __recvfrom_real(fd, buf, len, flags, src_addr, addr_len); } if (__builtin_constant_p(len) && (len > bos)) { __recvfrom_error(); } #endif return __recvfrom_chk(fd, buf, len, bos, flags, src_addr, addr_len); } __BIONIC_FORTIFY_INLINE ssize_t recv(int socket, void* buf, size_t len, int flags) { return recvfrom(socket, buf, len, flags, NULL, 0); } #endif /* __BIONIC_FORTIFY */ #undef __socketcall __END_DECLS #endif /* _SYS_SOCKET_H */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/socketcalls.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_SOCKETCALLS_H_ #define _SYS_SOCKETCALLS_H_ /* socketcalls by number */ #define SYS_SOCKET 1 /* sys_socket(2) */ #define SYS_BIND 2 /* sys_bind(2) */ #define SYS_CONNECT 3 /* sys_connect(2) */ #define SYS_LISTEN 4 /* sys_listen(2) */ #define SYS_ACCEPT 5 /* sys_accept(2) */ #define SYS_GETSOCKNAME 6 /* sys_getsockname(2) */ #define SYS_GETPEERNAME 7 /* sys_getpeername(2) */ #define SYS_SOCKETPAIR 8 /* sys_socketpair(2) */ #define SYS_SEND 9 /* sys_send(2) */ #define SYS_RECV 10 /* sys_recv(2) */ #define SYS_SENDTO 11 /* sys_sendto(2) */ #define SYS_RECVFROM 12 /* sys_recvfrom(2) */ #define SYS_SHUTDOWN 13 /* sys_shutdown(2) */ #define SYS_SETSOCKOPT 14 /* sys_setsockopt(2) */ #define SYS_GETSOCKOPT 15 /* sys_getsockopt(2) */ #define SYS_SENDMSG 16 /* sys_sendmsg(2) */ #define SYS_RECVMSG 17 /* sys_recvmsg(2) */ #define SYS_ACCEPT4 18 /* sys_accept4(2) */ #define SYS_RECVMMSG 19 /* sys_recvmmsg(2) */ #define SYS_SENDMMSG 20 /* sys_sendmmsg(2) */ #endif /* _SYS_SOCKETCALLS_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/stat.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_STAT_H_ #define _SYS_STAT_H_ #include #include #include #include __BEGIN_DECLS #if defined(__aarch64__) || (defined(__mips__) && defined(__LP64__)) #define __STAT64_BODY \ dev_t st_dev; \ ino_t st_ino; \ mode_t st_mode; \ nlink_t st_nlink; \ uid_t st_uid; \ gid_t st_gid; \ dev_t st_rdev; \ unsigned long __pad1; \ off_t st_size; \ int st_blksize; \ int __pad2; \ long st_blocks; \ struct timespec st_atim; \ struct timespec st_mtim; \ struct timespec st_ctim; \ unsigned int __unused4; \ unsigned int __unused5; \ #elif defined(__mips__) && !defined(__LP64__) #define __STAT64_BODY \ unsigned int st_dev; \ unsigned int __pad0[3]; \ unsigned long long st_ino; \ mode_t st_mode; \ nlink_t st_nlink; \ uid_t st_uid; \ gid_t st_gid; \ unsigned int st_rdev; \ unsigned int __pad1[3]; \ long long st_size; \ struct timespec st_atim; \ struct timespec st_mtim; \ struct timespec st_ctim; \ unsigned int st_blksize; \ unsigned int __pad2; \ unsigned long long st_blocks; \ #elif defined(__x86_64__) #define __STAT64_BODY \ dev_t st_dev; \ ino_t st_ino; \ unsigned long st_nlink; \ mode_t st_mode; \ uid_t st_uid; \ gid_t st_gid; \ unsigned int __pad0; \ dev_t st_rdev; \ off_t st_size; \ long st_blksize; \ long st_blocks; \ struct timespec st_atim; \ struct timespec st_mtim; \ struct timespec st_ctim; \ long __pad3[3]; \ #else /* __arm__ || __i386__ */ #define __STAT64_BODY \ unsigned long long st_dev; \ unsigned char __pad0[4]; \ unsigned long __st_ino; \ unsigned int st_mode; \ nlink_t st_nlink; \ uid_t st_uid; \ gid_t st_gid; \ unsigned long long st_rdev; \ unsigned char __pad3[4]; \ long long st_size; \ unsigned long st_blksize; \ unsigned long long st_blocks; \ struct timespec st_atim; \ struct timespec st_mtim; \ struct timespec st_ctim; \ unsigned long long st_ino; \ #endif struct stat { __STAT64_BODY }; struct stat64 { __STAT64_BODY }; #undef __STAT64_BODY /* Compatibility with older versions of POSIX. */ #define st_atime st_atim.tv_sec #define st_mtime st_mtim.tv_sec #define st_ctime st_ctim.tv_sec /* Compatibility with glibc. */ #define st_atimensec st_atim.tv_nsec #define st_mtimensec st_mtim.tv_nsec #define st_ctimensec st_ctim.tv_nsec #ifdef __USE_BSD /* Permission macros provided by glibc for compatibility with BSDs. */ #define ACCESSPERMS (S_IRWXU | S_IRWXG | S_IRWXO) /* 0777 */ #define ALLPERMS (S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO) /* 07777 */ #define DEFFILEMODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH) /* 0666 */ #endif extern int chmod(const char*, mode_t); extern int fchmod(int, mode_t); extern int mkdir(const char*, mode_t); extern int fstat(int, struct stat*); extern int fstat64(int, struct stat64*); extern int fstatat(int, const char*, struct stat*, int); extern int fstatat64(int, const char*, struct stat64*, int); extern int lstat(const char*, struct stat*); extern int lstat64(const char*, struct stat64*); extern int stat(const char*, struct stat*); extern int stat64(const char*, struct stat64*); extern int mknod(const char*, mode_t, dev_t); extern mode_t umask(mode_t); extern mode_t __umask_chk(mode_t); extern mode_t __umask_real(mode_t) __RENAME(umask); __errordecl(__umask_invalid_mode, "umask called with invalid mode"); #if defined(__BIONIC_FORTIFY) __BIONIC_FORTIFY_INLINE mode_t umask(mode_t mode) { #if !defined(__clang__) if (__builtin_constant_p(mode)) { if ((mode & 0777) != mode) { __umask_invalid_mode(); } return __umask_real(mode); } #endif return __umask_chk(mode); } #endif /* defined(__BIONIC_FORTIFY) */ extern int mkfifo(const char*, mode_t) __INTRODUCED_IN(21); extern int mkfifoat(int, const char*, mode_t); extern int fchmodat(int, const char*, mode_t, int); extern int mkdirat(int, const char*, mode_t); extern int mknodat(int, const char*, mode_t, dev_t); #define UTIME_NOW ((1L << 30) - 1L) #define UTIME_OMIT ((1L << 30) - 2L) extern int utimensat(int fd, const char *path, const struct timespec times[2], int flags); extern int futimens(int fd, const struct timespec times[2]); #if __ANDROID_API__ < 21 #include #endif __END_DECLS #endif /* _SYS_STAT_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/statfs.h ================================================ #include ================================================ FILE: atlas-aapt/bionic/libc/include/sys/statvfs.h ================================================ /* * Copyright (C) 2013 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef _SYS_STATVFS_H_ #define _SYS_STATVFS_H_ #include #include #include __BEGIN_DECLS #ifdef __LP64__ #define __STATVFS64_RESERVED uint32_t __f_reserved[6]; #else #define __STATVFS64_RESERVED #endif #define __STATVFS64_BODY \ unsigned long f_bsize; \ unsigned long f_frsize; \ fsblkcnt_t f_blocks; \ fsblkcnt_t f_bfree; \ fsblkcnt_t f_bavail; \ fsfilcnt_t f_files; \ fsfilcnt_t f_ffree; \ fsfilcnt_t f_favail; \ unsigned long f_fsid; \ unsigned long f_flag; \ unsigned long f_namemax; \ __STATVFS64_RESERVED struct statvfs { __STATVFS64_BODY }; struct statvfs64 { __STATVFS64_BODY }; #undef __STATVFS64_BODY #undef __STATVFS64_RESERVED #define ST_RDONLY 0x0001 #define ST_NOSUID 0x0002 #define ST_NODEV 0x0004 #define ST_NOEXEC 0x0008 #define ST_SYNCHRONOUS 0x0010 #define ST_MANDLOCK 0x0040 #define ST_NOATIME 0x0400 #define ST_NODIRATIME 0x0800 #define ST_RELATIME 0x1000 extern int statvfs(const char* __restrict, struct statvfs* __restrict) __nonnull((1, 2)); extern int statvfs64(const char* __restrict, struct statvfs64* __restrict) __nonnull((1, 2)); extern int fstatvfs(int, struct statvfs*) __nonnull((2)); extern int fstatvfs64(int, struct statvfs64*) __nonnull((2)); __END_DECLS #endif /* _SYS_STATVFS_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/swap.h ================================================ /* * Copyright (C) 2013 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_SWAP_H_ #define _SYS_SWAP_H_ #include __BEGIN_DECLS #define SWAP_FLAG_DISCARD 0x10000 #define SWAP_FLAG_PREFER 0x8000 #define SWAP_FLAG_PRIO_MASK 0x7fff #define SWAP_FLAG_PRIO_SHIFT 0 extern int swapon(const char*, int) __nonnull((1)); extern int swapoff(const char*) __nonnull((1)); __END_DECLS #endif /* _SYS_SWAP_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/syscall.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_SYSCALL_H_ #define _SYS_SYSCALL_H_ #include /* Linux kernel __NR_* names. */ #include /* glibc-compatible SYS_* aliases. */ /* The syscall function itself is declared in , not here. */ #endif /* _SYS_SYSCALL_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/sysconf.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_SYSCONF_H_ #define _SYS_SYSCONF_H_ #include __BEGIN_DECLS /* as listed by Posix sysconf() description */ /* most of these will return -1 and ENOSYS */ #define _SC_ARG_MAX 0x0000 #define _SC_BC_BASE_MAX 0x0001 #define _SC_BC_DIM_MAX 0x0002 #define _SC_BC_SCALE_MAX 0x0003 #define _SC_BC_STRING_MAX 0x0004 #define _SC_CHILD_MAX 0x0005 #define _SC_CLK_TCK 0x0006 #define _SC_COLL_WEIGHTS_MAX 0x0007 #define _SC_EXPR_NEST_MAX 0x0008 #define _SC_LINE_MAX 0x0009 #define _SC_NGROUPS_MAX 0x000a #define _SC_OPEN_MAX 0x000b #define _SC_PASS_MAX 0x000c #define _SC_2_C_BIND 0x000d #define _SC_2_C_DEV 0x000e #define _SC_2_C_VERSION 0x000f /* Obsolescent in POSIX.1-2008, TODO: remove it. */ #define _SC_2_CHAR_TERM 0x0010 #define _SC_2_FORT_DEV 0x0011 #define _SC_2_FORT_RUN 0x0012 #define _SC_2_LOCALEDEF 0x0013 #define _SC_2_SW_DEV 0x0014 #define _SC_2_UPE 0x0015 #define _SC_2_VERSION 0x0016 #define _SC_JOB_CONTROL 0x0017 #define _SC_SAVED_IDS 0x0018 #define _SC_VERSION 0x0019 #define _SC_RE_DUP_MAX 0x001a #define _SC_STREAM_MAX 0x001b #define _SC_TZNAME_MAX 0x001c #define _SC_XOPEN_CRYPT 0x001d #define _SC_XOPEN_ENH_I18N 0x001e #define _SC_XOPEN_SHM 0x001f #define _SC_XOPEN_VERSION 0x0020 #define _SC_XOPEN_XCU_VERSION 0x0021 /* Obsolescent in POSIX.1-2008, TODO: remove it. */ #define _SC_XOPEN_REALTIME 0x0022 #define _SC_XOPEN_REALTIME_THREADS 0x0023 #define _SC_XOPEN_LEGACY 0x0024 #define _SC_ATEXIT_MAX 0x0025 #define _SC_IOV_MAX 0x0026 #define _SC_PAGESIZE 0x0027 #define _SC_PAGE_SIZE 0x0028 #define _SC_XOPEN_UNIX 0x0029 #define _SC_XBS5_ILP32_OFF32 0x002a /* Obsolescent in POSIX.1-2008, TODO: remove it. */ #define _SC_XBS5_ILP32_OFFBIG 0x002b /* Obsolescent in POSIX.1-2008, TODO: remove it. */ #define _SC_XBS5_LP64_OFF64 0x002c /* Obsolescent in POSIX.1-2008, TODO: remove it. */ #define _SC_XBS5_LPBIG_OFFBIG 0x002d /* Obsolescent in POSIX.1-2008, TODO: remove it. */ #define _SC_AIO_LISTIO_MAX 0x002e #define _SC_AIO_MAX 0x002f #define _SC_AIO_PRIO_DELTA_MAX 0x0030 #define _SC_DELAYTIMER_MAX 0x0031 #define _SC_MQ_OPEN_MAX 0x0032 #define _SC_MQ_PRIO_MAX 0x0033 #define _SC_RTSIG_MAX 0x0034 #define _SC_SEM_NSEMS_MAX 0x0035 #define _SC_SEM_VALUE_MAX 0x0036 #define _SC_SIGQUEUE_MAX 0x0037 #define _SC_TIMER_MAX 0x0038 #define _SC_ASYNCHRONOUS_IO 0x0039 #define _SC_FSYNC 0x003a #define _SC_MAPPED_FILES 0x003b #define _SC_MEMLOCK 0x003c #define _SC_MEMLOCK_RANGE 0x003d #define _SC_MEMORY_PROTECTION 0x003e #define _SC_MESSAGE_PASSING 0x003f #define _SC_PRIORITIZED_IO 0x0040 #define _SC_PRIORITY_SCHEDULING 0x0041 #define _SC_REALTIME_SIGNALS 0x0042 #define _SC_SEMAPHORES 0x0043 #define _SC_SHARED_MEMORY_OBJECTS 0x0044 #define _SC_SYNCHRONIZED_IO 0x0045 #define _SC_TIMERS 0x0046 #define _SC_GETGR_R_SIZE_MAX 0x0047 #define _SC_GETPW_R_SIZE_MAX 0x0048 #define _SC_LOGIN_NAME_MAX 0x0049 #define _SC_THREAD_DESTRUCTOR_ITERATIONS 0x004a #define _SC_THREAD_KEYS_MAX 0x004b #define _SC_THREAD_STACK_MIN 0x004c #define _SC_THREAD_THREADS_MAX 0x004d #define _SC_TTY_NAME_MAX 0x004e #define _SC_THREADS 0x004f #define _SC_THREAD_ATTR_STACKADDR 0x0050 #define _SC_THREAD_ATTR_STACKSIZE 0x0051 #define _SC_THREAD_PRIORITY_SCHEDULING 0x0052 #define _SC_THREAD_PRIO_INHERIT 0x0053 #define _SC_THREAD_PRIO_PROTECT 0x0054 #define _SC_THREAD_SAFE_FUNCTIONS 0x0055 #define _SC_NPROCESSORS_CONF 0x0060 #define _SC_NPROCESSORS_ONLN 0x0061 #define _SC_PHYS_PAGES 0x0062 #define _SC_AVPHYS_PAGES 0x0063 #define _SC_MONOTONIC_CLOCK 0x0064 #define _SC_2_PBS 0x0065 #define _SC_2_PBS_ACCOUNTING 0x0066 #define _SC_2_PBS_CHECKPOINT 0x0067 #define _SC_2_PBS_LOCATE 0x0068 #define _SC_2_PBS_MESSAGE 0x0069 #define _SC_2_PBS_TRACK 0x006a #define _SC_ADVISORY_INFO 0x006b #define _SC_BARRIERS 0x006c #define _SC_CLOCK_SELECTION 0x006d #define _SC_CPUTIME 0x006e #define _SC_HOST_NAME_MAX 0x006f #define _SC_IPV6 0x0070 #define _SC_RAW_SOCKETS 0x0071 #define _SC_READER_WRITER_LOCKS 0x0072 #define _SC_REGEXP 0x0073 #define _SC_SHELL 0x0074 #define _SC_SPAWN 0x0075 #define _SC_SPIN_LOCKS 0x0076 #define _SC_SPORADIC_SERVER 0x0077 #define _SC_SS_REPL_MAX 0x0078 #define _SC_SYMLOOP_MAX 0x0079 #define _SC_THREAD_CPUTIME 0x007a #define _SC_THREAD_PROCESS_SHARED 0x007b #define _SC_THREAD_ROBUST_PRIO_INHERIT 0x007c #define _SC_THREAD_ROBUST_PRIO_PROTECT 0x007d #define _SC_THREAD_SPORADIC_SERVER 0x007e #define _SC_TIMEOUTS 0x007f #define _SC_TRACE 0x0080 #define _SC_TRACE_EVENT_FILTER 0x0081 #define _SC_TRACE_EVENT_NAME_MAX 0x0082 #define _SC_TRACE_INHERIT 0x0083 #define _SC_TRACE_LOG 0x0084 #define _SC_TRACE_NAME_MAX 0x0085 #define _SC_TRACE_SYS_MAX 0x0086 #define _SC_TRACE_USER_EVENT_MAX 0x0087 #define _SC_TYPED_MEMORY_OBJECTS 0x0088 #define _SC_V7_ILP32_OFF32 0x0089 #define _SC_V7_ILP32_OFFBIG 0x008a #define _SC_V7_LP64_OFF64 0x008b #define _SC_V7_LPBIG_OFFBIG 0x008c #define _SC_XOPEN_STREAMS 0x008d #define _SC_XOPEN_UUCP 0x008e #define _SC_LEVEL1_ICACHE_SIZE 0x008f #define _SC_LEVEL1_ICACHE_ASSOC 0x0090 #define _SC_LEVEL1_ICACHE_LINESIZE 0x0091 #define _SC_LEVEL1_DCACHE_SIZE 0x0092 #define _SC_LEVEL1_DCACHE_ASSOC 0x0093 #define _SC_LEVEL1_DCACHE_LINESIZE 0x0094 #define _SC_LEVEL2_CACHE_SIZE 0x0095 #define _SC_LEVEL2_CACHE_ASSOC 0x0096 #define _SC_LEVEL2_CACHE_LINESIZE 0x0097 #define _SC_LEVEL3_CACHE_SIZE 0x0098 #define _SC_LEVEL3_CACHE_ASSOC 0x0099 #define _SC_LEVEL3_CACHE_LINESIZE 0x009a #define _SC_LEVEL4_CACHE_SIZE 0x009b #define _SC_LEVEL4_CACHE_ASSOC 0x009c #define _SC_LEVEL4_CACHE_LINESIZE 0x009d long sysconf(int); __END_DECLS #endif /* _SYS_SYSCONF_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/sysinfo.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_SYSINFO_H_ #define _SYS_SYSINFO_H_ #include #include __BEGIN_DECLS int sysinfo(struct sysinfo* info); int get_nprocs_conf(void); int get_nprocs(void); long get_phys_pages(void); long get_avphys_pages(void); __END_DECLS #endif /* _SYS_SYSINFO_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/syslimits.h ================================================ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/syslog.h ================================================ #include ================================================ FILE: atlas-aapt/bionic/libc/include/sys/sysmacros.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_SYSMACROS_H_ #define _SYS_SYSMACROS_H_ #define makedev(__major, __minor) \ ( \ (((__major) & 0xfffff000ULL) << 32) | (((__major) & 0xfffULL) << 8) | \ (((__minor) & 0xffffff00ULL) << 12) | (((__minor) & 0xffULL)) \ ) #define major(__dev) \ ((unsigned) ((((unsigned long long) (__dev) >> 32) & 0xfffff000) | (((__dev) >> 8) & 0xfff))) #define minor(__dev) \ ((unsigned) ((((__dev) >> 12) & 0xffffff00) | ((__dev) & 0xff))) #endif /* _SYS_SYSMACROS_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/system_properties.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _INCLUDE_SYS_SYSTEM_PROPERTIES_H #define _INCLUDE_SYS_SYSTEM_PROPERTIES_H #include __BEGIN_DECLS typedef struct prop_info prop_info; #define PROP_NAME_MAX 32 #define PROP_VALUE_MAX 92 /* Look up a system property by name, copying its value and a ** \0 terminator to the provided pointer. The total bytes ** copied will be no greater than PROP_VALUE_MAX. Returns ** the string length of the value. A property that is not ** defined is identical to a property with a length 0 value. */ int __system_property_get(const char *name, char *value); /* Set a system property by name. **/ int __system_property_set(const char *key, const char *value); /* Return a pointer to the system property named name, if it ** exists, or NULL if there is no such property. Use ** __system_property_read() to obtain the string value from ** the returned prop_info pointer. ** ** It is safe to cache the prop_info pointer to avoid future ** lookups. These returned pointers will remain valid for ** the lifetime of the system. */ const prop_info *__system_property_find(const char *name); /* Read the value of a system property. Returns the length ** of the value. Copies the value and \0 terminator into ** the provided value pointer. Total length (including ** terminator) will be no greater that PROP_VALUE_MAX. ** ** If name is nonzero, up to PROP_NAME_MAX bytes will be ** copied into the provided name pointer. The name will ** be \0 terminated. */ int __system_property_read(const prop_info *pi, char *name, char *value); /* Return a prop_info for the nth system property, or NULL if ** there is no nth property. Use __system_property_read() to ** read the value of this property. ** ** Please do not call this method. It only exists to provide ** backwards compatibility to NDK apps. Its implementation ** is inefficient and order of results may change from call ** to call. */ const prop_info *__system_property_find_nth(unsigned n); /* Pass a prop_info for each system property to the provided ** callback. Use __system_property_read() to read the value ** of this property. ** ** This method is for inspecting and debugging the property ** system. Please use __system_property_find() instead. ** ** Order of results may change from call to call. This is ** not a bug. */ int __system_property_foreach( void (*propfn)(const prop_info *pi, void *cookie), void *cookie); __END_DECLS #endif ================================================ FILE: atlas-aapt/bionic/libc/include/sys/time.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_TIME_H_ #define _SYS_TIME_H_ #include #include #include /* POSIX says gets you most of and may get you all of it. */ #include __BEGIN_DECLS extern int gettimeofday(struct timeval *, struct timezone *); extern int settimeofday(const struct timeval *, const struct timezone *); extern int getitimer(int, struct itimerval *); extern int setitimer(int, const struct itimerval *, struct itimerval *); extern int utimes(const char *, const struct timeval *); #define timerclear(a) \ ((a)->tv_sec = (a)->tv_usec = 0) #define timerisset(a) \ ((a)->tv_sec != 0 || (a)->tv_usec != 0) #define timercmp(a, b, op) \ ((a)->tv_sec == (b)->tv_sec \ ? (a)->tv_usec op (b)->tv_usec \ : (a)->tv_sec op (b)->tv_sec) #define timeradd(a, b, res) \ do { \ (res)->tv_sec = (a)->tv_sec + (b)->tv_sec; \ (res)->tv_usec = (a)->tv_usec + (b)->tv_usec; \ if ((res)->tv_usec >= 1000000) { \ (res)->tv_usec -= 1000000; \ (res)->tv_sec += 1; \ } \ } while (0) #define timersub(a, b, res) \ do { \ (res)->tv_sec = (a)->tv_sec - (b)->tv_sec; \ (res)->tv_usec = (a)->tv_usec - (b)->tv_usec; \ if ((res)->tv_usec < 0) { \ (res)->tv_usec += 1000000; \ (res)->tv_sec -= 1; \ } \ } while (0) #define TIMEVAL_TO_TIMESPEC(tv, ts) { \ (ts)->tv_sec = (tv)->tv_sec; \ (ts)->tv_nsec = (tv)->tv_usec * 1000; \ } #define TIMESPEC_TO_TIMEVAL(tv, ts) { \ (tv)->tv_sec = (ts)->tv_sec; \ (tv)->tv_usec = (ts)->tv_nsec / 1000; \ } __END_DECLS #endif /* _SYS_TIME_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/timerfd.h ================================================ /* * Copyright (C) 2013 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_TIMERFD_H_ #define _SYS_TIMERFD_H_ #include /* For O_CLOEXEC and O_NONBLOCK. */ #include #include __BEGIN_DECLS #define TFD_TIMER_ABSTIME (1 << 0) #define TFD_TIMER_CANCEL_ON_SET (1 << 1) #define TFD_CLOEXEC O_CLOEXEC #define TFD_NONBLOCK O_NONBLOCK extern int timerfd_create(clockid_t, int); extern int timerfd_settime(int, int, const struct itimerspec*, struct itimerspec*); extern int timerfd_gettime(int, struct itimerspec*); __END_DECLS #endif /* _SYS_TIMERFD_H */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/times.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_TIMES_H_ #define _SYS_TIMES_H_ #include #include #include __BEGIN_DECLS extern clock_t times(struct tms*); __END_DECLS #endif /* _SYS_TIMES_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/timex.h ================================================ /* * Copyright (C) 2014 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_TIMEX_H_ #define _SYS_TIMEX_H_ #include #include #include __BEGIN_DECLS int adjtimex(struct timex*); int clock_adjtime(clockid_t, struct timex*); __END_DECLS #endif /* _SYS_TIMEX_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/ttychars.h ================================================ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/ttydefaults.h ================================================ /* $NetBSD: ttydefaults.h,v 1.16 2008/05/24 14:06:39 yamt Exp $ */ /*- * Copyright (c) 1982, 1986, 1993 * The Regents of the University of California. All rights reserved. * (c) UNIX System Laboratories, Inc. * All or some portions of this file are derived from material licensed * to the University of California by American Telephone and Telegraph * Co. or Unix System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)ttydefaults.h 8.4 (Berkeley) 1/21/94 */ /* * System wide defaults for terminal state. */ #ifndef _SYS_TTYDEFAULTS_H_ #define _SYS_TTYDEFAULTS_H_ /* * Defaults on "first" open. */ #define TTYDEF_IFLAG (BRKINT | ICRNL | IMAXBEL | IXON | IXANY) #define TTYDEF_OFLAG (OPOST | ONLCR | OXTABS) #define TTYDEF_LFLAG (ECHO | ICANON | ISIG | IEXTEN | ECHOE|ECHOKE|ECHOCTL) #define TTYDEF_CFLAG (CREAD | CS8 | HUPCL) #define TTYDEF_SPEED (B9600) /* * Control Character Defaults */ #define CTRL(x) (x&037) #define CEOF CTRL('d') #define CEOL ((unsigned char)'\377') /* XXX avoid _POSIX_VDISABLE */ #define CERASE 0177 #define CINTR CTRL('c') #define CSTATUS CTRL('t') #define CKILL CTRL('u') #define CMIN 1 #define CQUIT 034 /* FS, ^\ */ #define CSUSP CTRL('z') #define CTIME 0 #define CDSUSP CTRL('y') #define CSTART CTRL('q') #define CSTOP CTRL('s') #define CLNEXT CTRL('v') #define CDISCARD CTRL('o') #define CWERASE CTRL('w') #define CREPRINT CTRL('r') #define CEOT CEOF /* compat */ #define CBRK CEOL #define CRPRNT CREPRINT #define CFLUSH CDISCARD /* PROTECTED INCLUSION ENDS HERE */ #endif /* !_SYS_TTYDEFAULTS_H_ */ /* * #define TTYDEFCHARS to include an array of default control characters. */ #ifdef _KERNEL #ifdef TTYDEFCHARS const cc_t ttydefchars[NCCS] = { [VEOF] = CEOF, [VEOL] = CEOL, [VEOL2] = CEOL, [VERASE] = CERASE, [VWERASE] = CWERASE, [VKILL] = CKILL, [VREPRINT] = CREPRINT, [7] = _POSIX_VDISABLE, /* spare */ [VINTR] = CINTR, [VQUIT] = CQUIT, [VSUSP] = CSUSP, [VDSUSP] = CDSUSP, [VSTART] = CSTART, [VSTOP] = CSTOP, [VLNEXT] = CLNEXT, [VDISCARD] = CDISCARD, [VMIN] = CMIN, [VTIME] = CTIME, [VSTATUS] = CSTATUS, [19] = _POSIX_VDISABLE, /* spare */ }; #undef TTYDEFCHARS #else extern const cc_t ttydefchars[NCCS]; #endif #endif /* _KERNEL */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/ttydev.h ================================================ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/types.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_TYPES_H_ #define _SYS_TYPES_H_ #include #include #include #include #include /* gids, uids, and pids are all 32-bit. */ typedef __kernel_gid32_t __gid_t; typedef __gid_t gid_t; typedef __kernel_uid32_t __uid_t; typedef __uid_t uid_t; typedef __kernel_pid_t __pid_t; typedef __pid_t pid_t; typedef uint32_t __id_t; typedef __id_t id_t; typedef unsigned long blkcnt_t; typedef unsigned long blksize_t; typedef __kernel_caddr_t caddr_t; typedef __kernel_clock_t clock_t; typedef __kernel_clockid_t __clockid_t; typedef __clockid_t clockid_t; typedef __kernel_daddr_t daddr_t; typedef unsigned long fsblkcnt_t; typedef unsigned long fsfilcnt_t; typedef __kernel_mode_t __mode_t; typedef __mode_t mode_t; typedef __kernel_key_t __key_t; typedef __key_t key_t; typedef __kernel_ino_t __ino_t; typedef __ino_t ino_t; typedef uint32_t __nlink_t; typedef __nlink_t nlink_t; typedef void* __timer_t; typedef __timer_t timer_t; typedef __kernel_suseconds_t __suseconds_t; typedef __suseconds_t suseconds_t; /* useconds_t is 32-bit on both LP32 and LP64. */ typedef uint32_t __useconds_t; typedef __useconds_t useconds_t; #if !defined(__LP64__) /* This historical accident means that we had a 32-bit dev_t on 32-bit architectures. */ typedef uint32_t dev_t; #else typedef uint64_t dev_t; #endif /* This historical accident means that we had a 32-bit time_t on 32-bit architectures. */ typedef __kernel_time_t __time_t; typedef __time_t time_t; #if defined(__USE_FILE_OFFSET64) || defined(__LP64__) typedef int64_t off_t; typedef off_t loff_t; typedef loff_t off64_t; #else /* This historical accident means that we had a 32-bit off_t on 32-bit architectures. */ typedef __kernel_off_t off_t; typedef __kernel_loff_t loff_t; typedef loff_t off64_t; #endif /* while POSIX wants these in , we * declare then in instead */ #if 0 typedef .... pthread_attr_t; typedef .... pthread_cond_t; typedef .... pthread_condattr_t; typedef .... pthread_key_t; typedef .... pthread_mutex_t; typedef .... pthread_once_t; typedef .... pthread_rwlock_t; typedef .... pthread_rwlock_attr_t; typedef .... pthread_t; #endif #if !defined(__LP64__) /* This historical accident means that we had a signed socklen_t on 32-bit architectures. */ typedef int32_t __socklen_t; #else /* LP64 still has a 32-bit socklen_t. */ typedef uint32_t __socklen_t; #endif typedef __socklen_t socklen_t; typedef __builtin_va_list __va_list; #ifndef _SSIZE_T_DEFINED_ #define _SSIZE_T_DEFINED_ /* Traditionally, bionic's ssize_t was "long int". This caused GCC to emit warnings when you * pass a ssize_t to a printf-style function. The correct type is __kernel_ssize_t, which is * "int", which isn't an ABI change for C code (because they're the same size) but is an ABI * change for C++ because "int" and "long int" mangle to "i" and "l" respectively. So until * we can fix the ABI, this change should not be propagated to the NDK. http://b/8253769. */ typedef __kernel_ssize_t ssize_t; #endif typedef unsigned int uint_t; typedef unsigned int uint; #ifdef __BSD_VISIBLE #include typedef unsigned char u_char; typedef unsigned short u_short; typedef unsigned int u_int; typedef unsigned long u_long; typedef uint32_t u_int32_t; typedef uint16_t u_int16_t; typedef uint8_t u_int8_t; typedef uint64_t u_int64_t; #endif #endif ================================================ FILE: atlas-aapt/bionic/libc/include/sys/ucontext.h ================================================ /* * Copyright (C) 2014 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_UCONTEXT_H_ #define _SYS_UCONTEXT_H_ #include #include __BEGIN_DECLS #if defined(__arm__) enum { REG_R0 = 0, REG_R1, REG_R2, REG_R3, REG_R4, REG_R5, REG_R6, REG_R7, REG_R8, REG_R9, REG_R10, REG_R11, REG_R12, REG_R13, REG_R14, REG_R15, }; #define NGREG 18 /* Like glibc. */ typedef int greg_t; typedef greg_t gregset_t[NGREG]; typedef struct user_fpregs fpregset_t; #include typedef struct sigcontext mcontext_t; typedef struct ucontext { unsigned long uc_flags; struct ucontext* uc_link; stack_t uc_stack; mcontext_t uc_mcontext; sigset_t uc_sigmask; // Android has a wrong (smaller) sigset_t on ARM. uint32_t __padding_rt_sigset; // The kernel adds extra padding after uc_sigmask to match glibc sigset_t on ARM. char __padding[120]; unsigned long uc_regspace[128] __attribute__((__aligned__(8))); } ucontext_t; #elif defined(__aarch64__) #define NGREG 34 /* x0..x30 + sp + pc + pstate */ typedef unsigned long greg_t; typedef greg_t gregset_t[NGREG]; typedef struct user_fpsimd_struct fpregset_t; #include typedef struct sigcontext mcontext_t; typedef struct ucontext { unsigned long uc_flags; struct ucontext *uc_link; stack_t uc_stack; sigset_t uc_sigmask; // The kernel adds extra padding after uc_sigmask to match glibc sigset_t on ARM64. char __padding[128 - sizeof(sigset_t)]; mcontext_t uc_mcontext; } ucontext_t; #elif defined(__i386__) enum { REG_GS = 0, REG_FS, REG_ES, REG_DS, REG_EDI, REG_ESI, REG_EBP, REG_ESP, REG_EBX, REG_EDX, REG_ECX, REG_EAX, REG_TRAPNO, REG_ERR, REG_EIP, REG_CS, REG_EFL, REG_UESP, REG_SS, NGREG }; typedef int greg_t; typedef greg_t gregset_t[NGREG]; struct _libc_fpreg { unsigned short significand[4]; unsigned short exponent; }; struct _libc_fpstate { unsigned long cw; unsigned long sw; unsigned long tag; unsigned long ipoff; unsigned long cssel; unsigned long dataoff; unsigned long datasel; struct _libc_fpreg _st[8]; unsigned long status; }; typedef struct _libc_fpstate* fpregset_t; typedef struct { gregset_t gregs; fpregset_t fpregs; unsigned long oldmask; unsigned long cr2; } mcontext_t; typedef struct ucontext { unsigned long uc_flags; struct ucontext* uc_link; stack_t uc_stack; mcontext_t uc_mcontext; sigset_t uc_sigmask; // Android has a wrong (smaller) sigset_t on x86. uint32_t __padding_rt_sigset; struct _libc_fpstate __fpregs_mem; } ucontext_t; #elif defined(__mips__) /* glibc doesn't have names for MIPS registers. */ #define NGREG 32 #define NFPREG 32 typedef unsigned long long greg_t; typedef greg_t gregset_t[NGREG]; typedef struct fpregset { union { double fp_dregs[NFPREG]; struct { float _fp_fregs; unsigned _fp_pad; } fp_fregs[NFPREG]; } fp_r; } fpregset_t; #ifdef __LP64__ typedef struct { gregset_t gregs; fpregset_t fpregs; greg_t mdhi; greg_t hi1; greg_t hi2; greg_t hi3; greg_t mdlo; greg_t lo1; greg_t lo2; greg_t lo3; greg_t pc; uint32_t fpc_csr; uint32_t used_math; uint32_t dsp; uint32_t reserved; } mcontext_t; #else typedef struct { unsigned regmask; unsigned status; greg_t pc; gregset_t gregs; fpregset_t fpregs; unsigned fp_owned; unsigned fpc_csr; unsigned fpc_eir; unsigned used_math; unsigned dsp; greg_t mdhi; greg_t mdlo; unsigned long hi1; unsigned long lo1; unsigned long hi2; unsigned long lo2; unsigned long hi3; unsigned long lo3; } mcontext_t; #endif typedef struct ucontext { unsigned long uc_flags; struct ucontext* uc_link; stack_t uc_stack; mcontext_t uc_mcontext; sigset_t uc_sigmask; } ucontext_t; #elif defined(__x86_64__) enum { REG_R8 = 0, REG_R9, REG_R10, REG_R11, REG_R12, REG_R13, REG_R14, REG_R15, REG_RDI, REG_RSI, REG_RBP, REG_RBX, REG_RDX, REG_RAX, REG_RCX, REG_RSP, REG_RIP, REG_EFL, REG_CSGSFS, REG_ERR, REG_TRAPNO, REG_OLDMASK, REG_CR2, NGREG }; typedef long greg_t; typedef greg_t gregset_t[NGREG]; struct _libc_fpxreg { unsigned short significand[4]; unsigned short exponent; unsigned short padding[3]; }; struct _libc_xmmreg { uint32_t element[4]; }; struct _libc_fpstate { uint16_t cwd; uint16_t swd; uint16_t ftw; uint16_t fop; uint64_t rip; uint64_t rdp; uint32_t mxcsr; uint32_t mxcr_mask; struct _libc_fpxreg _st[8]; struct _libc_xmmreg _xmm[16]; uint32_t padding[24]; }; typedef struct _libc_fpstate* fpregset_t; typedef struct { gregset_t gregs; fpregset_t fpregs; unsigned long __reserved1[8]; } mcontext_t; typedef struct ucontext { unsigned long uc_flags; struct ucontext* uc_link; stack_t uc_stack; mcontext_t uc_mcontext; sigset_t uc_sigmask; struct _libc_fpstate __fpregs_mem; } ucontext_t; #endif __END_DECLS #endif /* _SYS_UCONTEXT_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/uio.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_UIO_H_ #define _SYS_UIO_H_ #include #include #include __BEGIN_DECLS int readv(int, const struct iovec*, int); int writev(int, const struct iovec*, int); #if defined(__USE_GNU) #if defined(__USE_FILE_OFFSET64) ssize_t preadv(int, const struct iovec*, int, off_t) __RENAME(preadv64); ssize_t pwritev(int, const struct iovec*, int, off_t) __RENAME(pwritev64); #else ssize_t preadv(int, const struct iovec*, int, off_t); ssize_t pwritev(int, const struct iovec*, int, off_t); #endif ssize_t preadv64(int, const struct iovec*, int, off64_t); ssize_t pwritev64(int, const struct iovec*, int, off64_t); #endif #if defined(__USE_GNU) ssize_t process_vm_readv(pid_t, const struct iovec*, unsigned long, const struct iovec*, unsigned long, unsigned long); ssize_t process_vm_writev(pid_t, const struct iovec*, unsigned long, const struct iovec*, unsigned long, unsigned long); #endif __END_DECLS #endif /* _SYS_UIO_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/un.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_UN_H_ #define _SYS_UN_H_ typedef unsigned short sa_family_t; #include #endif /* _SYS_UN_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/unistd.h ================================================ #include ================================================ FILE: atlas-aapt/bionic/libc/include/sys/user.h ================================================ /* * Copyright (C) 2013 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_USER_H_ #define _SYS_USER_H_ #include #include /* For size_t. */ __BEGIN_DECLS #define PAGE_SIZE 4096 #define PAGE_MASK (~(PAGE_SIZE - 1)) #if __i386__ struct user_fpregs_struct { long cwd; long swd; long twd; long fip; long fcs; long foo; long fos; long st_space[20]; }; struct user_fpxregs_struct { unsigned short cwd; unsigned short swd; unsigned short twd; unsigned short fop; long fip; long fcs; long foo; long fos; long mxcsr; long reserved; long st_space[32]; long xmm_space[32]; long padding[56]; }; struct user_regs_struct { long ebx; long ecx; long edx; long esi; long edi; long ebp; long eax; long xds; long xes; long xfs; long xgs; long orig_eax; long eip; long xcs; long eflags; long esp; long xss; }; struct user { struct user_regs_struct regs; int u_fpvalid; struct user_fpregs_struct i387; unsigned long int u_tsize; unsigned long int u_dsize; unsigned long int u_ssize; unsigned long start_code; unsigned long start_stack; long int signal; int reserved; struct user_regs_struct* u_ar0; struct user_fpregs_struct* u_fpstate; unsigned long magic; char u_comm[32]; int u_debugreg[8]; }; #elif defined(__x86_64__) struct user_fpregs_struct { unsigned short cwd; unsigned short swd; unsigned short ftw; unsigned short fop; __u64 rip; __u64 rdp; __u32 mxcsr; __u32 mxcr_mask; __u32 st_space[32]; __u32 xmm_space[64]; __u32 padding[24]; }; struct user_regs_struct { unsigned long r15; unsigned long r14; unsigned long r13; unsigned long r12; unsigned long rbp; unsigned long rbx; unsigned long r11; unsigned long r10; unsigned long r9; unsigned long r8; unsigned long rax; unsigned long rcx; unsigned long rdx; unsigned long rsi; unsigned long rdi; unsigned long orig_rax; unsigned long rip; unsigned long cs; unsigned long eflags; unsigned long rsp; unsigned long ss; unsigned long fs_base; unsigned long gs_base; unsigned long ds; unsigned long es; unsigned long fs; unsigned long gs; }; struct user { struct user_regs_struct regs; int u_fpvalid; int pad0; struct user_fpregs_struct i387; unsigned long int u_tsize; unsigned long int u_dsize; unsigned long int u_ssize; unsigned long start_code; unsigned long start_stack; long int signal; int reserved; int pad1; struct user_regs_struct* u_ar0; struct user_fpregs_struct* u_fpstate; unsigned long magic; char u_comm[32]; unsigned long u_debugreg[8]; unsigned long error_code; unsigned long fault_address; }; #elif defined(__mips__) struct user { unsigned long regs[180 / sizeof(unsigned long) + 64]; size_t u_tsize; size_t u_dsize; size_t u_ssize; unsigned long start_code; unsigned long start_data; unsigned long start_stack; long int signal; void* u_ar0; unsigned long magic; char u_comm[32]; }; #elif defined(__arm__) struct user_fpregs { struct fp_reg { unsigned int sign1:1; unsigned int unused:15; unsigned int sign2:1; unsigned int exponent:14; unsigned int j:1; unsigned int mantissa1:31; unsigned int mantissa0:32; } fpregs[8]; unsigned int fpsr:32; unsigned int fpcr:32; unsigned char ftype[8]; unsigned int init_flag; }; struct user_regs { unsigned long uregs[18]; }; struct user_vfp { unsigned long long fpregs[32]; unsigned long fpscr; }; struct user_vfp_exc { unsigned long fpexc; unsigned long fpinst; unsigned long fpinst2; }; struct user { struct user_regs regs; int u_fpvalid; unsigned long int u_tsize; unsigned long int u_dsize; unsigned long int u_ssize; unsigned long start_code; unsigned long start_stack; long int signal; int reserved; struct user_regs* u_ar0; unsigned long magic; char u_comm[32]; int u_debugreg[8]; struct user_fpregs u_fp; struct user_fpregs* u_fp0; }; #elif defined(__aarch64__) struct user_regs_struct { uint64_t regs[31]; uint64_t sp; uint64_t pc; uint64_t pstate; }; struct user_fpsimd_struct { __uint128_t vregs[32]; uint32_t fpsr; uint32_t fpcr; }; #else #error "Unsupported architecture." #endif __END_DECLS #endif /* _SYS_USER_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/utime.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_UTIME_H_ #define _SYS_UTIME_H_ #include #endif /* _SYS_UTIME_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/utsname.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_UTSNAME_H_ #define _SYS_UTSNAME_H_ #include __BEGIN_DECLS #define SYS_NMLN 65 struct utsname { char sysname [SYS_NMLN]; char nodename [SYS_NMLN]; char release [SYS_NMLN]; char version [SYS_NMLN]; char machine [SYS_NMLN]; char domainname[SYS_NMLN]; }; extern int uname(struct utsname *); __END_DECLS #endif /* _SYS_UTSNAME_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/vfs.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_VFS_H_ #define _SYS_VFS_H_ #include #include #include __BEGIN_DECLS /* The kernel's __kernel_fsid_t has a 'val' member but glibc uses '__val'. */ typedef struct { int __val[2]; } __fsid_t; typedef __fsid_t fsid_t; #if defined(__aarch64__) || defined(__x86_64__) #define __STATFS64_BODY \ uint64_t f_type; \ uint64_t f_bsize; \ uint64_t f_blocks; \ uint64_t f_bfree; \ uint64_t f_bavail; \ uint64_t f_files; \ uint64_t f_ffree; \ fsid_t f_fsid; \ uint64_t f_namelen; \ uint64_t f_frsize; \ uint64_t f_flags; \ uint64_t f_spare[4]; \ #elif defined(__mips__) && defined(__LP64__) /* 64-bit MIPS. */ #define __STATFS64_BODY \ uint64_t f_type; \ uint64_t f_bsize; \ uint64_t f_frsize; /* Fragment size - unsupported. */ \ uint64_t f_blocks; \ uint64_t f_bfree; \ uint64_t f_files; \ uint64_t f_ffree; \ uint64_t f_bavail; \ fsid_t f_fsid; \ uint64_t f_namelen; \ uint64_t f_flags; \ uint64_t f_spare[5]; \ #elif defined(__mips__) /* 32-bit MIPS (corresponds to the kernel's statfs64 type). */ #define __STATFS64_BODY \ uint32_t f_type; \ uint32_t f_bsize; \ uint32_t f_frsize; \ uint32_t __pad; \ uint64_t f_blocks; \ uint64_t f_bfree; \ uint64_t f_files; \ uint64_t f_ffree; \ uint64_t f_bavail; \ fsid_t f_fsid; \ uint32_t f_namelen; \ uint32_t f_flags; \ uint32_t f_spare[5]; \ #else /* 32-bit ARM or x86 (corresponds to the kernel's statfs64 type). */ #define __STATFS64_BODY \ uint32_t f_type; \ uint32_t f_bsize; \ uint64_t f_blocks; \ uint64_t f_bfree; \ uint64_t f_bavail; \ uint64_t f_files; \ uint64_t f_ffree; \ fsid_t f_fsid; \ uint32_t f_namelen; \ uint32_t f_frsize; \ uint32_t f_flags; \ uint32_t f_spare[4]; \ #endif struct statfs { __STATFS64_BODY }; struct statfs64 { __STATFS64_BODY }; #undef __STATFS64_BODY /* Declare that we have the f_namelen, f_frsize, and f_flags fields. */ #define _STATFS_F_NAMELEN #define _STATFS_F_FRSIZE #define _STATFS_F_FLAGS /* Pull in the kernel magic numbers. */ #include /* Add in ones that we had historically that aren't in the uapi header. */ #define BEFS_SUPER_MAGIC 0x42465331 #define BFS_MAGIC 0x1BADFACE #define CIFS_MAGIC_NUMBER 0xFF534D42 #define COH_SUPER_MAGIC 0x012FF7B7 #define DEVFS_SUPER_MAGIC 0x1373 #define EXT_SUPER_MAGIC 0x137D #define EXT2_OLD_SUPER_MAGIC 0xEF51 #define HFS_SUPER_MAGIC 0x4244 #define JFS_SUPER_MAGIC 0x3153464a #define NTFS_SB_MAGIC 0x5346544e #define ROMFS_MAGIC 0x7275 #define SYSV2_SUPER_MAGIC 0x012FF7B6 #define SYSV4_SUPER_MAGIC 0x012FF7B5 #define UDF_SUPER_MAGIC 0x15013346 #define UFS_MAGIC 0x00011954 #define VXFS_SUPER_MAGIC 0xa501FCF5 #define XENIX_SUPER_MAGIC 0x012FF7B4 #define XFS_SUPER_MAGIC 0x58465342 extern int statfs(const char*, struct statfs*) __nonnull((1, 2)); extern int statfs64(const char*, struct statfs64*) __nonnull((1, 2)); extern int fstatfs(int, struct statfs*) __nonnull((2)); extern int fstatfs64(int, struct statfs64*) __nonnull((2)); __END_DECLS #endif /* _SYS_VFS_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/vt.h ================================================ #include ================================================ FILE: atlas-aapt/bionic/libc/include/sys/wait.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_WAIT_H_ #define _SYS_WAIT_H_ #include #include #include #include #include __BEGIN_DECLS #define WEXITSTATUS(s) (((s) & 0xff00) >> 8) #define WCOREDUMP(s) ((s) & 0x80) #define WTERMSIG(s) ((s) & 0x7f) #define WSTOPSIG(s) WEXITSTATUS(s) #define WIFEXITED(s) (WTERMSIG(s) == 0) #define WIFSTOPPED(s) (WTERMSIG(s) == 0x7f) #define WIFSIGNALED(s) (WTERMSIG((s)+1) >= 2) #define WIFCONTINUED(s) ((s) == 0xffff) #define W_EXITCODE(ret, sig) ((ret) << 8 | (sig)) #define W_STOPCODE(sig) ((sig) << 8 | 0x7f) extern pid_t wait(int *); extern pid_t waitpid(pid_t, int *, int); extern pid_t wait4(pid_t, int *, int, struct rusage *); /* Posix states that idtype_t should be an enumeration type, but * the kernel headers define P_ALL, P_PID and P_PGID as constant macros * instead. */ typedef int idtype_t; extern int waitid(idtype_t which, id_t id, siginfo_t *info, int options); __END_DECLS #endif /* _SYS_WAIT_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/sys/xattr.h ================================================ /* * Copyright (C) 2012 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_XATTR_H_ #define _SYS_XATTR_H_ #include __BEGIN_DECLS #define XATTR_CREATE 1 #define XATTR_REPLACE 2 extern int fsetxattr(int fd, const char *name, const void *value, size_t size, int flags); extern int setxattr(const char *path, const char *name, const void *value, size_t size, int flags); extern int lsetxattr(const char *path, const char *name, const void *value, size_t size, int flags); extern ssize_t fgetxattr(int fd, const char *name, void *value, size_t size); extern ssize_t getxattr(const char *path, const char *name, void *value, size_t size); extern ssize_t lgetxattr(const char *path, const char *name, void *value, size_t size); extern ssize_t listxattr(const char *path, char *list, size_t size); extern ssize_t llistxattr(const char *path, char *list, size_t size); extern ssize_t flistxattr(int fd, char *list, size_t size); extern int removexattr(const char *path, const char *name); extern int lremovexattr(const char *path, const char *name); extern int fremovexattr(int fd, const char *name); __END_DECLS #endif /* _SYS_XATTR_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/syscall.h ================================================ #include ================================================ FILE: atlas-aapt/bionic/libc/include/sysexits.h ================================================ /* $OpenBSD: sysexits.h,v 1.5 2003/06/02 19:34:12 millert Exp $ */ /* $NetBSD: sysexits.h,v 1.4 1994/10/26 00:56:33 cgd Exp $ */ /* * Copyright (c) 1987 Regents of the University of California. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)sysexits.h 4.8 (Berkeley) 4/3/91 */ #ifndef _SYSEXITS_H_ #define _SYSEXITS_H_ /* * SYSEXITS.H -- Exit status codes for system programs. * * This include file attempts to categorize possible error * exit statuses for system programs, notably delivermail * and the Berkeley network. * * Error numbers begin at EX__BASE to reduce the possibility of * clashing with other exit statuses that random programs may * already return. The meaning of the codes is approximately * as follows: * * EX_USAGE -- The command was used incorrectly, e.g., with * the wrong number of arguments, a bad flag, a bad * syntax in a parameter, or whatever. * EX_DATAERR -- The input data was incorrect in some way. * This should only be used for user's data & not * system files. * EX_NOINPUT -- An input file (not a system file) did not * exist or was not readable. This could also include * errors like "No message" to a mailer (if it cared * to catch it). * EX_NOUSER -- The user specified did not exist. This might * be used for mail addresses or remote logins. * EX_NOHOST -- The host specified did not exist. This is used * in mail addresses or network requests. * EX_UNAVAILABLE -- A service is unavailable. This can occur * if a support program or file does not exist. This * can also be used as a catchall message when something * you wanted to do doesn't work, but you don't know * why. * EX_SOFTWARE -- An internal software error has been detected. * This should be limited to non-operating system related * errors as possible. * EX_OSERR -- An operating system error has been detected. * This is intended to be used for such things as "cannot * fork", "cannot create pipe", or the like. It includes * things like getuid returning a user that does not * exist in the passwd file. * EX_OSFILE -- Some system file (e.g., /etc/passwd, /var/run/utmp, * etc.) does not exist, cannot be opened, or has some * sort of error (e.g., syntax error). * EX_CANTCREAT -- A (user specified) output file cannot be * created. * EX_IOERR -- An error occurred while doing I/O on some file. * EX_TEMPFAIL -- temporary failure, indicating something that * is not really an error. In sendmail, this means * that a mailer (e.g.) could not create a connection, * and the request should be reattempted later. * EX_PROTOCOL -- the remote system returned something that * was "not possible" during a protocol exchange. * EX_NOPERM -- You did not have sufficient permission to * perform the operation. This is not intended for * file system problems, which should use EX_NOINPUT or * EX_CANTCREAT, but rather for higher level permissions. * EX_CONFIG -- Something was found in an unconfigured or * misconfigured state. */ #define EX_OK 0 /* successful termination */ #define EX__BASE 64 /* base value for error messages */ #define EX_USAGE 64 /* command line usage error */ #define EX_DATAERR 65 /* data format error */ #define EX_NOINPUT 66 /* cannot open input */ #define EX_NOUSER 67 /* addressee unknown */ #define EX_NOHOST 68 /* host name unknown */ #define EX_UNAVAILABLE 69 /* service unavailable */ #define EX_SOFTWARE 70 /* internal software error */ #define EX_OSERR 71 /* system error (e.g., can't fork) */ #define EX_OSFILE 72 /* critical OS file missing */ #define EX_CANTCREAT 73 /* can't create (user) output file */ #define EX_IOERR 74 /* input/output error */ #define EX_TEMPFAIL 75 /* temp failure; user is invited to retry */ #define EX_PROTOCOL 76 /* remote error in protocol */ #define EX_NOPERM 77 /* permission denied */ #define EX_CONFIG 78 /* configuration error */ #define EX__MAX 78 /* maximum listed value */ #endif /* !_SYSEXITS_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/syslog.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYSLOG_H #define _SYSLOG_H #include #include #include __BEGIN_DECLS /* Priorities are translated to Android log priorities as shown. */ #define LOG_EMERG 0 /* ERROR */ #define LOG_ALERT 1 /* ERROR */ #define LOG_CRIT 2 /* ERROR */ #define LOG_ERR 3 /* ERROR */ #define LOG_WARNING 4 /* WARN */ #define LOG_NOTICE 5 /* INFO */ #define LOG_INFO 6 /* INFO */ #define LOG_DEBUG 7 /* DEBUG */ #define LOG_PRIMASK 7 #define LOG_PRI(x) ((x) & LOG_PRIMASK) #define LOG_MAKEPRI(fac, pri) ((fac) | (pri)) /* Facilities are currently ignored on Android. */ #define LOG_KERN 0000 #define LOG_USER 0010 #define LOG_MAIL 0020 #define LOG_DAEMON 0030 #define LOG_AUTH 0040 #define LOG_SYSLOG 0050 #define LOG_LPR 0060 #define LOG_NEWS 0070 #define LOG_UUCP 0100 #define LOG_CRON 0110 #define LOG_AUTHPRIV 0120 #define LOG_FTP 0130 #define LOG_LOCAL0 0200 #define LOG_LOCAL1 0210 #define LOG_LOCAL2 0220 #define LOG_LOCAL3 0230 #define LOG_LOCAL4 0240 #define LOG_LOCAL5 0250 #define LOG_LOCAL6 0260 #define LOG_LOCAL7 0270 #define LOG_FACMASK 01770 #define LOG_FAC(x) (((x) >> 3) & (LOG_FACMASK >> 3)) #define LOG_MASK(pri) (1 << (pri)) #define LOG_UPTO(pri) ((1 << ((pri)+1)) - 1) /* openlog(3) flags are currently ignored on Android. */ #define LOG_PID 0x01 #define LOG_CONS 0x02 #define LOG_ODELAY 0x04 #define LOG_NDELAY 0x08 #define LOG_NOWAIT 0x10 #define LOG_PERROR 0x20 void closelog(void); void openlog(const char*, int, int); int setlogmask(int); void syslog(int, const char*, ...) __printflike(2, 3); void vsyslog(int, const char*, va_list) __printflike(2, 0); __END_DECLS #endif /* _SYSLOG_H */ ================================================ FILE: atlas-aapt/bionic/libc/include/termio.h ================================================ /* * Copyright (C) 2010 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /* All definitions related to termio are in Linux kernel headers * that are already included by */ #include ================================================ FILE: atlas-aapt/bionic/libc/include/termios.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _TERMIOS_H_ #define _TERMIOS_H_ #include #include #include #include __BEGIN_DECLS #if __ANDROID_API__ >= 21 speed_t cfgetispeed(const struct termios*); speed_t cfgetospeed(const struct termios*); void cfmakeraw(struct termios*); int cfsetispeed(struct termios*, speed_t); int cfsetospeed(struct termios*, speed_t); int cfsetspeed(struct termios*, speed_t); int tcdrain(int); int tcflow(int, int); int tcflush(int, int); int tcgetattr(int, struct termios*); pid_t tcgetsid(int); int tcsendbreak(int, int); int tcsetattr(int, int, const struct termios*); #else #include #endif __END_DECLS #endif /* _TERMIOS_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/time.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _TIME_H_ #define _TIME_H_ #include #include #include __BEGIN_DECLS #define CLOCKS_PER_SEC 1000000 extern char* tzname[] __LIBC_ABI_PUBLIC__; extern int daylight __LIBC_ABI_PUBLIC__; extern long int timezone __LIBC_ABI_PUBLIC__; struct sigevent; struct 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; }; #define TM_ZONE tm_zone extern time_t time(time_t*) __LIBC_ABI_PUBLIC__; extern int nanosleep(const struct timespec*, struct timespec*) __LIBC_ABI_PUBLIC__; extern char* asctime(const struct tm*) __LIBC_ABI_PUBLIC__; extern char* asctime_r(const struct tm*, char*) __LIBC_ABI_PUBLIC__; extern double difftime(time_t, time_t) __LIBC_ABI_PUBLIC__; extern time_t mktime(struct tm*) __LIBC_ABI_PUBLIC__; extern struct tm* localtime(const time_t*) __LIBC_ABI_PUBLIC__; extern struct tm* localtime_r(const time_t*, struct tm*) __LIBC_ABI_PUBLIC__; extern struct tm* gmtime(const time_t*) __LIBC_ABI_PUBLIC__; extern struct tm* gmtime_r(const time_t*, struct tm*) __LIBC_ABI_PUBLIC__; extern char* strptime(const char*, const char*, struct tm*) __LIBC_ABI_PUBLIC__; extern size_t strftime(char*, size_t, const char*, const struct tm*) __LIBC_ABI_PUBLIC__; extern size_t strftime_l(char *, size_t, const char *, const struct tm *, locale_t) __LIBC_ABI_PUBLIC__; extern char* ctime(const time_t*) __LIBC_ABI_PUBLIC__; extern char* ctime_r(const time_t*, char*) __LIBC_ABI_PUBLIC__; extern void tzset(void) __LIBC_ABI_PUBLIC__; extern clock_t clock(void) __LIBC_ABI_PUBLIC__; extern int clock_getcpuclockid(pid_t, clockid_t*) __LIBC_ABI_PUBLIC__; extern int clock_getres(clockid_t, struct timespec*) __LIBC_ABI_PUBLIC__; extern int clock_gettime(clockid_t, struct timespec*) __LIBC_ABI_PUBLIC__; extern int clock_nanosleep(clockid_t, int, const struct timespec*, struct timespec*) __LIBC_ABI_PUBLIC__; extern int clock_settime(clockid_t, const struct timespec*) __LIBC_ABI_PUBLIC__; extern int timer_create(int, struct sigevent*, timer_t*) __LIBC_ABI_PUBLIC__; extern int timer_delete(timer_t) __LIBC_ABI_PUBLIC__; extern int timer_settime(timer_t, int, const struct itimerspec*, struct itimerspec*) __LIBC_ABI_PUBLIC__; extern int timer_gettime(timer_t, struct itimerspec*) __LIBC_ABI_PUBLIC__; extern int timer_getoverrun(timer_t) __LIBC_ABI_PUBLIC__; /* Non-standard extensions that are in the BSDs and glibc. */ extern time_t timelocal(struct tm*) __LIBC_ABI_PUBLIC__; extern time_t timegm(struct tm*) __LIBC_ABI_PUBLIC__; __END_DECLS #endif /* _TIME_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/time64.h ================================================ /* Copyright (c) 2007-2008 Michael G Schwern This software originally derived from Paul Sheer's pivotal_gmtime_r.c. The MIT License: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Origin: http://code.google.com/p/y2038 Modified for Bionic by the Android Open Source Project */ #ifndef TIME64_H #define TIME64_H #if defined(__LP64__) #error Your time_t is already 64-bit. #else /* Legacy cruft for LP32 where time_t was 32-bit. */ #include #include #include __BEGIN_DECLS typedef int64_t time64_t; char* asctime64(const struct tm*); char* asctime64_r(const struct tm*, char*); char* ctime64(const time64_t*); char* ctime64_r(const time64_t*, char*); struct tm* gmtime64(const time64_t*); struct tm* gmtime64_r(const time64_t*, struct tm*); struct tm* localtime64(const time64_t*); struct tm* localtime64_r(const time64_t*, struct tm*); time64_t mktime64(const struct tm*); time64_t timegm64(const struct tm*); time64_t timelocal64(const struct tm*); __END_DECLS #endif #endif /* TIME64_H */ ================================================ FILE: atlas-aapt/bionic/libc/include/uchar.h ================================================ /* * Copyright (C) 2014 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _UCHAR_H_ #define _UCHAR_H_ #include #include __BEGIN_DECLS #if __STDC_VERSION__ >= 201112L && !defined(__cplusplus) typedef __CHAR16_TYPE__ char16_t; typedef __CHAR32_TYPE__ char32_t; #endif #define __STD_UTF_16__ 1 #define __STD_UTF_32__ 1 size_t c16rtomb(char* __restrict, char16_t, mbstate_t* __restrict); size_t c32rtomb(char* __restrict, char32_t, mbstate_t* __restrict); size_t mbrtoc16(char16_t* __restrict, const char* __restrict, size_t, mbstate_t* __restrict); size_t mbrtoc32(char32_t* __restrict, const char* __restrict, size_t, mbstate_t* __restrict); __END_DECLS #endif /* _UCHAR_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/ucontext.h ================================================ /* * Copyright (C) 2014 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _UCONTEXT_H_ #define _UCONTEXT_H_ #include #endif /* _UCONTEXT_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/unistd.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _UNISTD_H_ #define _UNISTD_H_ #include #include #include #include #include #include #include __BEGIN_DECLS #define STDIN_FILENO 0 #define STDOUT_FILENO 1 #define STDERR_FILENO 2 #define F_OK 0 #define X_OK 1 #define W_OK 2 #define R_OK 4 #define SEEK_SET 0 #define SEEK_CUR 1 #define SEEK_END 2 #define _PC_FILESIZEBITS 0 #define _PC_LINK_MAX 1 #define _PC_MAX_CANON 2 #define _PC_MAX_INPUT 3 #define _PC_NAME_MAX 4 #define _PC_PATH_MAX 5 #define _PC_PIPE_BUF 6 #define _PC_2_SYMLINKS 7 #define _PC_ALLOC_SIZE_MIN 8 #define _PC_REC_INCR_XFER_SIZE 9 #define _PC_REC_MAX_XFER_SIZE 10 #define _PC_REC_MIN_XFER_SIZE 11 #define _PC_REC_XFER_ALIGN 12 #define _PC_SYMLINK_MAX 13 #define _PC_CHOWN_RESTRICTED 14 #define _PC_NO_TRUNC 15 #define _PC_VDISABLE 16 #define _PC_ASYNC_IO 17 #define _PC_PRIO_IO 18 #define _PC_SYNC_IO 19 extern char** environ; extern __noreturn void _exit(int __status); extern pid_t fork(void); extern pid_t vfork(void); extern pid_t getpid(void); extern pid_t gettid(void) __pure2; extern pid_t getpgid(pid_t __pid); extern int setpgid(pid_t __pid, pid_t __pgid); extern pid_t getppid(void); extern pid_t getpgrp(void); extern int setpgrp(void); extern pid_t getsid(pid_t __pid) __INTRODUCED_IN(21); extern pid_t setsid(void); extern int execv(const char* __path, char* const* __argv); extern int execvp(const char* __file, char* const* __argv); extern int execvpe(const char* __file, char* const* __argv, char* const* __envp) __INTRODUCED_IN(21); extern int execve(const char* __file, char* const* __argv, char* const* __envp); extern int execl(const char* __path, const char* __arg0, ...); extern int execlp(const char* __file, const char* __arg0, ...); extern int execle(const char* __path, const char* __arg0, ...); extern int nice(int __incr); extern int setuid(uid_t __uid); extern uid_t getuid(void); extern int seteuid(uid_t __uid); extern uid_t geteuid(void); extern int setgid(gid_t __gid); extern gid_t getgid(void); extern int setegid(gid_t __gid); extern gid_t getegid(void); extern int getgroups(int __size, gid_t* __list); extern int setgroups(size_t __size, const gid_t* __list); extern int setreuid(uid_t __ruid, uid_t __euid); extern int setregid(gid_t __rgid, gid_t __egid); extern int setresuid(uid_t __ruid, uid_t __euid, uid_t __suid); extern int setresgid(gid_t __rgid, gid_t __egid, gid_t __sgid); extern int getresuid(uid_t* __ruid, uid_t* __euid, uid_t* __suid); extern int getresgid(gid_t* __rgid, gid_t* __egid, gid_t* __sgid); extern char* getlogin(void); extern long fpathconf(int __fd, int __name); extern long pathconf(const char* __path, int __name); extern int access(const char* __path, int __mode); extern int faccessat(int __dirfd, const char* __path, int __mode, int __flags) __INTRODUCED_IN(21); extern int link(const char* __oldpath, const char* __newpath); extern int linkat(int __olddirfd, const char* __oldpath, int __newdirfd, const char* __newpath, int __flags) __INTRODUCED_IN(21); extern int unlink(const char* __path); extern int unlinkat(int __dirfd, const char* __path, int __flags); extern int chdir(const char* __path); extern int fchdir(int __fd); extern int rmdir(const char* __path); extern int pipe(int* __pipefd); #if defined(__USE_GNU) extern int pipe2(int* __pipefd, int __flags) __INTRODUCED_IN(9); #endif extern int chroot(const char* __path); extern int symlink(const char* __oldpath, const char* __newpath); extern int symlinkat(const char* __oldpath, int __newdirfd, const char* __newpath) __INTRODUCED_IN(21); extern ssize_t readlink(const char* __path, char* __buf, size_t __bufsiz); extern ssize_t readlinkat(int __dirfd, const char* __path, char* __buf, size_t __bufsiz) __INTRODUCED_IN(21); extern int chown(const char* __path, uid_t __owner, gid_t __group); extern int fchown(int __fd, uid_t __owner, gid_t __group); extern int fchownat(int __dirfd, const char* __path, uid_t __owner, gid_t __group, int __flags); extern int lchown(const char* __path, uid_t __owner, gid_t __group); extern char* getcwd(char* __buf, size_t __size); extern int sync(void); extern int close(int __fd); extern ssize_t read(int __fd, void* __buf, size_t __count); extern ssize_t write(int __fd, const void* __buf, size_t __count); extern int dup(int __oldfd); extern int dup2(int __oldfd, int __newfd); extern int dup3(int __oldfd, int __newfd, int __flags) __INTRODUCED_IN(21); extern int fcntl(int __fd, int __cmd, ...); extern int ioctl(int __fd, int __request, ...); extern int fsync(int __fd); extern int fdatasync(int __fd) __INTRODUCED_IN(9); #if defined(__USE_FILE_OFFSET64) extern off_t lseek(int __fd, off_t __offset, int __whence) __RENAME(lseek64); #else extern off_t lseek(int __fd, off_t __offset, int __whence); #endif extern off64_t lseek64(int __fd, off64_t __offset, int __whence); #if defined(__USE_FILE_OFFSET64) && __ANDROID_API__ >= 21 extern int truncate(const char* __path, off_t __length) __RENAME(truncate64); extern ssize_t pread(int __fd, void* __buf, size_t __count, off_t __offset) __RENAME(pread64); extern ssize_t pwrite(int __fd, const void* __buf, size_t __count, off_t __offset) __RENAME(pwrite64); extern int ftruncate(int __fd, off_t __length) __RENAME(ftruncate64); #else extern int truncate(const char* __path, off_t __length); extern ssize_t pread(int __fd, void* __buf, size_t __count, off_t __offset); extern ssize_t pwrite(int __fd, const void* __buf, size_t __count, off_t __offset); extern int ftruncate(int __fd, off_t __length); #endif extern int truncate64(const char* __path, off64_t __length) __INTRODUCED_IN(21); extern ssize_t pread64(int __fd, void* __buf, size_t __count, off64_t __offset) __INTRODUCED_IN(21); extern ssize_t pwrite64(int __fd, const void* __buf, size_t __count, off64_t __offset) __INTRODUCED_IN(21); extern int ftruncate64(int __fd, off64_t __length) __INTRODUCED_IN(21); extern int pause(void); extern unsigned int alarm(unsigned int __seconds); extern unsigned int sleep(unsigned int __seconds); extern int usleep(useconds_t __usec); int gethostname(char* __name, size_t __len); int sethostname(const char* __name, size_t __len); extern void* __brk(void* __addr); extern int brk(void* __addr); extern void* sbrk(ptrdiff_t __increment); extern int getopt(int __argc, char* const* __argv, const char* __argstring); extern char* optarg; extern int optind, opterr, optopt; extern int isatty(int __fd); extern char* ttyname(int __fd); extern int ttyname_r(int __fd, char* __buf, size_t __buflen) __INTRODUCED_IN(8); extern int acct(const char* __filepath); long sysconf(int __name); #if __ANDROID_API__ >= 21 int getpagesize(void); #else __inline__ int getpagesize(void) { return sysconf(_SC_PAGESIZE); } #endif long syscall(long __number, ...); extern int daemon(int __nochdir, int __noclose); #if defined(__arm__) || (defined(__mips__) && !defined(__LP64__)) extern int cacheflush(long __addr, long __nbytes, long __cache); /* __attribute__((deprecated("use __builtin___clear_cache instead"))); */ #endif extern pid_t tcgetpgrp(int __fd); extern int tcsetpgrp(int __fd, pid_t __pid); /* Used to retry syscalls that can return EINTR. */ #define TEMP_FAILURE_RETRY(exp) ({ \ __typeof__(exp) _rc; \ do { \ _rc = (exp); \ } while (_rc == -1 && errno == EINTR); \ _rc; }) /* TODO(unified-headers): Factor out all the FORTIFY features. */ extern char* __getcwd_chk(char*, size_t, size_t); __errordecl(__getcwd_dest_size_error, "getcwd called with size bigger than destination"); extern char* __getcwd_real(char*, size_t) __RENAME(getcwd); extern ssize_t __pread_chk(int, void*, size_t, off_t, size_t); __errordecl(__pread_dest_size_error, "pread called with size bigger than destination"); __errordecl(__pread_count_toobig_error, "pread called with count > SSIZE_MAX"); extern ssize_t __pread_real(int, void*, size_t, off_t) __RENAME(pread); extern ssize_t __pread64_chk(int, void*, size_t, off64_t, size_t); __errordecl(__pread64_dest_size_error, "pread64 called with size bigger than destination"); __errordecl(__pread64_count_toobig_error, "pread64 called with count > SSIZE_MAX"); extern ssize_t __pread64_real(int, void*, size_t, off64_t) __RENAME(pread64); extern ssize_t __pwrite_chk(int, const void*, size_t, off_t, size_t); __errordecl(__pwrite_dest_size_error, "pwrite called with size bigger than destination"); __errordecl(__pwrite_count_toobig_error, "pwrite called with count > SSIZE_MAX"); extern ssize_t __pwrite_real(int, const void*, size_t, off_t) __RENAME(pwrite); extern ssize_t __pwrite64_chk(int, const void*, size_t, off64_t, size_t); __errordecl(__pwrite64_dest_size_error, "pwrite64 called with size bigger than destination"); __errordecl(__pwrite64_count_toobig_error, "pwrite64 called with count > SSIZE_MAX"); extern ssize_t __pwrite64_real(int, const void*, size_t, off64_t) __RENAME(pwrite64); extern ssize_t __read_chk(int, void*, size_t, size_t); __errordecl(__read_dest_size_error, "read called with size bigger than destination"); __errordecl(__read_count_toobig_error, "read called with count > SSIZE_MAX"); extern ssize_t __read_real(int, void*, size_t) __RENAME(read); extern ssize_t __write_chk(int, const void*, size_t, size_t); __errordecl(__write_dest_size_error, "write called with size bigger than destination"); __errordecl(__write_count_toobig_error, "write called with count > SSIZE_MAX"); extern ssize_t __write_real(int, const void*, size_t) __RENAME(write); extern ssize_t __readlink_chk(const char*, char*, size_t, size_t); __errordecl(__readlink_dest_size_error, "readlink called with size bigger than destination"); __errordecl(__readlink_size_toobig_error, "readlink called with size > SSIZE_MAX"); extern ssize_t __readlink_real(const char*, char*, size_t) __RENAME(readlink); extern ssize_t __readlinkat_chk(int dirfd, const char*, char*, size_t, size_t); __errordecl(__readlinkat_dest_size_error, "readlinkat called with size bigger than destination"); __errordecl(__readlinkat_size_toobig_error, "readlinkat called with size > SSIZE_MAX"); extern ssize_t __readlinkat_real(int dirfd, const char*, char*, size_t) __RENAME(readlinkat); #if defined(__BIONIC_FORTIFY) __BIONIC_FORTIFY_INLINE char* getcwd(char* buf, size_t size) { size_t bos = __bos(buf); #if defined(__clang__) /* * Work around LLVM's incorrect __builtin_object_size implementation here * to avoid needing the workaround in the __getcwd_chk ABI forever. * * https://llvm.org/bugs/show_bug.cgi?id=23277 */ if (buf == NULL) { bos = __BIONIC_FORTIFY_UNKNOWN_SIZE; } #else if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) { return __getcwd_real(buf, size); } if (__builtin_constant_p(size) && (size > bos)) { __getcwd_dest_size_error(); } if (__builtin_constant_p(size) && (size <= bos)) { return __getcwd_real(buf, size); } #endif return __getcwd_chk(buf, size, bos); } #if defined(__USE_FILE_OFFSET64) #define __PREAD_PREFIX(x) __pread64_ ## x #else #define __PREAD_PREFIX(x) __pread_ ## x #endif __BIONIC_FORTIFY_INLINE ssize_t pread(int fd, void* buf, size_t count, off_t offset) { size_t bos = __bos0(buf); #if !defined(__clang__) if (__builtin_constant_p(count) && (count > SSIZE_MAX)) { __PREAD_PREFIX(count_toobig_error)(); } if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) { return __PREAD_PREFIX(real)(fd, buf, count, offset); } if (__builtin_constant_p(count) && (count > bos)) { __PREAD_PREFIX(dest_size_error)(); } if (__builtin_constant_p(count) && (count <= bos)) { return __PREAD_PREFIX(real)(fd, buf, count, offset); } #endif return __PREAD_PREFIX(chk)(fd, buf, count, offset, bos); } __BIONIC_FORTIFY_INLINE ssize_t pread64(int fd, void* buf, size_t count, off64_t offset) { size_t bos = __bos0(buf); #if !defined(__clang__) if (__builtin_constant_p(count) && (count > SSIZE_MAX)) { __pread64_count_toobig_error(); } if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) { return __pread64_real(fd, buf, count, offset); } if (__builtin_constant_p(count) && (count > bos)) { __pread64_dest_size_error(); } if (__builtin_constant_p(count) && (count <= bos)) { return __pread64_real(fd, buf, count, offset); } #endif return __pread64_chk(fd, buf, count, offset, bos); } #if defined(__USE_FILE_OFFSET64) #define __PWRITE_PREFIX(x) __pwrite64_ ## x #else #define __PWRITE_PREFIX(x) __pwrite_ ## x #endif __BIONIC_FORTIFY_INLINE ssize_t pwrite(int fd, const void* buf, size_t count, off_t offset) { size_t bos = __bos0(buf); #if !defined(__clang__) if (__builtin_constant_p(count) && (count > SSIZE_MAX)) { __PWRITE_PREFIX(count_toobig_error)(); } if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) { return __PWRITE_PREFIX(real)(fd, buf, count, offset); } if (__builtin_constant_p(count) && (count > bos)) { __PWRITE_PREFIX(dest_size_error)(); } if (__builtin_constant_p(count) && (count <= bos)) { return __PWRITE_PREFIX(real)(fd, buf, count, offset); } #endif return __PWRITE_PREFIX(chk)(fd, buf, count, offset, bos); } __BIONIC_FORTIFY_INLINE ssize_t pwrite64(int fd, const void* buf, size_t count, off64_t offset) { size_t bos = __bos0(buf); #if !defined(__clang__) if (__builtin_constant_p(count) && (count > SSIZE_MAX)) { __pwrite64_count_toobig_error(); } if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) { return __pwrite64_real(fd, buf, count, offset); } if (__builtin_constant_p(count) && (count > bos)) { __pwrite64_dest_size_error(); } if (__builtin_constant_p(count) && (count <= bos)) { return __pwrite64_real(fd, buf, count, offset); } #endif return __pwrite64_chk(fd, buf, count, offset, bos); } __BIONIC_FORTIFY_INLINE ssize_t read(int fd, void* buf, size_t count) { size_t bos = __bos0(buf); #if !defined(__clang__) if (__builtin_constant_p(count) && (count > SSIZE_MAX)) { __read_count_toobig_error(); } if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) { return __read_real(fd, buf, count); } if (__builtin_constant_p(count) && (count > bos)) { __read_dest_size_error(); } if (__builtin_constant_p(count) && (count <= bos)) { return __read_real(fd, buf, count); } #endif return __read_chk(fd, buf, count, bos); } __BIONIC_FORTIFY_INLINE ssize_t write(int fd, const void* buf, size_t count) { size_t bos = __bos0(buf); #if !defined(__clang__) #if 0 /* work around a false positive due to a missed optimization */ if (__builtin_constant_p(count) && (count > SSIZE_MAX)) { __write_count_toobig_error(); } #endif if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) { return __write_real(fd, buf, count); } if (__builtin_constant_p(count) && (count > bos)) { __write_dest_size_error(); } if (__builtin_constant_p(count) && (count <= bos)) { return __write_real(fd, buf, count); } #endif return __write_chk(fd, buf, count, bos); } __BIONIC_FORTIFY_INLINE ssize_t readlink(const char* path, char* buf, size_t size) { size_t bos = __bos(buf); #if !defined(__clang__) if (__builtin_constant_p(size) && (size > SSIZE_MAX)) { __readlink_size_toobig_error(); } if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) { return __readlink_real(path, buf, size); } if (__builtin_constant_p(size) && (size > bos)) { __readlink_dest_size_error(); } if (__builtin_constant_p(size) && (size <= bos)) { return __readlink_real(path, buf, size); } #endif return __readlink_chk(path, buf, size, bos); } __BIONIC_FORTIFY_INLINE ssize_t readlinkat(int dirfd, const char* path, char* buf, size_t size) { size_t bos = __bos(buf); #if !defined(__clang__) if (__builtin_constant_p(size) && (size > SSIZE_MAX)) { __readlinkat_size_toobig_error(); } if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) { return __readlinkat_real(dirfd, path, buf, size); } if (__builtin_constant_p(size) && (size > bos)) { __readlinkat_dest_size_error(); } if (__builtin_constant_p(size) && (size <= bos)) { return __readlinkat_real(dirfd, path, buf, size); } #endif return __readlinkat_chk(dirfd, path, buf, size, bos); } #endif /* defined(__BIONIC_FORTIFY) */ __END_DECLS #endif /* _UNISTD_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/util.h ================================================ ================================================ FILE: atlas-aapt/bionic/libc/include/utime.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _UTIME_H_ #define _UTIME_H_ #include #include #include __BEGIN_DECLS extern int utime(const char*, const struct utimbuf*); __END_DECLS #endif /* _UTIME_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/utmp.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _UTMP_H_ #define _UTMP_H_ #include #include #include #define _PATH_UTMP "/var/run/utmp" #define _PATH_WTMP "/var/log/wtmp" #define _PATH_LASTLOG "/var/log/lastlog" #ifdef __LP64__ #define UT_NAMESIZE 32 #define UT_LINESIZE 32 #define UT_HOSTSIZE 256 #else #define UT_NAMESIZE 8 #define UT_LINESIZE 8 #define UT_HOSTSIZE 16 #endif #define EMPTY 0 #define RUN_LVL 1 #define BOOT_TIME 2 #define NEW_TIME 3 #define OLD_TIME 4 #define INIT_PROCESS 5 #define LOGIN_PROCESS 6 #define USER_PROCESS 7 #define DEAD_PROCESS 8 #define ACCOUNTING 9 struct lastlog { time_t ll_time; char ll_line[UT_LINESIZE]; char ll_host[UT_HOSTSIZE]; }; struct exit_status { short int e_termination; short int e_exit; }; struct utmp { short int ut_type; pid_t ut_pid; char ut_line[UT_LINESIZE]; char ut_id[4]; char ut_user[UT_NAMESIZE]; char ut_host[UT_HOSTSIZE]; struct exit_status ut_exit; long int ut_session; struct timeval ut_tv; int32_t ut_addr_v6[4]; char unsed[20]; }; #define ut_name ut_user #define ut_time ut_tv.tv_sec #define ut_addr ut_addr_v6[0] __BEGIN_DECLS int utmpname(const char*); void setutent(void); struct utmp* getutent(void); void endutent(void); int login_tty(int); __END_DECLS #endif /* _UTMP_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/wait.h ================================================ #include ================================================ FILE: atlas-aapt/bionic/libc/include/wchar.h ================================================ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _WCHAR_H_ #define _WCHAR_H_ #include #include #include #include #include #include #include __BEGIN_DECLS typedef __WINT_TYPE__ wint_t; typedef struct { uint8_t __seq[4]; #ifdef __LP64__ char __reserved[4]; #endif } mbstate_t; enum { WC_TYPE_INVALID = 0, WC_TYPE_ALNUM, WC_TYPE_ALPHA, WC_TYPE_BLANK, WC_TYPE_CNTRL, WC_TYPE_DIGIT, WC_TYPE_GRAPH, WC_TYPE_LOWER, WC_TYPE_PRINT, WC_TYPE_PUNCT, WC_TYPE_SPACE, WC_TYPE_UPPER, WC_TYPE_XDIGIT, WC_TYPE_MAX }; typedef long wctype_t; #define WEOF ((wint_t)(-1)) extern wint_t btowc(int); extern int fwprintf(FILE *, const wchar_t *, ...); extern int fwscanf(FILE *, const wchar_t *, ...); extern int iswalnum(wint_t); extern int iswalpha(wint_t); extern int iswblank(wint_t); extern int iswcntrl(wint_t); extern int iswdigit(wint_t); extern int iswgraph(wint_t); extern int iswlower(wint_t); extern int iswprint(wint_t); extern int iswpunct(wint_t); extern int iswspace(wint_t); extern int iswupper(wint_t); extern int iswxdigit(wint_t); extern int iswctype(wint_t, wctype_t); extern wint_t fgetwc(FILE *); extern wchar_t *fgetws(wchar_t *, int, FILE *); extern wint_t fputwc(wchar_t, FILE *); extern int fputws(const wchar_t *, FILE *); extern int fwide(FILE *, int); extern wint_t getwc(FILE *); extern wint_t getwchar(void); extern int mbsinit(const mbstate_t *); extern size_t mbrlen(const char *, size_t, mbstate_t *); extern size_t mbrtowc(wchar_t *, const char *, size_t, mbstate_t *); extern size_t mbsrtowcs(wchar_t*, const char**, size_t, mbstate_t*); extern size_t mbsnrtowcs(wchar_t*, const char**, size_t, size_t, mbstate_t*); extern size_t mbstowcs(wchar_t *, const char *, size_t); extern wint_t putwc(wchar_t, FILE *); extern wint_t putwchar(wchar_t); extern int swprintf(wchar_t *, size_t, const wchar_t *, ...); extern int swscanf(const wchar_t *, const wchar_t *, ...); extern wint_t towlower(wint_t); extern wint_t towupper(wint_t); extern wint_t ungetwc(wint_t, FILE *); extern int vfwprintf(FILE*, const wchar_t*, va_list); extern int vfwscanf(FILE*, const wchar_t*, va_list); extern int vswprintf(wchar_t*, size_t, const wchar_t*, va_list); extern int vswscanf(const wchar_t*, const wchar_t*, va_list); extern int vwprintf(const wchar_t*, va_list); extern int vwscanf(const wchar_t*, va_list); extern wchar_t* wcpcpy (wchar_t*, const wchar_t *); extern wchar_t* wcpncpy (wchar_t*, const wchar_t *, size_t); extern size_t wcrtomb(char *, wchar_t, mbstate_t *); extern int wcscasecmp(const wchar_t *, const wchar_t *); extern int wcscasecmp_l(const wchar_t *, const wchar_t *, locale_t); extern wchar_t *wcscat(wchar_t *, const wchar_t *); extern wchar_t *wcschr(const wchar_t *, wchar_t); extern int wcscmp(const wchar_t *, const wchar_t *); extern int wcscoll(const wchar_t *, const wchar_t *); extern wchar_t *wcscpy(wchar_t *, const wchar_t *); extern size_t wcscspn(const wchar_t *, const wchar_t *); extern size_t wcsftime(wchar_t *, size_t, const wchar_t *, const struct tm *) __LIBC_ABI_PUBLIC__; extern size_t wcslen(const wchar_t *); extern int wcsncasecmp(const wchar_t *, const wchar_t *, size_t); extern int wcsncasecmp_l(const wchar_t *, const wchar_t *, size_t, locale_t); extern wchar_t *wcsncat(wchar_t *, const wchar_t *, size_t); extern int wcsncmp(const wchar_t *, const wchar_t *, size_t); extern wchar_t *wcsncpy(wchar_t *, const wchar_t *, size_t); extern size_t wcsnrtombs(char*, const wchar_t**, size_t, size_t, mbstate_t*); extern wchar_t *wcspbrk(const wchar_t *, const wchar_t *); extern wchar_t *wcsrchr(const wchar_t *, wchar_t); extern size_t wcsrtombs(char*, const wchar_t**, size_t, mbstate_t*); extern size_t wcsspn(const wchar_t *, const wchar_t *); extern wchar_t *wcsstr(const wchar_t *, const wchar_t *); extern double wcstod(const wchar_t*, wchar_t**); extern float wcstof(const wchar_t*, wchar_t**); extern wchar_t* wcstok(wchar_t*, const wchar_t*, wchar_t**); extern long wcstol(const wchar_t*, wchar_t**, int); extern long long wcstoll(const wchar_t*, wchar_t**, int); extern long double wcstold(const wchar_t*, wchar_t**); extern unsigned long wcstoul(const wchar_t*, wchar_t**, int); extern unsigned long long wcstoull(const wchar_t*, wchar_t**, int); extern int wcswidth(const wchar_t *, size_t); extern size_t wcsxfrm(wchar_t *, const wchar_t *, size_t); extern int wctob(wint_t); extern wctype_t wctype(const char *); extern int wcwidth(wchar_t); extern wchar_t *wmemchr(const wchar_t *, wchar_t, size_t); extern int wmemcmp(const wchar_t *, const wchar_t *, size_t); extern wchar_t *wmemcpy(wchar_t *, const wchar_t *, size_t); #if defined(__USE_GNU) extern wchar_t *wmempcpy(wchar_t *, const wchar_t *, size_t); #endif extern wchar_t *wmemmove(wchar_t *, const wchar_t *, size_t); extern wchar_t *wmemset(wchar_t *, wchar_t, size_t); extern int wprintf(const wchar_t *, ...); extern int wscanf(const wchar_t *, ...); extern long long wcstoll_l(const wchar_t *, wchar_t **, int, locale_t); extern unsigned long long wcstoull_l(const wchar_t *, wchar_t **, int, locale_t); extern long double wcstold_l(const wchar_t *, wchar_t **, locale_t ); extern int wcscoll_l(const wchar_t *, const wchar_t *, locale_t); extern size_t wcsxfrm_l(wchar_t *, const wchar_t *, size_t, locale_t); extern size_t wcslcat(wchar_t*, const wchar_t*, size_t); extern size_t wcslcpy(wchar_t*, const wchar_t*, size_t); typedef void *wctrans_t; extern wint_t towctrans(wint_t, wctrans_t); extern wctrans_t wctrans(const char*); #if __POSIX_VISIBLE >= 200809 FILE* open_wmemstream(wchar_t**, size_t*); wchar_t* wcsdup(const wchar_t*); size_t wcsnlen(const wchar_t*, size_t); #endif __END_DECLS #endif /* _WCHAR_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/wctype.h ================================================ /* * Copyright (C) 2014 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _WCTYPE_H_ #define _WCTYPE_H_ #include __BEGIN_DECLS extern int iswalnum_l(wint_t, locale_t); extern int iswalpha_l(wint_t, locale_t); extern int iswblank_l(wint_t, locale_t); extern int iswcntrl_l(wint_t, locale_t); extern int iswdigit_l(wint_t, locale_t); extern int iswgraph_l(wint_t, locale_t); extern int iswlower_l(wint_t, locale_t); extern int iswprint_l(wint_t, locale_t); extern int iswpunct_l(wint_t, locale_t); extern int iswspace_l(wint_t, locale_t); extern int iswupper_l(wint_t, locale_t); extern int iswxdigit_l(wint_t, locale_t); extern int towlower_l(int, locale_t); extern int towupper_l(int, locale_t); extern int iswctype_l(wint_t, wctype_t, locale_t); extern wctype_t wctype_l(const char*, locale_t); __END_DECLS #endif /* _WCTYPE_H_ */ ================================================ FILE: atlas-aapt/bionic/libc/include/xlocale.h ================================================ /* * Copyright (C) 2014 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _XLOCALE_H_ #define _XLOCALE_H_ /* If we just use void* here, GCC exposes that in error messages. */ struct __locale_t; typedef struct __locale_t* locale_t; #endif /* _XLOCALE_H_ */ ================================================ FILE: atlas-aapt/build_ShakaAapt_all_in_linux.sh ================================================ #! /bin/bash #43 export Project=ShakaAapt export BUILD_NUMBER=$Project.$(date +%Y%m%d.%H%M%S) export BinDir=ShakaAaptBin export USE_CCACHE=1 export CCACHE_DIR=$(pwd)/.ccache export OUT_DIR=out-x86_64 prebuilts/misc/linux-x86/ccache/ccache -M 50G rm -rf out-x86 out-x86_64 # linux-x86_64 OUT_DIR=out-x86_64 make -B BUILD_NUMBER=$BUILD_NUMBER LOCAL_MULTILIB=64 USE_NINJA=false aapt -j4 strip out-x86_64/host/linux-x86/bin/aapt mkdir -p $BinDir/linux-x86_64/bin cp out-x86_64/host/linux-x86/bin/aapt $BinDir/linux-x86_64/bin/aapt # linux-x86 OUT_DIR=out-x86 make -B BUILD_NUMBER=$BUILD_NUMBER LOCAL_MULTILIB=32 USE_NINJA=false aapt -j4 strip out-x86/host/linux-x86/bin/aapt mkdir -p $BinDir/linux-x86/bin cp out-x86/host/linux-x86/bin/aapt $BinDir/linux-x86/bin/aapt # windows-x86 OUT_DIR=out-x86 make -B winsdk-tools -j4 USE_NINJA=false strip out-x86/host/windows-x86/bin/aapt.exe mkdir -p $BinDir/windows-x86/bin cp out-x86/host/windows-x86/bin/aapt.exe $BinDir/windows-x86/bin/aapt.exe ================================================ FILE: atlas-aapt/build_ShakaAapt_all_in_maxos.sh ================================================ #! /bin/bash export Project=ShakaAapt export BUILD_NUMBER=$Project.$(date +%Y%m%d.%H%M%S) export BinDir=ShakaAaptBin export USE_CCACHE=1 export CCACHE_DIR=$(pwd)/.ccache prebuilts/misc/darwin-x86/ccache/ccache -M 50G . build/envsetup.sh lunch sdk-eng rm -rf out-x86 out-x86_64 # darwin-x86 OUT_DIR=out-x86 make -B BUILD_NUMBER=$BUILD_NUMBER LOCAL_MULTILIB=32 USE_NINJA=false aapt -j4 mkdir -p "$BinDir/darwin-x86/bin" cp out-x86/host/darwin-x86/bin/aapt "$BinDir/darwin-x86/bin/aapt" #mkdir -p lib "$BinDir/darwin-x86/lib" #cp out-x86/host/darwin-x86/lib/libc++.dylib "$BinDir/darwin-x86/lib/libc++.dylib" # darwin-x86_64 OUT_DIR=out-x86_64 make -B BUILD_NUMBER=$BUILD_NUMBER LOCAL_MULTILIB=64 USE_NINJA=false aapt -j4 mkdir -p "$BinDir/darwin-x86_64/bin" cp out-x86_64/host/darwin-x86/bin/aapt "$BinDir/darwin-x86_64/bin/aapt" #mkdir -p "$BinDir/darwin-x86_64/lib64/" #cp out-x86_64/host/darwin-x86/lib64/libc++.dylib "$BinDir/darwin-x86_64/lib64/libc++.dylib" ================================================ FILE: atlas-aapt/external/compiler-rt/.arcconfig ================================================ { "project_id" : "compiler-rt", "conduit_uri" : "http://reviews.llvm.org/" } ================================================ FILE: atlas-aapt/external/compiler-rt/.gitignore ================================================ *~ darwin_fat clang_darwin multi_arch *.sw? ================================================ FILE: atlas-aapt/external/compiler-rt/Android.bp ================================================ // // Copyright (C) 2012 The Android Open Source Project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // // //===================================================================== // Static Library: libcompiler_rt-extras //===================================================================== cc_library_static { name: "libcompiler_rt-extras", host_supported: true, clang: true, // The following list contains functions that are not available in libgcc.a, so // we potentially need them when using a Clang-built component (e.g., -ftrapv // with 64-bit integer multiplies. See http://llvm.org/bugs/show_bug.cgi?id=14469.) srcs: ["lib/builtins/mulodi4.c"], sanitize: ["never"], stl: "none", cflags: [ "-Wno-unused-parameter", "-Werror", ], arch: { mips: { srcs: ["lib/builtins/clear_cache.c"], }, mips64: { srcs: ["lib/builtins/clear_cache.c"], }, }, target: { windows: { enabled: true, }, }, } // Don't build compiler-rt without clang // ANDROIDMK TRANSLATION ERROR: unsupported directive // ifneq ($(WITHOUT_TARGET_CLANG), true) //===================================================================== // Device and Host Static Library: libcompiler_rt //===================================================================== cc_library { name: "libcompiler_rt", host_supported: true, // The following list contains platform-independent functionalities. // // Skip apple_versioning.c since it is unused. // Skip atomic.c since it needs to be built separately according to the docs. srcs: [ "lib/builtins/absvdi2.c", "lib/builtins/absvsi2.c", "lib/builtins/absvti2.c", "lib/builtins/adddf3.c", "lib/builtins/addsf3.c", "lib/builtins/addtf3.c", "lib/builtins/addvdi3.c", "lib/builtins/addvsi3.c", "lib/builtins/addvti3.c", "lib/builtins/ashldi3.c", "lib/builtins/ashlti3.c", "lib/builtins/ashrdi3.c", "lib/builtins/ashrti3.c", "lib/builtins/clear_cache.c", "lib/builtins/clzdi2.c", "lib/builtins/clzsi2.c", "lib/builtins/clzti2.c", "lib/builtins/cmpdi2.c", "lib/builtins/cmpti2.c", "lib/builtins/comparedf2.c", "lib/builtins/comparesf2.c", "lib/builtins/comparetf2.c", "lib/builtins/ctzdi2.c", "lib/builtins/ctzsi2.c", "lib/builtins/ctzti2.c", "lib/builtins/divdc3.c", "lib/builtins/divdf3.c", "lib/builtins/divdi3.c", "lib/builtins/divmoddi4.c", "lib/builtins/divmodsi4.c", "lib/builtins/divsc3.c", "lib/builtins/divsf3.c", "lib/builtins/divsi3.c", "lib/builtins/divtf3.c", "lib/builtins/divti3.c", "lib/builtins/divxc3.c", "lib/builtins/eprintf.c", "lib/builtins/extenddftf2.c", "lib/builtins/extendhfsf2.c", "lib/builtins/extendsfdf2.c", "lib/builtins/extendsftf2.c", "lib/builtins/ffsdi2.c", "lib/builtins/ffsti2.c", "lib/builtins/fixdfdi.c", "lib/builtins/fixdfsi.c", "lib/builtins/fixdfti.c", "lib/builtins/fixsfdi.c", "lib/builtins/fixsfsi.c", "lib/builtins/fixsfti.c", "lib/builtins/fixtfdi.c", "lib/builtins/fixtfsi.c", "lib/builtins/fixtfti.c", "lib/builtins/fixunsdfdi.c", "lib/builtins/fixunsdfsi.c", "lib/builtins/fixunsdfti.c", "lib/builtins/fixunssfdi.c", "lib/builtins/fixunssfsi.c", "lib/builtins/fixunssfti.c", "lib/builtins/fixunstfdi.c", "lib/builtins/fixunstfsi.c", "lib/builtins/fixunstfti.c", "lib/builtins/fixunsxfdi.c", "lib/builtins/fixunsxfsi.c", "lib/builtins/fixunsxfti.c", "lib/builtins/fixxfdi.c", "lib/builtins/fixxfti.c", "lib/builtins/floatdidf.c", "lib/builtins/floatdisf.c", "lib/builtins/floatdixf.c", "lib/builtins/floatsidf.c", "lib/builtins/floatsisf.c", "lib/builtins/floatsitf.c", "lib/builtins/floattidf.c", "lib/builtins/floattisf.c", "lib/builtins/floattixf.c", "lib/builtins/floatundidf.c", "lib/builtins/floatundisf.c", "lib/builtins/floatundixf.c", "lib/builtins/floatunsidf.c", "lib/builtins/floatunsisf.c", "lib/builtins/floatunsitf.c", "lib/builtins/floatuntidf.c", "lib/builtins/floatuntisf.c", "lib/builtins/floatuntixf.c", "lib/builtins/gcc_personality_v0.c", "lib/builtins/int_util.c", "lib/builtins/lshrdi3.c", "lib/builtins/lshrti3.c", "lib/builtins/moddi3.c", "lib/builtins/modsi3.c", "lib/builtins/modti3.c", "lib/builtins/muldc3.c", "lib/builtins/muldf3.c", "lib/builtins/muldi3.c", "lib/builtins/mulodi4.c", "lib/builtins/mulosi4.c", "lib/builtins/muloti4.c", "lib/builtins/mulsc3.c", "lib/builtins/mulsf3.c", "lib/builtins/multf3.c", "lib/builtins/multi3.c", "lib/builtins/mulvdi3.c", "lib/builtins/mulvsi3.c", "lib/builtins/mulvti3.c", "lib/builtins/mulxc3.c", "lib/builtins/negdf2.c", "lib/builtins/negdi2.c", "lib/builtins/negsf2.c", "lib/builtins/negti2.c", "lib/builtins/negvdi2.c", "lib/builtins/negvsi2.c", "lib/builtins/negvti2.c", "lib/builtins/paritydi2.c", "lib/builtins/paritysi2.c", "lib/builtins/parityti2.c", "lib/builtins/popcountdi2.c", "lib/builtins/popcountsi2.c", "lib/builtins/popcountti2.c", "lib/builtins/powidf2.c", "lib/builtins/powisf2.c", "lib/builtins/powitf2.c", "lib/builtins/powixf2.c", "lib/builtins/subdf3.c", "lib/builtins/subsf3.c", "lib/builtins/subtf3.c", "lib/builtins/subvdi3.c", "lib/builtins/subvsi3.c", "lib/builtins/subvti3.c", "lib/builtins/trampoline_setup.c", "lib/builtins/truncdfhf2.c", "lib/builtins/truncdfsf2.c", "lib/builtins/truncsfhf2.c", "lib/builtins/trunctfdf2.c", "lib/builtins/trunctfsf2.c", "lib/builtins/ucmpdi2.c", "lib/builtins/ucmpti2.c", "lib/builtins/udivdi3.c", "lib/builtins/udivmoddi4.c", "lib/builtins/udivmodsi4.c", "lib/builtins/udivmodti4.c", "lib/builtins/udivsi3.c", "lib/builtins/udivti3.c", "lib/builtins/umoddi3.c", "lib/builtins/umodsi3.c", "lib/builtins/umodti3.c", ], cflags: [ "-Wno-unused-parameter", "-Werror", ], arch: { arm: { cflags: ["-D__ARM_EABI__"], srcs: [ "lib/builtins/arm/aeabi_dcmp.S", "lib/builtins/arm/aeabi_div0.c", "lib/builtins/arm/aeabi_fcmp.S", "lib/builtins/arm/aeabi_idivmod.S", "lib/builtins/arm/aeabi_ldivmod.S", "lib/builtins/arm/aeabi_memcmp.S", "lib/builtins/arm/aeabi_memcpy.S", "lib/builtins/arm/aeabi_memmove.S", "lib/builtins/arm/aeabi_memset.S", "lib/builtins/arm/aeabi_uidivmod.S", "lib/builtins/arm/aeabi_uldivmod.S", "lib/builtins/arm/comparesf2.S", "lib/builtins/arm/divmodsi4.S", "lib/builtins/arm/divsi3.S", "lib/builtins/arm/modsi3.S", "lib/builtins/arm/udivmodsi4.S", "lib/builtins/arm/udivsi3.S", "lib/builtins/arm/umodsi3.S", "lib/builtins/arm/adddf3vfp.S", "lib/builtins/arm/addsf3vfp.S", "lib/builtins/arm/divdf3vfp.S", "lib/builtins/arm/divsf3vfp.S", "lib/builtins/arm/eqdf2vfp.S", "lib/builtins/arm/eqsf2vfp.S", "lib/builtins/arm/extendsfdf2vfp.S", "lib/builtins/arm/fixdfsivfp.S", "lib/builtins/arm/fixsfsivfp.S", "lib/builtins/arm/fixunsdfsivfp.S", "lib/builtins/arm/fixunssfsivfp.S", "lib/builtins/arm/floatsidfvfp.S", "lib/builtins/arm/floatsisfvfp.S", "lib/builtins/arm/floatunssidfvfp.S", "lib/builtins/arm/floatunssisfvfp.S", "lib/builtins/arm/gedf2vfp.S", "lib/builtins/arm/gesf2vfp.S", "lib/builtins/arm/gtdf2vfp.S", "lib/builtins/arm/gtsf2vfp.S", "lib/builtins/arm/ledf2vfp.S", "lib/builtins/arm/lesf2vfp.S", "lib/builtins/arm/ltdf2vfp.S", "lib/builtins/arm/ltsf2vfp.S", "lib/builtins/arm/muldf3vfp.S", "lib/builtins/arm/mulsf3vfp.S", "lib/builtins/arm/nedf2vfp.S", "lib/builtins/arm/negdf2vfp.S", "lib/builtins/arm/negsf2vfp.S", "lib/builtins/arm/nesf2vfp.S", "lib/builtins/arm/subdf3vfp.S", "lib/builtins/arm/subsf3vfp.S", "lib/builtins/arm/truncdfsf2vfp.S", "lib/builtins/arm/unorddf2vfp.S", "lib/builtins/arm/unordsf2vfp.S", ], exclude_srcs: [ "lib/builtins/comparesf2.c", "lib/builtins/divmodsi4.c", "lib/builtins/divsi3.c", "lib/builtins/modsi3.c", "lib/builtins/udivmodsi4.c", "lib/builtins/udivsi3.c", "lib/builtins/umodsi3.c", ], }, mips64: { cflags: [ "-DCRT_HAS_128BIT", ], }, x86: { srcs: [ "lib/builtins/i386/ashldi3.S", "lib/builtins/i386/ashrdi3.S", "lib/builtins/i386/divdi3.S", "lib/builtins/i386/floatdidf.S", "lib/builtins/i386/floatdisf.S", "lib/builtins/i386/floatdixf.S", "lib/builtins/i386/floatundidf.S", "lib/builtins/i386/floatundisf.S", "lib/builtins/i386/floatundixf.S", "lib/builtins/i386/lshrdi3.S", "lib/builtins/i386/moddi3.S", "lib/builtins/i386/muldi3.S", "lib/builtins/i386/udivdi3.S", "lib/builtins/i386/umoddi3.S", ], exclude_srcs: [ "lib/builtins/ashldi3.c", "lib/builtins/ashrdi3.c", "lib/builtins/divdi3.c", "lib/builtins/floatdidf.c", "lib/builtins/floatdisf.c", "lib/builtins/floatdixf.c", "lib/builtins/floatundidf.c", "lib/builtins/floatundisf.c", "lib/builtins/floatundixf.c", "lib/builtins/lshrdi3.c", "lib/builtins/moddi3.c", "lib/builtins/muldi3.c", "lib/builtins/udivdi3.c", "lib/builtins/umoddi3.c", ], }, x86_64: { srcs: [ "lib/builtins/x86_64/floatundixf.S", "lib/builtins/x86_64/floatdisf.c", "lib/builtins/x86_64/floatdidf.c", "lib/builtins/x86_64/floatdixf.c", "lib/builtins/x86_64/floatundisf.S", "lib/builtins/x86_64/floatundidf.S", ], exclude_srcs: [ "lib/builtins/floatundixf.c", "lib/builtins/floatdisf.c", "lib/builtins/floatdidf.c", "lib/builtins/floatdixf.c", "lib/builtins/floatundisf.c", "lib/builtins/floatundidf.c", ], }, }, target: { not_windows: { // Only build enable_execute_stack.c on non-Windows hosts. srcs: ["lib/builtins/enable_execute_stack.c"], host_ldlibs: [ "-lpthread", "-lc", "-lm", ], }, android: { srcs: ["lib/builtins/enable_execute_stack.c"], shared_libs: ["libdl", "liblog"], static_libs: ["liblzma"], }, android_arm: { static_libs: ["libunwind_llvm"], ldflags: ["-Wl,--exclude-libs,libunwind_llvm.a"], }, android_arm64: { // b/26968262 liblzma needs to be after libunwindbacktrace static_libs: ["libunwindbacktrace","liblzma"], ldflags: ["-Wl,--exclude-libs,libunwindbacktrace.a"], }, android_mips: { // b/26968262 liblzma needs to be after libunwindbacktrace static_libs: ["libunwindbacktrace","liblzma"], ldflags: ["-Wl,--exclude-libs,libunwindbacktrace.a"], }, android_mips64: { // b/26968262 liblzma needs to be after libunwindbacktrace static_libs: ["libunwindbacktrace","liblzma"], ldflags: ["-Wl,--exclude-libs,libunwindbacktrace.a"], }, android_x86: { // b/26968262 liblzma needs to be after libunwindbacktrace static_libs: ["libunwindbacktrace","liblzma"], ldflags: ["-Wl,--exclude-libs,libunwindbacktrace.a"], }, android_x86_64: { srcs: ["lib/builtins/ppc/floatditf.c"], // b/26968262 liblzma needs to be after libunwindbacktrace static_libs: ["libunwindbacktrace","liblzma"], ldflags: ["-Wl,--exclude-libs,libunwindbacktrace.a"], }, linux: { static_libs: ["libunwindbacktrace"], }, windows: { static_libs: ["libunwindbacktrace"], }, }, asflags: ["-integrated-as"], clang: true, no_libgcc: true, sanitize: ["never"], stl: "none", } // Build asan, lsan, etc. // ANDROIDMK TRANSLATION ERROR: unsupported include // include $(call all-makefiles-under,$(LOCAL_PATH)/lib) // ANDROIDMK TRANSLATION ERROR: unsupported directive // endif ================================================ FILE: atlas-aapt/external/compiler-rt/Android.mk ================================================ # # Copyright (C) 2012 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # LOCAL_PATH := $(call my-dir) # The following list contains platform-independent functionalities. # # Skip apple_versioning.c since it is unused. # Skip atomic.c since it needs to be built separately according to the docs. libcompiler_rt_common_SRC_FILES := \ lib/builtins/absvdi2.c \ lib/builtins/absvsi2.c \ lib/builtins/absvti2.c \ lib/builtins/adddf3.c \ lib/builtins/addsf3.c \ lib/builtins/addtf3.c \ lib/builtins/addvdi3.c \ lib/builtins/addvsi3.c \ lib/builtins/addvti3.c \ lib/builtins/ashldi3.c \ lib/builtins/ashlti3.c \ lib/builtins/ashrdi3.c \ lib/builtins/ashrti3.c \ lib/builtins/clear_cache.c \ lib/builtins/clzdi2.c \ lib/builtins/clzsi2.c \ lib/builtins/clzti2.c \ lib/builtins/cmpdi2.c \ lib/builtins/cmpti2.c \ lib/builtins/comparedf2.c \ lib/builtins/comparesf2.c \ lib/builtins/comparetf2.c \ lib/builtins/ctzdi2.c \ lib/builtins/ctzsi2.c \ lib/builtins/ctzti2.c \ lib/builtins/divdc3.c \ lib/builtins/divdf3.c \ lib/builtins/divdi3.c \ lib/builtins/divmoddi4.c \ lib/builtins/divmodsi4.c \ lib/builtins/divsc3.c \ lib/builtins/divsf3.c \ lib/builtins/divsi3.c \ lib/builtins/divtf3.c \ lib/builtins/divti3.c \ lib/builtins/divxc3.c \ lib/builtins/eprintf.c \ lib/builtins/extenddftf2.c \ lib/builtins/extendhfsf2.c \ lib/builtins/extendsfdf2.c \ lib/builtins/extendsftf2.c \ lib/builtins/ffsdi2.c \ lib/builtins/ffsti2.c \ lib/builtins/fixdfdi.c \ lib/builtins/fixdfsi.c \ lib/builtins/fixdfti.c \ lib/builtins/fixsfdi.c \ lib/builtins/fixsfsi.c \ lib/builtins/fixsfti.c \ lib/builtins/fixtfdi.c \ lib/builtins/fixtfsi.c \ lib/builtins/fixtfti.c \ lib/builtins/fixunsdfdi.c \ lib/builtins/fixunsdfsi.c \ lib/builtins/fixunsdfti.c \ lib/builtins/fixunssfdi.c \ lib/builtins/fixunssfsi.c \ lib/builtins/fixunssfti.c \ lib/builtins/fixunstfdi.c \ lib/builtins/fixunstfsi.c \ lib/builtins/fixunstfti.c \ lib/builtins/fixunsxfdi.c \ lib/builtins/fixunsxfsi.c \ lib/builtins/fixunsxfti.c \ lib/builtins/fixxfdi.c \ lib/builtins/fixxfti.c \ lib/builtins/floatdidf.c \ lib/builtins/floatdisf.c \ lib/builtins/floatdixf.c \ lib/builtins/floatsidf.c \ lib/builtins/floatsisf.c \ lib/builtins/floatsitf.c \ lib/builtins/floattidf.c \ lib/builtins/floattisf.c \ lib/builtins/floattixf.c \ lib/builtins/floatundidf.c \ lib/builtins/floatundisf.c \ lib/builtins/floatundixf.c \ lib/builtins/floatunsidf.c \ lib/builtins/floatunsisf.c \ lib/builtins/floatunsitf.c \ lib/builtins/floatuntidf.c \ lib/builtins/floatuntisf.c \ lib/builtins/floatuntixf.c \ lib/builtins/gcc_personality_v0.c \ lib/builtins/int_util.c \ lib/builtins/lshrdi3.c \ lib/builtins/lshrti3.c \ lib/builtins/moddi3.c \ lib/builtins/modsi3.c \ lib/builtins/modti3.c \ lib/builtins/muldc3.c \ lib/builtins/muldf3.c \ lib/builtins/muldi3.c \ lib/builtins/mulodi4.c \ lib/builtins/mulosi4.c \ lib/builtins/muloti4.c \ lib/builtins/mulsc3.c \ lib/builtins/mulsf3.c \ lib/builtins/multf3.c \ lib/builtins/multi3.c \ lib/builtins/mulvdi3.c \ lib/builtins/mulvsi3.c \ lib/builtins/mulvti3.c \ lib/builtins/mulxc3.c \ lib/builtins/negdf2.c \ lib/builtins/negdi2.c \ lib/builtins/negsf2.c \ lib/builtins/negti2.c \ lib/builtins/negvdi2.c \ lib/builtins/negvsi2.c \ lib/builtins/negvti2.c \ lib/builtins/paritydi2.c \ lib/builtins/paritysi2.c \ lib/builtins/parityti2.c \ lib/builtins/popcountdi2.c \ lib/builtins/popcountsi2.c \ lib/builtins/popcountti2.c \ lib/builtins/powidf2.c \ lib/builtins/powisf2.c \ lib/builtins/powitf2.c \ lib/builtins/powixf2.c \ lib/builtins/subdf3.c \ lib/builtins/subsf3.c \ lib/builtins/subtf3.c \ lib/builtins/subvdi3.c \ lib/builtins/subvsi3.c \ lib/builtins/subvti3.c \ lib/builtins/trampoline_setup.c \ lib/builtins/truncdfhf2.c \ lib/builtins/truncdfsf2.c \ lib/builtins/truncsfhf2.c \ lib/builtins/trunctfdf2.c \ lib/builtins/trunctfsf2.c \ lib/builtins/ucmpdi2.c \ lib/builtins/ucmpti2.c \ lib/builtins/udivdi3.c \ lib/builtins/udivmoddi4.c \ lib/builtins/udivmodsi4.c \ lib/builtins/udivmodti4.c \ lib/builtins/udivsi3.c \ lib/builtins/udivti3.c \ lib/builtins/umoddi3.c \ lib/builtins/umodsi3.c \ lib/builtins/umodti3.c # ARM-specific runtimes libcompiler_rt_arm_SRC_FILES := \ lib/builtins/arm/aeabi_dcmp.S \ lib/builtins/arm/aeabi_div0.c \ lib/builtins/arm/aeabi_fcmp.S \ lib/builtins/arm/aeabi_idivmod.S \ lib/builtins/arm/aeabi_ldivmod.S \ lib/builtins/arm/aeabi_memcmp.S \ lib/builtins/arm/aeabi_memcpy.S \ lib/builtins/arm/aeabi_memmove.S \ lib/builtins/arm/aeabi_memset.S \ lib/builtins/arm/aeabi_uidivmod.S \ lib/builtins/arm/aeabi_uldivmod.S \ lib/builtins/arm/comparesf2.S \ lib/builtins/arm/divmodsi4.S \ lib/builtins/arm/divsi3.S \ lib/builtins/arm/modsi3.S \ lib/builtins/arm/udivmodsi4.S \ lib/builtins/arm/udivsi3.S \ lib/builtins/arm/umodsi3.S \ lib/builtins/arm/adddf3vfp.S \ lib/builtins/arm/addsf3vfp.S \ lib/builtins/arm/divdf3vfp.S \ lib/builtins/arm/divsf3vfp.S \ lib/builtins/arm/eqdf2vfp.S \ lib/builtins/arm/eqsf2vfp.S \ lib/builtins/arm/extendsfdf2vfp.S \ lib/builtins/arm/fixdfsivfp.S \ lib/builtins/arm/fixsfsivfp.S \ lib/builtins/arm/fixunsdfsivfp.S \ lib/builtins/arm/fixunssfsivfp.S \ lib/builtins/arm/floatsidfvfp.S \ lib/builtins/arm/floatsisfvfp.S \ lib/builtins/arm/floatunssidfvfp.S \ lib/builtins/arm/floatunssisfvfp.S \ lib/builtins/arm/gedf2vfp.S \ lib/builtins/arm/gesf2vfp.S \ lib/builtins/arm/gtdf2vfp.S \ lib/builtins/arm/gtsf2vfp.S \ lib/builtins/arm/ledf2vfp.S \ lib/builtins/arm/lesf2vfp.S \ lib/builtins/arm/ltdf2vfp.S \ lib/builtins/arm/ltsf2vfp.S \ lib/builtins/arm/muldf3vfp.S \ lib/builtins/arm/mulsf3vfp.S \ lib/builtins/arm/nedf2vfp.S \ lib/builtins/arm/negdf2vfp.S \ lib/builtins/arm/negsf2vfp.S \ lib/builtins/arm/nesf2vfp.S \ lib/builtins/arm/subdf3vfp.S \ lib/builtins/arm/subsf3vfp.S \ lib/builtins/arm/truncdfsf2vfp.S \ lib/builtins/arm/unorddf2vfp.S \ lib/builtins/arm/unordsf2vfp.S # ARM64-specific runtimes libcompiler_rt_arm64_SRC_FILES := # MIPS-specific runtimes libcompiler_rt_mips_SRC_FILES := # nothing to add libcompiler_rt_mips64_SRC_FILES := # nothing to add # X86-specific runtimes libcompiler_rt_x86_SRC_FILES := \ lib/builtins/i386/ashldi3.S \ lib/builtins/i386/ashrdi3.S \ lib/builtins/i386/divdi3.S \ lib/builtins/i386/floatdidf.S \ lib/builtins/i386/floatdisf.S \ lib/builtins/i386/floatdixf.S \ lib/builtins/i386/floatundidf.S \ lib/builtins/i386/floatundisf.S \ lib/builtins/i386/floatundixf.S \ lib/builtins/i386/lshrdi3.S \ lib/builtins/i386/moddi3.S \ lib/builtins/i386/muldi3.S \ lib/builtins/i386/udivdi3.S \ lib/builtins/i386/umoddi3.S # X86_64-specific runtimes libcompiler_rt_x86_64_SRC_FILES := \ lib/builtins/x86_64/floatundixf.S \ lib/builtins/x86_64/floatdisf.c \ lib/builtins/x86_64/floatdidf.c \ lib/builtins/x86_64/floatdixf.c \ lib/builtins/x86_64/floatundisf.S \ lib/builtins/x86_64/floatundidf.S # The following list contains functions that are not available in libgcc.a, so # we potentially need them when using a Clang-built component (e.g., -ftrapv # with 64-bit integer multiplies. See http://llvm.org/bugs/show_bug.cgi?id=14469.) libcompiler_rt_extras_SRC_FILES := \ lib/builtins/mulodi4.c # $(1): arch define get-libcompiler-rt-source-files $(if $(findstring $(1),arm),$(call get-libcompiler-rt-arm-source-files), $(if $(findstring $(1),mips),$(call get-libcompiler-rt-mips-source-files), $(if $(findstring $(1),x86),$(call get-libcompiler-rt-x86-source-files), $(if $(findstring $(1),x86_64),$(call get-libcompiler-rt-x86_64-source-files), $(if $(findstring $(1),x32),$(call get-libcompiler-rt-x86-source-files), $(if $(findstring $(1),arm64),$(call get-libcompiler-rt-arm64-source-files), $(if $(findstring $(1),mips64),$(call get-libcompiler-rt-mips64-source-files), $(error Unsupported ARCH $(1))))))))) endef # $(1): source list # $(2): arch # # If lib/builtins//X.[cS] is included in the source list, we should filter out lib/builtins/X.c # in the result source list (i.e., use the one optimized for the arch.) Otherwise # there'll be multiple definitions for one symbol. define filter-libcompiler-rt-common-source-files $(filter-out $(patsubst lib/builtins/$(strip $(2))/%.S,lib/builtins/%.c,\ $(filter lib/builtins/$(strip $(2))/%.S,$(1))) \ $(patsubst lib/builtins/$(strip $(2))/%.c,lib/builtins/%.c,\ $(filter lib/builtins/$(strip $(2))/%.c,$(1))),$(1)) endef define get-libcompiler-rt-arm-source-files $(call filter-libcompiler-rt-common-source-files, $(libcompiler_rt_common_SRC_FILES) \ $(libcompiler_rt_arm_SRC_FILES), arm) endef define get-libcompiler-rt-arm64-source-files $(call filter-libcompiler-rt-common-source-files, $(libcompiler_rt_common_SRC_FILES) \ $(libcompiler_rt_arm64_SRC_FILES),arm64) endef define get-libcompiler-rt-mips-source-files $(call filter-libcompiler-rt-common-source-files, $(libcompiler_rt_common_SRC_FILES) \ $(libcompiler_rt_mips_SRC_FILES),mips) endef define get-libcompiler-rt-mips64-source-files $(call filter-libcompiler-rt-common-source-files, $(libcompiler_rt_common_SRC_FILES) \ $(libcompiler_rt_mips64_SRC_FILES),mips64) endef define get-libcompiler-rt-x86-source-files $(call filter-libcompiler-rt-common-source-files, $(libcompiler_rt_common_SRC_FILES) \ $(libcompiler_rt_x86_SRC_FILES),i386) endef define get-libcompiler-rt-x86_64-source-files $(call filter-libcompiler-rt-common-source-files, $(libcompiler_rt_common_SRC_FILES) \ $(libcompiler_rt_x86_64_SRC_FILES),x86_64) endef libcompiler_rt_common_CFLAGS := \ -Wno-unused-parameter \ -Werror #===================================================================== # Device Static Library: libcompiler_rt-extras #===================================================================== include $(CLEAR_VARS) LOCAL_MODULE := libcompiler_rt-extras LOCAL_MODULE_TAGS := optional LOCAL_MODULE_CLASS := STATIC_LIBRARIES LOCAL_CFLAGS := $(libcompiler_rt_common_CFLAGS) LOCAL_CLANG := true LOCAL_SRC_FILES := $(libcompiler_rt_extras_SRC_FILES) LOCAL_SRC_FILES_mips += lib/builtins/clear_cache.c LOCAL_SRC_FILES_mips64 += lib/builtins/clear_cache.c LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk LOCAL_SANITIZE := never LOCAL_CXX_STL := none include $(BUILD_STATIC_LIBRARY) #===================================================================== # Host Static Library: libcompiler_rt-extras #===================================================================== include $(CLEAR_VARS) LOCAL_MODULE := libcompiler_rt-extras LOCAL_CFLAGS := $(libcompiler_rt_common_CFLAGS) LOCAL_CLANG := true LOCAL_SRC_FILES := $(libcompiler_rt_extras_SRC_FILES) LOCAL_SANITIZE := never LOCAL_MULTILIB := both LOCAL_CXX_STL := none LOCAL_MODULE_HOST_OS := darwin linux windows include $(BUILD_HOST_STATIC_LIBRARY) # Don't build compiler-rt without clang ifneq ($(WITHOUT_TARGET_CLANG), true) #===================================================================== # Device Static Library: libcompiler_rt #===================================================================== include $(CLEAR_VARS) LOCAL_MODULE := libcompiler_rt LOCAL_CFLAGS := $(libcompiler_rt_common_CFLAGS) LOCAL_CFLAGS_arm += -D__ARM_EABI__ LOCAL_CFLAGS_mips64 += -DCRT_HAS_128BIT LOCAL_ASFLAGS := -integrated-as LOCAL_CLANG := true LOCAL_SRC_FILES := lib/builtins/enable_execute_stack.c LOCAL_SRC_FILES_arm := $(call get-libcompiler-rt-source-files,arm) LOCAL_SRC_FILES_arm64 := $(call get-libcompiler-rt-source-files,arm64) LOCAL_SRC_FILES_mips := $(call get-libcompiler-rt-source-files,mips) LOCAL_SRC_FILES_mips64 := $(call get-libcompiler-rt-source-files,mips64) LOCAL_SRC_FILES_x86 := $(call get-libcompiler-rt-source-files,x86) LOCAL_SRC_FILES_x86_64 := $(call get-libcompiler-rt-source-files,x86_64) LOCAL_SRC_FILES_x86_64 += lib/builtins/ppc/floatditf.c LOCAL_MODULE_TARGET_ARCH := arm arm64 mips mips64 x86 x86_64 LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk LOCAL_SANITIZE := never LOCAL_CXX_STL := none # These don't actually link, but are required to get exported headers LOCAL_STATIC_LIBRARIES_arm64 := libunwindbacktrace LOCAL_STATIC_LIBRARIES_mips := libunwindbacktrace LOCAL_STATIC_LIBRARIES_mips64 := libunwindbacktrace LOCAL_STATIC_LIBRARIES_x86 := libunwindbacktrace LOCAL_STATIC_LIBRARIES_x86_64 := libunwindbacktrace include $(BUILD_STATIC_LIBRARY) #===================================================================== # Host Static Library: libcompiler_rt #===================================================================== include $(CLEAR_VARS) LOCAL_MODULE := libcompiler_rt LOCAL_CFLAGS := $(libcompiler_rt_common_CFLAGS) LOCAL_ASFLAGS := -integrated-as LOCAL_CLANG := true LOCAL_SRC_FILES := $(call get-libcompiler-rt-source-files,x86_64) # Only build enable_execute_stack.c on non-Windows hosts. LOCAL_SRC_FILES_darwin := lib/builtins/enable_execute_stack.c LOCAL_SRC_FILES_linux := lib/builtins/enable_execute_stack.c LOCAL_SANITIZE := never LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk LOCAL_MULTILIB := both LOCAL_CXX_STL := none # These don't actually link, but are required to get exported headers LOCAL_STATIC_LIBRARIES_linux := libunwindbacktrace LOCAL_STATIC_LIBRARIES_windows := libunwindbacktrace include $(BUILD_HOST_STATIC_LIBRARY) #===================================================================== # Device Shared Library: libcompiler_rt #===================================================================== include $(CLEAR_VARS) LOCAL_MODULE := libcompiler_rt LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk LOCAL_WHOLE_STATIC_LIBRARIES := libcompiler_rt LOCAL_SHARED_LIBRARIES := libdl liblog LOCAL_STATIC_LIBRARIES := liblzma LOCAL_STATIC_LIBRARIES_arm := libunwind_llvm LOCAL_STATIC_LIBRARIES_arm64 := libunwindbacktrace LOCAL_STATIC_LIBRARIES_mips := libunwindbacktrace LOCAL_STATIC_LIBRARIES_mips64 := libunwindbacktrace LOCAL_STATIC_LIBRARIES_x86 := libunwindbacktrace LOCAL_STATIC_LIBRARIES_x86_64 := libunwindbacktrace LOCAL_LDFLAGS_arm := -Wl,--exclude-libs,libunwind_llvm.a LOCAL_LDFLAGS_arm64 := -Wl,--exclude-libs,libunwindbacktrace.a LOCAL_LDFLAGS_mips := -Wl,--exclude-libs,libunwindbacktrace.a LOCAL_LDFLAGS_mips64 := -Wl,--exclude-libs,libunwindbacktrace.a LOCAL_LDFLAGS_x86 := -Wl,--exclude-libs,libunwindbacktrace.a LOCAL_LDFLAGS_x86_64 := -Wl,--exclude-libs,libunwindbacktrace.a LOCAL_MODULE_TARGET_ARCH := arm arm64 mips mips64 x86 x86_64 LOCAL_SANITIZE := never LOCAL_CXX_STL := none LOCAL_NO_LIBGCC := true include $(BUILD_SHARED_LIBRARY) #===================================================================== # Host Shared Library: libcompiler_rt #===================================================================== include $(CLEAR_VARS) LOCAL_MODULE := libcompiler_rt LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk LOCAL_WHOLE_STATIC_LIBRARIES := libcompiler_rt LOCAL_STATIC_LIBRARIES_linux := libunwindbacktrace LOCAL_STATIC_LIBRARIES_windows := libunwindbacktrace LOCAL_CPPFLAGS := -nostdinc++ LOCAL_LDFLAGS_darwin := -nodefaultlibs LOCAL_LDFLAGS_linux := -nodefaultlibs LOCAL_LDLIBS_darwin := -lpthread -lc -lm LOCAL_LDLIBS_linux := -lpthread -lc -lm LOCAL_MULTILIB := both LOCAL_SANITIZE := never LOCAL_CXX_STL := none LOCAL_NO_LIBGCC := true include $(BUILD_HOST_SHARED_LIBRARY) # Build asan, lsan, etc. include $(call all-makefiles-under,$(LOCAL_PATH)/lib) endif ================================================ FILE: atlas-aapt/external/compiler-rt/CMakeLists.txt ================================================ # CMake build for CompilerRT. # # This build assumes that CompilerRT is checked out into the # 'projects/compiler-rt' inside of an LLVM tree. # Standalone build system for CompilerRT is not yet ready. # # An important constraint of the build is that it only produces libraries # based on the ability of the host toolchain to target various platforms. # Check if compiler-rt is built as a standalone project. if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) project(CompilerRT C CXX ASM) set(COMPILER_RT_STANDALONE_BUILD TRUE) else() set(COMPILER_RT_STANDALONE_BUILD FALSE) endif() # The CompilerRT build system requires CMake version 2.8.8 or higher in order # to use its support for building convenience "libraries" as a collection of # .o files. This is particularly useful in producing larger, more complex # runtime libraries. if (NOT MSVC) cmake_minimum_required(VERSION 2.8.8) else() # Version 2.8.12.1 is required to build with Visual Studio 2013. cmake_minimum_required(VERSION 2.8.12.1) endif() # FIXME: It may be removed when we use 2.8.12. if(CMAKE_VERSION VERSION_LESS 2.8.12) # Invalidate a couple of keywords. set(cmake_2_8_12_INTERFACE) set(cmake_2_8_12_PRIVATE) else() # Use ${cmake_2_8_12_KEYWORD} intead of KEYWORD in target_link_libraries(). set(cmake_2_8_12_INTERFACE INTERFACE) set(cmake_2_8_12_PRIVATE PRIVATE) if(POLICY CMP0022) cmake_policy(SET CMP0022 NEW) # automatic when 2.8.12 is required endif() endif() # Top level target used to build all compiler-rt libraries. add_custom_target(compiler-rt ALL) option(COMPILER_RT_BUILD_BUILTINS "Build builtins" ON) mark_as_advanced(COMPILER_RT_BUILD_BUILTINS) option(COMPILER_RT_BUILD_SANITIZERS "Build sanitizers" ON) mark_as_advanced(COMPILER_RT_BUILD_SANITIZERS) if (NOT COMPILER_RT_STANDALONE_BUILD) # Compute the Clang version from the LLVM version. # FIXME: We should be able to reuse CLANG_VERSION variable calculated # in Clang cmake files, instead of copying the rules here. string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CLANG_VERSION ${PACKAGE_VERSION}) # Setup the paths where compiler-rt runtimes and headers should be stored. set(COMPILER_RT_OUTPUT_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION}) set(COMPILER_RT_EXEC_OUTPUT_DIR ${LLVM_RUNTIME_OUTPUT_INTDIR}) set(COMPILER_RT_INSTALL_PATH lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}) option(COMPILER_RT_INCLUDE_TESTS "Generate and build compiler-rt unit tests." ${LLVM_INCLUDE_TESTS}) option(COMPILER_RT_ENABLE_WERROR "Fail and stop if warning is triggered" ${LLVM_ENABLE_WERROR}) # Use just-built Clang to compile/link tests on all platforms, except for # Windows where we need to use clang-cl instead. if(NOT MSVC) set(COMPILER_RT_TEST_COMPILER ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang) else() set(COMPILER_RT_TEST_COMPILER ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang.exe) endif() else() # Take output dir and install path from the user. set(COMPILER_RT_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH "Path where built compiler-rt libraries should be stored.") set(COMPILER_RT_EXEC_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/bin CACHE PATH "Path where built compiler-rt executables should be stored.") set(COMPILER_RT_INSTALL_PATH ${CMAKE_INSTALL_PREFIX} CACHE PATH "Path where built compiler-rt libraries should be installed.") option(COMPILER_RT_INCLUDE_TESTS "Generate and build compiler-rt unit tests." OFF) option(COMPILER_RT_ENABLE_WERROR "Fail and stop if warning is triggered" OFF) # Use a host compiler to compile/link tests. set(COMPILER_RT_TEST_COMPILER ${CMAKE_C_COMPILER} CACHE PATH "Compiler to use for testing") if (NOT LLVM_CONFIG_PATH) find_program(LLVM_CONFIG_PATH "llvm-config" DOC "Path to llvm-config binary") if (NOT LLVM_CONFIG_PATH) message(FATAL_ERROR "llvm-config not found: specify LLVM_CONFIG_PATH") endif() endif() execute_process( COMMAND ${LLVM_CONFIG_PATH} "--obj-root" "--bindir" "--libdir" "--src-root" RESULT_VARIABLE HAD_ERROR OUTPUT_VARIABLE CONFIG_OUTPUT) if (HAD_ERROR) message(FATAL_ERROR "llvm-config failed with status ${HAD_ERROR}") endif() string(REGEX REPLACE "[ \t]*[\r\n]+[ \t]*" ";" CONFIG_OUTPUT ${CONFIG_OUTPUT}) list(GET CONFIG_OUTPUT 0 LLVM_BINARY_DIR) list(GET CONFIG_OUTPUT 1 LLVM_TOOLS_BINARY_DIR) list(GET CONFIG_OUTPUT 2 LLVM_LIBRARY_DIR) list(GET CONFIG_OUTPUT 3 LLVM_MAIN_SRC_DIR) # Make use of LLVM CMake modules. file(TO_CMAKE_PATH ${LLVM_BINARY_DIR} LLVM_BINARY_DIR_CMAKE_STYLE) set(LLVM_CMAKE_PATH "${LLVM_BINARY_DIR_CMAKE_STYLE}/share/llvm/cmake") list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}") # Get some LLVM variables from LLVMConfig. include("${LLVM_CMAKE_PATH}/LLVMConfig.cmake") set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX}) # Find Python interpreter. set(Python_ADDITIONAL_VERSIONS 2.7 2.6 2.5) include(FindPythonInterp) if(NOT PYTHONINTERP_FOUND) message(FATAL_ERROR " Unable to find Python interpreter required testing. Please install Python or specify the PYTHON_EXECUTABLE CMake variable.") endif() # Define default arguments to lit. set(LIT_ARGS_DEFAULT "-sv") if (MSVC OR XCODE) set(LIT_ARGS_DEFAULT "${LIT_ARGS_DEFAULT} --no-progress-bar") endif() set(LLVM_LIT_ARGS "${LIT_ARGS_DEFAULT}" CACHE STRING "Default options for lit") endif() if("${COMPILER_RT_TEST_COMPILER}" MATCHES "clang[+]*$") set(COMPILER_RT_TEST_COMPILER_ID Clang) elseif("${COMPILER_RT_TEST_COMPILER}" MATCHES "clang.*.exe$") set(COMPILER_RT_TEST_COMPILER_ID Clang) else() set(COMPILER_RT_TEST_COMPILER_ID GNU) endif() set(COMPILER_RT_DEFAULT_TARGET_TRIPLE ${TARGET_TRIPLE} CACHE STRING "Default triple for which compiler-rt runtimes will be built.") if(DEFINED COMPILER_RT_TEST_TARGET_TRIPLE) # Backwards compatibility: this variable used to be called # COMPILER_RT_TEST_TARGET_TRIPLE. set(COMPILER_RT_DEFAULT_TARGET_TRIPLE ${COMPILER_RT_TEST_TARGET_TRIPLE}) endif() string(REPLACE "-" ";" TARGET_TRIPLE_LIST ${COMPILER_RT_DEFAULT_TARGET_TRIPLE}) list(GET TARGET_TRIPLE_LIST 0 COMPILER_RT_DEFAULT_TARGET_ARCH) list(GET TARGET_TRIPLE_LIST 1 COMPILER_RT_DEFAULT_TARGET_OS) list(GET TARGET_TRIPLE_LIST 2 COMPILER_RT_DEFAULT_TARGET_ABI) # Determine if test target triple is specified explicitly, and doesn't match the # default. if(NOT COMPILER_RT_DEFAULT_TARGET_TRIPLE STREQUAL TARGET_TRIPLE) set(COMPILER_RT_HAS_EXPLICIT_DEFAULT_TARGET_TRIPLE TRUE) else() set(COMPILER_RT_HAS_EXPLICIT_DEFAULT_TARGET_TRIPLE FALSE) endif() if ("${COMPILER_RT_DEFAULT_TARGET_ABI}" STREQUAL "androideabi") set(ANDROID 1) endif() string(TOLOWER ${CMAKE_SYSTEM_NAME} COMPILER_RT_OS_DIR) set(COMPILER_RT_LIBRARY_OUTPUT_DIR ${COMPILER_RT_OUTPUT_DIR}/lib/${COMPILER_RT_OS_DIR}) set(COMPILER_RT_LIBRARY_INSTALL_DIR ${COMPILER_RT_INSTALL_PATH}/lib/${COMPILER_RT_OS_DIR}) # Add path for custom compiler-rt modules. set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules" ${CMAKE_MODULE_PATH} ) include(CompilerRTUtils) set(COMPILER_RT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) set(COMPILER_RT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) # We support running instrumented tests when we're not cross compiling # and target a UNIX-like system or Windows. # We can run tests on Android even when we are cross-compiling. if(("${CMAKE_HOST_SYSTEM}" STREQUAL "${CMAKE_SYSTEM}" AND (UNIX OR WIN32)) OR ANDROID OR COMPILER_RT_EMULATOR) option(COMPILER_RT_CAN_EXECUTE_TESTS "Can we execute instrumented tests" ON) else() option(COMPILER_RT_CAN_EXECUTE_TESTS "Can we execute instrumented tests" OFF) endif() option(COMPILER_RT_DEBUG "Build runtimes with full debug info" OFF) option(COMPILER_RT_EXTERNALIZE_DEBUGINFO "Generate dSYM files and strip executables and libraries (Darwin Only)" OFF) # COMPILER_RT_DEBUG_PYBOOL is used by lit.common.configured.in. pythonize_bool(COMPILER_RT_DEBUG) #================================ # Setup Compiler Flags #================================ include(CheckIncludeFile) check_include_file(unwind.h HAVE_UNWIND_H) include(config-ix) if(MSVC) append_string_if(COMPILER_RT_HAS_W3_FLAG /W3 CMAKE_C_FLAGS CMAKE_CXX_FLAGS) else() append_string_if(COMPILER_RT_HAS_WALL_FLAG -Wall CMAKE_C_FLAGS CMAKE_CXX_FLAGS) endif() if(COMPILER_RT_ENABLE_WERROR) append_string_if(COMPILER_RT_HAS_WERROR_FLAG -Werror CMAKE_C_FLAGS CMAKE_CXX_FLAGS) append_string_if(COMPILER_RT_HAS_WX_FLAG /WX CMAKE_C_FLAGS CMAKE_CXX_FLAGS) endif() append_string_if(COMPILER_RT_HAS_STD_CXX11_FLAG -std=c++11 CMAKE_CXX_FLAGS) # Emulate C99 and C++11's __func__ for MSVC prior to 2013 CTP. if(NOT COMPILER_RT_HAS_FUNC_SYMBOL) add_definitions(-D__func__=__FUNCTION__) endif() # Provide some common commmandline flags for Sanitizer runtimes. append_list_if(COMPILER_RT_HAS_FPIC_FLAG -fPIC SANITIZER_COMMON_CFLAGS) append_list_if(COMPILER_RT_HAS_FNO_BUILTIN_FLAG -fno-builtin SANITIZER_COMMON_CFLAGS) append_list_if(COMPILER_RT_HAS_FNO_EXCEPTIONS_FLAG -fno-exceptions SANITIZER_COMMON_CFLAGS) append_list_if(COMPILER_RT_HAS_FOMIT_FRAME_POINTER_FLAG -fomit-frame-pointer SANITIZER_COMMON_CFLAGS) append_list_if(COMPILER_RT_HAS_FUNWIND_TABLES_FLAG -funwind-tables SANITIZER_COMMON_CFLAGS) append_list_if(COMPILER_RT_HAS_FNO_STACK_PROTECTOR_FLAG -fno-stack-protector SANITIZER_COMMON_CFLAGS) append_list_if(COMPILER_RT_HAS_FNO_SANITIZE_SAFE_STACK_FLAG -fno-sanitize=safe-stack SANITIZER_COMMON_CFLAGS) append_list_if(COMPILER_RT_HAS_FVISIBILITY_HIDDEN_FLAG -fvisibility=hidden SANITIZER_COMMON_CFLAGS) append_list_if(COMPILER_RT_HAS_FVISIBILITY_INLINES_HIDDEN_FLAG -fvisibility-inlines-hidden SANITIZER_COMMON_CFLAGS) append_list_if(COMPILER_RT_HAS_FNO_FUNCTION_SECTIONS_FLAG -fno-function-sections SANITIZER_COMMON_CFLAGS) append_list_if(COMPILER_RT_HAS_FNO_LTO_FLAG -fno-lto SANITIZER_COMMON_CFLAGS) if(MSVC) # Replace the /M[DT][d] flags with /MT, and strip any definitions of _DEBUG, # which cause definition mismatches at link time. # FIXME: In fact, sanitizers should support both /MT and /MD, see PR20214. if(COMPILER_RT_HAS_MT_FLAG) foreach(flag_var CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO) string(REGEX REPLACE "/M[DT]d" "/MT" ${flag_var} "${${flag_var}}") string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") string(REGEX REPLACE "/D_DEBUG" "" ${flag_var} "${${flag_var}}") endforeach() endif() append_list_if(COMPILER_RT_HAS_Oy_FLAG /Oy- SANITIZER_COMMON_CFLAGS) append_list_if(COMPILER_RT_HAS_GS_FLAG /GS- SANITIZER_COMMON_CFLAGS) endif() append_list_if(COMPILER_RT_DEBUG -DSANITIZER_DEBUG=1 SANITIZER_COMMON_CFLAGS) # Build with optimization, unless we're in debug mode. If we're using MSVC, # always respect the optimization flags set by CMAKE_BUILD_TYPE instead. if(NOT COMPILER_RT_DEBUG AND NOT MSVC) list(APPEND SANITIZER_COMMON_CFLAGS -O3) endif() # Determine if we should restrict stack frame sizes. # Stack frames on PowerPC and Mips and in debug biuld can be much larger than # anticipated. # FIXME: Fix all sanitizers and add -Wframe-larger-than to # SANITIZER_COMMON_FLAGS if(COMPILER_RT_HAS_WFRAME_LARGER_THAN_FLAG AND NOT COMPILER_RT_DEBUG AND NOT ${COMPILER_RT_DEFAULT_TARGET_ARCH} MATCHES "powerpc|mips") set(SANITIZER_LIMIT_FRAME_SIZE TRUE) else() set(SANITIZER_LIMIT_FRAME_SIZE FALSE) endif() # Build sanitizer runtimes with debug info. if(COMPILER_RT_HAS_GLINE_TABLES_ONLY_FLAG AND NOT COMPILER_RT_DEBUG) list(APPEND SANITIZER_COMMON_CFLAGS -gline-tables-only) elseif(COMPILER_RT_HAS_G_FLAG) list(APPEND SANITIZER_COMMON_CFLAGS -g) elseif(COMPILER_RT_HAS_Zi_FLAG) list(APPEND SANITIZER_COMMON_CFLAGS /Zi) endif() # Turn off several warnings. append_list_if(COMPILER_RT_HAS_WGNU_FLAG -Wno-gnu SANITIZER_COMMON_CFLAGS) append_list_if(COMPILER_RT_HAS_WVARIADIC_MACROS_FLAG -Wno-variadic-macros SANITIZER_COMMON_CFLAGS) append_list_if(COMPILER_RT_HAS_WC99_EXTENSIONS_FLAG -Wno-c99-extensions SANITIZER_COMMON_CFLAGS) append_list_if(COMPILER_RT_HAS_WNON_VIRTUAL_DTOR_FLAG -Wno-non-virtual-dtor SANITIZER_COMMON_CFLAGS) append_list_if(COMPILER_RT_HAS_WD4146_FLAG /wd4146 SANITIZER_COMMON_CFLAGS) append_list_if(COMPILER_RT_HAS_WD4291_FLAG /wd4291 SANITIZER_COMMON_CFLAGS) append_list_if(COMPILER_RT_HAS_WD4391_FLAG /wd4391 SANITIZER_COMMON_CFLAGS) append_list_if(COMPILER_RT_HAS_WD4722_FLAG /wd4722 SANITIZER_COMMON_CFLAGS) append_list_if(COMPILER_RT_HAS_WD4800_FLAG /wd4800 SANITIZER_COMMON_CFLAGS) if(APPLE AND SANITIZER_MIN_OSX_VERSION VERSION_LESS "10.9") # Mac OS X prior to 10.9 had problems with exporting symbols from # libc++/libc++abi. set(SANITIZER_CAN_USE_CXXABI FALSE) else() set(SANITIZER_CAN_USE_CXXABI TRUE) endif() pythonize_bool(SANITIZER_CAN_USE_CXXABI) add_subdirectory(include) set(COMPILER_RT_LIBCXX_PATH ${LLVM_MAIN_SRC_DIR}/projects/libcxx) if(EXISTS ${COMPILER_RT_LIBCXX_PATH}/) set(COMPILER_RT_HAS_LIBCXX_SOURCES TRUE) else() set(COMPILER_RT_HAS_LIBCXX_SOURCES FALSE) endif() set(COMPILER_RT_LLD_PATH ${LLVM_MAIN_SRC_DIR}/tools/lld) if(EXISTS ${COMPILER_RT_LLD_PATH}/) set(COMPILER_RT_HAS_LLD_SOURCES TRUE) else() set(COMPILER_RT_HAS_LLD_SOURCES FALSE) endif() pythonize_bool(COMPILER_RT_HAS_LLD_SOURCES) add_subdirectory(lib) if(COMPILER_RT_INCLUDE_TESTS) add_subdirectory(unittests) add_subdirectory(test) endif() ================================================ FILE: atlas-aapt/external/compiler-rt/CODE_OWNERS.TXT ================================================ This file is a list of the people responsible for ensuring that patches for a particular part of compiler-rt are reviewed, either by themself or by someone else. They are also the gatekeepers for their part of compiler-rt, with the final word on what goes in or not. The list is sorted by surname and formatted to allow easy grepping and beautification by scripts. The fields are: name (N), email (E), web-address (W), PGP key ID and fingerprint (P), description (D), and snail-mail address (S). N: Peter Collingbourne E: peter@pcc.me.uk D: DataFlowSanitizer N: Daniel Dunbar E: daniel@zuster.org D: Makefile build N: Timur Iskhodzhanov E: timurrrr@google.com D: AddressSanitizer for Windows N: Howard Hinnant E: howard.hinnant@gmail.com D: builtins library N: Sergey Matveev E: earthdok@google.com D: LeakSanitizer N: Alexander Potapenko E: glider@google.com D: MacOS/iOS port of sanitizers N: Alexey Samsonov E: samsonov@google.com D: CMake build, test suite N: Kostya Serebryany E: kcc@google.com D: AddressSanitizer, sanitizer_common, porting sanitizers to another platforms N: Richard Smith E: richard-llvm@metafoo.co.uk D: UndefinedBehaviorSanitizer N: Evgeniy Stepanov E: eugenis@google.com D: MemorySanitizer, Android port of sanitizers N: Dmitry Vyukov E: dvyukov@google.com D: ThreadSanitizer N: Bill Wendling E: isanbard@gmail.com D: Profile runtime library ================================================ FILE: atlas-aapt/external/compiler-rt/CREDITS.TXT ================================================ This file is a partial list of people who have contributed to the LLVM/CompilerRT project. If you have contributed a patch or made some other contribution to LLVM/CompilerRT, please submit a patch to this file to add yourself, and it will be done! The list is sorted by surname and formatted to allow easy grepping and beautification by scripts. The fields are: name (N), email (E), web-address (W), PGP key ID and fingerprint (P), description (D), and snail-mail address (S). N: Craig van Vliet E: cvanvliet@auroraux.org W: http://www.auroraux.org D: Code style and Readability fixes. N: Edward O'Callaghan E: eocallaghan@auroraux.org W: http://www.auroraux.org D: CMake'ify Compiler-RT build system D: Maintain Solaris & AuroraUX ports of Compiler-RT N: Howard Hinnant E: hhinnant@apple.com D: Architect and primary author of compiler-rt N: Guan-Hong Liu E: koviankevin@hotmail.com D: IEEE Quad-precision functions N: Joerg Sonnenberger E: joerg@NetBSD.org D: Maintains NetBSD port. N: Matt Thomas E: matt@NetBSD.org D: ARM improvements. ================================================ FILE: atlas-aapt/external/compiler-rt/LICENSE.TXT ================================================ ============================================================================== compiler_rt License ============================================================================== The compiler_rt library is dual licensed under both the University of Illinois "BSD-Like" license and the MIT license. As a user of this code you may choose to use it under either license. As a contributor, you agree to allow your code to be used under both. Full text of the relevant licenses is included below. ============================================================================== University of Illinois/NCSA Open Source License Copyright (c) 2009-2015 by the contributors listed in CREDITS.TXT All rights reserved. Developed by: LLVM Team University of Illinois at Urbana-Champaign http://llvm.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal with the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimers. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimers in the documentation and/or other materials provided with the distribution. * Neither the names of the LLVM Team, University of Illinois at Urbana-Champaign, nor the names of its contributors may be used to endorse or promote products derived from this Software without specific prior written permission. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. ============================================================================== Copyright (c) 2009-2015 by the contributors listed in CREDITS.TXT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ============================================================================== Copyrights and Licenses for Third Party Software Distributed with LLVM: ============================================================================== The LLVM software contains code written by third parties. Such software will have its own individual LICENSE.TXT file in the directory in which it appears. This file will describe the copyrights, license, and restrictions which apply to that code. The disclaimer of warranty in the University of Illinois Open Source License applies to all code in the LLVM Distribution, and nothing in any of the other licenses gives permission to use the names of the LLVM Team or the University of Illinois to endorse or promote products derived from this Software. ================================================ FILE: atlas-aapt/external/compiler-rt/MODULE_LICENSE_MIT ================================================ ================================================ FILE: atlas-aapt/external/compiler-rt/Makefile ================================================ SubDirs := lib # Set default rule before anything else. all: help include make/config.mk include make/util.mk # If SRCROOT is defined, assume we are doing an Apple style build. We should be # able to use RC_XBS for this but that is unused during "make installsrc". ifdef SRCROOT include make/AppleBI.mk endif # Make sure we don't build with a missing ProjObjRoot. ifeq ($(ProjObjRoot),) $(error Refusing to build with empty ProjObjRoot variable) endif ############## ### # Rules ### # Top level targets # FIXME: Document the available subtargets. help: @echo "usage: make [{VARIABLE=VALUE}*] target" @echo @echo "User variables:" @echo " VERBOSE=1: Use to show all commands [default=0]" @echo @echo "Available targets:" @echo " : build the libraries for 'platform'" @echo " clean: clean all configurations" @echo " test: run unit tests" @echo @echo " info-platforms: list available platforms" @echo " help-devel: print additional help for developers" @echo help-devel: help @echo "Development targets:" @echo " -:" @echo " build the libraries for a single platform config" @echo " --:" @echo " build the libraries for a single config and arch" @echo " info-functions: list available compiler-rt functions" @echo " help-hidden: print help for Makefile debugging" @echo help-hidden: help-devel @echo "Debugging variables:" @echo " DEBUGMAKE=1: enable some Makefile logging [default=]" @echo " =2: enable more Makefile logging" @echo @echo "Debugging targets:" @echo " make-print-FOO: print information on the variable 'FOO'" @echo info-functions: @echo "compiler-rt Available Functions" @echo @echo "All Functions: $(AvailableFunctions)" @$(foreach fn,$(AvailableFunctions),\ printf " %-20s - available in (%s)\n" $(fn)\ "$(foreach key,$(AvailableIn.$(fn)),$($(key).Dir))";) info-platforms: @echo "compiler-rt Available Platforms" @echo @echo "Platforms:" @$(foreach key,$(PlatformKeys),\ printf " %s - from '%s'\n" $($(key).Name) $($(key).Path);\ printf " %s\n" "$($(key).Description)";\ printf " Configurations: %s\n\n" "$($(key).Configs)";) # Provide default clean target which is extended by other templates. .PHONY: clean clean:: # Test .PHONY: test test: cd test/Unit && ./test ### # Directory handling magic. # Create directories as needed, and timestamp their creation. %/.dir: $(Summary) " MKDIR: $*" $(Verb) $(MKDIR) $* > /dev/null $(Verb) echo 'Created.' > $@ # Remove directories %/.remove: $(Verb) $(RM) -r $* ### # Include child makefile fragments Dir := . include make/subdir.mk include make/lib_info.mk include make/lib_util.mk include make/lib_platforms.mk ### # Define Platform Rules define PerPlatform_template $(call Set,Tmp.Key,$(1)) $(call Set,Tmp.Name,$($(Tmp.Key).Name)) $(call Set,Tmp.Configs,$($(Tmp.Key).Configs)) $(call Set,Tmp.ObjPath,$(ProjObjRoot)/$(Tmp.Name)) # Top-Level Platform Target $(Tmp.Name):: $(Tmp.Configs:%=$(Tmp.Name)-%) .PHONY: $(Tmp.Name) clean:: $(Verb) rm -rf $(Tmp.ObjPath) # Per-Config Libraries $(foreach config,$(Tmp.Configs),\ $(call PerPlatformConfig_template,$(config))) endef define PerPlatformConfig_template $(call Set,Tmp.Config,$(1)) $(call Set,Tmp.ObjPath,$(ProjObjRoot)/$(Tmp.Name)/$(Tmp.Config)) $(call Set,Tmp.SHARED_LIBRARY,$(strip \ $(call GetCNAVar,SHARED_LIBRARY,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) $(call Set,Tmp.SHARED_LIBRARY_SUFFIX,$(strip \ $(call GetCNAVar,SHARED_LIBRARY_SUFFIX,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) # Compute the library suffix. $(if $(call streq,1,$(Tmp.SHARED_LIBRARY)), $(call Set,Tmp.LibrarySuffix,$(Tmp.SHARED_LIBRARY_SUFFIX)), $(call Set,Tmp.LibrarySuffix,a)) # Compute the archs to build, depending on whether this is a universal build or # not. $(call Set,Tmp.ArchsToBuild,\ $(if $(call IsDefined,$(Tmp.Key).UniversalArchs),\ $(strip \ $(or $($(Tmp.Key).UniversalArchs.$(Tmp.Config)),\ $($(Tmp.Key).UniversalArchs))),\ $(call VarOrDefault,$(Tmp.Key).Arch.$(Tmp.Config),$($(Tmp.Key).Arch)))) # Copy or lipo to create the per-config library. $(call Set,Tmp.Inputs,$(Tmp.ArchsToBuild:%=$(Tmp.ObjPath)/%/libcompiler_rt.$(Tmp.LibrarySuffix))) $(Tmp.ObjPath)/libcompiler_rt.$(Tmp.LibrarySuffix): $(Tmp.Inputs) $(Tmp.ObjPath)/.dir $(Summary) " FINAL-ARCHIVE: $(Tmp.Name)/$(Tmp.Config): $$@" -$(Verb) $(RM) $$@ $(if $(call streq,1,$(words $(Tmp.ArchsToBuild))), \ $(Verb) $(CP) $(Tmp.Inputs) $$@, \ $(Verb) $(LIPO) -create -output $$@ $(Tmp.Inputs)) .PRECIOUS: $(Tmp.ObjPath)/.dir # Per-Config Targets $(Tmp.Name)-$(Tmp.Config):: $(Tmp.ObjPath)/libcompiler_rt.$(Tmp.LibrarySuffix) .PHONY: $(Tmp.Name)-$(Tmp.Config) # Per-Config-Arch Libraries $(foreach arch,$(Tmp.ArchsToBuild),\ $(call PerPlatformConfigArch_template,$(arch))) endef define PerPlatformConfigArch_template $(call Set,Tmp.Arch,$(1)) $(call Set,Tmp.ObjPath,$(ProjObjRoot)/$(Tmp.Name)/$(Tmp.Config)/$(Tmp.Arch)) $(call Set,Tmp.Functions,$(strip \ $(AlwaysRequiredModules) \ $(call GetCNAVar,FUNCTIONS,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) $(call Set,Tmp.Optimized,$(strip \ $(call GetCNAVar,OPTIMIZED,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) $(call Set,Tmp.AR,$(strip \ $(call GetCNAVar,AR,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) $(call Set,Tmp.ARFLAGS,$(strip \ $(call GetCNAVar,ARFLAGS,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) $(call Set,Tmp.CC,$(strip \ $(call GetCNAVar,CC,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) $(call Set,Tmp.LDFLAGS,$(strip \ $(call GetCNAVar,LDFLAGS,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) $(call Set,Tmp.RANLIB,$(strip \ $(call GetCNAVar,RANLIB,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) $(call Set,Tmp.RANLIBFLAGS,$(strip \ $(call GetCNAVar,RANLIBFLAGS,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) $(call Set,Tmp.SHARED_LIBRARY,$(strip \ $(call GetCNAVar,SHARED_LIBRARY,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) # Compute the library suffix. $(if $(call streq,1,$(Tmp.SHARED_LIBRARY)), $(call Set,Tmp.LibrarySuffix,$(Tmp.SHARED_LIBRARY_SUFFIX)), $(call Set,Tmp.LibrarySuffix,a)) # Compute the object inputs for this library. $(call Set,Tmp.Inputs,\ $(foreach fn,$(sort $(Tmp.Functions)),\ $(call Set,Tmp.FnDir,\ $(call SelectFunctionDir,$(Tmp.Config),$(Tmp.Arch),$(fn),$(Tmp.Optimized)))\ $(Tmp.ObjPath)/$(Tmp.FnDir)/$(fn).o)) $(Tmp.ObjPath)/libcompiler_rt.a: $(Tmp.Inputs) $(Tmp.ObjPath)/.dir $(Summary) " ARCHIVE: $(Tmp.Name)/$(Tmp.Config)/$(Tmp.Arch): $$@" -$(Verb) $(RM) $$@ $(Verb) $(Tmp.AR) $(Tmp.ARFLAGS) $$@ $(Tmp.Inputs) $(Verb) $(Tmp.RANLIB) $(Tmp.RANLIBFLAGS) $$@ $(Tmp.ObjPath)/libcompiler_rt.dylib: $(Tmp.Inputs) $(Tmp.ObjPath)/.dir $(Summary) " DYLIB: $(Tmp.Name)/$(Tmp.Config)/$(Tmp.Arch): $$@" $(Verb) $(Tmp.CC) -arch $(Tmp.Arch) -dynamiclib -o $$@ \ $(Tmp.Inputs) $(Tmp.LDFLAGS) $(Tmp.ObjPath)/libcompiler_rt.so: $(Tmp.Inputs) $(Tmp.ObjPath)/.dir $(Summary) " SO: $(Tmp.Name)/$(Tmp.Config)/$(Tmp.Arch): $$@" $(Verb) $(Tmp.CC) -shared -o $$@ \ $(Tmp.Inputs) $(Tmp.LDFLAGS) .PRECIOUS: $(Tmp.ObjPath)/.dir # Per-Config-Arch Targets $(Tmp.Name)-$(Tmp.Config)-$(Tmp.Arch):: $(Tmp.ObjPath)/libcompiler_rt.$(Tmp.LibrarySuffix) .PHONY: $(Tmp.Name)-$(Tmp.Config)-$(Tmp.Arch) # Per-Config-Arch-SubDir Objects $(foreach key,$(SubDirKeys),\ $(call PerPlatformConfigArchSubDir_template,$(key))) endef define PerPlatformConfigArchSubDir_template $(call Set,Tmp.SubDirKey,$(1)) $(call Set,Tmp.SubDir,$($(Tmp.SubDirKey).Dir)) $(call Set,Tmp.SrcPath,$(ProjSrcRoot)/$(Tmp.SubDir)) $(call Set,Tmp.ObjPath,$(ProjObjRoot)/$(Tmp.Name)/$(Tmp.Config)/$(Tmp.Arch)/$(Tmp.SubDirKey)) $(call Set,Tmp.Dependencies,$($(Tmp.SubDirKey).Dependencies)) $(call Set,Tmp.CC,$(strip \ $(call GetCNAVar,CC,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) $(call Set,Tmp.KERNEL_USE,$(strip \ $(call GetCNAVar,KERNEL_USE,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) $(call Set,Tmp.VISIBILITY_HIDDEN,$(strip \ $(call GetCNAVar,VISIBILITY_HIDDEN,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) $(call Set,Tmp.CFLAGS,$(strip \ $(if $(call IsDefined,$(Tmp.Key).UniversalArchs),-arch $(Tmp.Arch),)\ $(if $(call streq,$(Tmp.VISIBILITY_HIDDEN),1),\ -fvisibility=hidden -DVISIBILITY_HIDDEN,)\ $(if $(call streq,$(Tmp.KERNEL_USE),1),\ -mkernel -DKERNEL_USE,)\ $(call GetCNAVar,CFLAGS,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) $(Tmp.ObjPath)/%.o: $(Tmp.SrcPath)/%.s $(Tmp.Dependencies) $(Tmp.ObjPath)/.dir $(Summary) " ASSEMBLE: $(Tmp.Name)/$(Tmp.Config)/$(Tmp.Arch): $$<" $(Verb) $(Tmp.CC) $(COMMON_ASMFLAGS) $(Tmp.CFLAGS) -c -o $$@ $$< $(Tmp.ObjPath)/%.o: $(Tmp.SrcPath)/%.S $(Tmp.Dependencies) $(Tmp.ObjPath)/.dir $(Summary) " ASSEMBLE: $(Tmp.Name)/$(Tmp.Config)/$(Tmp.Arch): $$<" $(Verb) $(Tmp.CC) $(COMMON_ASMFLAGS) $(Tmp.CFLAGS) -c -o $$@ $$< $(Tmp.ObjPath)/%.o: $(Tmp.SrcPath)/%.c $(Tmp.Dependencies) $(Tmp.ObjPath)/.dir $(Summary) " COMPILE: $(Tmp.Name)/$(Tmp.Config)/$(Tmp.Arch): $$<" $(Verb) $(Tmp.CC) $(COMMON_CFLAGS) $(Tmp.CFLAGS) -c -o $$@ $$< $(Tmp.ObjPath)/%.o: $(Tmp.SrcPath)/%.cc $(Tmp.Dependencies) $(Tmp.ObjPath)/.dir $(Summary) " COMPILE: $(Tmp.Name)/$(Tmp.Config)/$(Tmp.Arch): $$<" $(Verb) $(Tmp.CC) $(COMMON_CXXFLAGS) $(Tmp.CFLAGS) -c -o $$@ $$< .PRECIOUS: $(Tmp.ObjPath)/.dir endef # Run templates. $(foreach key,$(PlatformKeys),\ $(eval $(call PerPlatform_template,$(key)))) ### ifneq ($(DEBUGMAKE),) $(info MAKE: Done processing Makefile) $(info ) endif ================================================ FILE: atlas-aapt/external/compiler-rt/NOTICE ================================================ ============================================================================== compiler_rt License ============================================================================== The compiler_rt library is dual licensed under both the University of Illinois "BSD-Like" license and the MIT license. As a user of this code you may choose to use it under either license. As a contributor, you agree to allow your code to be used under both. Full text of the relevant licenses is included below. ============================================================================== University of Illinois/NCSA Open Source License Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT All rights reserved. Developed by: LLVM Team University of Illinois at Urbana-Champaign http://llvm.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal with the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimers. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimers in the documentation and/or other materials provided with the distribution. * Neither the names of the LLVM Team, University of Illinois at Urbana-Champaign, nor the names of its contributors may be used to endorse or promote products derived from this Software without specific prior written permission. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. ============================================================================== Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ============================================================================== Copyrights and Licenses for Third Party Software Distributed with LLVM: ============================================================================== The LLVM software contains code written by third parties. Such software will have its own individual LICENSE.TXT file in the directory in which it appears. This file will describe the copyrights, license, and restrictions which apply to that code. The disclaimer of warranty in the University of Illinois Open Source License applies to all code in the LLVM Distribution, and nothing in any of the other licenses gives permission to use the names of the LLVM Team or the University of Illinois to endorse or promote products derived from this Software. ================================================ FILE: atlas-aapt/external/compiler-rt/README.android ================================================ /* * README.android describes in high-level the compiler-rt changes that we * cannot push upstream to the llvm.org repository: * - Changes due to Android's build system. * - Changes due to Android's toolchain. * - Changes due to the limitations in Android-based consumer electronics. * * Some of them are to-dos. If and when they are done, there will no longer be * merge conflicts with upstream on those parts. * * The file contains useful hints when we try to resolve future 3-way merge * conflicts. */ * For JellyBean: Synced to upstream r155350 * For JellyBean MR1: Synced to upstream r162279 * For Jellybean MR2: Synced to upstream r177337 * For Key Lime Pie: Synced to upstream r187889 * For FUTURE: Synced to LLVM 3.4 r197381 * Cherry-pick on 2014/2/11: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201068 and https://llvm.org/svn/llvm-project/compiler-rt/trunk@201070 * Recent downstreaming on 2013/2/11: Synced to r197381 (Contact srhines for merge questions.) * Recent downstreaming on 2013/8/8: Synced to r187889 (Contact srhines for merge questions.) * Recent downstreaming on 2013/6/13: Synced to r183849 (Contact srhines for merge questions.) * Recent downstreaming on 2013/5/3: Synced to r180792 (Contact srhines for merge questions.) * Recent downstreaming on 2013/3/18: Synced to r177337 (Contact srhines for merge questions.) * Recent downstreaming on 2013/3/5: Synced to r176091 (Contact srhines for merge questions.) * Recent downstreaming on 2013/1/8: Synced to r171802 (Contact srhines for merge questions.) * Recent downstreaming on 2012/08/23: Synced to r162279 (Contact srhines for merge questions.) * Recent downstreaming on 2012/08/15: Synced to r159129 (Contact sliao for merge questions.) * Cherry-pick on 2012/07/27: https://llvm.org/svn/llvm-project/compiler-rt/trunk@160853 for ASan (Contact srhines for merge questions.) * Cherry-pick on 2012/05/23: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157318 for ASan (Contact srhines for merge questions.) * Recent downstreaming on 2012/04/25: Synced to r155350 (Contact sliao for merge questions.) * Recent downstreaming on 2012/03/08: Synced to r152058 (Contact srhines for merge questions.) TODO: This is still not building by default (no Android.mk files are present yet). Look at frameworks/compile/libbcc/runtime for potential starting points. TODO: Switch libbcc to use this version of compiler-rt instead of its own tweaked version. ================================================ FILE: atlas-aapt/external/compiler-rt/README.txt ================================================ Compiler-RT ================================ This directory and its subdirectories contain source code for the compiler support routines. Compiler-RT is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt. ================================ ================================================ FILE: atlas-aapt/external/compiler-rt/cmake/Modules/AddCompilerRT.cmake ================================================ include(AddLLVM) include(ExternalProject) include(CompilerRTUtils) # Tries to add an "object library" target for a given list of OSs and/or # architectures with name "." for non-Darwin platforms if # architecture can be targeted, and "." for Darwin platforms. # add_compiler_rt_object_libraries( # OS # ARCHS # SOURCES # CFLAGS # DEFS ) function(add_compiler_rt_object_libraries name) cmake_parse_arguments(LIB "" "" "OS;ARCHS;SOURCES;CFLAGS;DEFS" ${ARGN}) set(libnames) if(APPLE) foreach(os ${LIB_OS}) set(libname "${name}.${os}") set(libnames ${libnames} ${libname}) set(extra_cflags_${libname} ${DARWIN_${os}_CFLAGS}) list_union(LIB_ARCHS_${libname} DARWIN_${os}_ARCHS LIB_ARCHS) endforeach() else() foreach(arch ${LIB_ARCHS}) set(libname "${name}.${arch}") set(libnames ${libnames} ${libname}) set(extra_cflags_${libname} ${TARGET_${arch}_CFLAGS}) if(NOT CAN_TARGET_${arch}) message(FATAL_ERROR "Architecture ${arch} can't be targeted") return() endif() endforeach() endif() foreach(libname ${libnames}) add_library(${libname} OBJECT ${LIB_SOURCES}) set_target_compile_flags(${libname} ${CMAKE_CXX_FLAGS} ${extra_cflags_${libname}} ${LIB_CFLAGS}) set_property(TARGET ${libname} APPEND PROPERTY COMPILE_DEFINITIONS ${LIB_DEFS}) if(APPLE) set_target_properties(${libname} PROPERTIES OSX_ARCHITECTURES "${LIB_ARCHS_${libname}}") endif() endforeach() endfunction() # Takes a list of object library targets, and a suffix and appends the proper # TARGET_OBJECTS string to the output variable. # format_object_libs( ...) macro(format_object_libs output suffix) foreach(lib ${ARGN}) list(APPEND ${output} $) endforeach() endmacro() # Adds static or shared runtime for a list of architectures and operating # systems and puts it in the proper directory in the build and install trees. # add_compiler_rt_runtime( # {STATIC|SHARED} # ARCHS # OS # SOURCES # CFLAGS # LINKFLAGS # DEFS # LINK_LIBS (only for shared library) # OBJECT_LIBS # PARENT_TARGET ) function(add_compiler_rt_runtime name type) if(NOT type MATCHES "^(STATIC|SHARED)$") message(FATAL_ERROR "type argument must be STATIC or SHARED") return() endif() cmake_parse_arguments(LIB "" "PARENT_TARGET" "OS;ARCHS;SOURCES;CFLAGS;LINKFLAGS;DEFS;LINK_LIBS;OBJECT_LIBS" ${ARGN}) set(libnames) if(APPLE) foreach(os ${LIB_OS}) if(type STREQUAL "STATIC") set(libname "${name}_${os}") else() set(libname "${name}_${os}_dynamic") set(extra_linkflags_${libname} ${DARWIN_${os}_LINKFLAGS} ${LIB_LINKFLAGS}) endif() list_union(LIB_ARCHS_${libname} DARWIN_${os}_ARCHS LIB_ARCHS) if(LIB_ARCHS_${libname}) list(APPEND libnames ${libname}) set(extra_cflags_${libname} ${DARWIN_${os}_CFLAGS} ${LIB_CFLAGS}) set(output_name_${libname} ${libname}${COMPILER_RT_OS_SUFFIX}) set(sources_${libname} ${LIB_SOURCES}) format_object_libs(sources_${libname} ${os} ${LIB_OBJECT_LIBS}) endif() endforeach() else() foreach(arch ${LIB_ARCHS}) if(NOT CAN_TARGET_${arch}) message(FATAL_ERROR "Architecture ${arch} can't be targeted") return() endif() if(type STREQUAL "STATIC") set(libname "${name}-${arch}") set(output_name_${libname} ${libname}${COMPILER_RT_OS_SUFFIX}) else() set(libname "${name}-dynamic-${arch}") set(extra_linkflags_${libname} ${TARGET_${arch}_CFLAGS} ${LIB_CFLAGS} ${LIB_LINKFLAGS}) if(WIN32) set(output_name_${libname} ${name}_dynamic-${arch}${COMPILER_RT_OS_SUFFIX}) else() set(output_name_${libname} ${name}-${arch}${COMPILER_RT_OS_SUFFIX}) endif() endif() set(sources_${libname} ${LIB_SOURCES}) format_object_libs(sources_${libname} ${arch} ${LIB_OBJECT_LIBS}) set(libnames ${libnames} ${libname}) set(extra_cflags_${libname} ${TARGET_${arch}_CFLAGS} ${LIB_CFLAGS}) endforeach() endif() if(NOT libnames) return() endif() if(LIB_PARENT_TARGET) set(COMPONENT_OPTION COMPONENT ${LIB_PARENT_TARGET}) endif() foreach(libname ${libnames}) add_library(${libname} ${type} ${sources_${libname}}) set_target_compile_flags(${libname} ${extra_cflags_${libname}}) set_target_link_flags(${libname} ${extra_linkflags_${libname}}) set_property(TARGET ${libname} APPEND PROPERTY COMPILE_DEFINITIONS ${LIB_DEFS}) set_target_properties(${libname} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${COMPILER_RT_LIBRARY_OUTPUT_DIR} LIBRARY_OUTPUT_DIRECTORY ${COMPILER_RT_LIBRARY_OUTPUT_DIR} RUNTIME_OUTPUT_DIRECTORY ${COMPILER_RT_LIBRARY_OUTPUT_DIR}) set_target_properties(${libname} PROPERTIES OUTPUT_NAME ${output_name_${libname}}) if(LIB_LINK_LIBS AND ${type} STREQUAL "SHARED") target_link_libraries(${libname} ${LIB_LINK_LIBS}) endif() install(TARGETS ${libname} ARCHIVE DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR} ${COMPONENT_OPTION} LIBRARY DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR} ${COMPONENT_OPTION} RUNTIME DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR} ${COMPONENT_OPTION}) if(APPLE) set_target_properties(${libname} PROPERTIES OSX_ARCHITECTURES "${LIB_ARCHS_${libname}}") endif() if(type STREQUAL "SHARED") rt_externalize_debuginfo(${libname}) endif() endforeach() if(LIB_PARENT_TARGET) add_dependencies(${LIB_PARENT_TARGET} ${libnames}) endif() endfunction() set(COMPILER_RT_TEST_CFLAGS) # Unittests support. set(COMPILER_RT_GTEST_PATH ${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest) set(COMPILER_RT_GTEST_SOURCE ${COMPILER_RT_GTEST_PATH}/src/gtest-all.cc) set(COMPILER_RT_GTEST_CFLAGS -DGTEST_NO_LLVM_RAW_OSTREAM=1 -DGTEST_HAS_RTTI=0 -I${COMPILER_RT_GTEST_PATH}/include -I${COMPILER_RT_GTEST_PATH} ) append_list_if(COMPILER_RT_DEBUG -DSANITIZER_DEBUG=1 COMPILER_RT_TEST_CFLAGS) if(MSVC) # clang doesn't support exceptions on Windows yet. list(APPEND COMPILER_RT_TEST_CFLAGS -D_HAS_EXCEPTIONS=0) # We should teach clang to understand "#pragma intrinsic", see PR19898. list(APPEND COMPILER_RT_TEST_CFLAGS -Wno-undefined-inline) # Clang doesn't support SEH on Windows yet. list(APPEND COMPILER_RT_GTEST_CFLAGS -DGTEST_HAS_SEH=0) # gtest use a lot of stuff marked as deprecated on Windows. list(APPEND COMPILER_RT_GTEST_CFLAGS -Wno-deprecated-declarations) # Visual Studio 2012 only supports up to 8 template parameters in # std::tr1::tuple by default, but gtest requires 10 if(MSVC_VERSION EQUAL 1700) list(APPEND COMPILER_RT_GTEST_CFLAGS -D_VARIADIC_MAX=10) endif() endif() # Link objects into a single executable with COMPILER_RT_TEST_COMPILER, # using specified link flags. Make executable a part of provided # test_suite. # add_compiler_rt_test( # SUBDIR # OBJECTS # DEPS # LINK_FLAGS ) macro(add_compiler_rt_test test_suite test_name) cmake_parse_arguments(TEST "" "SUBDIR" "OBJECTS;DEPS;LINK_FLAGS" "" ${ARGN}) if(TEST_SUBDIR) set(output_bin "${CMAKE_CURRENT_BINARY_DIR}/${TEST_SUBDIR}/${test_name}") else() set(output_bin "${CMAKE_CURRENT_BINARY_DIR}/${test_name}") endif() if(MSVC) set(output_bin "${output_bin}.exe") endif() # Use host compiler in a standalone build, and just-built Clang otherwise. if(NOT COMPILER_RT_STANDALONE_BUILD) list(APPEND TEST_DEPS clang) endif() # If we're not on MSVC, include the linker flags from CMAKE but override them # with the provided link flags. This ensures that flags which are required to # link programs at all are included, but the changes needed for the test # trump. With MSVC we can't do that because CMake is set up to run link.exe # when linking, not the compiler. Here, we hack it to use the compiler # because we want to use -fsanitize flags. if(NOT MSVC) set(TEST_LINK_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${TEST_LINK_FLAGS}") separate_arguments(TEST_LINK_FLAGS) endif() add_custom_target(${test_name} COMMAND ${COMPILER_RT_TEST_COMPILER} ${TEST_OBJECTS} -o "${output_bin}" ${TEST_LINK_FLAGS} DEPENDS ${TEST_DEPS}) # Make the test suite depend on the binary. add_dependencies(${test_suite} ${test_name}) endmacro() macro(add_compiler_rt_resource_file target_name file_name) set(src_file "${CMAKE_CURRENT_SOURCE_DIR}/${file_name}") set(dst_file "${COMPILER_RT_OUTPUT_DIR}/${file_name}") add_custom_command(OUTPUT ${dst_file} DEPENDS ${src_file} COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src_file} ${dst_file} COMMENT "Copying ${file_name}...") add_custom_target(${target_name} DEPENDS ${dst_file}) # Install in Clang resource directory. install(FILES ${file_name} DESTINATION ${COMPILER_RT_INSTALL_PATH}) endmacro() macro(add_compiler_rt_script name) set(dst ${COMPILER_RT_EXEC_OUTPUT_DIR}/${name}) set(src ${CMAKE_CURRENT_SOURCE_DIR}/${name}) add_custom_command(OUTPUT ${dst} DEPENDS ${src} COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst} COMMENT "Copying ${name}...") add_custom_target(${name} DEPENDS ${dst}) install(FILES ${dst} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE DESTINATION ${COMPILER_RT_INSTALL_PATH}/bin) endmacro(add_compiler_rt_script src name) # Builds custom version of libc++ and installs it in . # Can be used to build sanitized versions of libc++ for running unit tests. # add_custom_libcxx( # DEPS # CFLAGS ) macro(add_custom_libcxx name prefix) if(NOT COMPILER_RT_HAS_LIBCXX_SOURCES) message(FATAL_ERROR "libcxx not found!") endif() cmake_parse_arguments(LIBCXX "" "" "DEPS;CFLAGS" ${ARGN}) foreach(flag ${LIBCXX_CFLAGS}) set(flagstr "${flagstr} ${flag}") endforeach() set(LIBCXX_CFLAGS ${flagstr}) if(NOT COMPILER_RT_STANDALONE_BUILD) list(APPEND LIBCXX_DEPS clang) endif() ExternalProject_Add(${name} PREFIX ${prefix} SOURCE_DIR ${COMPILER_RT_LIBCXX_PATH} CMAKE_ARGS -DCMAKE_MAKE_PROGRAM:STRING=${CMAKE_MAKE_PROGRAM} -DCMAKE_C_COMPILER=${COMPILER_RT_TEST_COMPILER} -DCMAKE_CXX_COMPILER=${COMPILER_RT_TEST_COMPILER} -DCMAKE_C_FLAGS=${LIBCXX_CFLAGS} -DCMAKE_CXX_FLAGS=${LIBCXX_CFLAGS} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH= LOG_BUILD 1 LOG_CONFIGURE 1 LOG_INSTALL 1 ) set_target_properties(${name} PROPERTIES EXCLUDE_FROM_ALL TRUE) ExternalProject_Add_Step(${name} force-reconfigure DEPENDERS configure ALWAYS 1 ) ExternalProject_Add_Step(${name} clobber COMMAND ${CMAKE_COMMAND} -E remove_directory COMMAND ${CMAKE_COMMAND} -E make_directory COMMENT "Clobberring ${name} build directory..." DEPENDERS configure DEPENDS ${LIBCXX_DEPS} ) endmacro() function(rt_externalize_debuginfo name) if(NOT COMPILER_RT_EXTERNALIZE_DEBUGINFO) return() endif() if(APPLE) if(CMAKE_CXX_FLAGS MATCHES "-flto" OR CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE} MATCHES "-flto") set(lto_object ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${name}-lto.o) set_property(TARGET ${name} APPEND_STRING PROPERTY LINK_FLAGS " -Wl,-object_path_lto -Wl,${lto_object}") endif() add_custom_command(TARGET ${name} POST_BUILD COMMAND xcrun dsymutil $ COMMAND xcrun strip -Sl $) else() message(FATAL_ERROR "COMPILER_RT_EXTERNALIZE_DEBUGINFO isn't implemented for non-darwin platforms!") endif() endfunction() ================================================ FILE: atlas-aapt/external/compiler-rt/cmake/Modules/CompilerRTCompile.cmake ================================================ # On Windows, CMAKE_*_FLAGS are built for MSVC but we use the GCC clang.exe, # which uses completely different flags. Translate some common flag types, and # drop the rest. function(translate_msvc_cflags out_flags msvc_flags) # Insert an empty string in the list to simplify processing. set(msvc_flags ";${msvc_flags}") # Canonicalize /flag to -flag. string(REPLACE ";/" ";-" msvc_flags "${msvc_flags}") # Make space separated -D and -U flags into joined flags. string(REGEX REPLACE ";-\([DU]\);" ";-\\1" msvc_flags "${msvc_flags}") set(clang_flags "") foreach(flag ${msvc_flags}) if ("${flag}" MATCHES "^-[DU]") # Pass through basic command line macro definitions (-DNDEBUG). list(APPEND clang_flags "${flag}") elseif ("${flag}" MATCHES "^-O[2x]") # Canonicalize normal optimization flags to -O2. list(APPEND clang_flags "-O2") endif() endforeach() set(${out_flags} "${clang_flags}" PARENT_SCOPE) endfunction() # Compile a source into an object file with COMPILER_RT_TEST_COMPILER using # a provided compile flags and dependenices. # clang_compile( # CFLAGS # DEPS ) macro(clang_compile object_file source) cmake_parse_arguments(SOURCE "" "" "CFLAGS;DEPS" ${ARGN}) get_filename_component(source_rpath ${source} REALPATH) if(NOT COMPILER_RT_STANDALONE_BUILD) list(APPEND SOURCE_DEPS clang compiler-rt-headers) endif() if (TARGET CompilerRTUnitTestCheckCxx) list(APPEND SOURCE_DEPS CompilerRTUnitTestCheckCxx) endif() string(REGEX MATCH "[.](cc|cpp)$" is_cxx ${source_rpath}) if(is_cxx) string(REPLACE " " ";" global_flags "${CMAKE_CXX_FLAGS}") else() string(REPLACE " " ";" global_flags "${CMAKE_C_FLAGS}") endif() if (MSVC) translate_msvc_cflags(global_flags "${global_flags}") endif() if (APPLE) set(global_flags ${OSX_SYSROOT_FLAG} ${global_flags}) endif() # Ignore unknown warnings. CMAKE_CXX_FLAGS may contain GCC-specific options # which are not supported by Clang. list(APPEND global_flags -Wno-unknown-warning-option) set(compile_flags ${global_flags} ${SOURCE_CFLAGS}) add_custom_command( OUTPUT ${object_file} COMMAND ${COMPILER_RT_TEST_COMPILER} ${compile_flags} -c -o "${object_file}" ${source_rpath} MAIN_DEPENDENCY ${source} DEPENDS ${SOURCE_DEPS}) endmacro() # On Darwin, there are no system-wide C++ headers and the just-built clang is # therefore not able to compile C++ files unless they are copied/symlinked into # ${LLVM_BINARY_DIR}/include/c++ # The just-built clang is used to build compiler-rt unit tests. Let's detect # this before we try to build the tests and print out a suggestion how to fix # it. # On other platforms, this is currently not an issue. macro(clang_compiler_add_cxx_check) if (APPLE) set(CMD "echo '#include ' | ${COMPILER_RT_TEST_COMPILER} ${OSX_SYSROOT_FLAG} -E -x c++ - > /dev/null" "if [ $? != 0 ] " " then echo" " echo 'Your just-built clang cannot find C++ headers, which are needed to build and run compiler-rt tests.'" " echo 'You should copy or symlink your system C++ headers into ${LLVM_BINARY_DIR}/include/c++'" " if [ -d $(dirname $(dirname $(xcrun -f clang)))/include/c++ ]" " then echo 'e.g. with:'" " echo ' cp -r' $(dirname $(dirname $(xcrun -f clang)))/include/c++ '${LLVM_BINARY_DIR}/include/'" " elif [ -d $(dirname $(dirname $(xcrun -f clang)))/lib/c++ ]" " then echo 'e.g. with:'" " echo ' cp -r' $(dirname $(dirname $(xcrun -f clang)))/lib/c++ '${LLVM_BINARY_DIR}/include/'" " fi" " echo 'This can also be fixed by checking out the libcxx project from llvm.org and installing the headers'" " echo 'into your build directory:'" " echo ' cd ${LLVM_SOURCE_DIR}/projects && svn co http://llvm.org/svn/llvm-project/libcxx/trunk libcxx'" " echo ' cd ${LLVM_BINARY_DIR} && make -C ${LLVM_SOURCE_DIR}/projects/libcxx installheaders HEADER_DIR=${LLVM_BINARY_DIR}/include'" " echo" " false" "fi" ) add_custom_target(CompilerRTUnitTestCheckCxx COMMAND bash -c "${CMD}" COMMENT "Checking that just-built clang can find C++ headers..." VERBATIM) if (TARGET clang) ADD_DEPENDENCIES(CompilerRTUnitTestCheckCxx clang) endif() endif() endmacro() ================================================ FILE: atlas-aapt/external/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake ================================================ # On OS X SDKs can be installed anywhere on the base system and xcode-select can # set the default Xcode to use. This function finds the SDKs that are present in # the current Xcode. function(find_darwin_sdk_dir var sdk_name) # Let's first try the internal SDK, otherwise use the public SDK. execute_process( COMMAND xcodebuild -version -sdk ${sdk_name}.internal Path OUTPUT_VARIABLE var_internal OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_FILE /dev/null ) if("" STREQUAL "${var_internal}") execute_process( COMMAND xcodebuild -version -sdk ${sdk_name} Path OUTPUT_VARIABLE var_internal OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_FILE /dev/null ) endif() set(${var} ${var_internal} PARENT_SCOPE) endfunction() # There isn't a clear mapping of what architectures are supported with a given # target platform, but ld's version output does list the architectures it can # link for. function(darwin_get_toolchain_supported_archs output_var) execute_process( COMMAND ld -v ERROR_VARIABLE LINKER_VERSION) string(REGEX MATCH "configured to support archs: ([^\n]+)" ARCHES_MATCHED "${LINKER_VERSION}") if(ARCHES_MATCHED) set(ARCHES "${CMAKE_MATCH_1}") message(STATUS "Got ld supported ARCHES: ${ARCHES}") string(REPLACE " " ";" ARCHES ${ARCHES}) else() # If auto-detecting fails, fall back to a default set message(WARNING "Detecting supported architectures from 'ld -v' failed. Returning default set.") set(ARCHES "i386;x86_64;armv7;armv7s;arm64") endif() set(${output_var} ${ARCHES} PARENT_SCOPE) endfunction() # This function takes an OS and a list of architectures and identifies the # subset of the architectures list that the installed toolchain can target. function(darwin_test_archs os valid_archs) if(${valid_archs}) message(STATUS "Using cached valid architectures for ${os}.") return() endif() set(archs ${ARGN}) message(STATUS "Finding valid architectures for ${os}...") set(SIMPLE_CPP ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/src.cpp) file(WRITE ${SIMPLE_CPP} "#include \nint main() { std::cout << std::endl; return 0; }\n") set(os_linker_flags) foreach(flag ${DARWIN_${os}_LINKFLAGS}) set(os_linker_flags "${os_linker_flags} ${flag}") endforeach() # The simple program will build for x86_64h on the simulator because it is # compatible with x86_64 libraries (mostly), but since x86_64h isn't actually # a valid or useful architecture for the iOS simulator we should drop it. if(${os} STREQUAL "iossim") list(REMOVE_ITEM archs "x86_64h") endif() set(working_archs) foreach(arch ${archs}) set(arch_linker_flags "-arch ${arch} ${os_linker_flags}") try_compile(CAN_TARGET_${os}_${arch} ${CMAKE_BINARY_DIR} ${SIMPLE_CPP} COMPILE_DEFINITIONS "-v -arch ${arch}" ${DARWIN_${os}_CFLAGS} CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS=${arch_linker_flags}" OUTPUT_VARIABLE TEST_OUTPUT) if(${CAN_TARGET_${os}_${arch}}) list(APPEND working_archs ${arch}) else() file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Testing compiler for supporting ${os}-${arch}:\n" "${TEST_OUTPUT}\n") endif() endforeach() set(${valid_archs} ${working_archs} CACHE STRING "List of valid architectures for platform ${os}.") endfunction() # This function checks the host cpusubtype to see if it is post-haswell. Haswell # and later machines can run x86_64h binaries. Haswell is cpusubtype 8. function(darwin_filter_host_archs input output) list_union(tmp_var DARWIN_osx_ARCHS ${input}) execute_process( COMMAND sysctl hw.cpusubtype OUTPUT_VARIABLE SUBTYPE) string(REGEX MATCH "hw.cpusubtype: ([0-9]*)" SUBTYPE_MATCHED "${SUBTYPE}") set(HASWELL_SUPPORTED Off) if(SUBTYPE_MATCHED) if(${CMAKE_MATCH_1} GREATER 7) set(HASWELL_SUPPORTED On) endif() endif() if(NOT HASWELL_SUPPORTED) list(REMOVE_ITEM tmp_var x86_64h) endif() set(${output} ${tmp_var} PARENT_SCOPE) endfunction() # Read and process the exclude file into a list of symbols function(darwin_read_list_from_file output_var file) if(EXISTS ${file}) file(READ ${file} EXCLUDES) string(REPLACE "\n" ";" EXCLUDES ${EXCLUDES}) set(${output_var} ${EXCLUDES} PARENT_SCOPE) endif() endfunction() # this function takes an OS, architecture and minimum version and provides a # list of builtin functions to exclude function(darwin_find_excluded_builtins_list output_var) cmake_parse_arguments(LIB "" "OS;ARCH;MIN_VERSION" "" ${ARGN}) if(NOT LIB_OS OR NOT LIB_ARCH) message(FATAL_ERROR "Must specify OS and ARCH to darwin_find_excluded_builtins_list!") endif() darwin_read_list_from_file(${LIB_OS}_BUILTINS ${DARWIN_EXCLUDE_DIR}/${LIB_OS}.txt) darwin_read_list_from_file(${LIB_OS}_${LIB_ARCH}_BASE_BUILTINS ${DARWIN_EXCLUDE_DIR}/${LIB_OS}-${LIB_ARCH}.txt) if(LIB_MIN_VERSION) file(GLOB builtin_lists ${DARWIN_EXCLUDE_DIR}/${LIB_OS}*-${LIB_ARCH}.txt) foreach(builtin_list ${builtin_lists}) string(REGEX MATCH "${LIB_OS}([0-9\\.]*)-${LIB_ARCH}.txt" VERSION_MATCHED "${builtin_list}") if (VERSION_MATCHED AND NOT CMAKE_MATCH_1 VERSION_LESS LIB_MIN_VERSION) if(NOT smallest_version) set(smallest_version ${CMAKE_MATCH_1}) elseif(CMAKE_MATCH_1 VERSION_LESS smallest_version) set(smallest_version ${CMAKE_MATCH_1}) endif() endif() endforeach() if(smallest_version) darwin_read_list_from_file(${LIB_ARCH}_${LIB_OS}_BUILTINS ${DARWIN_EXCLUDE_DIR}/${LIB_OS}${smallest_version}-${LIB_ARCH}.txt) endif() endif() set(${output_var} ${${LIB_ARCH}_${LIB_OS}_BUILTINS} ${${LIB_OS}_${LIB_ARCH}_BASE_BUILTINS} ${${LIB_OS}_BUILTINS} PARENT_SCOPE) endfunction() # adds a single builtin library for a single OS & ARCH macro(darwin_add_builtin_library name suffix) cmake_parse_arguments(LIB "" "PARENT_TARGET;OS;ARCH" "SOURCES;CFLAGS;DEFS" ${ARGN}) set(libname "${name}.${suffix}_${LIB_ARCH}_${LIB_OS}") add_library(${libname} STATIC ${LIB_SOURCES}) if(DARWIN_${LIB_OS}_SYSROOT) set(sysroot_flag -isysroot ${DARWIN_${LIB_OS}_SYSROOT}) endif() set_target_compile_flags(${libname} ${sysroot_flag} ${DARWIN_${LIB_OS}_BUILTIN_MIN_VER_FLAG} ${LIB_CFLAGS}) set_property(TARGET ${libname} APPEND PROPERTY COMPILE_DEFINITIONS ${LIB_DEFS}) set_target_properties(${libname} PROPERTIES OUTPUT_NAME ${libname}${COMPILER_RT_OS_SUFFIX}) set_target_properties(${libname} PROPERTIES OSX_ARCHITECTURES ${LIB_ARCH}) if(LIB_PARENT_TARGET) add_dependencies(${LIB_PARENT_TARGET} ${libname}) endif() list(APPEND ${LIB_OS}_${suffix}_libs ${libname}) list(APPEND ${LIB_OS}_${suffix}_lipo_flags -arch ${arch} $) endmacro() function(darwin_lipo_libs name) cmake_parse_arguments(LIB "" "PARENT_TARGET;OUTPUT_DIR;INSTALL_DIR" "LIPO_FLAGS;DEPENDS" ${ARGN}) if(LIB_DEPENDS AND LIB_LIPO_FLAGS) add_custom_command(OUTPUT ${LIB_OUTPUT_DIR}/lib${name}.a COMMAND ${CMAKE_COMMAND} -E make_directory ${LIB_OUTPUT_DIR} COMMAND lipo -output ${LIB_OUTPUT_DIR}/lib${name}.a -create ${LIB_LIPO_FLAGS} DEPENDS ${LIB_DEPENDS} ) add_custom_target(${name} DEPENDS ${LIB_OUTPUT_DIR}/lib${name}.a) add_dependencies(${LIB_PARENT_TARGET} ${name}) install(FILES ${LIB_OUTPUT_DIR}/lib${name}.a DESTINATION ${LIB_INSTALL_DIR}) else() message(WARNING "Not generating lipo target for ${name} because no input libraries exist.") endif() endfunction() # Filter out generic versions of routines that are re-implemented in # architecture specific manner. This prevents multiple definitions of the # same symbols, making the symbol selection non-deterministic. function(darwin_filter_builtin_sources output_var exclude_or_include excluded_list) if(exclude_or_include STREQUAL "EXCLUDE") set(filter_action GREATER) set(filter_value -1) elseif(exclude_or_include STREQUAL "INCLUDE") set(filter_action LESS) set(filter_value 0) else() message(FATAL_ERROR "darwin_filter_builtin_sources called without EXCLUDE|INCLUDE") endif() set(intermediate ${ARGN}) foreach (_file ${intermediate}) get_filename_component(_name_we ${_file} NAME_WE) list(FIND ${excluded_list} ${_name_we} _found) if(_found ${filter_action} ${filter_value}) list(REMOVE_ITEM intermediate ${_file}) elseif(${_file} MATCHES ".*/.*\\.S" OR ${_file} MATCHES ".*/.*\\.c") get_filename_component(_name ${_file} NAME) string(REPLACE ".S" ".c" _cname "${_name}") list(REMOVE_ITEM intermediate ${_cname}) endif () endforeach () set(${output_var} ${intermediate} PARENT_SCOPE) endfunction() function(darwin_add_eprintf_library) cmake_parse_arguments(LIB "" "" "CFLAGS" ${ARGN}) add_library(clang_rt.eprintf STATIC eprintf.c) set_target_compile_flags(clang_rt.eprintf -isysroot ${DARWIN_osx_SYSROOT} ${DARWIN_osx_BUILTIN_MIN_VER_FLAG} -arch i386 ${LIB_CFLAGS}) set_target_properties(clang_rt.eprintf PROPERTIES OUTPUT_NAME clang_rt.eprintf${COMPILER_RT_OS_SUFFIX}) set_target_properties(clang_rt.eprintf PROPERTIES OSX_ARCHITECTURES i386) add_dependencies(builtins clang_rt.eprintf) set_target_properties(clang_rt.eprintf PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${COMPILER_RT_LIBRARY_OUTPUT_DIR}) install(TARGETS clang_rt.eprintf ARCHIVE DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR}) endfunction() # Generates builtin libraries for all operating systems specified in ARGN. Each # OS library is constructed by lipo-ing together single-architecture libraries. macro(darwin_add_builtin_libraries) set(DARWIN_EXCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Darwin-excludes) set(CFLAGS "-fPIC -O3 -fvisibility=hidden -DVISIBILITY_HIDDEN -Wall -fomit-frame-pointer") set(CMAKE_C_FLAGS "") set(CMAKE_CXX_FLAGS "") set(CMAKE_ASM_FLAGS "") set(PROFILE_SOURCES ../profile/InstrProfiling ../profile/InstrProfilingBuffer ../profile/InstrProfilingPlatformDarwin) foreach (os ${ARGN}) list_union(DARWIN_BUILTIN_ARCHS DARWIN_${os}_ARCHS BUILTIN_SUPPORTED_ARCH) foreach (arch ${DARWIN_BUILTIN_ARCHS}) darwin_find_excluded_builtins_list(${arch}_${os}_EXCLUDED_BUILTINS OS ${os} ARCH ${arch} MIN_VERSION ${DARWIN_${os}_BUILTIN_MIN_VER}) darwin_filter_builtin_sources(filtered_sources EXCLUDE ${arch}_${os}_EXCLUDED_BUILTINS ${${arch}_SOURCES}) darwin_add_builtin_library(clang_rt builtins OS ${os} ARCH ${arch} SOURCES ${filtered_sources} CFLAGS ${CFLAGS} -arch ${arch} PARENT_TARGET builtins) endforeach() # Don't build cc_kext libraries for simulator platforms if(NOT DARWIN_${os}_SKIP_CC_KEXT) foreach (arch ${DARWIN_BUILTIN_ARCHS}) # By not specifying MIN_VERSION this only reads the OS and OS-arch lists. # We don't want to filter out the builtins that are present in libSystem # because kexts can't link libSystem. darwin_find_excluded_builtins_list(${arch}_${os}_EXCLUDED_BUILTINS OS ${os} ARCH ${arch}) darwin_filter_builtin_sources(filtered_sources EXCLUDE ${arch}_${os}_EXCLUDED_BUILTINS ${${arch}_SOURCES}) # In addition to the builtins cc_kext includes some profile sources darwin_add_builtin_library(clang_rt cc_kext OS ${os} ARCH ${arch} SOURCES ${filtered_sources} ${PROFILE_SOURCES} CFLAGS ${CFLAGS} -arch ${arch} -mkernel DEFS KERNEL_USE PARENT_TARGET builtins) endforeach() set(archive_name clang_rt.cc_kext_${os}) if(${os} STREQUAL "osx") set(archive_name clang_rt.cc_kext) endif() darwin_lipo_libs(${archive_name} PARENT_TARGET builtins LIPO_FLAGS ${${os}_cc_kext_lipo_flags} DEPENDS ${${os}_cc_kext_libs} OUTPUT_DIR ${COMPILER_RT_LIBRARY_OUTPUT_DIR} INSTALL_DIR ${COMPILER_RT_LIBRARY_INSTALL_DIR}) endif() endforeach() darwin_add_eprintf_library(CFLAGS ${CFLAGS}) # We put the x86 sim slices into the archives for their base OS foreach (os ${ARGN}) if(NOT ${os} MATCHES ".*sim$") darwin_lipo_libs(clang_rt.${os} PARENT_TARGET builtins LIPO_FLAGS ${${os}_builtins_lipo_flags} ${${os}sim_builtins_lipo_flags} DEPENDS ${${os}_builtins_libs} ${${os}sim_builtins_libs} OUTPUT_DIR ${COMPILER_RT_LIBRARY_OUTPUT_DIR} INSTALL_DIR ${COMPILER_RT_LIBRARY_INSTALL_DIR}) endif() endforeach() darwin_add_embedded_builtin_libraries() endmacro() macro(darwin_add_embedded_builtin_libraries) # this is a hacky opt-out. If you can't target both intel and arm # architectures we bail here. set(DARWIN_SOFT_FLOAT_ARCHS armv6m armv7m armv7em armv7) set(DARWIN_HARD_FLOAT_ARCHS armv7em armv7) if(COMPILER_RT_SUPPORTED_ARCH MATCHES ".*armv.*") list(FIND COMPILER_RT_SUPPORTED_ARCH i386 i386_idx) if(i386_idx GREATER -1) list(APPEND DARWIN_HARD_FLOAT_ARCHS i386) endif() list(FIND COMPILER_RT_SUPPORTED_ARCH x86_64 x86_64_idx) if(x86_64_idx GREATER -1) list(APPEND DARWIN_HARD_FLOAT_ARCHS x86_64) endif() set(MACHO_SYM_DIR ${CMAKE_CURRENT_SOURCE_DIR}/macho_embedded) set(CFLAGS "-Oz -Wall -fomit-frame-pointer -ffreestanding") set(CMAKE_C_FLAGS "") set(CMAKE_CXX_FLAGS "") set(CMAKE_ASM_FLAGS "") set(SOFT_FLOAT_FLAG -mfloat-abi=soft) set(HARD_FLOAT_FLAG -mfloat-abi=hard) set(ENABLE_PIC Off) set(PIC_FLAG -fPIC) set(STATIC_FLAG -static) set(DARWIN_macho_embedded_ARCHS armv6m armv7m armv7em armv7 i386 x86_64) set(DARWIN_macho_embedded_LIBRARY_OUTPUT_DIR ${COMPILER_RT_OUTPUT_DIR}/lib/macho_embedded) set(DARWIN_macho_embedded_LIBRARY_INSTALL_DIR ${COMPILER_RT_INSTALL_PATH}/lib/macho_embedded) set(CFLAGS_armv7 "-target thumbv7-apple-darwin-eabi") set(CFLAGS_i386 "-march=pentium") darwin_read_list_from_file(common_FUNCTIONS ${MACHO_SYM_DIR}/common.txt) darwin_read_list_from_file(thumb2_FUNCTIONS ${MACHO_SYM_DIR}/thumb2.txt) darwin_read_list_from_file(thumb2_64_FUNCTIONS ${MACHO_SYM_DIR}/thumb2-64.txt) darwin_read_list_from_file(arm_FUNCTIONS ${MACHO_SYM_DIR}/arm.txt) darwin_read_list_from_file(i386_FUNCTIONS ${MACHO_SYM_DIR}/i386.txt) set(armv6m_FUNCTIONS ${common_FUNCTIONS} ${arm_FUNCTIONS}) set(armv7m_FUNCTIONS ${common_FUNCTIONS} ${arm_FUNCTIONS} ${thumb2_FUNCTIONS}) set(armv7em_FUNCTIONS ${common_FUNCTIONS} ${arm_FUNCTIONS} ${thumb2_FUNCTIONS}) set(armv7_FUNCTIONS ${common_FUNCTIONS} ${arm_FUNCTIONS} ${thumb2_FUNCTIONS} ${thumb2_64_FUNCTIONS}) set(i386_FUNCTIONS ${common_FUNCTIONS} ${i386_FUNCTIONS}) set(x86_64_FUNCTIONS ${common_FUNCTIONS}) foreach(arch ${DARWIN_macho_embedded_ARCHS}) darwin_filter_builtin_sources(${arch}_filtered_sources INCLUDE ${arch}_FUNCTIONS ${${arch}_SOURCES}) if(NOT ${arch}_filtered_sources) message("${arch}_SOURCES: ${${arch}_SOURCES}") message("${arch}_FUNCTIONS: ${${arch}_FUNCTIONS}") message(FATAL_ERROR "Empty filtered sources!") endif() endforeach() foreach(float_type SOFT HARD) foreach(type PIC STATIC) string(TOLOWER "${float_type}_${type}" lib_suffix) foreach(arch ${DARWIN_${float_type}_FLOAT_ARCHS}) set(DARWIN_macho_embedded_SYSROOT ${DARWIN_osx_SYSROOT}) set(float_flag) if(${arch} MATCHES "^arm") # x86 targets are hard float by default, but the complain about the # float ABI flag, so don't pass it unless we're targeting arm. set(float_flag ${${float_type}_FLOAT_FLAG}) endif() darwin_add_builtin_library(clang_rt ${lib_suffix} OS macho_embedded ARCH ${arch} SOURCES ${${arch}_filtered_sources} CFLAGS ${CFLAGS} -arch ${arch} ${${type}_FLAG} ${float_flag} ${CFLAGS_${arch}} PARENT_TARGET builtins) endforeach() foreach(lib ${macho_embedded_${lib_suffix}_libs}) set_target_properties(${lib} PROPERTIES LINKER_LANGUAGE C) endforeach() darwin_lipo_libs(clang_rt.${lib_suffix} PARENT_TARGET builtins LIPO_FLAGS ${macho_embedded_${lib_suffix}_lipo_flags} DEPENDS ${macho_embedded_${lib_suffix}_libs} OUTPUT_DIR ${DARWIN_macho_embedded_LIBRARY_OUTPUT_DIR} INSTALL_DIR ${DARWIN_macho_embedded_LIBRARY_INSTALL_DIR}) endforeach() endforeach() endif() endmacro() ================================================ FILE: atlas-aapt/external/compiler-rt/cmake/Modules/CompilerRTLink.cmake ================================================ # Link a shared library with COMPILER_RT_TEST_COMPILER. # clang_link_shared( # OBJECTS # LINKFLAGS # DEPS ) macro(clang_link_shared so_file) cmake_parse_arguments(SOURCE "" "" "OBJECTS;LINKFLAGS;DEPS" ${ARGN}) if(NOT COMPILER_RT_STANDALONE_BUILD) list(APPEND SOURCE_DEPS clang) endif() add_custom_command( OUTPUT ${so_file} COMMAND ${COMPILER_RT_TEST_COMPILER} -o "${so_file}" -shared ${SOURCE_LINKFLAGS} ${SOURCE_OBJECTS} DEPENDS ${SOURCE_DEPS}) endmacro() ================================================ FILE: atlas-aapt/external/compiler-rt/cmake/Modules/CompilerRTUtils.cmake ================================================ # Because compiler-rt spends a lot of time setting up custom compile flags, # define a handy helper function for it. The compile flags setting in CMake # has serious issues that make its syntax challenging at best. function(set_target_compile_flags target) set(argstring "") foreach(arg ${ARGN}) set(argstring "${argstring} ${arg}") endforeach() set_property(TARGET ${target} PROPERTY COMPILE_FLAGS "${argstring}") endfunction() function(set_target_link_flags target) set(argstring "") foreach(arg ${ARGN}) set(argstring "${argstring} ${arg}") endforeach() set_property(TARGET ${target} PROPERTY LINK_FLAGS "${argstring}") endfunction() # Set the variable var_PYBOOL to True if var holds a true-ish string, # otherwise set it to False. macro(pythonize_bool var) if (${var}) set(${var}_PYBOOL True) else() set(${var}_PYBOOL False) endif() endmacro() # Appends value to all lists in ARGN, if the condition is true. macro(append_list_if condition value) if(${condition}) foreach(list ${ARGN}) list(APPEND ${list} ${value}) endforeach() endif() endmacro() # Appends value to all strings in ARGN, if the condition is true. macro(append_string_if condition value) if(${condition}) foreach(str ${ARGN}) set(${str} "${${str}} ${value}") endforeach() endif() endmacro() macro(append_no_rtti_flag list) append_list_if(COMPILER_RT_HAS_FNO_RTTI_FLAG -fno-rtti ${list}) append_list_if(COMPILER_RT_HAS_GR_FLAG /GR- ${list}) endmacro() macro(append_have_file_definition filename varname list) check_include_file("${filename}" "${varname}") if (NOT ${varname}) set("${varname}" 0) endif() list(APPEND ${list} "${varname}=${${varname}}") endmacro() macro(list_union output input1 input2) set(${output}) foreach(it ${${input1}}) list(FIND ${input2} ${it} index) if( NOT (index EQUAL -1)) list(APPEND ${output} ${it}) endif() endforeach() endmacro() ================================================ FILE: atlas-aapt/external/compiler-rt/cmake/Modules/SanitizerUtils.cmake ================================================ set(SANITIZER_GEN_DYNAMIC_LIST ${COMPILER_RT_SOURCE_DIR}/lib/sanitizer_common/scripts/gen_dynamic_list.py) set(SANITIZER_LINT_SCRIPT ${COMPILER_RT_SOURCE_DIR}/lib/sanitizer_common/scripts/check_lint.sh) # Create a target "--symbols" that would generate the list of # symbols that need to be exported from sanitizer runtime "". Function # interceptors are exported automatically, user can also provide files with # symbol names that should be exported as well. # add_sanitizer_rt_symbols( # ARCHS # PARENT_TARGET # EXTRA ) macro(add_sanitizer_rt_symbols name) cmake_parse_arguments(ARG "" "PARENT_TARGET" "ARCHS;EXTRA" ${ARGN}) foreach(arch ${ARG_ARCHS}) set(target_name ${name}-${arch}) set(stamp ${CMAKE_CURRENT_BINARY_DIR}/${target_name}.syms-stamp) set(extra_args) foreach(arg ${ARG_EXTRA}) list(APPEND extra_args "--extra" ${arg}) endforeach() add_custom_command(OUTPUT ${stamp} COMMAND ${PYTHON_EXECUTABLE} ${SANITIZER_GEN_DYNAMIC_LIST} ${extra_args} $ > $.syms COMMAND ${CMAKE_COMMAND} -E touch ${stamp} DEPENDS ${target_name} ${SANITIZER_GEN_DYNAMIC_LIST} ${ARG_EXTRA} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Generating exported symbols for ${target_name}" VERBATIM) add_custom_target(${target_name}-symbols ALL DEPENDS ${stamp} SOURCES ${SANITIZER_GEN_DYNAMIC_LIST} ${ARG_EXTRA}) if(NOT CMAKE_VERSION VERSION_LESS 3.0) install(FILES $.syms DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR}) else() # Per-config install location. if(CMAKE_CONFIGURATION_TYPES) foreach(c ${CMAKE_CONFIGURATION_TYPES}) get_target_property(libfile ${target_name} LOCATION_${c}) install(FILES ${libfile}.syms CONFIGURATIONS ${c} DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR}) endforeach() else() get_target_property(libfile ${target_name} LOCATION_${CMAKE_BUILD_TYPE}) install(FILES ${libfile}.syms DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR}) endif() endif() if(ARG_PARENT_TARGET) add_dependencies(${ARG_PARENT_TARGET} ${target_name}-symbols) endif() endforeach() endmacro() macro(add_sanitizer_rt_version_list name) set(vers ${CMAKE_CURRENT_BINARY_DIR}/${name}.vers) cmake_parse_arguments(ARG "" "" "LIBS;EXTRA" ${ARGN}) set(args) foreach(arg ${ARG_EXTRA}) list(APPEND args "--extra" ${arg}) endforeach() foreach(arg ${ARG_LIBS}) list(APPEND args "$") endforeach() add_custom_command(OUTPUT ${vers} COMMAND ${PYTHON_EXECUTABLE} ${SANITIZER_GEN_DYNAMIC_LIST} --version-list ${args} > ${vers} DEPENDS ${SANITIZER_GEN_DYNAMIC_LIST} ${ARG_EXTRA} ${ARG_LIBS} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Generating version list for ${name}" VERBATIM) add_custom_target(${name}-version-list ALL DEPENDS ${vers}) endmacro() # Add target to check code style for sanitizer runtimes. if(UNIX) add_custom_target(SanitizerLintCheck COMMAND LLVM_CHECKOUT=${LLVM_MAIN_SRC_DIR} SILENT=1 TMPDIR= PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} COMPILER_RT=${COMPILER_RT_SOURCE_DIR} ${SANITIZER_LINT_SCRIPT} DEPENDS ${SANITIZER_LINT_SCRIPT} COMMENT "Running lint check for sanitizer sources..." VERBATIM) endif() ================================================ FILE: atlas-aapt/external/compiler-rt/cmake/config-ix.cmake ================================================ include(CMakePushCheckState) include(CheckCXXCompilerFlag) include(CheckLibraryExists) include(CheckSymbolExists) include(TestBigEndian) function(check_linker_flag flag out_var) cmake_push_check_state() set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${flag}") check_cxx_compiler_flag("" ${out_var}) cmake_pop_check_state() endfunction() # CodeGen options. check_cxx_compiler_flag(-fPIC COMPILER_RT_HAS_FPIC_FLAG) check_cxx_compiler_flag(-fPIE COMPILER_RT_HAS_FPIE_FLAG) check_cxx_compiler_flag(-fno-builtin COMPILER_RT_HAS_FNO_BUILTIN_FLAG) check_cxx_compiler_flag(-fno-exceptions COMPILER_RT_HAS_FNO_EXCEPTIONS_FLAG) check_cxx_compiler_flag(-fomit-frame-pointer COMPILER_RT_HAS_FOMIT_FRAME_POINTER_FLAG) check_cxx_compiler_flag(-funwind-tables COMPILER_RT_HAS_FUNWIND_TABLES_FLAG) check_cxx_compiler_flag(-fno-stack-protector COMPILER_RT_HAS_FNO_STACK_PROTECTOR_FLAG) check_cxx_compiler_flag(-fno-sanitize=safe-stack COMPILER_RT_HAS_FNO_SANITIZE_SAFE_STACK_FLAG) check_cxx_compiler_flag(-fvisibility=hidden COMPILER_RT_HAS_FVISIBILITY_HIDDEN_FLAG) check_cxx_compiler_flag(-fno-rtti COMPILER_RT_HAS_FNO_RTTI_FLAG) check_cxx_compiler_flag(-ffreestanding COMPILER_RT_HAS_FFREESTANDING_FLAG) check_cxx_compiler_flag("-Werror -fno-function-sections" COMPILER_RT_HAS_FNO_FUNCTION_SECTIONS_FLAG) check_cxx_compiler_flag(-std=c++11 COMPILER_RT_HAS_STD_CXX11_FLAG) check_cxx_compiler_flag(-ftls-model=initial-exec COMPILER_RT_HAS_FTLS_MODEL_INITIAL_EXEC) check_cxx_compiler_flag(-fno-lto COMPILER_RT_HAS_FNO_LTO_FLAG) check_cxx_compiler_flag("-Werror -msse3" COMPILER_RT_HAS_MSSE3_FLAG) check_cxx_compiler_flag(-std=c99 COMPILER_RT_HAS_STD_C99_FLAG) check_cxx_compiler_flag(--sysroot=. COMPILER_RT_HAS_SYSROOT_FLAG) if(NOT WIN32 AND NOT CYGWIN) # MinGW warns if -fvisibility-inlines-hidden is used. check_cxx_compiler_flag("-fvisibility-inlines-hidden" COMPILER_RT_HAS_FVISIBILITY_INLINES_HIDDEN_FLAG) endif() check_cxx_compiler_flag(/GR COMPILER_RT_HAS_GR_FLAG) check_cxx_compiler_flag(/GS COMPILER_RT_HAS_GS_FLAG) check_cxx_compiler_flag(/MT COMPILER_RT_HAS_MT_FLAG) check_cxx_compiler_flag(/Oy COMPILER_RT_HAS_Oy_FLAG) # Debug info flags. check_cxx_compiler_flag(-gline-tables-only COMPILER_RT_HAS_GLINE_TABLES_ONLY_FLAG) check_cxx_compiler_flag(-g COMPILER_RT_HAS_G_FLAG) check_cxx_compiler_flag(/Zi COMPILER_RT_HAS_Zi_FLAG) # Warnings. check_cxx_compiler_flag(-Wall COMPILER_RT_HAS_WALL_FLAG) check_cxx_compiler_flag(-Werror COMPILER_RT_HAS_WERROR_FLAG) check_cxx_compiler_flag("-Werror -Wframe-larger-than=512" COMPILER_RT_HAS_WFRAME_LARGER_THAN_FLAG) check_cxx_compiler_flag("-Werror -Wglobal-constructors" COMPILER_RT_HAS_WGLOBAL_CONSTRUCTORS_FLAG) check_cxx_compiler_flag("-Werror -Wc99-extensions" COMPILER_RT_HAS_WC99_EXTENSIONS_FLAG) check_cxx_compiler_flag("-Werror -Wgnu" COMPILER_RT_HAS_WGNU_FLAG) check_cxx_compiler_flag("-Werror -Wnon-virtual-dtor" COMPILER_RT_HAS_WNON_VIRTUAL_DTOR_FLAG) check_cxx_compiler_flag("-Werror -Wvariadic-macros" COMPILER_RT_HAS_WVARIADIC_MACROS_FLAG) check_cxx_compiler_flag(/W3 COMPILER_RT_HAS_W3_FLAG) check_cxx_compiler_flag(/WX COMPILER_RT_HAS_WX_FLAG) check_cxx_compiler_flag(/wd4146 COMPILER_RT_HAS_WD4146_FLAG) check_cxx_compiler_flag(/wd4291 COMPILER_RT_HAS_WD4291_FLAG) check_cxx_compiler_flag(/wd4391 COMPILER_RT_HAS_WD4391_FLAG) check_cxx_compiler_flag(/wd4722 COMPILER_RT_HAS_WD4722_FLAG) check_cxx_compiler_flag(/wd4800 COMPILER_RT_HAS_WD4800_FLAG) # Symbols. check_symbol_exists(__func__ "" COMPILER_RT_HAS_FUNC_SYMBOL) # Libraries. check_library_exists(c fopen "" COMPILER_RT_HAS_LIBC) check_library_exists(dl dlopen "" COMPILER_RT_HAS_LIBDL) check_library_exists(rt shm_open "" COMPILER_RT_HAS_LIBRT) check_library_exists(m pow "" COMPILER_RT_HAS_LIBM) check_library_exists(pthread pthread_create "" COMPILER_RT_HAS_LIBPTHREAD) check_library_exists(stdc++ __cxa_throw "" COMPILER_RT_HAS_LIBSTDCXX) # Linker flags. if(ANDROID) check_linker_flag("-Wl,-z,global" COMPILER_RT_HAS_Z_GLOBAL) check_library_exists(log __android_log_write "" COMPILER_RT_HAS_LIBLOG) endif() # Architectures. # List of all architectures we can target. set(COMPILER_RT_SUPPORTED_ARCH) # Try to compile a very simple source file to ensure we can target the given # platform. We use the results of these tests to build only the various target # runtime libraries supported by our current compilers cross-compiling # abilities. set(SIMPLE_SOURCE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/simple.cc) file(WRITE ${SIMPLE_SOURCE} "#include \n#include \nint main() {}\n") function(check_compile_definition def argstring out_var) if("${def}" STREQUAL "") set(${out_var} TRUE PARENT_SCOPE) return() endif() cmake_push_check_state() set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${argstring}") check_symbol_exists(${def} "" ${out_var}) cmake_pop_check_state() endfunction() # test_target_arch( ) # Checks if architecture is supported: runs host compiler with provided # flags to verify that: # 1) is defined (if non-empty) # 2) simple file can be successfully built. # If successful, saves target flags for this architecture. macro(test_target_arch arch def) set(TARGET_${arch}_CFLAGS ${ARGN}) set(argstring "") foreach(arg ${ARGN}) set(argstring "${argstring} ${arg}") endforeach() check_compile_definition("${def}" "${argstring}" HAS_${arch}_DEF) if(NOT HAS_${arch}_DEF) set(CAN_TARGET_${arch} FALSE) else() set(argstring "${CMAKE_EXE_LINKER_FLAGS} ${argstring}") try_compile(CAN_TARGET_${arch} ${CMAKE_BINARY_DIR} ${SIMPLE_SOURCE} COMPILE_DEFINITIONS "${TARGET_${arch}_CFLAGS}" OUTPUT_VARIABLE TARGET_${arch}_OUTPUT CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS:STRING=${argstring}") endif() if(${CAN_TARGET_${arch}}) list(APPEND COMPILER_RT_SUPPORTED_ARCH ${arch}) elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "${arch}" AND COMPILER_RT_HAS_EXPLICIT_DEFAULT_TARGET_TRIPLE) # Bail out if we cannot target the architecture we plan to test. message(FATAL_ERROR "Cannot compile for ${arch}:\n${TARGET_${arch}_OUTPUT}") endif() endmacro() # Add $arch as supported with no additional flags. macro(add_default_target_arch arch) set(TARGET_${arch}_CFLAGS "") set(CAN_TARGET_${arch} 1) list(APPEND COMPILER_RT_SUPPORTED_ARCH ${arch}) endmacro() macro(detect_target_arch) check_symbol_exists(__arm__ "" __ARM) check_symbol_exists(__aarch64__ "" __AARCH64) check_symbol_exists(__x86_64__ "" __X86_64) check_symbol_exists(__i686__ "" __I686) check_symbol_exists(__i386__ "" __I386) check_symbol_exists(__mips__ "" __MIPS) check_symbol_exists(__mips64__ "" __MIPS64) if(__ARM) add_default_target_arch(arm) elseif(__AARCH64) add_default_target_arch(aarch64) elseif(__X86_64) add_default_target_arch(x86_64) elseif(__I686) add_default_target_arch(i686) elseif(__I386) add_default_target_arch(i386) elseif(__MIPS64) # must be checked before __MIPS add_default_target_arch(mips64) elseif(__MIPS) add_default_target_arch(mips) endif() endmacro() # Detect whether the current target platform is 32-bit or 64-bit, and setup # the correct commandline flags needed to attempt to target 32-bit and 64-bit. if (NOT CMAKE_SIZEOF_VOID_P EQUAL 4 AND NOT CMAKE_SIZEOF_VOID_P EQUAL 8) message(FATAL_ERROR "Please use architecture with 4 or 8 byte pointers.") endif() # Generate the COMPILER_RT_SUPPORTED_ARCH list. if(ANDROID) # Examine compiler output to determine target architecture. detect_target_arch() set(COMPILER_RT_OS_SUFFIX "-android") elseif(NOT APPLE) # Supported archs for Apple platforms are generated later if("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "i[2-6]86|x86|amd64") if(NOT MSVC) test_target_arch(x86_64 "" "-m64") # FIXME: We build runtimes for both i686 and i386, as "clang -m32" may # target different variant than "$CMAKE_C_COMPILER -m32". This part should # be gone after we resolve PR14109. test_target_arch(i686 __i686__ "-m32") test_target_arch(i386 __i386__ "-m32") else() if (CMAKE_SIZEOF_VOID_P EQUAL 4) test_target_arch(i386 "" "") else() test_target_arch(x86_64 "" "") endif() endif() elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "powerpc") TEST_BIG_ENDIAN(HOST_IS_BIG_ENDIAN) if(HOST_IS_BIG_ENDIAN) test_target_arch(powerpc64 "" "-m64") else() test_target_arch(powerpc64le "" "-m64") endif() elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "mipsel|mips64el") # Gcc doesn't accept -m32/-m64 so we do the next best thing and use # -mips32r2/-mips64r2. We don't use -mips1/-mips3 because we want to match # clang's default CPU's. In the 64-bit case, we must also specify the ABI # since the default ABI differs between gcc and clang. # FIXME: Ideally, we would build the N32 library too. test_target_arch(mipsel "" "-mips32r2" "--target=mipsel-linux-gnu") test_target_arch(mips64el "" "-mips64r2" "--target=mips64el-linux-gnu" "-mabi=n64") elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "mips") test_target_arch(mips "" "-mips32r2" "--target=mips-linux-gnu") test_target_arch(mips64 "" "-mips64r2" "--target=mips64-linux-gnu" "-mabi=n64") elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "arm") test_target_arch(arm "" "-march=armv7-a" "-mfloat-abi=soft") test_target_arch(armhf "" "-march=armv7-a" "-mfloat-abi=hard") elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "aarch32") test_target_arch(aarch32 "" "-march=armv8-a") elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "aarch64") test_target_arch(aarch64 "" "-march=armv8-a") endif() set(COMPILER_RT_OS_SUFFIX "") endif() # Takes ${ARGN} and puts only supported architectures in @out_var list. function(filter_available_targets out_var) set(archs ${${out_var}}) foreach(arch ${ARGN}) list(FIND COMPILER_RT_SUPPORTED_ARCH ${arch} ARCH_INDEX) if(NOT (ARCH_INDEX EQUAL -1) AND CAN_TARGET_${arch}) list(APPEND archs ${arch}) endif() endforeach() set(${out_var} ${archs} PARENT_SCOPE) endfunction() # Returns a list of architecture specific target cflags in @out_var list. function(get_target_flags_for_arch arch out_var) list(FIND COMPILER_RT_SUPPORTED_ARCH ${arch} ARCH_INDEX) if(ARCH_INDEX EQUAL -1) message(FATAL_ERROR "Unsupported architecture: ${arch}") else() if (NOT APPLE) set(${out_var} ${TARGET_${arch}_CFLAGS} PARENT_SCOPE) else() # This is only called in constructing cflags for tests executing on the # host. This will need to all be cleaned up to support building tests # for cross-targeted hardware (i.e. iOS). set(${out_var} -arch ${arch} PARENT_SCOPE) endif() endif() endfunction() set(ARM64 aarch64) set(ARM32 arm armhf) set(X86 i386 i686) set(X86_64 x86_64) set(MIPS32 mips mipsel) set(MIPS64 mips64 mips64el) set(PPC64 powerpc64 powerpc64le) if(APPLE) set(ARM64 arm64) set(ARM32 armv7 armv7s) set(X86_64 x86_64 x86_64h) endif() set(ALL_BUILTIN_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64} ${MIPS32} ${MIPS64}) set(ALL_SANITIZER_COMMON_SUPPORTED_ARCH ${X86} ${X86_64} ${PPC64} ${ARM32} ${ARM64} ${MIPS32} ${MIPS64}) set(ALL_ASAN_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64} ${MIPS32} ${MIPS64} ${PPC64}) set(ALL_DFSAN_SUPPORTED_ARCH ${X86_64} ${MIPS64} ${ARM64}) set(ALL_LSAN_SUPPORTED_ARCH ${X86_64} ${MIPS64} ${ARM64}) set(ALL_MSAN_SUPPORTED_ARCH ${X86_64} ${MIPS64} ${ARM64}) set(ALL_PROFILE_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64} ${PPC64} ${MIPS32} ${MIPS64}) set(ALL_TSAN_SUPPORTED_ARCH ${X86_64} ${MIPS64} ${ARM64} ${PPC64}) set(ALL_UBSAN_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64} ${MIPS32} ${MIPS64} ${PPC64}) set(ALL_SAFESTACK_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM64}) set(ALL_CFI_SUPPORTED_ARCH ${X86} ${X86_64}) if(APPLE) include(CompilerRTDarwinUtils) # On Darwin if /usr/include doesn't exist, the user probably has Xcode but not # the command line tools. If this is the case, we need to find the OS X # sysroot to pass to clang. if(NOT EXISTS /usr/include) execute_process(COMMAND xcodebuild -version -sdk macosx Path OUTPUT_VARIABLE OSX_SYSROOT ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) set(OSX_SYSROOT_FLAG "-isysroot${OSX_SYSROOT}") endif() option(COMPILER_RT_ENABLE_IOS "Enable building for iOS - Experimental" Off) find_darwin_sdk_dir(DARWIN_osx_SYSROOT macosx) find_darwin_sdk_dir(DARWIN_iossim_SYSROOT iphonesimulator) find_darwin_sdk_dir(DARWIN_ios_SYSROOT iphoneos) # Note: In order to target x86_64h on OS X the minimum deployment target must # be 10.8 or higher. set(SANITIZER_COMMON_SUPPORTED_OS osx) set(BUILTIN_SUPPORTED_OS osx) set(PROFILE_SUPPORTED_OS osx) set(TSAN_SUPPORTED_OS osx) if(NOT SANITIZER_MIN_OSX_VERSION) string(REGEX MATCH "-mmacosx-version-min=([.0-9]+)" MACOSX_VERSION_MIN_FLAG "${CMAKE_CXX_FLAGS}") if(MACOSX_VERSION_MIN_FLAG) set(SANITIZER_MIN_OSX_VERSION "${CMAKE_MATCH_1}") elseif(CMAKE_OSX_DEPLOYMENT_TARGET) set(SANITIZER_MIN_OSX_VERSION ${CMAKE_OSX_DEPLOYMENT_TARGET}) else() set(SANITIZER_MIN_OSX_VERSION 10.9) endif() if(SANITIZER_MIN_OSX_VERSION VERSION_LESS "10.7") message(FATAL_ERROR "Too old OS X version: ${SANITIZER_MIN_OSX_VERSION}") endif() endif() # We're setting the flag manually for each target OS set(CMAKE_OSX_DEPLOYMENT_TARGET "") set(DARWIN_COMMON_CFLAGS -stdlib=libc++) set(DARWIN_COMMON_LINKFLAGS -stdlib=libc++ -lc++ -lc++abi) set(DARWIN_osx_CFLAGS ${DARWIN_COMMON_CFLAGS} -mmacosx-version-min=${SANITIZER_MIN_OSX_VERSION}) set(DARWIN_osx_LINKFLAGS ${DARWIN_COMMON_LINKFLAGS} -mmacosx-version-min=${SANITIZER_MIN_OSX_VERSION}) set(DARWIN_osx_BUILTIN_MIN_VER 10.5) set(DARWIN_osx_BUILTIN_MIN_VER_FLAG -mmacosx-version-min=${DARWIN_osx_BUILTIN_MIN_VER}) if(DARWIN_osx_SYSROOT) list(APPEND DARWIN_osx_CFLAGS -isysroot ${DARWIN_osx_SYSROOT}) list(APPEND DARWIN_osx_LINKFLAGS -isysroot ${DARWIN_osx_SYSROOT}) endif() # Figure out which arches to use for each OS darwin_get_toolchain_supported_archs(toolchain_arches) message(STATUS "Toolchain supported arches: ${toolchain_arches}") if(NOT MACOSX_VERSION_MIN_FLAG) darwin_test_archs(osx DARWIN_osx_ARCHS ${toolchain_arches}) message(STATUS "OSX supported arches: ${DARWIN_osx_ARCHS}") foreach(arch ${DARWIN_osx_ARCHS}) list(APPEND COMPILER_RT_SUPPORTED_ARCH ${arch}) set(CAN_TARGET_${arch} 1) endforeach() # Need to build a 10.4 compatible libclang_rt set(DARWIN_10.4_SYSROOT ${DARWIN_osx_SYSROOT}) set(DARWIN_10.4_BUILTIN_MIN_VER 10.4) set(DARWIN_10.4_BUILTIN_MIN_VER_FLAG -mmacosx-version-min=${DARWIN_10.4_BUILTIN_MIN_VER}) set(DARWIN_10.4_SKIP_CC_KEXT On) darwin_test_archs(10.4 DARWIN_10.4_ARCHS ${toolchain_arches}) message(STATUS "OSX 10.4 supported arches: ${DARWIN_10.4_ARCHS}") if(DARWIN_10.4_ARCHS) # don't include the Haswell slice in the 10.4 compatibility library list(REMOVE_ITEM DARWIN_10.4_ARCHS x86_64h) list(APPEND BUILTIN_SUPPORTED_OS 10.4) endif() if(DARWIN_iossim_SYSROOT) set(DARWIN_iossim_CFLAGS ${DARWIN_COMMON_CFLAGS} -mios-simulator-version-min=7.0 -isysroot ${DARWIN_iossim_SYSROOT}) set(DARWIN_iossim_LINKFLAGS ${DARWIN_COMMON_LINKFLAGS} -mios-simulator-version-min=7.0 -isysroot ${DARWIN_iossim_SYSROOT}) set(DARWIN_iossim_BUILTIN_MIN_VER 6.0) set(DARWIN_iossim_BUILTIN_MIN_VER_FLAG -mios-simulator-version-min=${DARWIN_iossim_BUILTIN_MIN_VER}) set(DARWIN_iossim_SKIP_CC_KEXT On) darwin_test_archs(iossim DARWIN_iossim_ARCHS ${toolchain_arches}) message(STATUS "iOS Simulator supported arches: ${DARWIN_iossim_ARCHS}") if(DARWIN_iossim_ARCHS) list(APPEND SANITIZER_COMMON_SUPPORTED_OS iossim) list(APPEND BUILTIN_SUPPORTED_OS iossim) list(APPEND PROFILE_SUPPORTED_OS iossim) endif() foreach(arch ${DARWIN_iossim_ARCHS}) list(APPEND COMPILER_RT_SUPPORTED_ARCH ${arch}) set(CAN_TARGET_${arch} 1) endforeach() endif() if(DARWIN_ios_SYSROOT AND COMPILER_RT_ENABLE_IOS) set(DARWIN_ios_CFLAGS ${DARWIN_COMMON_CFLAGS} -miphoneos-version-min=7.0 -isysroot ${DARWIN_ios_SYSROOT}) set(DARWIN_ios_LINKFLAGS ${DARWIN_COMMON_LINKFLAGS} -miphoneos-version-min=7.0 -isysroot ${DARWIN_ios_SYSROOT}) set(DARWIN_ios_BUILTIN_MIN_VER 6.0) set(DARWIN_ios_BUILTIN_MIN_VER_FLAG -miphoneos-version-min=${DARWIN_ios_BUILTIN_MIN_VER}) darwin_test_archs(ios DARWIN_ios_ARCHS ${toolchain_arches}) message(STATUS "iOS supported arches: ${DARWIN_ios_ARCHS}") if(DARWIN_ios_ARCHS) list(APPEND SANITIZER_COMMON_SUPPORTED_OS ios) list(APPEND BUILTIN_SUPPORTED_OS ios) list(APPEND PROFILE_SUPPORTED_OS ios) endif() foreach(arch ${DARWIN_ios_ARCHS}) list(APPEND COMPILER_RT_SUPPORTED_ARCH ${arch}) set(CAN_TARGET_${arch} 1) endforeach() endif() endif() # for list_union include(CompilerRTUtils) list_union(BUILTIN_SUPPORTED_ARCH ALL_BUILTIN_SUPPORTED_ARCH toolchain_arches) list_union(SANITIZER_COMMON_SUPPORTED_ARCH ALL_SANITIZER_COMMON_SUPPORTED_ARCH COMPILER_RT_SUPPORTED_ARCH ) set(LSAN_COMMON_SUPPORTED_ARCH ${SANITIZER_COMMON_SUPPORTED_ARCH}) set(UBSAN_COMMON_SUPPORTED_ARCH ${SANITIZER_COMMON_SUPPORTED_ARCH}) list_union(ASAN_SUPPORTED_ARCH ALL_ASAN_SUPPORTED_ARCH SANITIZER_COMMON_SUPPORTED_ARCH) list_union(DFSAN_SUPPORTED_ARCH ALL_DFSAN_SUPPORTED_ARCH SANITIZER_COMMON_SUPPORTED_ARCH) list_union(LSAN_SUPPORTED_ARCH ALL_LSAN_SUPPORTED_ARCH SANITIZER_COMMON_SUPPORTED_ARCH) list_union(MSAN_SUPPORTED_ARCH ALL_MSAN_SUPPORTED_ARCH SANITIZER_COMMON_SUPPORTED_ARCH) list_union(PROFILE_SUPPORTED_ARCH ALL_PROFILE_SUPPORTED_ARCH SANITIZER_COMMON_SUPPORTED_ARCH) list_union(TSAN_SUPPORTED_ARCH ALL_TSAN_SUPPORTED_ARCH SANITIZER_COMMON_SUPPORTED_ARCH) list_union(UBSAN_SUPPORTED_ARCH ALL_UBSAN_SUPPORTED_ARCH SANITIZER_COMMON_SUPPORTED_ARCH) list_union(SAFESTACK_SUPPORTED_ARCH ALL_SAFESTACK_SUPPORTED_ARCH SANITIZER_COMMON_SUPPORTED_ARCH) list_union(CFI_SUPPORTED_ARCH ALL_CFI_SUPPORTED_ARCH SANITIZER_COMMON_SUPPORTED_ARCH) else() # Architectures supported by compiler-rt libraries. filter_available_targets(BUILTIN_SUPPORTED_ARCH ${ALL_BUILTIN_SUPPORTED_ARCH}) filter_available_targets(SANITIZER_COMMON_SUPPORTED_ARCH ${ALL_SANITIZER_COMMON_SUPPORTED_ARCH}) # LSan and UBSan common files should be available on all architectures # supported by other sanitizers (even if they build into dummy object files). filter_available_targets(LSAN_COMMON_SUPPORTED_ARCH ${SANITIZER_COMMON_SUPPORTED_ARCH}) filter_available_targets(UBSAN_COMMON_SUPPORTED_ARCH ${SANITIZER_COMMON_SUPPORTED_ARCH}) filter_available_targets(ASAN_SUPPORTED_ARCH ${ALL_ASAN_SUPPORTED_ARCH}) filter_available_targets(DFSAN_SUPPORTED_ARCH ${ALL_DFSAN_SUPPORTED_ARCH}) filter_available_targets(LSAN_SUPPORTED_ARCH ${ALL_LSAN_SUPPORTED_ARCH}) filter_available_targets(MSAN_SUPPORTED_ARCH ${ALL_MSAN_SUPPORTED_ARCH}) filter_available_targets(PROFILE_SUPPORTED_ARCH ${ALL_PROFILE_SUPPORTED_ARCH}) filter_available_targets(TSAN_SUPPORTED_ARCH ${ALL_TSAN_SUPPORTED_ARCH}) filter_available_targets(UBSAN_SUPPORTED_ARCH ${ALL_UBSAN_SUPPORTED_ARCH}) filter_available_targets(SAFESTACK_SUPPORTED_ARCH ${ALL_SAFESTACK_SUPPORTED_ARCH}) filter_available_targets(CFI_SUPPORTED_ARCH ${ALL_CFI_SUPPORTED_ARCH}) endif() message(STATUS "Compiler-RT supported architectures: ${COMPILER_RT_SUPPORTED_ARCH}") if(ANDROID) set(OS_NAME "Android") else() set(OS_NAME "${CMAKE_SYSTEM_NAME}") endif() if (SANITIZER_COMMON_SUPPORTED_ARCH AND NOT LLVM_USE_SANITIZER AND (OS_NAME MATCHES "Android|Darwin|Linux|FreeBSD" OR (OS_NAME MATCHES "Windows" AND MSVC))) set(COMPILER_RT_HAS_SANITIZER_COMMON TRUE) else() set(COMPILER_RT_HAS_SANITIZER_COMMON FALSE) endif() if (COMPILER_RT_HAS_SANITIZER_COMMON AND (NOT OS_NAME MATCHES "Windows" OR CMAKE_SIZEOF_VOID_P EQUAL 4)) set(COMPILER_RT_HAS_INTERCEPTION TRUE) else() set(COMPILER_RT_HAS_INTERCEPTION FALSE) endif() if (COMPILER_RT_HAS_SANITIZER_COMMON AND ASAN_SUPPORTED_ARCH AND (NOT OS_NAME MATCHES "Windows" OR CMAKE_SIZEOF_VOID_P EQUAL 4)) set(COMPILER_RT_HAS_ASAN TRUE) else() set(COMPILER_RT_HAS_ASAN FALSE) endif() if (OS_NAME MATCHES "Linux|FreeBSD|Windows") set(COMPILER_RT_ASAN_HAS_STATIC_RUNTIME TRUE) else() set(COMPILER_RT_ASAN_HAS_STATIC_RUNTIME FALSE) endif() # TODO: Add builtins support. if (COMPILER_RT_HAS_SANITIZER_COMMON AND DFSAN_SUPPORTED_ARCH AND OS_NAME MATCHES "Linux") set(COMPILER_RT_HAS_DFSAN TRUE) else() set(COMPILER_RT_HAS_DFSAN FALSE) endif() if (COMPILER_RT_HAS_SANITIZER_COMMON AND LSAN_SUPPORTED_ARCH AND OS_NAME MATCHES "Linux|FreeBSD") set(COMPILER_RT_HAS_LSAN TRUE) else() set(COMPILER_RT_HAS_LSAN FALSE) endif() if (COMPILER_RT_HAS_SANITIZER_COMMON AND MSAN_SUPPORTED_ARCH AND OS_NAME MATCHES "Linux") set(COMPILER_RT_HAS_MSAN TRUE) else() set(COMPILER_RT_HAS_MSAN FALSE) endif() if (PROFILE_SUPPORTED_ARCH AND OS_NAME MATCHES "Darwin|Linux|FreeBSD") set(COMPILER_RT_HAS_PROFILE TRUE) else() set(COMPILER_RT_HAS_PROFILE FALSE) endif() if (COMPILER_RT_HAS_SANITIZER_COMMON AND TSAN_SUPPORTED_ARCH AND OS_NAME MATCHES "Darwin|Linux|FreeBSD") set(COMPILER_RT_HAS_TSAN TRUE) else() set(COMPILER_RT_HAS_TSAN FALSE) endif() if (COMPILER_RT_HAS_SANITIZER_COMMON AND UBSAN_SUPPORTED_ARCH AND OS_NAME MATCHES "Darwin|Linux|FreeBSD|Windows") set(COMPILER_RT_HAS_UBSAN TRUE) else() set(COMPILER_RT_HAS_UBSAN FALSE) endif() if (COMPILER_RT_HAS_SANITIZER_COMMON AND SAFESTACK_SUPPORTED_ARCH AND OS_NAME MATCHES "Darwin|Linux|FreeBSD") set(COMPILER_RT_HAS_SAFESTACK TRUE) else() set(COMPILER_RT_HAS_SAFESTACK FALSE) endif() if (COMPILER_RT_HAS_SANITIZER_COMMON AND CFI_SUPPORTED_ARCH AND OS_NAME MATCHES "Linux") set(COMPILER_RT_HAS_CFI TRUE) else() set(COMPILER_RT_HAS_CFI FALSE) endif() ================================================ FILE: atlas-aapt/external/compiler-rt/include/CMakeLists.txt ================================================ set(SANITIZER_HEADERS sanitizer/allocator_interface.h sanitizer/asan_interface.h sanitizer/common_interface_defs.h sanitizer/coverage_interface.h sanitizer/dfsan_interface.h sanitizer/linux_syscall_hooks.h sanitizer/lsan_interface.h sanitizer/msan_interface.h sanitizer/tsan_interface_atomic.h) set(output_dir ${COMPILER_RT_OUTPUT_DIR}/include) # Copy compiler-rt headers to the build tree. set(out_files) foreach( f ${SANITIZER_HEADERS} ) set( src ${CMAKE_CURRENT_SOURCE_DIR}/${f} ) set( dst ${output_dir}/${f} ) add_custom_command(OUTPUT ${dst} DEPENDS ${src} COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst} COMMENT "Copying compiler-rt's ${f}...") list(APPEND out_files ${dst}) endforeach( f ) add_custom_target(compiler-rt-headers ALL DEPENDS ${out_files}) add_dependencies(compiler-rt compiler-rt-headers) # Install sanitizer headers. install(FILES ${SANITIZER_HEADERS} PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/sanitizer) ================================================ FILE: atlas-aapt/external/compiler-rt/include/sanitizer/allocator_interface.h ================================================ //===-- allocator_interface.h ---------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // Public interface header for allocator used in sanitizers (ASan/TSan/MSan). //===----------------------------------------------------------------------===// #ifndef SANITIZER_ALLOCATOR_INTERFACE_H #define SANITIZER_ALLOCATOR_INTERFACE_H #include #ifdef __cplusplus extern "C" { #endif /* Returns the estimated number of bytes that will be reserved by allocator for request of "size" bytes. If allocator can't allocate that much memory, returns the maximal possible allocation size, otherwise returns "size". */ size_t __sanitizer_get_estimated_allocated_size(size_t size); /* Returns true if p was returned by the allocator and is not yet freed. */ int __sanitizer_get_ownership(const volatile void *p); /* Returns the number of bytes reserved for the pointer p. Requires (get_ownership(p) == true) or (p == 0). */ size_t __sanitizer_get_allocated_size(const volatile void *p); /* Number of bytes, allocated and not yet freed by the application. */ size_t __sanitizer_get_current_allocated_bytes(); /* Number of bytes, mmaped by the allocator to fulfill allocation requests. Generally, for request of X bytes, allocator can reserve and add to free lists a large number of chunks of size X to use them for future requests. All these chunks count toward the heap size. Currently, allocator never releases memory to OS (instead, it just puts freed chunks to free lists). */ size_t __sanitizer_get_heap_size(); /* Number of bytes, mmaped by the allocator, which can be used to fulfill allocation requests. When a user program frees memory chunk, it can first fall into quarantine and will count toward __sanitizer_get_free_bytes() later. */ size_t __sanitizer_get_free_bytes(); /* Number of bytes in unmapped pages, that are released to OS. Currently, always returns 0. */ size_t __sanitizer_get_unmapped_bytes(); /* Malloc hooks that may be optionally provided by user. __sanitizer_malloc_hook(ptr, size) is called immediately after allocation of "size" bytes, which returned "ptr". __sanitizer_free_hook(ptr) is called immediately before deallocation of "ptr". */ void __sanitizer_malloc_hook(const volatile void *ptr, size_t size); void __sanitizer_free_hook(const volatile void *ptr); #ifdef __cplusplus } // extern "C" #endif #endif ================================================ FILE: atlas-aapt/external/compiler-rt/include/sanitizer/asan_interface.h ================================================ //===-- sanitizer/asan_interface.h ------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This file is a part of AddressSanitizer. // // Public interface header. //===----------------------------------------------------------------------===// #ifndef SANITIZER_ASAN_INTERFACE_H #define SANITIZER_ASAN_INTERFACE_H #include #ifdef __cplusplus extern "C" { #endif // Marks memory region [addr, addr+size) as unaddressable. // This memory must be previously allocated by the user program. Accessing // addresses in this region from instrumented code is forbidden until // this region is unpoisoned. This function is not guaranteed to poison // the whole region - it may poison only subregion of [addr, addr+size) due // to ASan alignment restrictions. // Method is NOT thread-safe in the sense that no two threads can // (un)poison memory in the same memory region simultaneously. void __asan_poison_memory_region(void const volatile *addr, size_t size); // Marks memory region [addr, addr+size) as addressable. // This memory must be previously allocated by the user program. Accessing // addresses in this region is allowed until this region is poisoned again. // This function may unpoison a superregion of [addr, addr+size) due to // ASan alignment restrictions. // Method is NOT thread-safe in the sense that no two threads can // (un)poison memory in the same memory region simultaneously. void __asan_unpoison_memory_region(void const volatile *addr, size_t size); // User code should use macros instead of functions. #if __has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__) #define ASAN_POISON_MEMORY_REGION(addr, size) \ __asan_poison_memory_region((addr), (size)) #define ASAN_UNPOISON_MEMORY_REGION(addr, size) \ __asan_unpoison_memory_region((addr), (size)) #else #define ASAN_POISON_MEMORY_REGION(addr, size) \ ((void)(addr), (void)(size)) #define ASAN_UNPOISON_MEMORY_REGION(addr, size) \ ((void)(addr), (void)(size)) #endif // Returns 1 if addr is poisoned (i.e. 1-byte read/write access to this // address will result in error report from AddressSanitizer). // Otherwise returns 0. int __asan_address_is_poisoned(void const volatile *addr); // If at least one byte in [beg, beg+size) is poisoned, return the address // of the first such byte. Otherwise return 0. void *__asan_region_is_poisoned(void *beg, size_t size); // Print the description of addr (useful when debugging in gdb). void __asan_describe_address(void *addr); // Useful for calling from a debugger to get information about an ASan error. // Returns 1 if an error has been (or is being) reported, otherwise returns 0. int __asan_report_present(); // Useful for calling from a debugger to get information about an ASan error. // If an error has been (or is being) reported, the following functions return // the pc, bp, sp, address, access type (0 = read, 1 = write), access size and // bug description (e.g. "heap-use-after-free"). Otherwise they return 0. void *__asan_get_report_pc(); void *__asan_get_report_bp(); void *__asan_get_report_sp(); void *__asan_get_report_address(); int __asan_get_report_access_type(); size_t __asan_get_report_access_size(); const char *__asan_get_report_description(); // Useful for calling from the debugger to get information about a pointer. // Returns the category of the given pointer as a constant string. // Possible return values are "global", "stack", "stack-fake", "heap", // "heap-invalid", "shadow-low", "shadow-gap", "shadow-high", "unknown". // If global or stack, tries to also return the variable name, address and // size. If heap, tries to return the chunk address and size. 'name' should // point to an allocated buffer of size 'name_size'. const char *__asan_locate_address(void *addr, char *name, size_t name_size, void **region_address, size_t *region_size); // Useful for calling from the debugger to get the allocation stack trace // and thread ID for a heap address. Stores up to 'size' frames into 'trace', // returns the number of stored frames or 0 on error. size_t __asan_get_alloc_stack(void *addr, void **trace, size_t size, int *thread_id); // Useful for calling from the debugger to get the free stack trace // and thread ID for a heap address. Stores up to 'size' frames into 'trace', // returns the number of stored frames or 0 on error. size_t __asan_get_free_stack(void *addr, void **trace, size_t size, int *thread_id); // Useful for calling from the debugger to get the current shadow memory // mapping. void __asan_get_shadow_mapping(size_t *shadow_scale, size_t *shadow_offset); // This is an internal function that is called to report an error. // However it is still a part of the interface because users may want to // set a breakpoint on this function in a debugger. void __asan_report_error(void *pc, void *bp, void *sp, void *addr, int is_write, size_t access_size); // Deprecated. Call __sanitizer_set_death_callback instead. void __asan_set_death_callback(void (*callback)(void)); void __asan_set_error_report_callback(void (*callback)(const char*)); // User may provide function that would be called right when ASan detects // an error. This can be used to notice cases when ASan detects an error, but // the program crashes before ASan report is printed. void __asan_on_error(); // Prints accumulated stats to stderr. Used for debugging. void __asan_print_accumulated_stats(); // This function may be optionally provided by user and should return // a string containing ASan runtime options. See asan_flags.h for details. const char* __asan_default_options(); // The following 2 functions facilitate garbage collection in presence of // asan's fake stack. // Returns an opaque handler to be used later in __asan_addr_is_in_fake_stack. // Returns NULL if the current thread does not have a fake stack. void *__asan_get_current_fake_stack(); // If fake_stack is non-NULL and addr belongs to a fake frame in // fake_stack, returns the address on real stack that corresponds to // the fake frame and sets beg/end to the boundaries of this fake frame. // Otherwise returns NULL and does not touch beg/end. // If beg/end are NULL, they are not touched. // This function may be called from a thread other than the owner of // fake_stack, but the owner thread need to be alive. void *__asan_addr_is_in_fake_stack(void *fake_stack, void *addr, void **beg, void **end); #ifdef __cplusplus } // extern "C" #endif #endif // SANITIZER_ASAN_INTERFACE_H ================================================ FILE: atlas-aapt/external/compiler-rt/include/sanitizer/common_interface_defs.h ================================================ //===-- sanitizer/common_interface_defs.h -----------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // Common part of the public sanitizer interface. //===----------------------------------------------------------------------===// #ifndef SANITIZER_COMMON_INTERFACE_DEFS_H #define SANITIZER_COMMON_INTERFACE_DEFS_H #include #include // GCC does not understand __has_feature. #if !defined(__has_feature) # define __has_feature(x) 0 #endif #ifdef __cplusplus extern "C" { #endif // Arguments for __sanitizer_sandbox_on_notify() below. typedef struct { // Enable sandbox support in sanitizer coverage. int coverage_sandboxed; // File descriptor to write coverage data to. If -1 is passed, a file will // be pre-opened by __sanitizer_sandobx_on_notify(). This field has no // effect if coverage_sandboxed == 0. intptr_t coverage_fd; // If non-zero, split the coverage data into well-formed blocks. This is // useful when coverage_fd is a socket descriptor. Each block will contain // a header, allowing data from multiple processes to be sent over the same // socket. unsigned int coverage_max_block_size; } __sanitizer_sandbox_arguments; // Tell the tools to write their reports to "path." instead of stderr. void __sanitizer_set_report_path(const char *path); // Notify the tools that the sandbox is going to be turned on. The reserved // parameter will be used in the future to hold a structure with functions // that the tools may call to bypass the sandbox. void __sanitizer_sandbox_on_notify(__sanitizer_sandbox_arguments *args); // This function is called by the tool when it has just finished reporting // an error. 'error_summary' is a one-line string that summarizes // the error message. This function can be overridden by the client. void __sanitizer_report_error_summary(const char *error_summary); // Some of the sanitizers (e.g. asan/tsan) may miss bugs that happen // in unaligned loads/stores. In order to find such bugs reliably one needs // to replace plain unaligned loads/stores with these calls. uint16_t __sanitizer_unaligned_load16(const void *p); uint32_t __sanitizer_unaligned_load32(const void *p); uint64_t __sanitizer_unaligned_load64(const void *p); void __sanitizer_unaligned_store16(void *p, uint16_t x); void __sanitizer_unaligned_store32(void *p, uint32_t x); void __sanitizer_unaligned_store64(void *p, uint64_t x); // Annotate the current state of a contiguous container, such as // std::vector, std::string or similar. // A contiguous container is a container that keeps all of its elements // in a contiguous region of memory. The container owns the region of memory // [beg, end); the memory [beg, mid) is used to store the current elements // and the memory [mid, end) is reserved for future elements; // beg <= mid <= end. For example, in "std::vector<> v" // beg = &v[0]; // end = beg + v.capacity() * sizeof(v[0]); // mid = beg + v.size() * sizeof(v[0]); // // This annotation tells the Sanitizer tool about the current state of the // container so that the tool can report errors when memory from [mid, end) // is accessed. Insert this annotation into methods like push_back/pop_back. // Supply the old and the new values of mid (old_mid/new_mid). // In the initial state mid == end and so should be the final // state when the container is destroyed or when it reallocates the storage. // // Use with caution and don't use for anything other than vector-like classes. // // For AddressSanitizer, 'beg' should be 8-aligned and 'end' should // be either 8-aligned or it should point to the end of a separate heap-, // stack-, or global- allocated buffer. I.e. the following will not work: // int64_t x[2]; // 16 bytes, 8-aligned. // char *beg = (char *)&x[0]; // char *end = beg + 12; // Not 8 aligned, not the end of the buffer. // This however will work fine: // int32_t x[3]; // 12 bytes, but 8-aligned under AddressSanitizer. // char *beg = (char*)&x[0]; // char *end = beg + 12; // Not 8-aligned, but is the end of the buffer. void __sanitizer_annotate_contiguous_container(const void *beg, const void *end, const void *old_mid, const void *new_mid); // Returns true if the contiguous container [beg, end) is properly poisoned // (e.g. with __sanitizer_annotate_contiguous_container), i.e. if // - [beg, mid) is addressable, // - [mid, end) is unaddressable. // Full verification requires O(end-beg) time; this function tries to avoid // such complexity by touching only parts of the container around beg/mid/end. int __sanitizer_verify_contiguous_container(const void *beg, const void *mid, const void *end); // Similar to __sanitizer_verify_contiguous_container but returns the address // of the first improperly poisoned byte otherwise. Returns null if the area // is poisoned properly. const void *__sanitizer_contiguous_container_find_bad_address( const void *beg, const void *mid, const void *end); // Print the stack trace leading to this call. Useful for debugging user code. void __sanitizer_print_stack_trace(); // Sets the callback to be called right before death on error. // Passing 0 will unset the callback. void __sanitizer_set_death_callback(void (*callback)(void)); // Interceptor hooks. // Whenever a libc function interceptor is called it checks if the // corresponding weak hook is defined, and it so -- calls it. // The primary use case is data-flow-guided fuzzing, where the fuzzer needs // to know what is being passed to libc functions, e.g. memcmp. // FIXME: implement more hooks. void __sanitizer_weak_hook_memcmp(void *called_pc, const void *s1, const void *s2, size_t n); void __sanitizer_weak_hook_strncmp(void *called_pc, const char *s1, const char *s2, size_t n); #ifdef __cplusplus } // extern "C" #endif #endif // SANITIZER_COMMON_INTERFACE_DEFS_H ================================================ FILE: atlas-aapt/external/compiler-rt/include/sanitizer/coverage_interface.h ================================================ //===-- sanitizer/coverage_interface.h --------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // Public interface for sanitizer coverage. //===----------------------------------------------------------------------===// #ifndef SANITIZER_COVERAG_INTERFACE_H #define SANITIZER_COVERAG_INTERFACE_H #include #ifdef __cplusplus extern "C" { #endif // Initialize coverage. void __sanitizer_cov_init(); // Record and dump coverage info. void __sanitizer_cov_dump(); // Open .sancov.packed in the coverage directory and return the file // descriptor. Returns -1 on failure, or if coverage dumping is disabled. // This is intended for use by sandboxing code. intptr_t __sanitizer_maybe_open_cov_file(const char *name); // Get the number of unique covered blocks (or edges). // This can be useful for coverage-directed in-process fuzzers. uintptr_t __sanitizer_get_total_unique_coverage(); // Get the number of unique indirect caller-callee pairs. uintptr_t __sanitizer_get_total_unique_caller_callee_pairs(); // Reset the basic-block (edge) coverage to the initial state. // Useful for in-process fuzzing to start collecting coverage from scratch. // Experimental, will likely not work for multi-threaded process. void __sanitizer_reset_coverage(); // Set *data to the array of covered PCs and return the size of that array. // Some of the entries in *data will be zero. uintptr_t __sanitizer_get_coverage_guards(uintptr_t **data); // The coverage instrumentation may optionally provide imprecise counters. // Rather than exposing the counter values to the user we instead map // the counters to a bitset. // Every counter is associated with 8 bits in the bitset. // We define 8 value ranges: 1, 2, 3, 4-7, 8-15, 16-31, 32-127, 128+ // The i-th bit is set to 1 if the counter value is in the i-th range. // This counter-based coverage implementation is *not* thread-safe. // Returns the number of registered coverage counters. uintptr_t __sanitizer_get_number_of_counters(); // Updates the counter 'bitset', clears the counters and returns the number of // new bits in 'bitset'. // If 'bitset' is nullptr, only clears the counters. // Otherwise 'bitset' should be at least // __sanitizer_get_number_of_counters bytes long and 8-aligned. uintptr_t __sanitizer_update_counter_bitset_and_clear_counters(uint8_t *bitset); #ifdef __cplusplus } // extern "C" #endif #endif // SANITIZER_COVERAG_INTERFACE_H ================================================ FILE: atlas-aapt/external/compiler-rt/include/sanitizer/dfsan_interface.h ================================================ //===-- dfsan_interface.h -------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This file is a part of DataFlowSanitizer. // // Public interface header. //===----------------------------------------------------------------------===// #ifndef DFSAN_INTERFACE_H #define DFSAN_INTERFACE_H #include #include #include #ifdef __cplusplus extern "C" { #endif typedef uint16_t dfsan_label; /// Stores information associated with a specific label identifier. A label /// may be a base label created using dfsan_create_label, with associated /// text description and user data, or an automatically created union label, /// which represents the union of two label identifiers (which may themselves /// be base or union labels). struct dfsan_label_info { // Fields for union labels, set to 0 for base labels. dfsan_label l1; dfsan_label l2; // Fields for base labels. const char *desc; void *userdata; }; /// Signature of the callback argument to dfsan_set_write_callback(). typedef void (*dfsan_write_callback_t)(int fd, const void *buf, size_t count); /// Computes the union of \c l1 and \c l2, possibly creating a union label in /// the process. dfsan_label dfsan_union(dfsan_label l1, dfsan_label l2); /// Creates and returns a base label with the given description and user data. dfsan_label dfsan_create_label(const char *desc, void *userdata); /// Sets the label for each address in [addr,addr+size) to \c label. void dfsan_set_label(dfsan_label label, void *addr, size_t size); /// Sets the label for each address in [addr,addr+size) to the union of the /// current label for that address and \c label. void dfsan_add_label(dfsan_label label, void *addr, size_t size); /// Retrieves the label associated with the given data. /// /// The type of 'data' is arbitrary. The function accepts a value of any type, /// which can be truncated or extended (implicitly or explicitly) as necessary. /// The truncation/extension operations will preserve the label of the original /// value. dfsan_label dfsan_get_label(long data); /// Retrieves the label associated with the data at the given address. dfsan_label dfsan_read_label(const void *addr, size_t size); /// Retrieves a pointer to the dfsan_label_info struct for the given label. const struct dfsan_label_info *dfsan_get_label_info(dfsan_label label); /// Returns whether the given label label contains the label elem. int dfsan_has_label(dfsan_label label, dfsan_label elem); /// If the given label label contains a label with the description desc, returns /// that label, else returns 0. dfsan_label dfsan_has_label_with_desc(dfsan_label label, const char *desc); /// Returns the number of labels allocated. size_t dfsan_get_label_count(void); /// Sets a callback to be invoked on calls to write(). The callback is invoked /// before the write is done. The write is not guaranteed to succeed when the /// callback executes. Pass in NULL to remove any callback. void dfsan_set_write_callback(dfsan_write_callback_t labeled_write_callback); /// Writes the labels currently used by the program to the given file /// descriptor. The lines of the output have the following format: /// ///