├── data ├── .gitignore ├── project.conf └── DeforaOS-libc.pc.in ├── src ├── regex │ ├── .gitignore │ ├── pcre │ │ ├── project.conf │ │ └── AUTHORS │ ├── libpcre.pc.in │ └── project.conf ├── math │ ├── i386 │ │ └── project.conf │ ├── amd64 │ │ └── project.conf │ ├── project.conf │ ├── arch.S │ └── arch.h ├── kernel │ ├── darwin │ │ ├── amd64 │ │ │ └── project.conf │ │ └── project.conf │ ├── deforaos │ │ ├── amd64 │ │ │ └── project.conf │ │ ├── i386 │ │ │ └── project.conf │ │ ├── project.conf │ │ └── common.h │ ├── freebsd │ │ ├── i386 │ │ │ └── project.conf │ │ ├── project.conf │ │ └── amd64 │ │ │ ├── project.conf │ │ │ ├── crti.S │ │ │ └── crtn.S │ ├── linux │ │ ├── arm │ │ │ └── project.conf │ │ ├── sparc │ │ │ └── project.conf │ │ ├── amd64 │ │ │ ├── project.conf │ │ │ ├── crtn.S │ │ │ └── crti.S │ │ ├── i386 │ │ │ ├── project.conf │ │ │ ├── crtn.S │ │ │ └── crti.S │ │ ├── project.conf │ │ └── common.S │ ├── netbsd │ │ ├── arm │ │ │ └── project.conf │ │ ├── sparc │ │ │ └── project.conf │ │ ├── sparc64 │ │ │ └── project.conf │ │ ├── amd64 │ │ │ ├── project.conf │ │ │ ├── crtn.S │ │ │ └── crti.S │ │ ├── i386 │ │ │ ├── project.conf │ │ │ ├── crtn.S │ │ │ └── crti.S │ │ ├── project.conf │ │ └── start.S │ ├── openbsd │ │ ├── arm │ │ │ └── project.conf │ │ ├── i386 │ │ │ └── project.conf │ │ ├── project.conf │ │ └── start.S │ ├── whitix │ │ ├── i386 │ │ │ └── project.conf │ │ └── project.conf │ ├── solaris │ │ ├── project.conf │ │ └── sparc │ │ │ ├── project.conf │ │ │ └── syscalls.S │ └── project.conf ├── rt │ ├── kernel │ │ └── netbsd │ │ │ ├── amd64 │ │ │ └── project.conf │ │ │ └── project.conf │ ├── project.conf │ └── syscalls.h ├── socket │ ├── kernel │ │ ├── darwin │ │ │ ├── amd64 │ │ │ │ └── project.conf │ │ │ └── project.conf │ │ ├── freebsd │ │ │ ├── amd64 │ │ │ │ └── project.conf │ │ │ ├── i386 │ │ │ │ └── project.conf │ │ │ └── project.conf │ │ ├── linux │ │ │ ├── amd64 │ │ │ │ └── project.conf │ │ │ ├── arm │ │ │ │ └── project.conf │ │ │ ├── i386 │ │ │ │ └── project.conf │ │ │ └── project.conf │ │ ├── netbsd │ │ │ ├── amd64 │ │ │ │ └── project.conf │ │ │ ├── arm │ │ │ │ └── project.conf │ │ │ ├── i386 │ │ │ │ ├── project.conf │ │ │ │ └── syscalls.S │ │ │ ├── sparc │ │ │ │ ├── project.conf │ │ │ │ └── syscalls.S │ │ │ └── project.conf │ │ └── openbsd │ │ │ ├── arm │ │ │ ├── project.conf │ │ │ └── syscalls.S │ │ │ ├── i386 │ │ │ ├── project.conf │ │ │ └── syscalls.S │ │ │ └── project.conf │ └── project.conf ├── ssp │ ├── project.conf │ └── ssp.c ├── pthread │ └── project.conf ├── dl │ └── project.conf ├── chacha │ └── ecrypt-machine.h ├── setjmp.c ├── float.c ├── errno.c ├── langinfo.c ├── start.h ├── ssp.h ├── sys │ ├── ipc.c │ ├── reboot.c │ └── ioctl.c ├── stropts.c ├── poll.c └── dlfcn.h ├── include ├── math │ └── project.conf ├── rt │ └── project.conf ├── dl │ └── project.conf ├── pthread │ └── project.conf ├── socket │ ├── compat │ │ ├── project.conf │ │ ├── sys │ │ │ ├── project.conf │ │ │ └── un.h │ │ └── netinet │ │ │ └── project.conf │ ├── kernel │ │ ├── darwin │ │ │ ├── project.conf │ │ │ ├── netinet │ │ │ │ └── project.conf │ │ │ └── sys │ │ │ │ └── project.conf │ │ ├── linux │ │ │ ├── project.conf │ │ │ ├── sys │ │ │ │ └── project.conf │ │ │ └── netinet │ │ │ │ ├── project.conf │ │ │ │ └── tcp.h │ │ ├── netbsd │ │ │ ├── project.conf │ │ │ ├── sys │ │ │ │ └── project.conf │ │ │ └── netinet │ │ │ │ ├── project.conf │ │ │ │ └── tcp.h │ │ ├── freebsd │ │ │ ├── project.conf │ │ │ ├── sys │ │ │ │ └── project.conf │ │ │ └── netinet │ │ │ │ ├── project.conf │ │ │ │ └── tcp.h │ │ └── openbsd │ │ │ ├── project.conf │ │ │ ├── netinet │ │ │ └── project.conf │ │ │ └── sys │ │ │ └── project.conf │ ├── arpa │ │ └── project.conf │ ├── project.conf │ ├── sys │ │ ├── project.conf │ │ └── un.h │ └── netinet │ │ └── project.conf ├── net │ └── project.conf ├── compat │ ├── net │ │ ├── project.conf │ │ └── if.h │ ├── project.conf │ ├── sys │ │ ├── project.conf │ │ ├── param.h │ │ ├── vt.h │ │ └── ioctl.h │ ├── time.h │ ├── ucontext.h │ ├── poll.h │ └── stropts.h ├── kernel │ ├── linux │ │ ├── net │ │ │ └── project.conf │ │ ├── project.conf │ │ ├── sys │ │ │ ├── project.conf │ │ │ ├── ioctl.h │ │ │ ├── reboot.h │ │ │ └── ptrace.h │ │ ├── limits.h │ │ └── stdio.h │ ├── netbsd │ │ ├── net │ │ │ └── project.conf │ │ ├── project.conf │ │ ├── sys │ │ │ ├── project.conf │ │ │ ├── param.h │ │ │ ├── reboot.h │ │ │ └── ptrace.h │ │ ├── stropts.h │ │ ├── limits.h │ │ └── time.h │ ├── whitix │ │ ├── project.conf │ │ └── limits.h │ ├── solaris │ │ ├── project.conf │ │ └── sys │ │ │ ├── project.conf │ │ │ ├── time.h │ │ │ └── select.h │ ├── deforaos │ │ ├── sys │ │ │ ├── project.conf │ │ │ └── syscall.h │ │ ├── project.conf │ │ └── limits.h │ ├── freebsd │ │ ├── project.conf │ │ ├── sys │ │ │ ├── project.conf │ │ │ └── ptrace.h │ │ └── limits.h │ ├── darwin │ │ ├── project.conf │ │ ├── sys │ │ │ ├── project.conf │ │ │ └── ptrace.h │ │ └── limits.h │ └── openbsd │ │ ├── project.conf │ │ ├── sys │ │ ├── project.conf │ │ ├── ptrace.h │ │ ├── reboot.h │ │ ├── time.h │ │ └── select.h │ │ └── limits.h ├── project.conf ├── sys │ ├── project.conf │ ├── vt.h │ ├── param.h │ ├── syscall.h │ ├── reboot.h │ ├── ioctl.h │ └── ptrace.h ├── wctype.h ├── nl_types.h ├── semaphore.h ├── errno.h ├── libgen.h ├── stropts.h ├── complex.h ├── stdbool.h └── glob.h ├── tools ├── .gitignore ├── deforaos-gcc.specs.in ├── deforaos-gcc.in ├── project.conf ├── tracer-syscalls.h └── tracer-analyze.h ├── doc ├── gtkdoc │ ├── .gitignore │ ├── project.conf │ └── xml │ │ └── gtkdocentities.ent └── project.conf ├── .gitignore ├── TODO ├── tests └── .gitignore ├── project.conf ├── .github └── workflows │ └── deforaos-c-ci_ubuntu-latest.yml └── COPYING /data/.gitignore: -------------------------------------------------------------------------------- 1 | /DeforaOS-libc.pc 2 | -------------------------------------------------------------------------------- /src/regex/.gitignore: -------------------------------------------------------------------------------- 1 | /libpcre.pc 2 | -------------------------------------------------------------------------------- /src/math/i386/project.conf: -------------------------------------------------------------------------------- 1 | dist=Makefile,math.h,math.S 2 | -------------------------------------------------------------------------------- /include/math/project.conf: -------------------------------------------------------------------------------- 1 | includes=math.h 2 | dist=Makefile 3 | -------------------------------------------------------------------------------- /include/rt/project.conf: -------------------------------------------------------------------------------- 1 | dist=Makefile 2 | includes=sched.h 3 | -------------------------------------------------------------------------------- /src/math/amd64/project.conf: -------------------------------------------------------------------------------- 1 | dist=Makefile,math.h,math.S 2 | -------------------------------------------------------------------------------- /include/dl/project.conf: -------------------------------------------------------------------------------- 1 | includes=dlfcn.h,elf.h 2 | dist=Makefile 3 | -------------------------------------------------------------------------------- /src/kernel/darwin/amd64/project.conf: -------------------------------------------------------------------------------- 1 | dist=Makefile,syscalls.S 2 | -------------------------------------------------------------------------------- /src/kernel/darwin/project.conf: -------------------------------------------------------------------------------- 1 | subdirs=amd64 2 | dist=Makefile 3 | -------------------------------------------------------------------------------- /src/kernel/deforaos/amd64/project.conf: -------------------------------------------------------------------------------- 1 | dist=Makefile,syscalls.S 2 | -------------------------------------------------------------------------------- /src/kernel/deforaos/i386/project.conf: -------------------------------------------------------------------------------- 1 | dist=Makefile,syscalls.S 2 | -------------------------------------------------------------------------------- /src/rt/kernel/netbsd/amd64/project.conf: -------------------------------------------------------------------------------- 1 | dist=Makefile,syscalls.S 2 | -------------------------------------------------------------------------------- /include/pthread/project.conf: -------------------------------------------------------------------------------- 1 | includes=pthread.h 2 | dist=Makefile 3 | -------------------------------------------------------------------------------- /src/kernel/deforaos/project.conf: -------------------------------------------------------------------------------- 1 | subdirs=amd64,i386 2 | dist=Makefile 3 | -------------------------------------------------------------------------------- /src/kernel/freebsd/i386/project.conf: -------------------------------------------------------------------------------- 1 | dist=Makefile,start.S,syscalls.S 2 | -------------------------------------------------------------------------------- /src/kernel/freebsd/project.conf: -------------------------------------------------------------------------------- 1 | subdirs=amd64,i386 2 | dist=Makefile 3 | -------------------------------------------------------------------------------- /src/kernel/linux/arm/project.conf: -------------------------------------------------------------------------------- 1 | dist=Makefile,start.S,syscalls.S 2 | -------------------------------------------------------------------------------- /src/kernel/linux/sparc/project.conf: -------------------------------------------------------------------------------- 1 | dist=Makefile,start.S,syscalls.S 2 | -------------------------------------------------------------------------------- /src/kernel/netbsd/arm/project.conf: -------------------------------------------------------------------------------- 1 | dist=Makefile,start.S,syscalls.S 2 | -------------------------------------------------------------------------------- /src/kernel/netbsd/sparc/project.conf: -------------------------------------------------------------------------------- 1 | dist=Makefile,start.S,syscalls.S 2 | -------------------------------------------------------------------------------- /src/kernel/openbsd/arm/project.conf: -------------------------------------------------------------------------------- 1 | dist=Makefile,start.S,syscalls.S 2 | -------------------------------------------------------------------------------- /src/kernel/openbsd/i386/project.conf: -------------------------------------------------------------------------------- 1 | dist=Makefile,start.S,syscalls.S 2 | -------------------------------------------------------------------------------- /src/kernel/whitix/i386/project.conf: -------------------------------------------------------------------------------- 1 | dist=Makefile,start.S,syscalls.S 2 | -------------------------------------------------------------------------------- /src/socket/kernel/darwin/amd64/project.conf: -------------------------------------------------------------------------------- 1 | dist=Makefile,syscalls.S 2 | -------------------------------------------------------------------------------- /src/socket/kernel/darwin/project.conf: -------------------------------------------------------------------------------- 1 | subdirs=amd64 2 | dist=Makefile 3 | -------------------------------------------------------------------------------- /src/socket/kernel/freebsd/amd64/project.conf: -------------------------------------------------------------------------------- 1 | dist=Makefile,syscalls.S 2 | -------------------------------------------------------------------------------- /src/socket/kernel/freebsd/i386/project.conf: -------------------------------------------------------------------------------- 1 | dist=Makefile,syscalls.S 2 | -------------------------------------------------------------------------------- /src/socket/kernel/linux/amd64/project.conf: -------------------------------------------------------------------------------- 1 | dist=Makefile,syscalls.S 2 | -------------------------------------------------------------------------------- /src/socket/kernel/linux/arm/project.conf: -------------------------------------------------------------------------------- 1 | dist=Makefile,syscalls.S 2 | -------------------------------------------------------------------------------- /src/socket/kernel/linux/i386/project.conf: -------------------------------------------------------------------------------- 1 | dist=Makefile,syscalls.S 2 | -------------------------------------------------------------------------------- /src/socket/kernel/netbsd/amd64/project.conf: -------------------------------------------------------------------------------- 1 | dist=Makefile,syscalls.S 2 | -------------------------------------------------------------------------------- /src/socket/kernel/netbsd/arm/project.conf: -------------------------------------------------------------------------------- 1 | dist=Makefile,syscalls.S 2 | -------------------------------------------------------------------------------- /src/socket/kernel/netbsd/i386/project.conf: -------------------------------------------------------------------------------- 1 | dist=Makefile,syscalls.S 2 | -------------------------------------------------------------------------------- /src/socket/kernel/netbsd/sparc/project.conf: -------------------------------------------------------------------------------- 1 | dist=Makefile,syscalls.S 2 | -------------------------------------------------------------------------------- /src/socket/kernel/openbsd/arm/project.conf: -------------------------------------------------------------------------------- 1 | dist=Makefile,syscalls.S 2 | -------------------------------------------------------------------------------- /src/socket/kernel/openbsd/i386/project.conf: -------------------------------------------------------------------------------- 1 | dist=Makefile,syscalls.S 2 | -------------------------------------------------------------------------------- /tools/.gitignore: -------------------------------------------------------------------------------- 1 | /deforaos-gcc 2 | /deforaos-gcc.specs 3 | /uname 4 | -------------------------------------------------------------------------------- /include/socket/compat/project.conf: -------------------------------------------------------------------------------- 1 | subdirs=netinet,sys 2 | dist=Makefile 3 | -------------------------------------------------------------------------------- /src/kernel/netbsd/sparc64/project.conf: -------------------------------------------------------------------------------- 1 | dist=Makefile,start.S,syscalls.S 2 | -------------------------------------------------------------------------------- /src/kernel/openbsd/project.conf: -------------------------------------------------------------------------------- 1 | subdirs=arm,i386 2 | dist=Makefile,start.S 3 | -------------------------------------------------------------------------------- /src/kernel/solaris/project.conf: -------------------------------------------------------------------------------- 1 | subdirs=sparc 2 | dist=Makefile,common.h 3 | -------------------------------------------------------------------------------- /src/kernel/solaris/sparc/project.conf: -------------------------------------------------------------------------------- 1 | dist=Makefile,start.S,syscalls.S 2 | -------------------------------------------------------------------------------- /src/kernel/whitix/project.conf: -------------------------------------------------------------------------------- 1 | subdirs=i386 2 | dist=Makefile,common.h 3 | -------------------------------------------------------------------------------- /src/rt/kernel/netbsd/project.conf: -------------------------------------------------------------------------------- 1 | subdirs=amd64 2 | dist=Makefile,common.h 3 | -------------------------------------------------------------------------------- /include/socket/kernel/darwin/project.conf: -------------------------------------------------------------------------------- 1 | subdirs=netinet,sys 2 | dist=Makefile 3 | -------------------------------------------------------------------------------- /include/socket/kernel/linux/project.conf: -------------------------------------------------------------------------------- 1 | subdirs=netinet,sys 2 | dist=Makefile 3 | -------------------------------------------------------------------------------- /include/socket/kernel/netbsd/project.conf: -------------------------------------------------------------------------------- 1 | subdirs=netinet,sys 2 | dist=Makefile 3 | -------------------------------------------------------------------------------- /include/socket/kernel/freebsd/project.conf: -------------------------------------------------------------------------------- 1 | subdirs=netinet,sys 2 | dist=Makefile 3 | -------------------------------------------------------------------------------- /include/socket/kernel/openbsd/project.conf: -------------------------------------------------------------------------------- 1 | subdirs=netinet,sys 2 | dist=Makefile 3 | -------------------------------------------------------------------------------- /src/kernel/freebsd/amd64/project.conf: -------------------------------------------------------------------------------- 1 | dist=Makefile,crti.S,crtn.S,start.S,syscalls.S 2 | -------------------------------------------------------------------------------- /src/kernel/linux/amd64/project.conf: -------------------------------------------------------------------------------- 1 | dist=Makefile,crti.S,crtn.S,start.S,syscalls.S 2 | -------------------------------------------------------------------------------- /src/kernel/linux/i386/project.conf: -------------------------------------------------------------------------------- 1 | dist=Makefile,crti.S,crtn.S,start.S,syscalls.S 2 | -------------------------------------------------------------------------------- /src/kernel/netbsd/amd64/project.conf: -------------------------------------------------------------------------------- 1 | dist=Makefile,crti.S,crtn.S,start.S,syscalls.S 2 | -------------------------------------------------------------------------------- /src/kernel/netbsd/i386/project.conf: -------------------------------------------------------------------------------- 1 | dist=Makefile,crti.S,crtn.S,start.S,syscalls.S 2 | -------------------------------------------------------------------------------- /src/socket/kernel/freebsd/project.conf: -------------------------------------------------------------------------------- 1 | subdirs=amd64,i386 2 | dist=Makefile,common.h 3 | -------------------------------------------------------------------------------- /src/socket/kernel/openbsd/project.conf: -------------------------------------------------------------------------------- 1 | subdirs=arm,i386 2 | dist=Makefile,common.h 3 | -------------------------------------------------------------------------------- /src/kernel/linux/project.conf: -------------------------------------------------------------------------------- 1 | subdirs=amd64,arm,i386,sparc 2 | dist=Makefile,common.S 3 | -------------------------------------------------------------------------------- /src/regex/pcre/project.conf: -------------------------------------------------------------------------------- 1 | dist=AUTHORS,LICENCE,Makefile,config.h,pcre_internal.h,ucp.h 2 | -------------------------------------------------------------------------------- /src/socket/kernel/linux/project.conf: -------------------------------------------------------------------------------- 1 | subdirs=amd64,arm,i386 2 | dist=Makefile,common.h 3 | -------------------------------------------------------------------------------- /doc/gtkdoc/.gitignore: -------------------------------------------------------------------------------- 1 | /html 2 | /html.stamp 3 | /libc.types 4 | /tmpl.stamp 5 | /xml.stamp 6 | -------------------------------------------------------------------------------- /doc/gtkdoc/project.conf: -------------------------------------------------------------------------------- 1 | dist=Makefile,libc-docs.xml,libc-sections.txt,xml/gtkdocentities.ent 2 | -------------------------------------------------------------------------------- /src/kernel/netbsd/project.conf: -------------------------------------------------------------------------------- 1 | subdirs=amd64,arm,i386,sparc,sparc64 2 | dist=Makefile,start.S 3 | -------------------------------------------------------------------------------- /src/socket/kernel/netbsd/project.conf: -------------------------------------------------------------------------------- 1 | subdirs=amd64,arm,i386,sparc 2 | dist=Makefile,common.h 3 | -------------------------------------------------------------------------------- /include/net/project.conf: -------------------------------------------------------------------------------- 1 | includes=if.h 2 | dist=Makefile 3 | 4 | [if.h] 5 | install=$(INCLUDEDIR)/net 6 | -------------------------------------------------------------------------------- /src/kernel/project.conf: -------------------------------------------------------------------------------- 1 | subdirs=darwin,deforaos,freebsd,linux,netbsd,openbsd,solaris,whitix 2 | dist=Makefile 3 | -------------------------------------------------------------------------------- /include/compat/net/project.conf: -------------------------------------------------------------------------------- 1 | includes=if.h 2 | dist=Makefile 3 | 4 | [if.h] 5 | install=$(INCLUDEDIR)/compat/net 6 | -------------------------------------------------------------------------------- /include/socket/arpa/project.conf: -------------------------------------------------------------------------------- 1 | includes=inet.h 2 | dist=Makefile 3 | 4 | [inet.h] 5 | install=$(INCLUDEDIR)/arpa 6 | -------------------------------------------------------------------------------- /doc/gtkdoc/xml/gtkdocentities.ent: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /include/kernel/linux/net/project.conf: -------------------------------------------------------------------------------- 1 | includes=if.h 2 | dist=Makefile 3 | 4 | [if.h] 5 | install=$(INCLUDEDIR)/kernel/linux/net 6 | -------------------------------------------------------------------------------- /include/kernel/netbsd/net/project.conf: -------------------------------------------------------------------------------- 1 | includes=if.h 2 | dist=Makefile 3 | 4 | [if.h] 5 | install=$(INCLUDEDIR)/kernel/netbsd/net 6 | -------------------------------------------------------------------------------- /include/kernel/whitix/project.conf: -------------------------------------------------------------------------------- 1 | includes=compat.h 2 | dist=Makefile 3 | 4 | [compat.h] 5 | install=$(INCLUDEDIR)/kernel/whitix 6 | -------------------------------------------------------------------------------- /include/socket/kernel/darwin/netinet/project.conf: -------------------------------------------------------------------------------- 1 | includes=in.h 2 | dist=Makefile 3 | 4 | [in.h] 5 | install=$(INCLUDEDIR)/kernel/darwin/netinet 6 | -------------------------------------------------------------------------------- /include/socket/kernel/darwin/sys/project.conf: -------------------------------------------------------------------------------- 1 | includes=socket.h 2 | dist=Makefile 3 | 4 | [socket.h] 5 | install=$(INCLUDEDIR)/kernel/netbsd/sys 6 | -------------------------------------------------------------------------------- /include/socket/kernel/freebsd/sys/project.conf: -------------------------------------------------------------------------------- 1 | includes=socket.h 2 | dist=Makefile 3 | 4 | [socket.h] 5 | install=$(INCLUDEDIR)/kernel/freebsd/sys 6 | -------------------------------------------------------------------------------- /include/socket/kernel/openbsd/netinet/project.conf: -------------------------------------------------------------------------------- 1 | includes=in.h 2 | dist=Makefile 3 | 4 | [in.h] 5 | install=$(INCLUDEDIR)/kernel/openbsd/netinet 6 | -------------------------------------------------------------------------------- /include/socket/kernel/openbsd/sys/project.conf: -------------------------------------------------------------------------------- 1 | includes=socket.h 2 | dist=Makefile 3 | 4 | [socket.h] 5 | install=$(INCLUDEDIR)/kernel/openbsd/sys 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | *.a 3 | *.bak 4 | *.core 5 | *.dylib 6 | *.la 7 | *.o 8 | *.so 9 | *.so.* 10 | /config.ent 11 | /config.h 12 | /config.sh 13 | -------------------------------------------------------------------------------- /include/socket/project.conf: -------------------------------------------------------------------------------- 1 | subdirs=arpa,compat,kernel/darwin,kernel/freebsd,kernel/linux,kernel/netbsd,kernel/openbsd,netinet,sys 2 | dist=Makefile 3 | includes=netdb.h 4 | -------------------------------------------------------------------------------- /include/socket/sys/project.conf: -------------------------------------------------------------------------------- 1 | includes=socket.h,un.h 2 | dist=Makefile 3 | 4 | [socket.h] 5 | install=$(INCLUDEDIR)/sys 6 | 7 | [un.h] 8 | install=$(INCLUDEDIR)/sys 9 | -------------------------------------------------------------------------------- /include/socket/compat/sys/project.conf: -------------------------------------------------------------------------------- 1 | includes=socket.h,un.h 2 | dist=Makefile 3 | 4 | [socket.h] 5 | install=$(INCLUDEDIR)/compat/sys 6 | 7 | [un.h] 8 | install=$(INCLUDEDIR)/compat/sys 9 | -------------------------------------------------------------------------------- /include/socket/compat/netinet/project.conf: -------------------------------------------------------------------------------- 1 | includes=in.h,tcp.h 2 | dist=Makefile 3 | 4 | [in.h] 5 | install=$(INCLUDEDIR)/compat/netinet 6 | 7 | [tcp.h] 8 | install=$(INCLUDEDIR)/compat/netinet 9 | -------------------------------------------------------------------------------- /include/socket/kernel/linux/sys/project.conf: -------------------------------------------------------------------------------- 1 | includes=socket.h,un.h 2 | dist=Makefile 3 | 4 | [socket.h] 5 | install=$(INCLUDEDIR)/kernel/linux/sys 6 | 7 | [un.h] 8 | install=$(INCLUDEDIR)/kernel/linux/sys 9 | -------------------------------------------------------------------------------- /include/socket/kernel/linux/netinet/project.conf: -------------------------------------------------------------------------------- 1 | includes=in.h,tcp.h 2 | dist=Makefile 3 | 4 | [in.h] 5 | install=$(INCLUDEDIR)/kernel/linux/netinet 6 | 7 | [tcp.h] 8 | install=$(INCLUDEDIR)/kernel/linux/netinet 9 | -------------------------------------------------------------------------------- /include/socket/kernel/netbsd/sys/project.conf: -------------------------------------------------------------------------------- 1 | includes=socket.h,un.h 2 | dist=Makefile 3 | 4 | [socket.h] 5 | install=$(INCLUDEDIR)/kernel/netbsd/sys 6 | 7 | [un.h] 8 | install=$(INCLUDEDIR)/kernel/netbsd/sys 9 | -------------------------------------------------------------------------------- /include/socket/kernel/freebsd/netinet/project.conf: -------------------------------------------------------------------------------- 1 | includes=in.h,tcp.h 2 | dist=Makefile 3 | 4 | [in.h] 5 | install=$(INCLUDEDIR)/kernel/freebsd/netinet 6 | 7 | [tcp.h] 8 | install=$(INCLUDEDIR)/kernel/freebsd/netinet 9 | -------------------------------------------------------------------------------- /include/socket/kernel/netbsd/netinet/project.conf: -------------------------------------------------------------------------------- 1 | includes=in.h,tcp.h 2 | dist=Makefile 3 | 4 | [in.h] 5 | install=$(INCLUDEDIR)/kernel/netbsd/netinet 6 | 7 | [tcp.h] 8 | install=$(INCLUDEDIR)/kernel/netbsd/netinet 9 | -------------------------------------------------------------------------------- /data/project.conf: -------------------------------------------------------------------------------- 1 | targets=DeforaOS-libc.pc 2 | dist=Makefile,DeforaOS-libc.pc.in 3 | 4 | [DeforaOS-libc.pc] 5 | type=script 6 | script=../tools/pkgconfig.sh 7 | depends=../tools/pkgconfig.sh,DeforaOS-libc.pc.in 8 | install= 9 | -------------------------------------------------------------------------------- /include/kernel/solaris/project.conf: -------------------------------------------------------------------------------- 1 | subdirs=sys 2 | includes=compat.h,errno.h 3 | dist=Makefile 4 | 5 | [compat.h] 6 | install=$(INCLUDEDIR)/kernel/solaris 7 | 8 | [errno.h] 9 | install=$(INCLUDEDIR)/kernel/solaris 10 | -------------------------------------------------------------------------------- /include/socket/netinet/project.conf: -------------------------------------------------------------------------------- 1 | includes=in.h,ip_icmp.h,tcp.h,udp.h 2 | dist=Makefile 3 | 4 | [in.h] 5 | install=$(INCLUDEDIR)/netinet 6 | 7 | [ip_icmp.h] 8 | install=$(INCLUDEDIR)/netinet 9 | 10 | [tcp.h] 11 | install=$(INCLUDEDIR)/netinet 12 | 13 | [udp.h] 14 | install=$(INCLUDEDIR)/netinet 15 | -------------------------------------------------------------------------------- /data/DeforaOS-libc.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@PREFIX@ 2 | libdir=@LIBDIR@ 3 | includedir=@INCLUDEDIR@ 4 | 5 | Name: DeforaOS libc 6 | Description: libc for the DeforaOS Operating System 7 | Version: @VERSION@ 8 | Libs: -nostdlib @RPATH@ -lc ${libdir}/start.o 9 | Cflags: -nostdinc -isystem ${includedir} -freestanding 10 | -------------------------------------------------------------------------------- /src/regex/libpcre.pc.in: -------------------------------------------------------------------------------- 1 | # Package Information for pkg-config 2 | 3 | prefix=@PREFIX@ 4 | exec_prefix=@BINDIR@ 5 | libdir=@LIBDIR@ 6 | includedir=@INCLUDEDIR@/pcre 7 | 8 | Name: libpcre 9 | Description: PCRE - Perl compatible regular expressions C library with 8 bit character support 10 | Version: @VERSION@ 11 | Libs: -L${libdir} -lpcre 12 | Cflags: -I${includedir} 13 | -------------------------------------------------------------------------------- /src/ssp/project.conf: -------------------------------------------------------------------------------- 1 | targets=libssp 2 | ld=$(CC) -nostdlib -shared 3 | cppflags_force=-nostdinc -isystem ../../include -I.. 4 | cflags_force=-fPIC 5 | cflags=-W -Wall -g -O2 -ffreestanding -fstack-protector 6 | ldflags_force=-nostdlib 7 | ldflags=-Wl,-z,relro -Wl,-z,now 8 | dist=Makefile 9 | 10 | #targets 11 | [libssp] 12 | type=library 13 | sources=ssp.c 14 | install=$(LIBDIR) 15 | -------------------------------------------------------------------------------- /include/kernel/solaris/sys/project.conf: -------------------------------------------------------------------------------- 1 | includes=mman.h,select.h,stat.h,time.h,utsname.h 2 | dist=Makefile 3 | 4 | [mman.h] 5 | install=$(INCLUDEDIR)/kernel/solaris/sys 6 | 7 | [select.h] 8 | install=$(INCLUDEDIR)/kernel/solaris/sys 9 | 10 | [stat.h] 11 | install=$(INCLUDEDIR)/kernel/solaris/sys 12 | 13 | [time.h] 14 | install=$(INCLUDEDIR)/kernel/solaris/sys 15 | 16 | [utsname.h] 17 | install=$(INCLUDEDIR)/kernel/solaris/sys 18 | -------------------------------------------------------------------------------- /src/pthread/project.conf: -------------------------------------------------------------------------------- 1 | targets=libpthread 2 | cppflags_force=-nostdinc -isystem ../../include -isystem ../../include/pthread -isystem ../../include/rt 3 | cflags_force=-ffreestanding -fPIC 4 | cflags=-W -Wall -g -O2 -fstack-protector 5 | ldflags_force=-nostdlib -lc -L$(OBJDIR).. 6 | ldflags=-Wl,-z,relro -Wl,-z,now 7 | dist=Makefile 8 | 9 | #targets 10 | [libpthread] 11 | type=library 12 | sources=pthread.c 13 | install=$(LIBDIR) 14 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | - fix random failures for the "stdlib" and "unistd" tests 2 | - pass the FIXME test 3 | 4 | Platform specific: 5 | - FreeBSD: 6 | * fix build (conflict with /usr/local/include) 7 | * complete _start(), signal() on amd64 8 | * check syscall() on amd64 9 | * reflect the current status in the test suite 10 | - Linux: 11 | * fork() and pause() may have to be inline (asm/unistd.h) 12 | * re-introduce ARM OABI 13 | - OpenBSD: 14 | * complete support for SSP 15 | -------------------------------------------------------------------------------- /include/kernel/deforaos/sys/project.conf: -------------------------------------------------------------------------------- 1 | includes=mman.h,select.h,stat.h,syscall.h,time.h,utsname.h 2 | dist=Makefile 3 | 4 | [mman.h] 5 | install=$(INCLUDEDIR)/kernel/deforaos/sys 6 | 7 | [select.h] 8 | install=$(INCLUDEDIR)/kernel/deforaos/sys 9 | 10 | [stat.h] 11 | install=$(INCLUDEDIR)/kernel/deforaos/sys 12 | 13 | [syscall.h] 14 | install=$(INCLUDEDIR)/kernel/deforaos/sys 15 | 16 | [time.h] 17 | install=$(INCLUDEDIR)/kernel/deforaos/sys 18 | 19 | [utsname.h] 20 | install=$(INCLUDEDIR)/kernel/deforaos 21 | -------------------------------------------------------------------------------- /tests/.gitignore: -------------------------------------------------------------------------------- 1 | /clint.log 2 | /coverage.log 3 | /ctype 4 | /distcheck.log 5 | /dlfcn 6 | /errno 7 | /fixme.log 8 | /fnmatch 9 | /iconv 10 | /includes 11 | /inttypes 12 | /langinfo 13 | /math 14 | /mman 15 | /msg 16 | /netdb 17 | /pclint.log 18 | /ptrace 19 | /pwd 20 | /regex 21 | /resource 22 | /rt 23 | /select 24 | /setjmp 25 | /shm 26 | /signal 27 | /socket 28 | /ssp 29 | /start 30 | /stdarg 31 | /stdint 32 | /stdio 33 | /stdlib 34 | /string 35 | /strings 36 | /tests.log 37 | /time 38 | /unistd 39 | /utsname 40 | -------------------------------------------------------------------------------- /src/dl/project.conf: -------------------------------------------------------------------------------- 1 | targets=libdl 2 | ld=$(CC) -nostdlib -shared 3 | cppflags_force=-nostdinc -isystem ../../include -isystem ../../include/dl 4 | cflags_force=-fPIC 5 | cflags=-W -Wall -g -O2 -ffreestanding -fstack-protector 6 | ldflags_force=-nostdlib -lc -L$(OBJDIR).. 7 | ldflags=-Wl,-z,relro -Wl,-z,now 8 | dist=Makefile 9 | 10 | #targets 11 | [libdl] 12 | type=library 13 | sources=dlfcn.c 14 | install=$(LIBDIR) 15 | 16 | #sources 17 | [dlfcn.c] 18 | depends=../dlfcn.h,../../include/dl/dlfcn.h,../../include/dl/elf.h 19 | -------------------------------------------------------------------------------- /include/project.conf: -------------------------------------------------------------------------------- 1 | subdirs=compat,dl,kernel/darwin,kernel/deforaos,kernel/freebsd,kernel/linux,kernel/netbsd,kernel/openbsd,kernel/solaris,math,net,pthread,rt,socket,sys 2 | includes=assert.h,compat.h,complex.h,cpio.h,ctype.h,dirent.h,errno.h,fcntl.h,float.h,fnmatch.h,glob.h,grp.h,iconv.h,inttypes.h,langinfo.h,libgen.h,limits.h,locale.h,nl_types.h,poll.h,pwd.h,regex.h,search.h,semaphore.h,setjmp.h,signal.h,stdarg.h,stdbool.h,stddef.h,stdint.h,stdio.h,stdlib.h,string.h,strings.h,stropts.h,syslog.h,tar.h,termios.h,time.h,ucontext.h,unistd.h,utime.h,utmpx.h,wchar.h,wctype.h 3 | dist=Makefile 4 | -------------------------------------------------------------------------------- /src/rt/project.conf: -------------------------------------------------------------------------------- 1 | subdirs=kernel/netbsd 2 | targets=librt 3 | as=$(CC) 4 | cppflags_force=-nostdinc -isystem ../../include -isystem ../../include/rt 5 | cflags_force=-ffreestanding -fPIC 6 | cflags=-W -Wall -g -O2 -fstack-protector 7 | asflags_force=$(CFLAGSF) 8 | asflags=$(CFLAGS) -c 9 | ldflags_force=-nostdlib -lc -L$(OBJDIR).. 10 | ldflags=-Wl,-z,relro -Wl,-z,now 11 | dist=Makefile,syscalls.h 12 | 13 | #targets 14 | [librt] 15 | type=library 16 | sources=sched.c,syscalls.S 17 | install=$(LIBDIR) 18 | 19 | #sources 20 | [sched.c] 21 | depends=syscalls.h 22 | 23 | [syscalls.S] 24 | depends=syscalls.h,kernel/netbsd/amd64/syscalls.S 25 | -------------------------------------------------------------------------------- /include/kernel/deforaos/project.conf: -------------------------------------------------------------------------------- 1 | subdirs=sys 2 | includes=dirent.h,errno.h,fcntl.h,limits.h,signal.h,stdio.h,termios.h,unistd.h 3 | dist=Makefile 4 | 5 | [dirent.h] 6 | install=$(INCLUDEDIR)/kernel/deforaos 7 | 8 | [errno.h] 9 | install=$(INCLUDEDIR)/kernel/deforaos 10 | 11 | [fcntl.h] 12 | install=$(INCLUDEDIR)/kernel/deforaos 13 | 14 | [limits.h] 15 | install=$(INCLUDEDIR)/kernel/deforaos 16 | 17 | [signal.h] 18 | install=$(INCLUDEDIR)/kernel/deforaos 19 | 20 | [stdio.h] 21 | install=$(INCLUDEDIR)/kernel/deforaos 22 | 23 | [termios.h] 24 | install=$(INCLUDEDIR)/kernel/deforaos 25 | 26 | [unistd.h] 27 | install=$(INCLUDEDIR)/kernel/deforaos 28 | -------------------------------------------------------------------------------- /tools/deforaos-gcc.specs.in: -------------------------------------------------------------------------------- 1 | %rename cpp_options old_cpp_options 2 | 3 | *cc1: 4 | %(cc1_cpu) -D__DeforaOS__=1 -nostdinc -isystem =@INCLUDEDIR@ 5 | 6 | *cpp: 7 | 8 | 9 | *cpp_options: 10 | %(cc1_cpu) -D__DeforaOS__=1 -nostdinc -isystem =@INCLUDEDIR@ %(old_cpp_options) 11 | 12 | *link_libgcc: 13 | -L@LIBDIR@ 14 | 15 | *libgcc: 16 | @LIBDIR@/libgcc.a 17 | 18 | *startfile: 19 | start%O%s crti%O%s crtbegin%O%s 20 | 21 | *endfile: 22 | crtend%O%s crtn%O%s 23 | 24 | *lib: 25 | libc.so%s %{pthread:-lpthread} 26 | 27 | *link: 28 | -L@LIBDIR@ -L. -dynamic-linker @LIBDIR@/ld.so -nostdlib %{shared:-shared} %{static:-static} %{rdynamic:-export-dynamic} 29 | 30 | -------------------------------------------------------------------------------- /src/math/project.conf: -------------------------------------------------------------------------------- 1 | subdirs=amd64,i386 2 | targets=libm 3 | as=$(CC) 4 | cppflags_force=-nostdinc -isystem ../../include -isystem ../../include/math 5 | cflags_force=-ffreestanding -fPIC 6 | cflags=-W -Wall -g -O2 -fstack-protector 7 | asflags_force=$(CFLAGSF) 8 | asflags=$(CFLAGS) -c 9 | ldflags_force=-nostdlib -lc -L$(OBJDIR).. 10 | ldflags=-Wl,-z,relro -Wl,-z,now 11 | dist=Makefile,arch.h 12 | 13 | #targets 14 | [libm] 15 | type=library 16 | sources=arch.S,math.c 17 | install=$(LIBDIR) 18 | 19 | #sources 20 | [arch.S] 21 | depends=amd64/math.S,amd64/math.h,i386/math.S,i386/math.h 22 | 23 | [math.c] 24 | depends=../../include/math/math.h,amd64/math.h,i386/math.h 25 | -------------------------------------------------------------------------------- /include/kernel/freebsd/project.conf: -------------------------------------------------------------------------------- 1 | subdirs=sys 2 | includes=dirent.h,errno.h,fcntl.h,limits.h,signal.h,stdio.h,termios.h,unistd.h,utmpx.h 3 | dist=Makefile 4 | 5 | [dirent.h] 6 | install=$(INCLUDEDIR)/kernel/freebsd 7 | 8 | [errno.h] 9 | install=$(INCLUDEDIR)/kernel/freebsd 10 | 11 | [fcntl.h] 12 | install=$(INCLUDEDIR)/kernel/freebsd 13 | 14 | [limits.h] 15 | install=$(INCLUDEDIR)/kernel/freebsd 16 | 17 | [signal.h] 18 | install=$(INCLUDEDIR)/kernel/freebsd 19 | 20 | [stdio.h] 21 | install=$(INCLUDEDIR)/kernel/freebsd 22 | 23 | [termios.h] 24 | install=$(INCLUDEDIR)/kernel/freebsd 25 | 26 | [unistd.h] 27 | install=$(INCLUDEDIR)/kernel/freebsd 28 | 29 | [utmpx.h] 30 | install=$(INCLUDEDIR)/kernel/freebsd 31 | -------------------------------------------------------------------------------- /doc/project.conf: -------------------------------------------------------------------------------- 1 | subdirs=gtkdoc 2 | targets=gtkdoc/html.stamp,gtkdoc/libc.types,gtkdoc/tmpl.stamp,gtkdoc/xml.stamp 3 | dist=Makefile,gtkdoc.sh 4 | 5 | #targets 6 | [gtkdoc/html.stamp] 7 | type=script 8 | script=./gtkdoc.sh 9 | depends=gtkdoc.sh,gtkdoc/libc-docs.xml,$(OBJDIR)gtkdoc/xml.stamp,gtkdoc/xml/gtkdocentities.ent,../config.ent,../config.sh 10 | install= 11 | 12 | [gtkdoc/libc.types] 13 | type=script 14 | script=./gtkdoc.sh 15 | depends=gtkdoc.sh,../config.sh 16 | 17 | [gtkdoc/tmpl.stamp] 18 | type=script 19 | script=./gtkdoc.sh 20 | depends=gtkdoc.sh,$(OBJDIR)gtkdoc/libc.types,../config.sh 21 | 22 | [gtkdoc/xml.stamp] 23 | type=script 24 | script=./gtkdoc.sh 25 | depends=gtkdoc.sh,$(OBJDIR)gtkdoc/tmpl.stamp 26 | -------------------------------------------------------------------------------- /include/kernel/darwin/project.conf: -------------------------------------------------------------------------------- 1 | subdirs=sys 2 | includes=dirent.h,errno.h,fcntl.h,limits.h,signal.h,stdio.h,termios.h,unistd.h,utmpx.h 3 | dist=Makefile 4 | 5 | #includes 6 | [dirent.h] 7 | install=$(INCLUDEDIR)/kernel/darwin 8 | 9 | [errno.h] 10 | install=$(INCLUDEDIR)/kernel/darwin 11 | 12 | [fcntl.h] 13 | install=$(INCLUDEDIR)/kernel/darwin 14 | 15 | [limits.h] 16 | install=$(INCLUDEDIR)/kernel/darwin 17 | 18 | [signal.h] 19 | install=$(INCLUDEDIR)/kernel/darwin 20 | 21 | [stdio.h] 22 | install=$(INCLUDEDIR)/kernel/darwin 23 | 24 | [termios.h] 25 | install=$(INCLUDEDIR)/kernel/darwin 26 | 27 | [unistd.h] 28 | install=$(INCLUDEDIR)/kernel/darwin 29 | 30 | [utmpx.h] 31 | install=$(INCLUDEDIR)/kernel/darwin 32 | -------------------------------------------------------------------------------- /include/kernel/openbsd/project.conf: -------------------------------------------------------------------------------- 1 | subdirs=sys 2 | includes=compat.h,dirent.h,errno.h,fcntl.h,limits.h,signal.h,stdio.h,termios.h,unistd.h 3 | dist=Makefile 4 | 5 | [compat.h] 6 | install=$(INCLUDEDIR)/kernel/openbsd 7 | 8 | [dirent.h] 9 | install=$(INCLUDEDIR)/kernel/openbsd 10 | 11 | [errno.h] 12 | install=$(INCLUDEDIR)/kernel/openbsd 13 | 14 | [fcntl.h] 15 | install=$(INCLUDEDIR)/kernel/openbsd 16 | 17 | [limits.h] 18 | install=$(INCLUDEDIR)/kernel/openbsd 19 | 20 | [signal.h] 21 | install=$(INCLUDEDIR)/kernel/openbsd 22 | 23 | [stdio.h] 24 | install=$(INCLUDEDIR)/kernel/openbsd 25 | 26 | [termios.h] 27 | install=$(INCLUDEDIR)/kernel/openbsd 28 | 29 | [unistd.h] 30 | install=$(INCLUDEDIR)/kernel/openbsd 31 | -------------------------------------------------------------------------------- /project.conf: -------------------------------------------------------------------------------- 1 | vendor=System 2 | package=libc 3 | version=0.5.2 4 | config=ent,h,sh 5 | 6 | subdirs=data,doc,include,src/ssp,src,src/dl,src/math,src/pthread,src/regex,src/rt,src/socket,tools,tests 7 | dist=Makefile,COPYING,README.md,config.ent,config.h,config.sh 8 | targets=tests 9 | 10 | #targets 11 | [tests] 12 | type=command 13 | command=cd tests && (if [ -n "$(OBJDIR)" ]; then $(MAKE) OBJDIR="$(OBJDIR)tests/" "$(OBJDIR)tests/clint.log" "$(OBJDIR)tests/distcheck.log" "$(OBJDIR)tests/fixme.log" "$(OBJDIR)tests/pclint.log" "$(OBJDIR)tests/tests.log"; else $(MAKE) clint.log distcheck.log fixme.log pclint.log tests.log; fi) 14 | depends=all 15 | enabled=0 16 | phony=1 17 | 18 | #dist 19 | [COPYING] 20 | install=$(PREFIX)/share/doc/$(PACKAGE) 21 | 22 | [README.md] 23 | install=$(PREFIX)/share/doc/$(PACKAGE) 24 | -------------------------------------------------------------------------------- /include/kernel/darwin/sys/project.conf: -------------------------------------------------------------------------------- 1 | includes=ipc.h,mman.h,msg.h,ptrace.h,resource.h,select.h,stat.h,syscall.h,sysctl.h,time.h,utsname.h 2 | dist=Makefile 3 | 4 | [ipc.h] 5 | install=$(INCLUDEDIR)/kernel/darwin/sys 6 | 7 | [mman.h] 8 | install=$(INCLUDEDIR)/kernel/darwin/sys 9 | 10 | [msg.h] 11 | install=$(INCLUDEDIR)/kernel/darwin/sys 12 | 13 | [ptrace.h] 14 | install=$(INCLUDEDIR)/kernel/darwin/sys 15 | 16 | [resource.h] 17 | install=$(INCLUDEDIR)/kernel/darwin/sys 18 | 19 | [select.h] 20 | install=$(INCLUDEDIR)/kernel/darwin/sys 21 | 22 | [stat.h] 23 | install=$(INCLUDEDIR)/kernel/darwin/sys 24 | 25 | [syscall.h] 26 | install=$(INCLUDEDIR)/kernel/darwin/sys 27 | 28 | [sysctl.h] 29 | install=$(INCLUDEDIR)/kernel/darwin/sys 30 | 31 | [time.h] 32 | install=$(INCLUDEDIR)/kernel/darwin/sys 33 | 34 | [utsname.h] 35 | install=$(INCLUDEDIR)/kernel/darwin/sys 36 | -------------------------------------------------------------------------------- /include/kernel/freebsd/sys/project.conf: -------------------------------------------------------------------------------- 1 | includes=ipc.h,mman.h,msg.h,ptrace.h,resource.h,select.h,stat.h,syscall.h,sysctl.h,time.h,utsname.h 2 | dist=Makefile 3 | 4 | [ipc.h] 5 | install=$(INCLUDEDIR)/kernel/freebsd/sys 6 | 7 | [mman.h] 8 | install=$(INCLUDEDIR)/kernel/freebsd/sys 9 | 10 | [msg.h] 11 | install=$(INCLUDEDIR)/kernel/freebsd/sys 12 | 13 | [ptrace.h] 14 | install=$(INCLUDEDIR)/kernel/freebsd/sys 15 | 16 | [resource.h] 17 | install=$(INCLUDEDIR)/kernel/freebsd/sys 18 | 19 | [select.h] 20 | install=$(INCLUDEDIR)/kernel/freebsd/sys 21 | 22 | [stat.h] 23 | install=$(INCLUDEDIR)/kernel/freebsd/sys 24 | 25 | [syscall.h] 26 | install=$(INCLUDEDIR)/kernel/freebsd/sys 27 | 28 | [sysctl.h] 29 | install=$(INCLUDEDIR)/kernel/freebsd/sys 30 | 31 | [time.h] 32 | install=$(INCLUDEDIR)/kernel/freebsd/sys 33 | 34 | [utsname.h] 35 | install=$(INCLUDEDIR)/kernel/freebsd/sys 36 | -------------------------------------------------------------------------------- /include/compat/project.conf: -------------------------------------------------------------------------------- 1 | subdirs=net,sys 2 | includes=dirent.h,errno.h,fcntl.h,limits.h,poll.h,signal.h,stdio.h,stropts.h,termios.h,time.h,ucontext.h,unistd.h,utmpx.h 3 | dist=Makefile 4 | 5 | [dirent.h] 6 | install=$(INCLUDEDIR)/compat 7 | 8 | [errno.h] 9 | install=$(INCLUDEDIR)/compat 10 | 11 | [fcntl.h] 12 | install=$(INCLUDEDIR)/compat 13 | 14 | [limits.h] 15 | install=$(INCLUDEDIR)/compat 16 | 17 | [poll.h] 18 | install=$(INCLUDEDIR)/compat 19 | 20 | [signal.h] 21 | install=$(INCLUDEDIR)/compat 22 | 23 | [stdio.h] 24 | install=$(INCLUDEDIR)/compat 25 | 26 | [stropts.h] 27 | install=$(INCLUDEDIR)/compat 28 | 29 | [termios.h] 30 | install=$(INCLUDEDIR)/compat 31 | 32 | [time.h] 33 | install=$(INCLUDEDIR)/compat 34 | 35 | [ucontext.h] 36 | install=$(INCLUDEDIR)/compat 37 | 38 | [unistd.h] 39 | install=$(INCLUDEDIR)/compat 40 | 41 | [utmpx.h] 42 | install=$(INCLUDEDIR)/compat 43 | -------------------------------------------------------------------------------- /include/kernel/linux/project.conf: -------------------------------------------------------------------------------- 1 | subdirs=net,sys 2 | includes=compat.h,dirent.h,errno.h,fcntl.h,limits.h,poll.h,signal.h,stdio.h,stropts.h,termios.h,unistd.h,utmpx.h 3 | dist=Makefile 4 | 5 | [compat.h] 6 | install=$(INCLUDEDIR)/kernel/linux 7 | 8 | [dirent.h] 9 | install=$(INCLUDEDIR)/kernel/linux 10 | 11 | [errno.h] 12 | install=$(INCLUDEDIR)/kernel/linux 13 | 14 | [fcntl.h] 15 | install=$(INCLUDEDIR)/kernel/linux 16 | 17 | [limits.h] 18 | install=$(INCLUDEDIR)/kernel/linux 19 | 20 | [poll.h] 21 | install=$(INCLUDEDIR)/kernel/linux 22 | 23 | [signal.h] 24 | install=$(INCLUDEDIR)/kernel/linux 25 | 26 | [stdio.h] 27 | install=$(INCLUDEDIR)/kernel/linux 28 | 29 | [stropts.h] 30 | install=$(INCLUDEDIR)/kernel/linux 31 | 32 | [termios.h] 33 | install=$(INCLUDEDIR)/kernel/linux 34 | 35 | [unistd.h] 36 | install=$(INCLUDEDIR)/kernel/linux 37 | 38 | [utmpx.h] 39 | install=$(INCLUDEDIR)/kernel/linux 40 | -------------------------------------------------------------------------------- /include/kernel/netbsd/project.conf: -------------------------------------------------------------------------------- 1 | subdirs=net,sys 2 | includes=dirent.h,errno.h,fcntl.h,limits.h,poll.h,signal.h,stdio.h,stropts.h,termios.h,time.h,ucontext.h,unistd.h,utmpx.h 3 | dist=Makefile 4 | 5 | [dirent.h] 6 | install=$(INCLUDEDIR)/kernel/netbsd 7 | 8 | [errno.h] 9 | install=$(INCLUDEDIR)/kernel/netbsd 10 | 11 | [fcntl.h] 12 | install=$(INCLUDEDIR)/kernel/netbsd 13 | 14 | [limits.h] 15 | install=$(INCLUDEDIR)/kernel/netbsd 16 | 17 | [poll.h] 18 | install=$(INCLUDEDIR)/kernel/netbsd 19 | 20 | [signal.h] 21 | install=$(INCLUDEDIR)/kernel/netbsd 22 | 23 | [stdio.h] 24 | install=$(INCLUDEDIR)/kernel/netbsd 25 | 26 | [stropts.h] 27 | install=$(INCLUDEDIR)/kernel/netbsd 28 | 29 | [termios.h] 30 | install=$(INCLUDEDIR)/kernel/netbsd 31 | 32 | [time.h] 33 | install=$(INCLUDEDIR)/kernel/netbsd 34 | 35 | [ucontext.h] 36 | install=$(INCLUDEDIR)/kernel/netbsd 37 | 38 | [unistd.h] 39 | install=$(INCLUDEDIR)/kernel/netbsd 40 | 41 | [utmpx.h] 42 | install=$(INCLUDEDIR)/kernel/netbsd 43 | -------------------------------------------------------------------------------- /include/kernel/linux/sys/project.conf: -------------------------------------------------------------------------------- 1 | includes=ioctl.h,ipc.h,mman.h,mount.h,msg.h,ptrace.h,reboot.h,resource.h,select.h,stat.h,syscall.h,time.h,utsname.h 2 | dist=Makefile 3 | 4 | [ioctl.h] 5 | install=$(INCLUDEDIR)/kernel/linux/sys 6 | 7 | [ipc.h] 8 | install=$(INCLUDEDIR)/kernel/linux/sys 9 | 10 | [mman.h] 11 | install=$(INCLUDEDIR)/kernel/linux/sys 12 | 13 | [mount.h] 14 | install=$(INCLUDEDIR)/kernel/linux/sys 15 | 16 | [msg.h] 17 | install=$(INCLUDEDIR)/kernel/linux/sys 18 | 19 | [ptrace.h] 20 | install=$(INCLUDEDIR)/kernel/linux/sys 21 | 22 | [reboot.h] 23 | install=$(INCLUDEDIR)/kernel/linux/sys 24 | 25 | [resource.h] 26 | install=$(INCLUDEDIR)/kernel/linux/sys 27 | 28 | [select.h] 29 | install=$(INCLUDEDIR)/kernel/linux/sys 30 | 31 | [stat.h] 32 | install=$(INCLUDEDIR)/kernel/linux/sys 33 | 34 | [syscall.h] 35 | install=$(INCLUDEDIR)/kernel/linux/sys 36 | 37 | [time.h] 38 | install=$(INCLUDEDIR)/kernel/linux/sys 39 | 40 | [utsname.h] 41 | install=$(INCLUDEDIR)/kernel/linux/sys 42 | -------------------------------------------------------------------------------- /src/regex/pcre/AUTHORS: -------------------------------------------------------------------------------- 1 | THE MAIN PCRE LIBRARY 2 | --------------------- 3 | 4 | Written by: Philip Hazel 5 | Email local part: Philip.Hazel 6 | Email domain: gmail.com 7 | 8 | University of Cambridge Computing Service, 9 | Cambridge, England. 10 | 11 | Copyright (c) 1997-2021 University of Cambridge 12 | All rights reserved 13 | 14 | 15 | PCRE JUST-IN-TIME COMPILATION SUPPORT 16 | ------------------------------------- 17 | 18 | Written by: Zoltan Herczeg 19 | Email local part: hzmester 20 | Emain domain: freemail.hu 21 | 22 | Copyright(c) 2010-2021 Zoltan Herczeg 23 | All rights reserved. 24 | 25 | 26 | STACK-LESS JUST-IN-TIME COMPILER 27 | -------------------------------- 28 | 29 | Written by: Zoltan Herczeg 30 | Email local part: hzmester 31 | Emain domain: freemail.hu 32 | 33 | Copyright(c) 2009-2021 Zoltan Herczeg 34 | All rights reserved. 35 | 36 | 37 | THE C++ WRAPPER LIBRARY 38 | ----------------------- 39 | 40 | Written by: Google Inc. 41 | 42 | Copyright (c) 2007-2012 Google Inc 43 | All rights reserved 44 | 45 | #### 46 | -------------------------------------------------------------------------------- /src/regex/project.conf: -------------------------------------------------------------------------------- 1 | subdirs=pcre 2 | includes=pcre/pcre.h 3 | targets=libpcre,libpcre.pc 4 | cppflags_force=-nostdinc -isystem ../../include -DHAVE_CONFIG_H 5 | cflags_force=-ffreestanding 6 | cflags=-W -Wall -g -O2 -fstack-protector 7 | ldflags_force=-nostdlib -lc -L$(OBJDIR).. $(OBJDIR)../ssp/libssp.a 8 | ldflags=-Wl,-z,relro -Wl,-z,now 9 | dist=Makefile,libpcre.pc.in 10 | 11 | #targets 12 | [libpcre] 13 | type=library 14 | sources=pcre/pcre_byte_order.c,pcre/pcre_chartables.c,pcre/pcre_compile.c,pcre/pcre_config.c,pcre/pcre_dfa_exec.c,pcre/pcre_exec.c,pcre/pcre_fullinfo.c,pcre/pcre_get.c,pcre/pcre_globals.c,pcre/pcre_jit_compile.c,pcre/pcre_maketables.c,pcre/pcre_newline.c,pcre/pcre_ord2utf8.c,pcre/pcre_refcount.c,pcre/pcre_string_utils.c,pcre/pcre_study.c,pcre/pcre_tables.c,pcre/pcre_ucd.c,pcre/pcre_valid_utf8.c,pcre/pcre_version.c,pcre/pcre_xclass.c 15 | cflags=-fPIC 16 | install=$(LIBDIR) 17 | 18 | [libpcre.pc] 19 | type=script 20 | script=../../tools/pkgconfig.sh 21 | flags=-O PACKAGE=pcre -O VERSION=8.45 22 | depends=../../tools/pkgconfig.sh,libpcre.pc.in 23 | install= 24 | -------------------------------------------------------------------------------- /include/kernel/openbsd/sys/project.conf: -------------------------------------------------------------------------------- 1 | includes=ioctl.h,ipc.h,mman.h,mount.h,msg.h,ptrace.h,reboot.h,resource.h,select.h,stat.h,syscall.h,sysctl.h,time.h,utsname.h 2 | dist=Makefile 3 | 4 | [ioctl.h] 5 | install=$(INCLUDEDIR)/kernel/openbsd/sys 6 | 7 | [ipc.h] 8 | install=$(INCLUDEDIR)/kernel/openbsd/sys 9 | 10 | [mman.h] 11 | install=$(INCLUDEDIR)/kernel/openbsd/sys 12 | 13 | [mount.h] 14 | install=$(INCLUDEDIR)/kernel/openbsd/sys 15 | 16 | [msg.h] 17 | install=$(INCLUDEDIR)/kernel/openbsd/sys 18 | 19 | [ptrace.h] 20 | install=$(INCLUDEDIR)/kernel/openbsd/sys 21 | 22 | [reboot.h] 23 | install=$(INCLUDEDIR)/kernel/openbsd/sys 24 | 25 | [resource.h] 26 | install=$(INCLUDEDIR)/kernel/openbsd/sys 27 | 28 | [select.h] 29 | install=$(INCLUDEDIR)/kernel/openbsd/sys 30 | 31 | [stat.h] 32 | install=$(INCLUDEDIR)/kernel/openbsd/sys 33 | 34 | [syscall.h] 35 | install=$(INCLUDEDIR)/kernel/openbsd/sys 36 | 37 | [sysctl.h] 38 | install=$(INCLUDEDIR)/kernel/openbsd/sys 39 | 40 | [time.h] 41 | install=$(INCLUDEDIR)/kernel/openbsd/sys 42 | 43 | [utsname.h] 44 | install=$(INCLUDEDIR)/kernel/openbsd/sys 45 | -------------------------------------------------------------------------------- /include/compat/sys/project.conf: -------------------------------------------------------------------------------- 1 | includes=ioctl.h,ipc.h,mman.h,mount.h,msg.h,param.h,ptrace.h,reboot.h,resource.h,select.h,stat.h,syscall.h,sysctl.h,time.h,utsname.h,vt.h 2 | dist=Makefile 3 | 4 | [ioctl.h] 5 | install=$(INCLUDEDIR)/compat/sys 6 | 7 | [ipc.h] 8 | install=$(INCLUDEDIR)/compat/sys 9 | 10 | [mman.h] 11 | install=$(INCLUDEDIR)/compat/sys 12 | 13 | [mount.h] 14 | install=$(INCLUDEDIR)/compat/sys 15 | 16 | [msg.h] 17 | install=$(INCLUDEDIR)/compat/sys 18 | 19 | [param.h] 20 | install=$(INCLUDEDIR)/compat/sys 21 | 22 | [ptrace.h] 23 | install=$(INCLUDEDIR)/compat/sys 24 | 25 | [reboot.h] 26 | install=$(INCLUDEDIR)/compat/sys 27 | 28 | [resource.h] 29 | install=$(INCLUDEDIR)/compat/sys 30 | 31 | [select.h] 32 | install=$(INCLUDEDIR)/compat/sys 33 | 34 | [stat.h] 35 | install=$(INCLUDEDIR)/compat/sys 36 | 37 | [syscall.h] 38 | install=$(INCLUDEDIR)/compat/sys 39 | 40 | [sysctl.h] 41 | install=$(INCLUDEDIR)/compat/sys 42 | 43 | [time.h] 44 | install=$(INCLUDEDIR)/compat/sys 45 | 46 | [utsname.h] 47 | install=$(INCLUDEDIR)/compat/sys 48 | 49 | [vt.h] 50 | install=$(INCLUDEDIR)/compat/sys 51 | -------------------------------------------------------------------------------- /src/socket/project.conf: -------------------------------------------------------------------------------- 1 | subdirs=kernel/darwin,kernel/freebsd,kernel/linux,kernel/netbsd,kernel/openbsd 2 | targets=libsocket 3 | as=$(CC) 4 | cppflags_force=-nostdinc -isystem ../../include -isystem ../../include/socket 5 | cflags_force=-ffreestanding -fPIC 6 | cflags=-W -Wall -g -O2 -fstack-protector 7 | asflags_force=$(CFLAGSF) 8 | asflags=$(CFLAGS) -c 9 | ldflags_force=-nostdlib -lc -L$(OBJDIR).. $(OBJDIR)../ssp/libssp.a 10 | ldflags=-Wl,-z,relro -Wl,-z,now 11 | dist=Makefile,syscalls.h 12 | 13 | #targets 14 | [libsocket] 15 | type=library 16 | sources=arpa/inet.c,netdb.c,sys/socket.c,syscalls.S 17 | install=$(LIBDIR) 18 | 19 | #sources 20 | [sys/socket.c] 21 | depends=kernel/linux/common.h,kernel/netbsd/common.h,syscalls.h 22 | 23 | [syscalls.S] 24 | depends=kernel/darwin/amd64/syscalls.S,kernel/freebsd/common.h,kernel/freebsd/amd64/syscalls.S,kernel/freebsd/i386/syscalls.S,kernel/linux/common.h,kernel/linux/amd64/syscalls.S,kernel/linux/arm/syscalls.S,kernel/linux/i386/syscalls.S,kernel/netbsd/amd64/syscalls.S,kernel/netbsd/arm/syscalls.S,kernel/netbsd/i386/syscalls.S,kernel/netbsd/common.h,kernel/netbsd/sparc/syscalls.S,kernel/openbsd/common.h,kernel/openbsd/arm/syscalls.S,kernel/openbsd/i386/syscalls.S 25 | -------------------------------------------------------------------------------- /include/kernel/netbsd/sys/project.conf: -------------------------------------------------------------------------------- 1 | includes=ioctl.h,ipc.h,mman.h,mount.h,msg.h,param.h,ptrace.h,reboot.h,resource.h,select.h,stat.h,syscall.h,sysctl.h,time.h,utsname.h,vt.h 2 | dist=Makefile 3 | 4 | [ioctl.h] 5 | install=$(INCLUDEDIR)/kernel/netbsd/sys 6 | 7 | [ipc.h] 8 | install=$(INCLUDEDIR)/kernel/netbsd/sys 9 | 10 | [mman.h] 11 | install=$(INCLUDEDIR)/kernel/netbsd/sys 12 | 13 | [mount.h] 14 | install=$(INCLUDEDIR)/kernel/netbsd/sys 15 | 16 | [msg.h] 17 | install=$(INCLUDEDIR)/kernel/netbsd/sys 18 | 19 | [param.h] 20 | install=$(INCLUDEDIR)/kernel/netbsd/sys 21 | 22 | [ptrace.h] 23 | install=$(INCLUDEDIR)/kernel/netbsd/sys 24 | 25 | [reboot.h] 26 | install=$(INCLUDEDIR)/kernel/netbsd/sys 27 | 28 | [resource.h] 29 | install=$(INCLUDEDIR)/kernel/netbsd/sys 30 | 31 | [select.h] 32 | install=$(INCLUDEDIR)/kernel/netbsd/sys 33 | 34 | [stat.h] 35 | install=$(INCLUDEDIR)/kernel/netbsd/sys 36 | 37 | [syscall.h] 38 | install=$(INCLUDEDIR)/kernel/netbsd/sys 39 | 40 | [sysctl.h] 41 | install=$(INCLUDEDIR)/kernel/netbsd/sys 42 | 43 | [time.h] 44 | install=$(INCLUDEDIR)/kernel/netbsd/sys 45 | 46 | [utsname.h] 47 | install=$(INCLUDEDIR)/kernel/netbsd/sys 48 | 49 | [vt.h] 50 | install=$(INCLUDEDIR)/kernel/netbsd/sys 51 | -------------------------------------------------------------------------------- /.github/workflows/deforaos-c-ci_ubuntu-latest.yml: -------------------------------------------------------------------------------- 1 | name: DeforaOS C CI (ubuntu-latest) 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | pull_request: 7 | branches: [ master ] 8 | 9 | jobs: 10 | build: 11 | 12 | runs-on: ubuntu-latest 13 | 14 | steps: 15 | - uses: actions/checkout@v4 16 | - name: bootstrap libSystem 17 | run: git clone https://github.com/DeforaOS/libSystem.git libSystem && for dir in include data src; do (cd libSystem/$dir && make PREFIX="$HOME/opt/DeforaOS" install); done 18 | - name: bootstrap configure 19 | run: git clone https://github.com/DeforaOS/configure.git configure && (cd configure/src && PKG_CONFIG_PATH="$HOME/opt/DeforaOS/lib/pkgconfig" make PREFIX="$HOME/opt/DeforaOS" install) 20 | - name: configure 21 | run: $HOME/opt/DeforaOS/bin/configure -p "$HOME/opt/DeforaOS" 22 | - name: make 23 | run: PKG_CONFIG_PATH="$HOME/opt/DeforaOS/lib/pkgconfig" make CCSHARED="cc -shared" 24 | - name: make tests 25 | run: PKG_CONFIG_PATH="$HOME/opt/DeforaOS/lib/pkgconfig" make CCSHARED="cc -shared" tests 26 | - name: make distcheck 27 | run: PKG_CONFIG_PATH="$HOME/opt/DeforaOS/lib/pkgconfig" make CCSHARED="cc -shared" distcheck 28 | -------------------------------------------------------------------------------- /src/chacha/ecrypt-machine.h: -------------------------------------------------------------------------------- 1 | /* ecrypt-machine.h */ 2 | 3 | /* 4 | * This file is included by 'ecrypt-portable.h'. It allows to override 5 | * the default macros for specific platforms. Please carefully check 6 | * the machine code generated by your compiler (with optimisations 7 | * turned on) before deciding to edit this file. 8 | */ 9 | 10 | /* ------------------------------------------------------------------------- */ 11 | 12 | #if (defined(ECRYPT_DEFAULT_ROT) && !defined(ECRYPT_MACHINE_ROT)) 13 | 14 | #define ECRYPT_MACHINE_ROT 15 | 16 | #if (defined(WIN32) && defined(_MSC_VER)) 17 | 18 | #undef ROTL32 19 | #undef ROTR32 20 | #undef ROTL64 21 | #undef ROTR64 22 | 23 | #include 24 | 25 | #define ROTL32(v, n) _lrotl(v, n) 26 | #define ROTR32(v, n) _lrotr(v, n) 27 | #define ROTL64(v, n) _rotl64(v, n) 28 | #define ROTR64(v, n) _rotr64(v, n) 29 | 30 | #endif 31 | 32 | #endif 33 | 34 | /* ------------------------------------------------------------------------- */ 35 | 36 | #if (defined(ECRYPT_DEFAULT_SWAP) && !defined(ECRYPT_MACHINE_SWAP)) 37 | 38 | #define ECRYPT_MACHINE_SWAP 39 | 40 | /* 41 | * If you want to overwrite the default swap macros, put it here. And so on. 42 | */ 43 | 44 | #endif 45 | 46 | /* ------------------------------------------------------------------------- */ 47 | -------------------------------------------------------------------------------- /include/sys/project.conf: -------------------------------------------------------------------------------- 1 | includes=ioctl.h,ipc.h,mman.h,mount.h,msg.h,param.h,ptrace.h,reboot.h,resource.h,select.h,shm.h,stat.h,statvfs.h,syscall.h,sysctl.h,time.h,times.h,types.h,uio.h,utsname.h,vt.h,wait.h 2 | dist=Makefile 3 | 4 | [ioctl.h] 5 | install=$(INCLUDEDIR)/sys 6 | 7 | [ipc.h] 8 | install=$(INCLUDEDIR)/sys 9 | 10 | [mman.h] 11 | install=$(INCLUDEDIR)/sys 12 | 13 | [mount.h] 14 | install=$(INCLUDEDIR)/sys 15 | 16 | [msg.h] 17 | install=$(INCLUDEDIR)/sys 18 | 19 | [param.h] 20 | install=$(INCLUDEDIR)/sys 21 | 22 | [ptrace.h] 23 | install=$(INCLUDEDIR)/sys 24 | 25 | [reboot.h] 26 | install=$(INCLUDEDIR)/sys 27 | 28 | [resource.h] 29 | install=$(INCLUDEDIR)/sys 30 | 31 | [select.h] 32 | install=$(INCLUDEDIR)/sys 33 | 34 | [shm.h] 35 | install=$(INCLUDEDIR)/sys 36 | 37 | [stat.h] 38 | install=$(INCLUDEDIR)/sys 39 | 40 | [statvfs.h] 41 | install=$(INCLUDEDIR)/sys 42 | 43 | [syscall.h] 44 | install=$(INCLUDEDIR)/sys 45 | 46 | [sysctl.h] 47 | install=$(INCLUDEDIR)/sys 48 | 49 | [time.h] 50 | install=$(INCLUDEDIR)/sys 51 | 52 | [times.h] 53 | install=$(INCLUDEDIR)/sys 54 | 55 | [types.h] 56 | install=$(INCLUDEDIR)/sys 57 | 58 | [uio.h] 59 | install=$(INCLUDEDIR)/sys 60 | 61 | [utsname.h] 62 | install=$(INCLUDEDIR)/sys 63 | 64 | [vt.h] 65 | install=$(INCLUDEDIR)/sys 66 | 67 | [wait.h] 68 | install=$(INCLUDEDIR)/sys 69 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | Copyright (c) 2004-2020, Pierre Pronchery 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | 1. Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 11 | 2. Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /src/setjmp.c: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2008-2012 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #include "setjmp.h" 32 | -------------------------------------------------------------------------------- /src/float.c: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2009 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #include "float.h" 32 | 33 | 34 | /* FIXME implement */ 35 | -------------------------------------------------------------------------------- /tools/deforaos-gcc.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | #$Id$ 3 | #Copyright (c) 2014-2016 Pierre Pronchery 4 | #This file is part of DeforaOS System libc 5 | #Redistribution and use in source and binary forms, with or without 6 | #modification, are permitted provided that the following conditions are met: 7 | # 8 | # * Redistributions of source code must retain the above copyright notice, this 9 | # list of conditions and the following disclaimer. 10 | # * Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 14 | #THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | #AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | #IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | #DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 18 | #FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 | #DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 20 | #SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 21 | #CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 22 | #OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 | #OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | 25 | 26 | #variables 27 | #executables 28 | GCC="gcc" 29 | GCCARGS="-specs $DESTDIR@PREFIX@/lib/gcc/deforaos-gcc.specs" 30 | 31 | exec $GCC $GCCARGS "$@" 32 | -------------------------------------------------------------------------------- /tools/project.conf: -------------------------------------------------------------------------------- 1 | targets=deforaos-gcc,deforaos-gcc.specs,ldso,libgcc,tracer,uname 2 | cppflags_force=-isystem ../include -isystem ../include/dl -isystem ../include/math -isystem ../include/pthread -isystem ../include/rt -isystem ../include/socket 3 | as=$(CC) 4 | cflags_force=-ffreestanding -fPIC 5 | cflags=-W -Wall -g -O2 -fstack-protector 6 | asflags_force=$(CFLAGSF) 7 | asflags=$(CFLAGS) -c 8 | ldflags=-Wl,-z,relro -Wl,-z,now 9 | dist=Makefile,deforaos-gcc.in,deforaos-gcc.specs.in,ldso.sh,libgcc.sh,subst.sh,pkgconfig.sh,tracer-analyze.h,tracer-syscalls.h 10 | 11 | #targets 12 | [deforaos-gcc] 13 | type=script 14 | script=./subst.sh 15 | depends=deforaos-gcc.in,subst.sh,../config.sh 16 | install=$(PREFIX)/bin 17 | 18 | [deforaos-gcc.specs] 19 | type=script 20 | script=./subst.sh 21 | depends=deforaos-gcc.specs.in,subst.sh,../config.sh 22 | install=$(PREFIX)/lib/gcc 23 | 24 | [ldso] 25 | type=script 26 | script=./ldso.sh 27 | depends=ldso.sh 28 | install=$(PREFIX)/lib 29 | phony=1 30 | 31 | [libgcc] 32 | type=script 33 | script=./libgcc.sh 34 | depends=libgcc.sh 35 | install=$(PREFIX)/lib 36 | phony=1 37 | 38 | [tracer] 39 | type=plugin 40 | sources=tracer-analyze.c,tracer-syscalls.S 41 | 42 | [uname] 43 | type=binary 44 | sources=uname.c 45 | ldflags=-nostdlib -L$(OBJDIR)../src -Wl,-rpath,$(OBJDIR)../src $(OBJDIR)../src/start.o $(OBJDIR)../src/crti.o $(OBJDIR)../src/crtbegin.o -lc $(OBJDIR)../src/ssp/libssp.a $(OBJDIR)../src/crtend.o $(OBJDIR)../src/crtn.o `$(CC) -print-libgcc-file-name` -pie 46 | 47 | #sources 48 | [tracer-analyze.c] 49 | depends=tracer-syscalls.h,../src/syscalls.h,tracer-analyze.h 50 | 51 | [tracer-syscalls.S] 52 | depends=tracer-analyze.h 53 | -------------------------------------------------------------------------------- /src/errno.c: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2011 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #include "errno.h" 32 | 33 | 34 | /* public */ 35 | /* variables */ 36 | int errno = 0; 37 | -------------------------------------------------------------------------------- /src/kernel/freebsd/amd64/crti.S: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2024 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | /* sections */ 32 | /* .note.GNU-stack */ 33 | .section .note.GNU-stack 34 | -------------------------------------------------------------------------------- /src/kernel/freebsd/amd64/crtn.S: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2024 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | /* sections */ 32 | /* .note.GNU-stack */ 33 | .section .note.GNU-stack 34 | -------------------------------------------------------------------------------- /include/wctype.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2008 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_WCTYPE_H 32 | # define LIBC_WCTYPE_H 33 | 34 | /* FIXME implement */ 35 | 36 | #endif /* !LIBC_WCTYPE_H */ 37 | -------------------------------------------------------------------------------- /include/sys/vt.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2009-2016 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_SYS_VT_H 32 | # define LIBC_SYS_VT_H 33 | 34 | # include "../compat/sys/vt.h" 35 | 36 | #endif /* !LIBC_SYS_VT_H */ 37 | -------------------------------------------------------------------------------- /include/sys/param.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2010-2017 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_SYS_PARAM_H 32 | # define LIBC_SYS_PARAM_H 33 | 34 | # include "compat/sys/param.h" 35 | 36 | #endif /* !LIBC_SYS_PARAM_H */ 37 | -------------------------------------------------------------------------------- /include/nl_types.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2009 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_NL_TYPES_H 32 | # define LIBC_NL_TYPES_H 33 | 34 | 35 | /* types */ 36 | typedef long nl_item; 37 | 38 | #endif /* !LIBC_NL_TYPES_H */ 39 | -------------------------------------------------------------------------------- /include/socket/sys/un.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2008-2016 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBSOCKET_SYS_UN_H 32 | # define LIBSOCKET_SYS_UN_H 33 | 34 | # include "../compat/sys/un.h" 35 | 36 | #endif /* !LIBSOCKET_SYS_UN_H */ 37 | -------------------------------------------------------------------------------- /src/kernel/linux/amd64/crtn.S: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2018 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | /* sections */ 32 | /* init */ 33 | .section .init 34 | pop %rbp 35 | ret 36 | 37 | 38 | /* fini */ 39 | .section .fini 40 | pop %rbp 41 | ret 42 | -------------------------------------------------------------------------------- /src/kernel/linux/i386/crtn.S: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2018 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | /* sections */ 32 | /* init */ 33 | .section .init 34 | pop %ebp 35 | ret 36 | 37 | 38 | /* fini */ 39 | .section .fini 40 | pop %ebp 41 | ret 42 | -------------------------------------------------------------------------------- /src/kernel/netbsd/amd64/crtn.S: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2018 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | /* sections */ 32 | /* init */ 33 | .section .init 34 | pop %rbp 35 | ret 36 | 37 | 38 | /* fini */ 39 | .section .fini 40 | pop %rbp 41 | ret 42 | -------------------------------------------------------------------------------- /src/kernel/netbsd/i386/crtn.S: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2018 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | /* sections */ 32 | /* init */ 33 | .section .init 34 | pop %ebp 35 | ret 36 | 37 | 38 | /* fini */ 39 | .section .fini 40 | pop %ebp 41 | ret 42 | -------------------------------------------------------------------------------- /include/semaphore.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2008 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_SEMAPHORE_H 32 | # define LIBC_SEMAPHORE_H 33 | 34 | /* types */ 35 | typedef struct _sem_t * sem_t; 36 | 37 | 38 | #endif /* LIBC_SEMAPHORE_H */ 39 | -------------------------------------------------------------------------------- /include/sys/syscall.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2012-2016 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_SYS_SYSCALL_H 32 | # define LIBC_SYS_SYSCALL_H 33 | 34 | 35 | # include "../compat/sys/syscall.h" 36 | 37 | #endif /* !LIBC_SYS_SYSCALL_H */ 38 | -------------------------------------------------------------------------------- /src/math/arch.S: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2008 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #if defined(__amd64__) 32 | # include "amd64/math.S" 33 | #elif defined(__i386__) 34 | # include "i386/math.S" 35 | #else 36 | # warning "Unsupported platform" 37 | #endif 38 | -------------------------------------------------------------------------------- /tools/tracer-syscalls.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2012 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_TRACER_SYSCALLS_H 32 | # define LIBC_TRACER_SYSCALLS_H 33 | 34 | 35 | int syscall(int number, ...); 36 | 37 | #endif /* !LIBC_TRACER_SYSCALLS_H */ 38 | -------------------------------------------------------------------------------- /include/errno.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2008 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_ERRNO_H 32 | # define LIBC_ERRNO_H 33 | 34 | # include "compat/errno.h" 35 | 36 | 37 | /* variables */ 38 | extern int errno; 39 | 40 | #endif /* !LIBC_ERRNO_H */ 41 | -------------------------------------------------------------------------------- /src/langinfo.c: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2008-2013 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #include "langinfo.h" 32 | 33 | 34 | /* functions */ 35 | /* langinfo */ 36 | char * nl_langinfo(nl_item item) 37 | { 38 | /* FIXME really implement */ 39 | return ""; 40 | } 41 | -------------------------------------------------------------------------------- /src/start.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2016-2017 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_SRC_START_H 32 | # define LIBC_SRC_START_H 33 | 34 | 35 | /* functions */ 36 | /* protected */ 37 | void __start_stdio(void); 38 | 39 | #endif /* !LIBC_SRC_START_H */ 40 | -------------------------------------------------------------------------------- /include/libgen.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2008 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_LIBGEN_H 32 | # define LIBC_LIBGEN_H 33 | 34 | 35 | /* functions */ 36 | char * basename(char * path); 37 | char * dirname(char * path); 38 | 39 | #endif /* !LIBC_LIBGEN_H */ 40 | -------------------------------------------------------------------------------- /include/stropts.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2008 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_STROPTS_H 32 | # define LIBC_STROPTS_H 33 | 34 | # include "compat/stropts.h" 35 | 36 | 37 | /* functions */ 38 | int ioctl(int fildes, int request, ...); 39 | 40 | #endif /* !LIBC_STROPTS_H */ 41 | -------------------------------------------------------------------------------- /include/sys/reboot.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2008 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_SYS_REBOOT_H 32 | # define LIBC_SYS_REBOOT_H 33 | 34 | # include "../compat/sys/reboot.h" 35 | 36 | 37 | /* functions */ 38 | int reboot(int flags); 39 | 40 | #endif /* !LIBC_SYS_REBOOT_H */ 41 | -------------------------------------------------------------------------------- /tools/tracer-analyze.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2012-2017 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_TRACER_ANALYZE_H 32 | # define LIBC_TRACER_ANALYZE_H 33 | 34 | 35 | void analyze(int number, long arg1, long arg2, long arg3, long arg4); 36 | 37 | #endif /* !LIBC_TRACER_ANALYZE_H */ 38 | -------------------------------------------------------------------------------- /include/kernel/linux/sys/ioctl.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2009 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_KERNEL_LINUX_SYS_IOCTL_H 32 | # define LIBC_KERNEL_LINUX_SYS_IOCTL_H 33 | 34 | 35 | /* constants */ 36 | # define TCGETS 0x5401 37 | 38 | 39 | #endif /* !LIBC_KERNEL_LINUX_SYS_IOCTL_H */ 40 | -------------------------------------------------------------------------------- /include/compat/sys/param.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2017 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_COMPAT_SYS_PARAM_H 32 | # define LIBC_COMPAT_SYS_PARAM_H 33 | 34 | 35 | # if defined(__NetBSD__) 36 | # include "kernel/netbsd/sys/param.h" 37 | # endif 38 | 39 | #endif /* !LIBC_COMPAT_SYS_PARAM_H */ 40 | -------------------------------------------------------------------------------- /include/kernel/netbsd/stropts.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2008 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_KERNEL_NETBSD_STROPTS_H 32 | # define LIBC_KERNEL_NETBSD_STROPTS_H 33 | 34 | 35 | /* constants */ 36 | # define I_PUSH -1 /* XXX not implemented */ 37 | 38 | #endif /* !LIBC_KERNEL_NETBSD_STROPTS_H */ 39 | -------------------------------------------------------------------------------- /include/kernel/netbsd/sys/param.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2017 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_KERNEL_NETBSD_SYS_PARAM_H 32 | # define LIBC_KERNEL_NETBSD_SYS_PARAM_H 33 | 34 | 35 | /* constants */ 36 | # define __NetBSD_Version__ 600000000 37 | 38 | #endif /* !LIBC_KERNEL_NETBSD_SYS_PARAM_H */ 39 | -------------------------------------------------------------------------------- /include/sys/ioctl.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2007-2016 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_SYS_IOCTL_H 32 | # define LIBC_SYS_IOCTL_H 33 | 34 | # include "../compat/sys/ioctl.h" 35 | 36 | 37 | /* functions */ 38 | int ioctl(int fildes, int request, ...); 39 | 40 | #endif /* !LIBC_SYS_IOCTL_H */ 41 | -------------------------------------------------------------------------------- /src/kernel/openbsd/start.S: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2018 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #include "sys/param.h" 32 | 33 | 34 | /* OpenBSD emulation */ 35 | .section ".note.openbsd.ident", "a" 36 | .p2align 2 37 | .long 8 38 | .long 4 39 | .long 1 40 | .ascii "OpenBSD\0" 41 | .long 0 42 | .previous 43 | -------------------------------------------------------------------------------- /include/socket/kernel/linux/netinet/tcp.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2011 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBSOCKET_KERNEL_LINUX_NETINET_TCP_H 32 | # define LIBSOCKET_KERNEL_LINUX_NETINET_TCP_H 33 | 34 | 35 | /* constants */ 36 | # define TCP_NODELAY 0x1 37 | 38 | #endif /* !LIBSOCKET_KERNEL_LINUX_NETINET_TCP_H */ 39 | -------------------------------------------------------------------------------- /src/ssp.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2015-2017 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_SRC_SSP_H 32 | # define LIBC_SRC_SSP_H 33 | 34 | 35 | /* functions */ 36 | /* protected */ 37 | # ifdef __SSP__ 38 | void __stack_chk_fail(void); 39 | void __stack_chk_setup(void); 40 | # endif 41 | 42 | #endif /* !LIBC_SRC_SSP_H */ 43 | -------------------------------------------------------------------------------- /include/kernel/darwin/limits.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2016 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_KERNEL_DARWIN_LIMITS_H 32 | # define LIBC_KERNEL_DARWIN_LIMITS_H 33 | 34 | 35 | /* constants */ 36 | # ifndef LOGIN_NAME_MAX 37 | # define LOGIN_NAME_MAX 73 38 | # endif 39 | 40 | #endif /* !LIBC_KERNEL_DARWIN_LIMITS_H */ 41 | -------------------------------------------------------------------------------- /include/kernel/linux/limits.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2008 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_KERNEL_LINUX_LIMITS_H 32 | # define LIBC_KERNEL_LINUX_LIMITS_H 33 | 34 | 35 | /* constants */ 36 | # ifndef LOGIN_NAME_MAX 37 | # define LOGIN_NAME_MAX 256 38 | # endif 39 | 40 | #endif /* !LIBC_KERNEL_LINUX_LIMITS_H */ 41 | -------------------------------------------------------------------------------- /include/kernel/netbsd/limits.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2009 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_KERNEL_NETBSD_LIMITS_H 32 | # define LIBC_KERNEL_NETBSD_LIMITS_H 33 | 34 | 35 | /* constants */ 36 | # ifndef LOGIN_NAME_MAX 37 | # define LOGIN_NAME_MAX 17 38 | # endif 39 | 40 | #endif /* !LIBC_KERNEL_NETBSD_LIMITS_H */ 41 | -------------------------------------------------------------------------------- /include/socket/kernel/netbsd/netinet/tcp.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2011 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBSOCKET_KERNEL_NETBSD_NETINET_TCP_H 32 | # define LIBSOCKET_KERNEL_NETBSD_NETINET_TCP_H 33 | 34 | 35 | /* constants */ 36 | # define TCP_NODELAY 0x1 37 | 38 | #endif /* !LIBSOCKET_KERNEL_NETBSD_NETINET_TCP_H */ 39 | -------------------------------------------------------------------------------- /include/sys/ptrace.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2012 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_SYS_PTRACE_H 32 | # define LIBC_SYS_PTRACE_H 33 | 34 | # include "../compat/sys/ptrace.h" 35 | 36 | 37 | /* functions */ 38 | int ptrace(int request, pid_t pid, void * address, int data); 39 | 40 | #endif /* !LIBC_SYS_PTRACE_H */ 41 | -------------------------------------------------------------------------------- /include/compat/time.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2007-2017 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_COMPAT_TIME_H 32 | # define LIBC_COMPAT_TIME_H 33 | 34 | 35 | # if defined(__NetBSD__) 36 | # include "kernel/netbsd/time.h" 37 | # else 38 | # warning Unsupported platform 39 | # endif 40 | 41 | #endif /* !LIBC_COMPAT_TIME_H */ 42 | -------------------------------------------------------------------------------- /include/kernel/freebsd/limits.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2009 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_KERNEL_FREEBSD_LIMITS_H 32 | # define LIBC_KERNEL_FREEBSD_LIMITS_H 33 | 34 | 35 | /* constants */ 36 | # ifndef LOGIN_NAME_MAX 37 | # define LOGIN_NAME_MAX 9 38 | # endif 39 | 40 | #endif /* !LIBC_KERNEL_FREEBSD_LIMITS_H */ 41 | -------------------------------------------------------------------------------- /include/kernel/openbsd/limits.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2009 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_KERNEL_OPENBSD_LIMITS_H 32 | # define LIBC_KERNEL_OPENBSD_LIMITS_H 33 | 34 | 35 | /* constants */ 36 | # ifndef LOGIN_NAME_MAX 37 | # define LOGIN_NAME_MAX 32 38 | # endif 39 | 40 | #endif /* !LIBC_KERNEL_OPENBSD_LIMITS_H */ 41 | -------------------------------------------------------------------------------- /include/socket/kernel/freebsd/netinet/tcp.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2011 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBSOCKET_KERNEL_FREEBSD_NETINET_TCP_H 32 | # define LIBSOCKET_KERNEL_FREEBSD_NETINET_TCP_H 33 | 34 | 35 | /* constants */ 36 | # define TCP_NODELAY 0x1 37 | 38 | #endif /* !LIBSOCKET_KERNEL_FREEBSD_NETINET_TCP_H */ 39 | -------------------------------------------------------------------------------- /src/sys/ipc.c: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2008-2014 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #include "../syscalls.h" 32 | #include "sys/ipc.h" 33 | #include "errno.h" 34 | 35 | 36 | /* functions */ 37 | /* ftok */ 38 | key_t ftok(const char * path, int id) 39 | { 40 | /* TODO really implement */ 41 | errno = ENOSYS; 42 | return -1; 43 | } 44 | -------------------------------------------------------------------------------- /include/compat/sys/vt.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2009 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_COMPAT_SYS_VT_H 32 | # define LIBC_COMPAT_SYS_VT_H 33 | 34 | 35 | # if defined(__NetBSD__) 36 | # include "kernel/netbsd/sys/vt.h" 37 | # else 38 | # warning Unsupported platform 39 | # endif 40 | 41 | #endif /* !LIBC_COMPAT_SYS_VT_H */ 42 | -------------------------------------------------------------------------------- /include/complex.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2008 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_COMPLEX_H 32 | # define LIBC_COMPLEX_H 33 | 34 | 35 | /* types */ 36 | # ifndef complex 37 | # define complex _Complex 38 | # endif 39 | # ifndef imaginary 40 | # define imaginary _Imaginary 41 | # endif 42 | 43 | #endif /* !LIBC_COMPLEX_H */ 44 | -------------------------------------------------------------------------------- /include/kernel/deforaos/limits.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2019 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_KERNEL_DEFORAOS_LIMITS_H 32 | # define LIBC_KERNEL_DEFORAOS_LIMITS_H 33 | 34 | 35 | /* constants */ 36 | # ifndef LOGIN_NAME_MAX 37 | # define LOGIN_NAME_MAX 256 38 | # endif 39 | 40 | #endif /* !LIBC_KERNEL_DEFORAOS_LIMITS_H */ 41 | -------------------------------------------------------------------------------- /src/ssp/ssp.c: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2016 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #include "ssp.h" 32 | 33 | 34 | #if defined(__SSP__) 35 | /* functions */ 36 | # ifdef __PIC__ 37 | # ifdef __i386__ 38 | /* stack_chk_fail_local */ 39 | void __stack_chk_fail_local(void) 40 | { 41 | __stack_chk_fail(); 42 | } 43 | # endif 44 | # endif 45 | #endif 46 | -------------------------------------------------------------------------------- /include/compat/ucontext.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2009 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_COMPAT_UCONTEXT_H 32 | # define LIBC_COMPAT_UCONTEXT_H 33 | 34 | 35 | # if defined(__NetBSD__) 36 | # include "kernel/netbsd/ucontext.h" 37 | # else 38 | # warning Unsupported platform 39 | # endif 40 | 41 | #endif /* !LIBC_COMPAT_UCONTEXT_H */ 42 | -------------------------------------------------------------------------------- /include/kernel/netbsd/time.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2007-2017 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_KERNEL_NETBSD_TIME_H 32 | # define LIBC_KERNEL_NETBSD_TIME_H 33 | 34 | 35 | /* constants */ 36 | #define CLOCK_REALTIME 0 37 | #define CLOCK_MONOTONIC 3 38 | 39 | #define TIMER_ABSTIME 1 40 | 41 | #endif /* !LIBC_KERNEL_NETBSD_TIME_H */ 42 | -------------------------------------------------------------------------------- /src/kernel/deforaos/common.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2019 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef KERNEL_DEFORAOS_COMMON_H 32 | # define KERNEL_DEFORAOS_COMMON_H 33 | 34 | 35 | # undef SYS_gettimeofday 36 | # undef SYS_mmap 37 | # undef SYS_mprotect 38 | # undef SYS_munmap 39 | # undef SYS_write 40 | 41 | #endif /* !KERNEL_DEFORAOS_COMMON_H */ 42 | -------------------------------------------------------------------------------- /src/kernel/netbsd/start.S: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2007-2017 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #include "sys/param.h" 32 | 33 | 34 | /* NetBSD emulation */ 35 | .section ".note.netbsd.ident", "a" 36 | .p2align 2 37 | 38 | .long 7 39 | .long 4 40 | .long 1 41 | .ascii "NetBSD\0\0" 42 | .long __NetBSD_Version__ 43 | .previous 44 | .p2align 2 45 | -------------------------------------------------------------------------------- /include/stdbool.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2009 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_STDBOOL_H 32 | # define LIBC_STDBOOL_H 33 | 34 | 35 | /* types */ 36 | typedef _Bool bool; 37 | 38 | 39 | /* constants */ 40 | # define false 0 41 | # define true 1 42 | 43 | # define __bool_true_false_are_defined 1 44 | 45 | #endif /* !LIBC_STDBOOL_H */ 46 | -------------------------------------------------------------------------------- /src/math/arch.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2009-2017 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBM_ARCH_H 32 | # define LIBM_ARCH_H 33 | 34 | 35 | #if defined(__amd64__) 36 | # include "amd64/math.h" 37 | #elif defined(__i386__) 38 | # include "i386/math.h" 39 | #else 40 | # warning "Unsupported platform" 41 | #endif 42 | 43 | #endif /* !LIBM_ARCH_H */ 44 | -------------------------------------------------------------------------------- /src/sys/reboot.c: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2009 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #include "../syscalls.h" 32 | #include "sys/reboot.h" 33 | 34 | 35 | /* reboot */ 36 | #ifndef SYS_reboot 37 | # warning Unsupported platform: reboot() is missing 38 | # include "errno.h" 39 | int reboot(int flags) 40 | { 41 | errno = ENOSYS; 42 | return -1; 43 | } 44 | #endif 45 | -------------------------------------------------------------------------------- /include/kernel/whitix/limits.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2008 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_KERNEL_WHITIX_LIMITS_H 32 | # define LIBC_KERNEL_WHITIX_LIMITS_H 33 | 34 | 35 | /* FIXME nothing checked */ 36 | /* constants */ 37 | # ifndef LOGIN_NAME_MAX 38 | # define LOGIN_NAME_MAX 256 39 | # endif 40 | 41 | #endif /* !LIBC_KERNEL_WHITIX_LIMITS_H */ 42 | -------------------------------------------------------------------------------- /src/stropts.c: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2009 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #include "errno.h" 32 | #include "syscalls.h" 33 | #include "stropts.h" 34 | 35 | 36 | /* ioctl */ 37 | #ifndef SYS_ioctl 38 | # warning Unsupported platform: ioctl() is missing 39 | int ioctl(int fildes, int request, ...) 40 | { 41 | errno = ENOSYS; 42 | return -1; 43 | } 44 | #endif 45 | -------------------------------------------------------------------------------- /include/glob.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2008-2012 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_GLOB_H 32 | # define LIBC_GLOB_H 33 | 34 | 35 | /* types */ 36 | # ifndef glob_t 37 | # define glob_t glob_t 38 | typedef struct _glob_t 39 | { 40 | size_t gl_pathc; 41 | char ** gl_pathv; 42 | size_t gl_offs; 43 | } glob_t; 44 | # endif 45 | 46 | #endif /* !LIBC_GLOB_H */ 47 | -------------------------------------------------------------------------------- /src/socket/kernel/openbsd/i386/syscalls.S: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2016 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | _syscall: 32 | int $0x80 33 | jnc .errnoret 34 | .errno: 35 | mov %eax, errno 36 | mov $-1, %eax 37 | .errnoret: 38 | ret 39 | 40 | 41 | /* macros */ 42 | #define SYSCALL(name) \ 43 | .global name; \ 44 | name:; \ 45 | mov $SYS_ ## name, %eax; \ 46 | jmp _syscall 47 | -------------------------------------------------------------------------------- /src/kernel/linux/amd64/crti.S: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2018 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | /* sections */ 32 | /* init */ 33 | .section .init 34 | .global _init 35 | .type _init,@function 36 | _init: 37 | push %rbp 38 | mov %rsp, %rbp 39 | 40 | 41 | /* fini */ 42 | .section .fini 43 | .global _fini 44 | .type _fini,@function 45 | _fini: 46 | push %rbp 47 | mov %rsp, %rbp 48 | -------------------------------------------------------------------------------- /src/kernel/linux/i386/crti.S: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2018 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | /* sections */ 32 | /* init */ 33 | .section .init 34 | .global _init 35 | .type _init,@function 36 | _init: 37 | push %ebp 38 | movl %esp, %ebp 39 | 40 | 41 | /* fini */ 42 | .section .fini 43 | .global _fini 44 | .type _fini,@function 45 | _fini: 46 | push %ebp 47 | movl %esp, %ebp 48 | -------------------------------------------------------------------------------- /src/kernel/netbsd/amd64/crti.S: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2018 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | /* sections */ 32 | /* init */ 33 | .section .init 34 | .global _init 35 | .type _init,@function 36 | _init: 37 | push %rbp 38 | mov %rsp, %rbp 39 | 40 | 41 | /* fini */ 42 | .section .fini 43 | .global _fini 44 | .type _fini,@function 45 | _fini: 46 | push %rbp 47 | mov %rsp, %rbp 48 | -------------------------------------------------------------------------------- /src/sys/ioctl.c: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2007-2019 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #include "../syscalls.h" 32 | #include "errno.h" 33 | #include "sys/ioctl.h" 34 | 35 | 36 | /* functions */ 37 | #ifndef SYS_ioctl 38 | # warning Unsupported platform: ioctl() is missing 39 | int ioctl(int fildes, int request, ...) 40 | { 41 | errno = ENOSYS; 42 | return -1; 43 | } 44 | #endif 45 | -------------------------------------------------------------------------------- /include/kernel/darwin/sys/ptrace.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2022 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_KERNEL_DARWIN_SYS_PTRACE_H 32 | # define LIBC_KERNEL_DARWIN_SYS_PTRACE_H 33 | 34 | 35 | /* constants */ 36 | # define PT_TRACE_ME 0 37 | # define PT_CONTINUE 7 38 | # define PT_ATTACH 10 39 | # define PT_DETACH 11 40 | 41 | #endif /* !LIBC_KERNEL_DARWIN_SYS_PTRACE_H */ 42 | -------------------------------------------------------------------------------- /src/kernel/netbsd/i386/crti.S: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2018 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | /* sections */ 32 | /* init */ 33 | .section .init 34 | .global _init 35 | .type _init,@function 36 | _init: 37 | push %ebp 38 | movl %esp, %ebp 39 | 40 | 41 | /* fini */ 42 | .section .fini 43 | .global _fini 44 | .type _fini,@function 45 | _fini: 46 | push %ebp 47 | movl %esp, %ebp 48 | -------------------------------------------------------------------------------- /include/kernel/openbsd/sys/ptrace.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2013 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_KERNEL_OPENBSD_SYS_PTRACE_H 32 | # define LIBC_KERNEL_OPENBSD_SYS_PTRACE_H 33 | 34 | 35 | /* constants */ 36 | # define PT_TRACE_ME 0 37 | # define PT_CONTINUE 7 38 | # define PT_ATTACH 9 39 | # define PT_DETACH 10 40 | 41 | #endif /* !LIBC_KERNEL_OPENBSD_SYS_PTRACE_H */ 42 | -------------------------------------------------------------------------------- /include/kernel/linux/sys/reboot.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2009 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_KERNEL_LINUX_SYS_REBOOT_H 32 | # define LIBC_KERNEL_LINUX_SYS_REBOOT_H 33 | 34 | 35 | /* constants */ 36 | /* reboot flag */ 37 | # define RF_HALT 0xcdef0123 38 | # define RF_POWEROFF 0x4321fedc 39 | # define RF_REBOOT 0x01234567 40 | 41 | #endif /* !LIBC_KERNEL_LINUX_SYS_REBOOT_H */ 42 | -------------------------------------------------------------------------------- /src/poll.c: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2009 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #include "errno.h" 32 | #include "syscalls.h" 33 | #include "poll.h" 34 | 35 | 36 | /* functions */ 37 | /* poll */ 38 | #ifndef SYS_poll 39 | # warning Unsupported platform: poll() is missing 40 | int poll(struct pollfd * fds, nfds_t nfds, int timeout) 41 | { 42 | errno = ENOSYS; 43 | return -1; 44 | } 45 | #endif 46 | -------------------------------------------------------------------------------- /include/compat/poll.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2009 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_COMPAT_POLL_H 32 | # define LIBC_COMPAT_POLL_H 33 | 34 | 35 | # if defined(__linux__) 36 | # include "kernel/linux/poll.h" 37 | # elif defined(__NetBSD__) 38 | # include "kernel/netbsd/poll.h" 39 | # else 40 | # warning Unsupported platform 41 | # endif 42 | 43 | #endif /* !LIBC_COMPAT_POLL_H */ 44 | -------------------------------------------------------------------------------- /include/kernel/netbsd/sys/reboot.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2009 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_KERNEL_NETBSD_SYS_REBOOT_H 32 | # define LIBC_KERNEL_NETBSD_SYS_REBOOT_H 33 | 34 | 35 | /* constants */ 36 | /* reboot flag */ 37 | # define RF_HALT 0x00000008 38 | # define RF_POWEROFF 0x00000808 39 | # define RF_REBOOT 0x00000000 40 | 41 | #endif /* !LIBC_KERNEL_NETBSD_SYS_REBOOT_H */ 42 | -------------------------------------------------------------------------------- /include/kernel/openbsd/sys/reboot.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2016 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_KERNEL_OPENBSD_SYS_REBOOT_H 32 | # define LIBC_KERNEL_OPENBSD_SYS_REBOOT_H 33 | 34 | 35 | /* constants */ 36 | /* reboot flag */ 37 | # define RF_HALT 0x00000008 38 | # define RF_POWEROFF 0x00001000 39 | # define RF_REBOOT 0x00000000 40 | 41 | #endif /* !LIBC_KERNEL_OPENBSD_SYS_REBOOT_H */ 42 | -------------------------------------------------------------------------------- /include/compat/net/if.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2011 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_COMPAT_NET_IF_H 32 | # define LIBC_COMPAT_NET_IF_H 33 | 34 | 35 | # if defined(__linux__) 36 | # include "kernel/linux/net/if.h" 37 | # elif defined(__NetBSD__) 38 | # include "kernel/netbsd/net/if.h" 39 | # else 40 | # warning Unsupported platform 41 | # endif 42 | 43 | #endif /* !LIBC_COMPAT_NET_IF_H */ 44 | -------------------------------------------------------------------------------- /src/socket/kernel/netbsd/i386/syscalls.S: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2008-2014 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | _syscall: 32 | int $0x80 33 | jnc .errnoret 34 | .errno: 35 | mov %eax, errno 36 | mov $-1, %eax 37 | .errnoret: 38 | ret 39 | 40 | 41 | /* macros */ 42 | #define SYSCALL(name) \ 43 | .global name; \ 44 | .type name,@function; \ 45 | name:; \ 46 | mov $SYS_ ## name, %eax; \ 47 | jmp _syscall 48 | -------------------------------------------------------------------------------- /src/socket/kernel/openbsd/arm/syscalls.S: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2016 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | _syscall: 32 | swi 33 | /* FIXME implement 34 | bcc .errnoret 35 | set errno, %g1 36 | st %o0, [%g1] 37 | set -1, %o0 38 | .errnoret: */ 39 | mov %pc, %lr 40 | 41 | 42 | /* macros */ 43 | #define SYSCALL(name) \ 44 | .global name; \ 45 | name:; \ 46 | ldr %ip, =SYS_ ## name; \ 47 | b _syscall; 48 | -------------------------------------------------------------------------------- /include/kernel/linux/sys/ptrace.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2012-2015 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_KERNEL_LINUX_SYS_PTRACE_H 32 | # define LIBC_KERNEL_LINUX_SYS_PTRACE_H 33 | 34 | 35 | /* constants */ 36 | # define PT_TRACE_ME 0 37 | # define PT_CONTINUE 7 38 | # define PT_ATTACH 16 39 | # define PT_DETACH 17 40 | # define PT_SYSCALL 24 41 | 42 | #endif /* !LIBC_KERNEL_LINUX_SYS_PTRACE_H */ 43 | -------------------------------------------------------------------------------- /include/kernel/openbsd/sys/time.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2007-2017 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_KERNEL_OPENBSD_SYS_TIME_H 32 | # define LIBC_KERNEL_OPENBSD_SYS_TIME_H 33 | 34 | 35 | /* types */ 36 | #ifndef timeval 37 | # define timeval timeval 38 | struct timeval 39 | { 40 | time_t tv_sec; 41 | suseconds_t tv_usec; 42 | }; 43 | #endif 44 | 45 | #endif /* !LIBC_KERNEL_OPENBSD_SYS_TIME_H */ 46 | -------------------------------------------------------------------------------- /include/kernel/solaris/sys/time.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2007-2017 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_KERNEL_SOLARIS_SYS_TIME_H 32 | # define LIBC_KERNEL_SOLARIS_SYS_TIME_H 33 | 34 | 35 | /* types */ 36 | #ifndef timeval 37 | # define timeval timeval 38 | struct timeval 39 | { 40 | time_t tv_sec; 41 | suseconds_t tv_usec; 42 | }; 43 | #endif 44 | 45 | #endif /* !LIBC_KERNEL_SOLARIS_SYS_TIME_H */ 46 | -------------------------------------------------------------------------------- /include/compat/stropts.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2008 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_COMPAT_STROPTS_H 32 | # define LIBC_COMPAT_STROPTS_H 33 | 34 | 35 | # if defined(__linux__) 36 | # include "kernel/linux/stropts.h" 37 | # elif defined(__NetBSD__) 38 | # include "kernel/netbsd/stropts.h" 39 | # else 40 | # warning Unsupported platform 41 | # endif 42 | 43 | #endif /* !LIBC_COMPAT_STROPTS_H */ 44 | -------------------------------------------------------------------------------- /include/kernel/deforaos/sys/syscall.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2019 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef KERNEL_DEFORAOS_SYS_SYSCALL_H 32 | # define KERNEL_DEFORAOS_SYS_SYSCALL_H 33 | 34 | 35 | /* constants */ 36 | /* syscalls */ 37 | # define SYS_gettimeofday 38 | # define SYS_mmap 39 | # define SYS_mprotect 40 | # define SYS_munmap 41 | # define SYS_write 42 | 43 | #endif /* !KERNEL_DEFORAOS_SYS_SYSCALL_H */ 44 | -------------------------------------------------------------------------------- /include/kernel/netbsd/sys/ptrace.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2012-2013 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_KERNEL_NETBSD_SYS_PTRACE_H 32 | # define LIBC_KERNEL_NETBSD_SYS_PTRACE_H 33 | 34 | 35 | /* constants */ 36 | # define PT_TRACE_ME 0 37 | # define PT_CONTINUE 7 38 | # define PT_ATTACH 9 39 | # define PT_DETACH 10 40 | # define PT_SYSCALL 14 41 | 42 | #endif /* !LIBC_KERNEL_NETBSD_SYS_PTRACE_H */ 43 | -------------------------------------------------------------------------------- /include/kernel/solaris/sys/select.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2007-2022 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_KERNEL_SOLARIS_SYS_TIME_H 32 | # define LIBC_KERNEL_SOLARIS_SYS_TIME_H 33 | 34 | 35 | /* types */ 36 | # ifndef timeval 37 | # define timeval timeval 38 | struct timeval 39 | { 40 | time_t tv_sec; 41 | suseconds_t tv_usec; 42 | }; 43 | # endif 44 | 45 | #endif /* !LIBC_KERNEL_SOLARIS_SYS_TIME_H */ 46 | -------------------------------------------------------------------------------- /include/kernel/freebsd/sys/ptrace.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2012-2015 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_KERNEL_FREEBSD_SYS_PTRACE_H 32 | # define LIBC_KERNEL_FREEBSD_SYS_PTRACE_H 33 | 34 | 35 | /* constants */ 36 | # define PT_TRACE_ME 0 37 | # define PT_CONTINUE 7 38 | # define PT_ATTACH 10 39 | # define PT_DETACH 11 40 | # define PT_SYSCALL 22 41 | 42 | #endif /* !LIBC_KERNEL_FREEBSD_SYS_PTRACE_H */ 43 | -------------------------------------------------------------------------------- /include/kernel/openbsd/sys/select.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2007-2022 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_KERNEL_OPENBSD_SYS_SELECT_H 32 | # define LIBC_KERNEL_OPENBSD_SYS_SELECT_H 33 | 34 | 35 | /* types */ 36 | # ifndef timeval 37 | # define timeval timeval 38 | struct timeval 39 | { 40 | time_t tv_sec; 41 | suseconds_t tv_usec; 42 | }; 43 | # endif 44 | 45 | #endif /* !LIBC_KERNEL_OPENBSD_SYS_SELECT_H */ 46 | -------------------------------------------------------------------------------- /src/dlfcn.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2017 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_SRC_DLFCN_H 32 | # define LIBC_SRC_DLFCN_H 33 | 34 | # include "../include/dl/dlfcn.h" 35 | 36 | 37 | /* functions */ 38 | int __dlclose(void * handle); 39 | char * __dlerror(void); 40 | void * __dlopen(char const * pathname, int mode); 41 | void * __dlsym(void * handle, char const * name); 42 | 43 | #endif /* !LIBDL_SRC_DLFCN_H */ 44 | -------------------------------------------------------------------------------- /src/rt/syscalls.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2014 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBRT_SYSCALLS_H 32 | # define LIBRT_SYSCALLS_H 33 | 34 | # if defined(__NetBSD__) 35 | # if defined(__amd64__) 36 | # include "kernel/netbsd/common.h" 37 | # else 38 | # warning Unsupported NetBSD architecture 39 | # endif 40 | # else 41 | # warning Unsupported platform 42 | #endif 43 | 44 | #endif /* !LIBRT_SYSCALLS_H */ 45 | -------------------------------------------------------------------------------- /include/compat/sys/ioctl.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2009 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_COMPAT_SYS_IOCTL_H 32 | # define LIBC_COMPAT_SYS_IOCTL_H 33 | 34 | 35 | # if defined(__linux__) 36 | # include "kernel/linux/sys/ioctl.h" 37 | # elif defined(__NetBSD__) 38 | # include "kernel/netbsd/sys/ioctl.h" 39 | # else 40 | # warning Unsupported platform 41 | # endif 42 | 43 | #endif /* !LIBC_COMPAT_SYS_IOCTL_H */ 44 | -------------------------------------------------------------------------------- /include/socket/compat/sys/un.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2009 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBSOCKET_COMPAT_SYS_UN_H 32 | # define LIBSOCKET_COMPAT_SYS_UN_H 33 | 34 | 35 | # if defined(__linux__) 36 | # include "kernel/linux/sys/un.h" 37 | # elif defined(__NetBSD__) 38 | # include "kernel/netbsd/sys/un.h" 39 | # else 40 | # warning Unsupported platform 41 | # endif 42 | 43 | #endif /* !LIBSOCKET_COMPAT_SYS_UN_H */ 44 | -------------------------------------------------------------------------------- /src/socket/kernel/netbsd/sparc/syscalls.S: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2008-2014 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | _syscall: 32 | ta 0 33 | bcc .errnoret 34 | nop 35 | set errno, %g1 36 | st %o0, [%g1] 37 | set 0xffffffff, %o0 38 | .errnoret: 39 | retl 40 | nop 41 | 42 | 43 | /* macros */ 44 | #define SYSCALL(name) \ 45 | .global name; \ 46 | .type name,@function; \ 47 | name:; \ 48 | b _syscall; \ 49 | mov SYS_ ## name, %g1 50 | -------------------------------------------------------------------------------- /include/kernel/linux/stdio.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2008-2017 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | #ifndef LIBC_KERNEL_LINUX_STDIO_H 32 | # define LIBC_KERNEL_LINUX_STDIO_H 33 | 34 | 35 | /* constants */ 36 | # ifndef SEEK_SET 37 | # define SEEK_SET 0 38 | # endif 39 | # ifndef SEEK_CUR 40 | # define SEEK_CUR 1 41 | # endif 42 | # ifndef SEEK_END 43 | # define SEEK_END 2 44 | # endif 45 | 46 | #endif /* !LIBC_KERNEL_LINUX_STDIO_H */ 47 | -------------------------------------------------------------------------------- /src/kernel/linux/common.S: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2015 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | /* arch_prctl */ 32 | #ifdef SYS_arch_prctl 33 | SYSCALL(arch_prctl) 34 | #endif 35 | /* get_thread_area */ 36 | #ifdef SYS_get_thread_area 37 | SYSCALL(get_thread_area) 38 | #endif 39 | /* prctl */ 40 | #ifdef SYS_prctl 41 | SYSCALL(prctl) 42 | #endif 43 | /* set_thread_area */ 44 | #ifdef SYS_set_thread_area 45 | SYSCALL(set_thread_area) 46 | #endif 47 | -------------------------------------------------------------------------------- /src/kernel/solaris/sparc/syscalls.S: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* Copyright (c) 2007-2014 Pierre Pronchery */ 3 | /* This file is part of DeforaOS System libc */ 4 | /* All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are 8 | * met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 28 | 29 | 30 | 31 | _syscall: 32 | ta 8 33 | /* FIXME handle errno */ 34 | retl 35 | nop 36 | 37 | 38 | /* macros */ 39 | #define SYSCALL(name) \ 40 | .global name; \ 41 | name:; \ 42 | b _syscall; \ 43 | mov SYS_ ## name, %g1 44 | 45 | 46 | /* functions */ 47 | /* _exit */ 48 | .global _exit 49 | _exit: 50 | b _syscall 51 | mov SYS_exit, %g1 52 | --------------------------------------------------------------------------------