| module Libc [system] { |
| link "c" |
| config_macros _ALL_SOURCE,_BSD_SOURCE,_GNU_SOURCE,_KERNEL,_POSIX_C_SOURCE,_POSIX_SOURCE,_XOPEN_SOURCE |
| |
| module C [extern_c] { |
| textual header "assert.h" // POSIX/C89 |
| |
| module alloca { // POSIX |
| header "alloca.h" |
| export * |
| } |
| module byteswap { // GNU extension |
| header "byteswap.h" |
| export * |
| } |
| module complex { // C99 |
| header "complex.h" |
| export * |
| } |
| module ctype { // C89 |
| header "ctype.h" |
| export * |
| } |
| module err { // BSD extension |
| header "err.h" |
| export * |
| } |
| module errno { // POSIX/C89 |
| header "errno.h" |
| export * |
| } |
| module features { // POSIX? |
| textual header "features.h" |
| export * |
| } |
| module fenv { // C99 |
| header "fenv.h" |
| export * |
| } |
| module float { // C/POSIX |
| header "float.h" |
| export * |
| } |
| module inttypes { // C99 |
| header "inttypes.h" |
| export * |
| } |
| module iso646 { // C95 |
| header "iso646.h" |
| export * |
| } |
| module limits { // C99 |
| header "limits.h" |
| export * |
| } |
| module locale { // C90? |
| header "locale.h" |
| export * |
| } |
| module malloc { // C89 |
| header "malloc.h" |
| export * |
| } |
| module math { // C89 |
| header "math.h" |
| export * |
| } |
| module memory { // Legacy header |
| export string |
| } |
| module setjmp { // C89/POSIX |
| header "setjmp.h" |
| export * |
| } |
| module signal { // C89/POSIX |
| header "signal.h" |
| export * |
| } |
| // defined in clang |
| // module stdatomic { // C11 |
| // header "stdatomic.h" |
| // export * |
| // } |
| module stdalign { // C11 |
| header "stdalign.h" |
| export * |
| } |
| module stdarg { // C89 |
| header "stdarg.h" |
| export * |
| } |
| module stdbool { // C99 |
| header "stdbool.h" |
| export * |
| } |
| module stdint { // C99 |
| header "stdint.h" // This might be deleted in favor of clang provided version |
| export * |
| } |
| module stdio { // C89 |
| header "stdio.h" |
| export * |
| } |
| module stdlib { // C89 |
| header "stddef.h" |
| header "stdlib.h" |
| export malloc // HACK: Our stdlib re-defines some other functions from other headers |
| export * |
| } |
| module stdnoreturn { // C11 |
| header "stdnoreturn.h" |
| export * |
| } |
| module string { // C89 |
| header "string.h" |
| export * |
| } |
| module threads { // C11 |
| header "threads.h" |
| export * |
| } |
| module time { |
| header "time.h" |
| export * |
| } |
| module uchar { // C11 |
| header "uchar.h" |
| export * |
| } |
| module wchar { // C89 |
| header "wchar.h" |
| export * |
| } |
| module wctype { // C89 |
| header "wctype.h" |
| export * |
| } |
| export * |
| } |
| module POSIX [extern_c] { |
| module ar { // GNU? |
| header "ar.h" |
| export * |
| } |
| module cpio { // POSIX? |
| header "cpio.h" |
| export * |
| } |
| module dirent { // POSIX |
| header "dirent.h" |
| export * |
| } |
| module dlfcn { // POSIX |
| header "dlfcn.h" |
| export * |
| } |
| module elf { // BSD/Linux |
| header "elf.h" |
| export * |
| } |
| module endian { // POSIX |
| header "endian.h" |
| export * |
| } |
| module fcntl { // POSIX |
| header "fcntl.h" |
| export * |
| } |
| module fmtmsg { // POSIX |
| header "fmtmsg.h" |
| export * |
| } |
| module fnmatch { // POSIX |
| header "fnmatch.h" |
| export * |
| } |
| module getopt { // POSIX |
| header "getopt.h" |
| export * |
| } |
| module glob { // POSIX |
| header "glob.h" |
| export * |
| } |
| module iconv { // POSIX |
| header "iconv.h" |
| export * |
| } |
| module ifaddrs { // POSIX |
| header "ifaddrs.h" |
| export * |
| } |
| module langinfo { // POSIX |
| header "langinfo.h" |
| export * |
| } |
| module libgen { // POSIX |
| header "libgen.h" |
| export * |
| } |
| module "link" { // POSIX (quoted because `link` is a reserved keyword) |
| header "link.h" |
| export * |
| } |
| module monetary { // POSIX |
| header "monetary.h" |
| export * |
| } |
| module netdb { // POSIX |
| header "netdb.h" |
| export * |
| } |
| module nl_types { // POSIX |
| header "nl_types.h" // Unimplemented in Fuchsia |
| export * |
| } |
| module poll { // POSIX |
| header "poll.h" |
| export * |
| } |
| module pthread { // POSIX |
| header "pthread.h" |
| export * |
| } |
| module regex { // POSIX |
| header "regex.h" |
| export * |
| } |
| module resolv { // POSIX |
| header "resolv.h" |
| export * |
| } |
| module sched { // POSIX |
| header "sched.h" |
| export Libc.C.string // HACK: redefines some functions from string.h with _GNU_SOURCE |
| export * |
| } |
| module search { // POSIX |
| header "search.h" |
| export * |
| } |
| module semaphore { // POSIX |
| header "semaphore.h" // sem_open is unimplemented on Fuchisa |
| export * |
| } |
| module strings { // POSIX |
| header "strings.h" |
| export * |
| } |
| module stropts { // POSIX |
| header "stropts.h" |
| export * |
| } |
| module sysexits { // POSIX |
| header "sysexits.h" |
| export * |
| } |
| module tar { // POSIX |
| header "tar.h" |
| export * |
| } |
| module unistd { // POSIX |
| header "unistd.h" |
| export * |
| export C.stdio // HACK: both stdio and unistd define ssize_t (depending on _GNU_SOURCE) |
| } |
| module utime { // POSIX |
| header "utime.h" |
| export * |
| } |
| module values { |
| header "values.h" |
| export * |
| } |
| module wait { // Legacy |
| export sys.wait |
| } |
| module wordexp { // POSIX |
| header "wordexp.h" |
| export * |
| } |
| |
| // Folders |
| module arpa { |
| module ftp { |
| header "arpa/ftp.h" |
| export * |
| } |
| module inet { |
| header "arpa/inet.h" |
| export * |
| } |
| module nameser { |
| header "arpa/nameser.h" |
| export * |
| } |
| module nameser_compat { |
| header "arpa/nameser_compat.h" |
| export * |
| } |
| module telnet { |
| header "arpa/telnet.h" |
| export * |
| } |
| module tftp { |
| header "arpa/tftp.h" |
| export * |
| } |
| export * |
| } |
| module net { |
| module ethernet { |
| header "net/ethernet.h" |
| export * |
| } |
| module if_arp { |
| header "net/if_arp.h" |
| export * |
| } |
| module if { |
| header "net/if.h" |
| export * |
| } |
| module route { |
| header "net/if.h" |
| export * |
| } |
| export * |
| } |
| module netinet { |
| module ether { |
| header "netinet/ether.h" |
| export * |
| } |
| module icmp6 { |
| header "netinet/icmp6.h" |
| export * |
| } |
| module if_ether { |
| header "netinet/if_ether.h" |
| export * |
| } |
| module igmp { |
| header "netinet/igmp.h" |
| export * |
| } |
| module in { |
| header "netinet/in.h" |
| export * |
| } |
| module in_systm { |
| header "netinet/in_systm.h" |
| export * |
| } |
| module ip { |
| header "netinet/ip.h" |
| export * |
| } |
| module ip6 { |
| header "netinet/ip6.h" |
| export * |
| } |
| module ip_icmp { |
| header "netinet/ip_icmp.h" |
| export * |
| } |
| module tcp { |
| header "netinet/tcp.h" |
| export * |
| } |
| module udp { |
| header "netinet/udp.h" |
| export * |
| } |
| export * |
| } |
| module netpacket { |
| module packet { |
| header "netpacket/packet.h" |
| export * |
| } |
| export * |
| } |
| module sys { // TODO(zbowling): this incomplete |
| module file { |
| header "sys/file.h" |
| export * |
| } |
| module ioctl { |
| header "sys/ioctl.h" |
| export * |
| } |
| module ipc { |
| header "sys/ipc.h" |
| export * |
| } |
| module mman { |
| header "sys/mman.h" |
| export * |
| } |
| module msg { |
| header "sys/msg.h" |
| export * |
| } |
| module select { |
| header "sys/select.h" |
| export * |
| } |
| module socket { |
| header "sys/socket.h" |
| export * |
| } |
| module sem { |
| header "sys/sem.h" |
| export * |
| } |
| module sendfile { |
| header "sys/sendfile.h" |
| export * |
| } |
| module shm { |
| header "sys/shm.h" |
| export * |
| } |
| module stat { |
| header "sys/stat.h" |
| export * |
| } |
| module statfs { |
| header "sys/statfs.h" |
| export * |
| } |
| module statvfs { |
| header "sys/statvfs.h" |
| export * |
| } |
| module time { |
| header "sys/time.h" |
| export * |
| } |
| module times { |
| header "sys/times.h" |
| export * |
| } |
| module types { |
| header "sys/types.h" |
| export * |
| } |
| module uio { |
| header "sys/uio.h" |
| export * |
| } |
| module un { |
| header "sys/un.h" |
| export * |
| } |
| module utsname { |
| header "sys/utsname.h" |
| export * |
| } |
| module wait { |
| header "sys/wait.h" |
| export * |
| } |
| export * |
| } |
| export * |
| } |
| export * |
| } |
| |
| // Headers that exist that are part of POSIX, C, or GNU that are not functional on Fuchsia |
| module NonLibc [extern_c] { |
| use Libc |
| |
| module crypt { // POSIX |
| header "crypt.h" |
| export * |
| } |
| module ftw { // POSIX |
| header "ftw.h" |
| export * |
| } |
| module grp { // POSIX |
| header "grp.h" // Non-functional in Fuchsia |
| export * |
| } |
| module mntent { // Unimplemented - common header |
| header "mntent.h" // Unimplemented in Fuchsia |
| export * |
| } |
| module paths { // GNU extension |
| header "paths.h" // Defines paths are not correct for Fuchsia |
| export * |
| } |
| module pty { // BSD defined (also GLIBC). |
| header "pty.h" // Non-functional on Fuchsia |
| export * |
| } |
| module pwd { // POSIX |
| header "pwd.h" // Non-functional in Fuchsia |
| export * |
| } |
| module shadown { // POSIX |
| header "shadow.h" |
| export * |
| } |
| module spawn { // POSIX |
| header "spawn.h" // Process management - use launchpad instead |
| export * |
| } |
| module syslog { // POSIX |
| header "syslog.h" |
| export * |
| } |
| module termios { // POSIX |
| header "termios.h" |
| export * |
| } |
| module ucontext { // POSIX |
| header "ucontext.h" |
| export * |
| } |
| export * |
| } |