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",
150 def DirentAPI : PublicAPI<"dirent.h"> {
158 def UniStdAPI : PublicAPI<"unistd.h"> {
159 let Types = ["__exec_argv_t", "__exec_envp_t", "off_t", "pid_t", "size_t",
160 "ssize_t", "uid_t", "__getoptargv_t"];
163 def WCharAPI : PublicAPI<"wchar.h"> {
171 def UCharAPI : PublicAPI<"uchar.h"> {
180 def SysRandomAPI : PublicAPI<"sys/random.h"> {
181 let Types = ["size_t", "ssize_t"];
184 def SysSelectAPI : PublicAPI<"sys/select.h"> {
185 let Types = ["fd_set", "sigset_t", "suseconds_t", "time_t", "struct timespec",
189 def SysSocketAPI : PublicAPI<"sys/socket.h"> {
194 "struct sockaddr_un",
198 def SysResourceAPI : PublicAPI<"sys/resource.h"> {
199 let Types = ["rlim_t", "struct rlimit"];
202 def SysStatAPI : PublicAPI<"sys/stat.h"> {
203 let Types = ["mode_t", "dev_t", "ino_t", "nlink_t", "uid_t", "gid_t", "off_t",
204 "struct timespec", "struct timeval", "blksize_t", "blkcnt_t",
208 def SysWaitAPI : PublicAPI<"sys/wait.h"> {
209 let Types = ["pid_t", "struct rusage", "siginfo_t"];
212 def SysSendfileAPI : PublicAPI<"sys/sendfile.h"> {
213 let Types = ["off_t", "size_t", "ssize_t"];
216 def SysTypesAPI : PublicAPI<"sys/types.h"> {
229 "pthread_condattr_t",
232 "pthread_mutexattr_t",
234 "pthread_rwlockattr_t",
245 def SysUtsNameAPI : PublicAPI<"sys/utsname.h"> {
246 let Types = ["struct utsname"];
249 def SysEpollAPI : PublicAPI<"sys/epoll.h"> {
250 let Types = ["struct epoll_event", "struct epoll_data", "sigset_t", "struct timespec"];
253 def SpawnAPI : PublicAPI<"spawn.h"> {
254 let Types = ["mode_t", "pid_t", "posix_spawnattr_t", "posix_spawn_file_actions_t"];
257 def TermiosAPI : PublicAPI<"termios.h"> {
258 let Types = ["cc_t", "pid_t", "speed_t", "struct termios", "tcflag_t"];
261 def SetJmpAPI : PublicAPI<"setjmp.h"> {
262 let Types = ["jmp_buf"];
265 def SearchAPI : PublicAPI<"search.h"> {
266 let Types = ["ACTION", "ENTRY", "struct hsearch_data"];
269 def SysStatvfsAPI : PublicAPI<"sys/statvfs.h"> {
270 let Types = ["struct statvfs"];