1 include "config/public_api.td"
4 include "spec/posix.td"
5 include "spec/linux.td"
6 include "spec/gnu_ext.td"
7 include "spec/bsd_ext.td"
8 include "spec/stdc_ext.td"
9 include "spec/llvm_libc_ext.td"
10 include "spec/llvm_libc_stdfix_ext.td"
12 def CTypeAPI : PublicAPI<"ctype.h"> {
15 def FCntlAPI : PublicAPI<"fcntl.h"> {
22 def IntTypesAPI : PublicAPI<"inttypes.h"> {
23 let Types = ["imaxdiv_t"];
26 def MathAPI : PublicAPI<"math.h"> {
27 let Types = ["double_t", "float_t", "float128"];
30 def FenvAPI: PublicAPI<"fenv.h"> {
31 let Types = ["fenv_t", "fexcept_t"];
34 def StringAPI : PublicAPI<"string.h"> {
35 let Types = ["size_t"];
38 def StdIOAPI : PublicAPI<"stdio.h"> {
40 SimpleMacroDef<"stderr", "stderr">,
41 SimpleMacroDef<"stdin", "stdin">,
42 SimpleMacroDef<"stdout", "stdout">,
46 "cookie_io_functions_t",
52 def StdlibAPI : PublicAPI<"stdlib.h"> {
65 def TimeAPI : PublicAPI<"time.h"> {
76 def SchedAPI : PublicAPI<"sched.h"> {
82 // Needed according to posix standard
88 def SysMManAPI : PublicAPI<"sys/mman.h"> {
89 let Types = ["off_t", "size_t", "mode_t"];
92 def SignalAPI : PublicAPI<"signal.h"> {
104 def ThreadsAPI : PublicAPI<"threads.h"> {
106 SimpleMacroDef<"ONCE_FLAG_INIT", "{0}">,
110 "__call_once_func_t",
132 def PThreadAPI : PublicAPI<"pthread.h"> {
134 "__atfork_callback_t",
135 "__pthread_once_func_t",
137 "__pthread_tss_dtor_t",
139 "pthread_condattr_t",
142 "pthread_mutexattr_t",
144 "pthread_rwlockattr_t",
146 "pthread_spinlock_t",
151 def DirentAPI : PublicAPI<"dirent.h"> {
159 def UniStdAPI : PublicAPI<"unistd.h"> {
160 let Types = ["__exec_argv_t", "__exec_envp_t", "off_t", "pid_t", "size_t",
161 "ssize_t", "uid_t", "__getoptargv_t"];
164 def WCharAPI : PublicAPI<"wchar.h"> {
172 def UCharAPI : PublicAPI<"uchar.h"> {
181 def SysRandomAPI : PublicAPI<"sys/random.h"> {
182 let Types = ["size_t", "ssize_t"];
185 def SysSelectAPI : PublicAPI<"sys/select.h"> {
186 let Types = ["fd_set", "sigset_t", "suseconds_t", "time_t", "struct timespec",
190 def SysSocketAPI : PublicAPI<"sys/socket.h"> {
195 "struct sockaddr_un",
203 def SysResourceAPI : PublicAPI<"sys/resource.h"> {
204 let Types = ["rlim_t", "struct rlimit"];
207 def SysStatAPI : PublicAPI<"sys/stat.h"> {
208 let Types = ["mode_t", "dev_t", "ino_t", "nlink_t", "uid_t", "gid_t", "off_t",
209 "struct timespec", "struct timeval", "blksize_t", "blkcnt_t",
213 def SysWaitAPI : PublicAPI<"sys/wait.h"> {
214 let Types = ["pid_t", "struct rusage", "siginfo_t"];
217 def SysSendfileAPI : PublicAPI<"sys/sendfile.h"> {
218 let Types = ["off_t", "size_t", "ssize_t"];
221 def SysTypesAPI : PublicAPI<"sys/types.h"> {
234 "pthread_condattr_t",
237 "pthread_mutexattr_t",
239 "pthread_rwlockattr_t",
250 def SysUtsNameAPI : PublicAPI<"sys/utsname.h"> {
251 let Types = ["struct utsname"];
254 def SysEpollAPI : PublicAPI<"sys/epoll.h"> {
255 let Types = ["struct epoll_event", "struct epoll_data", "sigset_t", "struct timespec"];
258 def SpawnAPI : PublicAPI<"spawn.h"> {
259 let Types = ["mode_t", "pid_t", "posix_spawnattr_t", "posix_spawn_file_actions_t"];
262 def TermiosAPI : PublicAPI<"termios.h"> {
263 let Types = ["cc_t", "pid_t", "speed_t", "struct termios", "tcflag_t"];
266 def SetJmpAPI : PublicAPI<"setjmp.h"> {
267 let Types = ["jmp_buf"];
270 def SearchAPI : PublicAPI<"search.h"> {
271 let Types = ["ACTION", "ENTRY", "struct hsearch_data", "__lsearchcompare_t"];
274 def SysStatvfsAPI : PublicAPI<"sys/statvfs.h"> {
275 let Types = ["struct statvfs"];