From 4e506c9aefe5b89970ae6894d05ad53c81af0d83 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 6 May 2005 02:43:04 +0000 Subject: use installed dietlibc, not our forked cvs version --- mdk-stage1/dietlibc/include/alloca.h | 13 - mdk-stage1/dietlibc/include/arpa/inet.h | 20 - mdk-stage1/dietlibc/include/arpa/nameser.h | 253 ---- mdk-stage1/dietlibc/include/asm/alpha-sigcontext.h | 29 - mdk-stage1/dietlibc/include/asm/arm-sigcontext.h | 32 - mdk-stage1/dietlibc/include/asm/i386-sigcontext.h | 66 - mdk-stage1/dietlibc/include/asm/ia64-sigcontext.h | 25 - mdk-stage1/dietlibc/include/asm/mips-sigcontext.h | 23 - .../dietlibc/include/asm/parisc-sigcontext.h | 16 - mdk-stage1/dietlibc/include/asm/ppc-sigcontext.h | 76 -- mdk-stage1/dietlibc/include/asm/sigcontext.h | 36 - mdk-stage1/dietlibc/include/asm/sparc-sigcontext.h | 50 - mdk-stage1/dietlibc/include/asm/statfs.h | 1 - mdk-stage1/dietlibc/include/asm/types.h | 32 - mdk-stage1/dietlibc/include/assert.h | 38 - mdk-stage1/dietlibc/include/cpio.h | 27 - mdk-stage1/dietlibc/include/ctype.h | 28 - mdk-stage1/dietlibc/include/daemon.h | 6 - mdk-stage1/dietlibc/include/dietref.h | 22 - mdk-stage1/dietlibc/include/dirent.h | 64 - mdk-stage1/dietlibc/include/dlfcn.h | 18 - mdk-stage1/dietlibc/include/elf.h | 780 ------------ mdk-stage1/dietlibc/include/endian.h | 62 - mdk-stage1/dietlibc/include/errno.h | 546 -------- mdk-stage1/dietlibc/include/fcntl.h | 564 --------- mdk-stage1/dietlibc/include/features.h | 8 - mdk-stage1/dietlibc/include/float.h | 96 -- mdk-stage1/dietlibc/include/fnmatch.h | 17 - mdk-stage1/dietlibc/include/ftw.h | 51 - mdk-stage1/dietlibc/include/getopt.h | 28 - mdk-stage1/dietlibc/include/glob.h | 57 - mdk-stage1/dietlibc/include/grp.h | 35 - mdk-stage1/dietlibc/include/iconv.h | 25 - mdk-stage1/dietlibc/include/inttypes.h | 247 ---- mdk-stage1/dietlibc/include/libgen.h | 9 - mdk-stage1/dietlibc/include/libintl.h | 23 - mdk-stage1/dietlibc/include/limits.h | 73 -- mdk-stage1/dietlibc/include/linux/eventpoll.h | 17 - mdk-stage1/dietlibc/include/linux/if_ether.h | 101 -- mdk-stage1/dietlibc/include/linux/loop.h | 47 - mdk-stage1/dietlibc/include/linux/nfs.h | 88 -- mdk-stage1/dietlibc/include/linux/posix_types.h | 115 -- mdk-stage1/dietlibc/include/linux/types.h | 6 - mdk-stage1/dietlibc/include/locale.h | 84 -- mdk-stage1/dietlibc/include/malloc.h | 1 - mdk-stage1/dietlibc/include/math.h | 96 -- mdk-stage1/dietlibc/include/md5.h | 48 - mdk-stage1/dietlibc/include/memory.h | 6 - mdk-stage1/dietlibc/include/mntent.h | 72 -- mdk-stage1/dietlibc/include/net/ethernet.h | 76 -- mdk-stage1/dietlibc/include/net/if.h | 102 -- mdk-stage1/dietlibc/include/net/if_arp.h | 113 -- mdk-stage1/dietlibc/include/net/if_ether.h | 74 -- mdk-stage1/dietlibc/include/net/route.h | 52 - mdk-stage1/dietlibc/include/netdb.h | 124 -- mdk-stage1/dietlibc/include/netinet/in.h | 404 ------ mdk-stage1/dietlibc/include/netinet/in_systm.h | 0 mdk-stage1/dietlibc/include/netinet/ip.h | 121 -- mdk-stage1/dietlibc/include/netinet/ip_icmp.h | 145 --- mdk-stage1/dietlibc/include/netinet/tcp.h | 164 --- mdk-stage1/dietlibc/include/netinet/udp.h | 16 - mdk-stage1/dietlibc/include/netpacket/packet.h | 41 - mdk-stage1/dietlibc/include/paths.h | 23 - mdk-stage1/dietlibc/include/pthread.h | 244 ---- mdk-stage1/dietlibc/include/pty.h | 13 - mdk-stage1/dietlibc/include/pwd.h | 35 - mdk-stage1/dietlibc/include/regex.h | 71 -- mdk-stage1/dietlibc/include/resolv.h | 124 -- mdk-stage1/dietlibc/include/rpc/auth.h | 214 ---- mdk-stage1/dietlibc/include/rpc/auth_des.h | 112 -- mdk-stage1/dietlibc/include/rpc/auth_unix.h | 90 -- mdk-stage1/dietlibc/include/rpc/clnt.h | 421 ------- mdk-stage1/dietlibc/include/rpc/des_crypt.h | 97 -- mdk-stage1/dietlibc/include/rpc/key_prot.h | 346 ------ mdk-stage1/dietlibc/include/rpc/netdb.h | 74 -- mdk-stage1/dietlibc/include/rpc/pmap_clnt.h | 98 -- mdk-stage1/dietlibc/include/rpc/pmap_prot.h | 108 -- mdk-stage1/dietlibc/include/rpc/pmap_rmt.h | 68 - mdk-stage1/dietlibc/include/rpc/rpc.h | 70 -- mdk-stage1/dietlibc/include/rpc/rpc_des.h | 72 -- mdk-stage1/dietlibc/include/rpc/rpc_msg.h | 202 --- mdk-stage1/dietlibc/include/rpc/svc.h | 316 ----- mdk-stage1/dietlibc/include/rpc/svc_auth.h | 54 - mdk-stage1/dietlibc/include/rpc/types.h | 84 -- mdk-stage1/dietlibc/include/rpc/xdr.h | 379 ------ mdk-stage1/dietlibc/include/sched.h | 69 -- mdk-stage1/dietlibc/include/scsi/scsi.h | 224 ---- mdk-stage1/dietlibc/include/scsi/scsi_ioctl.h | 34 - mdk-stage1/dietlibc/include/scsi/sg.h | 274 ----- mdk-stage1/dietlibc/include/setjmp.h | 231 ---- mdk-stage1/dietlibc/include/shadow.h | 30 - mdk-stage1/dietlibc/include/signal.h | 500 -------- mdk-stage1/dietlibc/include/stdarg-cruft.h | 299 ----- mdk-stage1/dietlibc/include/stdarg.h | 24 - mdk-stage1/dietlibc/include/stddef.h | 23 - mdk-stage1/dietlibc/include/stdint.h | 30 - mdk-stage1/dietlibc/include/stdio.h | 147 --- mdk-stage1/dietlibc/include/stdlib.h | 100 -- mdk-stage1/dietlibc/include/string.h | 74 -- mdk-stage1/dietlibc/include/strings.h | 23 - mdk-stage1/dietlibc/include/sys/alpha-ioctl.h | 168 --- mdk-stage1/dietlibc/include/sys/arm-ioctl.h | 149 --- mdk-stage1/dietlibc/include/sys/cdefs.h | 61 - mdk-stage1/dietlibc/include/sys/epoll.h | 60 - mdk-stage1/dietlibc/include/sys/file.h | 10 - mdk-stage1/dietlibc/include/sys/fsuid.h | 12 - mdk-stage1/dietlibc/include/sys/gmon.h | 99 -- mdk-stage1/dietlibc/include/sys/gmon_out.h | 1 - mdk-stage1/dietlibc/include/sys/hppa-ioctl.h | 133 -- mdk-stage1/dietlibc/include/sys/i386-ioctl.h | 141 --- mdk-stage1/dietlibc/include/sys/io.h | 44 - mdk-stage1/dietlibc/include/sys/ioctl.h | 32 - mdk-stage1/dietlibc/include/sys/ipc.h | 49 - mdk-stage1/dietlibc/include/sys/kd.h | 183 --- mdk-stage1/dietlibc/include/sys/klog.h | 8 - mdk-stage1/dietlibc/include/sys/mips-ioctl.h | 177 --- mdk-stage1/dietlibc/include/sys/mman.h | 184 --- mdk-stage1/dietlibc/include/sys/mount.h | 80 -- mdk-stage1/dietlibc/include/sys/msg.h | 57 - mdk-stage1/dietlibc/include/sys/mtio.h | 340 ----- mdk-stage1/dietlibc/include/sys/param.h | 28 - mdk-stage1/dietlibc/include/sys/poll.h | 47 - mdk-stage1/dietlibc/include/sys/ppc-ioctl.h | 164 --- mdk-stage1/dietlibc/include/sys/prctl.h | 8 - mdk-stage1/dietlibc/include/sys/ptrace.h | 846 ------------- mdk-stage1/dietlibc/include/sys/reboot.h | 26 - mdk-stage1/dietlibc/include/sys/resource.h | 67 - mdk-stage1/dietlibc/include/sys/s390-ioctl.h | 141 --- mdk-stage1/dietlibc/include/sys/select.h | 22 - mdk-stage1/dietlibc/include/sys/sem.h | 81 -- mdk-stage1/dietlibc/include/sys/sendfile.h | 13 - mdk-stage1/dietlibc/include/sys/shm.h | 75 -- mdk-stage1/dietlibc/include/sys/signal.h | 1 - mdk-stage1/dietlibc/include/sys/socket.h | 526 -------- mdk-stage1/dietlibc/include/sys/soundcard.h | 1300 -------------------- mdk-stage1/dietlibc/include/sys/sparc-ioctl.h | 172 --- mdk-stage1/dietlibc/include/sys/stat.h | 516 -------- mdk-stage1/dietlibc/include/sys/syscall.h | 6 - mdk-stage1/dietlibc/include/sys/sysinfo.h | 27 - mdk-stage1/dietlibc/include/sys/syslog.h | 102 -- mdk-stage1/dietlibc/include/sys/sysmacros.h | 6 - mdk-stage1/dietlibc/include/sys/time.h | 68 - mdk-stage1/dietlibc/include/sys/timeb.h | 13 - mdk-stage1/dietlibc/include/sys/times.h | 16 - mdk-stage1/dietlibc/include/sys/timex.h | 50 - mdk-stage1/dietlibc/include/sys/types.h | 133 -- mdk-stage1/dietlibc/include/sys/ucontext.h | 110 -- mdk-stage1/dietlibc/include/sys/uio.h | 9 - mdk-stage1/dietlibc/include/sys/un.h | 13 - mdk-stage1/dietlibc/include/sys/utsname.h | 35 - mdk-stage1/dietlibc/include/sys/vfs.h | 35 - mdk-stage1/dietlibc/include/sys/wait.h | 45 - mdk-stage1/dietlibc/include/sysexits.h | 26 - mdk-stage1/dietlibc/include/syslog.h | 1 - mdk-stage1/dietlibc/include/tar.h | 36 - mdk-stage1/dietlibc/include/termio.h | 4 - mdk-stage1/dietlibc/include/termios.h | 383 ------ mdk-stage1/dietlibc/include/time.h | 40 - mdk-stage1/dietlibc/include/unistd.h | 233 ---- mdk-stage1/dietlibc/include/utime.h | 16 - mdk-stage1/dietlibc/include/utmp.h | 94 -- mdk-stage1/dietlibc/include/write12.h | 4 - 162 files changed, 18532 deletions(-) delete mode 100644 mdk-stage1/dietlibc/include/alloca.h delete mode 100644 mdk-stage1/dietlibc/include/arpa/inet.h delete mode 100644 mdk-stage1/dietlibc/include/arpa/nameser.h delete mode 100644 mdk-stage1/dietlibc/include/asm/alpha-sigcontext.h delete mode 100644 mdk-stage1/dietlibc/include/asm/arm-sigcontext.h delete mode 100644 mdk-stage1/dietlibc/include/asm/i386-sigcontext.h delete mode 100644 mdk-stage1/dietlibc/include/asm/ia64-sigcontext.h delete mode 100644 mdk-stage1/dietlibc/include/asm/mips-sigcontext.h delete mode 100644 mdk-stage1/dietlibc/include/asm/parisc-sigcontext.h delete mode 100644 mdk-stage1/dietlibc/include/asm/ppc-sigcontext.h delete mode 100644 mdk-stage1/dietlibc/include/asm/sigcontext.h delete mode 100644 mdk-stage1/dietlibc/include/asm/sparc-sigcontext.h delete mode 100644 mdk-stage1/dietlibc/include/asm/statfs.h delete mode 100644 mdk-stage1/dietlibc/include/asm/types.h delete mode 100644 mdk-stage1/dietlibc/include/assert.h delete mode 100644 mdk-stage1/dietlibc/include/cpio.h delete mode 100644 mdk-stage1/dietlibc/include/ctype.h delete mode 100644 mdk-stage1/dietlibc/include/daemon.h delete mode 100644 mdk-stage1/dietlibc/include/dietref.h delete mode 100644 mdk-stage1/dietlibc/include/dirent.h delete mode 100644 mdk-stage1/dietlibc/include/dlfcn.h delete mode 100644 mdk-stage1/dietlibc/include/elf.h delete mode 100644 mdk-stage1/dietlibc/include/endian.h delete mode 100644 mdk-stage1/dietlibc/include/errno.h delete mode 100644 mdk-stage1/dietlibc/include/fcntl.h delete mode 100644 mdk-stage1/dietlibc/include/features.h delete mode 100644 mdk-stage1/dietlibc/include/float.h delete mode 100644 mdk-stage1/dietlibc/include/fnmatch.h delete mode 100644 mdk-stage1/dietlibc/include/ftw.h delete mode 100644 mdk-stage1/dietlibc/include/getopt.h delete mode 100644 mdk-stage1/dietlibc/include/glob.h delete mode 100644 mdk-stage1/dietlibc/include/grp.h delete mode 100644 mdk-stage1/dietlibc/include/iconv.h delete mode 100644 mdk-stage1/dietlibc/include/inttypes.h delete mode 100644 mdk-stage1/dietlibc/include/libgen.h delete mode 100644 mdk-stage1/dietlibc/include/libintl.h delete mode 100644 mdk-stage1/dietlibc/include/limits.h delete mode 100644 mdk-stage1/dietlibc/include/linux/eventpoll.h delete mode 100644 mdk-stage1/dietlibc/include/linux/if_ether.h delete mode 100644 mdk-stage1/dietlibc/include/linux/loop.h delete mode 100644 mdk-stage1/dietlibc/include/linux/nfs.h delete mode 100644 mdk-stage1/dietlibc/include/linux/posix_types.h delete mode 100644 mdk-stage1/dietlibc/include/linux/types.h delete mode 100644 mdk-stage1/dietlibc/include/locale.h delete mode 100644 mdk-stage1/dietlibc/include/malloc.h delete mode 100644 mdk-stage1/dietlibc/include/math.h delete mode 100644 mdk-stage1/dietlibc/include/md5.h delete mode 100644 mdk-stage1/dietlibc/include/memory.h delete mode 100644 mdk-stage1/dietlibc/include/mntent.h delete mode 100644 mdk-stage1/dietlibc/include/net/ethernet.h delete mode 100644 mdk-stage1/dietlibc/include/net/if.h delete mode 100644 mdk-stage1/dietlibc/include/net/if_arp.h delete mode 100644 mdk-stage1/dietlibc/include/net/if_ether.h delete mode 100644 mdk-stage1/dietlibc/include/net/route.h delete mode 100644 mdk-stage1/dietlibc/include/netdb.h delete mode 100644 mdk-stage1/dietlibc/include/netinet/in.h delete mode 100644 mdk-stage1/dietlibc/include/netinet/in_systm.h delete mode 100644 mdk-stage1/dietlibc/include/netinet/ip.h delete mode 100644 mdk-stage1/dietlibc/include/netinet/ip_icmp.h delete mode 100644 mdk-stage1/dietlibc/include/netinet/tcp.h delete mode 100644 mdk-stage1/dietlibc/include/netinet/udp.h delete mode 100644 mdk-stage1/dietlibc/include/netpacket/packet.h delete mode 100644 mdk-stage1/dietlibc/include/paths.h delete mode 100644 mdk-stage1/dietlibc/include/pthread.h delete mode 100644 mdk-stage1/dietlibc/include/pty.h delete mode 100644 mdk-stage1/dietlibc/include/pwd.h delete mode 100644 mdk-stage1/dietlibc/include/regex.h delete mode 100644 mdk-stage1/dietlibc/include/resolv.h delete mode 100644 mdk-stage1/dietlibc/include/rpc/auth.h delete mode 100644 mdk-stage1/dietlibc/include/rpc/auth_des.h delete mode 100644 mdk-stage1/dietlibc/include/rpc/auth_unix.h delete mode 100644 mdk-stage1/dietlibc/include/rpc/clnt.h delete mode 100644 mdk-stage1/dietlibc/include/rpc/des_crypt.h delete mode 100644 mdk-stage1/dietlibc/include/rpc/key_prot.h delete mode 100644 mdk-stage1/dietlibc/include/rpc/netdb.h delete mode 100644 mdk-stage1/dietlibc/include/rpc/pmap_clnt.h delete mode 100644 mdk-stage1/dietlibc/include/rpc/pmap_prot.h delete mode 100644 mdk-stage1/dietlibc/include/rpc/pmap_rmt.h delete mode 100644 mdk-stage1/dietlibc/include/rpc/rpc.h delete mode 100644 mdk-stage1/dietlibc/include/rpc/rpc_des.h delete mode 100644 mdk-stage1/dietlibc/include/rpc/rpc_msg.h delete mode 100644 mdk-stage1/dietlibc/include/rpc/svc.h delete mode 100644 mdk-stage1/dietlibc/include/rpc/svc_auth.h delete mode 100644 mdk-stage1/dietlibc/include/rpc/types.h delete mode 100644 mdk-stage1/dietlibc/include/rpc/xdr.h delete mode 100644 mdk-stage1/dietlibc/include/sched.h delete mode 100644 mdk-stage1/dietlibc/include/scsi/scsi.h delete mode 100644 mdk-stage1/dietlibc/include/scsi/scsi_ioctl.h delete mode 100644 mdk-stage1/dietlibc/include/scsi/sg.h delete mode 100644 mdk-stage1/dietlibc/include/setjmp.h delete mode 100644 mdk-stage1/dietlibc/include/shadow.h delete mode 100644 mdk-stage1/dietlibc/include/signal.h delete mode 100644 mdk-stage1/dietlibc/include/stdarg-cruft.h delete mode 100644 mdk-stage1/dietlibc/include/stdarg.h delete mode 100644 mdk-stage1/dietlibc/include/stddef.h delete mode 100644 mdk-stage1/dietlibc/include/stdint.h delete mode 100644 mdk-stage1/dietlibc/include/stdio.h delete mode 100644 mdk-stage1/dietlibc/include/stdlib.h delete mode 100644 mdk-stage1/dietlibc/include/string.h delete mode 100644 mdk-stage1/dietlibc/include/strings.h delete mode 100644 mdk-stage1/dietlibc/include/sys/alpha-ioctl.h delete mode 100644 mdk-stage1/dietlibc/include/sys/arm-ioctl.h delete mode 100644 mdk-stage1/dietlibc/include/sys/cdefs.h delete mode 100644 mdk-stage1/dietlibc/include/sys/epoll.h delete mode 100644 mdk-stage1/dietlibc/include/sys/file.h delete mode 100644 mdk-stage1/dietlibc/include/sys/fsuid.h delete mode 100644 mdk-stage1/dietlibc/include/sys/gmon.h delete mode 100644 mdk-stage1/dietlibc/include/sys/gmon_out.h delete mode 100644 mdk-stage1/dietlibc/include/sys/hppa-ioctl.h delete mode 100644 mdk-stage1/dietlibc/include/sys/i386-ioctl.h delete mode 100644 mdk-stage1/dietlibc/include/sys/io.h delete mode 100644 mdk-stage1/dietlibc/include/sys/ioctl.h delete mode 100644 mdk-stage1/dietlibc/include/sys/ipc.h delete mode 100644 mdk-stage1/dietlibc/include/sys/kd.h delete mode 100644 mdk-stage1/dietlibc/include/sys/klog.h delete mode 100644 mdk-stage1/dietlibc/include/sys/mips-ioctl.h delete mode 100644 mdk-stage1/dietlibc/include/sys/mman.h delete mode 100644 mdk-stage1/dietlibc/include/sys/mount.h delete mode 100644 mdk-stage1/dietlibc/include/sys/msg.h delete mode 100644 mdk-stage1/dietlibc/include/sys/mtio.h delete mode 100644 mdk-stage1/dietlibc/include/sys/param.h delete mode 100644 mdk-stage1/dietlibc/include/sys/poll.h delete mode 100644 mdk-stage1/dietlibc/include/sys/ppc-ioctl.h delete mode 100644 mdk-stage1/dietlibc/include/sys/prctl.h delete mode 100644 mdk-stage1/dietlibc/include/sys/ptrace.h delete mode 100644 mdk-stage1/dietlibc/include/sys/reboot.h delete mode 100644 mdk-stage1/dietlibc/include/sys/resource.h delete mode 100644 mdk-stage1/dietlibc/include/sys/s390-ioctl.h delete mode 100644 mdk-stage1/dietlibc/include/sys/select.h delete mode 100644 mdk-stage1/dietlibc/include/sys/sem.h delete mode 100644 mdk-stage1/dietlibc/include/sys/sendfile.h delete mode 100644 mdk-stage1/dietlibc/include/sys/shm.h delete mode 100644 mdk-stage1/dietlibc/include/sys/signal.h delete mode 100644 mdk-stage1/dietlibc/include/sys/socket.h delete mode 100644 mdk-stage1/dietlibc/include/sys/soundcard.h delete mode 100644 mdk-stage1/dietlibc/include/sys/sparc-ioctl.h delete mode 100644 mdk-stage1/dietlibc/include/sys/stat.h delete mode 100644 mdk-stage1/dietlibc/include/sys/syscall.h delete mode 100644 mdk-stage1/dietlibc/include/sys/sysinfo.h delete mode 100644 mdk-stage1/dietlibc/include/sys/syslog.h delete mode 100644 mdk-stage1/dietlibc/include/sys/sysmacros.h delete mode 100644 mdk-stage1/dietlibc/include/sys/time.h delete mode 100644 mdk-stage1/dietlibc/include/sys/timeb.h delete mode 100644 mdk-stage1/dietlibc/include/sys/times.h delete mode 100644 mdk-stage1/dietlibc/include/sys/timex.h delete mode 100644 mdk-stage1/dietlibc/include/sys/types.h delete mode 100644 mdk-stage1/dietlibc/include/sys/ucontext.h delete mode 100644 mdk-stage1/dietlibc/include/sys/uio.h delete mode 100644 mdk-stage1/dietlibc/include/sys/un.h delete mode 100644 mdk-stage1/dietlibc/include/sys/utsname.h delete mode 100644 mdk-stage1/dietlibc/include/sys/vfs.h delete mode 100644 mdk-stage1/dietlibc/include/sys/wait.h delete mode 100644 mdk-stage1/dietlibc/include/sysexits.h delete mode 100644 mdk-stage1/dietlibc/include/syslog.h delete mode 100644 mdk-stage1/dietlibc/include/tar.h delete mode 100644 mdk-stage1/dietlibc/include/termio.h delete mode 100644 mdk-stage1/dietlibc/include/termios.h delete mode 100644 mdk-stage1/dietlibc/include/time.h delete mode 100644 mdk-stage1/dietlibc/include/unistd.h delete mode 100644 mdk-stage1/dietlibc/include/utime.h delete mode 100644 mdk-stage1/dietlibc/include/utmp.h delete mode 100644 mdk-stage1/dietlibc/include/write12.h (limited to 'mdk-stage1/dietlibc/include') diff --git a/mdk-stage1/dietlibc/include/alloca.h b/mdk-stage1/dietlibc/include/alloca.h deleted file mode 100644 index 41f92354f..000000000 --- a/mdk-stage1/dietlibc/include/alloca.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef _ALLOCA_H -#define _ALLOCA_H - -#include -#include - -#ifdef __GNUC__ -#define alloca(x) __builtin_alloca(x) -#else -void *alloca(size_t size) __THROW; -#endif - -#endif diff --git a/mdk-stage1/dietlibc/include/arpa/inet.h b/mdk-stage1/dietlibc/include/arpa/inet.h deleted file mode 100644 index bb278d399..000000000 --- a/mdk-stage1/dietlibc/include/arpa/inet.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef _ARPA_INET_H -#define _ARPA_INET_H - -#include -#include -#include - -int inet_aton(const char *cp, struct in_addr *inp) __THROW; -unsigned long int inet_addr(const char *cp) __THROW; -unsigned long int inet_network(const char *cp) __THROW; -char *inet_ntoa(struct in_addr in) __THROW; -char *inet_ntoa_r(struct in_addr in,char* buf) __THROW; -struct in_addr inet_makeaddr(int net, int host) __THROW; -unsigned long int inet_lnaof(struct in_addr in) __THROW; -unsigned long int inet_netof(struct in_addr in) __THROW; - -int inet_pton (int AF, const char* CP, void* BUF) __THROW; -const char* inet_ntop (int AF, const void* CP, char* BUF, size_t LEN) __THROW; - -#endif diff --git a/mdk-stage1/dietlibc/include/arpa/nameser.h b/mdk-stage1/dietlibc/include/arpa/nameser.h deleted file mode 100644 index 9327006b0..000000000 --- a/mdk-stage1/dietlibc/include/arpa/nameser.h +++ /dev/null @@ -1,253 +0,0 @@ -#ifndef _ARPA_NAMESER_H -#define _ARPA_NAMESER_H - -#include - -#define NS_PACKETSZ 512 /* maximum packet size */ -#define NS_MAXDNAME 1025 /* maximum domain name */ -#define NS_MAXCDNAME 255 /* maximum compressed domain name */ -#define NS_MAXLABEL 63 /* maximum length of domain label */ -#define NS_HFIXEDSZ 12 /* #/bytes of fixed data in header */ -#define NS_QFIXEDSZ 4 /* #/bytes of fixed data in query */ -#define NS_RRFIXEDSZ 10 /* #/bytes of fixed data in r record */ -#define NS_INT32SZ 4 /* #/bytes of data in a u_int32_t */ -#define NS_INT16SZ 2 /* #/bytes of data in a u_int16_t */ -#define NS_INT8SZ 1 /* #/bytes of data in a u_int8_t */ -#define NS_INADDRSZ 4 /* IPv4 T_A */ -#define NS_IN6ADDRSZ 16 /* IPv6 T_AAAA */ -#define NS_CMPRSFLGS 0xc0 /* Flag bits indicating name compression. */ -#define NS_DEFAULTPORT 53 /* For both TCP and UDP. */ - -/* - * Currently defined type values for resources and queries. - */ -typedef enum __ns_type { - ns_t_invalid = 0, /* Cookie. */ - ns_t_a = 1, /* Host address. */ - ns_t_ns = 2, /* Authoritative server. */ - ns_t_md = 3, /* Mail destination. */ - ns_t_mf = 4, /* Mail forwarder. */ - ns_t_cname = 5, /* Canonical name. */ - ns_t_soa = 6, /* Start of authority zone. */ - ns_t_mb = 7, /* Mailbox domain name. */ - ns_t_mg = 8, /* Mail group member. */ - ns_t_mr = 9, /* Mail rename name. */ - ns_t_null = 10, /* Null resource record. */ - ns_t_wks = 11, /* Well known service. */ - ns_t_ptr = 12, /* Domain name pointer. */ - ns_t_hinfo = 13, /* Host information. */ - ns_t_minfo = 14, /* Mailbox information. */ - ns_t_mx = 15, /* Mail routing information. */ - ns_t_txt = 16, /* Text strings. */ - ns_t_rp = 17, /* Responsible person. */ - ns_t_afsdb = 18, /* AFS cell database. */ - ns_t_x25 = 19, /* X_25 calling address. */ - ns_t_isdn = 20, /* ISDN calling address. */ - ns_t_rt = 21, /* Router. */ - ns_t_nsap = 22, /* NSAP address. */ - ns_t_nsap_ptr = 23, /* Reverse NSAP lookup (deprecated). */ - ns_t_sig = 24, /* Security signature. */ - ns_t_key = 25, /* Security key. */ - ns_t_px = 26, /* X.400 mail mapping. */ - ns_t_gpos = 27, /* Geographical position (withdrawn). */ - ns_t_aaaa = 28, /* Ip6 Address. */ - ns_t_loc = 29, /* Location Information. */ - ns_t_nxt = 30, /* Next domain (security). */ - ns_t_eid = 31, /* Endpoint identifier. */ - ns_t_nimloc = 32, /* Nimrod Locator. */ - ns_t_srv = 33, /* Server Selection. */ - ns_t_atma = 34, /* ATM Address */ - ns_t_naptr = 35, /* Naming Authority PoinTeR */ - ns_t_kx = 36, /* Key Exchange */ - ns_t_cert = 37, /* Certification record */ - ns_t_a6 = 38, /* IPv6 address (deprecates AAAA) */ - ns_t_dname = 39, /* Non-terminal DNAME (for IPv6) */ - ns_t_sink = 40, /* Kitchen sink (experimentatl) */ - ns_t_opt = 41, /* EDNS0 option (meta-RR) */ - ns_t_tsig = 250, /* Transaction signature. */ - ns_t_ixfr = 251, /* Incremental zone transfer. */ - ns_t_axfr = 252, /* Transfer zone of authority. */ - ns_t_mailb = 253, /* Transfer mailbox records. */ - ns_t_maila = 254, /* Transfer mail agent records. */ - ns_t_any = 255, /* Wildcard match. */ - ns_t_zxfr = 256, /* BIND-specific, nonstandard. */ - ns_t_max = 65536 -} ns_type; - -/* - * Values for class field - */ -typedef enum __ns_class { - ns_c_invalid = 0, /* Cookie. */ - ns_c_in = 1, /* Internet. */ - ns_c_2 = 2, /* unallocated/unsupported. */ - ns_c_chaos = 3, /* MIT Chaos-net. */ - ns_c_hs = 4, /* MIT Hesiod. */ - /* Query class values which do not appear in resource records */ - ns_c_none = 254, /* for prereq. sections in update requests */ - ns_c_any = 255, /* Wildcard match. */ - ns_c_max = 65536 -} ns_class; - -/* - * Currently defined opcodes. - */ -typedef enum __ns_opcode { - ns_o_query = 0, /* Standard query. */ - ns_o_iquery = 1, /* Inverse query (deprecated/unsupported). */ - ns_o_status = 2, /* Name server status query (unsupported). */ - /* Opcode 3 is undefined/reserved. */ - ns_o_notify = 4, /* Zone change notification. */ - ns_o_update = 5, /* Zone update message. */ - ns_o_max = 6 -} ns_opcode; - -/* - * Currently defined response codes. - */ -typedef enum __ns_rcode { - ns_r_noerror = 0, /* No error occurred. */ - ns_r_formerr = 1, /* Format error. */ - ns_r_servfail = 2, /* Server failure. */ - ns_r_nxdomain = 3, /* Name error. */ - ns_r_notimpl = 4, /* Unimplemented. */ - ns_r_refused = 5, /* Operation refused. */ - /* these are for BIND_UPDATE */ - ns_r_yxdomain = 6, /* Name exists */ - ns_r_yxrrset = 7, /* RRset exists */ - ns_r_nxrrset = 8, /* RRset does not exist */ - ns_r_notauth = 9, /* Not authoritative for zone */ - ns_r_notzone = 10, /* Zone of record different from zone section */ - ns_r_max = 11, - /* The following are TSIG extended errors */ - ns_r_badsig = 16, - ns_r_badkey = 17, - ns_r_badtime = 18 -} ns_rcode; - -typedef struct { - unsigned id :16; /* query identification number */ -#if BYTE_ORDER == BIG_ENDIAN - /* fields in third byte */ - unsigned qr: 1; /* response flag */ - unsigned opcode: 4; /* purpose of message */ - unsigned aa: 1; /* authoritive answer */ - unsigned tc: 1; /* truncated message */ - unsigned rd: 1; /* recursion desired */ - /* fields in fourth byte */ - unsigned ra: 1; /* recursion available */ - unsigned unused :1; /* unused bits (MBZ as of 4.9.3a3) */ - unsigned ad: 1; /* authentic data from named */ - unsigned cd: 1; /* checking disabled by resolver */ - unsigned rcode :4; /* response code */ -#endif -#if BYTE_ORDER == LITTLE_ENDIAN || BYTE_ORDER == PDP_ENDIAN - /* fields in third byte */ - unsigned rd :1; /* recursion desired */ - unsigned tc :1; /* truncated message */ - unsigned aa :1; /* authoritive answer */ - unsigned opcode :4; /* purpose of message */ - unsigned qr :1; /* response flag */ - /* fields in fourth byte */ - unsigned rcode :4; /* response code */ - unsigned cd: 1; /* checking disabled by resolver */ - unsigned ad: 1; /* authentic data from named */ - unsigned unused :1; /* unused bits (MBZ as of 4.9.3a3) */ - unsigned ra :1; /* recursion available */ -#endif - /* remaining bytes */ - unsigned qdcount :16; /* number of question entries */ - unsigned ancount :16; /* number of answer entries */ - unsigned nscount :16; /* number of authority entries */ - unsigned arcount :16; /* number of resource entries */ -} HEADER; - -#define PACKETSZ NS_PACKETSZ -#define MAXDNAME NS_MAXDNAME -#define MAXCDNAME NS_MAXCDNAME -#define MAXLABEL NS_MAXLABEL -#define HFIXEDSZ NS_HFIXEDSZ -#define QFIXEDSZ NS_QFIXEDSZ -#define RRFIXEDSZ NS_RRFIXEDSZ -#define INT32SZ NS_INT32SZ -#define INT16SZ NS_INT16SZ -#define INADDRSZ NS_INADDRSZ -#define IN6ADDRSZ NS_IN6ADDRSZ -#define INDIR_MASK NS_CMPRSFLGS -#define NAMESERVER_PORT NS_DEFAULTPORT - -#define S_ZONE ns_s_zn -#define S_PREREQ ns_s_pr -#define S_UPDATE ns_s_ud -#define S_ADDT ns_s_ar - -#define QUERY ns_o_query -#define IQUERY ns_o_iquery -#define STATUS ns_o_status -#define NS_NOTIFY_OP ns_o_notify -#define NS_UPDATE_OP ns_o_update - -#define NOERROR ns_r_noerror -#define FORMERR ns_r_formerr -#define SERVFAIL ns_r_servfail -#define NXDOMAIN ns_r_nxdomain -#define NOTIMP ns_r_notimpl -#define REFUSED ns_r_refused -#define YXDOMAIN ns_r_yxdomain -#define YXRRSET ns_r_yxrrset -#define NXRRSET ns_r_nxrrset -#define NOTAUTH ns_r_notauth -#define NOTZONE ns_r_notzone - -#define DELETE ns_uop_delete -#define ADD ns_uop_add - -#define T_A ns_t_a -#define T_NS ns_t_ns -#define T_MD ns_t_md -#define T_MF ns_t_mf -#define T_CNAME ns_t_cname -#define T_SOA ns_t_soa -#define T_MB ns_t_mb -#define T_MG ns_t_mg -#define T_MR ns_t_mr -#define T_NULL ns_t_null -#define T_WKS ns_t_wks -#define T_PTR ns_t_ptr -#define T_HINFO ns_t_hinfo -#define T_MINFO ns_t_minfo -#define T_MX ns_t_mx -#define T_TXT ns_t_txt -#define T_RP ns_t_rp -#define T_AFSDB ns_t_afsdb -#define T_X25 ns_t_x25 -#define T_ISDN ns_t_isdn -#define T_RT ns_t_rt -#define T_NSAP ns_t_nsap -#define T_NSAP_PTR ns_t_nsap_ptr -#define T_SIG ns_t_sig -#define T_KEY ns_t_key -#define T_PX ns_t_px -#define T_GPOS ns_t_gpos -#define T_AAAA ns_t_aaaa -#define T_LOC ns_t_loc -#define T_NXT ns_t_nxt -#define T_EID ns_t_eid -#define T_NIMLOC ns_t_nimloc -#define T_SRV ns_t_srv -#define T_ATMA ns_t_atma -#define T_NAPTR ns_t_naptr -#define T_TSIG ns_t_tsig -#define T_IXFR ns_t_ixfr -#define T_AXFR ns_t_axfr -#define T_MAILB ns_t_mailb -#define T_MAILA ns_t_maila -#define T_ANY ns_t_any - -#define C_IN ns_c_in -#define C_CHAOS ns_c_chaos -#define C_HS ns_c_hs -#define C_NONE ns_c_none -#define C_ANY ns_c_any - -#endif diff --git a/mdk-stage1/dietlibc/include/asm/alpha-sigcontext.h b/mdk-stage1/dietlibc/include/asm/alpha-sigcontext.h deleted file mode 100644 index 13faab0b5..000000000 --- a/mdk-stage1/dietlibc/include/asm/alpha-sigcontext.h +++ /dev/null @@ -1,29 +0,0 @@ -struct sigcontext { - /* - * What should we have here? I'd probably better use the same - * stack layout as OSF/1, just in case we ever want to try - * running their binaries.. - * - * This is the basic layout, but I don't know if we'll ever - * actually fill in all the values.. - */ - long sc_onstack; - long sc_mask; - long sc_pc; - long sc_ps; - long sc_regs[32]; - long sc_ownedfp; - long sc_fpregs[32]; - unsigned long sc_fpcr; - unsigned long sc_fp_control; - unsigned long sc_reserved1, sc_reserved2; - unsigned long sc_ssize; - char * sc_sbase; - unsigned long sc_traparg_a0; - unsigned long sc_traparg_a1; - unsigned long sc_traparg_a2; - unsigned long sc_fp_trap_pc; - unsigned long sc_fp_trigger_sum; - unsigned long sc_fp_trigger_inst; -}; - diff --git a/mdk-stage1/dietlibc/include/asm/arm-sigcontext.h b/mdk-stage1/dietlibc/include/asm/arm-sigcontext.h deleted file mode 100644 index 26fa04e64..000000000 --- a/mdk-stage1/dietlibc/include/asm/arm-sigcontext.h +++ /dev/null @@ -1,32 +0,0 @@ - -#define PC(ctx) (ctx.arm_pc) - -/* - * Signal context structure - contains all info to do with the state - * before the signal handler was invoked. Note: only add new entries - * to the end of the structure. - */ -struct sigcontext { - unsigned long trap_no; - unsigned long error_code; - unsigned long oldmask; - unsigned long arm_r0; - unsigned long arm_r1; - unsigned long arm_r2; - unsigned long arm_r3; - unsigned long arm_r4; - unsigned long arm_r5; - unsigned long arm_r6; - unsigned long arm_r7; - unsigned long arm_r8; - unsigned long arm_r9; - unsigned long arm_r10; - unsigned long arm_fp; - unsigned long arm_ip; - unsigned long arm_sp; - unsigned long arm_lr; - unsigned long arm_pc; - unsigned long arm_cpsr; - unsigned long fault_address; -}; - diff --git a/mdk-stage1/dietlibc/include/asm/i386-sigcontext.h b/mdk-stage1/dietlibc/include/asm/i386-sigcontext.h deleted file mode 100644 index e830b9b97..000000000 --- a/mdk-stage1/dietlibc/include/asm/i386-sigcontext.h +++ /dev/null @@ -1,66 +0,0 @@ - -struct _fpreg { - unsigned short significand[4]; - unsigned short exponent; -}; - -struct _fpxreg { - unsigned short significand[4]; - unsigned short exponent; - unsigned short padding[3]; -}; - -struct _xmmreg { - unsigned long element[4]; -}; - -struct _fpstate { - /* Regular FPU environment */ - unsigned long cw; - unsigned long sw; - unsigned long tag; - unsigned long ipoff; - unsigned long cssel; - unsigned long dataoff; - unsigned long datasel; - struct _fpreg _st[8]; - unsigned short status; - unsigned short magic; /* 0xffff = regular FPU data only */ - - /* FXSR FPU environment */ - unsigned long _fxsr_env[6]; /* FXSR FPU env is ignored */ - unsigned long mxcsr; - unsigned long reserved; - struct _fpxreg _fxsr_st[8]; /* FXSR FPU reg data is ignored */ - struct _xmmreg _xmm[8]; - unsigned long padding[56]; -}; - -#define X86_FXSR_MAGIC 0x0000 -#define PC(ctx) (ctx.eip) - -struct sigcontext { - unsigned short gs, __gsh; - unsigned short fs, __fsh; - unsigned short es, __esh; - unsigned short ds, __dsh; - unsigned long edi; - unsigned long esi; - unsigned long ebp; - unsigned long esp; - unsigned long ebx; - unsigned long edx; - unsigned long ecx; - unsigned long eax; - unsigned long trapno; - unsigned long err; - unsigned long eip; - unsigned short cs, __csh; - unsigned long eflags; - unsigned long esp_at_signal; - unsigned short ss, __ssh; - struct _fpstate * fpstate; - unsigned long oldmask; - unsigned long cr2; -}; - diff --git a/mdk-stage1/dietlibc/include/asm/ia64-sigcontext.h b/mdk-stage1/dietlibc/include/asm/ia64-sigcontext.h deleted file mode 100644 index ebab3c8f4..000000000 --- a/mdk-stage1/dietlibc/include/asm/ia64-sigcontext.h +++ /dev/null @@ -1,25 +0,0 @@ -#include - -#define PC(ctx) (ctx.sc_ip) - -struct sigcontext { - unsigned long sc_flags; - unsigned long sc_nat; - stack_t sc_stack; - unsigned long sc_ip; - unsigned long sc_cfm; - unsigned long sc_um; - unsigned long sc_ar_rsc; - unsigned long sc_ar_bsp; - unsigned long sc_ar_rnat; - unsigned long sc_ar_ccv; - unsigned long sc_ar_unat; - unsigned long sc_ar_fpsr; - unsigned long sc_ar_pfs; - unsigned long sc_ar_lc; - unsigned long sc_pr; - unsigned long sc_br[8]; - unsigned long sc_gr[32]; - struct ia64_fpreg sc_fr[128]; - sigset_t sc_mask; -}; diff --git a/mdk-stage1/dietlibc/include/asm/mips-sigcontext.h b/mdk-stage1/dietlibc/include/asm/mips-sigcontext.h deleted file mode 100644 index 1210abf31..000000000 --- a/mdk-stage1/dietlibc/include/asm/mips-sigcontext.h +++ /dev/null @@ -1,23 +0,0 @@ - -/* - * Keep this struct definition in sync with the sigcontext fragment - * in arch/mips/tools/offset.c - */ -struct sigcontext { - unsigned int sc_regmask; /* Unused */ - unsigned int sc_status; - unsigned long long sc_pc; - unsigned long long sc_regs[32]; - unsigned long long sc_fpregs[32]; /* Unused */ - unsigned int sc_ownedfp; - unsigned int sc_fpc_csr; /* Unused */ - unsigned int sc_fpc_eir; /* Unused */ - unsigned int sc_ssflags; /* Unused */ - unsigned long long sc_mdhi; - unsigned long long sc_mdlo; - - unsigned int sc_cause; /* Unused */ - unsigned int sc_badvaddr; /* Unused */ - - unsigned long sc_sigset[4]; /* kernel's sigset_t */ -}; diff --git a/mdk-stage1/dietlibc/include/asm/parisc-sigcontext.h b/mdk-stage1/dietlibc/include/asm/parisc-sigcontext.h deleted file mode 100644 index 9428dd3e5..000000000 --- a/mdk-stage1/dietlibc/include/asm/parisc-sigcontext.h +++ /dev/null @@ -1,16 +0,0 @@ - -#define PARISC_SC_FLAG_ONSTACK 1<<0 -#define PARISC_SC_FLAG_IN_SYSCALL 1<<1 - -/* We will add more stuff here as it becomes necessary, until we know - it works. */ -struct sigcontext { - unsigned long sc_flags; - - unsigned long sc_gr[32]; /* PSW in sc_gr[0] */ - unsigned long long sc_fr[32]; /* FIXME, do we need other state info? */ - unsigned long sc_iasq[2]; - unsigned long sc_iaoq[2]; - unsigned long sc_sar; /* cr11 */ -}; - diff --git a/mdk-stage1/dietlibc/include/asm/ppc-sigcontext.h b/mdk-stage1/dietlibc/include/asm/ppc-sigcontext.h deleted file mode 100644 index 1d9704f3a..000000000 --- a/mdk-stage1/dietlibc/include/asm/ppc-sigcontext.h +++ /dev/null @@ -1,76 +0,0 @@ - -struct pt_regs { - unsigned long gpr[32]; - unsigned long nip; - unsigned long msr; - unsigned long orig_gpr3; /* Used for restarting system calls */ - unsigned long ctr; - unsigned long link; - unsigned long xer; - unsigned long ccr; - unsigned long mq; /* 601 only (not used at present) */ - /* Used on APUS to hold IPL value. */ - unsigned long trap; /* Reason for being here */ - unsigned long dar; /* Fault registers */ - unsigned long dsisr; - unsigned long result; /* Result of a system call */ -}; - -/* - * Offsets used by 'ptrace' system call interface. - * These can't be changed without breaking binary compatibility - * with MkLinux, etc. - */ -#define PT_R0 0 -#define PT_R1 1 -#define PT_R2 2 -#define PT_R3 3 -#define PT_R4 4 -#define PT_R5 5 -#define PT_R6 6 -#define PT_R7 7 -#define PT_R8 8 -#define PT_R9 9 -#define PT_R10 10 -#define PT_R11 11 -#define PT_R12 12 -#define PT_R13 13 -#define PT_R14 14 -#define PT_R15 15 -#define PT_R16 16 -#define PT_R17 17 -#define PT_R18 18 -#define PT_R19 19 -#define PT_R20 20 -#define PT_R21 21 -#define PT_R22 22 -#define PT_R23 23 -#define PT_R24 24 -#define PT_R25 25 -#define PT_R26 26 -#define PT_R27 27 -#define PT_R28 28 -#define PT_R29 29 -#define PT_R30 30 -#define PT_R31 31 - -#define PT_NIP 32 -#define PT_MSR 33 -#define PT_CTR 35 -#define PT_LNK 36 -#define PT_XER 37 -#define PT_CCR 38 -#define PT_MQ 39 - -#define PT_FPR0 48 /* each FP reg occupies 2 slots in this space */ -#define PT_FPR31 (PT_FPR0 + 2*31) -#define PT_FPSCR (PT_FPR0 + 2*32 + 1) - -#define sigcontext_struct sigcontext -struct sigcontext { - unsigned long _unused[4]; - int signal; - unsigned long handler; - unsigned long oldmask; - struct pt_regs *regs; -}; diff --git a/mdk-stage1/dietlibc/include/asm/sigcontext.h b/mdk-stage1/dietlibc/include/asm/sigcontext.h deleted file mode 100644 index c4a720cc0..000000000 --- a/mdk-stage1/dietlibc/include/asm/sigcontext.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef _ASM_SIGCONTEXT_H -#define _ASM_SIGCONTEXT_H - -#if defined(__i386__) || defined(__x86_64__) -#include -#endif - -#ifdef __sparc__ -#include -#endif - -#ifdef __mips__ -#include -#endif - -#ifdef __powerpc__ -#include -#endif - -#ifdef __alpha__ -#include -#endif - -#ifdef __arm__ -#include -#endif - -#ifdef __hppa__ -#include -#endif - -#ifdef __ia64__ -#include -#endif - -#endif diff --git a/mdk-stage1/dietlibc/include/asm/sparc-sigcontext.h b/mdk-stage1/dietlibc/include/asm/sparc-sigcontext.h deleted file mode 100644 index 98e4e09ce..000000000 --- a/mdk-stage1/dietlibc/include/asm/sparc-sigcontext.h +++ /dev/null @@ -1,50 +0,0 @@ - -#define __SUNOS_MAXWIN 31 - -/* This is what SunOS does, so shall I. */ -struct sigcontext { - int sigc_onstack; /* state to restore */ - int sigc_mask; /* sigmask to restore */ - int sigc_sp; /* stack pointer */ - int sigc_pc; /* program counter */ - int sigc_npc; /* next program counter */ - int sigc_psr; /* for condition codes etc */ - int sigc_g1; /* User uses these two registers */ - int sigc_o0; /* within the trampoline code. */ - - /* Now comes information regarding the users window set - * at the time of the signal. - */ - int sigc_oswins; /* outstanding windows */ - - /* stack ptrs for each regwin buf */ - char *sigc_spbuf[__SUNOS_MAXWIN]; - - /* Windows to restore after signal */ - struct { - unsigned long locals[8]; - unsigned long ins[8]; - } sigc_wbuf[__SUNOS_MAXWIN]; -}; - -typedef struct { - struct { - unsigned long psr; - unsigned long pc; - unsigned long npc; - unsigned long y; - unsigned long u_regs[16]; /* globals and ins */ - } si_regs; - int si_mask; -} __siginfo_t; - -typedef struct { - unsigned long si_float_regs [32]; - unsigned long si_fsr; - unsigned long si_fpqdepth; - struct { - unsigned long *insn_addr; - unsigned long insn; - } si_fpqueue [16]; -} __siginfo_fpu_t; - diff --git a/mdk-stage1/dietlibc/include/asm/statfs.h b/mdk-stage1/dietlibc/include/asm/statfs.h deleted file mode 100644 index 53b3b5e4d..000000000 --- a/mdk-stage1/dietlibc/include/asm/statfs.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/mdk-stage1/dietlibc/include/asm/types.h b/mdk-stage1/dietlibc/include/asm/types.h deleted file mode 100644 index aafa80f16..000000000 --- a/mdk-stage1/dietlibc/include/asm/types.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef _ASM_TYPES_H -#define _ASM_TYPES_H - -#include - -#ifdef __alpha__ -typedef unsigned int umode_t; -#else -typedef unsigned short umode_t; -#endif - -typedef uint8_t __u8; -typedef uint16_t __u16; -typedef uint32_t __u32; -#ifndef __STRICT_ANSI__ -typedef uint64_t __u64; -#endif - -typedef int8_t __s8; -typedef int16_t __s16; -typedef int32_t __s32; -#ifndef __STRICT_ANSI__ -typedef int64_t __s64; -#endif - -#if defined(__alpha__) -typedef unsigned long __kernel_size_t; -#else -typedef unsigned int __kernel_size_t; -#endif - -#endif diff --git a/mdk-stage1/dietlibc/include/assert.h b/mdk-stage1/dietlibc/include/assert.h deleted file mode 100644 index a8ce3ce87..000000000 --- a/mdk-stage1/dietlibc/include/assert.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef _ASSERT_H -#define _ASSERT_H - -#include - -/* This prints an "Assertion failed" message and aborts. */ -extern void __assert_fail (const char *__assertion, const char *__file, - unsigned int __line, const char *__function) - __THROW __attribute__ ((__noreturn__)); - -#ifdef __PRETTY_FUNCTION__ -#define __ASSERT_FUNCTION __PRETTY_FUNCTION__ -#else -# if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L -# define __ASSERT_FUNCTION __func__ -# else -# define __ASSERT_FUNCTION ((const char *) 0) -# endif -#endif - -#undef assert -#ifdef NDEBUG -#define assert(expr) -#else -#ifdef expect -# define assert(expr) \ - ((void) (expect((long)(expr),0) ? 0 : \ - (__assert_fail (#expr, \ - __FILE__, __LINE__, __ASSERT_FUNCTION), 0))) -#else -# define assert(expr) \ - ((void) ((expr) ? 0 : \ - (__assert_fail (#expr, \ - __FILE__, __LINE__, __ASSERT_FUNCTION), 0))) -#endif -#endif - -#endif diff --git a/mdk-stage1/dietlibc/include/cpio.h b/mdk-stage1/dietlibc/include/cpio.h deleted file mode 100644 index a18c2fbb6..000000000 --- a/mdk-stage1/dietlibc/include/cpio.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef _CPIO_H_ -#define _CPIO_H_ - -#define C_IRUSR 0000400 -#define C_IWUSR 0000200 -#define C_IXUSR 0000100 -#define C_IRGRP 0000040 -#define C_IWGRP 0000020 -#define C_IXGRP 0000010 -#define C_IROTH 0000004 -#define C_IWOTH 0000002 -#define C_IXOTH 0000001 -#define C_ISUID 0004000 -#define C_ISGID 0002000 -#define C_ISVTX 0001000 -#define C_ISDIR 0040000 -#define C_ISFIFO 0010000 -#define C_ISREG 0100000 -#define C_ISBLK 0060000 -#define C_ISCHR 0020000 -#define C_ISCTG 0110000 -#define C_ISLNK 0120000 -#define C_ISSOCK 0140000 - -#define MAGIC "070707" - -#endif /* _CPIO_H_ */ diff --git a/mdk-stage1/dietlibc/include/ctype.h b/mdk-stage1/dietlibc/include/ctype.h deleted file mode 100644 index 9322e8c7b..000000000 --- a/mdk-stage1/dietlibc/include/ctype.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef _CTYPE_H -#define _CTYPE_H - -#include - -extern int isascii (int c) __THROW __attribute__ ((__const__)); -extern int isblank (int c) __THROW __attribute__ ((__const__)); -extern int isalnum (int c) __THROW __attribute__ ((__const__)); -extern int isalpha (int c) __THROW __attribute__ ((__const__)); -extern int isdigit (int c) __THROW __attribute__ ((__const__)); -extern int isspace (int c) __THROW __attribute__ ((__const__)); - -extern int isupper (int c) __THROW __attribute__ ((__const__)); -extern int islower (int c) __THROW __attribute__ ((__const__)); - -extern int tolower(int c) __THROW __attribute__ ((__const__)); -extern int toupper(int c) __THROW __attribute__ ((__const__)); - -extern int isprint(int c) __THROW __attribute__ ((__const__)); -extern int ispunct(int c) __THROW __attribute__ ((__const__)); -extern int iscntrl(int c) __THROW __attribute__ ((__const__)); - -/* fscking GNU extensions! */ -extern int isxdigit(int c) __THROW __attribute__ ((__const__)); - -extern int isgraph(int c) __THROW __attribute__ ((__const__)); - -#endif diff --git a/mdk-stage1/dietlibc/include/daemon.h b/mdk-stage1/dietlibc/include/daemon.h deleted file mode 100644 index e2413d42b..000000000 --- a/mdk-stage1/dietlibc/include/daemon.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _DAEMON_H -#define _DAEMON_H - -#include - -#endif diff --git a/mdk-stage1/dietlibc/include/dietref.h b/mdk-stage1/dietlibc/include/dietref.h deleted file mode 100644 index 99d446300..000000000 --- a/mdk-stage1/dietlibc/include/dietref.h +++ /dev/null @@ -1,22 +0,0 @@ -/* diet includes this file to create linker dependencies on the diet - * libc, so trying to link an object file compiled with diet against - * glibc will fail. */ - -#ifndef NODIETREF -#include -#ifdef __ASSEMBLER__ -.section .note -#if (__WORDSIZE == 64) -.quad __you_tried_to_link_a_dietlibc_object_against_glibc -#else -.long __you_tried_to_link_a_dietlibc_object_against_glibc -#endif -.previous -#else -#if (__WORDSIZE == 64) -__asm__ (".section .note\n\t.quad __you_tried_to_link_a_dietlibc_object_against_glibc\n\t.previous"); -#else -__asm__ (".section .note\n\t.long __you_tried_to_link_a_dietlibc_object_against_glibc\n\t.previous"); -#endif -#endif -#endif diff --git a/mdk-stage1/dietlibc/include/dirent.h b/mdk-stage1/dietlibc/include/dirent.h deleted file mode 100644 index ad8b3a41a..000000000 --- a/mdk-stage1/dietlibc/include/dirent.h +++ /dev/null @@ -1,64 +0,0 @@ -#ifndef _DIRENT_H -#define _DIRENT_H 1 - -#include -#include -#include - -struct dirent { - long d_ino; - off_t d_off; - unsigned short d_reclen; - char d_name[256]; /* We must not include limits.h! */ -}; - -#ifndef __STRICT_ANSI__ -struct dirent64 { - uint64_t d_ino; - int64_t d_off; - unsigned short d_reclen; - unsigned char d_type; - char d_name[256]; -}; -#endif - -#define d_fileno d_ino /* Backwards compatibility. */ - -#undef _DIRENT_HAVE_D_NAMLEN -#define _DIRENT_HAVE_D_RECLEN -#define _DIRENT_HAVE_D_OFF - -typedef struct __dirstream DIR; - -DIR *opendir (const char *__name) __THROW; -int closedir (DIR *__dirp) __THROW; -struct dirent *readdir (DIR *__dirp) __THROW; -struct dirent64 *readdir64 (DIR *__dirp) __THROW; -void rewinddir (DIR *__dirp) __THROW; -void seekdir (DIR *__dirp, long int __pos) __THROW; -long int telldir (DIR *__dirp) __THROW; - -int scandir(const char *dir, struct dirent ***namelist, - int (*selection)(const struct dirent *), - int (*compar)(const struct dirent **, const struct dirent **)) __THROW; -int scandir64(const char *dir, struct dirent64 ***namelist, - int (*selection)(const struct dirent64 *), - int (*compar)(const struct dirent64 **, const struct dirent64 **)) __THROW; - -int alphasort(const struct dirent **a, const struct dirent **b) __THROW __attribute__((const)); -int alphasort64(const struct dirent64 **a, const struct dirent64 **b) __THROW __attribute__((const)); - -#define MAXNAMLEN NAME_MAX - -#ifdef _BSD_SOURCE -extern int dirfd(DIR *dirp) __THROW; -#endif - -#if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64 -#define dirent dirent64 -#define readdir readdir64 -#define scandir scandir64 -#define alphasort alphasort64 -#endif - -#endif diff --git a/mdk-stage1/dietlibc/include/dlfcn.h b/mdk-stage1/dietlibc/include/dlfcn.h deleted file mode 100644 index 0ddcafdba..000000000 --- a/mdk-stage1/dietlibc/include/dlfcn.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef _DLFCN_H -#define _DLFCN_H 1 - -#define RTLD_LAZY 0x00000 -#define RTLD_NOW 0x00001 - -#define RTLD_LOCAL 0x00000 -#define RTLD_GLOBAL 0x10000 - -#define RTLD_DEFAULT ((void*)1) -#define RTLD_NEXT ((void*)2) - -void *dlopen (const char *filename, int flag); -const char *dlerror(void); -void *dlsym(void *handle, char *symbol); -int dlclose (void *handle); - -#endif diff --git a/mdk-stage1/dietlibc/include/elf.h b/mdk-stage1/dietlibc/include/elf.h deleted file mode 100644 index 7b198bad3..000000000 --- a/mdk-stage1/dietlibc/include/elf.h +++ /dev/null @@ -1,780 +0,0 @@ -#ifndef _ELF_H -#define _ELF_H - -#include - -/* 32-bit ELF base types. */ -typedef uint32_t Elf32_Addr; -typedef uint16_t Elf32_Half; -typedef uint32_t Elf32_Off; -typedef int32_t Elf32_Sword; -typedef uint32_t Elf32_Word; - -/* 64-bit ELF base types. */ -typedef uint64_t Elf64_Addr; -typedef uint16_t Elf64_Half; -typedef int16_t Elf64_SHalf; -typedef uint64_t Elf64_Off; -typedef int32_t Elf64_Sword; -typedef uint32_t Elf64_Word; -typedef uint64_t Elf64_Xword; -typedef int64_t Elf64_Sxword; - -/* These constants are for the segment types stored in the image headers */ -#define PT_NULL 0 -#define PT_LOAD 1 -#define PT_DYNAMIC 2 -#define PT_INTERP 3 -#define PT_NOTE 4 -#define PT_SHLIB 5 -#define PT_PHDR 6 -#define PT_LOPROC 0x70000000 -#define PT_HIPROC 0x7fffffff -#define PT_MIPS_REGINFO 0x70000000 - -/* Flags in the e_flags field of the header */ -#define EF_MIPS_NOREORDER 0x00000001 -#define EF_MIPS_PIC 0x00000002 -#define EF_MIPS_CPIC 0x00000004 -#define EF_MIPS_ARCH 0xf0000000 - -/* These constants define the different elf file types */ -#define ET_NONE 0 -#define ET_REL 1 -#define ET_EXEC 2 -#define ET_DYN 3 -#define ET_CORE 4 -#define ET_LOPROC 0xff00 -#define ET_HIPROC 0xffff - -/* These constants define the various ELF target machines */ -#define EM_NONE 0 -#define EM_M32 1 -#define EM_SPARC 2 -#define EM_386 3 -#define EM_68K 4 -#define EM_88K 5 -#define EM_486 6 /* Perhaps disused */ -#define EM_860 7 - -#define EM_MIPS 8 /* MIPS R3000 (officially, big-endian only) */ -#define EM_MIPS_RS4_BE 10 /* MIPS R4000 big-endian */ - -#define EM_PARISC 15 /* HPPA */ -#define EM_SPARC32PLUS 18 /* Sun's "v8plus" */ -#define EM_PPC 20 /* PowerPC */ -#define EM_S390 22 /* IBM S/390 */ - -#define EM_ARM 40 /* ARM */ -#define EM_SH 42 /* SuperH */ -#define EM_SPARCV9 43 /* SPARC v9 64-bit */ -#define EM_IA_64 50 /* HP/Intel IA-64 */ -#define EM_X86_64 62 /* AMD x86-64 */ -#define EM_CRIS 76 /* Axis Communications 32-bit embedded processor */ - -/* - * This is an interim value that we will use until the committee comes - * up with a final number. - */ -#define EM_ALPHA 0x9026 - -/* - * This is the old interim value for S/390 architecture - */ -#define EM_S390_OLD 0xA390 - -/* This is the info that is needed to parse the dynamic section of the file */ -#define DT_NULL 0 -#define DT_NEEDED 1 -#define DT_PLTRELSZ 2 -#define DT_PLTGOT 3 -#define DT_HASH 4 -#define DT_STRTAB 5 -#define DT_SYMTAB 6 -#define DT_RELA 7 -#define DT_RELASZ 8 -#define DT_RELAENT 9 -#define DT_STRSZ 10 -#define DT_SYMENT 11 -#define DT_INIT 12 -#define DT_FINI 13 -#define DT_SONAME 14 -#define DT_RPATH 15 -#define DT_SYMBOLIC 16 -#define DT_REL 17 -#define DT_RELSZ 18 -#define DT_RELENT 19 -#define DT_PLTREL 20 -#define DT_DEBUG 21 -#define DT_TEXTREL 22 -#define DT_JMPREL 23 -#define DT_NUM 24 -#define DT_LOPROC 0x70000000 -#define DT_HIPROC 0x7fffffff -#define DT_MIPS_RLD_VERSION 0x70000001 -#define DT_MIPS_TIME_STAMP 0x70000002 -#define DT_MIPS_ICHECKSUM 0x70000003 -#define DT_MIPS_IVERSION 0x70000004 -#define DT_MIPS_FLAGS 0x70000005 - #define RHF_NONE 0 - #define RHF_HARDWAY 1 - #define RHF_NOTPOT 2 -#define DT_MIPS_BASE_ADDRESS 0x70000006 -#define DT_MIPS_CONFLICT 0x70000008 -#define DT_MIPS_LIBLIST 0x70000009 -#define DT_MIPS_LOCAL_GOTNO 0x7000000a -#define DT_MIPS_CONFLICTNO 0x7000000b -#define DT_MIPS_LIBLISTNO 0x70000010 -#define DT_MIPS_SYMTABNO 0x70000011 -#define DT_MIPS_UNREFEXTNO 0x70000012 -#define DT_MIPS_GOTSYM 0x70000013 -#define DT_MIPS_HIPAGENO 0x70000014 -#define DT_MIPS_RLD_MAP 0x70000016 - -/* This info is needed when parsing the symbol table */ -#define STB_LOCAL 0 -#define STB_GLOBAL 1 -#define STB_WEAK 2 - -#define STT_NOTYPE 0 -#define STT_OBJECT 1 -#define STT_FUNC 2 -#define STT_SECTION 3 -#define STT_FILE 4 - -#define ELF32_ST_BIND(x) ((x) >> 4) -#define ELF32_ST_TYPE(x) (((unsigned int) x) & 0xf) - -#define ELF64_ST_BIND(val) ELF32_ST_BIND (val) -#define ELF64_ST_TYPE(val) ELF32_ST_TYPE (val) - -/* Symbolic values for the entries in the auxiliary table - put on the initial stack */ -#define AT_NULL 0 /* end of vector */ -#define AT_IGNORE 1 /* entry should be ignored */ -#define AT_EXECFD 2 /* file descriptor of program */ -#define AT_PHDR 3 /* program headers for program */ -#define AT_PHENT 4 /* size of program header entry */ -#define AT_PHNUM 5 /* number of program headers */ -#define AT_PAGESZ 6 /* system page size */ -#define AT_BASE 7 /* base address of interpreter */ -#define AT_FLAGS 8 /* flags */ -#define AT_ENTRY 9 /* entry point of program */ -#define AT_NOTELF 10 /* program is not ELF */ -#define AT_UID 11 /* real uid */ -#define AT_EUID 12 /* effective uid */ -#define AT_GID 13 /* real gid */ -#define AT_EGID 14 /* effective gid */ -#define AT_PLATFORM 15 /* string identifying CPU for optimizations */ -#define AT_HWCAP 16 /* arch dependent hints at CPU capabilities */ -#define AT_CLKTCK 17 /* frequency at which times() increments */ - -typedef struct dynamic{ - Elf32_Sword d_tag; - union{ - Elf32_Sword d_val; - Elf32_Addr d_ptr; - } d_un; -} Elf32_Dyn; - -typedef struct { - Elf64_Sxword d_tag; /* entry tag value */ - union { - Elf64_Xword d_val; - Elf64_Addr d_ptr; - } d_un; -} Elf64_Dyn; - -/* The following are used with relocations */ -#define ELF32_R_SYM(x) ((x) >> 8) -#define ELF32_R_TYPE(x) ((x) & 0xff) - -#define ELF64_R_SYM(x) ((x) >> 32) -#define ELF64_R_TYPE(x) ((x) & 0xffffffff) - -#define R_386_NONE 0 -#define R_386_32 1 -#define R_386_PC32 2 -#define R_386_GOT32 3 -#define R_386_PLT32 4 -#define R_386_COPY 5 -#define R_386_GLOB_DAT 6 -#define R_386_JMP_SLOT 7 -#define R_386_RELATIVE 8 -#define R_386_GOTOFF 9 -#define R_386_GOTPC 10 -#define R_386_NUM 11 - -#define R_MIPS_NONE 0 -#define R_MIPS_16 1 -#define R_MIPS_32 2 -#define R_MIPS_REL32 3 -#define R_MIPS_26 4 -#define R_MIPS_HI16 5 -#define R_MIPS_LO16 6 -#define R_MIPS_GPREL16 7 -#define R_MIPS_LITERAL 8 -#define R_MIPS_GOT16 9 -#define R_MIPS_PC16 10 -#define R_MIPS_CALL16 11 -#define R_MIPS_GPREL32 12 -/* The remaining relocs are defined on Irix, although they are not - in the MIPS ELF ABI. */ -#define R_MIPS_UNUSED1 13 -#define R_MIPS_UNUSED2 14 -#define R_MIPS_UNUSED3 15 -#define R_MIPS_SHIFT5 16 -#define R_MIPS_SHIFT6 17 -#define R_MIPS_64 18 -#define R_MIPS_GOT_DISP 19 -#define R_MIPS_GOT_PAGE 20 -#define R_MIPS_GOT_OFST 21 -/* - * The following two relocation types are specified in the MIPS ABI - * conformance guide version 1.2 but not yet in the psABI. - */ -#define R_MIPS_GOTHI16 22 -#define R_MIPS_GOTLO16 23 -#define R_MIPS_SUB 24 -#define R_MIPS_INSERT_A 25 -#define R_MIPS_INSERT_B 26 -#define R_MIPS_DELETE 27 -#define R_MIPS_HIGHER 28 -#define R_MIPS_HIGHEST 29 -/* - * The following two relocation types are specified in the MIPS ABI - * conformance guide version 1.2 but not yet in the psABI. - */ -#define R_MIPS_CALLHI16 30 -#define R_MIPS_CALLLO16 31 -/* - * This range is reserved for vendor specific relocations. - */ -#define R_MIPS_LOVENDOR 100 -#define R_MIPS_HIVENDOR 127 - - -/* - * Sparc ELF relocation types - */ -#define R_SPARC_NONE 0 -#define R_SPARC_8 1 -#define R_SPARC_16 2 -#define R_SPARC_32 3 -#define R_SPARC_DISP8 4 -#define R_SPARC_DISP16 5 -#define R_SPARC_DISP32 6 -#define R_SPARC_WDISP30 7 -#define R_SPARC_WDISP22 8 -#define R_SPARC_HI22 9 -#define R_SPARC_22 10 -#define R_SPARC_13 11 -#define R_SPARC_LO10 12 -#define R_SPARC_GOT10 13 -#define R_SPARC_GOT13 14 -#define R_SPARC_GOT22 15 -#define R_SPARC_PC10 16 -#define R_SPARC_PC22 17 -#define R_SPARC_WPLT30 18 -#define R_SPARC_COPY 19 -#define R_SPARC_GLOB_DAT 20 -#define R_SPARC_JMP_SLOT 21 -#define R_SPARC_RELATIVE 22 -#define R_SPARC_UA32 23 -#define R_SPARC_PLT32 24 -#define R_SPARC_HIPLT22 25 -#define R_SPARC_LOPLT10 26 -#define R_SPARC_PCPLT32 27 -#define R_SPARC_PCPLT22 28 -#define R_SPARC_PCPLT10 29 -#define R_SPARC_10 30 -#define R_SPARC_11 31 -#define R_SPARC_WDISP16 40 -#define R_SPARC_WDISP19 41 -#define R_SPARC_7 43 -#define R_SPARC_5 44 -#define R_SPARC_6 45 - -/* Bits present in AT_HWCAP, primarily for Sparc32. */ - -#define HWCAP_SPARC_FLUSH 1 /* CPU supports flush instruction. */ -#define HWCAP_SPARC_STBAR 2 -#define HWCAP_SPARC_SWAP 4 -#define HWCAP_SPARC_MULDIV 8 -#define HWCAP_SPARC_V9 16 -#define HWCAP_SPARC_ULTRA3 32 - -/* - * 68k ELF relocation types - */ -#define R_68K_NONE 0 -#define R_68K_32 1 -#define R_68K_16 2 -#define R_68K_8 3 -#define R_68K_PC32 4 -#define R_68K_PC16 5 -#define R_68K_PC8 6 -#define R_68K_GOT32 7 -#define R_68K_GOT16 8 -#define R_68K_GOT8 9 -#define R_68K_GOT32O 10 -#define R_68K_GOT16O 11 -#define R_68K_GOT8O 12 -#define R_68K_PLT32 13 -#define R_68K_PLT16 14 -#define R_68K_PLT8 15 -#define R_68K_PLT32O 16 -#define R_68K_PLT16O 17 -#define R_68K_PLT8O 18 -#define R_68K_COPY 19 -#define R_68K_GLOB_DAT 20 -#define R_68K_JMP_SLOT 21 -#define R_68K_RELATIVE 22 - -/* - * Alpha ELF relocation types - */ -#define R_ALPHA_NONE 0 /* No reloc */ -#define R_ALPHA_REFLONG 1 /* Direct 32 bit */ -#define R_ALPHA_REFQUAD 2 /* Direct 64 bit */ -#define R_ALPHA_GPREL32 3 /* GP relative 32 bit */ -#define R_ALPHA_LITERAL 4 /* GP relative 16 bit w/optimization */ -#define R_ALPHA_LITUSE 5 /* Optimization hint for LITERAL */ -#define R_ALPHA_GPDISP 6 /* Add displacement to GP */ -#define R_ALPHA_BRADDR 7 /* PC+4 relative 23 bit shifted */ -#define R_ALPHA_HINT 8 /* PC+4 relative 16 bit shifted */ -#define R_ALPHA_SREL16 9 /* PC relative 16 bit */ -#define R_ALPHA_SREL32 10 /* PC relative 32 bit */ -#define R_ALPHA_SREL64 11 /* PC relative 64 bit */ -#define R_ALPHA_OP_PUSH 12 /* OP stack push */ -#define R_ALPHA_OP_STORE 13 /* OP stack pop and store */ -#define R_ALPHA_OP_PSUB 14 /* OP stack subtract */ -#define R_ALPHA_OP_PRSHIFT 15 /* OP stack right shift */ -#define R_ALPHA_GPVALUE 16 -#define R_ALPHA_GPRELHIGH 17 -#define R_ALPHA_GPRELLOW 18 -#define R_ALPHA_IMMED_GP_16 19 -#define R_ALPHA_IMMED_GP_HI32 20 -#define R_ALPHA_IMMED_SCN_HI32 21 -#define R_ALPHA_IMMED_BR_HI32 22 -#define R_ALPHA_IMMED_LO32 23 -#define R_ALPHA_COPY 24 /* Copy symbol at runtime */ -#define R_ALPHA_GLOB_DAT 25 /* Create GOT entry */ -#define R_ALPHA_JMP_SLOT 26 /* Create PLT entry */ -#define R_ALPHA_RELATIVE 27 /* Adjust by program base */ - -/* Legal values for e_flags field of Elf64_Ehdr. */ - -#define EF_ALPHA_32BIT 1 /* All addresses are below 2GB */ - -/* - * PowerPC - */ - -/* Values for Elf32/64_Ehdr.e_flags. */ -#define EF_PPC_EMB 0x80000000 /* PowerPC embedded flag */ - -/* Cygnus local bits below */ -#define EF_PPC_RELOCATABLE 0x00010000 /* PowerPC -mrelocatable flag*/ -#define EF_PPC_RELOCATABLE_LIB 0x00008000 /* PowerPC -mrelocatable-lib flag */ - -/* PowerPC relocations defined by the ABIs */ -#define R_PPC_NONE 0 -#define R_PPC_ADDR32 1 /* 32bit absolute address */ -#define R_PPC_ADDR24 2 /* 26bit address, 2 bits ignored. */ -#define R_PPC_ADDR16 3 /* 16bit absolute address */ -#define R_PPC_ADDR16_LO 4 /* lower 16bit of absolute address */ -#define R_PPC_ADDR16_HI 5 /* high 16bit of absolute address */ -#define R_PPC_ADDR16_HA 6 /* adjusted high 16bit */ -#define R_PPC_ADDR14 7 /* 16bit address, 2 bits ignored */ -#define R_PPC_ADDR14_BRTAKEN 8 -#define R_PPC_ADDR14_BRNTAKEN 9 -#define R_PPC_REL24 10 /* PC relative 26 bit */ -#define R_PPC_REL14 11 /* PC relative 16 bit */ -#define R_PPC_REL14_BRTAKEN 12 -#define R_PPC_REL14_BRNTAKEN 13 -#define R_PPC_GOT16 14 -#define R_PPC_GOT16_LO 15 -#define R_PPC_GOT16_HI 16 -#define R_PPC_GOT16_HA 17 -#define R_PPC_PLTREL24 18 -#define R_PPC_COPY 19 -#define R_PPC_GLOB_DAT 20 -#define R_PPC_JMP_SLOT 21 -#define R_PPC_RELATIVE 22 -#define R_PPC_LOCAL24PC 23 -#define R_PPC_UADDR32 24 -#define R_PPC_UADDR16 25 -#define R_PPC_REL32 26 -#define R_PPC_PLT32 27 -#define R_PPC_PLTREL32 28 -#define R_PPC_PLT16_LO 29 -#define R_PPC_PLT16_HI 30 -#define R_PPC_PLT16_HA 31 -#define R_PPC_SDAREL16 32 -#define R_PPC_SECTOFF 33 -#define R_PPC_SECTOFF_LO 34 -#define R_PPC_SECTOFF_HI 35 -#define R_PPC_SECTOFF_HA 36 -/* Keep this the last entry. */ -#define R_PPC_NUM 37 - -/* The remaining relocs are from the Embedded ELF ABI, and are not - in the SVR4 ELF ABI. */ -#define R_PPC_EMB_NADDR32 101 -#define R_PPC_EMB_NADDR16 102 -#define R_PPC_EMB_NADDR16_LO 103 -#define R_PPC_EMB_NADDR16_HI 104 -#define R_PPC_EMB_NADDR16_HA 105 -#define R_PPC_EMB_SDAI16 106 -#define R_PPC_EMB_SDA2I16 107 -#define R_PPC_EMB_SDA2REL 108 -#define R_PPC_EMB_SDA21 109 /* 16 bit offset in SDA */ -#define R_PPC_EMB_MRKREF 110 -#define R_PPC_EMB_RELSEC16 111 -#define R_PPC_EMB_RELST_LO 112 -#define R_PPC_EMB_RELST_HI 113 -#define R_PPC_EMB_RELST_HA 114 -#define R_PPC_EMB_BIT_FLD 115 -#define R_PPC_EMB_RELSDA 116 /* 16 bit relative offset in SDA */ - -/* Diab tool relocations. */ -#define R_PPC_DIAB_SDA21_LO 180 /* like EMB_SDA21, but lower 16 bit */ -#define R_PPC_DIAB_SDA21_HI 181 /* like EMB_SDA21, but high 16 bit */ -#define R_PPC_DIAB_SDA21_HA 182 /* like EMB_SDA21, adjusted high 16 */ -#define R_PPC_DIAB_RELSDA_LO 183 /* like EMB_RELSDA, but lower 16 bit */ -#define R_PPC_DIAB_RELSDA_HI 184 /* like EMB_RELSDA, but high 16 bit */ -#define R_PPC_DIAB_RELSDA_HA 185 /* like EMB_RELSDA, adjusted high 16 */ - -/* This is a phony reloc to handle any old fashioned TOC16 references - that may still be in object files. */ -#define R_PPC_TOC16 255 - -/* - * ARM ELF relocation types - */ -#define R_ARM_NONE 0 /* No reloc */ -#define R_ARM_PC24 1 /* PC relative 26 bit branch */ -#define R_ARM_ABS32 2 /* Direct 32 bit */ -#define R_ARM_REL32 3 /* PC relative 32 bit */ -#define R_ARM_PC13 4 -#define R_ARM_ABS16 5 /* Direct 16 bit */ -#define R_ARM_ABS12 6 /* Direct 12 bit */ -#define R_ARM_THM_ABS5 7 -#define R_ARM_ABS8 8 /* Direct 8 bit */ -#define R_ARM_SBREL32 9 -#define R_ARM_THM_PC22 10 -#define R_ARM_THM_PC8 11 -#define R_ARM_AMP_VCALL9 12 -#define R_ARM_SWI24 13 -#define R_ARM_THM_SWI8 14 -#define R_ARM_XPC25 15 -#define R_ARM_THM_XPC22 16 -#define R_ARM_COPY 20 /* Copy symbol at runtime */ -#define R_ARM_GLOB_DAT 21 /* Create GOT entry */ -#define R_ARM_JUMP_SLOT 22 /* Create PLT entry */ -#define R_ARM_RELATIVE 23 /* Adjust by program base */ -#define R_ARM_GOTOFF 24 /* 32 bit offset to GOT */ -#define R_ARM_GOTPC 25 /* 32 bit PC relative offset to GOT */ -#define R_ARM_GOT32 26 /* 32 bit GOT entry */ -#define R_ARM_PLT32 27 /* 32 bit PLT address */ -#define R_ARM_GNU_VTENTRY 100 -#define R_ARM_GNU_VTINHERIT 101 -#define R_ARM_THM_PC11 102 /* thumb unconditional branch */ -#define R_ARM_THM_PC9 103 /* thumb conditional branch */ -#define R_ARM_RXPC25 249 -#define R_ARM_RSBREL32 250 -#define R_ARM_THM_RPC22 251 -#define R_ARM_RREL32 252 -#define R_ARM_RABS22 253 -#define R_ARM_RPC24 254 -#define R_ARM_RBASE 255 -/* Keep this the last entry. */ -#define R_ARM_NUM 256 - -/* Processor specific flags for the ELF header e_flags field. */ -#define EF_ARM_RELEXEC 0x01 -#define EF_ARM_HASENTRY 0x02 -#define EF_ARM_INTERWORK 0x04 -#define EF_ARM_APCS_26 0x08 -#define EF_ARM_APCS_FLOAT 0x10 -#define EF_ARM_PIC 0x20 -#define EF_ALIGN8 0x40 /* 8-bit structure alignment is in use */ -#define EF_NEW_ABI 0x80 -#define EF_OLD_ABI 0x100 - -/* Additional symbol types for Thumb */ -#define STT_ARM_TFUNC 0xd - -/* AMD x86-64 relocations. */ -#define R_X86_64_NONE 0 /* No reloc */ -#define R_X86_64_64 1 /* Direct 64 bit */ -#define R_X86_64_PC32 2 /* PC relative 32 bit signed */ -#define R_X86_64_GOT32 3 /* 32 bit GOT entry */ -#define R_X86_64_PLT32 4 /* 32 bit PLT address */ -#define R_X86_64_COPY 5 /* Copy symbol at runtime */ -#define R_X86_64_GLOB_DAT 6 /* Create GOT entry */ -#define R_X86_64_JUMP_SLOT 7 /* Create PLT entry */ -#define R_X86_64_RELATIVE 8 /* Adjust by program base */ -#define R_X86_64_GOTPCREL 9 /* 32 bit signed PC relative - offset to GOT */ -#define R_X86_64_32 10 /* Direct 32 bit zero extended */ -#define R_X86_64_32S 11 /* Direct 32 bit sign extended */ -#define R_X86_64_16 12 /* Direct 16 bit zero extended */ -#define R_X86_64_PC16 13 /* 16 bit sign extended pc relative */ -#define R_X86_64_8 14 /* Direct 8 bit sign extended */ -#define R_X86_64_PC8 15 /* 8 bit sign extended pc relative */ -#define R_X86_64_DTPMOD64 16 /* ID of module containing symbol */ -#define R_X86_64_DTPOFF64 17 /* Offset in module's TLS block */ -#define R_X86_64_TPOFF64 18 /* Offset in initial TLS block */ -#define R_X86_64_TLSGD 19 /* 32 bit signed PC relative offset - to two GOT entries for GD symbol */ -#define R_X86_64_TLSLD 20 /* 32 bit signed PC relative offset - to two GOT entries for LD symbol */ -#define R_X86_64_DTPOFF32 21 /* Offset in TLS block */ -#define R_X86_64_GOTTPOFF 22 /* 32 bit signed PC relative offset - to GOT entry for IE symbol */ -#define R_X86_64_TPOFF32 23 /* Offset in initial TLS block */ - -#define R_X86_64_NUM 24 - -typedef struct elf32_rel { - Elf32_Addr r_offset; - Elf32_Word r_info; -} Elf32_Rel; - -typedef struct elf64_rel { - Elf64_Addr r_offset; /* Location at which to apply the action */ - Elf64_Xword r_info; /* index and type of relocation */ -} Elf64_Rel; - -typedef struct elf32_rela{ - Elf32_Addr r_offset; - Elf32_Word r_info; - Elf32_Sword r_addend; -} Elf32_Rela; - -typedef struct elf64_rela { - Elf64_Addr r_offset; /* Location at which to apply the action */ - Elf64_Xword r_info; /* index and type of relocation */ - Elf64_Sxword r_addend; /* Constant addend used to compute value */ -} Elf64_Rela; - -typedef struct elf32_sym{ - Elf32_Word st_name; - Elf32_Addr st_value; - Elf32_Word st_size; - unsigned char st_info; - unsigned char st_other; - Elf32_Half st_shndx; -} Elf32_Sym; - -typedef struct elf64_sym { - Elf64_Word st_name; /* Symbol name, index in string tbl */ - unsigned char st_info; /* Type and binding attributes */ - unsigned char st_other; /* No defined meaning, 0 */ - Elf64_Half st_shndx; /* Associated section index */ - Elf64_Addr st_value; /* Value of the symbol */ - Elf64_Xword st_size; /* Associated symbol size */ -} Elf64_Sym; - - -#define EI_NIDENT 16 - -typedef struct elf32_hdr{ - unsigned char e_ident[EI_NIDENT]; - Elf32_Half e_type; - Elf32_Half e_machine; - Elf32_Word e_version; - Elf32_Addr e_entry; /* Entry point */ - Elf32_Off e_phoff; - Elf32_Off e_shoff; - Elf32_Word e_flags; - Elf32_Half e_ehsize; - Elf32_Half e_phentsize; - Elf32_Half e_phnum; - Elf32_Half e_shentsize; - Elf32_Half e_shnum; - Elf32_Half e_shstrndx; -} Elf32_Ehdr; - -typedef struct elf64_hdr { - unsigned char e_ident[16]; /* ELF "magic number" */ - Elf64_Half e_type; - Elf64_Half e_machine; - Elf64_Word e_version; - Elf64_Addr e_entry; /* Entry point virtual address */ - Elf64_Off e_phoff; /* Program header table file offset */ - Elf64_Off e_shoff; /* Section header table file offset */ - Elf64_Word e_flags; - Elf64_Half e_ehsize; - Elf64_Half e_phentsize; - Elf64_Half e_phnum; - Elf64_Half e_shentsize; - Elf64_Half e_shnum; - Elf64_Half e_shstrndx; -} Elf64_Ehdr; - -/* These constants define the permissions on sections in the program - header, p_flags. */ -#define PF_R 0x4 -#define PF_W 0x2 -#define PF_X 0x1 - -typedef struct elf32_phdr{ - Elf32_Word p_type; - Elf32_Off p_offset; - Elf32_Addr p_vaddr; - Elf32_Addr p_paddr; - Elf32_Word p_filesz; - Elf32_Word p_memsz; - Elf32_Word p_flags; - Elf32_Word p_align; -} Elf32_Phdr; - -typedef struct elf64_phdr { - Elf64_Word p_type; - Elf64_Word p_flags; - Elf64_Off p_offset; /* Segment file offset */ - Elf64_Addr p_vaddr; /* Segment virtual address */ - Elf64_Addr p_paddr; /* Segment physical address */ - Elf64_Xword p_filesz; /* Segment size in file */ - Elf64_Xword p_memsz; /* Segment size in memory */ - Elf64_Xword p_align; /* Segment alignment, file & memory */ -} Elf64_Phdr; - -/* sh_type */ -#define SHT_NULL 0 -#define SHT_PROGBITS 1 -#define SHT_SYMTAB 2 -#define SHT_STRTAB 3 -#define SHT_RELA 4 -#define SHT_HASH 5 -#define SHT_DYNAMIC 6 -#define SHT_NOTE 7 -#define SHT_NOBITS 8 -#define SHT_REL 9 -#define SHT_SHLIB 10 -#define SHT_DYNSYM 11 -#define SHT_NUM 12 -#define SHT_LOPROC 0x70000000 -#define SHT_HIPROC 0x7fffffff -#define SHT_LOUSER 0x80000000 -#define SHT_HIUSER 0xffffffff -#define SHT_MIPS_LIST 0x70000000 -#define SHT_MIPS_CONFLICT 0x70000002 -#define SHT_MIPS_GPTAB 0x70000003 -#define SHT_MIPS_UCODE 0x70000004 - -/* sh_flags */ -#define SHF_WRITE 0x1 -#define SHF_ALLOC 0x2 -#define SHF_EXECINSTR 0x4 -#define SHF_MASKPROC 0xf0000000 -#define SHF_MIPS_GPREL 0x10000000 -#define SHF_ALPHA_GPREL 0x10000000 - -/* special section indexes */ -#define SHN_UNDEF 0 -#define SHN_LORESERVE 0xff00 -#define SHN_LOPROC 0xff00 -#define SHN_HIPROC 0xff1f -#define SHN_ABS 0xfff1 -#define SHN_COMMON 0xfff2 -#define SHN_HIRESERVE 0xffff -#define SHN_MIPS_ACCOMON 0xff00 - -typedef struct { - Elf32_Word sh_name; - Elf32_Word sh_type; - Elf32_Word sh_flags; - Elf32_Addr sh_addr; - Elf32_Off sh_offset; - Elf32_Word sh_size; - Elf32_Word sh_link; - Elf32_Word sh_info; - Elf32_Word sh_addralign; - Elf32_Word sh_entsize; -} Elf32_Shdr; - -typedef struct elf64_shdr { - Elf64_Word sh_name; /* Section name, index in string tbl */ - Elf64_Word sh_type; /* Type of section */ - Elf64_Xword sh_flags; /* Miscellaneous section attributes */ - Elf64_Addr sh_addr; /* Section virtual addr at execution */ - Elf64_Off sh_offset; /* Section file offset */ - Elf64_Xword sh_size; /* Size of section in bytes */ - Elf64_Word sh_link; /* Index of another section */ - Elf64_Word sh_info; /* Additional section information */ - Elf64_Xword sh_addralign; /* Section alignment */ - Elf64_Xword sh_entsize; /* Entry size if section holds table */ -} Elf64_Shdr; - -#define EI_MAG0 0 /* e_ident[] indexes */ -#define EI_MAG1 1 -#define EI_MAG2 2 -#define EI_MAG3 3 -#define EI_CLASS 4 -#define EI_DATA 5 -#define EI_VERSION 6 -#define EI_PAD 7 - -#define ELFMAG0 0x7f /* EI_MAG */ -#define ELFMAG1 'E' -#define ELFMAG2 'L' -#define ELFMAG3 'F' -#define ELFMAG "\177ELF" -#define SELFMAG 4 - -#define ELFCLASSNONE 0 /* EI_CLASS */ -#define ELFCLASS32 1 -#define ELFCLASS64 2 -#define ELFCLASSNUM 3 - -#define ELFDATANONE 0 /* e_ident[EI_DATA] */ -#define ELFDATA2LSB 1 -#define ELFDATA2MSB 2 - -#define EV_NONE 0 /* e_version, EI_VERSION */ -#define EV_CURRENT 1 -#define EV_NUM 2 - -/* Notes used in ET_CORE */ -#define NT_PRSTATUS 1 -#define NT_PRFPREG 2 -#define NT_PRPSINFO 3 -#define NT_TASKSTRUCT 4 -#define NT_PRFPXREG 20 - -/* Note header in a PT_NOTE section */ -typedef struct elf32_note { - Elf32_Word n_namesz; /* Name size */ - Elf32_Word n_descsz; /* Content size */ - Elf32_Word n_type; /* Content type */ -} Elf32_Nhdr; - -/* Note header in a PT_NOTE section */ -typedef struct elf64_note { - Elf64_Word n_namesz; /* Name size */ - Elf64_Word n_descsz; /* Content size */ - Elf64_Word n_type; /* Content type */ -} Elf64_Nhdr; - -#if ELF_CLASS == ELFCLASS32 - -extern Elf32_Dyn _DYNAMIC []; -#define elfhdr elf32_hdr -#define elf_phdr elf32_phdr -#define elf_note elf32_note - -#else - -extern Elf64_Dyn _DYNAMIC []; -#define elfhdr elf64_hdr -#define elf_phdr elf64_phdr -#define elf_note elf64_note - -#endif - - -#endif diff --git a/mdk-stage1/dietlibc/include/endian.h b/mdk-stage1/dietlibc/include/endian.h deleted file mode 100644 index 93b1f2948..000000000 --- a/mdk-stage1/dietlibc/include/endian.h +++ /dev/null @@ -1,62 +0,0 @@ -#ifndef _ENDIAN_H -#define _ENDIAN_H - -#define __LITTLE_ENDIAN 1234 -#define __BIG_ENDIAN 4321 - -#if defined(__i386__) || defined(__x86_64__) || defined(__ia64__) -#define __BYTE_ORDER __LITTLE_ENDIAN -#define __FLOAT_WORD_ORDER __BYTE_ORDER -#endif - -#ifdef __sparc__ -#define __BYTE_ORDER __BIG_ENDIAN -#define __FLOAT_WORD_ORDER __BYTE_ORDER -#endif - -#ifdef __hppa__ -/* I hope this is correct...? */ -#define __BYTE_ORDER __BIG_ENDIAN -#define __FLOAT_WORD_ORDER __BYTE_ORDER -#endif - -#ifdef __mips__ -#ifdef __MIPSEB__ -#define __BYTE_ORDER __BIG_ENDIAN -#define __FLOAT_WORD_ORDER __BYTE_ORDER -#endif -#endif - -#ifndef __BYTE_ORDER -#ifdef __BIG_ENDIAN__ -#define __BYTE_ORDER __BIG_ENDIAN -#define __FLOAT_WORD_ORDER __BYTE_ORDER -#else -#define __BYTE_ORDER __LITTLE_ENDIAN -#define __FLOAT_WORD_ORDER __BYTE_ORDER -#endif -#endif - -#define LITTLE_ENDIAN __LITTLE_ENDIAN -#define BIG_ENDIAN __BIG_ENDIAN -#define BYTE_ORDER __BYTE_ORDER - -#if __BYTE_ORDER == __LITTLE_ENDIAN -# define __LONG_LONG_PAIR(HI, LO) LO, HI -#elif __BYTE_ORDER == __BIG_ENDIAN -# define __LONG_LONG_PAIR(HI, LO) HI, LO -#endif - -#if defined(__alpha__) || defined(__mips64) || defined(__sparc_v9__) || defined(__x86_64__) || defined(__ia64__) -#define __WORDSIZE 64 -#endif - -#if defined(__sparc__) && (__arch64__) -#define __WORDSIZE 64 -#endif - -#ifndef __WORDSIZE -#define __WORDSIZE 32 -#endif - -#endif diff --git a/mdk-stage1/dietlibc/include/errno.h b/mdk-stage1/dietlibc/include/errno.h deleted file mode 100644 index 12aa394da..000000000 --- a/mdk-stage1/dietlibc/include/errno.h +++ /dev/null @@ -1,546 +0,0 @@ -#ifndef _ERRNO_H -#define _ERRNO_H - -#if defined(__alpha__) - -#define EPERM 1 /* Operation not permitted */ -#define ENOENT 2 /* No such file or directory */ -#define ESRCH 3 /* No such process */ -#define EINTR 4 /* Interrupted system call */ -#define EIO 5 /* I/O error */ -#define ENXIO 6 /* No such device or address */ -#define E2BIG 7 /* Arg list too long */ -#define ENOEXEC 8 /* Exec format error */ -#define EBADF 9 /* Bad file number */ -#define ECHILD 10 /* No child processes */ -#define EDEADLK 11 /* Resource deadlock would occur */ -#define ENOMEM 12 /* Out of memory */ -#define EACCES 13 /* Permission denied */ -#define EFAULT 14 /* Bad address */ -#define ENOTBLK 15 /* Block device required */ -#define EBUSY 16 /* Device or resource busy */ -#define EEXIST 17 /* File exists */ -#define EXDEV 18 /* Cross-device link */ -#define ENODEV 19 /* No such device */ -#define ENOTDIR 20 /* Not a directory */ -#define EISDIR 21 /* Is a directory */ -#define EINVAL 22 /* Invalid argument */ -#define ENFILE 23 /* File table overflow */ -#define EMFILE 24 /* Too many open files */ -#define ENOTTY 25 /* Not a typewriter */ -#define ETXTBSY 26 /* Text file busy */ -#define EFBIG 27 /* File too large */ -#define ENOSPC 28 /* No space left on device */ -#define ESPIPE 29 /* Illegal seek */ -#define EROFS 30 /* Read-only file system */ -#define EMLINK 31 /* Too many links */ -#define EPIPE 32 /* Broken pipe */ -#define EDOM 33 /* Math argument out of domain of func */ -#define ERANGE 34 /* Math result not representable */ -#define EAGAIN 35 /* Try again */ -#define EWOULDBLOCK EAGAIN /* Operation would block */ -#define EINPROGRESS 36 /* Operation now in progress */ -#define EALREADY 37 /* Operation already in progress */ -#define ENOTSOCK 38 /* Socket operation on non-socket */ -#define EDESTADDRREQ 39 /* Destination address required */ -#define EMSGSIZE 40 /* Message too long */ -#define EPROTOTYPE 41 /* Protocol wrong type for socket */ -#define ENOPROTOOPT 42 /* Protocol not available */ -#define EPROTONOSUPPORT 43 /* Protocol not supported */ -#define ESOCKTNOSUPPORT 44 /* Socket type not supported */ -#define EOPNOTSUPP 45 /* Operation not supported on transport endpoint */ -#define ENOTSUP EOPNOTSUPP/* Operation not supported on transport endpoint */ -#define EPFNOSUPPORT 46 /* Protocol family not supported */ -#define EAFNOSUPPORT 47 /* Address family not supported by protocol */ -#define EADDRINUSE 48 /* Address already in use */ -#define EADDRNOTAVAIL 49 /* Cannot assign requested address */ -#define ENETDOWN 50 /* Network is down */ -#define ENETUNREACH 51 /* Network is unreachable */ -#define ENETRESET 52 /* Network dropped connection because of reset */ -#define ECONNABORTED 53 /* Software caused connection abort */ -#define ECONNRESET 54 /* Connection reset by peer */ -#define ENOBUFS 55 /* No buffer space available */ -#define EISCONN 56 /* Transport endpoint is already connected */ -#define ENOTCONN 57 /* Transport endpoint is not connected */ -#define ESHUTDOWN 58 /* Cannot send after transport endpoint shutdown */ -#define ETOOMANYREFS 59 /* Too many references: cannot splice */ -#define ETIMEDOUT 60 /* Connection timed out */ -#define ECONNREFUSED 61 /* Connection refused */ -#define ELOOP 62 /* Too many symbolic links encountered */ -#define ENAMETOOLONG 63 /* File name too long */ -#define EHOSTDOWN 64 /* Host is down */ -#define EHOSTUNREACH 65 /* No route to host */ -#define ENOTEMPTY 66 /* Directory not empty */ -#define EUSERS 68 /* Too many users */ -#define EDQUOT 69 /* Quota exceeded */ -#define ESTALE 70 /* Stale NFS file handle */ -#define EREMOTE 71 /* Object is remote */ -#define ENOLCK 77 /* No record locks available */ -#define ENOSYS 78 /* Function not implemented */ -#define ENOMSG 80 /* No message of desired type */ -#define EIDRM 81 /* Identifier removed */ -#define ENOSR 82 /* Out of streams resources */ -#define ETIME 83 /* Timer expired */ -#define EBADMSG 84 /* Not a data message */ -#define EPROTO 85 /* Protocol error */ -#define ENODATA 86 /* No data available */ -#define ENOSTR 87 /* Device not a stream */ -#define ENOPKG 92 /* Package not installed */ -#define EILSEQ 116 /* Illegal byte sequence */ -/* The following are just random noise.. */ -#define ECHRNG 88 /* Channel number out of range */ -#define EL2NSYNC 89 /* Level 2 not synchronized */ -#define EL3HLT 90 /* Level 3 halted */ -#define EL3RST 91 /* Level 3 reset */ -#define ELNRNG 93 /* Link number out of range */ -#define EUNATCH 94 /* Protocol driver not attached */ -#define ENOCSI 95 /* No CSI structure available */ -#define EL2HLT 96 /* Level 2 halted */ -#define EBADE 97 /* Invalid exchange */ -#define EBADR 98 /* Invalid request descriptor */ -#define EXFULL 99 /* Exchange full */ -#define ENOANO 100 /* No anode */ -#define EBADRQC 101 /* Invalid request code */ -#define EBADSLT 102 /* Invalid slot */ -#define EDEADLOCK EDEADLK -#define EBFONT 104 /* Bad font file format */ -#define ENONET 105 /* Machine is not on the network */ -#define ENOLINK 106 /* Link has been severed */ -#define EADV 107 /* Advertise error */ -#define ESRMNT 108 /* Srmount error */ -#define ECOMM 109 /* Communication error on send */ -#define EMULTIHOP 110 /* Multihop attempted */ -#define EDOTDOT 111 /* RFS specific error */ -#define EOVERFLOW 112 /* Value too large for defined data type */ -#define ENOTUNIQ 113 /* Name not unique on network */ -#define EBADFD 114 /* File descriptor in bad state */ -#define EREMCHG 115 /* Remote address changed */ -#define EUCLEAN 117 /* Structure needs cleaning */ -#define ENOTNAM 118 /* Not a XENIX named type file */ -#define ENAVAIL 119 /* No XENIX semaphores available */ -#define EISNAM 120 /* Is a named type file */ -#define EREMOTEIO 121 /* Remote I/O error */ -#define ELIBACC 122 /* Can not access a needed shared library */ -#define ELIBBAD 123 /* Accessing a corrupted shared library */ -#define ELIBSCN 124 /* .lib section in a.out corrupted */ -#define ELIBMAX 125 /* Attempting to link in too many shared libraries */ -#define ELIBEXEC 126 /* Cannot exec a shared library directly */ -#define ERESTART 127 /* Interrupted system call should be restarted */ -#define ESTRPIPE 128 /* Streams pipe error */ -#define ENOMEDIUM 129 /* No medium found */ -#define EMEDIUMTYPE 130 /* Wrong medium type */ - -#elif defined(__mips__) - -#define EPERM 1 /* Operation not permitted */ -#define ENOENT 2 /* No such file or directory */ -#define ESRCH 3 /* No such process */ -#define EINTR 4 /* Interrupted system call */ -#define EIO 5 /* I/O error */ -#define ENXIO 6 /* No such device or address */ -#define E2BIG 7 /* Arg list too long */ -#define ENOEXEC 8 /* Exec format error */ -#define EBADF 9 /* Bad file number */ -#define ECHILD 10 /* No child processes */ -#define EAGAIN 11 /* Try again */ -#define ENOMEM 12 /* Out of memory */ -#define EACCES 13 /* Permission denied */ -#define EFAULT 14 /* Bad address */ -#define ENOTBLK 15 /* Block device required */ -#define EBUSY 16 /* Device or resource busy */ -#define EEXIST 17 /* File exists */ -#define EXDEV 18 /* Cross-device link */ -#define ENODEV 19 /* No such device */ -#define ENOTDIR 20 /* Not a directory */ -#define EISDIR 21 /* Is a directory */ -#define EINVAL 22 /* Invalid argument */ -#define ENFILE 23 /* File table overflow */ -#define EMFILE 24 /* Too many open files */ -#define ENOTTY 25 /* Not a typewriter */ -#define ETXTBSY 26 /* Text file busy */ -#define EFBIG 27 /* File too large */ -#define ENOSPC 28 /* No space left on device */ -#define ESPIPE 29 /* Illegal seek */ -#define EROFS 30 /* Read-only file system */ -#define EMLINK 31 /* Too many links */ -#define EPIPE 32 /* Broken pipe */ -#define EDOM 33 /* Math argument out of domain of func */ -#define ERANGE 34 /* Math result not representable */ -#define ENOMSG 35 /* No message of desired type */ -#define EIDRM 36 /* Identifier removed */ -#define ECHRNG 37 /* Channel number out of range */ -#define EL2NSYNC 38 /* Level 2 not synchronized */ -#define EL3HLT 39 /* Level 3 halted */ -#define EL3RST 40 /* Level 3 reset */ -#define ELNRNG 41 /* Link number out of range */ -#define EUNATCH 42 /* Protocol driver not attached */ -#define ENOCSI 43 /* No CSI structure available */ -#define EL2HLT 44 /* Level 2 halted */ -#define EDEADLK 45 /* Resource deadlock would occur */ -#define ENOLCK 46 /* No record locks available */ -#define EBADE 50 /* Invalid exchange */ -#define EBADR 51 /* Invalid request descriptor */ -#define EXFULL 52 /* Exchange full */ -#define ENOANO 53 /* No anode */ -#define EBADRQC 54 /* Invalid request code */ -#define EBADSLT 55 /* Invalid slot */ -#define EDEADLOCK 56 /* File locking deadlock error */ -#define EBFONT 59 /* Bad font file format */ -#define ENOSTR 60 /* Device not a stream */ -#define ENODATA 61 /* No data available */ -#define ETIME 62 /* Timer expired */ -#define ENOSR 63 /* Out of streams resources */ -#define ENONET 64 /* Machine is not on the network */ -#define ENOPKG 65 /* Package not installed */ -#define EREMOTE 66 /* Object is remote */ -#define ENOLINK 67 /* Link has been severed */ -#define EADV 68 /* Advertise error */ -#define ESRMNT 69 /* Srmount error */ -#define ECOMM 70 /* Communication error on send */ -#define EPROTO 71 /* Protocol error */ -#define EDOTDOT 73 /* RFS specific error */ -#define EMULTIHOP 74 /* Multihop attempted */ -#define EBADMSG 77 /* Not a data message */ -#define ENAMETOOLONG 78 /* File name too long */ -#define EOVERFLOW 79 /* Value too large for defined data type */ -#define ENOTUNIQ 80 /* Name not unique on network */ -#define EBADFD 81 /* File descriptor in bad state */ -#define EREMCHG 82 /* Remote address changed */ -#define ELIBACC 83 /* Can not access a needed shared library */ -#define ELIBBAD 84 /* Accessing a corrupted shared library */ -#define ELIBSCN 85 /* .lib section in a.out corrupted */ -#define ELIBMAX 86 /* Attempting to link in too many shared libraries */ -#define ELIBEXEC 87 /* Cannot exec a shared library directly */ -#define EILSEQ 88 /* Illegal byte sequence */ -#define ENOSYS 89 /* Function not implemented */ -#define ELOOP 90 /* Too many symbolic links encountered */ -#define ERESTART 91 /* Interrupted system call should be restarted */ -#define ESTRPIPE 92 /* Streams pipe error */ -#define ENOTEMPTY 93 /* Directory not empty */ -#define EUSERS 94 /* Too many users */ -#define ENOTSOCK 95 /* Socket operation on non-socket */ -#define EDESTADDRREQ 96 /* Destination address required */ -#define EMSGSIZE 97 /* Message too long */ -#define EPROTOTYPE 98 /* Protocol wrong type for socket */ -#define ENOPROTOOPT 99 /* Protocol not available */ -#define EPROTONOSUPPORT 120 /* Protocol not supported */ -#define ESOCKTNOSUPPORT 121 /* Socket type not supported */ -#define EOPNOTSUPP 122 /* Operation not supported on transport endpoint */ -#define ENOTSUP EOPNOTSUPP/* Operation not supported on transport endpoint */ -#define EPFNOSUPPORT 123 /* Protocol family not supported */ -#define EAFNOSUPPORT 124 /* Address family not supported by protocol */ -#define EADDRINUSE 125 /* Address already in use */ -#define EADDRNOTAVAIL 126 /* Cannot assign requested address */ -#define ENETDOWN 127 /* Network is down */ -#define ENETUNREACH 128 /* Network is unreachable */ -#define ENETRESET 129 /* Network dropped connection because of reset */ -#define ECONNABORTED 130 /* Software caused connection abort */ -#define ECONNRESET 131 /* Connection reset by peer */ -#define ENOBUFS 132 /* No buffer space available */ -#define EISCONN 133 /* Transport endpoint is already connected */ -#define ENOTCONN 134 /* Transport endpoint is not connected */ -#define EUCLEAN 135 /* Structure needs cleaning */ -#define ENOTNAM 137 /* Not a XENIX named type file */ -#define ENAVAIL 138 /* No XENIX semaphores available */ -#define EISNAM 139 /* Is a named type file */ -#define EREMOTEIO 140 /* Remote I/O error */ -#define EINIT 141 /* Reserved */ -#define EREMDEV 142 /* Error 142 */ -#define ESHUTDOWN 143 /* Cannot send after transport endpoint shutdown */ -#define ETOOMANYREFS 144 /* Too many references: cannot splice */ -#define ETIMEDOUT 145 /* Connection timed out */ -#define ECONNREFUSED 146 /* Connection refused */ -#define EHOSTDOWN 147 /* Host is down */ -#define EHOSTUNREACH 148 /* No route to host */ -#define EWOULDBLOCK EAGAIN /* Operation would block */ -#define EALREADY 149 /* Operation already in progress */ -#define EINPROGRESS 150 /* Operation now in progress */ -#define ESTALE 151 /* Stale NFS file handle */ -#define ECANCELED 158 /* AIO operation canceled */ -#define ENOMEDIUM 159 /* No medium found */ -#define EMEDIUMTYPE 160 /* Wrong medium type */ -#define EDQUOT 1133 /* Quota exceeded */ - -#elif defined(__sparc__) - -#define EPERM 1 /* Operation not permitted */ -#define ENOENT 2 /* No such file or directory */ -#define ESRCH 3 /* No such process */ -#define EINTR 4 /* Interrupted system call */ -#define EIO 5 /* I/O error */ -#define ENXIO 6 /* No such device or address */ -#define E2BIG 7 /* Arg list too long */ -#define ENOEXEC 8 /* Exec format error */ -#define EBADF 9 /* Bad file number */ -#define ECHILD 10 /* No child processes */ -#define EAGAIN 11 /* Try again */ -#define ENOMEM 12 /* Out of memory */ -#define EACCES 13 /* Permission denied */ -#define EFAULT 14 /* Bad address */ -#define ENOTBLK 15 /* Block device required */ -#define EBUSY 16 /* Device or resource busy */ -#define EEXIST 17 /* File exists */ -#define EXDEV 18 /* Cross-device link */ -#define ENODEV 19 /* No such device */ -#define ENOTDIR 20 /* Not a directory */ -#define EISDIR 21 /* Is a directory */ -#define EINVAL 22 /* Invalid argument */ -#define ENFILE 23 /* File table overflow */ -#define EMFILE 24 /* Too many open files */ -#define ENOTTY 25 /* Not a typewriter */ -#define ETXTBSY 26 /* Text file busy */ -#define EFBIG 27 /* File too large */ -#define ENOSPC 28 /* No space left on device */ -#define ESPIPE 29 /* Illegal seek */ -#define EROFS 30 /* Read-only file system */ -#define EMLINK 31 /* Too many links */ -#define EPIPE 32 /* Broken pipe */ -#define EDOM 33 /* Math argument out of domain of func */ -#define ERANGE 34 /* Math result not representable */ -#define EWOULDBLOCK EAGAIN /* Operation would block */ -#define EINPROGRESS 36 /* Operation now in progress */ -#define EALREADY 37 /* Operation already in progress */ -#define ENOTSOCK 38 /* Socket operation on non-socket */ -#define EDESTADDRREQ 39 /* Destination address required */ -#define EMSGSIZE 40 /* Message too long */ -#define EPROTOTYPE 41 /* Protocol wrong type for socket */ -#define ENOPROTOOPT 42 /* Protocol not available */ -#define EPROTONOSUPPORT 43 /* Protocol not supported */ -#define ESOCKTNOSUPPORT 44 /* Socket type not supported */ -#define EOPNOTSUPP 45 /* Op not supported on transport endpoint */ -#define ENOTSUP EOPNOTSUPP/* Operation not supported on transport endpoint */ -#define EPFNOSUPPORT 46 /* Protocol family not supported */ -#define EAFNOSUPPORT 47 /* Address family not supported by protocol */ -#define EADDRINUSE 48 /* Address already in use */ -#define EADDRNOTAVAIL 49 /* Cannot assign requested address */ -#define ENETDOWN 50 /* Network is down */ -#define ENETUNREACH 51 /* Network is unreachable */ -#define ENETRESET 52 /* Net dropped connection because of reset */ -#define ECONNABORTED 53 /* Software caused connection abort */ -#define ECONNRESET 54 /* Connection reset by peer */ -#define ENOBUFS 55 /* No buffer space available */ -#define EISCONN 56 /* Transport endpoint is already connected */ -#define ENOTCONN 57 /* Transport endpoint is not connected */ -#define ESHUTDOWN 58 /* No send after transport endpoint shutdown */ -#define ETOOMANYREFS 59 /* Too many references: cannot splice */ -#define ETIMEDOUT 60 /* Connection timed out */ -#define ECONNREFUSED 61 /* Connection refused */ -#define ELOOP 62 /* Too many symbolic links encountered */ -#define ENAMETOOLONG 63 /* File name too long */ -#define EHOSTDOWN 64 /* Host is down */ -#define EHOSTUNREACH 65 /* No route to host */ -#define ENOTEMPTY 66 /* Directory not empty */ -#define EPROCLIM 67 /* SUNOS: Too many processes */ -#define EUSERS 68 /* Too many users */ -#define EDQUOT 69 /* Quota exceeded */ -#define ESTALE 70 /* Stale NFS file handle */ -#define EREMOTE 71 /* Object is remote */ -#define ENOSTR 72 /* Device not a stream */ -#define ETIME 73 /* Timer expired */ -#define ENOSR 74 /* Out of streams resources */ -#define ENOMSG 75 /* No message of desired type */ -#define EBADMSG 76 /* Not a data message */ -#define EIDRM 77 /* Identifier removed */ -#define EDEADLK 78 /* Resource deadlock would occur */ -#define ENOLCK 79 /* No record locks available */ -#define ENONET 80 /* Machine is not on the network */ -#define ERREMOTE 81 /* SunOS: Too many lvls of remote in path */ -#define ENOLINK 82 /* Link has been severed */ -#define EADV 83 /* Advertise error */ -#define ESRMNT 84 /* Srmount error */ -#define ECOMM 85 /* Communication error on send */ -#define EPROTO 86 /* Protocol error */ -#define EMULTIHOP 87 /* Multihop attempted */ -#define EDOTDOT 88 /* RFS specific error */ -#define EREMCHG 89 /* Remote address changed */ -#define ENOSYS 90 /* Function not implemented */ -#define ESTRPIPE 91 /* Streams pipe error */ -#define EOVERFLOW 92 /* Value too large for defined data type */ -#define EBADFD 93 /* File descriptor in bad state */ -#define ECHRNG 94 /* Channel number out of range */ -#define EL2NSYNC 95 /* Level 2 not synchronized */ -#define EL3HLT 96 /* Level 3 halted */ -#define EL3RST 97 /* Level 3 reset */ -#define ELNRNG 98 /* Link number out of range */ -#define EUNATCH 99 /* Protocol driver not attached */ -#define ENOCSI 100 /* No CSI structure available */ -#define EL2HLT 101 /* Level 2 halted */ -#define EBADE 102 /* Invalid exchange */ -#define EBADR 103 /* Invalid request descriptor */ -#define EXFULL 104 /* Exchange full */ -#define ENOANO 105 /* No anode */ -#define EBADRQC 106 /* Invalid request code */ -#define EBADSLT 107 /* Invalid slot */ -#define EDEADLOCK 108 /* File locking deadlock error */ -#define EBFONT 109 /* Bad font file format */ -#define ELIBEXEC 110 /* Cannot exec a shared library directly */ -#define ENODATA 111 /* No data available */ -#define ELIBBAD 112 /* Accessing a corrupted shared library */ -#define ENOPKG 113 /* Package not installed */ -#define ELIBACC 114 /* Can not access a needed shared library */ -#define ENOTUNIQ 115 /* Name not unique on network */ -#define ERESTART 116 /* Interrupted syscall should be restarted */ -#define EUCLEAN 117 /* Structure needs cleaning */ -#define ENOTNAM 118 /* Not a XENIX named type file */ -#define ENAVAIL 119 /* No XENIX semaphores available */ -#define EISNAM 120 /* Is a named type file */ -#define EREMOTEIO 121 /* Remote I/O error */ -#define EILSEQ 122 /* Illegal byte sequence */ -#define ELIBMAX 123 /* Atmpt to link in too many shared libs */ -#define ELIBSCN 124 /* .lib section in a.out corrupted */ -#define ENOMEDIUM 125 /* No medium found */ -#define EMEDIUMTYPE 126 /* Wrong medium type */ - -#else - -/* i386, arm, ppc, x86_64, ia64 */ - -#define EPERM 1 /* Operation not permitted */ -#define ENOENT 2 /* No such file or directory */ -#define ESRCH 3 /* No such process */ -#define EINTR 4 /* Interrupted system call */ -#define EIO 5 /* I/O error */ -#define ENXIO 6 /* No such device or address */ -#define E2BIG 7 /* Arg list too long */ -#define ENOEXEC 8 /* Exec format error */ -#define EBADF 9 /* Bad file number */ -#define ECHILD 10 /* No child processes */ -#define EAGAIN 11 /* Try again */ -#define ENOMEM 12 /* Out of memory */ -#define EACCES 13 /* Permission denied */ -#define EFAULT 14 /* Bad address */ -#define ENOTBLK 15 /* Block device required */ -#define EBUSY 16 /* Device or resource busy */ -#define EEXIST 17 /* File exists */ -#define EXDEV 18 /* Cross-device link */ -#define ENODEV 19 /* No such device */ -#define ENOTDIR 20 /* Not a directory */ -#define EISDIR 21 /* Is a directory */ -#define EINVAL 22 /* Invalid argument */ -#define ENFILE 23 /* File table overflow */ -#define EMFILE 24 /* Too many open files */ -#define ENOTTY 25 /* Not a typewriter */ -#define ETXTBSY 26 /* Text file busy */ -#define EFBIG 27 /* File too large */ -#define ENOSPC 28 /* No space left on device */ -#define ESPIPE 29 /* Illegal seek */ -#define EROFS 30 /* Read-only file system */ -#define EMLINK 31 /* Too many links */ -#define EPIPE 32 /* Broken pipe */ -#define EDOM 33 /* Math argument out of domain of func */ -#define ERANGE 34 /* Math result not representable */ -#define EDEADLK 35 /* Resource deadlock would occur */ -#define ENAMETOOLONG 36 /* File name too long */ -#define ENOLCK 37 /* No record locks available */ -#define ENOSYS 38 /* Function not implemented */ -#define ENOTEMPTY 39 /* Directory not empty */ -#define ELOOP 40 /* Too many symbolic links encountered */ -#define EWOULDBLOCK EAGAIN /* Operation would block */ -#define ENOMSG 42 /* No message of desired type */ -#define EIDRM 43 /* Identifier removed */ -#define ECHRNG 44 /* Channel number out of range */ -#define EL2NSYNC 45 /* Level 2 not synchronized */ -#define EL3HLT 46 /* Level 3 halted */ -#define EL3RST 47 /* Level 3 reset */ -#define ELNRNG 48 /* Link number out of range */ -#define EUNATCH 49 /* Protocol driver not attached */ -#define ENOCSI 50 /* No CSI structure available */ -#define EL2HLT 51 /* Level 2 halted */ -#define EBADE 52 /* Invalid exchange */ -#define EBADR 53 /* Invalid request descriptor */ -#define EXFULL 54 /* Exchange full */ -#define ENOANO 55 /* No anode */ -#define EBADRQC 56 /* Invalid request code */ -#define EBADSLT 57 /* Invalid slot */ -#define EDEADLOCK EDEADLK -#define EBFONT 59 /* Bad font file format */ -#define ENOSTR 60 /* Device not a stream */ -#define ENODATA 61 /* No data available */ -#define ETIME 62 /* Timer expired */ -#define ENOSR 63 /* Out of streams resources */ -#define ENONET 64 /* Machine is not on the network */ -#define ENOPKG 65 /* Package not installed */ -#define EREMOTE 66 /* Object is remote */ -#define ENOLINK 67 /* Link has been severed */ -#define EADV 68 /* Advertise error */ -#define ESRMNT 69 /* Srmount error */ -#define ECOMM 70 /* Communication error on send */ -#define EPROTO 71 /* Protocol error */ -#define EMULTIHOP 72 /* Multihop attempted */ -#define EDOTDOT 73 /* RFS specific error */ -#define EBADMSG 74 /* Not a data message */ -#define EOVERFLOW 75 /* Value too large for defined data type */ -#define ENOTUNIQ 76 /* Name not unique on network */ -#define EBADFD 77 /* File descriptor in bad state */ -#define EREMCHG 78 /* Remote address changed */ -#define ELIBACC 79 /* Can not access a needed shared library */ -#define ELIBBAD 80 /* Accessing a corrupted shared library */ -#define ELIBSCN 81 /* .lib section in a.out corrupted */ -#define ELIBMAX 82 /* Attempting to link in too many shared libraries */ -#define ELIBEXEC 83 /* Cannot exec a shared library directly */ -#define EILSEQ 84 /* Illegal byte sequence */ -#define ERESTART 85 /* Interrupted system call should be restarted */ -#define ESTRPIPE 86 /* Streams pipe error */ -#define EUSERS 87 /* Too many users */ -#define ENOTSOCK 88 /* Socket operation on non-socket */ -#define EDESTADDRREQ 89 /* Destination address required */ -#define EMSGSIZE 90 /* Message too long */ -#define EPROTOTYPE 91 /* Protocol wrong type for socket */ -#define ENOPROTOOPT 92 /* Protocol not available */ -#define EPROTONOSUPPORT 93 /* Protocol not supported */ -#define ESOCKTNOSUPPORT 94 /* Socket type not supported */ -#define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */ -#define ENOTSUP EOPNOTSUPP/* Operation not supported on transport endpoint */ -#define EPFNOSUPPORT 96 /* Protocol family not supported */ -#define EAFNOSUPPORT 97 /* Address family not supported by protocol */ -#define EADDRINUSE 98 /* Address already in use */ -#define EADDRNOTAVAIL 99 /* Cannot assign requested address */ -#define ENETDOWN 100 /* Network is down */ -#define ENETUNREACH 101 /* Network is unreachable */ -#define ENETRESET 102 /* Network dropped connection because of reset */ -#define ECONNABORTED 103 /* Software caused connection abort */ -#define ECONNRESET 104 /* Connection reset by peer */ -#define ENOBUFS 105 /* No buffer space available */ -#define EISCONN 106 /* Transport endpoint is already connected */ -#define ENOTCONN 107 /* Transport endpoint is not connected */ -#define ESHUTDOWN 108 /* Cannot send after transport endpoint shutdown */ -#define ETOOMANYREFS 109 /* Too many references: cannot splice */ -#define ETIMEDOUT 110 /* Connection timed out */ -#define ECONNREFUSED 111 /* Connection refused */ -#define EHOSTDOWN 112 /* Host is down */ -#define EHOSTUNREACH 113 /* No route to host */ -#define EALREADY 114 /* Operation already in progress */ -#define EINPROGRESS 115 /* Operation now in progress */ -#define ESTALE 116 /* Stale NFS file handle */ -#define EUCLEAN 117 /* Structure needs cleaning */ -#define ENOTNAM 118 /* Not a XENIX named type file */ -#define ENAVAIL 119 /* No XENIX semaphores available */ -#define EISNAM 120 /* Is a named type file */ -#define EREMOTEIO 121 /* Remote I/O error */ -#define EDQUOT 122 /* Quota exceeded */ -#define ENOMEDIUM 123 /* No medium found */ -#define EMEDIUMTYPE 124 /* Wrong medium type */ -#endif - -#define __SYS_NERR ((EMEDIUMTYPE) + 1) - -#ifndef __ASSEMBLER__ - -#ifndef _REENTRANT -extern int errno; -#else -#define errno (*__errno_location()) -#endif - -extern int *__errno_location(void); - -#define __set_errno(x) errno=(x) - -#ifdef _BSD_SOURCE -extern const char *const sys_errlist[]; -extern int sys_nerr; -#endif - -#endif - -#endif diff --git a/mdk-stage1/dietlibc/include/fcntl.h b/mdk-stage1/dietlibc/include/fcntl.h deleted file mode 100644 index 33f58d82a..000000000 --- a/mdk-stage1/dietlibc/include/fcntl.h +++ /dev/null @@ -1,564 +0,0 @@ -#ifndef _FCNTL_H -#define _FCNTL_H - -#include - -#include -#include - -#define F_LINUX_SPECIFIC_BASE 1024 - -#if defined(__i386__) || defined(__s390__) || defined(__x86_64__) || defined(__ia64__) - -/* open/fcntl - O_SYNC is only implemented on blocks devices and on files - located on an ext2 file system */ -#define O_ACCMODE 0003 -#define O_RDONLY 00 -#define O_WRONLY 01 -#define O_RDWR 02 -#define O_CREAT 0100 /* not fcntl */ -#define O_EXCL 0200 /* not fcntl */ -#define O_NOCTTY 0400 /* not fcntl */ -#define O_TRUNC 01000 /* not fcntl */ -#define O_APPEND 02000 -#define O_NONBLOCK 04000 -#define O_NDELAY O_NONBLOCK -#define O_SYNC 010000 -#define FASYNC 020000 /* fcntl, for BSD compatibility */ -#define O_DIRECT 040000 /* direct disk access hint - currently ignored */ -#define O_LARGEFILE 0100000 -#define O_DIRECTORY 0200000 /* must be a directory */ -#define O_NOFOLLOW 0400000 /* don't follow links */ - -#define F_DUPFD 0 /* dup */ -#define F_GETFD 1 /* get close_on_exec */ -#define F_SETFD 2 /* set/clear close_on_exec */ -#define F_GETFL 3 /* get file->f_flags */ -#define F_SETFL 4 /* set file->f_flags */ -#define F_GETLK 5 -#define F_SETLK 6 -#define F_SETLKW 7 -#define F_SETOWN 8 /* for sockets. */ -#define F_GETOWN 9 /* for sockets. */ -#define F_SETSIG 10 /* for sockets. */ -#define F_GETSIG 11 /* for sockets. */ - -#define F_GETLK64 12 /* using 'struct flock64' */ -#define F_SETLK64 13 -#define F_SETLKW64 14 - -#define FD_CLOEXEC 1 /* actually anything with low bit set goes */ - -/* for posix fcntl() and lockf() */ -#define F_RDLCK 0 -#define F_WRLCK 1 -#define F_UNLCK 2 - -/* for old implementation of bsd flock () */ -#define F_EXLCK 4 /* or 3 */ -#define F_SHLCK 8 /* or 4 */ - -/* for leases */ -#define F_INPROGRESS 16 - -/* operations for bsd flock(), also used by the kernel implementation */ -#define LOCK_SH 1 /* shared lock */ -#define LOCK_EX 2 /* exclusive lock */ -#define LOCK_NB 4 /* or'd with one of the above to prevent - blocking */ -#define LOCK_UN 8 /* remove lock */ - -#define LOCK_MAND 32 /* This is a mandatory flock */ -#define LOCK_READ 64 /* ... Which allows concurrent read operations */ -#define LOCK_WRITE 128 /* ... Which allows concurrent write operations */ -#define LOCK_RW 192 /* ... Which allows concurrent read & write ops */ - -struct flock { - short l_type; - short l_whence; - off_t l_start; - off_t l_len; - pid_t l_pid; -}; - -struct flock64 { - short l_type; - short l_whence; - loff_t l_start; - loff_t l_len; - pid_t l_pid; -}; - -#elif defined(__alpha__) - -/* open/fcntl - O_SYNC is only implemented on blocks devices and on files - located on an ext2 file system */ -#define O_ACCMODE 0003 -#define O_RDONLY 00 -#define O_WRONLY 01 -#define O_RDWR 02 -#define O_CREAT 01000 /* not fcntl */ -#define O_TRUNC 02000 /* not fcntl */ -#define O_EXCL 04000 /* not fcntl */ -#define O_NOCTTY 010000 /* not fcntl */ - -#define O_NONBLOCK 00004 -#define O_APPEND 00010 -#define O_NDELAY O_NONBLOCK -#define O_SYNC 040000 -#define FASYNC 020000 /* fcntl, for BSD compatibility */ -#define O_DIRECT 040000 /* direct disk access - should check with OSF/1 */ -#define O_DIRECTORY 0100000 /* must be a directory */ -#define O_NOFOLLOW 0200000 /* don't follow links */ -#define O_LARGEFILE 0400000 /* will be set by the kernel on every open */ - -#define F_DUPFD 0 /* dup */ -#define F_GETFD 1 /* get close_on_exec */ -#define F_SETFD 2 /* set/clear close_on_exec */ -#define F_GETFL 3 /* get file->f_flags */ -#define F_SETFL 4 /* set file->f_flags */ -#define F_GETLK 7 -#define F_SETLK 8 -#define F_SETLKW 9 - -#define F_SETOWN 5 /* for sockets. */ -#define F_GETOWN 6 /* for sockets. */ -#define F_SETSIG 10 /* for sockets. */ -#define F_GETSIG 11 /* for sockets. */ - -/* for F_[GET|SET]FL */ -#define FD_CLOEXEC 1 /* actually anything with low bit set goes */ - -/* for posix fcntl() and lockf() */ -#define F_RDLCK 1 -#define F_WRLCK 2 -#define F_UNLCK 8 - -/* for old implementation of bsd flock () */ -#define F_EXLCK 16 /* or 3 */ -#define F_SHLCK 32 /* or 4 */ - -#define F_INPROGRESS 64 - -/* operations for bsd flock(), also used by the kernel implementation */ -#define LOCK_SH 1 /* shared lock */ -#define LOCK_EX 2 /* exclusive lock */ -#define LOCK_NB 4 /* or'd with one of the above to prevent - blocking */ -#define LOCK_UN 8 /* remove lock */ -#define LOCK_MAND 32 /* This is a mandatory flock */ -#define LOCK_READ 64 /* ... Which allows concurrent read operations */ -#define LOCK_WRITE 128 /* ... Which allows concurrent write operations */ -#define LOCK_RW 192 /* ... Which allows concurrent read & write ops */ - -struct flock { - short l_type; - short l_whence; - off_t l_start; - off_t l_len; - pid_t l_pid; -}; - -#elif defined(__mips__) - -/* open/fcntl - O_SYNC is only implemented on blocks devices and on files - located on an ext2 file system */ -#define O_ACCMODE 0x0003 -#define O_RDONLY 0x0000 -#define O_WRONLY 0x0001 -#define O_RDWR 0x0002 -#define O_APPEND 0x0008 -#define O_SYNC 0x0010 -#define O_NONBLOCK 0x0080 -#define O_CREAT 0x0100 /* not fcntl */ -#define O_TRUNC 0x0200 /* not fcntl */ -#define O_EXCL 0x0400 /* not fcntl */ -#define O_NOCTTY 0x0800 /* not fcntl */ -#define FASYNC 0x1000 /* fcntl, for BSD compatibility */ -#define O_LARGEFILE 0x2000 /* allow large file opens - currently ignored */ -#define O_DIRECT 0x8000 /* direct disk access hint - currently ignored */ -#define O_DIRECTORY 0x10000 /* must be a directory */ -#define O_NOFOLLOW 0x20000 /* don't follow links */ - -#define O_NDELAY O_NONBLOCK - -#define F_DUPFD 0 /* dup */ -#define F_GETFD 1 /* get close_on_exec */ -#define F_SETFD 2 /* set/clear close_on_exec */ -#define F_GETFL 3 /* get file->f_flags */ -#define F_SETFL 4 /* set file->f_flags */ -#define F_GETLK 14 -#define F_SETLK 6 -#define F_SETLKW 7 - -#define F_SETOWN 24 /* for sockets. */ -#define F_GETOWN 23 /* for sockets. */ -#define F_SETSIG 10 /* for sockets. */ -#define F_GETSIG 11 /* for sockets. */ - -/* for F_[GET|SET]FL */ -#define FD_CLOEXEC 1 /* actually anything with low bit set goes */ - -/* for posix fcntl() and lockf() */ -#define F_RDLCK 0 -#define F_WRLCK 1 -#define F_UNLCK 2 - -/* for old implementation of bsd flock () */ -#define F_EXLCK 4 /* or 3 */ -#define F_SHLCK 8 /* or 4 */ - -/* for leases */ -#define F_INPROGRESS 16 - -/* operations for bsd flock(), also used by the kernel implementation */ -#define LOCK_SH 1 /* shared lock */ -#define LOCK_EX 2 /* exclusive lock */ -#define LOCK_NB 4 /* or'd with one of the above to prevent XXXXXXXXXXXXXXXXXX - blocking */ -#define LOCK_UN 8 /* remove lock */ - -#define LOCK_MAND 32 /* This is a mandatory flock */ -#define LOCK_READ 64 /* ... Which allows concurrent read operations */ -#define LOCK_WRITE 128 /* ... Which allows concurrent write operations */ -#define LOCK_RW 192 /* ... Which allows concurrent read & write ops */ - -typedef struct flock { - short l_type; - short l_whence; - off_t l_start; - off_t l_len; - long l_sysid; /* XXXXXXXXXXXXXXXXXXXXXXXXX */ - pid_t l_pid; - long pad[4]; /* ZZZZZZZZZZZZZZZZZZZZZZZZZZ */ -} flock_t; - -#elif defined(__sparc__) - -/* open/fcntl - O_SYNC is only implemented on blocks devices and on files - located on an ext2 file system */ -#define O_RDONLY 0x0000 -#define O_WRONLY 0x0001 -#define O_RDWR 0x0002 -#define O_ACCMODE 0x0003 -#define O_APPEND 0x0008 -#define FASYNC 0x0040 /* fcntl, for BSD compatibility */ -#define O_CREAT 0x0200 /* not fcntl */ -#define O_TRUNC 0x0400 /* not fcntl */ -#define O_EXCL 0x0800 /* not fcntl */ -#define O_SYNC 0x2000 -#define O_NONBLOCK 0x4000 -#define O_NDELAY (0x0004 | O_NONBLOCK) -#define O_NOCTTY 0x8000 /* not fcntl */ -#define O_DIRECTORY 0x10000 /* must be a directory */ -#define O_NOFOLLOW 0x20000 /* don't follow links */ -#define O_LARGEFILE 0x40000 - -#define F_DUPFD 0 /* dup */ -#define F_GETFD 1 /* get close_on_exec */ -#define F_SETFD 2 /* set/clear close_on_exec */ -#define F_GETFL 3 /* get file->f_flags */ -#define F_SETFL 4 /* set file->f_flags */ -#define F_GETOWN 5 /* for sockets. */ -#define F_SETOWN 6 /* for sockets. */ -#define F_GETLK 7 -#define F_SETLK 8 -#define F_SETLKW 9 -#define F_SETSIG 10 /* for sockets. */ -#define F_GETSIG 11 /* for sockets. */ - -#define F_GETLK64 12 /* using 'struct flock64' */ -#define F_SETLK64 13 -#define F_SETLKW64 14 - -/* for F_[GET|SET]FL */ -#define FD_CLOEXEC 1 /* actually anything with low bit set goes */ - -/* for posix fcntl() and lockf() */ -#define F_RDLCK 1 -#define F_WRLCK 2 -#define F_UNLCK 3 - -/* for old implementation of bsd flock () */ -#define F_EXLCK 4 /* or 3 */ -#define F_SHLCK 8 /* or 4 */ - -/* for leases */ -#define F_INPROGRESS 16 - -/* operations for bsd flock(), also used by the kernel implementation */ -#define LOCK_SH 1 /* shared lock */ -#define LOCK_EX 2 /* exclusive lock */ -#define LOCK_NB 4 /* or'd with one of the above to prevent - blocking */ -#define LOCK_UN 8 /* remove lock */ - -#define LOCK_MAND 32 /* This is a mandatory flock */ -#define LOCK_READ 64 /* ... Which allows concurrent read operations */ -#define LOCK_WRITE 128 /* ... Which allows concurrent write operations */ -#define LOCK_RW 192 /* ... Which allows concurrent read & write ops */ - -struct flock { - short l_type; - short l_whence; - off_t l_start; - off_t l_len; - pid_t l_pid; - short __unused; -}; - -#ifdef __arch64__ -#define flock64 flock -#else -struct flock64 { - short l_type; - short l_whence; - loff_t l_start; - loff_t l_len; - pid_t l_pid; - short __unused; -}; -#endif - -#elif defined(__powerpc__) - -/* open/fcntl - O_SYNC is only implemented on blocks devices and on files - located on an ext2 file system */ -#define O_ACCMODE 0003 -#define O_RDONLY 00 -#define O_WRONLY 01 -#define O_RDWR 02 -#define O_CREAT 0100 /* not fcntl */ -#define O_EXCL 0200 /* not fcntl */ -#define O_NOCTTY 0400 /* not fcntl */ -#define O_TRUNC 01000 /* not fcntl */ -#define O_APPEND 02000 -#define O_NONBLOCK 04000 -#define O_NDELAY O_NONBLOCK -#define O_SYNC 010000 -#define FASYNC 020000 /* fcntl, for BSD compatibility */ -#define O_DIRECTORY 040000 /* must be a directory */ -#define O_NOFOLLOW 0100000 /* don't follow links */ -#define O_LARGEFILE 0200000 -#define O_DIRECT 0400000 /* direct disk access hint - currently ignored */ - -#define F_DUPFD 0 /* dup */ -#define F_GETFD 1 /* get close_on_exec */ -#define F_SETFD 2 /* set/clear close_on_exec */ -#define F_GETFL 3 /* get file->f_flags */ -#define F_SETFL 4 /* set file->f_flags */ -#define F_GETLK 5 -#define F_SETLK 6 -#define F_SETLKW 7 - -#define F_SETOWN 8 /* for sockets. */ -#define F_GETOWN 9 /* for sockets. */ -#define F_SETSIG 10 /* for sockets. */ -#define F_GETSIG 11 /* for sockets. */ - -#define F_GETLK64 12 /* using 'struct flock64' */ -#define F_SETLK64 13 -#define F_SETLKW64 14 - -/* for F_[GET|SET]FL */ -#define FD_CLOEXEC 1 /* actually anything with low bit set goes */ - -/* for posix fcntl() and lockf() */ -#define F_RDLCK 0 -#define F_WRLCK 1 -#define F_UNLCK 2 - -/* for old implementation of bsd flock () */ -#define F_EXLCK 4 /* or 3 */ -#define F_SHLCK 8 /* or 4 */ - -/* for leases */ -#define F_INPROGRESS 16 - -/* operations for bsd flock(), also used by the kernel implementation */ -#define LOCK_SH 1 /* shared lock */ -#define LOCK_EX 2 /* exclusive lock */ -#define LOCK_NB 4 /* or'd with one of the above to prevent - blocking */ -#define LOCK_UN 8 /* remove lock */ - -#define LOCK_MAND 32 /* This is a mandatory flock */ -#define LOCK_READ 64 /* ... Which allows concurrent read operations */ -#define LOCK_WRITE 128 /* ... Which allows concurrent write operations */ -#define LOCK_RW 192 /* ... Which allows concurrent read & write ops */ - -struct flock { - short l_type; - short l_whence; - off_t l_start; - off_t l_len; - pid_t l_pid; -}; - -struct flock64 { - short l_type; - short l_whence; - loff_t l_start; - loff_t l_len; - pid_t l_pid; -}; - -#elif defined (__arm__) - -/* open/fcntl - O_SYNC is only implemented on blocks devices and on files - located on an ext2 file system */ -#define O_ACCMODE 0003 -#define O_RDONLY 00 -#define O_WRONLY 01 -#define O_RDWR 02 -#define O_CREAT 0100 /* not fcntl */ -#define O_EXCL 0200 /* not fcntl */ -#define O_NOCTTY 0400 /* not fcntl */ -#define O_TRUNC 01000 /* not fcntl */ -#define O_APPEND 02000 -#define O_NONBLOCK 04000 -#define O_NDELAY O_NONBLOCK -#define O_SYNC 010000 -#define FASYNC 020000 /* fcntl, for BSD compatibility */ -#define O_DIRECTORY 040000 /* must be a directory */ -#define O_NOFOLLOW 0100000 /* don't follow links */ -#define O_DIRECT 0200000 /* direct disk access hint - currently ignored */ -#define O_LARGEFILE 0400000 - -#define F_DUPFD 0 /* dup */ -#define F_GETFD 1 /* get close_on_exec */ -#define F_SETFD 2 /* set/clear close_on_exec */ -#define F_GETFL 3 /* get file->f_flags */ -#define F_SETFL 4 /* set file->f_flags */ -#define F_GETLK 5 -#define F_SETLK 6 -#define F_SETLKW 7 - -#define F_SETOWN 8 /* for sockets. */ -#define F_GETOWN 9 /* for sockets. */ -#define F_SETSIG 10 /* for sockets. */ -#define F_GETSIG 11 /* for sockets. */ - -#define F_GETLK64 12 /* using 'struct flock64' */ -#define F_SETLK64 13 -#define F_SETLKW64 14 - -/* for F_[GET|SET]FL */ -#define FD_CLOEXEC 1 /* actually anything with low bit set goes */ - -/* for posix fcntl() and lockf() */ -#define F_RDLCK 0 -#define F_WRLCK 1 -#define F_UNLCK 2 - -/* for old implementation of bsd flock () */ -#define F_EXLCK 4 /* or 3 */ -#define F_SHLCK 8 /* or 4 */ - -/* for leases */ -#define F_INPROGRESS 16 - -/* operations for bsd flock(), also used by the kernel implementation */ -#define LOCK_SH 1 /* shared lock */ -#define LOCK_EX 2 /* exclusive lock */ -#define LOCK_NB 4 /* or'd with one of the above to prevent - blocking */ -#define LOCK_UN 8 /* remove lock */ - -#define LOCK_MAND 32 /* This is a mandatory flock */ -#define LOCK_READ 64 /* ... Which allows concurrent read operations */ -#define LOCK_WRITE 128 /* ... Which allows concurrent write operations */ -#define LOCK_RW 192 /* ... Which allows concurrent read & write ops */ - -struct flock { - short l_type; - short l_whence; - off_t l_start; - off_t l_len; - pid_t l_pid; -}; - -struct flock64 { - short l_type; - short l_whence; - loff_t l_start; - loff_t l_len; - pid_t l_pid; -}; - -#elif defined(__hppa__) - -/* Copied from bits/fcntl.h */ - -#define O_RDONLY 00000000 -#define O_WRONLY 00000001 -#define O_RDWR 00000002 -#define O_ACCMODE 00000003 -#define O_APPEND 00000010 -#define O_BLKSEEK 00000100 /* HPUX only */ -#define O_CREAT 00000400 /* not fcntl */ -#define O_TRUNC 00001000 /* not fcntl */ -#define O_EXCL 00002000 /* not fcntl */ -#define O_ASYNC 00020000 -#define O_SYNC 00100000 -#define O_NONBLOCK 00200004 /* HPUX has separate NDELAY & NONBLOCK */ -#define O_NDELAY O_NONBLOCK -#define O_NOCTTY 00400000 /* not fcntl */ -#define O_DIRECTORY 00010000 - -#define F_DUPFD 0 /* Duplicate file descriptor. */ -#define F_GETFD 1 /* Get file descriptor flags. */ -#define F_SETFD 2 /* Set file descriptor flags. */ -#define F_GETFL 3 /* Get file status flags. */ -#define F_SETFL 4 /* Set file status flags. */ -#define F_GETLK 5 /* Get record locking info. */ -#define F_SETLK 6 /* Set record locking info (non-blocking). */ -#define F_SETLKW 7 /* Set record locking info (blocking). */ - -#define F_GETLK64 8 /* Get record locking info. */ -#define F_SETLK64 9 /* Set record locking info (non-blocking). */ -#define F_SETLKW64 10 /* Set record locking info (blocking). */ - -#define FD_CLOEXEC 1 /* actually anything with low bit set goes */ - -#define F_RDLCK 1 /* Read lock. */ -#define F_WRLCK 2 /* Write lock. */ -#define F_UNLCK 3 /* Remove lock. */ - -#define F_EXLCK 4 /* or 3 */ -#define F_SHLCK 8 /* or 4 */ - -struct flock -{ - short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ - short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ - off_t l_start; /* Offset where the lock begins. */ - off_t l_len; /* Size of the locked area; zero means until EOF. */ - pid_t l_pid; /* Process holding the lock. */ -}; - -struct flock64 -{ - short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ - short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ - off64_t l_start; /* Offset where the lock begins. */ - off64_t l_len; /* Size of the locked area; zero means until EOF. */ - pid_t l_pid; /* Process holding the lock. */ -}; - -#endif - -extern int fcntl (int __fd, int __cmd, ...) __THROW; -extern int lockf (int __fd, int __cmd, off_t __len) __THROW; -extern int lockf64 (int __fd, int __cmd, off64_t __len) __THROW; - -#define F_ULOCK 0 /* Unlock a previously locked region. */ -#define F_LOCK 1 /* Lock a region for exclusive use. */ -#define F_TLOCK 2 /* Test and lock a region for exclusive use. */ -#define F_TEST 3 /* Test a region for other processes locks. */ - -#if !defined(O_ASYNC) && defined(FASYNC) -#define O_ASYNC FASYNC -#endif - -#endif diff --git a/mdk-stage1/dietlibc/include/features.h b/mdk-stage1/dietlibc/include/features.h deleted file mode 100644 index d2b92d15c..000000000 --- a/mdk-stage1/dietlibc/include/features.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef _FEATURES_H -#define _FEATURES_H - -#ifndef __dietlibc__ -#error "not using the diet wrapper?!" -#endif - -#endif diff --git a/mdk-stage1/dietlibc/include/float.h b/mdk-stage1/dietlibc/include/float.h deleted file mode 100644 index 9c9c85a3a..000000000 --- a/mdk-stage1/dietlibc/include/float.h +++ /dev/null @@ -1,96 +0,0 @@ -#ifndef _FLOAT_H -#define _FLOAT_H - -/* blatantly copied from gcc headers for sparc */ - - /* Radix of exponent representation */ -#undef FLT_RADIX -#define FLT_RADIX 2 - /* Number of base-FLT_RADIX digits in the significand of a float */ -#undef FLT_MANT_DIG -#define FLT_MANT_DIG 24 - /* Number of decimal digits of precision in a float */ -#undef FLT_DIG -#define FLT_DIG 6 - /* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown */ -#undef FLT_ROUNDS -#define FLT_ROUNDS 1 - /* Difference between 1.0 and the minimum float greater than 1.0 */ -#undef FLT_EPSILON -#define FLT_EPSILON 1.19209290e-07F - /* Minimum int x such that FLT_RADIX**(x-1) is a normalised float */ -#undef FLT_MIN_EXP -#define FLT_MIN_EXP (-125) - /* Minimum normalised float */ -#undef FLT_MIN -#define FLT_MIN 1.17549435e-38F - /* Minimum int x such that 10**x is a normalised float */ -#undef FLT_MIN_10_EXP -#define FLT_MIN_10_EXP (-37) - /* Maximum int x such that FLT_RADIX**(x-1) is a representable float */ -#undef FLT_MAX_EXP -#define FLT_MAX_EXP 128 - /* Maximum float */ -#undef FLT_MAX -#define FLT_MAX 3.40282347e+38F - /* Maximum int x such that 10**x is a representable float */ -#undef FLT_MAX_10_EXP -#define FLT_MAX_10_EXP 38 - - /* Number of base-FLT_RADIX digits in the significand of a double */ -#undef DBL_MANT_DIG -#define DBL_MANT_DIG 53 - /* Number of decimal digits of precision in a double */ -#undef DBL_DIG -#define DBL_DIG 15 - /* Difference between 1.0 and the minimum double greater than 1.0 */ -#undef DBL_EPSILON -#define DBL_EPSILON 2.2204460492503131e-16 - /* Minimum int x such that FLT_RADIX**(x-1) is a normalised double */ -#undef DBL_MIN_EXP -#define DBL_MIN_EXP (-1021) - /* Minimum normalised double */ -#undef DBL_MIN -#define DBL_MIN 2.2250738585072014e-308 - /* Minimum int x such that 10**x is a normalised double */ -#undef DBL_MIN_10_EXP -#define DBL_MIN_10_EXP (-307) - /* Maximum int x such that FLT_RADIX**(x-1) is a representable double */ -#undef DBL_MAX_EXP -#define DBL_MAX_EXP 1024 - /* Maximum double */ -#undef DBL_MAX -#define DBL_MAX 1.7976931348623157e+308 - /* Maximum int x such that 10**x is a representable double */ -#undef DBL_MAX_10_EXP -#define DBL_MAX_10_EXP 308 - - /* Number of base-FLT_RADIX digits in the significand of a long double */ -#undef LDBL_MANT_DIG -#define LDBL_MANT_DIG 53 - /* Number of decimal digits of precision in a long double */ -#undef LDBL_DIG -#define LDBL_DIG 15 - /* Difference between 1.0 and the minimum long double greater than 1.0 */ -#undef LDBL_EPSILON -#define LDBL_EPSILON 2.2204460492503131e-16L - /* Minimum int x such that FLT_RADIX**(x-1) is a normalised long double */ -#undef LDBL_MIN_EXP -#define LDBL_MIN_EXP (-1021) - /* Minimum normalised long double */ -#undef LDBL_MIN -#define LDBL_MIN 2.2250738585072014e-308L - /* Minimum int x such that 10**x is a normalised long double */ -#undef LDBL_MIN_10_EXP -#define LDBL_MIN_10_EXP (-307) - /* Maximum int x such that FLT_RADIX**(x-1) is a representable long double */ -#undef LDBL_MAX_EXP -#define LDBL_MAX_EXP 1024 - /* Maximum long double */ -#undef LDBL_MAX -#define LDBL_MAX 1.7976931348623157e+308L - /* Maximum int x such that 10**x is a representable long double */ -#undef LDBL_MAX_10_EXP -#define LDBL_MAX_10_EXP 308 - -#endif diff --git a/mdk-stage1/dietlibc/include/fnmatch.h b/mdk-stage1/dietlibc/include/fnmatch.h deleted file mode 100644 index 146e700bd..000000000 --- a/mdk-stage1/dietlibc/include/fnmatch.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef _FNMATCH_H -#define _FNMATCH_H - -#include - -int fnmatch(const char *pattern, const char *string, int flags) __THROW; - -#define FNM_NOESCAPE 1 -#define FNM_PATHNAME 2 -#define FNM_FILE_NAME 2 -#define FNM_PERIOD 4 -#define FNM_LEADING_DIR 8 -#define FNM_CASEFOLD 16 - -#define FNM_NOMATCH 1 - -#endif diff --git a/mdk-stage1/dietlibc/include/ftw.h b/mdk-stage1/dietlibc/include/ftw.h deleted file mode 100644 index e0450518e..000000000 --- a/mdk-stage1/dietlibc/include/ftw.h +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef _FTW_H -#define _FTW_H - -#include -#include - -struct FTW - { - int base; - int level; - }; - -int ftw (const char *dir, int (*fn)(const char *file, const struct stat *sb, int flag), int depth) __THROW; -int nftw (const char *dir, int (*fn)(const char *file, const struct stat *sb, int flag, struct FTW *s), int depth, int flags) __THROW; - -enum -{ - FTW_F, /* Regular file. */ -#define FTW_F FTW_F - FTW_D, /* Directory. */ -#define FTW_D FTW_D - FTW_DNR, /* Unreadable directory. */ -#define FTW_DNR FTW_DNR - FTW_NS, /* Unstatable file. */ -#define FTW_NS FTW_NS - FTW_SL, /* Symbolic link. */ -# define FTW_SL FTW_SL -/* These flags are only passed from the `nftw' function. */ - FTW_DP, /* Directory, all subdirs have been visited. */ -# define FTW_DP FTW_DP - FTW_SLN /* Symbolic link naming non-existing file. */ -# define FTW_SLN FTW_SLN -}; - -typedef int (*__ftw_func_t) (const char *__filename, - const struct stat *__status, int __flag) __THROW; - -typedef int (*__nftw_func_t) (const char *__filename, - const struct stat *__status, int __flag, - struct FTW *__info) __THROW; - -#ifndef __NO_STAT64 -typedef int (*__ftw64_func_t) (const char *__filename, - const struct stat64 *__status, int __flag) __THROW; - -typedef int (*__nftw64_func_t) (const char *__filename, - const struct stat64 *__status, - int __flag, struct FTW *__info) __THROW; -#endif - -#endif diff --git a/mdk-stage1/dietlibc/include/getopt.h b/mdk-stage1/dietlibc/include/getopt.h deleted file mode 100644 index db1592c52..000000000 --- a/mdk-stage1/dietlibc/include/getopt.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef __GETOPT_H__ -#define __GETOPT_H__ - -#include - -extern int optopt; - -struct option { - const char* name; - int has_arg; - int* flag; - int val; -}; - -#define no_argument 0 -#define required_argument 1 -#define optional_argument 2 - -extern int getopt_long(int argc, char *const *argv, - const char *shortopts, const struct option *longopts, - int *longind); - -extern int getopt_long_only(int argc, char *const *argv, - const char *shortopts, const struct option *longopts, - int *longind); - - -#endif diff --git a/mdk-stage1/dietlibc/include/glob.h b/mdk-stage1/dietlibc/include/glob.h deleted file mode 100644 index bc8f779c9..000000000 --- a/mdk-stage1/dietlibc/include/glob.h +++ /dev/null @@ -1,57 +0,0 @@ -#ifndef _GLOB_H -#define _GLOB_H - -#include -#include - -typedef struct { - size_t gl_pathc; /* Count of paths matched so far */ - char **gl_pathv; /* List of matched pathnames. */ - size_t gl_offs; /* Slots to reserve in `gl_pathv'. */ - int gl_flags; /* Set to FLAGS, maybe | GLOB_MAGCHAR. */ -} glob_t; - - -int glob(const char *pattern, int flags, - int errfunc(const char * epath, int eerrno), - glob_t *pglob) __THROW; - -void globfree(glob_t *pglob) __THROW; - - - -/* Bits set in the FLAGS argument to `glob'. */ -#define GLOB_ERR (1 << 0)/* Return on read errors. */ -#define GLOB_MARK (1 << 1)/* Append a slash to each name. */ -#define GLOB_NOSORT (1 << 2)/* Don't sort the names. */ -#define GLOB_DOOFFS (1 << 3)/* Insert PGLOB->gl_offs NULLs. */ -#define GLOB_NOCHECK (1 << 4)/* If nothing matches, return the pattern. */ -#define GLOB_APPEND (1 << 5)/* Append to results of a previous call. */ -#define GLOB_NOESCAPE (1 << 6)/* Backslashes don't quote metacharacters. */ -#define GLOB_PERIOD (1 << 7)/* Leading `.' can be matched by metachars. */ - -#define GLOB_MAGCHAR (1 << 8)/* Set in gl_flags if any metachars seen. */ -#define GLOB_ALTDIRFUNC (1 << 9)/* Use gl_opendir et al functions. */ -#define GLOB_BRACE (1 << 10)/* Expand "{a,b}" to "a" "b". */ -#define GLOB_NOMAGIC (1 << 11)/* If no magic chars, return the pattern. */ -#define GLOB_TILDE (1 << 12)/* Expand ~user and ~ to home directories. */ -#define GLOB_ONLYDIR (1 << 13)/* Match only directories. */ -#define GLOB_TILDE_CHECK (1 << 14)/* Like GLOB_TILDE but return an error - if the user name is not available. */ -#define __GLOB_FLAGS (GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS| \ - GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND| \ - GLOB_PERIOD|GLOB_ALTDIRFUNC|GLOB_BRACE| \ - GLOB_NOMAGIC|GLOB_TILDE|GLOB_ONLYDIR|GLOB_TILDE_CHECK) - - -/* Error returns from `glob'. */ -#define GLOB_NOSPACE 1 /* Ran out of memory. */ -#define GLOB_ABORTED 2 /* Read error. */ -#define GLOB_NOMATCH 3 /* No matches found. */ -#define GLOB_NOSYS 4 /* Not implemented. */ -/* Previous versions of this file defined GLOB_ABEND instead of - GLOB_ABORTED. Provide a compatibility definition here. */ -#define GLOB_ABEND GLOB_ABORTED - - -#endif diff --git a/mdk-stage1/dietlibc/include/grp.h b/mdk-stage1/dietlibc/include/grp.h deleted file mode 100644 index 08b153137..000000000 --- a/mdk-stage1/dietlibc/include/grp.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef _GRP_H -#define _GRP_H - -#include -#include - -struct group - { - char *gr_name; /* Group name. */ - char *gr_passwd; /* Password. */ - gid_t gr_gid; /* Group ID. */ - char **gr_mem; /* Member list. */ - }; - -extern struct group *getgrgid (gid_t uid) __THROW; -extern struct group *getgrnam (const char *name) __THROW; - -extern struct group *getgrent(void) __THROW; -extern void setgrent(void) __THROW; -extern void endgrent(void) __THROW; - -int getgrent_r(struct group *res, char *buf, size_t buflen, - struct group **res_sig) __THROW; -int getgrnam_r(const char* name, - struct group *res, char *buf, size_t buflen, - struct group **res_sig) __THROW; -int getgrgid_r(uid_t uid, - struct group *res, char *buf, size_t buflen, - struct group **res_sig) __THROW; - -extern int setgroups(size_t n, const gid_t *groups) __THROW; -extern int setgroups32(size_t n, const gid32_t *groups) __THROW; -extern int initgroups(const char *user, gid_t group) __THROW; - -#endif diff --git a/mdk-stage1/dietlibc/include/iconv.h b/mdk-stage1/dietlibc/include/iconv.h deleted file mode 100644 index 1205994ca..000000000 --- a/mdk-stage1/dietlibc/include/iconv.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef _ICONV_H -#define _ICONV_H - -#include -#include - -/* Identifier for conversion method from one codeset to another. */ -typedef unsigned int iconv_t; - -/* Allocate descriptor for code conversion from codeset FROMCODE to - codeset TOCODE. */ -extern iconv_t iconv_open (const char *tocode, const char *fromcode) __THROW; - -/* Convert at most *INBYTESLEFT bytes from *INBUF according to the - code conversion algorithm specified by CD and place up to - *OUTBYTESLEFT bytes in buffer at *OUTBUF. */ -extern size_t iconv (iconv_t cd, const char** inbuf, - size_t* inbytesleft, - char** outbuf, - size_t* outbytesleft) __THROW; - -/* Free resources allocated for descriptor CD for code conversion. */ -extern int iconv_close (iconv_t cd) __THROW; - -#endif /* iconv.h */ diff --git a/mdk-stage1/dietlibc/include/inttypes.h b/mdk-stage1/dietlibc/include/inttypes.h deleted file mode 100644 index 32637f5f7..000000000 --- a/mdk-stage1/dietlibc/include/inttypes.h +++ /dev/null @@ -1,247 +0,0 @@ -#ifndef _INTTYPES_H -#define _INTTYPES_H - -#include -#include - -# if __WORDSIZE == 64 -# define __PRI64_PREFIX "l" -# define __PRIPTR_PREFIX "l" -# else -# define __PRI64_PREFIX "ll" -# define __PRIPTR_PREFIX -# endif - -/* Macros for printing format specifiers. */ - -/* Decimal notation. */ -# define PRId8 "d" -# define PRId16 "d" -# define PRId32 "d" -# define PRId64 __PRI64_PREFIX "d" - -# define PRIdLEAST8 "d" -# define PRIdLEAST16 "d" -# define PRIdLEAST32 "d" -# define PRIdLEAST64 __PRI64_PREFIX "d" - -# define PRIdFAST8 "d" -# define PRIdFAST16 "d" -# define PRIdFAST32 "d" -# define PRIdFAST64 __PRI64_PREFIX "d" - - -# define PRIi8 "i" -# define PRIi16 "i" -# define PRIi32 "i" -# define PRIi64 __PRI64_PREFIX "i" - -# define PRIiLEAST8 "i" -# define PRIiLEAST16 "i" -# define PRIiLEAST32 "i" -# define PRIiLEAST64 __PRI64_PREFIX "i" - -# define PRIiFAST8 "i" -# define PRIiFAST16 "i" -# define PRIiFAST32 "i" -# define PRIiFAST64 __PRI64_PREFIX "i" - -/* Octal notation. */ -# define PRIo8 "o" -# define PRIo16 "o" -# define PRIo32 "o" -# define PRIo64 __PRI64_PREFIX "o" - -# define PRIoLEAST8 "o" -# define PRIoLEAST16 "o" -# define PRIoLEAST32 "o" -# define PRIoLEAST64 __PRI64_PREFIX "o" - -# define PRIoFAST8 "o" -# define PRIoFAST16 "o" -# define PRIoFAST32 "o" -# define PRIoFAST64 __PRI64_PREFIX "o" - -/* Unsigned integers. */ -# define PRIu8 "u" -# define PRIu16 "u" -# define PRIu32 "u" -# define PRIu64 __PRI64_PREFIX "u" - -# define PRIuLEAST8 "u" -# define PRIuLEAST16 "u" -# define PRIuLEAST32 "u" -# define PRIuLEAST64 __PRI64_PREFIX "u" - -# define PRIuFAST8 "u" -# define PRIuFAST16 "u" -# define PRIuFAST32 "u" -# define PRIuFAST64 __PRI64_PREFIX "u" - -/* lowercase hexadecimal notation. */ -# define PRIx8 "x" -# define PRIx16 "x" -# define PRIx32 "x" -# define PRIx64 __PRI64_PREFIX "x" - -# define PRIxLEAST8 "x" -# define PRIxLEAST16 "x" -# define PRIxLEAST32 "x" -# define PRIxLEAST64 __PRI64_PREFIX "x" - -# define PRIxFAST8 "x" -# define PRIxFAST16 "x" -# define PRIxFAST32 "x" -# define PRIxFAST64 __PRI64_PREFIX "x" - -/* UPPERCASE hexadecimal notation. */ -# define PRIX8 "X" -# define PRIX16 "X" -# define PRIX32 "X" -# define PRIX64 __PRI64_PREFIX "X" - -# define PRIXLEAST8 "X" -# define PRIXLEAST16 "X" -# define PRIXLEAST32 "X" -# define PRIXLEAST64 __PRI64_PREFIX "X" - -# define PRIXFAST8 "X" -# define PRIXFAST16 "X" -# define PRIXFAST32 "X" -# define PRIXFAST64 __PRI64_PREFIX "X" - - -/* Macros for printing `intmax_t' and `uintmax_t'. */ -# define PRIdMAX __PRI64_PREFIX "d" -# define PRIiMAX __PRI64_PREFIX "i" -# define PRIoMAX __PRI64_PREFIX "o" -# define PRIuMAX __PRI64_PREFIX "u" -# define PRIxMAX __PRI64_PREFIX "x" -# define PRIXMAX __PRI64_PREFIX "X" - - -/* Macros for printing `intptr_t' and `uintptr_t'. */ -# define PRIdPTR __PRIPTR_PREFIX "d" -# define PRIiPTR __PRIPTR_PREFIX "i" -# define PRIoPTR __PRIPTR_PREFIX "o" -# define PRIuPTR __PRIPTR_PREFIX "u" -# define PRIxPTR __PRIPTR_PREFIX "x" -# define PRIXPTR __PRIPTR_PREFIX "X" - - -/* Macros for scanning format specifiers. */ - -/* Signed decimal notation. */ -# define SCNd8 "hhd" -# define SCNd16 "hd" -# define SCNd32 "d" -# define SCNd64 __PRI64_PREFIX "d" - -# define SCNdLEAST8 "hhd" -# define SCNdLEAST16 "hd" -# define SCNdLEAST32 "d" -# define SCNdLEAST64 __PRI64_PREFIX "d" - -# define SCNdFAST8 "hhd" -# define SCNdFAST16 __PRIPTR_PREFIX "d" -# define SCNdFAST32 __PRIPTR_PREFIX "d" -# define SCNdFAST64 __PRI64_PREFIX "d" - -/* Signed decimal notation. */ -# define SCNi8 "hhi" -# define SCNi16 "hi" -# define SCNi32 "i" -# define SCNi64 __PRI64_PREFIX "i" - -# define SCNiLEAST8 "hhi" -# define SCNiLEAST16 "hi" -# define SCNiLEAST32 "i" -# define SCNiLEAST64 __PRI64_PREFIX "i" - -# define SCNiFAST8 "hhi" -# define SCNiFAST16 __PRIPTR_PREFIX "i" -# define SCNiFAST32 __PRIPTR_PREFIX "i" -# define SCNiFAST64 __PRI64_PREFIX "i" - -/* Unsigned decimal notation. */ -# define SCNu8 "hhu" -# define SCNu16 "hu" -# define SCNu32 "u" -# define SCNu64 __PRI64_PREFIX "u" - -# define SCNuLEAST8 "hhu" -# define SCNuLEAST16 "hu" -# define SCNuLEAST32 "u" -# define SCNuLEAST64 __PRI64_PREFIX "u" - -# define SCNuFAST8 "hhu" -# define SCNuFAST16 __PRIPTR_PREFIX "u" -# define SCNuFAST32 __PRIPTR_PREFIX "u" -# define SCNuFAST64 __PRI64_PREFIX "u" - -/* Octal notation. */ -# define SCNo8 "hho" -# define SCNo16 "ho" -# define SCNo32 "o" -# define SCNo64 __PRI64_PREFIX "o" - -# define SCNoLEAST8 "hho" -# define SCNoLEAST16 "ho" -# define SCNoLEAST32 "o" -# define SCNoLEAST64 __PRI64_PREFIX "o" - -# define SCNoFAST8 "hho" -# define SCNoFAST16 __PRIPTR_PREFIX "o" -# define SCNoFAST32 __PRIPTR_PREFIX "o" -# define SCNoFAST64 __PRI64_PREFIX "o" - -/* Hexadecimal notation. */ -# define SCNx8 "hhx" -# define SCNx16 "hx" -# define SCNx32 "x" -# define SCNx64 __PRI64_PREFIX "x" - -# define SCNxLEAST8 "hhx" -# define SCNxLEAST16 "hx" -# define SCNxLEAST32 "x" -# define SCNxLEAST64 __PRI64_PREFIX "x" - -# define SCNxFAST8 "hhx" -# define SCNxFAST16 __PRIPTR_PREFIX "x" -# define SCNxFAST32 __PRIPTR_PREFIX "x" -# define SCNxFAST64 __PRI64_PREFIX "x" - - -/* Macros for scanning `intmax_t' and `uintmax_t'. */ -# define SCNdMAX __PRI64_PREFIX "d" -# define SCNiMAX __PRI64_PREFIX "i" -# define SCNoMAX __PRI64_PREFIX "o" -# define SCNuMAX __PRI64_PREFIX "u" -# define SCNxMAX __PRI64_PREFIX "x" - -/* Macros for scanning `intptr_t' and `uintptr_t'. */ -# define SCNdPTR __PRIPTR_PREFIX "d" -# define SCNiPTR __PRIPTR_PREFIX "i" -# define SCNoPTR __PRIPTR_PREFIX "o" -# define SCNuPTR __PRIPTR_PREFIX "u" -# define SCNxPTR __PRIPTR_PREFIX "x" - -typedef signed char int8_t; -typedef signed short int16_t; -typedef signed int int32_t; - -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned int uint32_t; - -typedef signed long int intptr_t; -typedef unsigned long int uintptr_t; - -#ifndef __STRICT_ANSI__ -__extension__ typedef signed long long int64_t; -__extension__ typedef unsigned long long uint64_t; -__extension__ typedef signed long long int intmax_t; -__extension__ typedef unsigned long long int uintmax_t; -#endif - -#endif diff --git a/mdk-stage1/dietlibc/include/libgen.h b/mdk-stage1/dietlibc/include/libgen.h deleted file mode 100644 index ab13b0a30..000000000 --- a/mdk-stage1/dietlibc/include/libgen.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef _LIBGEN_H -#define _LIBGEN_H - -#include - -char *dirname(char *path) __THROW; -char *basename(char *path) __THROW; - -#endif diff --git a/mdk-stage1/dietlibc/include/libintl.h b/mdk-stage1/dietlibc/include/libintl.h deleted file mode 100644 index 20873f55f..000000000 --- a/mdk-stage1/dietlibc/include/libintl.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef _LIBINTL_H -#define _LIBINTL_H - -#include -#include -#include - -#define gettext(msgid) dgettext(0,msgid) -#define dgettext(domainname,msgid) dcgettext(domainname,msgid,LC_MESSAGES) - -#define ngettext(msgid1,msgid2,n) dngettext(0,msgid1,msgid2,n) -#define dngettext(dn,msgid1,msgid2,n) dngettext(dn,msgid1,msgid2,n,LC_MESSAGES) - -char* dcgettext(const char *domainname, const char *msgid, int category) __THROW; -char* dcngettext(const char *domainname, - const char *msgid1, const char *msgid2, - unsigned long int n, int __category) __THROW; - -char* textdomain(const char *domainname) __THROW; -char* bindtextdomain(const char *domainname, const char *dirname) __THROW; -char* bind_textdomain_codeset(const char *domainname, const char *codeset) __THROW; - -#endif diff --git a/mdk-stage1/dietlibc/include/limits.h b/mdk-stage1/dietlibc/include/limits.h deleted file mode 100644 index b5577a0bf..000000000 --- a/mdk-stage1/dietlibc/include/limits.h +++ /dev/null @@ -1,73 +0,0 @@ -#ifndef _LIMITS_H -#define _LIMITS_H - -#include - -#define CHAR_BIT 8 - -#define SCHAR_MIN (-128) -#define SCHAR_MAX 0x7f -#define UCHAR_MAX 0xff - -#ifdef __CHAR_UNSIGNED__ -#undef CHAR_MIN -#define CHAR_MIN 0 -#undef CHAR_MAX -#define CHAR_MAX UCHAR_MAX -#else -#undef CHAR_MIN -#define CHAR_MIN SCHAR_MIN -#undef CHAR_MAX -#define CHAR_MAX SCHAR_MAX -#endif - -#define SHRT_MIN (-SHRT_MAX-1) -#define SHRT_MAX 0x7fff -#define USHRT_MAX 0xffff - -#define INT_MIN (-INT_MAX-1) -#define INT_MAX 0x7fffffff -#define UINT_MAX 0xffffffff - -#if __WORDSIZE == 64 -#define LONG_MAX 9223372036854775807L -#define ULONG_MAX 18446744073709551615UL -#else -#define LONG_MAX 2147483647L -#define ULONG_MAX 4294967295UL -#endif -#define LONG_MIN (-LONG_MAX - 1L) - -#define LLONG_MAX 9223372036854775807LL -#define LLONG_MIN (-LLONG_MAX - 1LL) - -/* Maximum value an `unsigned long long int' can hold. (Minimum is 0.) */ -#define ULLONG_MAX 18446744073709551615ULL - -#define SSIZE_MIN LONG_MIN -#define SSIZE_MAX LONG_MAX - -#define PASS_MAX 256 - -#define NR_OPEN 1024 - -#define NGROUPS_MAX 32 /* supplemental group IDs are available */ -#define ARG_MAX 131072 /* # bytes of args + environ for exec() */ -#define CHILD_MAX 999 /* no limit :-) */ -#define OPEN_MAX 256 /* # open files a process may have */ -#define LINK_MAX 127 /* # links a file may have */ -#define MAX_CANON 255 /* size of the canonical input queue */ -#define MAX_INPUT 255 /* size of the type-ahead buffer */ -#define NAME_MAX 255 /* # chars in a file name */ -#define PATH_MAX 4095 /* # chars in a path name */ -#define PIPE_BUF 4096 /* # bytes in atomic write to a pipe */ - -#define RTSIG_MAX 32 - -#define LINE_MAX 2048 - -/* mutt demanded these */ -#define _POSIX_PATH_MAX PATH_MAX -#define MB_LEN_MAX 16 - -#endif diff --git a/mdk-stage1/dietlibc/include/linux/eventpoll.h b/mdk-stage1/dietlibc/include/linux/eventpoll.h deleted file mode 100644 index 19990ac2a..000000000 --- a/mdk-stage1/dietlibc/include/linux/eventpoll.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef _LINUX_EVENTPOLL_H -#define _LINUX_EVENTPOLL_H - -#include -#include -#include - -#define POLLFD_X_PAGE (PAGE_SIZE / sizeof(struct pollfd)) -#define EP_FDS_PAGES(n) (((n) + POLLFD_X_PAGE - 1) / POLLFD_X_PAGE) -#define EP_MAP_SIZE(n) (EP_FDS_PAGES(n) * PAGE_SIZE * 2) - -struct evpoll { - int ep_timeout; - unsigned long ep_resoff; -}; - -#endif diff --git a/mdk-stage1/dietlibc/include/linux/if_ether.h b/mdk-stage1/dietlibc/include/linux/if_ether.h deleted file mode 100644 index dbeb3728e..000000000 --- a/mdk-stage1/dietlibc/include/linux/if_ether.h +++ /dev/null @@ -1,101 +0,0 @@ -/* - * INET An implementation of the TCP/IP protocol suite for the LINUX - * operating system. INET is implemented using the BSD Socket - * interface as the means of communication with the user level. - * - * Global definitions for the Ethernet IEEE 802.3 interface. - * - * Version: @(#)if_ether.h 1.0.1a 02/08/94 - * - * Author: Fred N. van Kempen, - * Donald Becker, - * Alan Cox, - * Steve Whitehouse, - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ - -#ifndef _LINUX_IF_ETHER_H -#define _LINUX_IF_ETHER_H - -/* - * IEEE 802.3 Ethernet magic constants. The frame sizes omit the preamble - * and FCS/CRC (frame check sequence). - */ - -#define ETH_ALEN 6 /* Octets in one ethernet addr */ -#define ETH_HLEN 14 /* Total octets in header. */ -#define ETH_ZLEN 60 /* Min. octets in frame sans FCS */ -#define ETH_DATA_LEN 1500 /* Max. octets in payload */ -#define ETH_FRAME_LEN 1514 /* Max. octets in frame sans FCS */ - -/* - * These are the defined Ethernet Protocol ID's. - */ - -#define ETH_P_LOOP 0x0060 /* Ethernet Loopback packet */ -#define ETH_P_PUP 0x0200 /* Xerox PUP packet */ -#define ETH_P_PUPAT 0x0201 /* Xerox PUP Addr Trans packet */ -#define ETH_P_IP 0x0800 /* Internet Protocol packet */ -#define ETH_P_X25 0x0805 /* CCITT X.25 */ -#define ETH_P_ARP 0x0806 /* Address Resolution packet */ -#define ETH_P_BPQ 0x08FF /* G8BPQ AX.25 Ethernet Packet [ NOT AN OFFICIALLY REGISTERED ID ] */ -#define ETH_P_IEEEPUP 0x0a00 /* Xerox IEEE802.3 PUP packet */ -#define ETH_P_IEEEPUPAT 0x0a01 /* Xerox IEEE802.3 PUP Addr Trans packet */ -#define ETH_P_DEC 0x6000 /* DEC Assigned proto */ -#define ETH_P_DNA_DL 0x6001 /* DEC DNA Dump/Load */ -#define ETH_P_DNA_RC 0x6002 /* DEC DNA Remote Console */ -#define ETH_P_DNA_RT 0x6003 /* DEC DNA Routing */ -#define ETH_P_LAT 0x6004 /* DEC LAT */ -#define ETH_P_DIAG 0x6005 /* DEC Diagnostics */ -#define ETH_P_CUST 0x6006 /* DEC Customer use */ -#define ETH_P_SCA 0x6007 /* DEC Systems Comms Arch */ -#define ETH_P_RARP 0x8035 /* Reverse Addr Res packet */ -#define ETH_P_ATALK 0x809B /* Appletalk DDP */ -#define ETH_P_AARP 0x80F3 /* Appletalk AARP */ -#define ETH_P_8021Q 0x8100 /* 802.1Q VLAN Extended Header */ -#define ETH_P_IPX 0x8137 /* IPX over DIX */ -#define ETH_P_IPV6 0x86DD /* IPv6 over bluebook */ -#define ETH_P_PPP_DISC 0x8863 /* PPPoE discovery messages */ -#define ETH_P_PPP_SES 0x8864 /* PPPoE session messages */ -#define ETH_P_ATMMPOA 0x884c /* MultiProtocol Over ATM */ -#define ETH_P_ATMFATE 0x8884 /* Frame-based ATM Transport - * over Ethernet - */ - -/* - * Non DIX types. Won't clash for 1500 types. - */ - -#define ETH_P_802_3 0x0001 /* Dummy type for 802.3 frames */ -#define ETH_P_AX25 0x0002 /* Dummy protocol id for AX.25 */ -#define ETH_P_ALL 0x0003 /* Every packet (be careful!!!) */ -#define ETH_P_802_2 0x0004 /* 802.2 frames */ -#define ETH_P_SNAP 0x0005 /* Internal only */ -#define ETH_P_DDCMP 0x0006 /* DEC DDCMP: Internal only */ -#define ETH_P_WAN_PPP 0x0007 /* Dummy type for WAN PPP frames*/ -#define ETH_P_PPP_MP 0x0008 /* Dummy type for PPP MP frames */ -#define ETH_P_LOCALTALK 0x0009 /* Localtalk pseudo type */ -#define ETH_P_PPPTALK 0x0010 /* Dummy type for Atalk over PPP*/ -#define ETH_P_TR_802_2 0x0011 /* 802.2 frames */ -#define ETH_P_MOBITEX 0x0015 /* Mobitex (kaz@cafe.net) */ -#define ETH_P_CONTROL 0x0016 /* Card specific control frames */ -#define ETH_P_IRDA 0x0017 /* Linux-IrDA */ -#define ETH_P_ECONET 0x0018 /* Acorn Econet */ -#define ETH_P_HDLC 0x0019 /* HDLC frames */ - -/* - * This is an Ethernet frame header. - */ - -struct ethhdr -{ - unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ - unsigned char h_source[ETH_ALEN]; /* source ether addr */ - unsigned short h_proto; /* packet type ID field */ -}; - -#endif /* _LINUX_IF_ETHER_H */ diff --git a/mdk-stage1/dietlibc/include/linux/loop.h b/mdk-stage1/dietlibc/include/linux/loop.h deleted file mode 100644 index 1366f1877..000000000 --- a/mdk-stage1/dietlibc/include/linux/loop.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef _LINUX_LOOP_H -#define _LINUX_LOOP_H - -/* stolen form kernel */ - -#define LO_NAME_SIZE 64 -#define LO_KEY_SIZE 32 - -/* Loop flags */ -#define LO_FLAGS_DO_BMAP 1 -#define LO_FLAGS_READ_ONLY 2 -#define LO_FLAGS_BH_REMAP 4 - -struct loop_info { - int lo_number; /* ioctl r/o */ - dev_t lo_device; /* ioctl r/o */ - unsigned long lo_inode; /* ioctl r/o */ - dev_t lo_rdevice; /* ioctl r/o */ - int lo_offset; - int lo_encrypt_type; - int lo_encrypt_key_size; /* ioctl w/o */ - int lo_flags; /* ioctl r/o */ - char lo_name[LO_NAME_SIZE]; - unsigned char lo_encrypt_key[LO_KEY_SIZE]; /* ioctl w/o */ - unsigned long lo_init[2]; - char reserved[4]; -}; - -/* Loop filter types */ -#define LO_CRYPT_NONE 0 -#define LO_CRYPT_XOR 1 -#define LO_CRYPT_DES 2 -#define LO_CRYPT_FISH2 3 /* Brand new Twofish encryption */ -#define LO_CRYPT_BLOW 4 -#define LO_CRYPT_CAST128 5 -#define LO_CRYPT_IDEA 6 -#define LO_CRYPT_DUMMY 9 -#define LO_CRYPT_SKIPJACK 10 -#define MAX_LO_CRYPT 20 - -/* IOCTL commands --- we will commandeer 0x4C ('L') */ -#define LOOP_SET_FD 0x4C00 -#define LOOP_CLR_FD 0x4C01 -#define LOOP_SET_STATUS 0x4C02 -#define LOOP_GET_STATUS 0x4C03 - -#endif diff --git a/mdk-stage1/dietlibc/include/linux/nfs.h b/mdk-stage1/dietlibc/include/linux/nfs.h deleted file mode 100644 index 9be6db37e..000000000 --- a/mdk-stage1/dietlibc/include/linux/nfs.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * NFS protocol definitions - * - * This file contains constants mostly for Version 2 of the protocol, - * but also has a couple of NFSv3 bits in (notably the error codes). - */ -#ifndef _LINUX_NFS_H -#define _LINUX_NFS_H - -#define NFS_PROGRAM 100003 -#define NFS_PORT 2049 -#define NFS_MAXDATA 8192 -#define NFS_MAXPATHLEN 1024 -#define NFS_MAXNAMLEN 255 -#define NFS_MAXGROUPS 16 -#define NFS_FHSIZE 32 -#define NFS_COOKIESIZE 4 -#define NFS_FIFO_DEV (-1) -#define NFSMODE_FMT 0170000 -#define NFSMODE_DIR 0040000 -#define NFSMODE_CHR 0020000 -#define NFSMODE_BLK 0060000 -#define NFSMODE_REG 0100000 -#define NFSMODE_LNK 0120000 -#define NFSMODE_SOCK 0140000 -#define NFSMODE_FIFO 0010000 - -#define NFS_MNT_PROGRAM 100005 -#define NFS_MNT_PORT 627 - -/* - * NFS stats. The good thing with these values is that NFSv3 errors are - * a superset of NFSv2 errors (with the exception of NFSERR_WFLUSH which - * no-one uses anyway), so we can happily mix code as long as we make sure - * no NFSv3 errors are returned to NFSv2 clients. - * Error codes that have a `--' in the v2 column are not part of the - * standard, but seem to be widely used nevertheless. - */ - enum nfs_stat { - NFS_OK = 0, /* v2 v3 */ - NFSERR_PERM = 1, /* v2 v3 */ - NFSERR_NOENT = 2, /* v2 v3 */ - NFSERR_IO = 5, /* v2 v3 */ - NFSERR_NXIO = 6, /* v2 v3 */ - NFSERR_EAGAIN = 11, /* v2 v3 */ - NFSERR_ACCES = 13, /* v2 v3 */ - NFSERR_EXIST = 17, /* v2 v3 */ - NFSERR_XDEV = 18, /* v3 */ - NFSERR_NODEV = 19, /* v2 v3 */ - NFSERR_NOTDIR = 20, /* v2 v3 */ - NFSERR_ISDIR = 21, /* v2 v3 */ - NFSERR_INVAL = 22, /* v2 v3 that Sun forgot */ - NFSERR_FBIG = 27, /* v2 v3 */ - NFSERR_NOSPC = 28, /* v2 v3 */ - NFSERR_ROFS = 30, /* v2 v3 */ - NFSERR_MLINK = 31, /* v3 */ - NFSERR_OPNOTSUPP = 45, /* v2 v3 */ - NFSERR_NAMETOOLONG = 63, /* v2 v3 */ - NFSERR_NOTEMPTY = 66, /* v2 v3 */ - NFSERR_DQUOT = 69, /* v2 v3 */ - NFSERR_STALE = 70, /* v2 v3 */ - NFSERR_REMOTE = 71, /* v2 v3 */ - NFSERR_WFLUSH = 99, /* v2 */ - NFSERR_BADHANDLE = 10001, /* v3 */ - NFSERR_NOT_SYNC = 10002, /* v3 */ - NFSERR_BAD_COOKIE = 10003, /* v3 */ - NFSERR_NOTSUPP = 10004, /* v3 */ - NFSERR_TOOSMALL = 10005, /* v3 */ - NFSERR_SERVERFAULT = 10006, /* v3 */ - NFSERR_BADTYPE = 10007, /* v3 */ - NFSERR_JUKEBOX = 10008 /* v3 */ - }; - -/* NFSv2 file types - beware, these are not the same in NFSv3 */ - -enum nfs_ftype { - NFNON = 0, - NFREG = 1, - NFDIR = 2, - NFBLK = 3, - NFCHR = 4, - NFLNK = 5, - NFSOCK = 6, - NFBAD = 7, - NFFIFO = 8 -}; - -#endif /* _LINUX_NFS_H */ diff --git a/mdk-stage1/dietlibc/include/linux/posix_types.h b/mdk-stage1/dietlibc/include/linux/posix_types.h deleted file mode 100644 index 0d494a1f6..000000000 --- a/mdk-stage1/dietlibc/include/linux/posix_types.h +++ /dev/null @@ -1,115 +0,0 @@ -#ifndef _LINUX_POSIX_TYPES_H -#define _LINUX_POSIX_TYPES_H - -/* - * This allows for 1024 file descriptors: if NR_OPEN is ever grown - * beyond that you'll have to change this too. But 1024 fd's seem to be - * enough even for such "real" unices like OSF/1, so hopefully this is - * one limit that doesn't have to be changed [again]. - * - * Note that POSIX wants the FD_CLEAR(fd,fdsetp) defines to be in - * (and thus ) - but this is a more logical - * place for them. Solved by having dummy defines in . - */ - -/* - * Those macros may have been defined in . But we always - * use the ones here. - */ -#undef __NFDBITS -#define __NFDBITS (8 * sizeof(unsigned long)) - -#undef __FD_SETSIZE -#define __FD_SETSIZE 1024 - -#undef __FDSET_LONGS -#define __FDSET_LONGS (__FD_SETSIZE/__NFDBITS) - -#undef __FDELT -#define __FDELT(d) ((d) / __NFDBITS) - -#undef __FDMASK -#define __FDMASK(d) (1UL << ((d) % __NFDBITS)) - -typedef struct { - unsigned long fds_bits [__FDSET_LONGS]; -} __kernel_fd_set; - -#ifndef __KERNEL_STRICT_NAMES -typedef __kernel_fd_set fd_set; -#endif - -#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) - -#undef __FD_SET -static __inline__ void __FD_SET(unsigned long fd, __kernel_fd_set *fdsetp) -{ - unsigned long _tmp = fd / __NFDBITS; - unsigned long _rem = fd % __NFDBITS; - fdsetp->fds_bits[_tmp] |= (1UL<<_rem); -} - -#undef __FD_CLR -static __inline__ void __FD_CLR(unsigned long fd, __kernel_fd_set *fdsetp) -{ - unsigned long _tmp = fd / __NFDBITS; - unsigned long _rem = fd % __NFDBITS; - fdsetp->fds_bits[_tmp] &= ~(1UL<<_rem); -} - -#undef __FD_ISSET -static __inline__ int __FD_ISSET(unsigned long fd, __const__ __kernel_fd_set *p) -{ - unsigned long _tmp = fd / __NFDBITS; - unsigned long _rem = fd % __NFDBITS; - return (p->fds_bits[_tmp] & (1UL<<_rem)) != 0; -} - -/* - * This will unroll the loop for the normal constant cases (8 or 32 longs, - * for 256 and 1024-bit fd_sets respectively) - */ -#undef __FD_ZERO -static __inline__ void __FD_ZERO(__kernel_fd_set *p) -{ - unsigned long *tmp = p->fds_bits; - int i; - - if (__builtin_constant_p(__FDSET_LONGS)) { - switch (__FDSET_LONGS) { - case 32: - tmp[ 0] = 0; tmp[ 1] = 0; tmp[ 2] = 0; tmp[ 3] = 0; - tmp[ 4] = 0; tmp[ 5] = 0; tmp[ 6] = 0; tmp[ 7] = 0; - tmp[ 8] = 0; tmp[ 9] = 0; tmp[10] = 0; tmp[11] = 0; - tmp[12] = 0; tmp[13] = 0; tmp[14] = 0; tmp[15] = 0; - tmp[16] = 0; tmp[17] = 0; tmp[18] = 0; tmp[19] = 0; - tmp[20] = 0; tmp[21] = 0; tmp[22] = 0; tmp[23] = 0; - tmp[24] = 0; tmp[25] = 0; tmp[26] = 0; tmp[27] = 0; - tmp[28] = 0; tmp[29] = 0; tmp[30] = 0; tmp[31] = 0; - return; - case 16: - tmp[ 0] = 0; tmp[ 1] = 0; tmp[ 2] = 0; tmp[ 3] = 0; - tmp[ 4] = 0; tmp[ 5] = 0; tmp[ 6] = 0; tmp[ 7] = 0; - tmp[ 8] = 0; tmp[ 9] = 0; tmp[10] = 0; tmp[11] = 0; - tmp[12] = 0; tmp[13] = 0; tmp[14] = 0; tmp[15] = 0; - return; - case 8: - tmp[ 0] = 0; tmp[ 1] = 0; tmp[ 2] = 0; tmp[ 3] = 0; - tmp[ 4] = 0; tmp[ 5] = 0; tmp[ 6] = 0; tmp[ 7] = 0; - return; - case 4: - tmp[ 0] = 0; tmp[ 1] = 0; tmp[ 2] = 0; tmp[ 3] = 0; - return; - } - } - i = __FDSET_LONGS; - while (i) { - i--; - *tmp = 0; - tmp++; - } -} - -#endif /* defined(__KERNEL__) */ - -#endif /* _LINUX_POSIX_TYPES_H */ diff --git a/mdk-stage1/dietlibc/include/linux/types.h b/mdk-stage1/dietlibc/include/linux/types.h deleted file mode 100644 index 1cd33bd41..000000000 --- a/mdk-stage1/dietlibc/include/linux/types.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _LINUX_TYPES_H -#define _LINUX_TYPES_H - -#include - -#endif diff --git a/mdk-stage1/dietlibc/include/locale.h b/mdk-stage1/dietlibc/include/locale.h deleted file mode 100644 index 5cd002019..000000000 --- a/mdk-stage1/dietlibc/include/locale.h +++ /dev/null @@ -1,84 +0,0 @@ -#ifndef _LOCALE_H -#define _LOCALE_H - -#include - -enum { - LC_CTYPE = 0, - LC_NUMERIC = 1, - LC_TIME = 2, - LC_COLLATE = 3, - LC_MONETARY = 4, - LC_MESSAGES = 5, - LC_ALL = 6, - LC_PAPER = 7, - LC_NAME = 8, - LC_ADDRESS = 9, - LC_TELEPHONE = 10, - LC_MEASUREMENT = 11, - LC_IDENTIFICATION = 12 -}; - -/* Structure giving information about numeric and monetary notation. */ -struct lconv { - /* Numeric (non-monetary) information. */ - char *decimal_point; - char *thousands_sep; - /* Each element is the number of digits in each group; - elements with higher indices are farther left. - An element with value CHAR_MAX means that no further grouping is done. - An element with value 0 means that the previous element is used - for all groups farther left. */ - char *grouping; - - /* Monetary information. */ - - /* First three chars are a currency symbol from ISO 4217. - Fourth char is the separator. Fifth char is '\0'. */ - char *int_curr_symbol; - char *currency_symbol; /* Local currency symbol. */ - char *mon_decimal_point; /* Decimal point character. */ - char *mon_thousands_sep; /* Thousands separator. */ - char *mon_grouping; /* Like `grouping' element (above). */ - char *positive_sign; /* Sign for positive values. */ - char *negative_sign; /* Sign for negative values. */ - char int_frac_digits; /* Int'l fractional digits. */ - char frac_digits; /* Local fractional digits. */ - /* 1 if currency_symbol precedes a positive value, 0 if succeeds. */ - char p_cs_precedes; - /* 1 iff a space separates currency_symbol from a positive value. */ - char p_sep_by_space; - /* 1 if currency_symbol precedes a negative value, 0 if succeeds. */ - char n_cs_precedes; - /* 1 iff a space separates currency_symbol from a negative value. */ - char n_sep_by_space; - /* Positive and negative sign positions: - 0 Parentheses surround the quantity and currency_symbol. - 1 The sign string precedes the quantity and currency_symbol. - 2 The sign string follows the quantity and currency_symbol. - 3 The sign string immediately precedes the currency_symbol. - 4 The sign string immediately follows the currency_symbol. */ - char p_sign_posn; - char n_sign_posn; - /* 1 if int_curr_symbol precedes a positive value, 0 if succeeds. */ - char int_p_cs_precedes; - /* 1 iff a space separates int_curr_symbol from a positive value. */ - char int_p_sep_by_space; - /* 1 if int_curr_symbol precedes a negative value, 0 if succeeds. */ - char int_n_cs_precedes; - /* 1 iff a space separates int_curr_symbol from a negative value. */ - char int_n_sep_by_space; - /* Positive and negative sign positions: - 0 Parentheses surround the quantity and int_curr_symbol. - 1 The sign string precedes the quantity and int_curr_symbol. - 2 The sign string follows the quantity and int_curr_symbol. - 3 The sign string immediately precedes the int_curr_symbol. - 4 The sign string immediately follows the int_curr_symbol. */ - char int_p_sign_posn; - char int_n_sign_posn; -}; - -char *setlocale (int category, const char *locale) __THROW; -struct lconv *localeconv (void) __THROW; - -#endif diff --git a/mdk-stage1/dietlibc/include/malloc.h b/mdk-stage1/dietlibc/include/malloc.h deleted file mode 100644 index c8b49f26d..000000000 --- a/mdk-stage1/dietlibc/include/malloc.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/mdk-stage1/dietlibc/include/math.h b/mdk-stage1/dietlibc/include/math.h deleted file mode 100644 index 2cb545237..000000000 --- a/mdk-stage1/dietlibc/include/math.h +++ /dev/null @@ -1,96 +0,0 @@ -#ifndef _MATH_H -#define _MATH_H - -#include - -#define M_E 2.7182818284590452354 /* e */ -#define M_LOG2E 1.4426950408889634074 /* log_2 e */ -#define M_LOG10E 0.43429448190325182765 /* log_10 e */ -#define M_LN2 0.69314718055994530942 /* log_e 2 */ -#define M_LN10 2.30258509299404568402 /* log_e 10 */ -#define M_PI 3.14159265358979323846 /* pi */ -#define M_PI_2 1.57079632679489661923 /* pi/2 */ -#define M_PI_4 0.78539816339744830962 /* pi/4 */ -#define M_1_PI 0.31830988618379067154 /* 1/pi */ -#define M_2_PI 0.63661977236758134308 /* 2/pi */ -#define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */ -#define M_SQRT2 1.41421356237309504880 /* sqrt(2) */ -#define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */ - -#define M_El 2.7182818284590452353602874713526625L /* e */ -#define M_LOG2El 1.4426950408889634073599246810018922L /* log_2 e */ -#define M_LOG10El 0.4342944819032518276511289189166051L /* log_10 e */ -#define M_LN2l 0.6931471805599453094172321214581766L /* log_e 2 */ -#define M_LN10l 2.3025850929940456840179914546843642L /* log_e 10 */ -#define M_PIl 3.1415926535897932384626433832795029L /* pi */ -#define M_PI_2l 1.5707963267948966192313216916397514L /* pi/2 */ -#define M_PI_4l 0.7853981633974483096156608458198757L /* pi/4 */ -#define M_1_PIl 0.3183098861837906715377675267450287L /* 1/pi */ -#define M_2_PIl 0.6366197723675813430755350534900574L /* 2/pi */ -#define M_2_SQRTPIl 1.1283791670955125738961589031215452L /* 2/sqrt(pi) */ -#define M_SQRT2l 1.4142135623730950488016887242096981L /* sqrt(2) */ -#define M_SQRT1_2l 0.7071067811865475244008443621048490L /* 1/sqrt(2) */ - -double sin(double d) __THROW __attribute__((__const__)); -double cos(double d) __THROW __attribute__((__const__)); -double tan(double d) __THROW __attribute__((__const__)); - -double sinh(double d) __THROW __attribute__((__const__)); -double cosh(double d) __THROW __attribute__((__const__)); -double tanh(double d) __THROW __attribute__((__const__)); - -double asin(double d) __THROW __attribute__((__const__)); -double acos(double d) __THROW __attribute__((__const__)); -double atan(double d) __THROW __attribute__((__const__)); - -double asinh(double d) __THROW __attribute__((__const__)); -double acosh(double d) __THROW __attribute__((__const__)); -double atanh(double d) __THROW __attribute__((__const__)); - -double exp(double d) __THROW __attribute__((__const__)); -double exp10(double d) __THROW __attribute__((__const__)); -double log(double d) __THROW __attribute__((__const__)); -double log10(double d) __THROW __attribute__((__const__)); - -double pow(double x, double y) __THROW __attribute__((__const__)); - -double sqrt(double x) __THROW __attribute__((__const__)); -double fabs(double x) __THROW __attribute__((__const__)); -double fmod(double x, double y) __THROW __attribute__((__const__)); - -double floor(double x) __attribute__((__const__)); -double ceil(double x) __attribute__((__const__)); - -double expm1(double x) __THROW __attribute__((__const__)); -double hypot(double x, double y) __THROW __attribute__((__const__)); -double atan2(double x, double y) __THROW __attribute__((__const__)); - -double copysign(double value, double sign) __attribute__((__const__)); - -# define HUGE_VAL \ - (__extension__ \ - ((union { unsigned __l __attribute__((__mode__(__DI__))); double __d; }) \ - { __l: 0x000000007ff00000ULL }).__d) - -#ifdef _GNU_SOURCE -void sincos(double x, double* sinx, double* cosx); -double ipow (double mant, int expo); -#endif - -int isnan(double d) __attribute__((__const__)); -int isinf(double d) __attribute__((__const__)); -int finite(double d) __attribute__((__const__)); - -double j0(double x); -double j1(double x); -double jn(int n, double x); -double y0(double x); -double y1(double x); -double yn(int n, double x); -double erf(double x); -double erfc(double x); -double lgamma(double x); - -double rint(double x); - -#endif diff --git a/mdk-stage1/dietlibc/include/md5.h b/mdk-stage1/dietlibc/include/md5.h deleted file mode 100644 index 7cbc0e8f3..000000000 --- a/mdk-stage1/dietlibc/include/md5.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All - rights reserved. - - License to copy and use this software is granted provided that it - is identified as the "RSA Data Security, Inc. MD5 Message-Digest - Algorithm" in all material mentioning or referencing this software - or this function. - - License is also granted to make and use derivative works provided - that such works are identified as "derived from the RSA Data - Security, Inc. MD5 Message-Digest Algorithm" in all material - mentioning or referencing the derived work. - - RSA Data Security, Inc. makes no representations concerning either - the merchantability of this software or the suitability of this - software for any particular purpose. It is provided "as is" - without express or implied warranty of any kind. - These notices must be retained in any copies of any part of this - documentation and/or software. -*/ - -#ifndef _MD5_H -#define _MD5_H - -#include - -/* - Define the MD5 context structure. - Please DO NOT change the order or contents of the structure as - various assembler files depend on it !! -*/ -typedef struct -{ - uint32_t state[4]; /* state (ABCD) */ - uint32_t count[2]; /* number of bits, modulo 2^64 (least sig word first) */ - uint8_t buffer[64]; /* input buffer for incomplete buffer data */ -} -MD5_CTX; - -void MD5Init (MD5_CTX* ctx); -void MD5Update (MD5_CTX* ctx, const uint8_t* buf, size_t len); -void MD5Final (uint8_t digest[16], MD5_CTX* ctx); - -char* md5crypt (const char* pw, const char* salt); - -#endif - diff --git a/mdk-stage1/dietlibc/include/memory.h b/mdk-stage1/dietlibc/include/memory.h deleted file mode 100644 index 39adee705..000000000 --- a/mdk-stage1/dietlibc/include/memory.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _MEMORY_H -#define _MEMORY_H - -#include - -#endif diff --git a/mdk-stage1/dietlibc/include/mntent.h b/mdk-stage1/dietlibc/include/mntent.h deleted file mode 100644 index 301403224..000000000 --- a/mdk-stage1/dietlibc/include/mntent.h +++ /dev/null @@ -1,72 +0,0 @@ -#ifndef _MNTENT_H -#define _MNTENT_H - -#include -#include -#include - -#define MNTTAB _PATH_MNTTAB /* Deprecated alias. */ -#define MOUNTED _PATH_MOUNTED /* Deprecated alias. */ - -/* General filesystem types. */ -#define MNTTYPE_IGNORE "ignore" /* Ignore this entry. */ -#define MNTTYPE_NFS "nfs" /* Network file system. */ -#define MNTTYPE_SWAP "swap" /* Swap device. */ - - -/* Generic mount options. */ -#define MNTOPT_DEFAULTS "defaults" /* Use all default options. */ -#define MNTOPT_RO "ro" /* Read only. */ -#define MNTOPT_RW "rw" /* Read/write. */ -#define MNTOPT_SUID "suid" /* Set uid allowed. */ -#define MNTOPT_NOSUID "nosuid" /* No set uid allowed. */ -#define MNTOPT_NOAUTO "noauto" /* Do not auto mount. */ - -__BEGIN_DECLS - -/* Structure describing a mount table entry. */ -struct mntent - { - char *mnt_fsname; /* Device or server for filesystem. */ - char *mnt_dir; /* Directory mounted on. */ - char *mnt_type; /* Type of filesystem: ufs, nfs, etc. */ - char *mnt_opts; /* Comma-separated options for fs. */ - int mnt_freq; /* Dump frequency (in days). */ - int mnt_passno; /* Pass number for `fsck'. */ - }; - - -/* Prepare to begin reading and/or writing mount table entries from the - beginning of FILE. MODE is as for `fopen'. */ -extern FILE *setmntent (const char *file, const char *mode) __THROW; - -/* Read one mount table entry from STREAM. Returns a pointer to storage - reused on the next call, or null for EOF or error (use feof/ferror to - check). */ -extern struct mntent *getmntent (FILE* stream) __THROW; - -#ifdef __USE_MISC -/* Reentrant version of the above function. */ -extern struct mntent *getmntent_r (FILE* stream, - struct mntent* result, - char* buffer, - int bufsize) __THROW; -#endif - -/* Write the mount table entry described by MNT to STREAM. - Return zero on success, nonzero on failure. */ -extern int addmntent (FILE* stream, - const struct mntent* mnt) __THROW; - -/* Close a stream opened with `setmntent'. */ -extern int endmntent (FILE *stream) __THROW; - -/* Search MNT->mnt_opts for an option matching OPT. - Returns the address of the substring, or null if none found. */ -extern char *hasmntopt (const struct mntent *__mnt, - const char *opt) __THROW; - - -__END_DECLS - -#endif /* mntent.h */ diff --git a/mdk-stage1/dietlibc/include/net/ethernet.h b/mdk-stage1/dietlibc/include/net/ethernet.h deleted file mode 100644 index 900ffd536..000000000 --- a/mdk-stage1/dietlibc/include/net/ethernet.h +++ /dev/null @@ -1,76 +0,0 @@ -/* Copyright (C) 1997, 1999, 2001 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* Based on the FreeBSD version of this file. Curiously, that file - lacks a copyright in the header. */ - -#ifndef __NET_ETHERNET_H -#define __NET_ETHERNET_H 1 - -#include -#include -#include /* IEEE 802.3 Ethernet constants */ - -__BEGIN_DECLS - -/* This is a name for the 48 bit ethernet address available on many - systems. */ -struct ether_addr -{ - uint8_t ether_addr_octet[ETH_ALEN]; -} __attribute__ ((__packed__)); - -/* 10Mb/s ethernet header */ -struct ether_header -{ - uint8_t ether_dhost[ETH_ALEN]; /* destination eth addr */ - uint8_t ether_shost[ETH_ALEN]; /* source ether addr */ - uint16_t ether_type; /* packet type ID field */ -} __attribute__ ((__packed__)); - -/* Ethernet protocol ID's */ -#define ETHERTYPE_PUP 0x0200 /* Xerox PUP */ -#define ETHERTYPE_IP 0x0800 /* IP */ -#define ETHERTYPE_ARP 0x0806 /* Address resolution */ -#define ETHERTYPE_REVARP 0x8035 /* Reverse ARP */ - -#define ETHER_ADDR_LEN ETH_ALEN /* size of ethernet addr */ -#define ETHER_TYPE_LEN 2 /* bytes in type field */ -#define ETHER_CRC_LEN 4 /* bytes in CRC field */ -#define ETHER_HDR_LEN ETH_HLEN /* total octets in header */ -#define ETHER_MIN_LEN (ETH_ZLEN + ETHER_CRC_LEN) /* min packet length */ -#define ETHER_MAX_LEN (ETH_FRAME_LEN + ETHER_CRC_LEN) /* max packet length */ - -/* make sure ethenet length is valid */ -#define ETHER_IS_VALID_LEN(foo) \ - ((foo) >= ETHER_MIN_LEN && (foo) <= ETHER_MAX_LEN) - -/* - * The ETHERTYPE_NTRAILER packet types starting at ETHERTYPE_TRAIL have - * (type-ETHERTYPE_TRAIL)*512 bytes of data followed - * by an ETHER type (as given above) and then the (variable-length) header. - */ -#define ETHERTYPE_TRAIL 0x1000 /* Trailer packet */ -#define ETHERTYPE_NTRAILER 16 - -#define ETHERMTU ETH_DATA_LEN -#define ETHERMIN (ETHER_MIN_LEN - ETHER_HDR_LEN - ETHER_CRC_LEN) - -__END_DECLS - -#endif /* net/ethernet.h */ diff --git a/mdk-stage1/dietlibc/include/net/if.h b/mdk-stage1/dietlibc/include/net/if.h deleted file mode 100644 index ac4737db3..000000000 --- a/mdk-stage1/dietlibc/include/net/if.h +++ /dev/null @@ -1,102 +0,0 @@ -#ifndef _NET_IF_H -#define _NET_IF_H - -#include -#include - -/* Standard interface flags. */ -#define IFF_UP 0x1 /* interface is up */ -#define IFF_BROADCAST 0x2 /* broadcast address valid */ -#define IFF_DEBUG 0x4 /* turn on debugging */ -#define IFF_LOOPBACK 0x8 /* is a loopback net */ -#define IFF_POINTOPOINT 0x10 /* interface is has p-p link */ -#define IFF_NOTRAILERS 0x20 /* avoid use of trailers */ -#define IFF_RUNNING 0x40 /* resources allocated */ -#define IFF_NOARP 0x80 /* no ARP protocol */ -#define IFF_PROMISC 0x100 /* receive all packets */ -#define IFF_ALLMULTI 0x200 /* receive all multicast packets*/ - -#define IFF_MASTER 0x400 /* master of a load balancer */ -#define IFF_SLAVE 0x800 /* slave of a load balancer */ - -#define IFF_MULTICAST 0x1000 /* Supports multicast */ - -#define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|IFF_MASTER|IFF_SLAVE|IFF_RUNNING) - -#define IFF_PORTSEL 0x2000 /* can set media type */ -#define IFF_AUTOMEDIA 0x4000 /* auto media select active */ -#define IFF_DYNAMIC 0x8000 /* dialup device with changing addresses*/ - -struct ifmap { - unsigned long mem_start; - unsigned long mem_end; - unsigned short base_addr; - unsigned char irq; - unsigned char dma; - unsigned char port; - /* 3 bytes spare */ -}; - -struct ifreq { -#define IFHWADDRLEN 6 -#define IFNAMSIZ 16 - union - { - char ifrn_name[IFNAMSIZ]; /* if name, e.g. "en0" */ - } ifr_ifrn; - union { - struct sockaddr ifru_addr; - struct sockaddr ifru_dstaddr; - struct sockaddr ifru_broadaddr; - struct sockaddr ifru_netmask; - struct sockaddr ifru_hwaddr; - short ifru_flags; - int ifru_ivalue; - int ifru_mtu; - struct ifmap ifru_map; - char ifru_slave[IFNAMSIZ]; /* Just fits the size */ - char ifru_newname[IFNAMSIZ]; - char* ifru_data; - } ifr_ifru; -}; - -#define ifr_name ifr_ifrn.ifrn_name /* interface name */ -#define ifr_hwaddr ifr_ifru.ifru_hwaddr /* MAC address */ -#define ifr_addr ifr_ifru.ifru_addr /* address */ -#define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-p lnk */ -#define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */ -#define ifr_netmask ifr_ifru.ifru_netmask /* interface net mask */ -#define ifr_flags ifr_ifru.ifru_flags /* flags */ -#define ifr_metric ifr_ifru.ifru_ivalue /* metric */ -#define ifr_mtu ifr_ifru.ifru_mtu /* mtu */ -#define ifr_map ifr_ifru.ifru_map /* device map */ -#define ifr_slave ifr_ifru.ifru_slave /* slave device */ -#define ifr_data ifr_ifru.ifru_data /* for use by interface */ -#define ifr_ifindex ifr_ifru.ifru_ivalue /* interface index */ -#define ifr_bandwidth ifr_ifru.ifru_ivalue /* link bandwidth */ -#define ifr_qlen ifr_ifru.ifru_ivalue /* Queue length */ -#define ifr_newname ifr_ifru.ifru_newname /* New name */ - -struct ifconf { - int ifc_len; /* size of buffer */ - union { - char * ifcu_buf; - struct ifreq *ifcu_req; - } ifc_ifcu; -}; - -#define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */ -#define ifc_req ifc_ifcu.ifcu_req /* array of structures */ - -unsigned int if_nametoindex (const char *ifname) __THROW; -char *if_indextoname (unsigned int ifindex, char *ifname) __THROW; - -struct if_nameindex { - unsigned int if_index; - char *if_name; -}; - -struct if_nameindex* if_nameindex(void) __THROW; -void if_freenameindex(struct if_nameindex* ptr) __THROW; - -#endif diff --git a/mdk-stage1/dietlibc/include/net/if_arp.h b/mdk-stage1/dietlibc/include/net/if_arp.h deleted file mode 100644 index b1054066a..000000000 --- a/mdk-stage1/dietlibc/include/net/if_arp.h +++ /dev/null @@ -1,113 +0,0 @@ -#ifndef _NET_IF_ARP_H -#define _NET_IF_ARP_H - -#include - -#define MAX_ADDR_LEN 7 - -/* ARP protocol HARDWARE identifiers. */ -#define ARPHRD_NETROM 0 /* from KA9Q: NET/ROM pseudo */ -#define ARPHRD_ETHER 1 /* Ethernet 10Mbps */ -#define ARPHRD_EETHER 2 /* Experimental Ethernet */ -#define ARPHRD_AX25 3 /* AX.25 Level 2 */ -#define ARPHRD_PRONET 4 /* PROnet token ring */ -#define ARPHRD_CHAOS 5 /* Chaosnet */ -#define ARPHRD_IEEE802 6 /* IEEE 802.2 Ethernet/TR/TB */ -#define ARPHRD_ARCNET 7 /* ARCnet */ -#define ARPHRD_APPLETLK 8 /* APPLEtalk */ -#define ARPHRD_DLCI 15 /* Frame Relay DLCI */ -#define ARPHRD_ATM 19 /* ATM */ -#define ARPHRD_METRICOM 23 /* Metricom STRIP (new IANA id) */ - -/* Dummy types for non ARP hardware */ -#define ARPHRD_SLIP 256 -#define ARPHRD_CSLIP 257 -#define ARPHRD_SLIP6 258 -#define ARPHRD_CSLIP6 259 -#define ARPHRD_RSRVD 260 /* Notional KISS type */ -#define ARPHRD_ADAPT 264 -#define ARPHRD_ROSE 270 -#define ARPHRD_X25 271 /* CCITT X.25 */ -#define ARPHRD_HWX25 272 /* Boards with X.25 in firmware */ -#define ARPHRD_PPP 512 -#define ARPHRD_CISCO 513 /* Cisco HDLC */ -#define ARPHRD_HDLC ARPHRD_CISCO -#define ARPHRD_LAPB 516 /* LAPB */ -#define ARPHRD_DDCMP 517 /* Digital's DDCMP protocol */ -#define ARPHRD_RAWHDLC 518 /* Raw HDLC */ - -#define ARPHRD_TUNNEL 768 /* IPIP tunnel */ -#define ARPHRD_TUNNEL6 769 /* IPIP6 tunnel */ -#define ARPHRD_FRAD 770 /* Frame Relay Access Device */ -#define ARPHRD_SKIP 771 /* SKIP vif */ -#define ARPHRD_LOOPBACK 772 /* Loopback device */ -#define ARPHRD_LOCALTLK 773 /* Localtalk device */ -#define ARPHRD_FDDI 774 /* Fiber Distributed Data Interface */ -#define ARPHRD_BIF 775 /* AP1000 BIF */ -#define ARPHRD_SIT 776 /* sit0 device - IPv6-in-IPv4 */ -#define ARPHRD_IPDDP 777 /* IP over DDP tunneller */ -#define ARPHRD_IPGRE 778 /* GRE over IP */ -#define ARPHRD_PIMREG 779 /* PIMSM register interface */ -#define ARPHRD_HIPPI 780 /* High Performance Parallel Interface */ -#define ARPHRD_ASH 781 /* Nexus 64Mbps Ash */ -#define ARPHRD_ECONET 782 /* Acorn Econet */ -#define ARPHRD_IRDA 783 /* Linux-IrDA */ -/* ARP works differently on different FC media .. so */ -#define ARPHRD_FCPP 784 /* Point to point fibrechannel */ -#define ARPHRD_FCAL 785 /* Fibrechannel arbitrated loop */ -#define ARPHRD_FCPL 786 /* Fibrechannel public loop */ -#define ARPHRD_FCFABRIC 787 /* Fibrechannel fabric */ - /* 787->799 reserved for fibrechannel media types */ -#define ARPHRD_IEEE802_TR 800 /* Magic type ident for TR */ -#define ARPHRD_IEEE80211 801 /* IEEE 802.11 */ - -#define ARPHRD_VOID 0xFFFF /* Void type, nothing is known */ - -/* ARP protocol opcodes. */ -#define ARPOP_REQUEST 1 /* ARP request */ -#define ARPOP_REPLY 2 /* ARP reply */ -#define ARPOP_RREQUEST 3 /* RARP request */ -#define ARPOP_RREPLY 4 /* RARP reply */ -#define ARPOP_InREQUEST 8 /* InARP request */ -#define ARPOP_InREPLY 9 /* InARP reply */ -#define ARPOP_NAK 10 /* (ATM)ARP NAK */ - - -/* ARP ioctl request. */ -struct arpreq { - struct sockaddr arp_pa; /* protocol address */ - struct sockaddr arp_ha; /* hardware address */ - int arp_flags; /* flags */ - struct sockaddr arp_netmask; /* netmask (only for proxy arps) */ - char arp_dev[16]; -}; - -struct arpreq_old { - struct sockaddr arp_pa; /* protocol address */ - struct sockaddr arp_ha; /* hardware address */ - int arp_flags; /* flags */ - struct sockaddr arp_netmask; /* netmask (only for proxy arps) */ -}; - -/* ARP Flag values. */ -#define ATF_COM 0x02 /* completed entry (ha valid) */ -#define ATF_PERM 0x04 /* permanent entry */ -#define ATF_PUBL 0x08 /* publish entry */ -#define ATF_USETRAILERS 0x10 /* has requested trailers */ -#define ATF_NETMASK 0x20 /* want to use a netmask (only - for proxy entries) */ -#define ATF_DONTPUB 0x40 /* don't answer this addresses */ - -/* - * This structure defines an ethernet arp header. - */ - -struct arphdr -{ - unsigned short ar_hrd; /* format of hardware address */ - unsigned short ar_pro; /* format of protocol address */ - unsigned char ar_hln; /* length of hardware address */ - unsigned char ar_pln; /* length of protocol address */ - unsigned short ar_op; /* ARP opcode (command) */ -}; -#endif diff --git a/mdk-stage1/dietlibc/include/net/if_ether.h b/mdk-stage1/dietlibc/include/net/if_ether.h deleted file mode 100644 index 7451a6dc6..000000000 --- a/mdk-stage1/dietlibc/include/net/if_ether.h +++ /dev/null @@ -1,74 +0,0 @@ -#ifndef _NET_IF_ETHER_H -#define _NET_IF_ETHER_H - -/* taken from */ - -#define ETH_ALEN 6 /* Octets in one ethernet addr */ -#define ETH_HLEN 14 /* Total octets in header. */ -#define ETH_ZLEN 60 /* Min. octets in frame sans FCS */ -#define ETH_DATA_LEN 1500 /* Max. octets in payload */ -#define ETH_FRAME_LEN 1514 /* Max. octets in frame sans FCS */ - -/* - * These are the defined Ethernet Protocol ID's. - */ - -#define ETH_P_LOOP 0x0060 /* Ethernet Loopback packet */ -#define ETH_P_PUP 0x0200 /* Xerox PUP packet */ -#define ETH_P_PUPAT 0x0201 /* Xerox PUP Addr Trans packet */ -#define ETH_P_IP 0x0800 /* Internet Protocol packet */ -#define ETH_P_X25 0x0805 /* CCITT X.25 */ -#define ETH_P_ARP 0x0806 /* Address Resolution packet */ -#define ETH_P_BPQ 0x08FF /* G8BPQ AX.25 Ethernet Packet [ NOT AN OFFICIALLY REGISTERED ID ] */ -#define ETH_P_IEEEPUP 0x0a00 /* Xerox IEEE802.3 PUP packet */ -#define ETH_P_IEEEPUPAT 0x0a01 /* Xerox IEEE802.3 PUP Addr Trans packet */ -#define ETH_P_DEC 0x6000 /* DEC Assigned proto */ -#define ETH_P_DNA_DL 0x6001 /* DEC DNA Dump/Load */ -#define ETH_P_DNA_RC 0x6002 /* DEC DNA Remote Console */ -#define ETH_P_DNA_RT 0x6003 /* DEC DNA Routing */ -#define ETH_P_LAT 0x6004 /* DEC LAT */ -#define ETH_P_DIAG 0x6005 /* DEC Diagnostics */ -#define ETH_P_CUST 0x6006 /* DEC Customer use */ -#define ETH_P_SCA 0x6007 /* DEC Systems Comms Arch */ -#define ETH_P_RARP 0x8035 /* Reverse Addr Res packet */ -#define ETH_P_ATALK 0x809B /* Appletalk DDP */ -#define ETH_P_AARP 0x80F3 /* Appletalk AARP */ -#define ETH_P_8021Q 0x8100 /* 802.1Q VLAN Extended Header */ -#define ETH_P_IPX 0x8137 /* IPX over DIX */ -#define ETH_P_IPV6 0x86DD /* IPv6 over bluebook */ -#define ETH_P_PPP_DISC 0x8863 /* PPPoE discovery messages */ -#define ETH_P_PPP_SES 0x8864 /* PPPoE session messages */ -#define ETH_P_ATMMPOA 0x884c /* MultiProtocol Over ATM */ -#define ETH_P_ATMFATE 0x8884 /* Frame-based ATM Transport over Ethernet */ - -/* - * Non DIX types. Won't clash for 1500 types. - */ - -#define ETH_P_802_3 0x0001 /* Dummy type for 802.3 frames */ -#define ETH_P_AX25 0x0002 /* Dummy protocol id for AX.25 */ -#define ETH_P_ALL 0x0003 /* Every packet (be careful!!!) */ -#define ETH_P_802_2 0x0004 /* 802.2 frames */ -#define ETH_P_SNAP 0x0005 /* Internal only */ -#define ETH_P_DDCMP 0x0006 /* DEC DDCMP: Internal only */ -#define ETH_P_WAN_PPP 0x0007 /* Dummy type for WAN PPP frames*/ -#define ETH_P_PPP_MP 0x0008 /* Dummy type for PPP MP frames */ -#define ETH_P_LOCALTALK 0x0009 /* Localtalk pseudo type */ -#define ETH_P_PPPTALK 0x0010 /* Dummy type for Atalk over PPP*/ -#define ETH_P_TR_802_2 0x0011 /* 802.2 frames */ -#define ETH_P_MOBITEX 0x0015 /* Mobitex (kaz@cafe.net) */ -#define ETH_P_CONTROL 0x0016 /* Card specific control frames */ -#define ETH_P_IRDA 0x0017 /* Linux-IrDA */ -#define ETH_P_ECONET 0x0018 /* Acorn Econet */ - -/* - * This is an Ethernet frame header. - */ - -struct ethhdr { - unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ - unsigned char h_source[ETH_ALEN]; /* source ether addr */ - unsigned short h_proto; /* packet type ID field */ -}; - -#endif diff --git a/mdk-stage1/dietlibc/include/net/route.h b/mdk-stage1/dietlibc/include/net/route.h deleted file mode 100644 index 383bb8370..000000000 --- a/mdk-stage1/dietlibc/include/net/route.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef _NET_ROUTE_H -#define _NET_ROUTE_H - -#include -#include - -/* This structure gets passed by the SIOCADDRT and SIOCDELRT calls. */ -struct rtentry { - unsigned long rt_pad1; - struct sockaddr rt_dst; /* target address */ - struct sockaddr rt_gateway; /* gateway addr (RTF_GATEWAY) */ - struct sockaddr rt_genmask; /* target network mask (IP) */ - unsigned short rt_flags; - short rt_pad2; - unsigned long rt_pad3; - void *rt_pad4; - short rt_metric; /* +1 for binary compatibility! */ - char *rt_dev; /* forcing the device at add */ - unsigned long rt_mtu; /* per route MTU/Window */ -#ifndef __KERNEL__ -#define rt_mss rt_mtu /* Compatibility :-( */ -#endif - unsigned long rt_window; /* Window clamping */ - unsigned short rt_irtt; /* Initial RTT */ -}; - -#define RTF_UP 0x0001 /* route usable */ -#define RTF_GATEWAY 0x0002 /* destination is a gateway */ -#define RTF_HOST 0x0004 /* host entry (net otherwise) */ -#define RTF_REINSTATE 0x0008 /* reinstate route after tmout */ -#define RTF_DYNAMIC 0x0010 /* created dyn. (by redirect) */ -#define RTF_MODIFIED 0x0020 /* modified dyn. (by redirect) */ -#define RTF_MTU 0x0040 /* specific MTU for this route */ -#define RTF_MSS RTF_MTU /* Compatibility :-( */ -#define RTF_WINDOW 0x0080 /* per route window clamping */ -#define RTF_IRTT 0x0100 /* Initial round trip time */ -#define RTF_REJECT 0x0200 /* Reject route */ - -struct in6_rtmsg { - struct in6_addr rtmsg_dst; - struct in6_addr rtmsg_src; - struct in6_addr rtmsg_gateway; - uint32_t rtmsg_type; - uint16_t rtmsg_dst_len; - uint16_t rtmsg_src_len; - uint32_t rtmsg_metric; - unsigned long int rtmsg_info; - uint32_t rtmsg_flags; - int rtmsg_ifindex; -}; - -#endif diff --git a/mdk-stage1/dietlibc/include/netdb.h b/mdk-stage1/dietlibc/include/netdb.h deleted file mode 100644 index be64f659f..000000000 --- a/mdk-stage1/dietlibc/include/netdb.h +++ /dev/null @@ -1,124 +0,0 @@ -#ifndef _NETDB_H -#define _NETDB_H - -#include -#include - -/* Absolute file name for network data base files. */ -#define _PATH_HEQUIV "/etc/hosts.equiv" -#define _PATH_HOSTS "/etc/hosts" -#define _PATH_NETWORKS "/etc/networks" -#define _PATH_NSSWITCH_CONF "/etc/nsswitch.conf" -#define _PATH_PROTOCOLS "/etc/protocols" -#define _PATH_SERVICES "/etc/services" - -/* Description of data base entry for a single service. */ -struct servent { - char *s_name; /* Official service name. */ - char **s_aliases; /* Alias list. */ - int s_port; /* Port number. */ - char *s_proto; /* Protocol to use. */ -}; - -extern void endservent (void) __THROW; -extern void setservent(int stayopen) __THROW; - -extern int getservent_r(struct servent *res, char *buf, size_t buflen, - struct servent **res_sig) __THROW; -extern int getservbyname_r(const char* name,const char* proto, - struct servent *res, char *buf, size_t buflen, - struct servent **res_sig) __THROW; -extern int getservbyport_r(int port,const char* proto, - struct servent *res, char *buf, size_t buflen, - struct servent **res_sig) __THROW; - -extern struct servent *getservent(void) __THROW; -extern struct servent *getservbyname (const char *__name, - const char *__proto) __THROW; -extern struct servent *getservbyport (int __port, const char *__proto) - __THROW; - -struct hostent { - char *h_name; /* Official name of host. */ - char **h_aliases; /* Alias list. */ - int h_addrtype; /* Host address type. */ - socklen_t h_length; /* Length of address. */ - char **h_addr_list; /* List of addresses from name server. */ -#define h_addr h_addr_list[0] /* Address, for backward compatibility. */ -}; - -extern void endhostent (void) __THROW; -extern struct hostent *gethostent (void) __THROW; -extern struct hostent *gethostent_r (char* buf,int len) __THROW; -extern struct hostent *gethostbyaddr (const void *__addr, socklen_t __len, - int __type) __THROW; -extern struct hostent *gethostbyname (const char *__name) __THROW; -extern struct hostent *gethostbyname2 (const char *__name, int __af) __THROW; - -/* this glibc "invention" is so ugly, I'm going to throw up any minute - * now */ -extern int gethostbyname_r(const char* NAME, struct hostent* RESULT_BUF,char* BUF, - size_t BUFLEN, struct hostent** RESULT, - int* H_ERRNOP) __THROW; - -#define HOST_NOT_FOUND 1 -#define TRY_AGAIN 2 -#define NO_RECOVERY 3 -#define NO_ADDRESS 4 -#define NO_DATA 5 - -extern int gethostbyaddr_r(const char* addr, size_t length, int format, - struct hostent* result, char *buf, size_t buflen, - struct hostent **RESULT, int *h_errnop) __THROW; - -int gethostbyname2_r(const char* name, int AF, struct hostent* result, - char *buf, size_t buflen, - struct hostent **RESULT, int *h_errnop) __THROW; - -struct protoent { - char *p_name; /* official protocol name */ - char **p_aliases; /* alias list */ - int p_proto; /* protocol number */ -}; - -struct protoent *getprotoent(void) __THROW; -struct protoent *getprotobyname(const char *name) __THROW; -struct protoent *getprotobynumber(int proto) __THROW; -void setprotoent(int stayopen) __THROW; -void endprotoent(void) __THROW; - -int getprotoent_r(struct protoent *res, char *buf, size_t buflen, - struct protoent **res_sig) __THROW; -int getprotobyname_r(const char* name, - struct protoent *res, char *buf, size_t buflen, - struct protoent **res_sig) __THROW; -int getprotobynumber_r(int proto, - struct protoent *res, char *buf, size_t buflen, - struct protoent **res_sig) __THROW; - - -void sethostent(int stayopen) __THROW; - -/* dummy */ -extern int h_errno; - -struct netent { - char *n_name; /* official network name */ - char **n_aliases; /* alias list */ - int n_addrtype; /* net address type */ - unsigned long int n_net; /* network number */ -}; - -struct netent *getnetbyaddr(unsigned long net, int type) __THROW; -void endnetent(void) __THROW; -void setnetent(int stayopen) __THROW; -struct netent *getnetbyname(const char *name) __THROW; -struct netent *getnetent(void) __THROW; - -extern const char *hstrerror (int err_num) __THROW; -void herror(const char *s) __THROW; - -#define NI_MAXHOST 1025 -#define NI_MAXSERV 32 - -#endif diff --git a/mdk-stage1/dietlibc/include/netinet/in.h b/mdk-stage1/dietlibc/include/netinet/in.h deleted file mode 100644 index 9f98cc050..000000000 --- a/mdk-stage1/dietlibc/include/netinet/in.h +++ /dev/null @@ -1,404 +0,0 @@ -#ifndef _NETINET_IN_H -#define _NETINET_IN_H - -#include -#include -#include - -/* Standard well-defined IP protocols. */ -enum { - IPPROTO_IP = 0, /* Dummy protocol for TCP */ -#define IPPROTO_IP IPPROTO_IP - IPPROTO_ICMP = 1, /* Internet Control Message Protocol */ -#define IPPROTO_ICMP IPPROTO_ICMP - IPPROTO_IGMP = 2, /* Internet Group Management Protocol */ -#define IPPROTO_IGMP IPPROTO_IGMP - IPPROTO_IPIP = 4, /* IPIP tunnels (older KA9Q tunnels use 94) */ -#define IPPROTO_IPIP IPPROTO_IPIP - IPPROTO_TCP = 6, /* Transmission Control Protocol */ -#define IPPROTO_TCP IPPROTO_TCP - IPPROTO_EGP = 8, /* Exterior Gateway Protocol */ -#define IPPROTO_EGP IPPROTO_EGP - IPPROTO_PUP = 12, /* PUP protocol */ -#define IPPROTO_PUP IPPROTO_PUP - IPPROTO_UDP = 17, /* User Datagram Protocol */ -#define IPPROTO_UDP IPPROTO_UDP - IPPROTO_IDP = 22, /* XNS IDP protocol */ -#define IPPROTO_IDP IPPROTO_IDP - IPPROTO_RSVP = 46, /* RSVP protocol */ -#define IPPROTO_RSVP IPPROTO_RSVP - IPPROTO_GRE = 47, /* Cisco GRE tunnels (rfc 1701,1702) */ -#define IPPROTO_GRE IPPROTO_GRE - IPPROTO_IPV6 = 41, /* IPv6-in-IPv4 tunnelling */ -#define IPPROTO_IPV6 IPPROTO_IPV6 - IPPROTO_PIM = 103, /* Protocol Independent Multicast */ -#define IPPROTO_PIM IPPROTO_PIM - IPPROTO_ESP = 50, /* Encapsulation Security Payload protocol */ -#define IPPROTO_ESP IPPROTO_ESP - IPPROTO_AH = 51, /* Authentication Header protocol */ -#define IPPROTO_AH IPPROTO_AH - IPPROTO_COMP = 108, /* Compression Header protocol */ -#define IPPROTO_COMP IPPROTO_COMP - IPPROTO_RAW = 255, /* Raw IP packets */ -#define IPPROTO_RAW IPPROTO_RAW - IPPROTO_MAX -}; - -#define IP_TOS 1 -#define IP_TTL 2 -#define IP_HDRINCL 3 -#define IP_OPTIONS 4 -#define IP_ROUTER_ALERT 5 -#define IP_RECVOPTS 6 -#define IP_RETOPTS 7 -#define IP_PKTINFO 8 -#define IP_PKTOPTIONS 9 -#define IP_MTU_DISCOVER 10 -#define IP_RECVERR 11 -#define IP_RECVTTL 12 -#define IP_RECVTOS 13 -#define IP_MTU 14 -#define IP_FREEBIND 15 - -/* BSD compatibility */ -#define IP_RECVRETOPTS IP_RETOPTS - -/* IP_MTU_DISCOVER values */ -#define IP_PMTUDISC_DONT 0 /* Never send DF frames */ -#define IP_PMTUDISC_WANT 1 /* Use per route hints */ -#define IP_PMTUDISC_DO 2 /* Always DF */ - -#define IP_MULTICAST_IF 32 -#define IP_MULTICAST_TTL 33 -#define IP_MULTICAST_LOOP 34 -#define IP_ADD_MEMBERSHIP 35 -#define IP_DROP_MEMBERSHIP 36 - -/* These need to appear somewhere around here */ -#define IP_DEFAULT_MULTICAST_TTL 1 -#define IP_DEFAULT_MULTICAST_LOOP 1 - -#define IN6ADDR_ANY_INIT {{{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }}} -#define IN6ADDR_LOOPBACK_INIT {{{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 }}} -extern const struct in6_addr in6addr_any; -extern const struct in6_addr in6addr_loopback; - -typedef uint16_t in_port_t; -typedef uint32_t in_addr_t; - -struct in_addr { - in_addr_t s_addr; -}; - -struct ip_mreq { - struct in_addr imr_multiaddr; /* IP multicast address of group */ - struct in_addr imr_interface; /* local IP address of interface */ -}; - -struct ip_mreqn { - struct in_addr imr_multiaddr; /* IP multicast address of group */ - struct in_addr imr_address; /* local IP address of interface */ - int imr_ifindex; /* Interface index */ -}; - -struct in_pktinfo { - int ipi_ifindex; - struct in_addr ipi_spec_dst; - struct in_addr ipi_addr; -}; - -/* Structure describing an Internet (IP) socket address. */ -#define __SOCK_SIZE__ 16 /* sizeof(struct sockaddr) */ -struct sockaddr_in { - sa_family_t sin_family; /* Address family */ - in_port_t sin_port; /* Port number */ - struct in_addr sin_addr; /* Internet address */ - /* Pad to size of `struct sockaddr'. */ - unsigned char sin_zero[__SOCK_SIZE__ - sizeof(short int) - - sizeof(unsigned short int) - sizeof(struct in_addr)]; -}; - - -/* - * Definitions of the bits in an Internet address integer. - * On subnets, host and network parts are found according - * to the subnet mask, not these masks. - */ -#define IN_CLASSA(a) ((((long int) (a)) & 0x80000000) == 0) -#define IN_CLASSA_NET 0xff000000 -#define IN_CLASSA_NSHIFT 24 -#define IN_CLASSA_HOST (0xffffffff & ~IN_CLASSA_NET) -#define IN_CLASSA_MAX 128 - -#define IN_CLASSB(a) ((((long int) (a)) & 0xc0000000) == 0x80000000) -#define IN_CLASSB_NET 0xffff0000 -#define IN_CLASSB_NSHIFT 16 -#define IN_CLASSB_HOST (0xffffffff & ~IN_CLASSB_NET) -#define IN_CLASSB_MAX 65536 - -#define IN_CLASSC(a) ((((long int) (a)) & 0xe0000000) == 0xc0000000) -#define IN_CLASSC_NET 0xffffff00 -#define IN_CLASSC_NSHIFT 8 -#define IN_CLASSC_HOST (0xffffffff & ~IN_CLASSC_NET) - -#define IN_CLASSD(a) ((((long int) (a)) & 0xf0000000) == 0xe0000000) -#define IN_MULTICAST(a) IN_CLASSD(a) -#define IN_MULTICAST_NET 0xF0000000 - -#define IN_EXPERIMENTAL(a) ((((long int) (a)) & 0xf0000000) == 0xf0000000) -#define IN_BADCLASS(a) IN_EXPERIMENTAL((a)) - -/* Address to accept any incoming messages. */ -#define INADDR_ANY ((unsigned long int) 0x00000000) - -/* Address to send to all hosts. */ -#define INADDR_BROADCAST ((unsigned long int) 0xffffffff) - -/* Address indicating an error return. */ -#define INADDR_NONE ((unsigned long int) 0xffffffff) - -/* Network number for local host loopback. */ -#define IN_LOOPBACKNET 127 - -/* Address to loopback in software to local host. */ -#define INADDR_LOOPBACK 0x7f000001 /* 127.0.0.1 */ -#define IN_LOOPBACK(a) ((((long int) (a)) & 0xff000000) == 0x7f000000) - -/* Defines for Multicast INADDR */ -#define INADDR_UNSPEC_GROUP 0xe0000000U /* 224.0.0.0 */ -#define INADDR_ALLHOSTS_GROUP 0xe0000001U /* 224.0.0.1 */ -#define INADDR_ALLRTRS_GROUP 0xe0000002U /* 224.0.0.2 */ -#define INADDR_MAX_LOCAL_GROUP 0xe00000ffU /* 224.0.0.255 */ - -struct in6_addr { - union { - uint8_t u6_addr8[16]; - uint16_t u6_addr16[8]; - uint32_t u6_addr32[4]; - } in6_u; -#define s6_addr in6_u.u6_addr8 -#define s6_addr16 in6_u.u6_addr16 -#define s6_addr32 in6_u.u6_addr32 -}; - -struct sockaddr_in6 { - unsigned short int sin6_family; /* AF_INET6 */ - uint16_t sin6_port; /* Transport layer port # */ - uint32_t sin6_flowinfo; /* IPv6 flow information */ - struct in6_addr sin6_addr; /* IPv6 address */ - uint32_t sin6_scope_id; /* scope id (new in RFC2553) */ -}; - -struct sockaddr_in_pad { - sa_family_t sin_family; /* Address family */ - in_port_t sin_port; /* Port number */ - struct in_addr sin_addr; /* Internet address */ - /* Pad to size of `struct sockaddr_in6'. */ - unsigned char sin_zero[sizeof(struct sockaddr_in6) - sizeof(short int) - - sizeof(unsigned short int) - sizeof(struct in_addr)]; -}; - -struct ipv6_mreq { - /* IPv6 multicast address of group */ - struct in6_addr ipv6mr_multiaddr; - /* local IPv6 address of interface */ - int ipv6mr_interface; -}; - -struct in6_flowlabel_req { - struct in6_addr flr_dst; - uint32_t flr_label; - uint8_t flr_action; - uint8_t flr_share; - uint16_t flr_flags; - uint16_t flr_expires; - uint16_t flr_linger; - uint32_t __flr_pad; - /* Options in format of IPV6_PKTOPTIONS */ -}; - -#define IPV6_FL_A_GET 0 -#define IPV6_FL_A_PUT 1 -#define IPV6_FL_A_RENEW 2 - -#define IPV6_FL_F_CREATE 1 -#define IPV6_FL_F_EXCL 2 - -#define IPV6_FL_S_NONE 0 -#define IPV6_FL_S_EXCL 1 -#define IPV6_FL_S_PROCESS 2 -#define IPV6_FL_S_USER 3 -#define IPV6_FL_S_ANY 255 - -#define IPV6_FLOWINFO_FLOWLABEL 0x000fffff -#define IPV6_FLOWINFO_PRIORITY 0x0ff00000 - -/* - * IPV6 extension headers - */ -#define IPPROTO_HOPOPTS 0 /* IPv6 hop-by-hop options */ -#define IPPROTO_ROUTING 43 /* IPv6 routing header */ -#define IPPROTO_FRAGMENT 44 /* IPv6 fragmentation header */ -#define IPPROTO_ICMPV6 58 /* ICMPv6 */ -#define IPPROTO_NONE 59 /* IPv6 no next header */ -#define IPPROTO_DSTOPTS 60 /* IPv6 destination options */ - -/* IPv6 TLV options. */ -#define IPV6_TLV_PAD0 0 -#define IPV6_TLV_PADN 1 -#define IPV6_TLV_ROUTERALERT 5 -#define IPV6_TLV_JUMBO 194 - -/* IPV6 socket options. */ -#define IPV6_ADDRFORM 1 -#define IPV6_PKTINFO 2 -#define IPV6_HOPOPTS 3 -#define IPV6_DSTOPTS 4 -#define IPV6_RTHDR 5 -#define IPV6_PKTOPTIONS 6 -#define IPV6_CHECKSUM 7 -#define IPV6_HOPLIMIT 8 -#define IPV6_NEXTHOP 9 -#define IPV6_AUTHHDR 10 -#define IPV6_FLOWINFO 11 - -#define IPV6_UNICAST_HOPS 16 -#define IPV6_MULTICAST_IF 17 -#define IPV6_MULTICAST_HOPS 18 -#define IPV6_MULTICAST_LOOP 19 -#define IPV6_ADD_MEMBERSHIP 20 -#define IPV6_DROP_MEMBERSHIP 21 -#define IPV6_ROUTER_ALERT 22 -#define IPV6_MTU_DISCOVER 23 -#define IPV6_MTU 24 -#define IPV6_RECVERR 25 - -/* IPV6_MTU_DISCOVER values */ -#define IPV6_PMTUDISC_DONT 0 -#define IPV6_PMTUDISC_WANT 1 -#define IPV6_PMTUDISC_DO 2 - -/* Flowlabel */ -#define IPV6_FLOWLABEL_MGR 32 -#define IPV6_FLOWINFO_SEND 33 - -#define IPV6_MIN_MTU 1280 - -struct in6_pktinfo { - struct in6_addr ipi6_addr; - int ipi6_ifindex; -}; - -struct in6_ifreq { - struct in6_addr ifr6_addr; - uint32_t ifr6_prefixlen; - int ifr6_ifindex; -}; - -#define IPV6_SRCRT_STRICT 0x01 /* this hop must be a neighbor */ -#define IPV6_SRCRT_TYPE_0 0 /* IPv6 type 0 Routing Header */ - -/* routing header */ -struct ipv6_rt_hdr { - uint8_t nexthdr; - uint8_t hdrlen; - uint8_t type; - uint8_t segments_left; - /* type specific data, variable length field */ -}; - -struct ipv6_opt_hdr { - uint8_t nexthdr; - uint8_t hdrlen; - /* TLV encoded option data follows. */ -}; - -#define ipv6_destopt_hdr ipv6_opt_hdr -#define ipv6_hopopt_hdr ipv6_opt_hdr - -/* routing header type 0 (used in cmsghdr struct) */ - -#ifndef __STRICT_ANSI__ -struct rt0_hdr { - struct ipv6_rt_hdr rt_hdr; - uint32_t bitmap; /* strict/loose bit map */ - struct in6_addr addr[0]; -#define rt0_type rt_hdr.type; -}; -#endif - -struct ipv6hdr { -#if __BYTE_ORDER == __LITTLE_ENDIAN - unsigned int flow_lbl:20, - priority:8, - version:4; -#else - unsigned int version:4, - priority:8, - flow_lbl:20; -#endif - - uint16_t payload_len; - uint8_t nexthdr; - uint8_t hop_limit; - - struct in6_addr saddr; - struct in6_addr daddr; -}; -/* fnord */ - -#define IPPORT_RESERVED 1024 -#define INET6_ADDRSTRLEN 46 - -#undef htonl -#undef htons -#undef ntohl -#undef ntohs -uint32_t htonl(uint32_t hostlong); -uint16_t htons(uint16_t hostshort); -uint32_t ntohl(uint32_t netlong); -uint16_t ntohs(uint16_t netshort); - -#define IN6_IS_ADDR_UNSPECIFIED(a) \ - (((__const uint32_t *) (a))[0] == 0 \ - && ((__const uint32_t *) (a))[1] == 0 \ - && ((__const uint32_t *) (a))[2] == 0 \ - && ((__const uint32_t *) (a))[3] == 0) - -#define IN6_IS_ADDR_LOOPBACK(a) \ - (((__const uint32_t *) (a))[0] == 0 \ - && ((__const uint32_t *) (a))[1] == 0 \ - && ((__const uint32_t *) (a))[2] == 0 \ - && ((__const uint32_t *) (a))[3] == htonl (1)) - -#define IN6_IS_ADDR_MULTICAST(a) (((__const uint8_t *) (a))[0] == 0xff) - -#define IN6_IS_ADDR_LINKLOCAL(a) \ - ((((__const uint32_t *) (a))[0] & htonl (0xffc00000)) \ - == htonl (0xfe800000)) - -#define IN6_IS_ADDR_SITELOCAL(a) \ - ((((__const uint32_t *) (a))[0] & htonl (0xffc00000)) \ - == htonl (0xfec00000)) - -#define IN6_IS_ADDR_V4MAPPED(a) \ - ((((__const uint32_t *) (a))[0] == 0) \ - && (((__const uint32_t *) (a))[1] == 0) \ - && (((__const uint32_t *) (a))[2] == htonl (0xffff))) - -#define IN6_IS_ADDR_V4COMPAT(a) \ - ((((__const uint32_t *) (a))[0] == 0) \ - && (((__const uint32_t *) (a))[1] == 0) \ - && (((__const uint32_t *) (a))[2] == 0) \ - && (ntohl (((__const uint32_t *) (a))[3]) > 1)) - -#define IN6_ARE_ADDR_EQUAL(a,b) \ - ((((__const uint32_t *) (a))[0] == ((__const uint32_t *) (b))[0]) \ - && (((__const uint32_t *) (a))[1] == ((__const uint32_t *) (b))[1]) \ - && (((__const uint32_t *) (a))[2] == ((__const uint32_t *) (b))[2]) \ - && (((__const uint32_t *) (a))[3] == ((__const uint32_t *) (b))[3])) - -/* old legacy bullshit */ -int bindresvport(int sd, struct sockaddr_in* sin); - -#endif diff --git a/mdk-stage1/dietlibc/include/netinet/in_systm.h b/mdk-stage1/dietlibc/include/netinet/in_systm.h deleted file mode 100644 index e69de29bb..000000000 diff --git a/mdk-stage1/dietlibc/include/netinet/ip.h b/mdk-stage1/dietlibc/include/netinet/ip.h deleted file mode 100644 index 4ebf21706..000000000 --- a/mdk-stage1/dietlibc/include/netinet/ip.h +++ /dev/null @@ -1,121 +0,0 @@ -#ifndef _NETINET_IP_H -#define _NETINET_IP_H - -#include -#include -#include - -#define IPVERSION 4 /* IP version number */ -#define IP_MAXPACKET 65535 /* maximum packet size */ - -#define IPTOS_TOS_MASK 0x1E -#define IPTOS_TOS(tos) ((tos)&IPTOS_TOS_MASK) -#define IPTOS_LOWDELAY 0x10 -#define IPTOS_THROUGHPUT 0x08 -#define IPTOS_RELIABILITY 0x04 -#define IPTOS_MINCOST 0x02 -#define IPTOS_LOWCOST IPTOS_MINCOST - -#define IPTOS_PREC_MASK 0xE0 -#define IPTOS_PREC(tos) ((tos)&IPTOS_PREC_MASK) -#define IPTOS_PREC_NETCONTROL 0xe0 -#define IPTOS_PREC_INTERNETCONTROL 0xc0 -#define IPTOS_PREC_CRITIC_ECP 0xa0 -#define IPTOS_PREC_FLASHOVERRIDE 0x80 -#define IPTOS_PREC_FLASH 0x60 -#define IPTOS_PREC_IMMEDIATE 0x40 -#define IPTOS_PREC_PRIORITY 0x20 -#define IPTOS_PREC_ROUTINE 0x00 - - -/* IP options */ -#define IPOPT_COPY 0x80 -#define IPOPT_CLASS_MASK 0x60 -#define IPOPT_NUMBER_MASK 0x1f - -#define IPOPT_COPIED(o) ((o)&IPOPT_COPY) -#define IPOPT_CLASS(o) ((o)&IPOPT_CLASS_MASK) -#define IPOPT_NUMBER(o) ((o)&IPOPT_NUMBER_MASK) - -#define IPOPT_CONTROL 0x00 -#define IPOPT_RESERVED1 0x20 -#define IPOPT_MEASUREMENT 0x40 -#define IPOPT_RESERVED2 0x60 - -#define IPOPT_END (0 |IPOPT_CONTROL) -#define IPOPT_NOOP (1 |IPOPT_CONTROL) -#define IPOPT_SEC (2 |IPOPT_CONTROL|IPOPT_COPY) -#define IPOPT_LSRR (3 |IPOPT_CONTROL|IPOPT_COPY) -#define IPOPT_TIMESTAMP (4 |IPOPT_MEASUREMENT) -#define IPOPT_RR (7 |IPOPT_CONTROL) -#define IPOPT_SID (8 |IPOPT_CONTROL|IPOPT_COPY) -#define IPOPT_SSRR (9 |IPOPT_CONTROL|IPOPT_COPY) -#define IPOPT_RA (20|IPOPT_CONTROL|IPOPT_COPY) - -#define IPVERSION 4 -#define MAXTTL 255 -#define IPDEFTTL 64 - -/* struct timestamp, struct route and MAX_ROUTES are removed. - - REASONS: it is clear that nobody used them because: - - MAX_ROUTES value was wrong. - - "struct route" was wrong. - - "struct timestamp" had fatally misaligned bitfields and was completely unusable. - */ - -#define IPOPT_OPTVAL 0 -#define IPOPT_OLEN 1 -#define IPOPT_OFFSET 2 -#define IPOPT_MINOFF 4 -#define MAX_IPOPTLEN 40 -#define IPOPT_NOP IPOPT_NOOP -#define IPOPT_EOL IPOPT_END -#define IPOPT_TS IPOPT_TIMESTAMP - -#define IPOPT_TS_TSONLY 0 /* timestamps only */ -#define IPOPT_TS_TSANDADDR 1 /* timestamps and addresses */ -#define IPOPT_TS_PRESPEC 3 /* specified modules only */ - -struct iphdr { /* size 20/0x14 */ -#if __BYTE_ORDER == __LITTLE_ENDIAN - unsigned int ihl:4, version:4; /* offset 0; version=ip version (4) */ -#else - unsigned int version:4, ihl:4; /* offset 0; ihl=ip header length, measured in words (5) */ -#endif - unsigned char tos; /* offset 1 */ - unsigned short tot_len; /* offset 2; total bytes in packet in network byte order */ - unsigned short id; /* offset 4 */ - unsigned short frag_off; /* offset 6 */ - unsigned char ttl; /* offset 8 */ - unsigned char protocol; /* offset 9; 1=ICMP, 6=TCP, 17=UDP (see netinet/in.h) */ - unsigned short check; /* offset 10/0xa */ - unsigned int saddr; /* offset 12/0xc */ - unsigned int daddr; /* offset 16/0x10 */ - /*The options start here. */ -}; - -struct ip { -#if __BYTE_ORDER == __LITTLE_ENDIAN - unsigned int ip_hl:4; /* header length */ - unsigned int ip_v:4; /* version */ -#endif -#if __BYTE_ORDER == __BIG_ENDIAN - unsigned int ip_v:4; /* version */ - unsigned int ip_hl:4; /* header length */ -#endif - unsigned char ip_tos; /* type of service */ - unsigned short ip_len; /* total length */ - unsigned short ip_id; /* identification */ - unsigned short ip_off; /* fragment offset field */ -#define IP_RF 0x8000 /* reserved fragment flag */ -#define IP_DF 0x4000 /* dont fragment flag */ -#define IP_MF 0x2000 /* more fragments flag */ -#define IP_OFFMASK 0x1fff /* mask for fragmenting bits */ - unsigned char ip_ttl; /* time to live */ - unsigned char ip_p; /* protocol */ - unsigned short ip_sum; /* checksum */ - struct in_addr ip_src, ip_dst; /* source and dest address */ -}; - -#endif diff --git a/mdk-stage1/dietlibc/include/netinet/ip_icmp.h b/mdk-stage1/dietlibc/include/netinet/ip_icmp.h deleted file mode 100644 index cf8e016f7..000000000 --- a/mdk-stage1/dietlibc/include/netinet/ip_icmp.h +++ /dev/null @@ -1,145 +0,0 @@ -#ifndef NETINET_IP_ICMP_H -#define NETINET_IP_ICMP_H - -#include -#include -#include - -struct icmphdr { - uint8_t type; /* message type */ - uint8_t code; /* type sub-code */ - uint16_t checksum; - union { - struct { - uint16_t id; - uint16_t sequence; - } echo; /* echo datagram */ - uint32_t gateway; /* gateway address */ - struct { - uint16_t __unused; - uint16_t mtu; - } frag; /* path mtu discovery */ - } un; -}; - -#define ICMP_ECHOREPLY 0 /* Echo Reply */ -#define ICMP_DEST_UNREACH 3 /* Destination Unreachable */ -#define ICMP_SOURCE_QUENCH 4 /* Source Quench */ -#define ICMP_REDIRECT 5 /* Redirect (change route) */ -#define ICMP_ECHO 8 /* Echo Request */ -#define ICMP_TIME_EXCEEDED 11 /* Time Exceeded */ -#define ICMP_PARAMETERPROB 12 /* Parameter Problem */ -#define ICMP_TIMESTAMP 13 /* Timestamp Request */ -#define ICMP_TIMESTAMPREPLY 14 /* Timestamp Reply */ -#define ICMP_INFO_REQUEST 15 /* Information Request */ -#define ICMP_INFO_REPLY 16 /* Information Reply */ -#define ICMP_ADDRESS 17 /* Address Mask Request */ -#define ICMP_ADDRESSREPLY 18 /* Address Mask Reply */ -#define NR_ICMP_TYPES 18 - - -/* Codes for UNREACH. */ -#define ICMP_NET_UNREACH 0 /* Network Unreachable */ -#define ICMP_HOST_UNREACH 1 /* Host Unreachable */ -#define ICMP_PROT_UNREACH 2 /* Protocol Unreachable */ -#define ICMP_PORT_UNREACH 3 /* Port Unreachable */ -#define ICMP_FRAG_NEEDED 4 /* Fragmentation Needed/DF set */ -#define ICMP_SR_FAILED 5 /* Source Route failed */ -#define ICMP_NET_UNKNOWN 6 -#define ICMP_HOST_UNKNOWN 7 -#define ICMP_HOST_ISOLATED 8 -#define ICMP_NET_ANO 9 -#define ICMP_HOST_ANO 10 -#define ICMP_NET_UNR_TOS 11 -#define ICMP_HOST_UNR_TOS 12 -#define ICMP_PKT_FILTERED 13 /* Packet filtered */ -#define ICMP_PREC_VIOLATION 14 /* Precedence violation */ -#define ICMP_PREC_CUTOFF 15 /* Precedence cut off */ -#define NR_ICMP_UNREACH 15 /* instead of hardcoding immediate value */ - -/* Codes for REDIRECT. */ -#define ICMP_REDIR_NET 0 /* Redirect Net */ -#define ICMP_REDIR_HOST 1 /* Redirect Host */ -#define ICMP_REDIR_NETTOS 2 /* Redirect Net for TOS */ -#define ICMP_REDIR_HOSTTOS 3 /* Redirect Host for TOS */ - -/* Codes for TIME_EXCEEDED. */ -#define ICMP_EXC_TTL 0 /* TTL count exceeded */ -#define ICMP_EXC_FRAGTIME 1 /* Fragment Reass time exceeded */ - -/* - * Lower bounds on packet lengths for various types. - * For the error advice packets must first insure that the - * packet is large enough to contain the returned ip header. - * Only then can we do the check to see if 64 bits of packet - * data have been returned, since we need to check the returned - * ip header length. - */ -#define ICMP_MINLEN 8 /* abs minimum */ -#define ICMP_TSLEN (8 + 3 * sizeof (n_time)) /* timestamp */ -#define ICMP_MASKLEN 12 /* address mask */ -#define ICMP_ADVLENMIN (8 + sizeof (struct ip) + 8) /* min */ -#ifndef _IP_VHL -#define ICMP_ADVLEN(p) (8 + ((p)->icmp_ip.ip_hl << 2) + 8) - /* N.B.: must separately check that ip_hl >= 5 */ -#else -#define ICMP_ADVLEN(p) (8 + (IP_VHL_HL((p)->icmp_ip.ip_vhl) << 2) + 8) - /* N.B.: must separately check that header length >= 5 */ -#endif - -/* Definition of type and code fields. */ -/* defined above: ICMP_ECHOREPLY, ICMP_REDIRECT, ICMP_ECHO */ -#define ICMP_UNREACH 3 /* dest unreachable, codes: */ -#define ICMP_SOURCEQUENCH 4 /* packet lost, slow down */ -#define ICMP_ROUTERADVERT 9 /* router advertisement */ -#define ICMP_ROUTERSOLICIT 10 /* router solicitation */ -#define ICMP_TIMXCEED 11 /* time exceeded, code: */ -#define ICMP_PARAMPROB 12 /* ip header bad */ -#define ICMP_TSTAMP 13 /* timestamp request */ -#define ICMP_TSTAMPREPLY 14 /* timestamp reply */ -#define ICMP_IREQ 15 /* information request */ -#define ICMP_IREQREPLY 16 /* information reply */ -#define ICMP_MASKREQ 17 /* address mask request */ -#define ICMP_MASKREPLY 18 /* address mask reply */ - -#define ICMP_MAXTYPE 18 - -/* UNREACH codes */ -#define ICMP_UNREACH_NET 0 /* bad net */ -#define ICMP_UNREACH_HOST 1 /* bad host */ -#define ICMP_UNREACH_PROTOCOL 2 /* bad protocol */ -#define ICMP_UNREACH_PORT 3 /* bad port */ -#define ICMP_UNREACH_NEEDFRAG 4 /* IP_DF caused drop */ -#define ICMP_UNREACH_SRCFAIL 5 /* src route failed */ -#define ICMP_UNREACH_NET_UNKNOWN 6 /* unknown net */ -#define ICMP_UNREACH_HOST_UNKNOWN 7 /* unknown host */ -#define ICMP_UNREACH_ISOLATED 8 /* src host isolated */ -#define ICMP_UNREACH_NET_PROHIB 9 /* net denied */ -#define ICMP_UNREACH_HOST_PROHIB 10 /* host denied */ -#define ICMP_UNREACH_TOSNET 11 /* bad tos for net */ -#define ICMP_UNREACH_TOSHOST 12 /* bad tos for host */ -#define ICMP_UNREACH_FILTER_PROHIB 13 /* admin prohib */ -#define ICMP_UNREACH_HOST_PRECEDENCE 14 /* host prec vio. */ -#define ICMP_UNREACH_PRECEDENCE_CUTOFF 15 /* prec cutoff */ - -/* REDIRECT codes */ -#define ICMP_REDIRECT_NET 0 /* for network */ -#define ICMP_REDIRECT_HOST 1 /* for host */ -#define ICMP_REDIRECT_TOSNET 2 /* for tos and net */ -#define ICMP_REDIRECT_TOSHOST 3 /* for tos and host */ - -/* TIMEXCEED codes */ -#define ICMP_TIMXCEED_INTRANS 0 /* ttl==0 in transit */ -#define ICMP_TIMXCEED_REASS 1 /* ttl==0 in reass */ - -/* PARAMPROB code */ -#define ICMP_PARAMPROB_OPTABSENT 1 /* req. opt. absent */ - -#define ICMP_INFOTYPE(type) \ - ((type) == ICMP_ECHOREPLY || (type) == ICMP_ECHO || \ - (type) == ICMP_ROUTERADVERT || (type) == ICMP_ROUTERSOLICIT || \ - (type) == ICMP_TSTAMP || (type) == ICMP_TSTAMPREPLY || \ - (type) == ICMP_IREQ || (type) == ICMP_IREQREPLY || \ - (type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY) - -#endif diff --git a/mdk-stage1/dietlibc/include/netinet/tcp.h b/mdk-stage1/dietlibc/include/netinet/tcp.h deleted file mode 100644 index e47f24dff..000000000 --- a/mdk-stage1/dietlibc/include/netinet/tcp.h +++ /dev/null @@ -1,164 +0,0 @@ -#ifndef _NETINET_TCP_H -#define _NETINET_TCP_H - -#include -#include - -struct tcphdr { /* size 20/0x14 40/0x28 with IP header */ - uint16_t source; /* offset 0 20/0x14 */ - uint16_t dest; /* offset 2 22/0x16 */ - uint32_t seq; /* offset 4 24/0x18 */ - uint32_t ack_seq; /* offset 8 28/0x1c */ -#if __BYTE_ORDER == __LITTLE_ENDIAN - uint16_t res1:4, doff:4, fin:1, syn:1, rst:1, psh:1, ack:1, urg:1, ece:1, cwr:1; -#else - uint16_t doff:4, res1:4, cwr:1, ece:1, urg:1, ack:1, psh:1, rst:1, syn:1, fin:1; -#endif - /* offset 12/0xc 32/0x20 */ - uint16_t window; /* offset 14/0xe 34/0x22 */ - uint16_t check; /* offset 16/0x10 36/0x24 */ - uint16_t urg_ptr; /* offset 18/0x12 38/0x26 */ -}; - - -enum { - TCP_ESTABLISHED = 1, - TCP_SYN_SENT, - TCP_SYN_RECV, - TCP_FIN_WAIT1, - TCP_FIN_WAIT2, - TCP_TIME_WAIT, - TCP_CLOSE, - TCP_CLOSE_WAIT, - TCP_LAST_ACK, - TCP_LISTEN, - TCP_CLOSING, /* now a valid state */ - - TCP_MAX_STATES /* Leave at the end! */ -}; - -#define TCP_STATE_MASK 0xF -#define TCP_ACTION_FIN (1 << 7) - -enum { - TCPF_ESTABLISHED = (1 << 1), - TCPF_SYN_SENT = (1 << 2), - TCPF_SYN_RECV = (1 << 3), - TCPF_FIN_WAIT1 = (1 << 4), - TCPF_FIN_WAIT2 = (1 << 5), - TCPF_TIME_WAIT = (1 << 6), - TCPF_CLOSE = (1 << 7), - TCPF_CLOSE_WAIT = (1 << 8), - TCPF_LAST_ACK = (1 << 9), - TCPF_LISTEN = (1 << 10), - TCPF_CLOSING = (1 << 11) -}; - -/* - * The union cast uses a gcc extension to avoid aliasing problems - * (union is compatible to any of its members) - * This means this part of the code is -fstrict-aliasing safe now. - */ -union tcp_word_hdr { - struct tcphdr hdr; - uint32_t words[5]; -}; - -#define tcp_flag_word(tp) ( ((union tcp_word_hdr *)(tp))->words [3]) - -enum { -#if __BYTE_ORDER == __LITTLE_ENDIAN - TCP_FLAG_CWR = 0x00008000, - TCP_FLAG_ECE = 0x00004000, - TCP_FLAG_URG = 0x00002000, - TCP_FLAG_ACK = 0x00001000, - TCP_FLAG_PSH = 0x00000800, - TCP_FLAG_RST = 0x00000400, - TCP_FLAG_SYN = 0x00000200, - TCP_FLAG_FIN = 0x00000100, - TCP_RESERVED_BITS = 0x0000C00F, - TCP_DATA_OFFSET = 0x000000F0 -#else - TCP_FLAG_CWR = 0x00800000, - TCP_FLAG_ECE = 0x00400000, - TCP_FLAG_URG = 0x00200000, - TCP_FLAG_ACK = 0x00100000, - TCP_FLAG_PSH = 0x00080000, - TCP_FLAG_RST = 0x00040000, - TCP_FLAG_SYN = 0x00020000, - TCP_FLAG_FIN = 0x00010000, - TCP_RESERVED_BITS = 0x0FC00000, - TCP_DATA_OFFSET = 0xF0000000 -#endif -}; - -/* TCP socket options */ -#define TCP_NODELAY 1 /* Turn off Nagle's algorithm. */ -#define TCP_MAXSEG 2 /* Limit MSS */ -#define TCP_CORK 3 /* Never send partially complete segments */ -#define TCP_KEEPIDLE 4 /* Start keeplives after this period */ -#define TCP_KEEPINTVL 5 /* Interval between keepalives */ -#define TCP_KEEPCNT 6 /* Number of keepalives before death */ -#define TCP_SYNCNT 7 /* Number of SYN retransmits */ -#define TCP_LINGER2 8 /* Life time of orphaned FIN-WAIT-2 state */ -#define TCP_DEFER_ACCEPT 9 /* Wake up listener only when data arrive */ -#define TCP_WINDOW_CLAMP 10 /* Bound advertised window */ -#define TCP_INFO 11 /* Information about this connection. */ -#define TCP_QUICKACK 12 /* Block/reenable quick acks */ - -#define TCPI_OPT_TIMESTAMPS 1 -#define TCPI_OPT_SACK 2 -#define TCPI_OPT_WSCALE 4 -#define TCPI_OPT_ECN 8 - -enum tcp_ca_state { - TCP_CA_Open = 0, -#define TCPF_CA_Open (1< -#include - -struct udphdr { /* size 8 28/0x1c with IP header */ - uint16_t source; /* offset 0 20/0x14 */ - uint16_t dest; /* offset 2 22/0x16 */ - uint16_t len; /* offset 4 24/0x18 */ - uint16_t check; /* offset 6 26/0x1a */ -}; - -#define SOL_UDP 17 /* sockopt level for UDP */ - -#endif diff --git a/mdk-stage1/dietlibc/include/netpacket/packet.h b/mdk-stage1/dietlibc/include/netpacket/packet.h deleted file mode 100644 index b265094c6..000000000 --- a/mdk-stage1/dietlibc/include/netpacket/packet.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef __NETPACKET_PACKET_H -#define __NETPACKET_PACKET_H - -struct sockaddr_ll { - unsigned short int sll_family; - unsigned short int sll_protocol; - int sll_ifindex; - unsigned short int sll_hatype; - unsigned char sll_pkttype; - unsigned char sll_halen; - unsigned char sll_addr[8]; -}; - -#define PACKET_HOST 0 /* To us. */ -#define PACKET_BROADCAST 1 /* To all. */ -#define PACKET_MULTICAST 2 /* To group. */ -#define PACKET_OTHERHOST 3 /* To someone else. */ -#define PACKET_OUTGOING 4 /* Originated by us. */ -#define PACKET_LOOPBACK 5 -#define PACKET_FASTROUTE 6 - -/* Packet socket options. */ - -#define PACKET_ADD_MEMBERSHIP 1 -#define PACKET_DROP_MEMBERSHIP 2 -#define PACKET_RECV_OUTPUT 3 -#define PACKET_RX_RING 5 -#define PACKET_STATISTICS 6 - -struct packet_mreq { - int mr_ifindex; - unsigned short int mr_type; - unsigned short int mr_alen; - unsigned char mr_address[8]; -}; - -#define PACKET_MR_MULTICAST 0 -#define PACKET_MR_PROMISC 1 -#define PACKET_MR_ALLMULTI 2 - -#endif diff --git a/mdk-stage1/dietlibc/include/paths.h b/mdk-stage1/dietlibc/include/paths.h deleted file mode 100644 index 9073d267a..000000000 --- a/mdk-stage1/dietlibc/include/paths.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef _PATHS_H -#define _PATHS_H - -#define _PATH_BSHELL "/bin/sh" -#define _PATH_DEFPATH "/bin:/usr/bin:" - -#define _PATH_DEVNULL "/dev/null" - -#define _PATH_CONSOLE "/dev/console" -#define _PATH_MOUNTED "/etc/mtab" - -#define _PATH_PASSWD "/etc/passwd" -#define _PATH_GROUP "/etc/group" -#define _PATH_SHADOW "/etc/shadow" - -#define _PATH_SHELLS "/etc/shells" - -#define _PATH_VARRUN "/var/run/" - -/* puke */ -#define _PATH_MAILDIR "/var/mail" - -#endif diff --git a/mdk-stage1/dietlibc/include/pthread.h b/mdk-stage1/dietlibc/include/pthread.h deleted file mode 100644 index e243c0281..000000000 --- a/mdk-stage1/dietlibc/include/pthread.h +++ /dev/null @@ -1,244 +0,0 @@ -#ifndef _PTHREAD_H -#define _PTHREAD_H 1 - -#include -#include -#include - -#define PTHREAD_STACK_SIZE 16384 - -#define PTHREAD_THREADS_MAX 128 - -#define MAX_SPIN_COUNT 50 -#define SPIN_SLEEP_DURATION 2000001 - -#define PTHREAD_KEYS_MAX 7 -#define PTHREAD_DESTRUCTOR_ITERATIONS 10 - -typedef struct _pthread_descr_struct *_pthread_descr; -typedef int pthread_t; - -/* Fast locks */ -#ifdef __parisc__ -#define PTHREAD_SPIN_LOCKED 0 -#define PTHREAD_SPIN_UNLOCKED 1 -#else -#define PTHREAD_SPIN_LOCKED 1 -#define PTHREAD_SPIN_UNLOCKED 0 -#endif -struct _pthread_fastlock { - int __spinlock; -}; - -/* Mutexes */ -typedef struct { - struct _pthread_fastlock lock; - _pthread_descr owner; - int kind; - unsigned int count; -} pthread_mutex_t; - -enum { - PTHREAD_MUTEX_FAST_NP, - PTHREAD_MUTEX_RECURSIVE_NP, - PTHREAD_MUTEX_ERRORCHECK_NP, -}; - -enum -{ - PTHREAD_PROCESS_PRIVATE, -#define PTHREAD_PROCESS_PRIVATE PTHREAD_PROCESS_PRIVATE - PTHREAD_PROCESS_SHARED -#define PTHREAD_PROCESS_SHARED PTHREAD_PROCESS_SHARED -}; - -#define PTHREAD_MUTEX_INITIALIZER \ -{{PTHREAD_SPIN_UNLOCKED}, 0, PTHREAD_MUTEX_FAST_NP, 0} - -#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \ -{{PTHREAD_SPIN_UNLOCKED}, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0} - -#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \ -{{PTHREAD_SPIN_UNLOCKED}, 0, PTHREAD_MUTEX_ERRORCHECK_NP, 0} - -typedef struct { - int __mutexkind; -} pthread_mutexattr_t; - -int pthread_mutexattr_init(pthread_mutexattr_t *attr); -int pthread_mutexattr_destroy(pthread_mutexattr_t *attr); - -int pthread_mutexattr_getkind_np(const pthread_mutexattr_t *attr, int *kind); -int pthread_mutexattr_setkind_np(pthread_mutexattr_t *attr, int kind); - -int pthread_mutex_init(pthread_mutex_t *mutex, - const pthread_mutexattr_t *mutexattr); -int pthread_mutex_lock(pthread_mutex_t *mutex); -int pthread_mutex_unlock(pthread_mutex_t *mutex); -int pthread_mutex_trylock(pthread_mutex_t *mutex); -int pthread_mutex_destroy(pthread_mutex_t *mutex); - -/* Conditions */ -typedef void* pthread_condattr_t; - -typedef struct { - struct _pthread_fastlock lock; - _pthread_descr wait_chain; -} pthread_cond_t; - -#define PTHREAD_COND_INITIALIZER \ -{{PTHREAD_SPIN_UNLOCKED},0} - -int pthread_cond_init(pthread_cond_t *cond, pthread_condattr_t *cond_attr); -int pthread_cond_destroy(pthread_cond_t *cond); -int pthread_cond_signal(pthread_cond_t *cond); -int pthread_cond_broadcast(pthread_cond_t *cond); -int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, - const struct timespec *abstime); -int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex); - -/* only for completeness (always return NULL) */ -int pthread_condattr_init(pthread_condattr_t *attr); -int pthread_condattr_destroy(pthread_condattr_t *attr); -int pthread_condattr_getpshared(const pthread_condattr_t *attr, int *pshared); -int pthread_condattr_setpshared(pthread_condattr_t *attr, int pshared); - -/* thread specific variables */ -typedef unsigned int pthread_key_t; - -int pthread_key_create(pthread_key_t *key, void (*destructor)(const void*)); -int pthread_key_delete(pthread_key_t key); -int pthread_setspecific(pthread_key_t key, const void *value); -const void *pthread_getspecific(pthread_key_t key); - - -/* Attributes for threads. */ -typedef struct -{ - int __detachstate; - int __schedpolicy; - struct sched_param __schedparam; - int __inheritsched; - int __scope; - void * __stackaddr; - unsigned long __stacksize; -} pthread_attr_t; - -enum -{ - PTHREAD_CREATE_JOINABLE, -#define PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_JOINABLE - PTHREAD_CREATE_DETACHED -#define PTHREAD_CREATE_DETACHED PTHREAD_CREATE_DETACHED -}; - -enum -{ - PTHREAD_EXPLICIT_SCHED, -#define PTHREAD_EXPLICIT_SCHED PTHREAD_EXPLICIT_SCHED - PTHREAD_INHERIT_SCHED -#define PTHREAD_INHERIT_SCHED PTHREAD_INHERIT_SCHED -}; - -enum /* for completeness */ -{ - PTHREAD_SCOPE_SYSTEM, -#define PTHREAD_SCOPE_SYSTEM PTHREAD_SCOPE_SYSTEM - PTHREAD_SCOPE_PROCESS -#define PTHREAD_SCOPE_PROCESS PTHREAD_SCOPE_PROCESS -}; - -int pthread_attr_init(pthread_attr_t *attr); -int pthread_attr_destroy(pthread_attr_t *attr); - -int pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate); -int pthread_attr_getdetachstate(const pthread_attr_t *attr, int *detachstate); - -int pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy); -int pthread_attr_getschedpolicy(const pthread_attr_t *attr, int *policy); - -int pthread_attr_setschedparam(pthread_attr_t *attr, - const struct sched_param *param); -int pthread_attr_getschedparam(const pthread_attr_t *attr, - struct sched_param *param); - -int pthread_attr_setinheritsched(pthread_attr_t *attr, int inherit); -int pthread_attr_getinheritsched(const pthread_attr_t *attr, int *inherit); - -int pthread_attr_setscope(pthread_attr_t *attr, int scope); -int pthread_attr_getscope(const pthread_attr_t *attr, int *scope); - -int pthread_attr_setstackaddr(pthread_attr_t *attr, void *stack); -int pthread_attr_getstackaddr(pthread_attr_t *attr, void **stack); - -int pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize); -int pthread_attr_getstacksize(pthread_attr_t *attr, size_t *stacksize); - -int pthread_setschedparam(pthread_t target_thread, int policy, - const struct sched_param *param); -int pthread_getschedparam(pthread_t target_thread, int *policy, - struct sched_param *param); - -/* ONCE */ -typedef int pthread_once_t; -#define PTHREAD_ONCE_INIT PTHREAD_SPIN_UNLOCKED - -int __pthread_once(pthread_once_t* once_control, void (*init_routine)(void)); -int pthread_once(pthread_once_t* once_control, void (*init_routine)(void)); - -/* CANCEL */ - -enum { - PTHREAD_CANCEL_ENABLE, -#define PTHREAD_CANCEL_ENABLE PTHREAD_CANCEL_ENABLE - PTHREAD_CANCEL_DISABLE, -#define PTHREAD_CANCEL_DISABLE PTHREAD_CANCEL_DISABLE -}; - -enum { - PTHREAD_CANCEL_ASYNCHRONOUS, -#define PTHREAD_CANCEL_ASYNCHRONOUS PTHREAD_CANCEL_ASYNCHRONOUS - PTHREAD_CANCEL_DEFERRED, -#define PTHREAD_CANCEL_DEFERRED PTHREAD_CANCEL_DEFERRED -}; - -#define PTHREAD_CANCELED ((void *) -1) - -int pthread_cancel(pthread_t thread); -int pthread_setcancelstate(int state, int *oldstate); - -int pthread_setcanceltype(int type, int *oldtype); - -void pthread_testcancel(void); - -/* CLEANUP */ - -void pthread_cleanup_push(void (*routine)(void*), void *arg); -void pthread_cleanup_pop (int execute); - -void pthread_cleanup_push_defer_np(void (*routine)(void *), void *arg); -void pthread_cleanup_pop_restore_np(int execute); - -/* FORK */ - -pid_t pthread_atfork(void (*prepare)(void), void (*parent)(void), - void (*child)(void)); - -/* THREADS */ -int pthread_create (pthread_t *__threadarg, - const pthread_attr_t *__attr, - void *(*__start_routine) (void *), - void *__arg); - -void pthread_exit (void *__retval) __attribute__ ((__noreturn__)); - -int pthread_join (pthread_t __th, void **__thread_return); - -int pthread_detach (pthread_t __th); - -pthread_t pthread_self (void); -int pthread_equal (pthread_t __thread1, pthread_t __thread2); - -int pthread_sigmask(int how, const sigset_t*newset, sigset_t *oldset); - -#endif diff --git a/mdk-stage1/dietlibc/include/pty.h b/mdk-stage1/dietlibc/include/pty.h deleted file mode 100644 index fa53d9934..000000000 --- a/mdk-stage1/dietlibc/include/pty.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef _PTY_H -#define _PTY_H - -#include -#include - -/* Create pseudo tty master slave pair with NAME and set terminal - * attributes according to TERMP and WINP and return handles for both - * ends in AMASTER and ASLAVE. */ -extern int openpty (int *__amaster, int *__aslave, char *__name, struct - termios *__termp, struct winsize *__winp) __THROW; - -#endif diff --git a/mdk-stage1/dietlibc/include/pwd.h b/mdk-stage1/dietlibc/include/pwd.h deleted file mode 100644 index 8901a2d7f..000000000 --- a/mdk-stage1/dietlibc/include/pwd.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef _PWD_H -#define _PWD_H - -#include -#include -#include - -struct passwd { - char *pw_name; /* Username. */ - char *pw_passwd; /* Password. */ - uid_t pw_uid; /* User ID. */ - gid_t pw_gid; /* Group ID. */ - char *pw_gecos; /* Real name. */ - char *pw_dir; /* Home directory. */ - char *pw_shell; /* Shell program. */ -}; - -extern struct passwd *getpwuid (uid_t uid) __THROW; -extern struct passwd *getpwnam (const char *name) __THROW; - -extern struct passwd *getpwent(void) __THROW; -extern void setpwent(void) __THROW; -extern void endpwent(void) __THROW; -extern int putpwent(const struct passwd *p, FILE *stream) __THROW; - -int getpwent_r(struct passwd *res, char *buf, size_t buflen, - struct passwd **res_sig) __THROW; -int getpwnam_r(const char* name, - struct passwd *res, char *buf, size_t buflen, - struct passwd **res_sig) __THROW; -int getpwuid_r(uid_t uid, - struct passwd *res, char *buf, size_t buflen, - struct passwd **res_sig) __THROW; - -#endif diff --git a/mdk-stage1/dietlibc/include/regex.h b/mdk-stage1/dietlibc/include/regex.h deleted file mode 100644 index abc9ab57b..000000000 --- a/mdk-stage1/dietlibc/include/regex.h +++ /dev/null @@ -1,71 +0,0 @@ -#ifndef _REGEX_H -#define _REGEX_H - -#include -#include - -typedef ptrdiff_t regoff_t; - -typedef struct { - regoff_t rm_so; - regoff_t rm_eo; -} regmatch_t; - -#define REG_EXTENDED 1 -#define REG_ICASE 2 -#define REG_NOSUB 4 -#define REG_NEWLINE 8 - -#define REG_NOTBOL 1 -#define REG_NOTEOL 2 - -#define REG_NOMATCH -1 - -#define RE_DUP_MAX 255 - -struct __regex_t; - -typedef int (*matcher)(void*,const char*,int ofs,struct __regex_t *t,int plus,int eflags); - -typedef struct __regex_t { - struct regex { - matcher m; - void* next; - int pieces; - int num; - struct branch *b; - } r; - int brackets,cflags; - regmatch_t *l; -} regex_t; -#define re_nsub r.pieces - -int regcomp(regex_t *preg, const char *regex, int cflags) __THROW; -int regexec(const regex_t *preg, const char *string, size_t nmatch, regmatch_t pmatch[], int eflags) __THROW; -size_t regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size) __THROW; -void regfree(regex_t *preg) __THROW; - -enum __regex_errors { - REG_NOERROR, - REG_BADRPT, /* Invalid use of repetition operators such as using `*' as the first character. */ - REG_BADBR, /* Invalid use of back reference operator. */ - REG_EBRACE, /* Un-matched brace interval operators. */ - REG_EBRACK, /* Un-matched bracket list operators. */ - REG_ERANGE, /* Invalid use of the range operator, eg. the ending point of the - range occurs prior to the starting point. */ - REG_ECTYPE, /* Unknown character class name. */ - REG_ECOLLATE, /* Invalid collating element. */ - REG_EPAREN, /* Un-matched parenthesis group operators. */ - REG_ESUBREG, /* Invalid back reference to a subexpression. */ - REG_EEND, /* Non specific error. This is not defined by POSIX.2. */ - REG_EESCAPE, /* Trailing backslash. */ - REG_BADPAT, /* Invalid use of pattern operators such as group or list. */ - REG_ESIZE, /* Compiled regular expression requires a pattern buffer - larger than 64Kb. This is not defined by POSIX.2. */ - REG_ESPACE /* regcomp ran out of space */ -}; - -char * re_comp(char * regex); -int re_exec(char * string); - -#endif diff --git a/mdk-stage1/dietlibc/include/resolv.h b/mdk-stage1/dietlibc/include/resolv.h deleted file mode 100644 index dae226582..000000000 --- a/mdk-stage1/dietlibc/include/resolv.h +++ /dev/null @@ -1,124 +0,0 @@ -#ifndef _RESOLV_H -#define _RESOLV_H - -#include -#include -#include -#include - -#ifndef _PATH_RESCONF -#define _PATH_RESCONF "/etc/resolv.conf" -#endif - -/* - * Global defines and variables for resolver stub. - */ -#define MAXNS 8 /* max # name servers we'll track */ -#define MAXDFLSRCH 3 /* # default domain levels to try */ -#define MAXDNSRCH 6 /* max # domains in search path */ -#define LOCALDOMAINPARTS 2 /* min levels in name that is "local" */ - -#define RES_TIMEOUT 5 /* min. seconds between retries */ -#define MAXRESOLVSORT 10 /* number of net to sort on */ -#define RES_MAXNDOTS 15 /* should reflect bit field size */ - -struct res_state { - int retrans; /* retransmission time interval */ - int retry; /* number of times to retransmit */ - unsigned long options; /* option flags - see below. */ - int nscount; /* number of name servers */ - struct sockaddr_in_pad - nsaddr_list[MAXNS]; /* address of name server */ -#define nsaddr nsaddr_list[0] /* for backward compatibility */ - unsigned short id; /* current message id */ - char *dnsrch[MAXDNSRCH+1]; /* components of domain to search */ - char defdname[256]; /* default domain (deprecated) */ - unsigned long pfcode; /* RES_PRF_ flags - see below. */ - unsigned ndots:4; /* threshold for initial abs. query */ - unsigned nsort:4; /* number of elements in sort_list[] */ - char unused[3]; - struct { - struct in_addr addr; - uint32_t mask; - } sort_list[MAXRESOLVSORT]; - char pad[72]; /* on an i386 this means 512b total */ -}; - -/* - * Resolver options (keep these in synch with res_debug.c, please) - */ -#define RES_INIT 0x00000001 /* address initialized */ -#define RES_DEBUG 0x00000002 /* print debug messages */ -#define RES_AAONLY 0x00000004 /* authoritative answers only (!IMPL)*/ -#define RES_USEVC 0x00000008 /* use virtual circuit */ -#define RES_PRIMARY 0x00000010 /* query primary server only (!IMPL) */ -#define RES_IGNTC 0x00000020 /* ignore trucation errors */ -#define RES_RECURSE 0x00000040 /* recursion desired */ -#define RES_DEFNAMES 0x00000080 /* use default domain name */ -#define RES_STAYOPEN 0x00000100 /* Keep TCP socket open */ -#define RES_DNSRCH 0x00000200 /* search up local domain tree */ -#define RES_INSECURE1 0x00000400 /* type 1 security disabled */ -#define RES_INSECURE2 0x00000800 /* type 2 security disabled */ -#define RES_NOALIASES 0x00001000 /* shuts off HOSTALIASES feature */ -#define RES_USE_INET6 0x00002000 /* use/map IPv6 in gethostbyname() */ - -#define RES_DEFAULT (RES_RECURSE | RES_DEFNAMES | RES_DNSRCH) - -/* - * Resolver "pfcode" values. Used by dig. - */ -#define RES_PRF_STATS 0x00000001 -/* 0x00000002 */ -#define RES_PRF_CLASS 0x00000004 -#define RES_PRF_CMD 0x00000008 -#define RES_PRF_QUES 0x00000010 -#define RES_PRF_ANS 0x00000020 -#define RES_PRF_AUTH 0x00000040 -#define RES_PRF_ADD 0x00000080 -#define RES_PRF_HEAD1 0x00000100 -#define RES_PRF_HEAD2 0x00000200 -#define RES_PRF_TTLID 0x00000400 -#define RES_PRF_HEADX 0x00000800 -#define RES_PRF_QUERY 0x00001000 -#define RES_PRF_REPLY 0x00002000 -#define RES_PRF_INIT 0x00004000 -/* 0x00008000 */ - -struct res_sym { - int number; /* Identifying number, like T_MX */ - char * name; /* Its symbolic name, like "MX" */ - char * humanname; /* Its fun name, like "mail exchanger" */ -}; - -extern struct res_state _res; -extern const struct res_sym __p_class_syms[]; -extern const struct res_sym __p_type_syms[]; - -int res_init(void) __THROW; - -int res_query(const char *dname, int class, int type, - unsigned char *answer, int anslen) __THROW; - -int res_search(const char *dname, int class, int type, - unsigned char *answer, int anslen) __THROW; - -int res_querydomain(const char *name, const char *domain, - int class, int type, unsigned char *answer, - int anslen) __THROW; - -int res_mkquery(int op, const char *dname, int class, - int type, char *data, int datalen, const unsigned char* newrr, - char *buf, int buflen) __THROW; - -int res_send(const char *msg, int msglen, char *answer, - int anslen) __THROW; - -int dn_comp(unsigned char *msg, unsigned char *comp_dn, - int length, unsigned char **dnptrs, unsigned char *exp_dn, - unsigned char **lastdnptr) __THROW; - -int dn_expand(unsigned char *msg, unsigned char *eomorig, - unsigned char *comp_dn, unsigned char *exp_dn, - int length) __THROW; - -#endif diff --git a/mdk-stage1/dietlibc/include/rpc/auth.h b/mdk-stage1/dietlibc/include/rpc/auth.h deleted file mode 100644 index 6e0ae0675..000000000 --- a/mdk-stage1/dietlibc/include/rpc/auth.h +++ /dev/null @@ -1,214 +0,0 @@ -/* @(#)auth.h 2.3 88/08/07 4.0 RPCSRC; from 1.17 88/02/08 SMI */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ - -/* - * auth.h, Authentication interface. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - * - * The data structures are completely opaque to the client. The client - * is required to pass a AUTH * to routines that create rpc - * "sessions". - */ - -#ifndef _RPC_AUTH_H - -#define _RPC_AUTH_H 1 -#include -#include -#include - -__BEGIN_DECLS - -#define MAX_AUTH_BYTES 400 -#define MAXNETNAMELEN 255 /* maximum length of network user's name */ - -/* - * Status returned from authentication check - */ -enum auth_stat { - AUTH_OK=0, - /* - * failed at remote end - */ - AUTH_BADCRED=1, /* bogus credentials (seal broken) */ - AUTH_REJECTEDCRED=2, /* client should begin new session */ - AUTH_BADVERF=3, /* bogus verifier (seal broken) */ - AUTH_REJECTEDVERF=4, /* verifier expired or was replayed */ - AUTH_TOOWEAK=5, /* rejected due to security reasons */ - /* - * failed locally - */ - AUTH_INVALIDRESP=6, /* bogus response verifier */ - AUTH_FAILED=7 /* some unknown reason */ -}; - -union des_block { - struct { - uint32_t high; - uint32_t low; - } key; - char c[8]; -}; -typedef union des_block des_block; -extern bool_t xdr_des_block (XDR *__xdrs, des_block *__blkp) __THROW; - -/* - * Authentication info. Opaque to client. - */ -struct opaque_auth { - enum_t oa_flavor; /* flavor of auth */ - char* oa_base; /* address of more auth stuff */ - unsigned int oa_length; /* not to exceed MAX_AUTH_BYTES */ -}; - -/* - * Auth handle, interface to client side authenticators. - */ -typedef struct AUTH AUTH; -struct AUTH { - struct opaque_auth ah_cred; - struct opaque_auth ah_verf; - union des_block ah_key; - struct auth_ops { - void (*ah_nextverf) (AUTH *); - int (*ah_marshal) (AUTH *, XDR *); /* nextverf & serialize */ - int (*ah_validate) (AUTH *, struct opaque_auth *); - /* validate verifier */ - int (*ah_refresh) (AUTH *); /* refresh credentials */ - void (*ah_destroy) (AUTH *); /* destroy this structure */ - } *ah_ops; - char* ah_private; -}; - - -/* - * Authentication ops. - * The ops and the auth handle provide the interface to the authenticators. - * - * AUTH *auth; - * XDR *xdrs; - * struct opaque_auth verf; - */ -#define AUTH_NEXTVERF(auth) \ - ((*((auth)->ah_ops->ah_nextverf))(auth)) -#define auth_nextverf(auth) \ - ((*((auth)->ah_ops->ah_nextverf))(auth)) - -#define AUTH_MARSHALL(auth, xdrs) \ - ((*((auth)->ah_ops->ah_marshal))(auth, xdrs)) -#define auth_marshall(auth, xdrs) \ - ((*((auth)->ah_ops->ah_marshal))(auth, xdrs)) - -#define AUTH_VALIDATE(auth, verfp) \ - ((*((auth)->ah_ops->ah_validate))((auth), verfp)) -#define auth_validate(auth, verfp) \ - ((*((auth)->ah_ops->ah_validate))((auth), verfp)) - -#define AUTH_REFRESH(auth) \ - ((*((auth)->ah_ops->ah_refresh))(auth)) -#define auth_refresh(auth) \ - ((*((auth)->ah_ops->ah_refresh))(auth)) - -#define AUTH_DESTROY(auth) \ - ((*((auth)->ah_ops->ah_destroy))(auth)) -#define auth_destroy(auth) \ - ((*((auth)->ah_ops->ah_destroy))(auth)) - - -extern struct opaque_auth _null_auth; - - -/* - * These are the various implementations of client side authenticators. - */ - -/* - * Unix style authentication - * AUTH *authunix_create(machname, uid, gid, len, aup_gids) - * char *machname; - * int uid; - * int gid; - * int len; - * int *aup_gids; - */ -extern AUTH *authunix_create (char *__machname,uid_t __uid, gid_t __gid, - int __len, gid_t *__aup_gids) __THROW; -extern AUTH *authunix_create_default (void) __THROW; -extern AUTH *authnone_create (void) __THROW; -extern AUTH *authdes_create (const char *__servername, unsigned int __window, - struct sockaddr *__syncaddr, des_block *__ckey) - __THROW; -extern AUTH *authdes_pk_create (const char *, netobj *, unsigned int, - struct sockaddr *, des_block *) __THROW; - - -#define AUTH_NONE 0 /* no authentication */ -#define AUTH_NULL 0 /* backward compatibility */ -#define AUTH_SYS 1 /* unix style (uid, gids) */ -#define AUTH_UNIX AUTH_SYS -#define AUTH_SHORT 2 /* short hand unix style */ -#define AUTH_DES 3 /* des style (encrypted timestamps) */ -#define AUTH_DH AUTH_DES /* Diffie-Hellman (this is DES) */ -#define AUTH_KERB 4 /* kerberos style */ - -/* - * Netname manipulating functions - * - */ -extern int getnetname (char *) __THROW; -extern int host2netname (char *, const char *, const char *) __THROW; -extern int user2netname (char *, const uid_t, const char *) __THROW; -extern int netname2user (const char *, uid_t *, gid_t *, int *, gid_t *) - __THROW; -extern int netname2host (const char *, char *, const int) __THROW; - -/* - * - * These routines interface to the keyserv daemon - * - */ -extern int key_decryptsession (char *, des_block *) __THROW; -extern int key_decryptsession_pk (char *, netobj *, des_block *) __THROW; -extern int key_encryptsession (char *, des_block *) __THROW; -extern int key_encryptsession_pk (char *, netobj *, des_block *) __THROW; -extern int key_gendes (des_block *) __THROW; -extern int key_setsecret (char *) __THROW; -extern int key_secretkey_is_set (void) __THROW; -extern int key_get_conv (char *, des_block *) __THROW; - -/* - * XDR an opaque authentication struct. - */ -extern bool_t xdr_opaque_auth (XDR *, struct opaque_auth *) __THROW; - -__END_DECLS - -#endif /* rpc/auth.h */ diff --git a/mdk-stage1/dietlibc/include/rpc/auth_des.h b/mdk-stage1/dietlibc/include/rpc/auth_des.h deleted file mode 100644 index 8accd3779..000000000 --- a/mdk-stage1/dietlibc/include/rpc/auth_des.h +++ /dev/null @@ -1,112 +0,0 @@ -/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _RPC_AUTH_DES_H -#define _RPC_AUTH_DES_H 1 - -#include -#include - -__BEGIN_DECLS - -/* There are two kinds of "names": fullnames and nicknames */ -enum authdes_namekind - { - ADN_FULLNAME, - ADN_NICKNAME - }; - -/* A fullname contains the network name of the client, - a conversation key and the window */ -struct authdes_fullname - { - char *name; /* network name of client, up to MAXNETNAMELEN */ - des_block key; /* conversation key */ - uint32_t window; /* associated window */ - }; - -/* A credential */ -struct authdes_cred - { - enum authdes_namekind adc_namekind; - struct authdes_fullname adc_fullname; - uint32_t adc_nickname; - }; - -/* A timeval replacement for !32bit platforms */ -struct rpc_timeval - { - uint32_t tv_sec; /* Seconds. */ - uint32_t tv_usec; /* Microseconds. */ - }; - -/* A des authentication verifier */ -struct authdes_verf - { - union - { - struct rpc_timeval adv_ctime; /* clear time */ - des_block adv_xtime; /* crypt time */ - } - adv_time_u; - uint32_t adv_int_u; - }; - -/* des authentication verifier: client variety - - adv_timestamp is the current time. - adv_winverf is the credential window + 1. - Both are encrypted using the conversation key. */ -#define adv_timestamp adv_time_u.adv_ctime -#define adv_xtimestamp adv_time_u.adv_xtime -#define adv_winverf adv_int_u - -/* des authentication verifier: server variety - - adv_timeverf is the client's timestamp + client's window - adv_nickname is the server's nickname for the client. - adv_timeverf is encrypted using the conversation key. */ -#define adv_timeverf adv_time_u.adv_ctime -#define adv_xtimeverf adv_time_u.adv_xtime -#define adv_nickname adv_int_u - -/* Map a des credential into a unix cred. */ -extern int authdes_getucred (const struct authdes_cred * __adc, - uid_t * __uid, gid_t * __gid, - short *__grouplen, gid_t * __groups) __THROW; - -/* Get the public key for NAME and place it in KEY. NAME can only be - up to MAXNETNAMELEN bytes long and the destination buffer KEY should - have HEXKEYBYTES + 1 bytes long to fit all characters from the key. */ -extern int getpublickey (const char *__name, char *__key) __THROW; - -/* Get the secret key for NAME and place it in KEY. PASSWD is used to - decrypt the encrypted key stored in the database. NAME can only be - up to MAXNETNAMELEN bytes long and the destination buffer KEY - should have HEXKEYBYTES + 1 bytes long to fit all characters from - the key. */ -extern int getsecretkey (const char *__name, char *__key, - const char *__passwd) __THROW; - -extern int rtime (struct sockaddr_in *__addrp, struct rpc_timeval *__timep, - struct rpc_timeval *__timeout) __THROW; - -__END_DECLS - - -#endif /* rpc/auth_des.h */ diff --git a/mdk-stage1/dietlibc/include/rpc/auth_unix.h b/mdk-stage1/dietlibc/include/rpc/auth_unix.h deleted file mode 100644 index 9dd8142f1..000000000 --- a/mdk-stage1/dietlibc/include/rpc/auth_unix.h +++ /dev/null @@ -1,90 +0,0 @@ -/* @(#)auth_unix.h 2.2 88/07/29 4.0 RPCSRC; from 1.8 88/02/08 SMI */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ -/* @(#)auth_unix.h 1.5 86/07/16 SMI */ - -/* - * auth_unix.h, Protocol for UNIX style authentication parameters for RPC - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -/* - * The system is very weak. The client uses no encryption for it - * credentials and only sends null verifiers. The server sends backs - * null verifiers or optionally a verifier that suggests a new short hand - * for the credentials. - */ - -#ifndef _RPC_AUTH_UNIX_H -#define _RPC_AUTH_UNIX_H 1 - -#include -#include -#include -#include -#include - -__BEGIN_DECLS - -/* The machine name is part of a credential; it may not exceed 255 bytes */ -#define MAX_MACHINE_NAME 255 - -/* gids compose part of a credential; there may not be more than 16 of them */ -#define NGRPS 16 - -/* - * Unix style credentials. - */ -struct authunix_parms - { - unsigned long aup_time; - char *aup_machname; - uid_t aup_uid; - gid_t aup_gid; - unsigned int aup_len; - gid_t *aup_gids; - }; - -extern bool_t xdr_authunix_parms (XDR *__xdrs, struct authunix_parms *__p) - __THROW; - -/* - * If a response verifier has flavor AUTH_SHORT, - * then the body of the response verifier encapsulates the following structure; - * again it is serialized in the obvious fashion. - */ -struct short_hand_verf - { - struct opaque_auth new_cred; - }; - -__END_DECLS - -#endif /* rpc/auth_unix.h */ diff --git a/mdk-stage1/dietlibc/include/rpc/clnt.h b/mdk-stage1/dietlibc/include/rpc/clnt.h deleted file mode 100644 index 9b100556c..000000000 --- a/mdk-stage1/dietlibc/include/rpc/clnt.h +++ /dev/null @@ -1,421 +0,0 @@ -/* @(#)clnt.h 2.1 88/07/29 4.0 RPCSRC; from 1.31 88/02/08 SMI*/ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ - -/* - * clnt.h - Client side remote procedure call interface. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -#ifndef _RPC_CLNT_H -#define _RPC_CLNT_H 1 - -#include -#include -#include -#include -#include - -__BEGIN_DECLS - -/* - * Rpc calls return an enum clnt_stat. This should be looked at more, - * since each implementation is required to live with this (implementation - * independent) list of errors. - */ -enum clnt_stat { - RPC_SUCCESS=0, /* call succeeded */ - /* - * local errors - */ - RPC_CANTENCODEARGS=1, /* can't encode arguments */ - RPC_CANTDECODERES=2, /* can't decode results */ - RPC_CANTSEND=3, /* failure in sending call */ - RPC_CANTRECV=4, /* failure in receiving result */ - RPC_TIMEDOUT=5, /* call timed out */ - /* - * remote errors - */ - RPC_VERSMISMATCH=6, /* rpc versions not compatible */ - RPC_AUTHERROR=7, /* authentication error */ - RPC_PROGUNAVAIL=8, /* program not available */ - RPC_PROGVERSMISMATCH=9, /* program version mismatched */ - RPC_PROCUNAVAIL=10, /* procedure unavailable */ - RPC_CANTDECODEARGS=11, /* decode arguments error */ - RPC_SYSTEMERROR=12, /* generic "other problem" */ - RPC_NOBROADCAST = 21, /* Broadcasting not supported */ - /* - * callrpc & clnt_create errors - */ - RPC_UNKNOWNHOST=13, /* unknown host name */ - RPC_UNKNOWNPROTO=17, /* unknown protocol */ - RPC_UNKNOWNADDR = 19, /* Remote address unknown */ - - /* - * rpcbind errors - */ - RPC_RPCBFAILURE=14, /* portmapper failed in its call */ -#define RPC_PMAPFAILURE RPC_RPCBFAILURE - RPC_PROGNOTREGISTERED=15, /* remote program is not registered */ - RPC_N2AXLATEFAILURE = 22, /* Name to addr translation failed */ - /* - * unspecified error - */ - RPC_FAILED=16, - RPC_INTR=18, - RPC_TLIERROR=20, - RPC_UDERROR=23, - /* - * asynchronous errors - */ - RPC_INPROGRESS = 24, - RPC_STALERACHANDLE = 25 -}; - - -/* - * Error info. - */ -struct rpc_err { - enum clnt_stat re_status; - union { - int RE_errno; /* related system error */ - enum auth_stat RE_why; /* why the auth error occurred */ - struct { - unsigned long low; /* lowest verion supported */ - unsigned long high; /* highest verion supported */ - } RE_vers; - struct { /* maybe meaningful if RPC_FAILED */ - long s1; - long s2; - } RE_lb; /* life boot & debugging only */ - } ru; -#define re_errno ru.RE_errno -#define re_why ru.RE_why -#define re_vers ru.RE_vers -#define re_lb ru.RE_lb -}; - - -/* - * Client rpc handle. - * Created by individual implementations, see e.g. rpc_udp.c. - * Client is responsible for initializing auth, see e.g. auth_none.c. - */ -typedef struct CLIENT CLIENT; -struct CLIENT { - AUTH *cl_auth; /* authenticator */ - struct clnt_ops { - enum clnt_stat (*cl_call) (CLIENT *, unsigned long, xdrproc_t, char*, xdrproc_t, - char*, struct timeval); - /* call remote procedure */ - void (*cl_abort) (void); /* abort a call */ - void (*cl_geterr) (CLIENT *, struct rpc_err *); - /* get specific error code */ - bool_t (*cl_freeres) (CLIENT *, xdrproc_t, char*); - /* frees results */ - void (*cl_destroy) (CLIENT *); /* destroy this structure */ - bool_t (*cl_control) (CLIENT *, int, char *); - /* the ioctl() of rpc */ - } *cl_ops; - char* cl_private; /* private stuff */ -}; - - -/* - * client side rpc interface ops - * - * Parameter types are: - * - */ - -/* - * enum clnt_stat - * CLNT_CALL(rh, proc, xargs, argsp, xres, resp, timeout) - * CLIENT *rh; - * unsigned long proc; - * xdrproc_t xargs; - * char* argsp; - * xdrproc_t xres; - * char* resp; - * struct timeval timeout; - */ -#define CLNT_CALL(rh, proc, xargs, argsp, xres, resp, secs) \ - ((*(rh)->cl_ops->cl_call)(rh, proc, xargs, argsp, xres, resp, secs)) -#define clnt_call(rh, proc, xargs, argsp, xres, resp, secs) \ - ((*(rh)->cl_ops->cl_call)(rh, proc, xargs, argsp, xres, resp, secs)) - -/* - * void - * CLNT_ABORT(rh); - * CLIENT *rh; - */ -#define CLNT_ABORT(rh) ((*(rh)->cl_ops->cl_abort)(rh)) -#define clnt_abort(rh) ((*(rh)->cl_ops->cl_abort)(rh)) - -/* - * struct rpc_err - * CLNT_GETERR(rh); - * CLIENT *rh; - */ -#define CLNT_GETERR(rh,errp) ((*(rh)->cl_ops->cl_geterr)(rh, errp)) -#define clnt_geterr(rh,errp) ((*(rh)->cl_ops->cl_geterr)(rh, errp)) - - -/* - * bool_t - * CLNT_FREERES(rh, xres, resp); - * CLIENT *rh; - * xdrproc_t xres; - * char* resp; - */ -#define CLNT_FREERES(rh,xres,resp) ((*(rh)->cl_ops->cl_freeres)(rh,xres,resp)) -#define clnt_freeres(rh,xres,resp) ((*(rh)->cl_ops->cl_freeres)(rh,xres,resp)) - -/* - * bool_t - * CLNT_CONTROL(cl, request, info) - * CLIENT *cl; - * unsigned int request; - * char *info; - */ -#define CLNT_CONTROL(cl,rq,in) ((*(cl)->cl_ops->cl_control)(cl,rq,in)) -#define clnt_control(cl,rq,in) ((*(cl)->cl_ops->cl_control)(cl,rq,in)) - -/* - * control operations that apply to all transports - * - * Note: options marked XXX are no-ops in this implementation of RPC. - * The are present in TI-RPC but can't be implemented here since they - * depend on the presence of STREAMS/TLI, which we don't have. - */ -#define CLSET_TIMEOUT 1 /* set timeout (timeval) */ -#define CLGET_TIMEOUT 2 /* get timeout (timeval) */ -#define CLGET_SERVER_ADDR 3 /* get server's address (sockaddr) */ -#define CLGET_FD 6 /* get connections file descriptor */ -#define CLGET_SVC_ADDR 7 /* get server's address (netbuf) XXX */ -#define CLSET_FD_CLOSE 8 /* close fd while clnt_destroy */ -#define CLSET_FD_NCLOSE 9 /* Do not close fd while clnt_destroy*/ -#define CLGET_XID 10 /* Get xid */ -#define CLSET_XID 11 /* Set xid */ -#define CLGET_VERS 12 /* Get version number */ -#define CLSET_VERS 13 /* Set version number */ -#define CLGET_PROG 14 /* Get program number */ -#define CLSET_PROG 15 /* Set program number */ -#define CLSET_SVC_ADDR 16 /* get server's address (netbuf) XXX */ -#define CLSET_PUSH_TIMOD 17 /* push timod if not already present XXX */ -#define CLSET_POP_TIMOD 18 /* pop timod XXX */ -/* - * Connectionless only control operations - */ -#define CLSET_RETRY_TIMEOUT 4 /* set retry timeout (timeval) */ -#define CLGET_RETRY_TIMEOUT 5 /* get retry timeout (timeval) */ - -/* - * void - * CLNT_DESTROY(rh); - * CLIENT *rh; - */ -#define CLNT_DESTROY(rh) ((*(rh)->cl_ops->cl_destroy)(rh)) -#define clnt_destroy(rh) ((*(rh)->cl_ops->cl_destroy)(rh)) - - -/* - * RPCTEST is a test program which is accessible on every rpc - * transport/port. It is used for testing, performance evaluation, - * and network administration. - */ - -#define RPCTEST_PROGRAM ((unsigned long)1) -#define RPCTEST_VERSION ((unsigned long)1) -#define RPCTEST_NULL_PROC ((unsigned long)2) -#define RPCTEST_NULL_BATCH_PROC ((unsigned long)3) - -/* - * By convention, procedure 0 takes null arguments and returns them - */ - -#define NULLPROC ((unsigned long)0) - -/* - * Below are the client handle creation routines for the various - * implementations of client side rpc. They can return NULL if a - * creation failure occurs. - */ - -/* - * Memory based rpc (for speed check and testing) - * CLIENT * - * clntraw_create(prog, vers) - * unsigned long prog; - * unsigned long vers; - */ -extern CLIENT *clntraw_create (const unsigned long __prog, const unsigned long __vers) - __THROW; - - -/* - * Generic client creation routine. Supported protocols are "udp", "tcp" and - * "unix" - * CLIENT * - * clnt_create(host, prog, vers, prot) - * char *host; -- hostname - * unsigned long prog; -- program number - * u_ong vers; -- version number - * char *prot; -- protocol - */ -extern CLIENT *clnt_create (const char *__host, const unsigned long __prog, - const unsigned long __vers, const char *__prot) - __THROW; - - -/* - * TCP based rpc - * CLIENT * - * clnttcp_create(raddr, prog, vers, sockp, sendsz, recvsz) - * struct sockaddr_in *raddr; - * unsigned long prog; - * unsigned long version; - * register int *sockp; - * unsigned int sendsz; - * unsigned int recvsz; - */ -extern CLIENT *clnttcp_create (struct sockaddr_in *__raddr, unsigned long __prog, - unsigned long __version, int *__sockp, unsigned int __sendsz, - unsigned int __recvsz) __THROW; - -/* - * UDP based rpc. - * CLIENT * - * clntudp_create(raddr, program, version, wait, sockp) - * struct sockaddr_in *raddr; - * unsigned long program; - * unsigned long version; - * struct timeval wait_resend; - * int *sockp; - * - * Same as above, but you specify max packet sizes. - * CLIENT * - * clntudp_bufcreate(raddr, program, version, wait, sockp, sendsz, recvsz) - * struct sockaddr_in *raddr; - * unsigned long program; - * unsigned long version; - * struct timeval wait_resend; - * int *sockp; - * unsigned int sendsz; - * unsigned int recvsz; - */ -extern CLIENT *clntudp_create (struct sockaddr_in *__raddr, unsigned long __program, - unsigned long __version, struct timeval __wait_resend, - int *__sockp) __THROW; -extern CLIENT *clntudp_bufcreate (struct sockaddr_in *__raddr, - unsigned long __program, unsigned long __version, - struct timeval __wait_resend, int *__sockp, - unsigned int __sendsz, unsigned int __recvsz) __THROW; - - - - -/* - * AF_UNIX based rpc - * CLIENT * - * clntunix_create(raddr, prog, vers, sockp, sendsz, recvsz) - * struct sockaddr_un *raddr; - * unsigned long prog; - * unsigned long version; - * register int *sockp; - * unsigned int sendsz; - * unsigned int recvsz; - */ -extern CLIENT *clntunix_create (struct sockaddr_un *__raddr, unsigned long __program, - unsigned long __version, int *__sockp, - unsigned int __sendsz, unsigned int __recvsz) __THROW; - - -extern int callrpc (const char *__host, const unsigned long __prognum, - const unsigned long __versnum, const unsigned long __procnum, - const xdrproc_t __inproc, const char *__in, - const xdrproc_t __outproc, char *__out) __THROW; -extern int _rpc_dtablesize (void) __THROW; - -/* - * Print why creation failed - */ -extern void clnt_pcreateerror (const char *__msg) __THROW; /* stderr */ -extern char *clnt_spcreateerror(const char *__msg) __THROW; /* string */ - -/* - * Like clnt_perror(), but is more verbose in its output - */ -extern void clnt_perrno (enum clnt_stat __num) __THROW; /* stderr */ - -/* - * Print an English error message, given the client error code - */ -extern void clnt_perror (CLIENT *__clnt, const char *__msg) __THROW; - /* stderr */ -extern char *clnt_sperror (CLIENT *__clnt, const char *__msg) __THROW; - /* string */ - -/* - * If a creation fails, the following allows the user to figure out why. - */ -struct rpc_createerr { - enum clnt_stat cf_stat; - struct rpc_err cf_error; /* useful when cf_stat == RPC_PMAPFAILURE */ -}; - -extern struct rpc_createerr rpc_createerr; - - - -/* - * Copy error message to buffer. - */ -extern char *clnt_sperrno (enum clnt_stat __num) __THROW; /* string */ - -/* - * get the port number on the host for the rpc program,version and proto - */ -extern int getrpcport (const char * __host, unsigned long __prognum, - unsigned long __versnum, unsigned int proto) __THROW; - -/* - * get the local host's IP address without consulting - * name service library functions - */ -extern void get_myaddress (struct sockaddr_in *) __THROW; - -#define UDPMSGSIZE 8800 /* rpc imposed limit on udp msg size */ -#define RPCSMALLMSGSIZE 400 /* a more reasonable packet size */ - -__END_DECLS - -#endif /* rpc/clnt.h */ diff --git a/mdk-stage1/dietlibc/include/rpc/des_crypt.h b/mdk-stage1/dietlibc/include/rpc/des_crypt.h deleted file mode 100644 index 6a65887d3..000000000 --- a/mdk-stage1/dietlibc/include/rpc/des_crypt.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - * @(#)des_crypt.h 2.1 88/08/11 4.0 RPCSRC; from 1.4 88/02/08 (C) 1986 SMI - * - * des_crypt.h, des library routine interface - * Copyright (C) 1986, Sun Microsystems, Inc. - */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ - -#ifndef __DES_CRYPT_H__ -#define __DES_CRYPT_H__ 1 - -#include - -__BEGIN_DECLS - -#define DES_MAXDATA 8192 /* max bytes encrypted in one call */ -#define DES_DIRMASK (1 << 0) -#define DES_ENCRYPT (0*DES_DIRMASK) /* Encrypt */ -#define DES_DECRYPT (1*DES_DIRMASK) /* Decrypt */ - - -#define DES_DEVMASK (1 << 1) -#define DES_HW (0*DES_DEVMASK) /* Use hardware device */ -#define DES_SW (1*DES_DEVMASK) /* Use software device */ - - -#define DESERR_NONE 0 /* succeeded */ -#define DESERR_NOHWDEVICE 1 /* succeeded, but hw device not available */ -#define DESERR_HWERROR 2 /* failed, hardware/driver error */ -#define DESERR_BADPARAM 3 /* failed, bad parameter to call */ - -#define DES_FAILED(err) \ - ((err) > DESERR_NOHWDEVICE) - -/* - * cbc_crypt() - * ecb_crypt() - * - * Encrypt (or decrypt) len bytes of a buffer buf. - * The length must be a multiple of eight. - * The key should have odd parity in the low bit of each byte. - * ivec is the input vector, and is updated to the new one (cbc only). - * The mode is created by oring together the appropriate parameters. - * DESERR_NOHWDEVICE is returned if DES_HW was specified but - * there was no hardware to do it on (the data will still be - * encrypted though, in software). - */ - - -/* - * Cipher Block Chaining mode - */ -extern int cbc_crypt (char *__key, char *__buf, unsigned __len, - unsigned __mode, char *__ivec) __THROW; - -/* - * Electronic Code Book mode - */ -extern int ecb_crypt (char *__key, char *__buf, unsigned __len, - unsigned __mode) __THROW; - -/* - * Set des parity for a key. - * DES parity is odd and in the low bit of each byte - */ -extern void des_setparity (char *__key) __THROW; - -__END_DECLS - -#endif diff --git a/mdk-stage1/dietlibc/include/rpc/key_prot.h b/mdk-stage1/dietlibc/include/rpc/key_prot.h deleted file mode 100644 index c398b82f8..000000000 --- a/mdk-stage1/dietlibc/include/rpc/key_prot.h +++ /dev/null @@ -1,346 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#ifndef _KEY_PROT_H_RPCGEN -#define _KEY_PROT_H_RPCGEN - -#include - -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ -#if 0 -#pragma ident "@(#)key_prot.x 1.7 94/04/29 SMI" -#endif -/* Copyright (c) 1990, 1991 Sun Microsystems, Inc. */ - -/* - * Compiled from key_prot.x using rpcgen. - * DO NOT EDIT THIS FILE! - * This is NOT source code! - */ -#define PROOT 3 -#define HEXMODULUS "d4a0ba0250b6fd2ec626e7efd637df76c716e22d0944b88b" -#define HEXKEYBYTES 48 -#define KEYSIZE 192 -#define KEYBYTES 24 -#define KEYCHECKSUMSIZE 16 - -enum keystatus { - KEY_SUCCESS = 0, - KEY_NOSECRET = 1, - KEY_UNKNOWN = 2, - KEY_SYSTEMERR = 3, -}; -typedef enum keystatus keystatus; -#ifdef __cplusplus -extern "C" bool_t xdr_keystatus(XDR *, keystatus*); -#elif __STDC__ -extern bool_t xdr_keystatus(XDR *, keystatus*); -#else /* Old Style C */ -bool_t xdr_keystatus(); -#endif /* Old Style C */ - - -typedef char keybuf[HEXKEYBYTES]; -#ifdef __cplusplus -extern "C" bool_t xdr_keybuf(XDR *, keybuf); -#elif __STDC__ -extern bool_t xdr_keybuf(XDR *, keybuf); -#else /* Old Style C */ -bool_t xdr_keybuf(); -#endif /* Old Style C */ - - -typedef char *netnamestr; -#ifdef __cplusplus -extern "C" bool_t xdr_netnamestr(XDR *, netnamestr*); -#elif __STDC__ -extern bool_t xdr_netnamestr(XDR *, netnamestr*); -#else /* Old Style C */ -bool_t xdr_netnamestr(); -#endif /* Old Style C */ - - -struct cryptkeyarg { - netnamestr remotename; - des_block deskey; -}; -typedef struct cryptkeyarg cryptkeyarg; -#ifdef __cplusplus -extern "C" bool_t xdr_cryptkeyarg(XDR *, cryptkeyarg*); -#elif __STDC__ -extern bool_t xdr_cryptkeyarg(XDR *, cryptkeyarg*); -#else /* Old Style C */ -bool_t xdr_cryptkeyarg(); -#endif /* Old Style C */ - - -struct cryptkeyarg2 { - netnamestr remotename; - netobj remotekey; - des_block deskey; -}; -typedef struct cryptkeyarg2 cryptkeyarg2; -#ifdef __cplusplus -extern "C" bool_t xdr_cryptkeyarg2(XDR *, cryptkeyarg2*); -#elif __STDC__ -extern bool_t xdr_cryptkeyarg2(XDR *, cryptkeyarg2*); -#else /* Old Style C */ -bool_t xdr_cryptkeyarg2(); -#endif /* Old Style C */ - - -struct cryptkeyres { - keystatus status; - union { - des_block deskey; - } cryptkeyres_u; -}; -typedef struct cryptkeyres cryptkeyres; -#ifdef __cplusplus -extern "C" bool_t xdr_cryptkeyres(XDR *, cryptkeyres*); -#elif __STDC__ -extern bool_t xdr_cryptkeyres(XDR *, cryptkeyres*); -#else /* Old Style C */ -bool_t xdr_cryptkeyres(); -#endif /* Old Style C */ - -#define MAXGIDS 16 - -struct unixcred { - unsigned int uid; - unsigned int gid; - struct { - unsigned int gids_len; - unsigned int *gids_val; - } gids; -}; -typedef struct unixcred unixcred; -#ifdef __cplusplus -extern "C" bool_t xdr_unixcred(XDR *, unixcred*); -#elif __STDC__ -extern bool_t xdr_unixcred(XDR *, unixcred*); -#else /* Old Style C */ -bool_t xdr_unixcred(); -#endif /* Old Style C */ - - -struct getcredres { - keystatus status; - union { - unixcred cred; - } getcredres_u; -}; -typedef struct getcredres getcredres; -#ifdef __cplusplus -extern "C" bool_t xdr_getcredres(XDR *, getcredres*); -#elif __STDC__ -extern bool_t xdr_getcredres(XDR *, getcredres*); -#else /* Old Style C */ -bool_t xdr_getcredres(); -#endif /* Old Style C */ - - -struct key_netstarg { - keybuf st_priv_key; - keybuf st_pub_key; - netnamestr st_netname; -}; -typedef struct key_netstarg key_netstarg; -#ifdef __cplusplus -extern "C" bool_t xdr_key_netstarg(XDR *, key_netstarg*); -#elif __STDC__ -extern bool_t xdr_key_netstarg(XDR *, key_netstarg*); -#else /* Old Style C */ -bool_t xdr_key_netstarg(); -#endif /* Old Style C */ - - -struct key_netstres { - keystatus status; - union { - key_netstarg knet; - } key_netstres_u; -}; -typedef struct key_netstres key_netstres; -#ifdef __cplusplus -extern "C" bool_t xdr_key_netstres(XDR *, key_netstres*); -#elif __STDC__ -extern bool_t xdr_key_netstres(XDR *, key_netstres*); -#else /* Old Style C */ -bool_t xdr_key_netstres(); -#endif /* Old Style C */ - - -#ifndef opaque -#define opaque char -#endif - - -#define KEY_PROG ((unsigned long)100029) -#define KEY_VERS ((unsigned long)1) - -#ifdef __cplusplus -#define KEY_SET ((unsigned long)1) -extern "C" keystatus * key_set_1(opaque *, CLIENT *); -extern "C" keystatus * key_set_1_svc(opaque *, struct svc_req *); -#define KEY_ENCRYPT ((unsigned long)2) -extern "C" cryptkeyres * key_encrypt_1(cryptkeyarg *, CLIENT *); -extern "C" cryptkeyres * key_encrypt_1_svc(cryptkeyarg *, struct svc_req *); -#define KEY_DECRYPT ((unsigned long)3) -extern "C" cryptkeyres * key_decrypt_1(cryptkeyarg *, CLIENT *); -extern "C" cryptkeyres * key_decrypt_1_svc(cryptkeyarg *, struct svc_req *); -#define KEY_GEN ((unsigned long)4) -extern "C" des_block * key_gen_1(void *, CLIENT *); -extern "C" des_block * key_gen_1_svc(void *, struct svc_req *); -#define KEY_GETCRED ((unsigned long)5) -extern "C" getcredres * key_getcred_1(netnamestr *, CLIENT *); -extern "C" getcredres * key_getcred_1_svc(netnamestr *, struct svc_req *); - -#elif __STDC__ -#define KEY_SET ((unsigned long)1) -extern keystatus * key_set_1(opaque *, CLIENT *); -extern keystatus * key_set_1_svc(opaque *, struct svc_req *); -#define KEY_ENCRYPT ((unsigned long)2) -extern cryptkeyres * key_encrypt_1(cryptkeyarg *, CLIENT *); -extern cryptkeyres * key_encrypt_1_svc(cryptkeyarg *, struct svc_req *); -#define KEY_DECRYPT ((unsigned long)3) -extern cryptkeyres * key_decrypt_1(cryptkeyarg *, CLIENT *); -extern cryptkeyres * key_decrypt_1_svc(cryptkeyarg *, struct svc_req *); -#define KEY_GEN ((unsigned long)4) -extern des_block * key_gen_1(void *, CLIENT *); -extern des_block * key_gen_1_svc(void *, struct svc_req *); -#define KEY_GETCRED ((unsigned long)5) -extern getcredres * key_getcred_1(netnamestr *, CLIENT *); -extern getcredres * key_getcred_1_svc(netnamestr *, struct svc_req *); - -#else /* Old Style C */ -#define KEY_SET ((unsigned long)1) -extern keystatus * key_set_1(); -extern keystatus * key_set_1_svc(); -#define KEY_ENCRYPT ((unsigned long)2) -extern cryptkeyres * key_encrypt_1(); -extern cryptkeyres * key_encrypt_1_svc(); -#define KEY_DECRYPT ((unsigned long)3) -extern cryptkeyres * key_decrypt_1(); -extern cryptkeyres * key_decrypt_1_svc(); -#define KEY_GEN ((unsigned long)4) -extern des_block * key_gen_1(); -extern des_block * key_gen_1_svc(); -#define KEY_GETCRED ((unsigned long)5) -extern getcredres * key_getcred_1(); -extern getcredres * key_getcred_1_svc(); -#endif /* Old Style C */ -#define KEY_VERS2 ((unsigned long)2) - -#ifdef __cplusplus -extern "C" keystatus * key_set_2(opaque *, CLIENT *); -extern "C" keystatus * key_set_2_svc(opaque *, struct svc_req *); -extern "C" cryptkeyres * key_encrypt_2(cryptkeyarg *, CLIENT *); -extern "C" cryptkeyres * key_encrypt_2_svc(cryptkeyarg *, struct svc_req *); -extern "C" cryptkeyres * key_decrypt_2(cryptkeyarg *, CLIENT *); -extern "C" cryptkeyres * key_decrypt_2_svc(cryptkeyarg *, struct svc_req *); -extern "C" des_block * key_gen_2(void *, CLIENT *); -extern "C" des_block * key_gen_2_svc(void *, struct svc_req *); -extern "C" getcredres * key_getcred_2(netnamestr *, CLIENT *); -extern "C" getcredres * key_getcred_2_svc(netnamestr *, struct svc_req *); -#define KEY_ENCRYPT_PK ((unsigned long)6) -extern "C" cryptkeyres * key_encrypt_pk_2(cryptkeyarg2 *, CLIENT *); -extern "C" cryptkeyres * key_encrypt_pk_2_svc(cryptkeyarg2 *, struct svc_req *); -#define KEY_DECRYPT_PK ((unsigned long)7) -extern "C" cryptkeyres * key_decrypt_pk_2(cryptkeyarg2 *, CLIENT *); -extern "C" cryptkeyres * key_decrypt_pk_2_svc(cryptkeyarg2 *, struct svc_req *); -#define KEY_NET_PUT ((unsigned long)8) -extern "C" keystatus * key_net_put_2(key_netstarg *, CLIENT *); -extern "C" keystatus * key_net_put_2_svc(key_netstarg *, struct svc_req *); -#define KEY_NET_GET ((unsigned long)9) -extern "C" key_netstres * key_net_get_2(void *, CLIENT *); -extern "C" key_netstres * key_net_get_2_svc(void *, struct svc_req *); -#define KEY_GET_CONV ((unsigned long)10) -extern "C" cryptkeyres * key_get_conv_2(opaque *, CLIENT *); -extern "C" cryptkeyres * key_get_conv_2_svc(opaque *, struct svc_req *); - -#elif __STDC__ -extern keystatus * key_set_2(opaque *, CLIENT *); -extern keystatus * key_set_2_svc(opaque *, struct svc_req *); -extern cryptkeyres * key_encrypt_2(cryptkeyarg *, CLIENT *); -extern cryptkeyres * key_encrypt_2_svc(cryptkeyarg *, struct svc_req *); -extern cryptkeyres * key_decrypt_2(cryptkeyarg *, CLIENT *); -extern cryptkeyres * key_decrypt_2_svc(cryptkeyarg *, struct svc_req *); -extern des_block * key_gen_2(void *, CLIENT *); -extern des_block * key_gen_2_svc(void *, struct svc_req *); -extern getcredres * key_getcred_2(netnamestr *, CLIENT *); -extern getcredres * key_getcred_2_svc(netnamestr *, struct svc_req *); -#define KEY_ENCRYPT_PK ((unsigned long)6) -extern cryptkeyres * key_encrypt_pk_2(cryptkeyarg2 *, CLIENT *); -extern cryptkeyres * key_encrypt_pk_2_svc(cryptkeyarg2 *, struct svc_req *); -#define KEY_DECRYPT_PK ((unsigned long)7) -extern cryptkeyres * key_decrypt_pk_2(cryptkeyarg2 *, CLIENT *); -extern cryptkeyres * key_decrypt_pk_2_svc(cryptkeyarg2 *, struct svc_req *); -#define KEY_NET_PUT ((unsigned long)8) -extern keystatus * key_net_put_2(key_netstarg *, CLIENT *); -extern keystatus * key_net_put_2_svc(key_netstarg *, struct svc_req *); -#define KEY_NET_GET ((unsigned long)9) -extern key_netstres * key_net_get_2(void *, CLIENT *); -extern key_netstres * key_net_get_2_svc(void *, struct svc_req *); -#define KEY_GET_CONV ((unsigned long)10) -extern cryptkeyres * key_get_conv_2(opaque *, CLIENT *); -extern cryptkeyres * key_get_conv_2_svc(opaque *, struct svc_req *); - -#else /* Old Style C */ -extern keystatus * key_set_2(); -extern keystatus * key_set_2_svc(); -extern cryptkeyres * key_encrypt_2(); -extern cryptkeyres * key_encrypt_2_svc(); -extern cryptkeyres * key_decrypt_2(); -extern cryptkeyres * key_decrypt_2_svc(); -extern des_block * key_gen_2(); -extern des_block * key_gen_2_svc(); -extern getcredres * key_getcred_2(); -extern getcredres * key_getcred_2_svc(); -#define KEY_ENCRYPT_PK ((unsigned long)6) -extern cryptkeyres * key_encrypt_pk_2(); -extern cryptkeyres * key_encrypt_pk_2_svc(); -#define KEY_DECRYPT_PK ((unsigned long)7) -extern cryptkeyres * key_decrypt_pk_2(); -extern cryptkeyres * key_decrypt_pk_2_svc(); -#define KEY_NET_PUT ((unsigned long)8) -extern keystatus * key_net_put_2(); -extern keystatus * key_net_put_2_svc(); -#define KEY_NET_GET ((unsigned long)9) -extern key_netstres * key_net_get_2(); -extern key_netstres * key_net_get_2_svc(); -#define KEY_GET_CONV ((unsigned long)10) -extern cryptkeyres * key_get_conv_2(); -extern cryptkeyres * key_get_conv_2_svc(); -#endif /* Old Style C */ - -#endif /* !_KEY_PROT_H_RPCGEN */ diff --git a/mdk-stage1/dietlibc/include/rpc/netdb.h b/mdk-stage1/dietlibc/include/rpc/netdb.h deleted file mode 100644 index a991d3a95..000000000 --- a/mdk-stage1/dietlibc/include/rpc/netdb.h +++ /dev/null @@ -1,74 +0,0 @@ -/* @(#)netdb.h 2.1 88/07/29 3.9 RPCSRC */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ -/* @(#)rpc.h 1.8 87/07/24 SMI */ - -/* Cleaned up for GNU C library roland@gnu.ai.mit.edu: - added multiple inclusion protection and use of . - In GNU this file is #include'd by . */ - -#ifndef _RPC_NETDB_H -#define _RPC_NETDB_H 1 - -#include - -#define __need_size_t -#include - -__BEGIN_DECLS - -struct rpcent -{ - char *r_name; /* Name of server for this rpc program. */ - char **r_aliases; /* Alias list. */ - int r_number; /* RPC program number. */ -}; - -extern void setrpcent (int __stayopen) __THROW; -extern void endrpcent (void) __THROW; -extern struct rpcent *getrpcbyname (const char *__name) __THROW; -extern struct rpcent *getrpcbynumber (int __number) __THROW; -extern struct rpcent *getrpcent (void) __THROW; - -#ifdef __USE_MISC -extern int getrpcbyname_r (const char *__name, struct rpcent *__result_buf, - char *__buffer, size_t __buflen, - struct rpcent **__result) __THROW; - -extern int getrpcbynumber_r (int __number, struct rpcent *__result_buf, - char *__buffer, size_t __buflen, - struct rpcent **__result) __THROW; - -extern int getrpcent_r (struct rpcent *__result_buf, char *__buffer, - size_t __buflen, struct rpcent **__result) __THROW; -#endif - -__END_DECLS - -#endif /* rpc/netdb.h */ diff --git a/mdk-stage1/dietlibc/include/rpc/pmap_clnt.h b/mdk-stage1/dietlibc/include/rpc/pmap_clnt.h deleted file mode 100644 index c63922772..000000000 --- a/mdk-stage1/dietlibc/include/rpc/pmap_clnt.h +++ /dev/null @@ -1,98 +0,0 @@ -/* @(#)pmap_clnt.h 2.1 88/07/29 4.0 RPCSRC; from 1.11 88/02/08 SMI */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ - -/* - * pmap_clnt.h - * Supplies C routines to get to portmap services. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -#ifndef _RPC_PMAP_CLNT_H -#define _RPC_PMAP_CLNT_H 1 - -#include -#include -#include -#include - -__BEGIN_DECLS - -typedef bool_t (*resultproc_t) (char* resp, struct sockaddr_in *raddr); - -/* - * Usage: - * success = pmap_set(program, version, protocol, port); - * success = pmap_unset(program, version); - * port = pmap_getport(address, program, version, protocol); - * head = pmap_getmaps(address); - * clnt_stat = pmap_rmtcall(address, program, version, procedure, - * xdrargs, argsp, xdrres, resp, tout, port_ptr) - * (works for udp only.) - * clnt_stat = clnt_broadcast(program, version, procedure, - * xdrargs, argsp, xdrres, resp, eachresult) - * (like pmap_rmtcall, except the call is broadcasted to all - * locally connected nets. For each valid response received, - * the procedure eachresult is called. Its form is: - * done = eachresult(resp, raddr) - * bool_t done; - * char* resp; - * struct sockaddr_in raddr; - * where resp points to the results of the call and raddr is the - * address if the responder to the broadcast. - */ - -extern bool_t pmap_set (const unsigned long __program, const unsigned long __vers, - int __protocol, unsigned short __port) __THROW; -extern bool_t pmap_unset (const unsigned long __program, const unsigned long __vers) - __THROW; -extern struct pmaplist *pmap_getmaps (struct sockaddr_in *__address) __THROW; -extern enum clnt_stat pmap_rmtcall (struct sockaddr_in *__addr, - const unsigned long __prog, - const unsigned long __vers, - const unsigned long __proc, - xdrproc_t __xdrargs, - char* __argsp, xdrproc_t __xdrres, - char* __resp, struct timeval __tout, - unsigned long *__port_ptr) __THROW; -extern enum clnt_stat clnt_broadcast (const unsigned long __prog, - const unsigned long __vers, - const unsigned long __proc, xdrproc_t __xargs, - char* __argsp, xdrproc_t __xresults, - char* __resultsp, - resultproc_t __eachresult) __THROW; -extern unsigned short pmap_getport (struct sockaddr_in *__address, - const unsigned long __program, - const unsigned long __version, unsigned int __protocol) - __THROW; - -__END_DECLS - -#endif /* rpc/pmap_clnt.h */ diff --git a/mdk-stage1/dietlibc/include/rpc/pmap_prot.h b/mdk-stage1/dietlibc/include/rpc/pmap_prot.h deleted file mode 100644 index da06d34c1..000000000 --- a/mdk-stage1/dietlibc/include/rpc/pmap_prot.h +++ /dev/null @@ -1,108 +0,0 @@ -/* @(#)pmap_prot.h 2.1 88/07/29 4.0 RPCSRC; from 1.14 88/02/08 SMI */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ - -/* - * pmap_prot.h - * Protocol for the local binder service, or pmap. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -#ifndef _RPC_PMAP_PROT_H -#define _RPC_PMAP_PROT_H 1 - -#include - -#include - -__BEGIN_DECLS - -/* The following procedures are supported by the protocol: - * - * PMAPPROC_NULL() returns () - * takes nothing, returns nothing - * - * PMAPPROC_SET(struct pmap) returns (bool_t) - * TRUE is success, FALSE is failure. Registers the tuple - * [prog, vers, prot, port]. - * - * PMAPPROC_UNSET(struct pmap) returns (bool_t) - * TRUE is success, FALSE is failure. Un-registers pair - * [prog, vers]. prot and port are ignored. - * - * PMAPPROC_GETPORT(struct pmap) returns (long unsigned). - * 0 is failure. Otherwise returns the port number where the pair - * [prog, vers] is registered. It may lie! - * - * PMAPPROC_DUMP() RETURNS (struct pmaplist *) - * - * PMAPPROC_CALLIT(unsigned, unsigned, unsigned, string<>) - * RETURNS (port, string<>); - * usage: encapsulatedresults = PMAPPROC_CALLIT(prog, vers, proc, encapsulatedargs); - * Calls the procedure on the local machine. If it is not registered, - * this procedure is quite; ie it does not return error information!!! - * This procedure only is supported on rpc/udp and calls via - * rpc/udp. This routine only passes null authentication parameters. - * This file has no interface to xdr routines for PMAPPROC_CALLIT. - * - * The service supports remote procedure calls on udp/ip or tcp/ip socket 111. - */ - -#define PMAPPORT ((unsigned short)111) -#define PMAPPROG ((unsigned long)100000) -#define PMAPVERS ((unsigned long)2) -#define PMAPVERS_PROTO ((unsigned long)2) -#define PMAPVERS_ORIG ((unsigned long)1) -#define PMAPPROC_NULL ((unsigned long)0) -#define PMAPPROC_SET ((unsigned long)1) -#define PMAPPROC_UNSET ((unsigned long)2) -#define PMAPPROC_GETPORT ((unsigned long)3) -#define PMAPPROC_DUMP ((unsigned long)4) -#define PMAPPROC_CALLIT ((unsigned long)5) - -struct pmap { - long unsigned pm_prog; - long unsigned pm_vers; - long unsigned pm_prot; - long unsigned pm_port; -}; - -extern bool_t xdr_pmap (XDR *__xdrs, struct pmap *__regs) __THROW; - -struct pmaplist { - struct pmap pml_map; - struct pmaplist *pml_next; -}; - -extern bool_t xdr_pmaplist (XDR *__xdrs, struct pmaplist **__rp) __THROW; - -__END_DECLS - -#endif /* rpc/pmap_prot.h */ diff --git a/mdk-stage1/dietlibc/include/rpc/pmap_rmt.h b/mdk-stage1/dietlibc/include/rpc/pmap_rmt.h deleted file mode 100644 index 3b975d0fb..000000000 --- a/mdk-stage1/dietlibc/include/rpc/pmap_rmt.h +++ /dev/null @@ -1,68 +0,0 @@ -/* @(#)pmap_rmt.h 2.1 88/07/29 4.0 RPCSRC; from 1.2 88/02/08 SMI */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ - -/* - * Structures and XDR routines for parameters to and replies from - * the portmapper remote-call-service. - * - * Copyright (C) 1986, Sun Microsystems, Inc. - */ - -#ifndef _RPC_PMAP_RMT_H -#define _RPC_PMAP_RMT_H 1 - -#include -#include -#include -#include - -__BEGIN_DECLS - -struct rmtcallargs { - unsigned long prog, vers, proc, arglen; - char* args_ptr; - xdrproc_t xdr_args; -}; - -extern bool_t xdr_rmtcall_args (XDR *__xdrs, struct rmtcallargs *__crp) - __THROW; - -struct rmtcallres { - unsigned long *port_ptr; - unsigned long resultslen; - char* results_ptr; - xdrproc_t xdr_results; -}; - -extern bool_t xdr_rmtcallres (XDR *__xdrs, struct rmtcallres *__crp) __THROW; - -__END_DECLS - -#endif /* rpc/pmap_rmt.h */ diff --git a/mdk-stage1/dietlibc/include/rpc/rpc.h b/mdk-stage1/dietlibc/include/rpc/rpc.h deleted file mode 100644 index a966d2e23..000000000 --- a/mdk-stage1/dietlibc/include/rpc/rpc.h +++ /dev/null @@ -1,70 +0,0 @@ -/* @(#)rpc.h 2.3 88/08/10 4.0 RPCSRC; from 1.9 88/02/08 SMI */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ - -/* - * rpc.h, Just includes the billions of rpc header files necessary to - * do remote procedure calling. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -#ifndef _RPC_RPC_H -#define _RPC_RPC_H 1 - -#include /* some typedefs */ -#include - -/* external data representation interfaces */ -#include /* generic (de)serializer */ - -/* Client side only authentication */ -#include /* generic authenticator (client side) */ - -/* Client side (mostly) remote procedure call */ -#include /* generic rpc stuff */ - -/* semi-private protocol headers */ -#include /* protocol for rpc messages */ -#include /* protocol for unix style cred */ -#include /* protocol for des style cred */ - -/* Server side only remote procedure callee */ -#include /* service manager and multiplexer */ -#include /* service side authenticator */ - -/* - * COMMENT OUT THE NEXT INCLUDE IF RUNNING ON SUN OS OR ON A VERSION - * OF UNIX BASED ON NFSSRC. These systems will already have the structures - * defined by included in . - */ -/* routines for parsing /etc/rpc */ -#include /* structures and routines to parse /etc/rpc */ - -#endif /* rpc/rpc.h */ diff --git a/mdk-stage1/dietlibc/include/rpc/rpc_des.h b/mdk-stage1/dietlibc/include/rpc/rpc_des.h deleted file mode 100644 index 0f36d1697..000000000 --- a/mdk-stage1/dietlibc/include/rpc/rpc_des.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ -/* - * Generic DES driver interface - * Keep this file hardware independent! - * Copyright (c) 1986 by Sun Microsystems, Inc. - */ - -#ifndef _DES_H -#define _DES_H - -#include - -#define DES_MAXLEN 65536 /* maximum # of bytes to encrypt */ -#define DES_QUICKLEN 16 /* maximum # of bytes to encrypt quickly */ - -enum desdir - { - ENCRYPT, DECRYPT - }; -enum desmode - { - CBC, ECB - }; - -/* - * parameters to ioctl call - */ -struct desparams - { - u_char des_key[8]; /* key (with low bit parity) */ - enum desdir des_dir; /* direction */ - enum desmode des_mode; /* mode */ - u_char des_ivec[8]; /* input vector */ - unsigned des_len; /* number of bytes to crypt */ - union - { - u_char UDES_data[DES_QUICKLEN]; - u_char *UDES_buf; - } - UDES; -#define des_data UDES.UDES_data /* direct data here if quick */ -#define des_buf UDES.UDES_buf /* otherwise, pointer to data */ - }; - -#endif diff --git a/mdk-stage1/dietlibc/include/rpc/rpc_msg.h b/mdk-stage1/dietlibc/include/rpc/rpc_msg.h deleted file mode 100644 index d597608ab..000000000 --- a/mdk-stage1/dietlibc/include/rpc/rpc_msg.h +++ /dev/null @@ -1,202 +0,0 @@ -/* @(#)rpc_msg.h 2.1 88/07/29 4.0 RPCSRC */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ -/* @(#)rpc_msg.h 1.7 86/07/16 SMI */ - -#ifndef _RPC_MSG_H -#define _RPC_MSG_H 1 - -#include - -#include -#include - -/* - * rpc_msg.h - * rpc message definition - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -#define RPC_MSG_VERSION ((unsigned long) 2) -#define RPC_SERVICE_PORT ((unsigned short) 2048) - -__BEGIN_DECLS - -/* - * Bottom up definition of an rpc message. - * NOTE: call and reply use the same overall struct but - * different parts of unions within it. - */ - -enum msg_type { - CALL=0, - REPLY=1 -}; - -enum reply_stat { - MSG_ACCEPTED=0, - MSG_DENIED=1 -}; - -enum accept_stat { - SUCCESS=0, - PROG_UNAVAIL=1, - PROG_MISMATCH=2, - PROC_UNAVAIL=3, - GARBAGE_ARGS=4, - SYSTEM_ERR=5 -}; - -enum reject_stat { - RPC_MISMATCH=0, - AUTH_ERROR=1 -}; - -/* - * Reply part of an rpc exchange - */ - -/* - * Reply to an rpc request that was accepted by the server. - * Note: there could be an error even though the request was - * accepted. - */ -struct accepted_reply { - struct opaque_auth ar_verf; - enum accept_stat ar_stat; - union { - struct { - unsigned long low; - unsigned long high; - } AR_versions; - struct { - char* where; - xdrproc_t proc; - } AR_results; - /* and many other null cases */ - } ru; -#define ar_results ru.AR_results -#define ar_vers ru.AR_versions -}; - -/* - * Reply to an rpc request that was rejected by the server. - */ -struct rejected_reply { - enum reject_stat rj_stat; - union { - struct { - unsigned long low; - unsigned long high; - } RJ_versions; - enum auth_stat RJ_why; /* why authentication did not work */ - } ru; -#define rj_vers ru.RJ_versions -#define rj_why ru.RJ_why -}; - -/* - * Body of a reply to an rpc request. - */ -struct reply_body { - enum reply_stat rp_stat; - union { - struct accepted_reply RP_ar; - struct rejected_reply RP_dr; - } ru; -#define rp_acpt ru.RP_ar -#define rp_rjct ru.RP_dr -}; - -/* - * Body of an rpc request call. - */ -struct call_body { - unsigned long cb_rpcvers; /* must be equal to two */ - unsigned long cb_prog; - unsigned long cb_vers; - unsigned long cb_proc; - struct opaque_auth cb_cred; - struct opaque_auth cb_verf; /* protocol specific - provided by client */ -}; - -/* - * The rpc message - */ -struct rpc_msg { - unsigned long rm_xid; - enum msg_type rm_direction; - union { - struct call_body RM_cmb; - struct reply_body RM_rmb; - } ru; -#define rm_call ru.RM_cmb -#define rm_reply ru.RM_rmb -}; -#define acpted_rply ru.RM_rmb.ru.RP_ar -#define rjcted_rply ru.RM_rmb.ru.RP_dr - - -/* - * XDR routine to handle a rpc message. - * xdr_callmsg(xdrs, cmsg) - * XDR *xdrs; - * struct rpc_msg *cmsg; - */ -extern bool_t xdr_callmsg (XDR *__xdrs, struct rpc_msg *__cmsg) __THROW; - -/* - * XDR routine to pre-serialize the static part of a rpc message. - * xdr_callhdr(xdrs, cmsg) - * XDR *xdrs; - * struct rpc_msg *cmsg; - */ -extern bool_t xdr_callhdr (XDR *__xdrs, struct rpc_msg *__cmsg) __THROW; - -/* - * XDR routine to handle a rpc reply. - * xdr_replymsg(xdrs, rmsg) - * XDR *xdrs; - * struct rpc_msg *rmsg; - */ -extern bool_t xdr_replymsg (XDR *__xdrs, struct rpc_msg *__rmsg) __THROW; - -/* - * Fills in the error part of a reply message. - * _seterr_reply(msg, error) - * struct rpc_msg *msg; - * struct rpc_err *error; - */ -extern void _seterr_reply (struct rpc_msg *__msg, struct rpc_err *__error) - __THROW; - -__END_DECLS - -#endif /* rpc/rpc_msg.h */ diff --git a/mdk-stage1/dietlibc/include/rpc/svc.h b/mdk-stage1/dietlibc/include/rpc/svc.h deleted file mode 100644 index ec598ba79..000000000 --- a/mdk-stage1/dietlibc/include/rpc/svc.h +++ /dev/null @@ -1,316 +0,0 @@ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ - -/* - * svc.h, Server-side remote procedure call interface. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -#ifndef _RPC_SVC_H -#define _RPC_SVC_H 1 - -#include -#include - -__BEGIN_DECLS - -/* - * This interface must manage two items concerning remote procedure calling: - * - * 1) An arbitrary number of transport connections upon which rpc requests - * are received. The two most notable transports are TCP and UDP; they are - * created and registered by routines in svc_tcp.c and svc_udp.c, respectively; - * they in turn call xprt_register and xprt_unregister. - * - * 2) An arbitrary number of locally registered services. Services are - * described by the following four data: program number, version number, - * "service dispatch" function, a transport handle, and a boolean that - * indicates whether or not the exported program should be registered with a - * local binder service; if true the program's number and version and the - * port number from the transport handle are registered with the binder. - * These data are registered with the rpc svc system via svc_register. - * - * A service's dispatch function is called whenever an rpc request comes in - * on a transport. The request's program and version numbers must match - * those of the registered service. The dispatch function is passed two - * parameters, struct svc_req * and SVCXPRT *, defined below. - */ - -enum xprt_stat { - XPRT_DIED, - XPRT_MOREREQS, - XPRT_IDLE -}; - -/* - * Server side transport handle - */ -typedef struct SVCXPRT SVCXPRT; -struct SVCXPRT { - int xp_sock; - unsigned short xp_port; /* associated port number */ - const struct xp_ops { - bool_t (*xp_recv) (SVCXPRT *__xprt, struct rpc_msg *__msg); - /* receive incoming requests */ - enum xprt_stat (*xp_stat) (SVCXPRT *__xprt); - /* get transport status */ - bool_t (*xp_getargs) (SVCXPRT *__xprt, xdrproc_t __xdr_args, - char* args_ptr); /* get arguments */ - bool_t (*xp_reply) (SVCXPRT *__xprt, struct rpc_msg *__msg); - /* send reply */ - bool_t (*xp_freeargs) (SVCXPRT *__xprt, xdrproc_t __xdr_args, - char* args_ptr); - /* free mem allocated for args */ - void (*xp_destroy) (SVCXPRT *__xprt); - /* destroy this struct */ - } *xp_ops; - int xp_addrlen; /* length of remote address */ - struct sockaddr_in xp_raddr; /* remote address */ - struct opaque_auth xp_verf; /* raw response verifier */ - char* xp_p1; /* private */ - char* xp_p2; /* private */ - char xp_pad [256]; /* padding, internal use */ -}; - -/* - * Approved way of getting address of caller - */ -#define svc_getcaller(x) (&(x)->xp_raddr) - -/* - * Operations defined on an SVCXPRT handle - * - * SVCXPRT *xprt; - * struct rpc_msg *msg; - * xdrproc_t xargs; - * char* argsp; - */ -#define SVC_RECV(xprt, msg) \ - (*(xprt)->xp_ops->xp_recv)((xprt), (msg)) -#define svc_recv(xprt, msg) \ - (*(xprt)->xp_ops->xp_recv)((xprt), (msg)) - -#define SVC_STAT(xprt) \ - (*(xprt)->xp_ops->xp_stat)(xprt) -#define svc_stat(xprt) \ - (*(xprt)->xp_ops->xp_stat)(xprt) - -#define SVC_GETARGS(xprt, xargs, argsp) \ - (*(xprt)->xp_ops->xp_getargs)((xprt), (xargs), (argsp)) -#define svc_getargs(xprt, xargs, argsp) \ - (*(xprt)->xp_ops->xp_getargs)((xprt), (xargs), (argsp)) - -#define SVC_REPLY(xprt, msg) \ - (*(xprt)->xp_ops->xp_reply) ((xprt), (msg)) -#define svc_reply(xprt, msg) \ - (*(xprt)->xp_ops->xp_reply) ((xprt), (msg)) - -#define SVC_FREEARGS(xprt, xargs, argsp) \ - (*(xprt)->xp_ops->xp_freeargs)((xprt), (xargs), (argsp)) -#define svc_freeargs(xprt, xargs, argsp) \ - (*(xprt)->xp_ops->xp_freeargs)((xprt), (xargs), (argsp)) - -#define SVC_DESTROY(xprt) \ - (*(xprt)->xp_ops->xp_destroy)(xprt) -#define svc_destroy(xprt) \ - (*(xprt)->xp_ops->xp_destroy)(xprt) - - -/* - * Service request - */ -struct svc_req { - rpcprog_t rq_prog; /* service program number */ - rpcvers_t rq_vers; /* service protocol version */ - rpcproc_t rq_proc; /* the desired procedure */ - struct opaque_auth rq_cred; /* raw creds from the wire */ - char* rq_clntcred; /* read only cooked cred */ - SVCXPRT *rq_xprt; /* associated transport */ -}; - -#ifndef __DISPATCH_FN_T -#define __DISPATCH_FN_T -typedef void (*__dispatch_fn_t) (struct svc_req*, SVCXPRT*); -#endif - -/* - * Service registration - * - * svc_register(xprt, prog, vers, dispatch, protocol) - * SVCXPRT *xprt; - * rpcprog_t prog; - * rpcvers_t vers; - * void (*dispatch)(struct svc_req*, SVCXPRT*); - * rpcprot_t protocol; like TCP or UDP, zero means do not register - */ -extern bool_t svc_register (SVCXPRT *__xprt, rpcprog_t __prog, - rpcvers_t __vers, __dispatch_fn_t __dispatch, - rpcprot_t __protocol) __THROW; - -/* - * Service un-registration - * - * svc_unregister(prog, vers) - * rpcprog_t prog; - * rpcvers_t vers; - */ -extern void svc_unregister (rpcprog_t __prog, rpcvers_t __vers) __THROW; - -/* - * Transport registration. - * - * xprt_register(xprt) - * SVCXPRT *xprt; - */ -extern void xprt_register (SVCXPRT *__xprt) __THROW; - -/* - * Transport un-register - * - * xprt_unregister(xprt) - * SVCXPRT *xprt; - */ -extern void xprt_unregister (SVCXPRT *__xprt) __THROW; - - -/* - * When the service routine is called, it must first check to see if it - * knows about the procedure; if not, it should call svcerr_noproc - * and return. If so, it should deserialize its arguments via - * SVC_GETARGS (defined above). If the deserialization does not work, - * svcerr_decode should be called followed by a return. Successful - * decoding of the arguments should be followed the execution of the - * procedure's code and a call to svc_sendreply. - * - * Also, if the service refuses to execute the procedure due to too- - * weak authentication parameters, svcerr_weakauth should be called. - * Note: do not confuse access-control failure with weak authentication! - * - * NB: In pure implementations of rpc, the caller always waits for a reply - * msg. This message is sent when svc_sendreply is called. - * Therefore pure service implementations should always call - * svc_sendreply even if the function logically returns void; use - * xdr.h - xdr_void for the xdr routine. HOWEVER, tcp based rpc allows - * for the abuse of pure rpc via batched calling or pipelining. In the - * case of a batched call, svc_sendreply should NOT be called since - * this would send a return message, which is what batching tries to avoid. - * It is the service/protocol writer's responsibility to know which calls are - * batched and which are not. Warning: responding to batch calls may - * deadlock the caller and server processes! - */ - -extern bool_t svc_sendreply (SVCXPRT *xprt, xdrproc_t __xdr_results, - char* __xdr_location) __THROW; - -extern void svcerr_decode (SVCXPRT *__xprt) __THROW; - -extern void svcerr_weakauth (SVCXPRT *__xprt) __THROW; - -extern void svcerr_noproc (SVCXPRT *__xprt) __THROW; - -extern void svcerr_progvers (SVCXPRT *__xprt, rpcvers_t __low_vers, - rpcvers_t __high_vers) __THROW; - -extern void svcerr_auth (SVCXPRT *__xprt, enum auth_stat __why) __THROW; - -extern void svcerr_noprog (SVCXPRT *__xprt) __THROW; - -extern void svcerr_systemerr (SVCXPRT *__xprt) __THROW; - -/* - * Lowest level dispatching -OR- who owns this process anyway. - * Somebody has to wait for incoming requests and then call the correct - * service routine. The routine svc_run does infinite waiting; i.e., - * svc_run never returns. - * Since another (coexistent) package may wish to selectively wait for - * incoming calls or other events outside of the rpc architecture, the - * routine svc_getreq is provided. It must be passed readfds, the - * "in-place" results of a select system call (see select, section 2). - */ - -/* - * Global keeper of rpc service descriptors in use - * dynamic; must be inspected before each call to select - */ - -extern struct pollfd *svc_pollfd; -extern int svc_max_pollfd; -extern fd_set svc_fdset; -#define svc_fds svc_fdset.fds_bits[0] /* compatibility */ - -/* - * a small program implemented by the svc_rpc implementation itself; - * also see clnt.h for protocol numbers. - */ -extern void svc_getreq (int __rdfds) __THROW; -extern void svc_getreq_common (const int __fd) __THROW; -extern void svc_getreqset (fd_set *__readfds) __THROW; -extern void svc_getreq_poll (struct pollfd *, const int) __THROW; -extern void svc_exit (void) __THROW; -extern void svc_run (void) __THROW; - -/* - * Socket to use on svcxxx_create call to get default socket - */ -#define RPC_ANYSOCK -1 - -/* - * These are the existing service side transport implementations - */ - -/* - * Memory based rpc for testing and timing. - */ -extern SVCXPRT *svcraw_create (void) __THROW; - -/* - * Udp based rpc. - */ -extern SVCXPRT *svcudp_create (int __sock) __THROW; -extern SVCXPRT *svcudp_bufcreate (int __sock, unsigned int __sendsz, unsigned int __recvsz) - __THROW; - -/* - * Tcp based rpc. - */ -extern SVCXPRT *svctcp_create (int __sock, unsigned int __sendsize, unsigned int __recvsize) - __THROW; - - -/* - * Unix based rpc. - */ -extern SVCXPRT *svcunix_create (int __sock, unsigned int __sendsize, unsigned int __recvsize, - char *__path) __THROW; - - -__END_DECLS - -#endif /* rpc/svc.h */ diff --git a/mdk-stage1/dietlibc/include/rpc/svc_auth.h b/mdk-stage1/dietlibc/include/rpc/svc_auth.h deleted file mode 100644 index cd4b8da29..000000000 --- a/mdk-stage1/dietlibc/include/rpc/svc_auth.h +++ /dev/null @@ -1,54 +0,0 @@ -/* @(#)svc_auth.h 2.1 88/07/29 4.0 RPCSRC */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ -/* @(#)svc_auth.h 1.6 86/07/16 SMI */ - -/* - * svc_auth.h, Service side of rpc authentication. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -#ifndef _RPC_SVC_AUTH_H -#define _RPC_SVC_AUTH_H 1 - -#include -#include - -__BEGIN_DECLS - -/* - * Server side authenticator - */ -extern enum auth_stat _authenticate (struct svc_req *__rqst, - struct rpc_msg *__msg) __THROW; - -__END_DECLS - -#endif /* rpc/svc_auth.h */ diff --git a/mdk-stage1/dietlibc/include/rpc/types.h b/mdk-stage1/dietlibc/include/rpc/types.h deleted file mode 100644 index d4be65e38..000000000 --- a/mdk-stage1/dietlibc/include/rpc/types.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ -/* fixincludes should not add extern "C" to this file */ -/* - * Rpc additions to - */ -#ifndef _RPC_TYPES_H -#define _RPC_TYPES_H 1 - -typedef int bool_t; -typedef int enum_t; -/* This needs to be changed to uint32_t in the future */ -typedef unsigned long rpcprog_t; -typedef unsigned long rpcvers_t; -typedef unsigned long rpcproc_t; -typedef unsigned long rpcprot_t; -typedef unsigned long rpcport_t; - -#define __dontcare__ -1 - -#ifndef FALSE -# define FALSE (0) -#endif - -#ifndef TRUE -# define TRUE (1) -#endif - -#include /* For malloc decl. */ -#define mem_alloc(bsize) malloc(bsize) -#define mem_free(ptr, bsize) free(ptr) - -#ifndef makedev /* ie, we haven't already included it */ -#include -#endif - -# ifndef __dietlibc_u_char_defined -typedef char* caddr_t; -typedef uint32_t u_long; -typedef unsigned char u_char; -typedef unsigned short u_short; -typedef unsigned int u_int; -# define __dietlibc_u_char_defined -#endif - -#include -#include - -#include - -#ifndef INADDR_LOOPBACK -#define INADDR_LOOPBACK 0x7F000001UL -#endif -#ifndef MAXHOSTNAMELEN -#define MAXHOSTNAMELEN 64 -#endif - -#endif /* rpc/types.h */ diff --git a/mdk-stage1/dietlibc/include/rpc/xdr.h b/mdk-stage1/dietlibc/include/rpc/xdr.h deleted file mode 100644 index 590392070..000000000 --- a/mdk-stage1/dietlibc/include/rpc/xdr.h +++ /dev/null @@ -1,379 +0,0 @@ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ - -/* - * xdr.h, External Data Representation Serialization Routines. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -#ifndef _RPC_XDR_H -#define _RPC_XDR_H 1 - -#include -#include -#include - -/* We need FILE. */ -#include - -__BEGIN_DECLS - -/* - * XDR provides a conventional way for converting between C data - * types and an external bit-string representation. Library supplied - * routines provide for the conversion on built-in C data types. These - * routines and utility routines defined here are used to help implement - * a type encode/decode routine for each user-defined type. - * - * Each data type provides a single procedure which takes two arguments: - * - * bool_t - * xdrproc(xdrs, argresp) - * XDR *xdrs; - * *argresp; - * - * xdrs is an instance of a XDR handle, to which or from which the data - * type is to be converted. argresp is a pointer to the structure to be - * converted. The XDR handle contains an operation field which indicates - * which of the operations (ENCODE, DECODE * or FREE) is to be performed. - * - * XDR_DECODE may allocate space if the pointer argresp is null. This - * data can be freed with the XDR_FREE operation. - * - * We write only one procedure per data type to make it easy - * to keep the encode and decode procedures for a data type consistent. - * In many cases the same code performs all operations on a user defined type, - * because all the hard work is done in the component type routines. - * decode as a series of calls on the nested data types. - */ - -/* - * Xdr operations. XDR_ENCODE causes the type to be encoded into the - * stream. XDR_DECODE causes the type to be extracted from the stream. - * XDR_FREE can be used to release the space allocated by an XDR_DECODE - * request. - */ -enum xdr_op { - XDR_ENCODE = 0, - XDR_DECODE = 1, - XDR_FREE = 2 -}; - -/* - * This is the number of bytes per unit of external data. - */ -#define BYTES_PER_XDR_UNIT (4) -/* - * This only works if the above is a power of 2. But it's defined to be - * 4 by the appropriate RFCs. So it will work. And it's normally quicker - * than the old routine. - */ -#if 1 -#define RNDUP(x) (((x) + BYTES_PER_XDR_UNIT - 1) & ~(BYTES_PER_XDR_UNIT - 1)) -#else /* this is the old routine */ -#define RNDUP(x) ((((x) + BYTES_PER_XDR_UNIT - 1) / BYTES_PER_XDR_UNIT) \ - * BYTES_PER_XDR_UNIT) -#endif - -/* - * The XDR handle. - * Contains operation which is being applied to the stream, - * an operations vector for the particular implementation (e.g. see xdr_mem.c), - * and two private fields for the use of the particular implementation. - */ -typedef struct XDR XDR; -struct XDR - { - enum xdr_op x_op; /* operation; fast additional param */ - struct xdr_ops - { - bool_t (*x_getlong) (XDR *__xdrs, long *__lp); - /* get a long from underlying stream */ - bool_t (*x_putlong) (XDR *__xdrs, const long *__lp); - /* put a long to " */ - bool_t (*x_getbytes) (XDR *__xdrs, char* __addr, unsigned int __len); - /* get some bytes from " */ - bool_t (*x_putbytes) (XDR *__xdrs, const char *__addr, unsigned int __len); - /* put some bytes to " */ - unsigned int (*x_getpostn) (const XDR *__xdrs); - /* returns bytes off from beginning */ - bool_t (*x_setpostn) (XDR *__xdrs, unsigned int __pos); - /* lets you reposition the stream */ - int32_t *(*x_inline) (XDR *__xdrs, int __len); - /* buf quick ptr to buffered data */ - void (*x_destroy) (XDR *__xdrs); - /* free privates of this xdr_stream */ - bool_t (*x_getint32) (XDR *__xdrs, int32_t *__ip); - /* get a int from underlying stream */ - bool_t (*x_putint32) (XDR *__xdrs, const int32_t *__ip); - /* put a int to " */ - } - *x_ops; - char* x_public; /* users' data */ - char* x_private; /* pointer to private data */ - char* x_base; /* private used for position info */ - int x_handy; /* extra private word */ - }; - -/* - * A xdrproc_t exists for each data type which is to be encoded or decoded. - * - * The second argument to the xdrproc_t is a pointer to an opaque pointer. - * The opaque pointer generally points to a structure of the data type - * to be decoded. If this pointer is 0, then the type routines should - * allocate dynamic storage of the appropriate size and return it. - * bool_t (*xdrproc_t)(XDR *, char* *); - */ -typedef bool_t (*xdrproc_t) (XDR *, void *,...); - - -/* - * Operations defined on a XDR handle - * - * XDR *xdrs; - * int32_t *int32p; - * long *longp; - * char* addr; - * unsigned int len; - * unsigned int pos; - */ -#define XDR_GETINT32(xdrs, int32p) \ - (*(xdrs)->x_ops->x_getint32)(xdrs, int32p) -#define xdr_getint32(xdrs, int32p) \ - (*(xdrs)->x_ops->x_getint32)(xdrs, int32p) - -#define XDR_PUTINT32(xdrs, int32p) \ - (*(xdrs)->x_ops->x_putint32)(xdrs, int32p) -#define xdr_putint32(xdrs, int32p) \ - (*(xdrs)->x_ops->x_putint32)(xdrs, int32p) - -#define XDR_GETLONG(xdrs, longp) \ - (*(xdrs)->x_ops->x_getlong)(xdrs, longp) -#define xdr_getlong(xdrs, longp) \ - (*(xdrs)->x_ops->x_getlong)(xdrs, longp) - -#define XDR_PUTLONG(xdrs, longp) \ - (*(xdrs)->x_ops->x_putlong)(xdrs, longp) -#define xdr_putlong(xdrs, longp) \ - (*(xdrs)->x_ops->x_putlong)(xdrs, longp) - -#define XDR_GETBYTES(xdrs, addr, len) \ - (*(xdrs)->x_ops->x_getbytes)(xdrs, addr, len) -#define xdr_getbytes(xdrs, addr, len) \ - (*(xdrs)->x_ops->x_getbytes)(xdrs, addr, len) - -#define XDR_PUTBYTES(xdrs, addr, len) \ - (*(xdrs)->x_ops->x_putbytes)(xdrs, addr, len) -#define xdr_putbytes(xdrs, addr, len) \ - (*(xdrs)->x_ops->x_putbytes)(xdrs, addr, len) - -#define XDR_GETPOS(xdrs) \ - (*(xdrs)->x_ops->x_getpostn)(xdrs) -#define xdr_getpos(xdrs) \ - (*(xdrs)->x_ops->x_getpostn)(xdrs) - -#define XDR_SETPOS(xdrs, pos) \ - (*(xdrs)->x_ops->x_setpostn)(xdrs, pos) -#define xdr_setpos(xdrs, pos) \ - (*(xdrs)->x_ops->x_setpostn)(xdrs, pos) - -#define XDR_INLINE(xdrs, len) \ - (*(xdrs)->x_ops->x_inline)(xdrs, len) -#define xdr_inline(xdrs, len) \ - (*(xdrs)->x_ops->x_inline)(xdrs, len) - -#define XDR_DESTROY(xdrs) \ - do { \ - if ((xdrs)->x_ops->x_destroy) \ - (*(xdrs)->x_ops->x_destroy)(xdrs); \ - } while (0) -#define xdr_destroy(xdrs) \ - do { \ - if ((xdrs)->x_ops->x_destroy) \ - (*(xdrs)->x_ops->x_destroy)(xdrs); \ - } while (0) - -/* - * Support struct for discriminated unions. - * You create an array of xdrdiscrim structures, terminated with - * a entry with a null procedure pointer. The xdr_union routine gets - * the discriminant value and then searches the array of structures - * for a matching value. If a match is found the associated xdr routine - * is called to handle that part of the union. If there is - * no match, then a default routine may be called. - * If there is no match and no default routine it is an error. - */ -#define NULL_xdrproc_t ((xdrproc_t)0) -struct xdr_discrim -{ - int value; - xdrproc_t proc; -}; - -/* - * Inline routines for fast encode/decode of primitive data types. - * Caveat emptor: these use single memory cycles to get the - * data from the underlying buffer, and will fail to operate - * properly if the data is not aligned. The standard way to use these - * is to say: - * if ((buf = XDR_INLINE(xdrs, count)) == NULL) - * return (FALSE); - * <<< macro calls >>> - * where ``count'' is the number of bytes of data occupied - * by the primitive data types. - * - * N.B. and frozen for all time: each data type here uses 4 bytes - * of external representation. - */ - -#define IXDR_GET_INT32(buf) ((int32_t)ntohl((uint32_t)*(buf)++)) -#define IXDR_PUT_INT32(buf, v) (*(buf)++ = (int32_t)htonl((uint32_t)(v))) -#define IXDR_GET_U_INT32(buf) ((uint32_t)IXDR_GET_INT32(buf)) -#define IXDR_PUT_U_INT32(buf, v) IXDR_PUT_INT32(buf, (int32_t)(v)) - -/* WARNING: The IXDR_*_LONG defines are removed by Sun for new platforms - * and shouldn't be used any longer. Code which use this defines or longs - * in the RPC code will not work on 64bit Solaris platforms ! - */ -#define IXDR_GET_LONG(buf) \ - ((long)ntohl((unsigned long)*__extension__((uint32_t*)(buf))++)) -#define IXDR_PUT_LONG(buf, v) \ - (*__extension__((uint32_t*)(buf))++ = (long)htonl((unsigned long)(v))) -#define IXDR_GET_U_LONG(buf) ((unsigned long)IXDR_GET_LONG(buf)) -#define IXDR_PUT_U_LONG(buf, v) IXDR_PUT_LONG(buf, (long)(v)) - - -#define IXDR_GET_BOOL(buf) ((bool_t)IXDR_GET_LONG(buf)) -#define IXDR_GET_ENUM(buf, t) ((t)IXDR_GET_LONG(buf)) -#define IXDR_GET_SHORT(buf) ((short)IXDR_GET_LONG(buf)) -#define IXDR_GET_U_SHORT(buf) ((unsigned short)IXDR_GET_LONG(buf)) - -#define IXDR_PUT_BOOL(buf, v) IXDR_PUT_LONG(buf, (long)(v)) -#define IXDR_PUT_ENUM(buf, v) IXDR_PUT_LONG(buf, (long)(v)) -#define IXDR_PUT_SHORT(buf, v) IXDR_PUT_LONG(buf, (long)(v)) -#define IXDR_PUT_U_SHORT(buf, v) IXDR_PUT_LONG(buf, (long)(v)) - -/* - * These are the "generic" xdr routines. - * None of these can have const applied because it's not possible to - * know whether the call is a read or a write to the passed parameter - * also, the XDR structure is always updated by some of these calls. - */ -extern bool_t xdr_void (void) __THROW; -extern bool_t xdr_short (XDR *__xdrs, short *__sp) __THROW; -extern bool_t xdr_u_short (XDR *__xdrs, unsigned short *__usp) __THROW; -extern bool_t xdr_int (XDR *__xdrs, int *__ip) __THROW; -extern bool_t xdr_u_int (XDR *__xdrs, unsigned int *__up) __THROW; -extern bool_t xdr_long (XDR *__xdrs, long *__lp) __THROW; -extern bool_t xdr_u_long (XDR *__xdrs, unsigned long *__ulp) __THROW; -extern bool_t xdr_hyper (XDR *__xdrs, int64_t *__llp) __THROW; -extern bool_t xdr_u_hyper (XDR *__xdrs, uint64_t *__ullp) __THROW; -extern bool_t xdr_longlong_t (XDR *__xdrs, int64_t *__llp) __THROW; -extern bool_t xdr_u_longlong_t (XDR *__xdrs, uint64_t *__ullp) __THROW; -extern bool_t xdr_int8_t (XDR *__xdrs, int8_t *__ip) __THROW; -extern bool_t xdr_uint8_t (XDR *__xdrs, uint8_t *__up) __THROW; -extern bool_t xdr_int16_t (XDR *__xdrs, int16_t *__ip) __THROW; -extern bool_t xdr_uint16_t (XDR *__xdrs, uint16_t *__up) __THROW; -extern bool_t xdr_int32_t (XDR *__xdrs, int32_t *__ip) __THROW; -extern bool_t xdr_uint32_t (XDR *__xdrs, uint32_t *__up) __THROW; -extern bool_t xdr_int64_t (XDR *__xdrs, int64_t *__ip) __THROW; -extern bool_t xdr_uint64_t (XDR *__xdrs, uint64_t *__up) __THROW; -extern bool_t xdr_bool (XDR *__xdrs, bool_t *__bp) __THROW; -extern bool_t xdr_enum (XDR *__xdrs, enum_t *__ep) __THROW; -extern bool_t xdr_array (XDR * _xdrs, char* *__addrp, unsigned int *__sizep, - unsigned int __maxsize, unsigned int __elsize, xdrproc_t __elproc) - __THROW; -extern bool_t xdr_bytes (XDR *__xdrs, char **__cpp, unsigned int *__sizep, - unsigned int __maxsize) __THROW; -extern bool_t xdr_opaque (XDR *__xdrs, char* __cp, unsigned int __cnt) __THROW; -extern bool_t xdr_string (XDR *__xdrs, char **__cpp, unsigned int __maxsize) __THROW; -extern bool_t xdr_union (XDR *__xdrs, enum_t *__dscmp, char *__unp, - const struct xdr_discrim *__choices, - xdrproc_t dfault) __THROW; -extern bool_t xdr_char (XDR *__xdrs, char *__cp) __THROW; -extern bool_t xdr_u_char (XDR *__xdrs, unsigned char *__cp) __THROW; -extern bool_t xdr_vector (XDR *__xdrs, char *__basep, unsigned int __nelem, - unsigned int __elemsize, xdrproc_t __xdr_elem) __THROW; -extern bool_t xdr_float (XDR *__xdrs, float *__fp) __THROW; -extern bool_t xdr_double (XDR *__xdrs, double *__dp) __THROW; -extern bool_t xdr_reference (XDR *__xdrs, char* *__xpp, unsigned int __size, - xdrproc_t __proc) __THROW; -extern bool_t xdr_pointer (XDR *__xdrs, char **__objpp, - unsigned int __obj_size, xdrproc_t __xdr_obj) __THROW; -extern bool_t xdr_wrapstring (XDR *__xdrs, char **__cpp) __THROW; -extern unsigned long xdr_sizeof (xdrproc_t, void *) __THROW; - -/* - * Common opaque bytes objects used by many rpc protocols; - * declared here due to commonality. - */ -#define MAX_NETOBJ_SZ 1024 -struct netobj -{ - unsigned int n_len; - char *n_bytes; -}; -typedef struct netobj netobj; -extern bool_t xdr_netobj (XDR *__xdrs, struct netobj *__np) __THROW; - -/* - * These are the public routines for the various implementations of - * xdr streams. - */ - -/* XDR using memory buffers */ -extern void xdrmem_create (XDR *__xdrs, const char* __addr, - unsigned int __size, enum xdr_op __xop) __THROW; - -/* XDR using stdio library */ -extern void xdrstdio_create (XDR *__xdrs, FILE *__file, enum xdr_op __xop) - __THROW; - -/* XDR pseudo records for tcp */ -extern void xdrrec_create (XDR *__xdrs, unsigned int __sendsize, - unsigned int __recvsize, char* __tcp_handle, - int (*__readit) (char *, char *, int), - int (*__writeit) (char *, char *, int)) __THROW; - -/* make end of xdr record */ -extern bool_t xdrrec_endofrecord (XDR *__xdrs, bool_t __sendnow) __THROW; - -/* move to beginning of next record */ -extern bool_t xdrrec_skiprecord (XDR *__xdrs) __THROW; - -/* true if no more input */ -extern bool_t xdrrec_eof (XDR *__xdrs) __THROW; - -/* free memory buffers for xdr */ -extern void xdr_free (xdrproc_t __proc, char *__objp) __THROW; - -__END_DECLS - -#endif /* rpc/xdr.h */ diff --git a/mdk-stage1/dietlibc/include/sched.h b/mdk-stage1/dietlibc/include/sched.h deleted file mode 100644 index b6442c73b..000000000 --- a/mdk-stage1/dietlibc/include/sched.h +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef _SCHED_H -#define _SCHED_H 1 - -#include - -#include - -/* - * cloning flags: - */ -#define CSIGNAL 0x000000ff /* signal mask to be sent at exit */ -#define CLONE_VM 0x00000100 /* set if VM shared between processes */ -#define CLONE_FS 0x00000200 /* set if fs info shared between processes */ -#define CLONE_FILES 0x00000400 /* set if open files shared between processes */ -#define CLONE_SIGHAND 0x00000800 /* set if signal handlers and blocked signals shared */ -#define CLONE_PID 0x00001000 /* set if pid shared */ -#define CLONE_PTRACE 0x00002000 /* set if we want to let tracing continue on the child too */ -#define CLONE_VFORK 0x00004000 /* set if the parent wants the child to wake it up on mm_release */ -#define CLONE_PARENT 0x00008000 /* set if we want to have the same parent as the cloner */ -#define CLONE_THREAD 0x00010000 /* Same thread group? */ - -#define CLONE_SIGNAL (CLONE_SIGHAND | CLONE_THREAD) - -int clone(void*(*fn)(void*),void*stack,int flags,void*arg); - -/* - * Scheduling policies - */ -#define SCHED_OTHER 0 -#define SCHED_FIFO 1 -#define SCHED_RR 2 - -/* - * This is an additional bit set when we want to - * yield the CPU for one re-schedule.. - */ -#define SCHED_YIELD 0x10 - -struct sched_param { - int sched_priority; -}; - -/* END OF COPY form kernel-header */ - -int __sched_setparam(pid_t pid, const struct sched_param *p); -int sched_setparam(pid_t pid, const struct sched_param *p); - -int __sched_getparam(pid_t pid, struct sched_param *p); -int sched_getparam(pid_t pid, struct sched_param *p); - -int __sched_getscheduler(pid_t pid); -int sched_getscheduler(pid_t pid); - -int __sched_setscheduler(pid_t pid, int policy, const struct sched_param *p); -int sched_setscheduler(pid_t pid, int policy, const struct sched_param *p); - -int __sched_yield(void); -int sched_yield(void); - -int __sched_get_priority_max(int policy); -int sched_get_priority_max(int policy); - -int __sched_get_priority_min(int policy); -int sched_get_priority_min(int policy); - -int __sched_rr_get_interval(pid_t pid, struct timespec *tp); -int sched_rr_get_interval(pid_t pid, struct timespec *tp); - -#endif diff --git a/mdk-stage1/dietlibc/include/scsi/scsi.h b/mdk-stage1/dietlibc/include/scsi/scsi.h deleted file mode 100644 index 652e44ee9..000000000 --- a/mdk-stage1/dietlibc/include/scsi/scsi.h +++ /dev/null @@ -1,224 +0,0 @@ -/* Copyright (C) 1998, 1999 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* - * This header file contains public constants and structures used by - * the scsi code for linux. - */ - -#ifndef _SCSI_SCSI_H -#define _SCSI_SCSI_H 1 - -/* - * SCSI opcodes - */ - -#define TEST_UNIT_READY 0x00 -#define REZERO_UNIT 0x01 -#define REQUEST_SENSE 0x03 -#define FORMAT_UNIT 0x04 -#define READ_BLOCK_LIMITS 0x05 -#define REASSIGN_BLOCKS 0x07 -#define READ_6 0x08 -#define WRITE_6 0x0a -#define SEEK_6 0x0b -#define READ_REVERSE 0x0f -#define WRITE_FILEMARKS 0x10 -#define SPACE 0x11 -#define INQUIRY 0x12 -#define RECOVER_BUFFERED_DATA 0x14 -#define MODE_SELECT 0x15 -#define RESERVE 0x16 -#define RELEASE 0x17 -#define COPY 0x18 -#define ERASE 0x19 -#define MODE_SENSE 0x1a -#define START_STOP 0x1b -#define RECEIVE_DIAGNOSTIC 0x1c -#define SEND_DIAGNOSTIC 0x1d -#define ALLOW_MEDIUM_REMOVAL 0x1e - -#define SET_WINDOW 0x24 -#define READ_CAPACITY 0x25 -#define READ_10 0x28 -#define WRITE_10 0x2a -#define SEEK_10 0x2b -#define WRITE_VERIFY 0x2e -#define VERIFY 0x2f -#define SEARCH_HIGH 0x30 -#define SEARCH_EQUAL 0x31 -#define SEARCH_LOW 0x32 -#define SET_LIMITS 0x33 -#define PRE_FETCH 0x34 -#define READ_POSITION 0x34 -#define SYNCHRONIZE_CACHE 0x35 -#define LOCK_UNLOCK_CACHE 0x36 -#define READ_DEFECT_DATA 0x37 -#define MEDIUM_SCAN 0x38 -#define COMPARE 0x39 -#define COPY_VERIFY 0x3a -#define WRITE_BUFFER 0x3b -#define READ_BUFFER 0x3c -#define UPDATE_BLOCK 0x3d -#define READ_LONG 0x3e -#define WRITE_LONG 0x3f -#define CHANGE_DEFINITION 0x40 -#define WRITE_SAME 0x41 -#define READ_TOC 0x43 -#define LOG_SELECT 0x4c -#define LOG_SENSE 0x4d -#define MODE_SELECT_10 0x55 -#define RESERVE_10 0x56 -#define RELEASE_10 0x57 -#define MODE_SENSE_10 0x5a -#define PERSISTENT_RESERVE_IN 0x5e -#define PERSISTENT_RESERVE_OUT 0x5f -#define MOVE_MEDIUM 0xa5 -#define READ_12 0xa8 -#define WRITE_12 0xaa -#define WRITE_VERIFY_12 0xae -#define SEARCH_HIGH_12 0xb0 -#define SEARCH_EQUAL_12 0xb1 -#define SEARCH_LOW_12 0xb2 -#define READ_ELEMENT_STATUS 0xb8 -#define SEND_VOLUME_TAG 0xb6 -#define WRITE_LONG_2 0xea - -/* - * Status codes - */ - -#define GOOD 0x00 -#define CHECK_CONDITION 0x01 -#define CONDITION_GOOD 0x02 -#define BUSY 0x04 -#define INTERMEDIATE_GOOD 0x08 -#define INTERMEDIATE_C_GOOD 0x0a -#define RESERVATION_CONFLICT 0x0c -#define COMMAND_TERMINATED 0x11 -#define QUEUE_FULL 0x14 - -#define STATUS_MASK 0x3e - -/* - * SENSE KEYS - */ - -#define NO_SENSE 0x00 -#define RECOVERED_ERROR 0x01 -#define NOT_READY 0x02 -#define MEDIUM_ERROR 0x03 -#define HARDWARE_ERROR 0x04 -#define ILLEGAL_REQUEST 0x05 -#define UNIT_ATTENTION 0x06 -#define DATA_PROTECT 0x07 -#define BLANK_CHECK 0x08 -#define COPY_ABORTED 0x0a -#define ABORTED_COMMAND 0x0b -#define VOLUME_OVERFLOW 0x0d -#define MISCOMPARE 0x0e - - -/* - * DEVICE TYPES - */ - -#define TYPE_DISK 0x00 -#define TYPE_TAPE 0x01 -#define TYPE_PROCESSOR 0x03 /* HP scanners use this */ -#define TYPE_WORM 0x04 /* Treated as ROM by our system */ -#define TYPE_ROM 0x05 -#define TYPE_SCANNER 0x06 -#define TYPE_MOD 0x07 /* Magneto-optical disk - - * - treated as TYPE_DISK */ -#define TYPE_MEDIUM_CHANGER 0x08 -#define TYPE_ENCLOSURE 0x0d /* Enclosure Services Device */ -#define TYPE_NO_LUN 0x7f - -/* - * standard mode-select header prepended to all mode-select commands - * - * moved here from cdrom.h -- kraxel - */ - -struct ccs_modesel_head - { - unsigned char _r1; /* reserved. */ - unsigned char medium; /* device-specific medium type. */ - unsigned char _r2; /* reserved. */ - unsigned char block_desc_length; /* block descriptor length. */ - unsigned char density; /* device-specific density code. */ - unsigned char number_blocks_hi; /* number of blocks in this block - desc. */ - unsigned char number_blocks_med; - unsigned char number_blocks_lo; - unsigned char _r3; - unsigned char block_length_hi; /* block length for blocks in this - desc. */ - unsigned char block_length_med; - unsigned char block_length_lo; - }; - -/* - * MESSAGE CODES - */ - -#define COMMAND_COMPLETE 0x00 -#define EXTENDED_MESSAGE 0x01 -#define EXTENDED_MODIFY_DATA_POINTER 0x00 -#define EXTENDED_SDTR 0x01 -#define EXTENDED_EXTENDED_IDENTIFY 0x02 /* SCSI-I only */ -#define EXTENDED_WDTR 0x03 -#define SAVE_POINTERS 0x02 -#define RESTORE_POINTERS 0x03 -#define DISCONNECT 0x04 -#define INITIATOR_ERROR 0x05 -#define ABORT 0x06 -#define MESSAGE_REJECT 0x07 -#define NOP 0x08 -#define MSG_PARITY_ERROR 0x09 -#define LINKED_CMD_COMPLETE 0x0a -#define LINKED_FLG_CMD_COMPLETE 0x0b -#define BUS_DEVICE_RESET 0x0c - -#define INITIATE_RECOVERY 0x0f /* SCSI-II only */ -#define RELEASE_RECOVERY 0x10 /* SCSI-II only */ - -#define SIMPLE_QUEUE_TAG 0x20 -#define HEAD_OF_QUEUE_TAG 0x21 -#define ORDERED_QUEUE_TAG 0x22 - -/* - * Here are some scsi specific ioctl commands which are sometimes useful. - */ -/* These are a few other constants only used by scsi devices. */ - -#define SCSI_IOCTL_GET_IDLUN 0x5382 - -/* Used to turn on and off tagged queuing for scsi devices. */ - -#define SCSI_IOCTL_TAGGED_ENABLE 0x5383 -#define SCSI_IOCTL_TAGGED_DISABLE 0x5384 - -/* Used to obtain the host number of a device. */ -#define SCSI_IOCTL_PROBE_HOST 0x5385 - -/* Used to get the bus number for a device. */ -#define SCSI_IOCTL_GET_BUS_NUMBER 0x5386 - -#endif /* scsi/scsi.h */ diff --git a/mdk-stage1/dietlibc/include/scsi/scsi_ioctl.h b/mdk-stage1/dietlibc/include/scsi/scsi_ioctl.h deleted file mode 100644 index bc9931838..000000000 --- a/mdk-stage1/dietlibc/include/scsi/scsi_ioctl.h +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (C) 1999 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _SCSI_IOCTL_H -#define _SCSI_IOCTL_H - -/* IOCTLs for SCSI. */ -#define SCSI_IOCTL_SEND_COMMAND 1 /* Send a command to the SCSI host. */ -#define SCSI_IOCTL_TEST_UNIT_READY 2 /* Test if unit is ready. */ -#define SCSI_IOCTL_BENCHMARK_COMMAND 3 -#define SCSI_IOCTL_SYNC 4 /* Request synchronous parameters. */ -#define SCSI_IOCTL_START_UNIT 5 -#define SCSI_IOCTL_STOP_UNIT 6 -#define SCSI_IOCTL_DOORLOCK 0x5380 /* Lock the eject mechanism. */ -#define SCSI_IOCTL_DOORUNLOCK 0x5381 /* Unlock the mechanism. */ - -#endif - - diff --git a/mdk-stage1/dietlibc/include/scsi/sg.h b/mdk-stage1/dietlibc/include/scsi/sg.h deleted file mode 100644 index 00334654e..000000000 --- a/mdk-stage1/dietlibc/include/scsi/sg.h +++ /dev/null @@ -1,274 +0,0 @@ -/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* - History: - Started: Aug 9 by Lawrence Foard (entropy@world.std.com), to allow user - process control of SCSI devices. - Development Sponsored by Killy Corp. NY NY -*/ - -#ifndef _SCSI_SG_H -#define _SCSI_SG_H 1 - -#include - -/* New interface introduced in the 3.x SG drivers follows */ - -/* Same structure as used by readv() Linux system call. It defines one - scatter-gather element. */ -typedef struct sg_iovec -{ - void * iov_base; /* Starting address */ - size_t iov_len; /* Length in bytes */ -} sg_iovec_t; - - -typedef struct sg_io_hdr -{ - int interface_id; /* [i] 'S' for SCSI generic (required) */ - int dxfer_direction; /* [i] data transfer direction */ - unsigned char cmd_len; /* [i] SCSI command length ( <= 16 bytes) */ - unsigned char mx_sb_len; /* [i] max length to write to sbp */ - unsigned short int iovec_count; /* [i] 0 implies no scatter gather */ - unsigned int dxfer_len; /* [i] byte count of data transfer */ - void * dxferp; /* [i], [*io] points to data transfer memory - or scatter gather list */ - unsigned char * cmdp; /* [i], [*i] points to command to perform */ - unsigned char * sbp; /* [i], [*o] points to sense_buffer memory */ - unsigned int timeout; /* [i] MAX_UINT->no timeout (unit: millisec) */ - unsigned int flags; /* [i] 0 -> default, see SG_FLAG... */ - int pack_id; /* [i->o] unused internally (normally) */ - void * usr_ptr; /* [i->o] unused internally */ - unsigned char status; /* [o] scsi status */ - unsigned char masked_status;/* [o] shifted, masked scsi status */ - unsigned char msg_status; /* [o] messaging level data (optional) */ - unsigned char sb_len_wr; /* [o] byte count actually written to sbp */ - unsigned short int host_status; /* [o] errors from host adapter */ - unsigned short int driver_status;/* [o] errors from software driver */ - int resid; /* [o] dxfer_len - actual_transferred */ - unsigned int duration; /* [o] time taken by cmd (unit: millisec) */ - unsigned int info; /* [o] auxiliary information */ -} sg_io_hdr_t; - - -/* Use negative values to flag difference from original sg_header structure. */ -#define SG_DXFER_NONE -1 /* e.g. a SCSI Test Unit Ready command */ -#define SG_DXFER_TO_DEV -2 /* e.g. a SCSI WRITE command */ -#define SG_DXFER_FROM_DEV -3 /* e.g. a SCSI READ command */ -#define SG_DXFER_TO_FROM_DEV -4 /* treated like SG_DXFER_FROM_DEV with the - additional property than during indirect - IO the user buffer is copied into the - kernel buffers before the transfer */ - - -/* following flag values can be "or"-ed together */ -#define SG_FLAG_DIRECT_IO 1 /* default is indirect IO */ -#define SG_FLAG_LUN_INHIBIT 2 /* default is to put device's lun into */ - /* the 2nd byte of SCSI command */ -#define SG_FLAG_NO_DXFER 0x10000 /* no transfer of kernel buffers to/from */ - /* user space (debug indirect IO) */ - -/* The following 'info' values are "or"-ed together. */ -#define SG_INFO_OK_MASK 0x1 -#define SG_INFO_OK 0x0 /* no sense, host nor driver "noise" */ -#define SG_INFO_CHECK 0x1 /* something abnormal happened */ - -#define SG_INFO_DIRECT_IO_MASK 0x6 -#define SG_INFO_INDIRECT_IO 0x0 /* data xfer via kernel buffers (or no xfer) */ -#define SG_INFO_DIRECT_IO 0x2 /* direct IO requested and performed */ -#define SG_INFO_MIXED_IO 0x4 /* part direct, part indirect IO */ - - -/* Request information about a specific SG device, used by - SG_GET_SCSI_ID ioctl (). */ -struct sg_scsi_id { - /* Host number as in "scsi" where 'n' is one of 0, 1, 2 etc. */ - int host_no; - int channel; - /* SCSI id of target device. */ - int scsi_id; - int lun; - /* TYPE_... defined in . */ - int scsi_type; - /* Host (adapter) maximum commands per lun. */ - short int h_cmd_per_lun; - /* Device (or adapter) maximum queue length. */ - short int d_queue_depth; - /* Unused, set to 0 for now. */ - int unused[2]; -}; - -/* Used by SG_GET_REQUEST_TABLE ioctl(). */ -typedef struct sg_req_info { - char req_state; /* 0 -> not used, 1 -> written, 2 -> ready to read */ - char orphan; /* 0 -> normal request, 1 -> from interruped SG_IO */ - char sg_io_owned; /* 0 -> complete with read(), 1 -> owned by SG_IO */ - char problem; /* 0 -> no problem detected, 1 -> error to report */ - int pack_id; /* pack_id associated with request */ - void * usr_ptr; /* user provided pointer (in new interface) */ - unsigned int duration; /* millisecs elapsed since written (req_state==1) - or request duration (req_state==2) */ - int unused; -} sg_req_info_t; - - -/* IOCTLs: Those ioctls that are relevant to the SG 3.x drivers follow. - [Those that only apply to the SG 2.x drivers are at the end of the file.] - (_GET_s yield result via 'int *' 3rd argument unless otherwise indicated) */ - -#define SG_EMULATED_HOST 0x2203 /* true for emulated host adapter (ATAPI) */ - -/* Used to configure SCSI command transformation layer for ATAPI devices */ -/* Only supported by the ide-scsi driver */ -#define SG_SET_TRANSFORM 0x2204 /* N.B. 3rd arg is not pointer but value: */ - /* 3rd arg = 0 to disable transform, 1 to enable it */ -#define SG_GET_TRANSFORM 0x2205 - -#define SG_SET_RESERVED_SIZE 0x2275 /* request a new reserved buffer size */ -#define SG_GET_RESERVED_SIZE 0x2272 /* actual size of reserved buffer */ - -/* The following ioctl has a 'sg_scsi_id_t *' object as its 3rd argument. */ -#define SG_GET_SCSI_ID 0x2276 /* Yields fd's bus, chan, dev, lun + type */ -/* SCSI id information can also be obtained from SCSI_IOCTL_GET_IDLUN */ - -/* Override host setting and always DMA using low memory ( <16MB on i386) */ -#define SG_SET_FORCE_LOW_DMA 0x2279 /* 0-> use adapter setting, 1-> force */ -#define SG_GET_LOW_DMA 0x227a /* 0-> use all ram for dma; 1-> low dma ram */ - -/* When SG_SET_FORCE_PACK_ID set to 1, pack_id is input to read() which - tries to fetch a packet with a matching pack_id, waits, or returns EAGAIN. - If pack_id is -1 then read oldest waiting. When ...FORCE_PACK_ID set to 0 - then pack_id ignored by read() and oldest readable fetched. */ -#define SG_SET_FORCE_PACK_ID 0x227b -#define SG_GET_PACK_ID 0x227c /* Yields oldest readable pack_id (or -1) */ - -#define SG_GET_NUM_WAITING 0x227d /* Number of commands awaiting read() */ - -/* Yields max scatter gather tablesize allowed by current host adapter */ -#define SG_GET_SG_TABLESIZE 0x227F /* 0 implies can't do scatter gather */ - -#define SG_GET_VERSION_NUM 0x2282 /* Example: version 2.1.34 yields 20134 */ - -/* Returns -EBUSY if occupied. 3rd argument pointer to int (see next) */ -#define SG_SCSI_RESET 0x2284 -/* Associated values that can be given to SG_SCSI_RESET follow */ -#define SG_SCSI_RESET_NOTHING 0 -#define SG_SCSI_RESET_DEVICE 1 -#define SG_SCSI_RESET_BUS 2 -#define SG_SCSI_RESET_HOST 3 - -/* synchronous SCSI command ioctl, (only in version 3 interface) */ -#define SG_IO 0x2285 /* similar effect as write() followed by read() */ - -#define SG_GET_REQUEST_TABLE 0x2286 /* yields table of active requests */ - -/* How to treat EINTR during SG_IO ioctl(), only in SG 3.x series */ -#define SG_SET_KEEP_ORPHAN 0x2287 /* 1 -> hold for read(), 0 -> drop (def) */ -#define SG_GET_KEEP_ORPHAN 0x2288 - - -#define SG_SCATTER_SZ (8 * 4096) /* PAGE_SIZE not available to user */ -/* Largest size (in bytes) a single scatter-gather list element can have. - The value must be a power of 2 and <= (PAGE_SIZE * 32) [131072 bytes on - i386]. The minimum value is PAGE_SIZE. If scatter-gather not supported - by adapter then this value is the largest data block that can be - read/written by a single scsi command. The user can find the value of - PAGE_SIZE by calling getpagesize() defined in unistd.h . */ - -#define SG_DEFAULT_RETRIES 1 - -/* Defaults, commented if they differ from original sg driver */ -#define SG_DEF_FORCE_LOW_DMA 0 /* was 1 -> memory below 16MB on i386 */ -#define SG_DEF_FORCE_PACK_ID 0 -#define SG_DEF_KEEP_ORPHAN 0 -#define SG_DEF_RESERVED_SIZE SG_SCATTER_SZ /* load time option */ - -/* maximum outstanding requests, write() yields EDOM if exceeded */ -#define SG_MAX_QUEUE 16 - -#define SG_BIG_BUFF SG_DEF_RESERVED_SIZE /* for backward compatibility */ - -/* Alternate style type names, "..._t" variants preferred */ -typedef struct sg_io_hdr Sg_io_hdr; -typedef struct sg_io_vec Sg_io_vec; -typedef struct sg_scsi_id Sg_scsi_id; -typedef struct sg_req_info Sg_req_info; - - -/* vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv */ -/* The older SG interface based on the 'sg_header' structure follows. */ -/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */ - -#define SG_MAX_SENSE 16 /* this only applies to the sg_header interface */ - -struct sg_header - { - /* Length of incoming packet (including header). */ - int pack_len; - /* Maximal length of expected reply. */ - int reply_len; - /* Id number of packet. */ - int pack_id; - /* 0==ok, otherwise error number. */ - int result; - /* Force 12 byte command length for group 6 & 7 commands. */ - unsigned int twelve_byte:1; - /* SCSI status from target. */ - unsigned int target_status:5; - /* Host status (see "DID" codes). */ - unsigned int host_status:8; - /* Driver status+suggestion. */ - unsigned int driver_status:8; - /* Unused. */ - unsigned int other_flags:10; - /* Output in 3 cases: - when target_status is CHECK_CONDITION or - when target_status is COMMAND_TERMINATED or - when (driver_status & DRIVER_SENSE) is true. */ - unsigned char sense_buffer[SG_MAX_SENSE]; - }; - - -/* IOCTLs: The following are not required (or ignored) when the sg_io_hdr_t - interface is used. They are kept for backward compatibility with - the original and version 2 drivers. */ - -#define SG_SET_TIMEOUT 0x2201 /* Set timeout; *(int *)arg==timeout. */ -#define SG_GET_TIMEOUT 0x2202 /* Get timeout; return timeout. */ - -/* Get/set command queuing state per fd (default is SG_DEF_COMMAND_Q). */ -#define SG_GET_COMMAND_Q 0x2270 /* Yields 0 (queuing off) or 1 (on). */ -#define SG_SET_COMMAND_Q 0x2271 /* Change queuing state with 0 or 1. */ - -/* Turn on error sense trace (1..8), dump this device to log/console (9) - or dump all sg device states ( >9 ) to log/console. */ -#define SG_SET_DEBUG 0x227e /* 0 -> turn off debug */ - -#define SG_NEXT_CMD_LEN 0x2283 /* Override SCSI command length with given - number on the next write() on this file - descriptor. */ - -/* Defaults, commented if they differ from original sg driver */ -#define SG_DEFAULT_TIMEOUT (60*HZ) /* HZ == 'jiffies in 1 second' */ -#define SG_DEF_COMMAND_Q 0 /* command queuing is always on when - the new interface is used */ -#define SG_DEF_UNDERRUN_FLAG 0 - - -#endif /* scsi/sg.h */ diff --git a/mdk-stage1/dietlibc/include/setjmp.h b/mdk-stage1/dietlibc/include/setjmp.h deleted file mode 100644 index b591936ac..000000000 --- a/mdk-stage1/dietlibc/include/setjmp.h +++ /dev/null @@ -1,231 +0,0 @@ -#ifndef _SETJMP_H -#define _SETJMP_H - -#include - -#ifdef __i386__ -#ifndef __ASSEMBLER__ -typedef int __jmp_buf[6]; -#endif -# define JB_BX 0 -# define JB_SI 1 -# define JB_DI 2 -# define JB_BP 3 -# define JB_SP 4 -# define JB_PC 5 -# define JB_SIZE 24 -#endif - -#ifdef __x86_64__ -#ifndef __ASSEMBLER__ -typedef long __jmp_buf[8]; -#endif -# define JB_RBX 0 -# define JB_RBP 1 -# define JB_R12 2 -# define JB_R13 3 -# define JB_R14 4 -# define JB_R15 5 -# define JB_RSP 6 -# define JB_PC 7 -# define JB_SIZE 64 -#endif - -#ifdef __s390__ -#ifndef __ASSEMBLER__ -typedef struct { - long int gregs[10]; - long fpregs[4]; -} __jmp_buf[1]; -#endif -#define __JB_GPR6 0 -#define __JB_GPR7 1 -#define __JB_GPR8 2 -#define __JB_GPR9 3 -#define __JB_GPR10 4 -#define __JB_GPR11 5 -#define __JB_GPR12 6 -#define __JB_GPR13 7 -#define __JB_GPR14 8 -#define __JB_GPR15 9 - -#define _JMPBUF_UNWINDS(jmpbuf, address) ((int) (address) < (jmpbuf)->gregs[__JB_GPR15]) -#endif - -#ifdef __alpha__ -#define JB_S0 0 -#define JB_S1 1 -#define JB_S2 2 -#define JB_S3 3 -#define JB_S4 4 -#define JB_S5 5 -#define JB_PC 6 -#define JB_FP 7 -#define JB_SP 8 -#define JB_F2 9 -#define JB_F3 10 -#define JB_F4 11 -#define JB_F5 12 -#define JB_F6 13 -#define JB_F7 14 -#define JB_F8 15 -#define JB_F9 16 -#ifndef __ASSEMBLER__ -typedef long int __jmp_buf[17]; -#endif -#endif - -#ifdef __mips__ -#ifndef __ASSEMBLER__ -typedef struct - { - void * __pc; /* Program counter. */ - void * __sp; /* Stack pointer. */ - int __regs[8]; /* Callee-saved registers s0 through s7. */ - void * __fp; /* The frame pointer. */ - void * __gp; /* The global pointer. */ - int __fpc_csr; /* Floating point status register. */ - double __fpregs[6]; /* Callee-saved floating point registers. */ - } __jmp_buf[1]; -#endif -#endif - -#ifdef __sparc__ -#ifdef __arch64__ - -#define MC_TSTATE 0 -#define MC_PC 1 -#define MC_NPC 2 -#define MC_Y 3 -#define MC_G1 4 -#define MC_G2 5 -#define MC_G3 6 -#define MC_G4 7 -#define MC_G5 8 -#define MC_G6 9 -#define MC_G7 10 -#define MC_O0 11 -#define MC_O1 12 -#define MC_O2 13 -#define MC_O3 14 -#define MC_O4 15 -#define MC_O5 16 -#define MC_O6 17 -#define MC_O7 18 -#define MC_NGREG 19 - -#define FLAG_SAVEMASK 512 -#ifndef __ASSEMBLER__ -#include - -/* this equal to ucontext from "include/asm-sparc64/uctx.h" */ -typedef struct __sparc64_jmp_buf { - struct __sparc64_jmp_buf *uc_link; - unsigned long uc_flags; - sigset_t uc_sigmask; - struct { - unsigned long mc_gregs[MC_NGREG]; - unsigned long mc_fp; - unsigned long mc_i7; - struct { - union { - unsigned int sregs[32]; - unsigned long dregs[32]; - long double qregs[16]; - } mcfpu_fregs; - unsigned long mcfpu_fsr; - unsigned long mcfpu_fprs; - unsigned long mcfpu_gsr; - struct { - unsigned long *mcfq_addr; - unsigned int mcfq_insn; - } *mcfpu_fq; - unsigned char mcfpu_qcnt; - unsigned char mcfpu_qentsz; - unsigned char mcfpu_enab; - } mc_fpregs; - } uc_mcontext; -} __jmp_buf[1]; - -#endif - -#else - -#define JB_SP 0 -#define JB_FP 1 -#define JB_PC 2 -#ifndef __ASSEMBLER__ -typedef int __jmp_buf[3]; -#endif - -#endif -#endif - -#ifdef __arm__ -#define __JMP_BUF_SP 8 -#ifndef __ASSEMBLER__ -typedef int __jmp_buf[24]; -#endif -#endif - -#ifdef __powerpc__ -# define JB_GPR1 0 /* Also known as the stack pointer */ -# define JB_GPR2 1 -# define JB_LR 2 /* The address we will return to */ -# define JB_GPRS 3 /* GPRs 14 through 31 are saved, 18 in total */ -# define JB_CR 21 /* Condition code registers. */ -# define JB_FPRS 22 /* FPRs 14 through 31 are saved, 18*2 words total */ -# define JB_SIZE (58*4) -#ifndef __ASSEMBLER__ -typedef long int __jmp_buf[58]; -#endif -#endif - -#ifdef __hppa__ -#ifndef __ASSEMBLER__ -typedef double __jmp_buf[21]; -#endif -#endif - -#ifdef __ia64__ -#ifndef __ASSEMBLER__ -typedef long __jmp_buf[70] __attribute__ ((aligned(16))); -#endif -#endif - -#ifndef __ASSEMBLER__ -#include - -/* typedef int sig_atomic_t; */ -#define __sig_atomic_t sig_atomic_t - -/* Calling environment, plus possibly a saved signal mask. */ -typedef struct __jmp_buf_tag { /* C++ doesn't like tagless structs. */ -/* NOTE: The machine-dependent definitions of `__sigsetjmp' - * assume that a `jmp_buf' begins with a `__jmp_buf'. - * Do not move this member or add others before it. */ - __jmp_buf __jmpbuf; /* Calling environment. */ - int __mask_was_saved; /* Saved the signal mask? */ - sigset_t __saved_mask; /* Saved signal mask. */ -} jmp_buf[1]; - -extern int __sigsetjmp(jmp_buf __env,int __savemask) __THROW; - -extern void longjmp(jmp_buf __env,int __val) - __THROW __attribute__((__noreturn__)); - -typedef jmp_buf sigjmp_buf; - -extern void siglongjmp(sigjmp_buf __env,int __val) - __THROW __attribute__((__noreturn__)); - -#ifdef _BSD_SOURCE -#define setjmp(env) __sigsetjmp(env,1) -#else -#define setjmp(env) __sigsetjmp(env,0) -#endif -#define sigsetjmp(a,b) __sigsetjmp(a,b) - -#endif - -#endif diff --git a/mdk-stage1/dietlibc/include/shadow.h b/mdk-stage1/dietlibc/include/shadow.h deleted file mode 100644 index 1c84de9e6..000000000 --- a/mdk-stage1/dietlibc/include/shadow.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef _SHADOW_H -#define _SHADOW_H - -#include -#include - -struct spwd { - char *sp_namp; /* user login name */ - char *sp_pwdp; /* encrypted password */ - long sp_lstchg; /* last password change */ - int sp_min; /* days until change allowed. */ - int sp_max; /* days before change required */ - int sp_warn; /* days warning for expiration */ - int sp_inact; /* days before account inactive */ - int sp_expire; /* date when account expires */ - int sp_flag; /* reserved for future use */ -}; - -extern struct spwd *getspent(void) __THROW; -extern void setspent(void) __THROW; -extern void endspent(void) __THROW; -extern struct spwd *getspnam (const char *__name) __THROW; - -int getspent_r(struct spwd *res, char *buf, size_t buflen, - struct spwd **res_sig) __THROW; -int getspnam_r(const char* name, - struct spwd *res, char *buf, size_t buflen, - struct spwd **res_sig) __THROW; - -#endif /* _SHADOW_H */ diff --git a/mdk-stage1/dietlibc/include/signal.h b/mdk-stage1/dietlibc/include/signal.h deleted file mode 100644 index fdc0518cf..000000000 --- a/mdk-stage1/dietlibc/include/signal.h +++ /dev/null @@ -1,500 +0,0 @@ -#ifndef _SIGNAL_H -#define _SIGNAL_H - -#include - -#define __WANT_POSIX1B_SIGNALS__ - -#include -#include - -#define NSIG 32 - -#ifdef __mips__ -#define _NSIG 128 -#else -#define _NSIG 64 -#endif - -#define SIGHUP 1 -#define SIGINT 2 -#define SIGQUIT 3 -#define SIGILL 4 -#define SIGTRAP 5 -#define SIGABRT 6 -#define SIGIOT 6 -#define SIGFPE 8 -#define SIGKILL 9 -#define SIGSEGV 11 -#define SIGPIPE 13 -#define SIGALRM 14 -#define SIGTERM 15 -#define SIGUNUSED 31 -#if defined(__i386__) || defined(__x86_64__) || defined(__powerpc__) || defined(__arm__) \ - || defined(__s390__) || defined(__ia64__) -#define SIGBUS 7 -#define SIGUSR1 10 -#define SIGUSR2 12 -#define SIGSTKFLT 16 -#define SIGCHLD 17 -#define SIGCONT 18 -#define SIGSTOP 19 -#define SIGTSTP 20 -#define SIGTTIN 21 -#define SIGTTOU 22 -#define SIGURG 23 -#define SIGXCPU 24 -#define SIGXFSZ 25 -#define SIGVTALRM 26 -#define SIGPROF 27 -#define SIGWINCH 28 -#define SIGIO 29 -#define SIGPWR 30 -#define SIGSYS 31 -#elif defined(__alpha__) || defined(__sparc__) -#define SIGEMT 7 -#define SIGBUS 10 -#define SIGSYS 12 -#define SIGURG 16 -#define SIGSTOP 17 -#define SIGTSTP 18 -#define SIGCONT 19 -#define SIGCHLD 20 -#define SIGTTIN 21 -#define SIGTTOU 22 -#define SIGIO 23 -#define SIGXCPU 24 -#define SIGXFSZ 25 -#define SIGVTALRM 26 -#define SIGPROF 27 -#define SIGWINCH 28 -#define SIGPWR 29 -#define SIGUSR1 30 -#define SIGUSR2 31 -#if defined(__alpha__) -#define SIGINFO SIGPWR -#endif -#elif defined(__mips__) -#define SIGEMT 7 -#define SIGBUS 10 -#define SIGSYS 12 -#define SIGUSR1 16 -#define SIGUSR2 17 -#define SIGCHLD 18 -#define SIGPWR 19 -#define SIGWINCH 20 -#define SIGURG 21 -#define SIGIO 22 -#define SIGSTOP 23 -#define SIGTSTP 24 -#define SIGCONT 25 -#define SIGTTIN 26 -#define SIGTTOU 27 -#define SIGVTALRM 28 -#define SIGPROF 29 -#define SIGXCPU 30 -#define SIGXFSZ 31 -#elif defined(__hppa__) -#define SIGEMT 7 -#define SIGBUS 10 -#define SIGSYS 12 -#define SIGUSR1 16 -#define SIGUSR2 17 -#define SIGCHLD 18 -#define SIGPWR 19 -#define SIGVTALRM 20 -#define SIGPROF 21 -#define SIGIO 22 -#define SIGWINCH 23 -#define SIGSTOP 24 -#define SIGTSTP 25 -#define SIGCONT 26 -#define SIGTTIN 27 -#define SIGTTOU 28 -#define SIGURG 29 -#define SIGLOST 30 -#define SIGUNUSED 31 -#define SIGRESERVE SIGUNUSE -#define SIGXCPU 33 -#define SIGXFSZ 34 -#define SIGSTKFLT 36 - -#else -#error signal layout not yet known -#endif - -#define SIGCLD SIGCHLD -#define SIGLOST SIGPWR -#define SIGPOLL SIGIO - -/* These should not be considered constants from userland. */ -#ifdef __hppa__ -#define SIGRTMIN 37 -#else -#define SIGRTMIN 32 -#endif -#define SIGRTMAX (_NSIG-1) - -/* SA_FLAGS values: */ -#if defined(__alpha__) -#define SA_ONSTACK 0x00000001 -#define SA_RESTART 0x00000002 -#define SA_NOCLDSTOP 0x00000004 -#define SA_NODEFER 0x00000008 -#define SA_RESETHAND 0x00000010 -#define SA_NOCLDWAIT 0x00000020 /* not supported yet */ -#define SA_SIGINFO 0x00000040 -#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ -#elif defined(__hppa__) -#define SA_ONSTACK 0x00000001 -#define SA_RESETHAND 0x00000004 -#define SA_NOCLDSTOP 0x00000008 -#define SA_SIGINFO 0x00000010 -#define SA_NODEFER 0x00000020 -#define SA_RESTART 0x00000040 -#define SA_NOCLDWAIT 0x00000080 /* not supported yet */ -#define _SA_SIGGFAULT 0x00000100 /* HPUX */ -#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ -#define SA_RESTORER 0x04000000 /* obsolete -- ignored */ -#elif defined (__sparc__) -#define SV_SSTACK 1 /* This signal handler should use sig-stack */ -#define SV_INTR 2 /* Sig return should not restart system call */ -#define SV_RESET 4 /* Set handler to SIG_DFL upon taken signal */ -#define SV_IGNCHILD 8 /* Do not send SIGCHLD */ - -#define SA_NOCLDSTOP SV_IGNCHILD -#define SA_STACK SV_SSTACK -#define SA_ONSTACK SV_SSTACK -#define SA_RESTART SV_INTR -#define SA_RESETHAND SV_RESET -#define SA_INTERRUPT 0x10 -#define SA_NODEFER 0x20 -#define SA_SHIRQ 0x40 -#define SA_NOCLDWAIT 0x100 /* not supported yet */ -#define SA_SIGINFO 0x200 -#else -#if defined (__mips__) -#define SA_NOCLDSTOP 0x00000001 -#define SA_SIGINFO 0x00000008 -#define SA_NOCLDWAIT 0x00010000 /* Not supported yet */ -#else -#define SA_NOCLDSTOP 0x00000001 -#define SA_NOCLDWAIT 0x00000002 /* not supported yet */ -#define SA_SIGINFO 0x00000004 -#endif -#if defined(__arm__) -#define SA_THIRTYTWO 0x02000000 -#endif -#define SA_RESTORER 0x04000000 -#define SA_ONSTACK 0x08000000 -#define SA_RESTART 0x10000000 -#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ -#define SA_NODEFER 0x40000000 -#define SA_RESETHAND 0x80000000 -#endif - -/* ugh, historic Linux legacy, for gpm :-( */ -#define SA_NOMASK SA_NODEFER -#define SA_ONESHOT SA_RESETHAND - -/* sigaltstack controls */ -#define SS_ONSTACK 1 -#define SS_DISABLE 2 - -#define MINSIGSTKSZ 2048 -#define SIGSTKSZ 8192 - -#if defined(__alpha__) || defined(__mips__) -#define SIG_BLOCK 1 /* for blocking signals */ -#define SIG_UNBLOCK 2 /* for unblocking signals */ -#define SIG_SETMASK 3 /* for setting the signal mask */ -#else -#define SIG_BLOCK 0 /* for blocking signals */ -#define SIG_UNBLOCK 1 /* for unblocking signals */ -#define SIG_SETMASK 2 /* for setting the signal mask */ -#endif - -typedef int sig_atomic_t; - -typedef void (*sighandler_t)(int); - -#ifdef _BSD_SOURCE -typedef sighandler_t sig_t; -#endif - -#define SIG_DFL ((sighandler_t)0) /* default signal handling */ -#define SIG_IGN ((sighandler_t)1) /* ignore signal */ -#define SIG_ERR ((sighandler_t)-1) /* error return from signal */ - -typedef union sigval { - int sival_int; - void *sival_ptr; -} sigval_t; - -#define SI_MAX_SIZE 128 -#define SI_PAD_SIZE ((SI_MAX_SIZE/sizeof(int)) - 3) - -typedef struct siginfo { - int si_signo; - int si_errno; - int si_code; - union { - int _pad[SI_PAD_SIZE]; - /* kill() */ - struct { - pid_t _pid; /* sender's pid */ - uid_t _uid; /* sender's uid */ - } _kill; - /* POSIX.1b timers */ - struct { - unsigned int _timer1; - unsigned int _timer2; - } _timer; - /* POSIX.1b signals */ - struct { - pid_t _pid; /* sender's pid */ - uid_t _uid; /* sender's uid */ - sigval_t _sigval; - } _rt; - /* SIGCHLD */ - struct { - pid_t _pid; /* which child */ - uid_t _uid; /* sender's uid */ - int _status; /* exit code */ - clock_t _utime; - clock_t _stime; - } _sigchld; - /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */ - struct { - void *_addr; /* faulting insn/memory ref. */ - } _sigfault; - /* SIGPOLL */ - struct { - int _band; /* POLL_IN, POLL_OUT, POLL_MSG */ - int _fd; - } _sigpoll; - } _sifields; -} siginfo_t; - -/* - * How these fields are to be accessed. - */ -#define si_pid _sifields._kill._pid -#define si_uid _sifields._kill._uid -#define si_status _sifields._sigchld._status -#define si_utime _sifields._sigchld._utime -#define si_stime _sifields._sigchld._stime -#define si_value _sifields._rt._sigval -#define si_int _sifields._rt._sigval.sival_int -#define si_ptr _sifields._rt._sigval.sival_ptr -#define si_addr _sifields._sigfault._addr -#define si_band _sifields._sigpoll._band -#define si_fd _sifields._sigpoll._fd - -/* Values for `si_code'. Positive values are reserved for kernel-generated - signals. */ -enum { - SI_ASYNCNL = -6, /* Sent by asynch name lookup completion. */ -# define SI_ASYNCNL SI_ASYNCNL - SI_SIGIO, /* Sent by queued SIGIO. */ -# define SI_SIGIO SI_SIGIO - SI_ASYNCIO, /* Sent by AIO completion. */ -# define SI_ASYNCIO SI_ASYNCIO - SI_MESGQ, /* Sent by real time mesq state change. */ -# define SI_MESGQ SI_MESGQ - SI_TIMER, /* Sent by timer expiration. */ -# define SI_TIMER SI_TIMER - SI_QUEUE, /* Sent by sigqueue. */ -# define SI_QUEUE SI_QUEUE - SI_USER, /* Sent by kill, sigsend, raise. */ -# define SI_USER SI_USER - SI_KERNEL = 0x80 /* Send by kernel. */ -#define SI_KERNEL SI_KERNEL -}; - - -/* `si_code' values for SIGILL signal. */ -enum { - ILL_ILLOPC = 1, /* Illegal opcode. */ -# define ILL_ILLOPC ILL_ILLOPC - ILL_ILLOPN, /* Illegal operand. */ -# define ILL_ILLOPN ILL_ILLOPN - ILL_ILLADR, /* Illegal addressing mode. */ -# define ILL_ILLADR ILL_ILLADR - ILL_ILLTRP, /* Illegal trap. */ -# define ILL_ILLTRP ILL_ILLTRP - ILL_PRVOPC, /* Privileged opcode. */ -# define ILL_PRVOPC ILL_PRVOPC - ILL_PRVREG, /* Privileged register. */ -# define ILL_PRVREG ILL_PRVREG - ILL_COPROC, /* Coprocessor error. */ -# define ILL_COPROC ILL_COPROC - ILL_BADSTK /* Internal stack error. */ -# define ILL_BADSTK ILL_BADSTK -}; - -/* `si_code' values for SIGFPE signal. */ -enum { - FPE_INTDIV = 1, /* Integer divide by zero. */ -# define FPE_INTDIV FPE_INTDIV - FPE_INTOVF, /* Integer overflow. */ -# define FPE_INTOVF FPE_INTOVF - FPE_FLTDIV, /* Floating point divide by zero. */ -# define FPE_FLTDIV FPE_FLTDIV - FPE_FLTOVF, /* Floating point overflow. */ -# define FPE_FLTOVF FPE_FLTOVF - FPE_FLTUND, /* Floating point underflow. */ -# define FPE_FLTUND FPE_FLTUND - FPE_FLTRES, /* Floating point inexact result. */ -# define FPE_FLTRES FPE_FLTRES - FPE_FLTINV, /* Floating point invalid operation. */ -# define FPE_FLTINV FPE_FLTINV - FPE_FLTSUB /* Subscript out of range. */ -# define FPE_FLTSUB FPE_FLTSUB -}; - -/* `si_code' values for SIGSEGV signal. */ -enum { - SEGV_MAPERR = 1, /* Address not mapped to object. */ -# define SEGV_MAPERR SEGV_MAPERR - SEGV_ACCERR /* Invalid permissions for mapped object. */ -# define SEGV_ACCERR SEGV_ACCERR -}; - -/* `si_code' values for SIGBUS signal. */ -enum { - BUS_ADRALN = 1, /* Invalid address alignment. */ -# define BUS_ADRALN BUS_ADRALN - BUS_ADRERR, /* Non-existant physical address. */ -# define BUS_ADRERR BUS_ADRERR - BUS_OBJERR /* Object specific hardware error. */ -# define BUS_OBJERR BUS_OBJERR -}; - -/* `si_code' values for SIGTRAP signal. */ -enum { - TRAP_BRKPT = 1, /* Process breakpoint. */ -# define TRAP_BRKPT TRAP_BRKPT - TRAP_TRACE /* Process trace trap. */ -# define TRAP_TRACE TRAP_TRACE -}; - -/* `si_code' values for SIGCHLD signal. */ -enum { - CLD_EXITED = 1, /* Child has exited. */ -# define CLD_EXITED CLD_EXITED - CLD_KILLED, /* Child was killed. */ -# define CLD_KILLED CLD_KILLED - CLD_DUMPED, /* Child terminated abnormally. */ -# define CLD_DUMPED CLD_DUMPED - CLD_TRAPPED, /* Traced child has trapped. */ -# define CLD_TRAPPED CLD_TRAPPED - CLD_STOPPED, /* Child has stopped. */ -# define CLD_STOPPED CLD_STOPPED - CLD_CONTINUED /* Stopped child has continued. */ -# define CLD_CONTINUED CLD_CONTINUED -}; - -/* `si_code' values for SIGPOLL signal. */ -enum { - POLL_IN = 1, /* Data input available. */ -# define POLL_IN POLL_IN - POLL_OUT, /* Output buffers available. */ -# define POLL_OUT POLL_OUT - POLL_MSG, /* Input message available. */ -# define POLL_MSG POLL_MSG - POLL_ERR, /* I/O error. */ -# define POLL_ERR POLL_ERR - POLL_PRI, /* High priority input available. */ -# define POLL_PRI POLL_PRI - POLL_HUP /* Device disconnected. */ -# define POLL_HUP POLL_HUP -}; - -#define _NSIG_WORDS ((_NSIG/sizeof(long))>>3) - -typedef struct { - unsigned long sig[_NSIG_WORDS]; -} sigset_t; - -struct sigaction { -#if defined(__alpha__) - union { - sighandler_t _sa_handler; - void (*_sa_sigaction)(int, siginfo_t*, void*); - } _u; - sigset_t sa_mask; - unsigned long sa_flags; -#elif defined(__ia64__) || defined(__hppa__) - union { - sighandler_t _sa_handler; - void (*_sa_sigaction)(int, siginfo_t*, void*); - } _u; - unsigned long sa_flags; - sigset_t sa_mask; -#elif defined(__mips__) - unsigned long sa_flags; - union { - sighandler_t _sa_handler; - void (*_sa_sigaction)(int, siginfo_t*, void*); - } _u; - sigset_t sa_mask; - void (*sa_restorer)(void); - int sa_resv[1]; -#else /* arm, i386, ppc, s390, sparc, saprc64, x86_64 */ - union { - sighandler_t _sa_handler; - void (*_sa_sigaction)(int, siginfo_t*, void*); - } _u; - unsigned long sa_flags; - void (*sa_restorer)(void); - sigset_t sa_mask; -#endif -}; - -#define sa_handler _u._sa_handler -#define sa_sigaction _u._sa_sigaction - -typedef struct sigaltstack { -#if defined(__mips__) - void *ss_sp; - size_t ss_size; - int ss_flags; -#else - void *ss_sp; - int ss_flags; - size_t ss_size; -#endif -} stack_t; - -int sigaltstack(const struct sigaltstack *newstack, struct sigaltstack *oldstack) __THROW; - -int sigemptyset(sigset_t *set) __THROW; -int sigfillset(sigset_t *set) __THROW; -int sigaddset(sigset_t *set, int signum) __THROW; -int sigdelset(sigset_t *set, int signum) __THROW; -int sigismember(const sigset_t *set, int signo) __THROW; -int sigsuspend(const sigset_t *mask) __THROW; -int sigpending(sigset_t *set) __THROW; -int sigprocmask(int how, const sigset_t *set, sigset_t *oldset) __THROW; - - -sighandler_t signal(int signum, sighandler_t action); - -int raise (int sig) __THROW; -int kill(pid_t pid, int sig) __THROW; - -int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact) __THROW; - -int sigtimedwait(const sigset_t *mask, siginfo_t *info, const struct timespec *ts) __THROW; -int sigqueueinfo(int pid, int sig, siginfo_t *info) __THROW; -int siginterrupt(int sig, int flag) __THROW; - -int killpg(int pgrp, int sig) __THROW; - -/* 0 is OK ! kernel puts in MAX_THREAD_TIMEOUT :) */ -#define sigwaitinfo(m, i) sigtimedwait((m),(i),0) - -extern const char *const sys_siglist[]; - -#endif diff --git a/mdk-stage1/dietlibc/include/stdarg-cruft.h b/mdk-stage1/dietlibc/include/stdarg-cruft.h deleted file mode 100644 index fbd9e0ca4..000000000 --- a/mdk-stage1/dietlibc/include/stdarg-cruft.h +++ /dev/null @@ -1,299 +0,0 @@ -#if defined(__sparc__) || defined(__alpha__) || defined(__mips__) -enum { - __no_type_class = -1, - __void_type_class, - __integer_type_class, - __char_type_class, - __enumeral_type_class, - __boolean_type_class, - __pointer_type_class, - __reference_type_class, - __offset_type_class, - __real_type_class, - __complex_type_class, - __function_type_class, - __method_type_class, - __record_type_class, - __union_type_class, - __array_type_class, - __string_type_class, - __set_type_class, - __file_type_class, - __lang_type_class -}; -#endif - -#if defined(__sparc__) - -typedef char* va_list; -#define va_end(ap) ap=0 - -#define va_start(AP, LASTARG) \ - (__builtin_next_arg (LASTARG), AP = (char *) __builtin_saveregs ()) - -#define __va_rounded_size(TYPE) \ - (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int)) - -/* We don't declare the union member `d' to have type TYPE - because that would lose in C++ if TYPE has a constructor. */ -/* We cast to void * and then to TYPE * because this avoids - a warning about increasing the alignment requirement. - The casts to char * avoid warnings about invalid pointer arithmetic. */ -#define va_arg(pvar,TYPE) \ -__extension__ \ -(*({((__builtin_classify_type (*(TYPE*) 0) >= __record_type_class \ - || (__builtin_classify_type (*(TYPE*) 0) == __real_type_class \ - && sizeof (TYPE) == 16)) \ - ? ((pvar) = (char *)(pvar) + __va_rounded_size (TYPE *), \ - *(TYPE **) (void *) ((char *)(pvar) - __va_rounded_size (TYPE *))) \ - : __va_rounded_size (TYPE) == 8 \ - ? ({ union {char __d[sizeof (TYPE)]; int __i[2];} __u; \ - __u.__i[0] = ((int *) (void *) (pvar))[0]; \ - __u.__i[1] = ((int *) (void *) (pvar))[1]; \ - (pvar) = (char *)(pvar) + 8; \ - (TYPE *) (void *) __u.__d; }) \ - : ((pvar) = (char *)(pvar) + __va_rounded_size (TYPE), \ - ((TYPE *) (void *) ((char *)(pvar) - __va_rounded_size (TYPE)))));})) - - -#elif defined(__mips__) - -typedef char * va_list; - -#ifdef __mips64 -#define __va_rounded_size(__TYPE) \ - (((sizeof (__TYPE) + 8 - 1) / 8) * 8) -#else -#define __va_rounded_size(__TYPE) \ - (((sizeof (__TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int)) -#endif -#ifdef __mips64 -#define __va_reg_size 8 -#else -#define __va_reg_size 4 -#endif - -#define va_start(__AP, __LASTARG) \ - (__AP = (va_list) __builtin_next_arg (__LASTARG)) - -#ifdef __mips64 -#ifdef __MIPSEB__ -#define va_arg(__AP, __type) \ - ((__type *) (void *) (__AP = (char *) \ - ((((__PTRDIFF_TYPE__)__AP + 8 - 1) & -8) \ - + __va_rounded_size (__type))))[-1] -#else -#define va_arg(__AP, __type) \ - ((__AP = (char *) ((((__PTRDIFF_TYPE__)__AP + 8 - 1) & -8) \ - + __va_rounded_size (__type))), \ - *(__type *) (void *) (__AP - __va_rounded_size (__type))) -#endif - -#else /* not __mips64 */ - -#ifdef __MIPSEB__ -/* For big-endian machines. */ -#define va_arg(__AP, __type) \ - ((__AP = (char *) ((__alignof__ (__type) > 4 \ - ? ((__PTRDIFF_TYPE__)__AP + 8 - 1) & -8 \ - : ((__PTRDIFF_TYPE__)__AP + 4 - 1) & -4) \ - + __va_rounded_size (__type))), \ - *(__type *) (void *) (__AP - __va_rounded_size (__type))) -#else -/* For little-endian machines. */ -#define va_arg(__AP, __type) \ - ((__type *) (void *) (__AP = (char *) ((__alignof__(__type) > 4 \ - ? ((__PTRDIFF_TYPE__)__AP + 8 - 1) & -8 \ - : ((__PTRDIFF_TYPE__)__AP + 4 - 1) & -4) \ - + __va_rounded_size(__type))))[-1] -#endif -#endif - -#elif defined(__powerpc__) - -typedef struct __va_list_tag { - unsigned char gpr; /* index into the array of 8 GPRs stored in the - register save area gpr=0 corresponds to r3, - gpr=1 to r4, etc. */ - unsigned char fpr; /* index into the array of 8 FPRs stored in the - register save area fpr=0 corresponds to f1, - fpr=1 to f2, etc. */ - char *overflow_arg_area; /* location on stack that holds the next - overflow argument */ - char *reg_save_area; /* where r3:r10 and f1:f8, if saved are stored */ -} va_list[1]; - -#define __va_overflow(AP) (AP)->overflow_arg_area -#ifdef __OPTIMIZE__ -extern void __va_arg_type_violation(void) __attribute__((__noreturn__)); -#else -#define __va_arg_type_violation() -#endif - -typedef struct { - long __gp_save[8]; /* save area for GP registers */ - double __fp_save[8]; /* save area for FP registers */ -} __va_regsave_t; - -/* Macros to access the register save area */ -/* We cast to void * and then to TYPE * because this avoids - a warning about increasing the alignment requirement. */ -#define __VA_FP_REGSAVE(AP,OFS,TYPE) \ - ((TYPE *) (void *) (&(((__va_regsave_t *) \ - (AP)->reg_save_area)->__fp_save[OFS]))) - -#define __VA_GP_REGSAVE(AP,OFS,TYPE) \ - ((TYPE *) (void *) (&(((__va_regsave_t *) \ - (AP)->reg_save_area)->__gp_save[OFS]))) - -#define __va_start_common(AP, FAKE) \ - __builtin_memcpy ((AP), __builtin_saveregs (), sizeof(va_list)) - -#define va_start(AP,LASTARG) \ - (__builtin_next_arg (LASTARG), __va_start_common (AP, 0)) - -#ifdef _SOFT_FLOAT -#define __va_float_p(TYPE) 0 -#else -#define __va_float_p(TYPE) (__builtin_classify_type(*(TYPE *)0) == 8) -#endif - -#define __va_aggregate_p(TYPE) (__builtin_classify_type(*(TYPE *)0) >= 12) -#define __va_size(TYPE) ((sizeof(TYPE) + sizeof (long) - 1) / sizeof (long)) - -#define va_arg(AP,TYPE) \ -__extension__ (*({ \ - register TYPE *__ptr; \ - \ - if (__va_float_p (TYPE) && sizeof (TYPE) < 16) \ - { \ - unsigned char __fpr = (AP)->fpr; \ - if (__fpr < 8) \ - { \ - __ptr = __VA_FP_REGSAVE (AP, __fpr, TYPE); \ - (AP)->fpr = __fpr + 1; \ - } \ - else if (sizeof (TYPE) == 8) \ - { \ - unsigned long __addr = (unsigned long) (__va_overflow (AP)); \ - __ptr = (TYPE *)((__addr + 7) & -8); \ - __va_overflow (AP) = (char *)(__ptr + 1); \ - } \ - else \ - { \ - /* float is promoted to double. */ \ - __va_arg_type_violation (); \ - } \ - } \ - \ - /* Aggregates and long doubles are passed by reference. */ \ - else if (__va_aggregate_p (TYPE) || __va_float_p (TYPE)) \ - { \ - unsigned char __gpr = (AP)->gpr; \ - if (__gpr < 8) \ - { \ - __ptr = * __VA_GP_REGSAVE (AP, __gpr, TYPE *); \ - (AP)->gpr = __gpr + 1; \ - } \ - else \ - { \ - TYPE **__pptr = (TYPE **) (__va_overflow (AP)); \ - __ptr = * __pptr; \ - __va_overflow (AP) = (char *) (__pptr + 1); \ - } \ - } \ - \ - /* Only integrals remaining. */ \ - else \ - { \ - /* longlong is aligned. */ \ - if (sizeof (TYPE) == 8) \ - { \ - unsigned char __gpr = (AP)->gpr; \ - if (__gpr < 7) \ - { \ - __gpr += __gpr & 1; \ - __ptr = __VA_GP_REGSAVE (AP, __gpr, TYPE); \ - (AP)->gpr = __gpr + 2; \ - } \ - else \ - { \ - unsigned long __addr = (unsigned long) (__va_overflow (AP)); \ - __ptr = (TYPE *)((__addr + 7) & -8); \ - (AP)->gpr = 8; \ - __va_overflow (AP) = (char *)(__ptr + 1); \ - } \ - } \ - else if (sizeof (TYPE) == 4) \ - { \ - unsigned char __gpr = (AP)->gpr; \ - if (__gpr < 8) \ - { \ - __ptr = __VA_GP_REGSAVE (AP, __gpr, TYPE); \ - (AP)->gpr = __gpr + 1; \ - } \ - else \ - { \ - __ptr = (TYPE *) __va_overflow (AP); \ - __va_overflow (AP) = (char *)(__ptr + 1); \ - } \ - } \ - else \ - { \ - /* Everything else was promoted to int. */ \ - __va_arg_type_violation (); \ - } \ - } \ - __ptr; \ -})) - -#define va_end(AP) ((void)0) - -/* Copy va_list into another variable of this type. */ -#define __va_copy(dest, src) *(dest) = *(src) - -#elif defined(__alpha__) - -typedef struct { - char *__base; /* Pointer to first integer register. */ - int __offset; /* Byte offset of args so far. */ -} va_list; - -#define va_start(pvar, firstarg) \ - (__builtin_next_arg (firstarg), \ - (pvar) = *(va_list *) __builtin_saveregs ()) -#define va_end(__va) ((void) 0) - -#define __va_tsize(__type) \ - (((sizeof (__type) + __extension__ sizeof (long long) - 1) \ - / __extension__ sizeof (long long)) * __extension__ sizeof (long long)) - -#define va_arg(__va, __type) \ -(*(((__va).__offset += __va_tsize (__type)), \ - (__type *)(void *)((__va).__base + (__va).__offset \ - - (((__builtin_classify_type (* (__type *) 0) \ - == __real_type_class) && (__va).__offset <= (6 * 8)) \ - ? (6 * 8) + 8 : __va_tsize (__type))))) - -#else /* !__sparc__ && !__powerpc__ && !__mips__ && !__alpha__*/ - -typedef char* va_list; - -/* this only works when everything is passed on the stack (i.e. x86) */ -#if __WORDSIZE == 64 -#define va_start(ap,argn) ap=((char*)&argn)+8 -#else -#define va_start(ap,argn) ap=((char*)&argn)+4 -#endif -#define va_arg(ap,type) (ap+=sizeof(type), *(type*)((void*)ap-sizeof(type))) - -#endif - -#ifndef __va_copy -#define __va_copy(x,y) x=y -#endif - -#ifndef va_end -#define va_end(ap) ((void)0) -#endif - diff --git a/mdk-stage1/dietlibc/include/stdarg.h b/mdk-stage1/dietlibc/include/stdarg.h deleted file mode 100644 index 3a21bdb56..000000000 --- a/mdk-stage1/dietlibc/include/stdarg.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef _STDARG_H -#define _STDARG_H - -#include - -#if (__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 96)) - -typedef __builtin_va_list va_list; -#define va_start(v,l) __builtin_stdarg_start((v),l) -#define va_end __builtin_va_end -#define va_arg __builtin_va_arg -#define __va_copy(d,s) __builtin_va_copy((d),(s)) - -#endif - -#ifndef va_end -#include -#endif - -#if !defined(__STRICT_ANSI__) || __STDC_VERSION__ + 0 >= 199900L -#define va_copy(d,s) __va_copy(d,s) -#endif - -#endif diff --git a/mdk-stage1/dietlibc/include/stddef.h b/mdk-stage1/dietlibc/include/stddef.h deleted file mode 100644 index cdf54ec1e..000000000 --- a/mdk-stage1/dietlibc/include/stddef.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef _STDDEF_H -#define _STDDEF_H - -/* ugh. This is normally provided by gcc. */ - -#ifdef __GNUC__ -typedef __PTRDIFF_TYPE__ ptrdiff_t; -typedef __SIZE_TYPE__ size_t; -typedef __WCHAR_TYPE__ wchar_t; -#else -typedef signed long ptrdiff_t; -typedef unsigned long size_t; -typedef int wchar_t; -#endif - -#ifndef NULL -#define NULL (void*)0 -#endif - -#undef offsetof -#define offsetof(type,member) ((size_t) &((type*)0)->member) - -#endif diff --git a/mdk-stage1/dietlibc/include/stdint.h b/mdk-stage1/dietlibc/include/stdint.h deleted file mode 100644 index bbc7ddf0c..000000000 --- a/mdk-stage1/dietlibc/include/stdint.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef _STDINT_H -#define _STDINT_H - -#include - -typedef int8_t int_least8_t; -typedef int16_t int_least16_t; -typedef int32_t int_least32_t; -typedef uint8_t uint_least8_t; -typedef uint16_t uint_least16_t; -typedef uint32_t uint_least32_t; - -#ifndef __STRICT_ANSI__ -typedef int64_t int_least64_t; -typedef uint64_t uint_least64_t; -#endif - -typedef signed char int_fast8_t; -typedef signed long int int_fast16_t; -typedef signed long int int_fast32_t; -typedef signed long long int int_fast64_t; - -typedef unsigned char uint_fast8_t; -typedef unsigned long int uint_fast16_t; -typedef unsigned long int uint_fast32_t; -typedef unsigned long long int uint_fast64_t; - -#include - -#endif diff --git a/mdk-stage1/dietlibc/include/stdio.h b/mdk-stage1/dietlibc/include/stdio.h deleted file mode 100644 index 04783c3b8..000000000 --- a/mdk-stage1/dietlibc/include/stdio.h +++ /dev/null @@ -1,147 +0,0 @@ -#ifndef _STDIO_H -#define _STDIO_H - -#include -#include -#include - -typedef struct __stdio_file FILE; - -FILE *fopen (const char *path, const char *mode) __THROW; -FILE *fdopen (int fildes, const char *mode) __THROW; -FILE *freopen (const char *path, const char *mode, FILE *stream) __THROW; - -int printf(const char *format, ...) __THROW __attribute__((format(printf,1,2))); -int fprintf(FILE *stream, const char *format, ...) __THROW __attribute__((format(printf,2,3))); -int sprintf(char *str, const char *format, ...) __THROW __attribute__((format(printf,2,3))); -int snprintf(char *str, size_t size, const char *format, ...) __THROW __attribute__((format(printf,3,4))); -int asprintf(char **ptr, const char* format, ...) __THROW __attribute_malloc__ __attribute__((format(printf,2,3))); - -int scanf(const char *format, ...) __THROW __attribute__((format(scanf,1,2))); -int fscanf(FILE *stream, const char *format, ...) __THROW __attribute__((format(scanf,2,3))); -int sscanf(const char *str, const char *format, ...) __THROW __attribute__((format(scanf,2,3))); - -#include - -int vprintf(const char *format, va_list ap) __THROW __attribute__((format(printf,1,0))); -int vfprintf(FILE *stream, const char *format, va_list ap) __THROW __attribute__((format(printf,2,0))); -int vsprintf(char *str, const char *format, va_list ap) __THROW __attribute__((format(printf,2,0))); -int vsnprintf(char *str, size_t size, const char *format, va_list ap) __THROW __attribute__((format(printf,3,0))); - -int fdprintf(int fd, const char *format, ...) __THROW __attribute__((format(printf,2,3))); -int vfdprintf(int fd, const char *format, va_list ap) __THROW __attribute__((format(printf,2,0))); - -int vscanf(const char *format, va_list ap) __THROW __attribute__((format(scanf,1,0))); -int vsscanf(const char *str, const char *format, va_list ap) __THROW __attribute__((format(scanf,2,0))); -int vfscanf(FILE *stream, const char *format, va_list ap) __THROW __attribute__((format(scanf,2,0))); - -int fgetc(FILE *stream) __THROW; -int fgetc_unlocked(FILE *stream) __THROW; -char *fgets(char *s, int size, FILE *stream) __THROW; -int getc(FILE *stream) __THROW; -int getchar(void) __THROW; -char *gets(char *s) __THROW; -int ungetc(int c, FILE *stream) __THROW; - -int fputc(int c, FILE *stream) __THROW; -int fputc_unlocked(int c, FILE *stream) __THROW; -int fputs(const char *s, FILE *stream) __THROW; - -int putchar(int c) __THROW; - -#define putc(c,stream) fputc(c,stream) -#define putchar(c) fputc(c,stdout) - -#define getchar() fgetc(stdin) -#define getc(stream) fgetc(stream) -#define getc_unlocked(stream) fgetc_unlocked(stream) - -int puts(const char *s) __THROW; - -int fseek(FILE *stream, long offset, int whence) __THROW; -long ftell(FILE *stream) __THROW; -int fseeko(FILE *stream, off_t offset, int whence) __THROW; -off_t ftello(FILE *stream) __THROW; - -#ifndef __NO_STAT64 -int fseeko64(FILE *stream, loff_t offset, int whence) __THROW; -loff_t ftello64(FILE *stream) __THROW; - -#if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64 -#define off_t loff_t -#define fseeko(foo,bar,baz) fseeko64(foo,bar,baz) -#define ftello(foo) ftello64(foo) -#endif - -#endif - -void rewind(FILE *stream) __THROW; -int fgetpos(FILE *stream, fpos_t *pos) __THROW; -int fsetpos(FILE *stream, fpos_t *pos) __THROW; - -size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream) __THROW; - -size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream) __THROW; - -int fflush(FILE *stream) __THROW; - -int fclose(FILE *stream) __THROW; - -int feof (FILE *stream) __THROW; -int ferror(FILE *stream) __THROW; -int fileno(FILE *stream) __THROW; -void clearerr(FILE *stream) __THROW; - -int remove(const char *pathname) __THROW; - -void perror(const char *s) __THROW; - -extern FILE *stdin, *stdout, *stderr; - -#define EOF (-1) - -#define BUFSIZ 128 - -#define _IONBF 0 -#define _IOLBF 1 -#define _IOFBF 2 - -int setvbuf(FILE *stream, char *buf, int mode , size_t size) __THROW; - -#define setbuf(stream,buf) setvbuf(stream,buf,buf?_IOFBF:_IONBF,BUFSIZ) -#define setbuffer(stream,buf,size) setvbuf(stream,buf,buf?_IOFBF:_IONBF,size) -#define setlinebuf(stream) setvbuf(stream,0,_IOLBF,BUFSIZ) - -FILE *popen(const char *command, const char *type) __THROW; -int pclose(FILE *stream) __THROW; - -#ifndef SEEK_SET -#define SEEK_SET 0 -#define SEEK_CUR 1 -#define SEEK_END 2 -#endif - -#define L_tmpnam 128 -#define P_tmpdir "/tmp" -char* tmpnam(char *s) __THROW; /* DO NOT USE!!! Use mkstemp instead! */ -char* tempnam(char* dir,char* _template); /* dito */ -FILE* tmpfile(void) __THROW; - -#define FILENAME_MAX 4095 -#define FOPEN_MAX 16 - -#ifdef _POSIX_SOURCE -#define L_ctermid 9 -#define L_cuserid 9 -#endif - -void flockfile(FILE* f) __THROW; -void funlockfile(FILE* f) __THROW; - -#ifdef _GNU_SOURCE -ssize_t getline(char **lineptr, size_t *n, FILE *stream); -ssize_t getdelim(char **lineptr, size_t *n, int delim, FILE *stream); -#define getline(lineptr,n,stream) getdelim(lineptr,n,'\n',stream) -#endif - -#endif diff --git a/mdk-stage1/dietlibc/include/stdlib.h b/mdk-stage1/dietlibc/include/stdlib.h deleted file mode 100644 index 5824a6ffa..000000000 --- a/mdk-stage1/dietlibc/include/stdlib.h +++ /dev/null @@ -1,100 +0,0 @@ -#ifndef _STDLIB_H -#define _STDLIB_H - -#ifndef __ASSEMBLER__ - -#include -#include -#include - -void *calloc(size_t nmemb, size_t size) __attribute_malloc__ __THROW; -void *malloc(size_t size) __attribute_malloc__ __THROW; -void free(void *ptr) __THROW; -void *realloc(void *ptr, size_t size) __attribute_malloc__ __THROW; - -char *getenv(const char *name) __THROW __pure__; -int putenv(const char *string) __THROW; -int setenv(const char *name, const char *value, int overwrite) __THROW; -void unsetenv(const char *name) __THROW; - -int system (const char * string) __THROW; -int atexit(void (*function)(void)) __THROW; - -float strtof(const char *nptr, char **endptr) __THROW; -double strtod(const char *nptr, char **endptr) __THROW; -long double strtold(const char *nptr, char **endptr) __THROW; -long int strtol(const char *nptr, char **endptr, int base) __THROW; -unsigned long int strtoul(const char *nptr, char **endptr, int base) __THROW; - -extern int __ltostr(char *s, unsigned int size, unsigned long i, unsigned int base, int UpCase) __THROW; -extern int __dtostr(double d,char *buf,unsigned int maxlen,unsigned int prec,unsigned int prec2) __THROW; - -#ifndef __STRICT_ANSI__ -__extension__ long long int strtoll(const char *nptr, char **endptr, int base) __THROW; -__extension__ unsigned long long int strtoull(const char *nptr, char **endptr, int base) __THROW; -__extension__ int __lltostr(char *s, unsigned int size, unsigned long long i, unsigned int base, int UpCase) __THROW; -#endif - -int atoi(const char *nptr) __THROW; -long int atol(const char *nptr) __THROW; -double atof(const char *nptr) __THROW; - -void exit(int status) __THROW __attribute__((noreturn)); -void abort(void) __THROW; - -extern int rand(void) __THROW; -extern int rand_r(unsigned int *seed) __THROW; -extern void srand(unsigned int seed) __THROW; -#ifdef _BSD_SOURCE -extern int random(void) __THROW; -extern void srandom(unsigned int seed) __THROW; -#endif - -typedef unsigned short randbuf[3]; -double drand48(void) __THROW; -long lrand48(void) __THROW; -long mrand48(void) __THROW; -void srand48(long seed) __THROW; -unsigned short *seed48(randbuf buf) __THROW; -void lcong48(unsigned short param[7]) __THROW; -long jrand48(randbuf buf) __THROW; -long nrand48(randbuf buf) __THROW; -double erand48(randbuf buf) __THROW; - -void qsort(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *)) __THROW; -void *bsearch(const void *key, const void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *)) __THROW; - -extern char **environ; - -/* now this function is the greatest bullshit I have ever seen. - * The ISO people must be out of their minds. */ -typedef struct { int quot,rem; } div_t; -div_t div(int numer, int denom) __THROW __attribute__((const)); - -char *realpath(const char *path, char *resolved_path) __THROW; - -int mkstemp(char *_template); -char* mkdtemp(char *_template); - -char* mktemp(char *_template); - -int abs(int i) __THROW __attribute__((const)); -long int labs(long int i) __THROW __attribute__((const)); -__extension__ long long int llabs(long long int i) __THROW __attribute__((const)); - -#ifdef _XOPEN_SOURCE -int grantpt (int fd) __THROW; -int unlockpt (int fd) __THROW; -char *ptsname (int fd) __THROW; -#endif - -#endif - -#define EXIT_FAILURE 1 -#define EXIT_SUCCESS 0 - -#define RAND_MAX ((1<<31) -2) - -#define MB_CUR_MAX 1 - -#endif diff --git a/mdk-stage1/dietlibc/include/string.h b/mdk-stage1/dietlibc/include/string.h deleted file mode 100644 index 1c3df8621..000000000 --- a/mdk-stage1/dietlibc/include/string.h +++ /dev/null @@ -1,74 +0,0 @@ -#ifndef _STRING_H -#define _STRING_H - -#include -#include - -char *strcpy(char *dest, const char *src) __THROW; - -void *memccpy(void *dest, const void *src, int c, size_t n) __THROW; -void *memmove(void *dest, const void *src, size_t n) __THROW; - -int memccmp(const void *s1, const void *s2, int c, size_t n) __THROW __pure__; - -void* memset(void *s, int c, size_t n) __THROW; -int memcmp(const void *s1, const void *s2, size_t n) __THROW __pure__; -void* memcpy(void *dest, const void *src, size_t n) __THROW; - -char *strncpy(char *dest, const char *src, size_t n) __THROW; -int strncmp(const char *s1, const char *s2, size_t n) __THROW __pure__; -char *strncat(char *dest, const char *src, size_t n) __THROW; - -int strcmp(const char *s1, const char *s2) __THROW __pure__; - -size_t strlen(const char *s) __THROW __pure__; - -char *strstr(const char *haystack, const char *needle) __THROW __pure__; - -char *strdup(const char *s) __attribute_malloc__ __THROW; - -char *strchr(const char *s, int c) __THROW __pure__; -char *strrchr(const char *s, int c) __THROW __pure__; - -char *strcat(char *dest, const char *src) __THROW; - -size_t strspn(const char *s, const char *_accept) __THROW; -size_t strcspn(const char *s, const char *reject) __THROW; - -char *strpbrk(const char *s, const char *_accept) __THROW; -char *strsep(char **stringp, const char *delim) __THROW; - -void* memchr(const void *s, int c, size_t n) __THROW __pure__; -#ifdef _GNU_SOURCE -void* memrchr(const void *s, int c, size_t n) __THROW __pure__; -#endif - -/* I would like to make this const, but Paul Jarc points out it has to - * be char* :-( */ -char *strerror(int errnum) __THROW; -/* work around b0rken GNU crapware like tar 1.13.19 */ -#define strerror strerror - -#ifdef _GNU_SOURCE -const char *strsignal(int signum) __THROW; -void *memmem(const void *haystack, size_t haystacklen, const void *needle, size_t needlelen) __THROW; - -char *strndup(const char *s,size_t n) __attribute_malloc__ __THROW; -#endif - -char *strtok(char *s, const char *delim) __THROW; -char *strtok_r(char *s, const char *delim, char **ptrptr) __THROW; - -size_t strlcpy(char *dst, const char *src, size_t size) __THROW; -size_t strlcat(char *dst, const char *src, size_t size) __THROW; - -int strcoll(const char *s1, const char *s2) __THROW; -size_t strxfrm(char *dest, const char *src, size_t n) __THROW; - -#ifdef _BSD_SOURCE -#include -#endif - -char *stpcpy(char *dest, const char *src); - -#endif diff --git a/mdk-stage1/dietlibc/include/strings.h b/mdk-stage1/dietlibc/include/strings.h deleted file mode 100644 index fd2616465..000000000 --- a/mdk-stage1/dietlibc/include/strings.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef _STRINGS_H -#define _STRINGS_H - -#include -#include - -int strcasecmp(const char *s1, const char *s2) __THROW __pure__; -int strncasecmp(const char *s1, const char *s2, size_t n) __THROW __pure__; -int ffs(int i) __THROW __attribute__((__const__)); - -int bcmp(const void *, const void *, size_t) __THROW __pure__; -void bcopy(const void *, void *, size_t) __THROW; -void bzero(void *, size_t) __THROW; -char *index(const char *, int) __THROW __pure__; -char *rindex(const char *, int) __THROW __pure__; - -#define bzero(s,n) memset(s,0,n) -#define bcopy(src,dest,n) memmove(dest,src,n) -#define bcmp(a,b,n) memcmp(a,b,n) -#define index(a,b) strchr(a,b) -#define rindex(a,b) strrchr(a,b) - -#endif diff --git a/mdk-stage1/dietlibc/include/sys/alpha-ioctl.h b/mdk-stage1/dietlibc/include/sys/alpha-ioctl.h deleted file mode 100644 index f1bde3bbb..000000000 --- a/mdk-stage1/dietlibc/include/sys/alpha-ioctl.h +++ /dev/null @@ -1,168 +0,0 @@ -#define _IOC_NRBITS 8 -#define _IOC_TYPEBITS 8 -#define _IOC_SIZEBITS 13 -#define _IOC_DIRBITS 3 - -#define _IOC_NRMASK ((1 << _IOC_NRBITS)-1) -#define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1) -#define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1) -#define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1) - -#define _IOC_NRSHIFT 0 -#define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS) -#define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS) -#define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS) - -/* - * Direction bits _IOC_NONE could be 0, but OSF/1 gives it a bit. - * And this turns out useful to catch old ioctl numbers in header - * files for us. - */ -#define _IOC_NONE 1U -#define _IOC_READ 2U -#define _IOC_WRITE 4U - -#define _IOC(dir,type,nr,size) \ - ((unsigned int) \ - (((dir) << _IOC_DIRSHIFT) | \ - ((type) << _IOC_TYPESHIFT) | \ - ((nr) << _IOC_NRSHIFT) | \ - ((size) << _IOC_SIZESHIFT))) - -/* used to create numbers */ -#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0) -#define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size)) -#define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size)) -#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size)) - -/* used to decode them.. */ -#define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) -#define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK) -#define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK) -#define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK) - -/* ...and for the drivers/sound files... */ - -#define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT) -#define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT) -#define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT) -#define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT) -#define IOCSIZE_SHIFT (_IOC_SIZESHIFT) - -#define FIOCLEX _IO('f', 1) -#define FIONCLEX _IO('f', 2) -#define FIOASYNC _IOW('f', 125, int) -#define FIONBIO _IOW('f', 126, int) -#define FIONREAD _IOR('f', 127, int) -#define TIOCINQ FIONREAD -#define FIOQSIZE _IOR('f', 128, loff_t) - -#define TIOCGETP _IOR('t', 8, struct sgttyb) -#define TIOCSETP _IOW('t', 9, struct sgttyb) -#define TIOCSETN _IOW('t', 10, struct sgttyb) /* TIOCSETP wo flush */ - -#define TIOCSETC _IOW('t', 17, struct tchars) -#define TIOCGETC _IOR('t', 18, struct tchars) -#define TCGETS _IOR('t', 19, struct termios) -#define TCSETS _IOW('t', 20, struct termios) -#define TCSETSW _IOW('t', 21, struct termios) -#define TCSETSF _IOW('t', 22, struct termios) - -#define TCGETA _IOR('t', 23, struct termio) -#define TCSETA _IOW('t', 24, struct termio) -#define TCSETAW _IOW('t', 25, struct termio) -#define TCSETAF _IOW('t', 28, struct termio) - -#define TCSBRK _IO('t', 29) -#define TCXONC _IO('t', 30) -#define TCFLSH _IO('t', 31) - -#define TIOCSWINSZ _IOW('t', 103, struct winsize) -#define TIOCGWINSZ _IOR('t', 104, struct winsize) -#define TIOCSTART _IO('t', 110) /* start output, like ^Q */ -#define TIOCSTOP _IO('t', 111) /* stop output, like ^S */ -#define TIOCOUTQ _IOR('t', 115, int) /* output queue size */ - -#define TIOCGLTC _IOR('t', 116, struct ltchars) -#define TIOCSLTC _IOW('t', 117, struct ltchars) -#define TIOCSPGRP _IOW('t', 118, int) -#define TIOCGPGRP _IOR('t', 119, int) - -#define TIOCEXCL 0x540C -#define TIOCNXCL 0x540D -#define TIOCSCTTY 0x540E - -#define TIOCSTI 0x5412 -#define TIOCMGET 0x5415 -#define TIOCMBIS 0x5416 -#define TIOCMBIC 0x5417 -#define TIOCMSET 0x5418 -# define TIOCM_LE 0x001 -# define TIOCM_DTR 0x002 -# define TIOCM_RTS 0x004 -# define TIOCM_ST 0x008 -# define TIOCM_SR 0x010 -# define TIOCM_CTS 0x020 -# define TIOCM_CAR 0x040 -# define TIOCM_RNG 0x080 -# define TIOCM_DSR 0x100 -# define TIOCM_CD TIOCM_CAR -# define TIOCM_RI TIOCM_RNG -# define TIOCM_OUT1 0x2000 -# define TIOCM_OUT2 0x4000 -# define TIOCM_LOOP 0x8000 - -#define TIOCGSOFTCAR 0x5419 -#define TIOCSSOFTCAR 0x541A -#define TIOCLINUX 0x541C -#define TIOCCONS 0x541D -#define TIOCGSERIAL 0x541E -#define TIOCSSERIAL 0x541F -#define TIOCPKT 0x5420 -# define TIOCPKT_DATA 0 -# define TIOCPKT_FLUSHREAD 1 -# define TIOCPKT_FLUSHWRITE 2 -# define TIOCPKT_STOP 4 -# define TIOCPKT_START 8 -# define TIOCPKT_NOSTOP 16 -# define TIOCPKT_DOSTOP 32 - - -#define TIOCNOTTY 0x5422 -#define TIOCSETD 0x5423 -#define TIOCGETD 0x5424 -#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ -#define TIOCTTYGSTRUCT 0x5426 /* For debugging only */ -#define TIOCSBRK 0x5427 /* BSD compatibility */ -#define TIOCCBRK 0x5428 /* BSD compatibility */ -#define TIOCGSID 0x5429 /* Return the session ID of FD */ -#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ -#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ - -#define TIOCSERCONFIG 0x5453 -#define TIOCSERGWILD 0x5454 -#define TIOCSERSWILD 0x5455 -#define TIOCGLCKTRMIOS 0x5456 -#define TIOCSLCKTRMIOS 0x5457 -#define TIOCSERGSTRUCT 0x5458 /* For debugging only */ -#define TIOCSERGETLSR 0x5459 /* Get line status register */ - /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ -# define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ -#define TIOCSERGETMULTI 0x545A /* Get multiport config */ -#define TIOCSERSETMULTI 0x545B /* Set multiport config */ - -#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */ -#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ -#define TIOCGHAYESESP 0x545E /* Get Hayes ESP configuration */ -#define TIOCSHAYESESP 0x545F /* Set Hayes ESP configuration */ - -/* Socket-level I/O control calls. */ - -#define FIOGETOWN _IOR('f', 123, int) -#define FIOSETOWN _IOW('f', 124, int) - -#define SIOCATMARK _IOR('s', 7, int) -#define SIOCSPGRP _IOW('s', 8, pid_t) -#define SIOCGPGRP _IOR('s', 9, pid_t) - -#define SIOCGSTAMP 0x8906 /* Get stamp - linux-specific */ diff --git a/mdk-stage1/dietlibc/include/sys/arm-ioctl.h b/mdk-stage1/dietlibc/include/sys/arm-ioctl.h deleted file mode 100644 index ab8b844a5..000000000 --- a/mdk-stage1/dietlibc/include/sys/arm-ioctl.h +++ /dev/null @@ -1,149 +0,0 @@ - -/* ioctl command encoding: 32 bits total, command in lower 16 bits, - * size of the parameter structure in the lower 14 bits of the - * upper 16 bits. - * Encoding the size of the parameter structure in the ioctl request - * is useful for catching programs compiled with old versions - * and to avoid overwriting user space outside the user buffer area. - * The highest 2 bits are reserved for indicating the ``access mode''. - * NOTE: This limits the max parameter size to 16kB -1 ! - */ - -/* - * The following is for compatibility across the various Linux - * platforms. The i386 ioctl numbering scheme doesn't really enforce - * a type field. De facto, however, the top 8 bits of the lower 16 - * bits are indeed used as a type field, so we might just as well make - * this explicit here. Please be sure to use the decoding macros - * below from now on. - */ -#define _IOC_NRBITS 8 -#define _IOC_TYPEBITS 8 -#define _IOC_SIZEBITS 14 -#define _IOC_DIRBITS 2 - -#define _IOC_NRMASK ((1 << _IOC_NRBITS)-1) -#define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1) -#define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1) -#define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1) - -#define _IOC_NRSHIFT 0 -#define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS) -#define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS) -#define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS) - -/* - * Direction bits. - */ -#define _IOC_NONE 0U -#define _IOC_WRITE 1U -#define _IOC_READ 2U - -#define _IOC(dir,type,nr,size) \ - (((dir) << _IOC_DIRSHIFT) | \ - ((type) << _IOC_TYPESHIFT) | \ - ((nr) << _IOC_NRSHIFT) | \ - ((size) << _IOC_SIZESHIFT)) - -/* used to create numbers */ -#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0) -#define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size)) -#define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size)) -#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size)) - -/* used to decode ioctl numbers.. */ -#define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) -#define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK) -#define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK) -#define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK) - -/* ...and for the drivers/sound files... */ - -#define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT) -#define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT) -#define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT) -#define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT) -#define IOCSIZE_SHIFT (_IOC_SIZESHIFT) - -/* 0x54 is just a magic number to make these relatively unique ('T') */ - -#define TCGETS 0x5401 -#define TCSETS 0x5402 -#define TCSETSW 0x5403 -#define TCSETSF 0x5404 -#define TCGETA 0x5405 -#define TCSETA 0x5406 -#define TCSETAW 0x5407 -#define TCSETAF 0x5408 -#define TCSBRK 0x5409 -#define TCXONC 0x540A -#define TCFLSH 0x540B -#define TIOCEXCL 0x540C -#define TIOCNXCL 0x540D -#define TIOCSCTTY 0x540E -#define TIOCGPGRP 0x540F -#define TIOCSPGRP 0x5410 -#define TIOCOUTQ 0x5411 -#define TIOCSTI 0x5412 -#define TIOCGWINSZ 0x5413 -#define TIOCSWINSZ 0x5414 -#define TIOCMGET 0x5415 -#define TIOCMBIS 0x5416 -#define TIOCMBIC 0x5417 -#define TIOCMSET 0x5418 -#define TIOCGSOFTCAR 0x5419 -#define TIOCSSOFTCAR 0x541A -#define FIONREAD 0x541B -#define TIOCINQ FIONREAD -#define TIOCLINUX 0x541C -#define TIOCCONS 0x541D -#define TIOCGSERIAL 0x541E -#define TIOCSSERIAL 0x541F -#define TIOCPKT 0x5420 -#define FIONBIO 0x5421 -#define TIOCNOTTY 0x5422 -#define TIOCSETD 0x5423 -#define TIOCGETD 0x5424 -#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ -#define TIOCTTYGSTRUCT 0x5426 /* For debugging only */ -#define TIOCSBRK 0x5427 /* BSD compatibility */ -#define TIOCCBRK 0x5428 /* BSD compatibility */ -#define TIOCGSID 0x5429 /* Return the session ID of FD */ -#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ -#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ - -#define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ -#define FIOCLEX 0x5451 -#define FIOASYNC 0x5452 -#define TIOCSERCONFIG 0x5453 -#define TIOCSERGWILD 0x5454 -#define TIOCSERSWILD 0x5455 -#define TIOCGLCKTRMIOS 0x5456 -#define TIOCSLCKTRMIOS 0x5457 -#define TIOCSERGSTRUCT 0x5458 /* For debugging only */ -#define TIOCSERGETLSR 0x5459 /* Get line status register */ -#define TIOCSERGETMULTI 0x545A /* Get multiport config */ -#define TIOCSERSETMULTI 0x545B /* Set multiport config */ - -#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */ -#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ -#define FIOQSIZE 0x545E - -/* Used for packet mode */ -#define TIOCPKT_DATA 0 -#define TIOCPKT_FLUSHREAD 1 -#define TIOCPKT_FLUSHWRITE 2 -#define TIOCPKT_STOP 4 -#define TIOCPKT_START 8 -#define TIOCPKT_NOSTOP 16 -#define TIOCPKT_DOSTOP 32 - -#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ - -/* Socket-level I/O control calls. */ -#define FIOSETOWN 0x8901 -#define SIOCSPGRP 0x8902 -#define FIOGETOWN 0x8903 -#define SIOCGPGRP 0x8904 -#define SIOCATMARK 0x8905 -#define SIOCGSTAMP 0x8906 /* Get stamp */ diff --git a/mdk-stage1/dietlibc/include/sys/cdefs.h b/mdk-stage1/dietlibc/include/sys/cdefs.h deleted file mode 100644 index 4ccb0ed2f..000000000 --- a/mdk-stage1/dietlibc/include/sys/cdefs.h +++ /dev/null @@ -1,61 +0,0 @@ -#ifndef _SYS_CDEFS_H -#define _SYS_CDEFS_H - -/* Suppress kernel-name space pollution unless user expressedly asks - for it. */ -#ifndef _LOOSE_KERNEL_NAMES -# define __KERNEL_STRICT_NAMES -#endif - -#ifndef __cplusplus -#define __THROW -#define __BEGIN_DECLS -#define __END_DECLS -#else -#define __THROW throw () -#define __BEGIN_DECLS extern "C" { -#define __END_DECLS } -#endif - -#ifndef __GNUC__ -#define __attribute__(xyz) -#define __extension__ -#endif - -#if (__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 96)) -#define __pure__ __attribute__ ((__pure__)) -#else -#define __pure__ -#endif - -#if (__GNUC__ == 2) && (__GNUC_MINOR__ < 95) -#define __restrict__ -#endif - -#ifndef __STRICT_ANSI__ -#if __GNUC__ < 3 -#define __builtin_expect(foo,bar) (foo) -#define expect(foo,bar) (foo) -#else -#define expect(foo,bar) __builtin_expect(foo,bar) -#define __attribute_malloc__ __attribute__((malloc)) -#endif -#endif - -#ifndef __attribute_malloc__ -#define __attribute_malloc__ -#endif - -#define __P(x) x - -#define __ptr_t void* - -#ifdef __STRICT_ANSI__ -#define inline -#endif - -#ifndef __i386__ -#define regparm(x) -#endif - -#endif diff --git a/mdk-stage1/dietlibc/include/sys/epoll.h b/mdk-stage1/dietlibc/include/sys/epoll.h deleted file mode 100644 index d65d5465f..000000000 --- a/mdk-stage1/dietlibc/include/sys/epoll.h +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef _SYS_EPOLL_H -#define _SYS_EPOLL_H - -#include -#include -#include - -/* Valid opcodes ( "op" parameter ) to issue to epoll_ctl() */ -#define EPOLL_CTL_ADD 1 /* Add a file decriptor to the interface */ -#define EPOLL_CTL_DEL 2 /* Remove a file decriptor from the interface */ -#define EPOLL_CTL_MOD 3 /* Change file decriptor epoll_event structure */ - -enum EPOLL_EVENTS { - EPOLLIN = 0x001, -#define EPOLLIN EPOLLIN - EPOLLPRI = 0x002, -#define EPOLLPRI EPOLLPRI - EPOLLOUT = 0x004, -#define EPOLLOUT EPOLLOUT - -#ifdef __USE_XOPEN - EPOLLRDNORM = 0x040, -#define EPOLLRDNORM EPOLLRDNORM - EPOLLRDBAND = 0x080, -#define EPOLLRDBAND EPOLLRDBAND - EPOLLWRNORM = 0x100, -#define EPOLLWRNORM EPOLLWRNORM - EPOLLWRBAND = 0x200, -#define EPOLLWRBAND EPOLLWRBAND -#endif /* #ifdef __USE_XOPEN */ - -#ifdef __USE_GNU - EPOLLMSG = 0x400, -#define EPOLLMSG EPOLLMSG -#endif /* #ifdef __USE_GNU */ - - EPOLLERR = 0x008, -#define EPOLLERR EPOLLERR - EPOLLHUP = 0x010 -#define EPOLLHUP EPOLLHUP -}; - -typedef union epoll_data { - void *ptr; - int fd; - uint32_t u32; - uint64_t u64; -} epoll_data_t; - -struct epoll_event { - uint32_t events; - epoll_data_t data; -}; - -int epoll_create(int size) __THROW; -int epoll_ctl(int epfd, int op, int fd, struct epoll_event* event) __THROW; -int epoll_wait(int epfd, struct epoll_event *events, int maxevents, - int timeout) __THROW; - -#endif diff --git a/mdk-stage1/dietlibc/include/sys/file.h b/mdk-stage1/dietlibc/include/sys/file.h deleted file mode 100644 index cf2c74305..000000000 --- a/mdk-stage1/dietlibc/include/sys/file.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef _SYS_FILE_H -#define _SYS_FILE_H - -#include -#include - -extern int fcntl(int fd, int cmd, ...) __THROW; -extern int flock(int fd, int operation) __THROW; - -#endif /* _SYS_FILE_H */ diff --git a/mdk-stage1/dietlibc/include/sys/fsuid.h b/mdk-stage1/dietlibc/include/sys/fsuid.h deleted file mode 100644 index 538070451..000000000 --- a/mdk-stage1/dietlibc/include/sys/fsuid.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef __FSUID_H -#define __FSUID_H 1 - -#include - -/* Linux only: */ -int setfsuid(uid_t uid); -int setfsgid(gid_t gid); -int setfsuid32(uid32_t fsuid) __THROW; -int setfsgid32(gid32_t fsgid) __THROW; - -#endif diff --git a/mdk-stage1/dietlibc/include/sys/gmon.h b/mdk-stage1/dietlibc/include/sys/gmon.h deleted file mode 100644 index 50aae3028..000000000 --- a/mdk-stage1/dietlibc/include/sys/gmon.h +++ /dev/null @@ -1,99 +0,0 @@ -#ifndef __DLC_GMON_H_ -#define __DLC_GMON_H_ - -# define HISTCOUNTER unsigned short -# define HISTFRACTION 2 -# define HASHFRACTION 2 -# define ARCDENSITY 2 -# define MINARCS 50 -# define MAXARCS (( 1 << (8 * sizeof(HISTCOUNTER))) - 2) - -# define ROUNDDOWN(x,y) (((x)/(y))*y) -# define ROUNDUP(x,y) ((((x)+(y)-1)/(y))*y) - -# define PROF_SECTION __attribute__ ((section (".profile"))) - -struct tostruct { - unsigned long selfpc; - signed long count; - unsigned short link; - unsigned short pad; -}; - -struct rawarc { - unsigned long raw_frompc; - unsigned long raw_selfpc; - signed long raw_count; -}; - -struct monparam { - unsigned short *kcount; - unsigned long kcountsize; - struct rawarc *arcs; - unsigned long arcnum; - unsigned long lowpc; - unsigned long highpc; - unsigned long textsize; -}; - -struct gmonparam { - long state; - unsigned short *kcount; - unsigned long kcountsize; - unsigned short *froms; - unsigned long fromsize; - struct tostruct *tos; - unsigned long tossize; - long tolimit; - unsigned long lowpc; - unsigned long highpc; - unsigned long textsize; - unsigned long hashfraction; - unsigned long log_hashfraction; -}; - -struct gmon_hdr { - char cookie[4]; - long version; - char spare[12]; -}; - -struct gmon_hist_hdr { - long low_pc; - long high_pc; - long hist_size; - long prof_rate; - char dimen[15]; - char dimen_abbrev; -}; - -struct gmon_cg_arc_record { - long from_pc; - long self_pc; - long count; -}; - -struct __bb { - long zero_word; - char *filename; - long *counts; - long ncounts; - struct __bb *next; - unsigned long *addresses; -}; - -typedef enum { - GMON_TAG_TIME_HIST, GMON_TAG_CG_ARC, GMON_TAG_BB_COUNT -} GMON_Record_Tag; - -enum { GMON_PROF_ON, GMON_PROF_BUSY, GMON_PROF_ERROR, GMON_PROF_OFF }; -enum { GPROF_STATE, GPROF_COUNT, GPROF_FROMS, GPROF_TOS, GPROF_GMONPARAM }; - -extern struct gmonparam gmparam; -extern struct __bb * __bb_head; - -extern void __monstartup(unsigned long, unsigned long); -extern void monstartup(unsigned long, unsigned long); -extern void _mcleanup(void); - -#endif diff --git a/mdk-stage1/dietlibc/include/sys/gmon_out.h b/mdk-stage1/dietlibc/include/sys/gmon_out.h deleted file mode 100644 index 31566b999..000000000 --- a/mdk-stage1/dietlibc/include/sys/gmon_out.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/mdk-stage1/dietlibc/include/sys/hppa-ioctl.h b/mdk-stage1/dietlibc/include/sys/hppa-ioctl.h deleted file mode 100644 index 62b6f1cf9..000000000 --- a/mdk-stage1/dietlibc/include/sys/hppa-ioctl.h +++ /dev/null @@ -1,133 +0,0 @@ -#ifndef __ARCH_PARISC_IOCTLS_H__ -#define __ARCH_PARISC_IOCTLS_H__ - -#ifndef _ASM_PARISC_IOCTL_H -#define _ASM_PARISC_IOCTL_H - -#define _IOC_NRBITS 8 -#define _IOC_TYPEBITS 8 -#define _IOC_SIZEBITS 14 -#define _IOC_DIRBITS 2 - -#define _IOC_NRMASK ((1 << _IOC_NRBITS)-1) -#define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1) -#define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1) -#define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1) - -#define _IOC_NRSHIFT 0 -#define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS) -#define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS) -#define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS) - -/* - * Direction bits. - */ -#define _IOC_NONE 0U -#define _IOC_WRITE 2U -#define _IOC_READ 1U - -#define _IOC(dir,type,nr,size) \ - (((dir) << _IOC_DIRSHIFT) | \ - ((type) << _IOC_TYPESHIFT) | \ - ((nr) << _IOC_NRSHIFT) | \ - ((size) << _IOC_SIZESHIFT)) - -/* used to create numbers */ -#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0) -#define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size)) -#define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size)) -#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size)) - -/* used to decode ioctl numbers.. */ -#define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) -#define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK) -#define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK) -#define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK) - -/* ...and for the drivers/sound files... */ - -#define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT) -#define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT) -#define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT) -#define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT) -#define IOCSIZE_SHIFT (_IOC_SIZESHIFT) - -#endif /* _ASM_PARISC_IOCTL_H */ -/* 0x54 is just a magic number to make these relatively unique ('T') */ - -#define TCGETS _IOR('T', 16, struct termios) /* TCGETATTR */ -#define TCSETS _IOW('T', 17, struct termios) /* TCSETATTR */ -#define TCSETSW _IOW('T', 18, struct termios) /* TCSETATTRD */ -#define TCSETSF _IOW('T', 19, struct termios) /* TCSETATTRF */ -#define TCGETA _IOR('T', 1, struct termio) -#define TCSETA _IOW('T', 2, struct termio) -#define TCSETAW _IOW('T', 3, struct termio) -#define TCSETAF _IOW('T', 4, struct termio) -#define TCSBRK _IO('T', 5) -#define TCXONC _IO('T', 6) -#define TCFLSH _IO('T', 7) -#define TIOCEXCL 0x540C -#define TIOCNXCL 0x540D -#define TIOCSCTTY 0x540E -#define TIOCGPGRP _IOR('T', 30, int) -#define TIOCSPGRP _IOW('T', 29, int) -#define TIOCOUTQ 0x5411 -#define TIOCSTI 0x5412 -#define TIOCGWINSZ 0x5413 -#define TIOCSWINSZ 0x5414 -#define TIOCMGET 0x5415 -#define TIOCMBIS 0x5416 -#define TIOCMBIC 0x5417 -#define TIOCMSET 0x5418 -#define TIOCGSOFTCAR 0x5419 -#define TIOCSSOFTCAR 0x541A -#define FIONREAD 0x541B -#define TIOCINQ FIONREAD -#define TIOCLINUX 0x541C -#define TIOCCONS 0x541D -#define TIOCGSERIAL 0x541E -#define TIOCSSERIAL 0x541F -#define TIOCPKT 0x5420 -#define FIONBIO 0x5421 -#define TIOCNOTTY 0x5422 -#define TIOCSETD 0x5423 -#define TIOCGETD 0x5424 -#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ -#define TIOCTTYGSTRUCT 0x5426 /* For debugging only */ -#define TIOCSBRK 0x5427 /* BSD compatibility */ -#define TIOCCBRK 0x5428 /* BSD compatibility */ -#define TIOCGSID _IOR('T', 20, int) /* Return the session ID of FD */ -#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ -#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ - -#define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ -#define FIOCLEX 0x5451 -#define FIOASYNC 0x5452 -#define TIOCSERCONFIG 0x5453 -#define TIOCSERGWILD 0x5454 -#define TIOCSERSWILD 0x5455 -#define TIOCGLCKTRMIOS 0x5456 -#define TIOCSLCKTRMIOS 0x5457 -#define TIOCSERGSTRUCT 0x5458 /* For debugging only */ -#define TIOCSERGETLSR 0x5459 /* Get line status register */ -#define TIOCSERGETMULTI 0x545A /* Get multiport config */ -#define TIOCSERSETMULTI 0x545B /* Set multiport config */ - -#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */ -#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ -#define TIOCGHAYESESP 0x545E /* Get Hayes ESP configuration */ -#define TIOCSHAYESESP 0x545F /* Set Hayes ESP configuration */ -#define FIOQSIZE 0x5460 /* Get exact space used by quota */ - -/* Used for packet mode */ -#define TIOCPKT_DATA 0 -#define TIOCPKT_FLUSHREAD 1 -#define TIOCPKT_FLUSHWRITE 2 -#define TIOCPKT_STOP 4 -#define TIOCPKT_START 8 -#define TIOCPKT_NOSTOP 16 -#define TIOCPKT_DOSTOP 32 - -#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ - -#endif /* _ASM_PARISC_IOCTLS_H */ diff --git a/mdk-stage1/dietlibc/include/sys/i386-ioctl.h b/mdk-stage1/dietlibc/include/sys/i386-ioctl.h deleted file mode 100644 index c9aa270d6..000000000 --- a/mdk-stage1/dietlibc/include/sys/i386-ioctl.h +++ /dev/null @@ -1,141 +0,0 @@ - -/* - * The following is for compatibility across the various Linux - * platforms. The i386 ioctl numbering scheme doesn't really enforce - * a type field. De facto, however, the top 8 bits of the lower 16 - * bits are indeed used as a type field, so we might just as well make - * this explicit here. Please be sure to use the decoding macros - * below from now on. - */ -#define _IOC_NRBITS 8 -#define _IOC_TYPEBITS 8 -#define _IOC_SIZEBITS 14 -#define _IOC_DIRBITS 2 - -#define _IOC_NRMASK ((1 << _IOC_NRBITS)-1) -#define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1) -#define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1) -#define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1) - -#define _IOC_NRSHIFT 0 -#define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS) -#define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS) -#define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS) - -/* - * Direction bits. - */ -#define _IOC_NONE 0U -#define _IOC_WRITE 1U -#define _IOC_READ 2U - -#define _IOC(dir,type,nr,size) \ - (((dir) << _IOC_DIRSHIFT) | \ - ((type) << _IOC_TYPESHIFT) | \ - ((nr) << _IOC_NRSHIFT) | \ - ((size) << _IOC_SIZESHIFT)) - -/* used to create numbers */ -#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0) -#define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size)) -#define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size)) -#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size)) - -/* used to decode ioctl numbers.. */ -#define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) -#define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK) -#define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK) -#define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK) - -/* ...and for the drivers/sound files... */ - -#define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT) -#define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT) -#define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT) -#define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT) -#define IOCSIZE_SHIFT (_IOC_SIZESHIFT) - -/* 0x54 is just a magic number to make these relatively unique ('T') */ - -#define TCGETS 0x5401 -#define TCSETS 0x5402 -#define TCSETSW 0x5403 -#define TCSETSF 0x5404 -#define TCGETA 0x5405 -#define TCSETA 0x5406 -#define TCSETAW 0x5407 -#define TCSETAF 0x5408 -#define TCSBRK 0x5409 -#define TCXONC 0x540A -#define TCFLSH 0x540B -#define TIOCEXCL 0x540C -#define TIOCNXCL 0x540D -#define TIOCSCTTY 0x540E -#define TIOCGPGRP 0x540F -#define TIOCSPGRP 0x5410 -#define TIOCOUTQ 0x5411 -#define TIOCSTI 0x5412 -#define TIOCGWINSZ 0x5413 -#define TIOCSWINSZ 0x5414 -#define TIOCMGET 0x5415 -#define TIOCMBIS 0x5416 -#define TIOCMBIC 0x5417 -#define TIOCMSET 0x5418 -#define TIOCGSOFTCAR 0x5419 -#define TIOCSSOFTCAR 0x541A -#define FIONREAD 0x541B -#define TIOCINQ FIONREAD -#define TIOCLINUX 0x541C -#define TIOCCONS 0x541D -#define TIOCGSERIAL 0x541E -#define TIOCSSERIAL 0x541F -#define TIOCPKT 0x5420 -#define FIONBIO 0x5421 -#define TIOCNOTTY 0x5422 -#define TIOCSETD 0x5423 -#define TIOCGETD 0x5424 -#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ -#define TIOCTTYGSTRUCT 0x5426 /* For debugging only */ -#define TIOCSBRK 0x5427 /* BSD compatibility */ -#define TIOCCBRK 0x5428 /* BSD compatibility */ -#define TIOCGSID 0x5429 /* Return the session ID of FD */ -#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ -#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ - -#define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ -#define FIOCLEX 0x5451 -#define FIOASYNC 0x5452 -#define TIOCSERCONFIG 0x5453 -#define TIOCSERGWILD 0x5454 -#define TIOCSERSWILD 0x5455 -#define TIOCGLCKTRMIOS 0x5456 -#define TIOCSLCKTRMIOS 0x5457 -#define TIOCSERGSTRUCT 0x5458 /* For debugging only */ -#define TIOCSERGETLSR 0x5459 /* Get line status register */ -#define TIOCSERGETMULTI 0x545A /* Get multiport config */ -#define TIOCSERSETMULTI 0x545B /* Set multiport config */ - -#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */ -#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ -#define TIOCGHAYESESP 0x545E /* Get Hayes ESP configuration */ -#define TIOCSHAYESESP 0x545F /* Set Hayes ESP configuration */ -#define FIOQSIZE 0x5460 - -/* Used for packet mode */ -#define TIOCPKT_DATA 0 -#define TIOCPKT_FLUSHREAD 1 -#define TIOCPKT_FLUSHWRITE 2 -#define TIOCPKT_STOP 4 -#define TIOCPKT_START 8 -#define TIOCPKT_NOSTOP 16 -#define TIOCPKT_DOSTOP 32 - -#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ - -/* Socket-level I/O control calls. */ -#define FIOSETOWN 0x8901 -#define SIOCSPGRP 0x8902 -#define FIOGETOWN 0x8903 -#define SIOCGPGRP 0x8904 -#define SIOCATMARK 0x8905 -#define SIOCGSTAMP 0x8906 /* Get stamp */ diff --git a/mdk-stage1/dietlibc/include/sys/io.h b/mdk-stage1/dietlibc/include/sys/io.h deleted file mode 100644 index 40a0d459b..000000000 --- a/mdk-stage1/dietlibc/include/sys/io.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef _SYS_IO_H -#define _SYS_IO_H - -#include - -extern int ioperm(unsigned long from, unsigned long num, int turn_on) __THROW; -extern int iopl(int level) __THROW; - -#ifndef __STRICT_ANSI__ -/* anyone have a cleaner solution for this mess? */ -#if defined(__i386__) || defined(__x86_64__) -static inline unsigned char inb (unsigned short int port) { - unsigned char _v; - __asm__ __volatile__ ("inb %w1,%0":"=a" (_v):"Nd" (port)); - return _v; -} - -static inline unsigned short inw (unsigned short int port) { - unsigned short _v; - __asm__ __volatile__ ("inw %w1,%0":"=a" (_v):"Nd" (port)); - return _v; -} - -static inline unsigned int inl (unsigned short int port) { - unsigned int _v; - __asm__ __volatile__ ("inl %w1,%0":"=a" (_v):"Nd" (port)); - return _v; -} - -static inline void outb (unsigned char value, unsigned short int port) { - __asm__ __volatile__ ("outb %b0,%w1": :"a" (value), "Nd" (port)); -} - -static inline void outw (unsigned short value, unsigned short int port) { - __asm__ __volatile__ ("outw %w0,%w1": :"a" (value), "Nd" (port)); -} - -static inline void outl (unsigned int value, unsigned short int port) { - __asm__ __volatile__ ("outl %0,%w1": :"a" (value), "Nd" (port)); -} -#endif -#endif - -#endif diff --git a/mdk-stage1/dietlibc/include/sys/ioctl.h b/mdk-stage1/dietlibc/include/sys/ioctl.h deleted file mode 100644 index a7890f038..000000000 --- a/mdk-stage1/dietlibc/include/sys/ioctl.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef _IOCTL_H -#define _IOCTL_H - -#include - -#if defined(__i386__) || defined(__x86_64__) || defined(__ia64__) -#include -#elif defined(__alpha__) -#include -#elif defined(__arm__) -#include -#elif defined(__sparc__) -#include -#elif defined(__mips__) -#include -#elif defined(__powerpc__) -#include -#elif defined(__s390__) -#include -#elif defined(__hppa__) -#include -#endif - -/* used for /dev/epoll */ -#define EP_ALLOC _IOR('P', 1, int) -#define EP_POLL _IOWR('P', 2, struct evpoll) -#define EP_FREE _IO('P', 3) -#define EP_ISPOLLED _IOWR('P', 4, struct pollfd) - -int ioctl(int d, int request, ...) __THROW; - -#endif diff --git a/mdk-stage1/dietlibc/include/sys/ipc.h b/mdk-stage1/dietlibc/include/sys/ipc.h deleted file mode 100644 index 481d97b62..000000000 --- a/mdk-stage1/dietlibc/include/sys/ipc.h +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef _SYS_IPC_H -#define _SYS_IPC_H - -#include -#include - -#define SEMOP 1 -#define SEMGET 2 -#define SEMCTL 3 -#define MSGSND 11 -#define MSGRCV 12 -#define MSGGET 13 -#define MSGCTL 14 -#define SHMAT 21 -#define SHMDT 22 -#define SHMGET 23 -#define SHMCTL 24 - -#define IPC_PRIVATE ((key_t) 0) - -#define IPC_CREAT 00001000 /* create if key is nonexistent */ -#define IPC_EXCL 00002000 /* fail if key exists */ -#define IPC_NOWAIT 00004000 /* return error on wait */ - -#define IPC_RMID 0 /* remove resource */ -#define IPC_SET 1 /* set ipc_perm options */ -#define IPC_STAT 2 /* get ipc_perm options */ -#define IPC_INFO 3 /* see ipcs */ - -/* - * Version flags for semctl, msgctl, and shmctl commands - * These are passed as bitflags or-ed with the actual command - */ -#define IPC_OLD 0 /* Old version (no 32-bit UID support on many - architectures) */ -#define IPC_64 0x0100 /* New version (support 32-bit UIDs, bigger - message sizes, etc. */ - -struct ipc_perm { - key_t key; - uid_t uid; - gid_t gid; - uid_t cuid; - gid_t cgid; - mode_t mode; - unsigned short seq; -}; - -#endif diff --git a/mdk-stage1/dietlibc/include/sys/kd.h b/mdk-stage1/dietlibc/include/sys/kd.h deleted file mode 100644 index 98b337ede..000000000 --- a/mdk-stage1/dietlibc/include/sys/kd.h +++ /dev/null @@ -1,183 +0,0 @@ -#ifndef _SYS_KD_H -#define _SYS_KD_H - -/* 0x4B is 'K', to avoid collision with termios and vt */ - -#define GIO_FONT 0x4B60 /* gets font in expanded form */ -#define PIO_FONT 0x4B61 /* use font in expanded form */ - -#define GIO_FONTX 0x4B6B /* get font using struct consolefontdesc */ -#define PIO_FONTX 0x4B6C /* set font using struct consolefontdesc */ - -struct consolefontdesc { - unsigned short charcount; /* characters in font (256 or 512) */ - unsigned short charheight; /* scan lines per character (1-32) */ - char *chardata; /* font data in expanded form */ -}; - -#define PIO_FONTRESET 0x4B6D /* reset to default font */ - -#define GIO_CMAP 0x4B70 /* gets colour palette on VGA+ */ -#define PIO_CMAP 0x4B71 /* sets colour palette on VGA+ */ - -#define KIOCSOUND 0x4B2F /* start sound generation (0 for off) */ -#define KDMKTONE 0x4B30 /* generate tone */ - -#define KDGETLED 0x4B31 /* return current led state */ -#define KDSETLED 0x4B32 /* set led state [lights, not flags] */ -#define LED_SCR 0x01 /* scroll lock led */ -#define LED_CAP 0x04 /* caps lock led */ -#define LED_NUM 0x02 /* num lock led */ - -#define KDGKBTYPE 0x4B33 /* get keyboard type */ -#define KB_84 0x01 -#define KB_101 0x02 /* this is what we always answer */ -#define KB_OTHER 0x03 - -#define KDADDIO 0x4B34 /* add i/o port as valid */ -#define KDDELIO 0x4B35 /* del i/o port as valid */ -#define KDENABIO 0x4B36 /* enable i/o to video board */ -#define KDDISABIO 0x4B37 /* disable i/o to video board */ - -#define KDSETMODE 0x4B3A /* set text/graphics mode */ -#define KD_TEXT 0x00 -#define KD_GRAPHICS 0x01 -#define KD_TEXT0 0x02 /* obsolete */ -#define KD_TEXT1 0x03 /* obsolete */ -#define KDGETMODE 0x4B3B /* get current mode */ - -#define KDMAPDISP 0x4B3C /* map display into address space */ -#define KDUNMAPDISP 0x4B3D /* unmap display from address space */ - -typedef char scrnmap_t; - -#define E_TABSZ 256 -#define GIO_SCRNMAP 0x4B40 /* get screen mapping from kernel */ -#define PIO_SCRNMAP 0x4B41 /* put screen mapping table in kernel */ -#define GIO_UNISCRNMAP 0x4B69 /* get full Unicode screen mapping */ -#define PIO_UNISCRNMAP 0x4B6A /* set full Unicode screen mapping */ - -#define GIO_UNIMAP 0x4B66 /* get unicode-to-font mapping from kernel */ - -struct unipair { - unsigned short unicode; - unsigned short fontpos; -}; - -struct unimapdesc { - unsigned short entry_ct; - struct unipair *entries; -}; - -#define PIO_UNIMAP 0x4B67 /* put unicode-to-font mapping in kernel */ -#define PIO_UNIMAPCLR 0x4B68 /* clear table, possibly advise hash algorithm */ - -struct unimapinit { - unsigned short advised_hashsize; /* 0 if no opinion */ - unsigned short advised_hashstep; /* 0 if no opinion */ - unsigned short advised_hashlevel; /* 0 if no opinion */ -}; - -#define UNI_DIRECT_BASE 0xF000 /* start of Direct Font Region */ -#define UNI_DIRECT_MASK 0x01FF /* Direct Font Region bitmask */ - -#define K_RAW 0x00 -#define K_XLATE 0x01 -#define K_MEDIUMRAW 0x02 -#define K_UNICODE 0x03 -#define KDGKBMODE 0x4B44 /* gets current keyboard mode */ -#define KDSKBMODE 0x4B45 /* sets current keyboard mode */ - -#define K_METABIT 0x03 -#define K_ESCPREFIX 0x04 -#define KDGKBMETA 0x4B62 /* gets meta key handling mode */ -#define KDSKBMETA 0x4B63 /* sets meta key handling mode */ - -#define K_SCROLLLOCK 0x01 -#define K_CAPSLOCK 0x02 -#define K_NUMLOCK 0x04 -#define KDGKBLED 0x4B64 /* get led flags (not lights) */ -#define KDSKBLED 0x4B65 /* set led flags (not lights) */ - -struct kbentry { - unsigned char kb_table; - unsigned char kb_index; - unsigned short kb_value; -}; - -#define K_NORMTAB 0x00 -#define K_SHIFTTAB 0x01 -#define K_ALTTAB 0x02 -#define K_ALTSHIFTTAB 0x03 - -#define KDGKBENT 0x4B46 /* gets one entry in translation table */ -#define KDSKBENT 0x4B47 /* sets one entry in translation table */ - -struct kbsentry { - unsigned char kb_func; - unsigned char kb_string[512]; -}; - -#define KDGKBSENT 0x4B48 /* gets one function key string entry */ -#define KDSKBSENT 0x4B49 /* sets one function key string entry */ - -struct kbdiacr { - unsigned char diacr, base, result; -}; - -struct kbdiacrs { - unsigned int kb_cnt; /* number of entries in following array */ - struct kbdiacr kbdiacr[256]; /* MAX_DIACR from keyboard.h */ -}; - -#define KDGKBDIACR 0x4B4A /* read kernel accent table */ -#define KDSKBDIACR 0x4B4B /* write kernel accent table */ - -struct kbkeycode { - unsigned int scancode, keycode; -}; - -#define KDGETKEYCODE 0x4B4C /* read kernel keycode table entry */ -#define KDSETKEYCODE 0x4B4D /* write kernel keycode table entry */ - -#define KDSIGACCEPT 0x4B4E /* accept kbd generated signals */ - -struct hwclk_time { - unsigned int sec; /* 0..59 */ - unsigned int min; /* 0..59 */ - unsigned int hour; /* 0..23 */ - unsigned int day; /* 1..31 */ - unsigned int mon; /* 0..11 */ - unsigned int year; /* 70... */ - int wday; /* 0..6, 0 is Sunday, -1 means unknown/don't set */ -}; - -#define KDGHWCLK 0x4B50 /* get hardware clock */ -#define KDSHWCLK 0x4B51 /* set hardware clock */ - -struct kbd_repeat { - int delay; /* in msec; <= 0: don't change */ - int rate; /* in msec; <= 0: don't change */ -}; - -#define KDKBDREP 0x4B52 /* set keyboard delay/repeat rate; - * actually used values are returned */ - -#define KDFONTOP 0x4B72 /* font operations */ - -struct console_font_op { - unsigned int op; /* operation code KD_FONT_OP_* */ - unsigned int flags; /* KD_FONT_FLAG_* */ - unsigned int width, height; /* font size */ - unsigned int charcount; - unsigned char *data; /* font data with height fixed to 32 */ -}; - -#define KD_FONT_OP_SET 0 /* Set font */ -#define KD_FONT_OP_GET 1 /* Get font */ -#define KD_FONT_OP_SET_DEFAULT 2 /* Set font to default, data points to name / NULL */ -#define KD_FONT_OP_COPY 3 /* Copy from another console */ - -#define KD_FONT_FLAG_DONT_RECALC 1 /* Don't recalculate hw charcell size [compat] */ - -#endif diff --git a/mdk-stage1/dietlibc/include/sys/klog.h b/mdk-stage1/dietlibc/include/sys/klog.h deleted file mode 100644 index abacfef9c..000000000 --- a/mdk-stage1/dietlibc/include/sys/klog.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef _SYS_KLOG_H -#define _SYS_KLOG_H - -#include - -extern int klogctl (int __type, char *__bufp, int __len) __THROW; - -#endif diff --git a/mdk-stage1/dietlibc/include/sys/mips-ioctl.h b/mdk-stage1/dietlibc/include/sys/mips-ioctl.h deleted file mode 100644 index 889ac83ae..000000000 --- a/mdk-stage1/dietlibc/include/sys/mips-ioctl.h +++ /dev/null @@ -1,177 +0,0 @@ -#define _IOC_NRBITS 8 -#define _IOC_TYPEBITS 8 -#define _IOC_SIZEBITS 13 -#define _IOC_DIRBITS 3 - -#define _IOC_NRMASK ((1 << _IOC_NRBITS)-1) -#define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1) -#define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1) -#define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1) - -#define _IOC_NRSHIFT 0 -#define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS) -#define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS) -#define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS) - -/* - * We to additionally limit parameters to a maximum 255 bytes. - */ -#define _IOC_SLMASK 0xff - -/* - * Direction bits _IOC_NONE could be 0, but OSF/1 gives it a bit. - * And this turns out useful to catch old ioctl numbers in header - * files for us. - */ -#define _IOC_NONE 1U -#define _IOC_READ 2U -#define _IOC_WRITE 4U - -/* - * The following are included for compatibility - */ -#define _IOC_VOID 0x20000000 -#define _IOC_OUT 0x40000000 -#define _IOC_IN 0x80000000 -#define _IOC_INOUT (IOC_IN|IOC_OUT) - -#define _IOC(dir,type,nr,size) \ - (((dir) << _IOC_DIRSHIFT) | \ - ((type) << _IOC_TYPESHIFT) | \ - ((nr) << _IOC_NRSHIFT) | \ - (((size) & _IOC_SLMASK) << _IOC_SIZESHIFT)) - -/* used to create numbers */ -#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0) -#define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size)) -#define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size)) -#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size)) - -/* used to decode them.. */ -#define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) -#define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK) -#define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK) -#define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK) - -/* ...and for the drivers/sound files... */ - -#define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT) -#define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT) -#define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT) -#define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT) -#define IOCSIZE_SHIFT (_IOC_SIZESHIFT) - -#if defined(__USE_MISC) || defined (__KERNEL__) -#define tIOC ('t' << 8) -#endif - -#define TCGETA 0x5401 -#define TCSETA 0x5402 -#define TCSETAW 0x5403 -#define TCSETAF 0x5404 - -#define TCSBRK 0x5405 -#define TCXONC 0x5406 -#define TCFLSH 0x5407 - -#define TCGETS 0x540d -#define TCSETS 0x540e -#define TCSETSW 0x540f -#define TCSETSF 0x5410 - -#define TIOCEXCL 0x740d /* set exclusive use of tty */ -#define TIOCNXCL 0x740e /* reset exclusive use of tty */ -#define TIOCOUTQ 0x7472 /* output queue size */ -#define TIOCSTI 0x5472 /* simulate terminal input */ -#define TIOCMGET 0x741d /* get all modem bits */ -#define TIOCMBIS 0x741b /* bis modem bits */ -#define TIOCMBIC 0x741c /* bic modem bits */ -#define TIOCMSET 0x741a /* set all modem bits */ -#define TIOCPKT 0x5470 /* pty: set/clear packet mode */ -#define TIOCPKT_DATA 0x00 /* data packet */ -#define TIOCPKT_FLUSHREAD 0x01 /* flush packet */ -#define TIOCPKT_FLUSHWRITE 0x02 /* flush packet */ -#define TIOCPKT_STOP 0x04 /* stop output */ -#define TIOCPKT_START 0x08 /* start output */ -#define TIOCPKT_NOSTOP 0x10 /* no more ^S, ^Q */ -#define TIOCPKT_DOSTOP 0x20 /* now do ^S ^Q */ -#if 0 -#define TIOCPKT_IOCTL 0x40 /* state change of pty driver */ -#endif -#define TIOCSWINSZ _IOW('t', 103, struct winsize) /* set window size */ -#define TIOCGWINSZ _IOR('t', 104, struct winsize) /* get window size */ -#define TIOCNOTTY 0x5471 /* void tty association */ -#define TIOCSETD (tIOC | 1) -#define TIOCGETD (tIOC | 0) - -#define FIOCLEX 0x6601 -#define FIONCLEX 0x6602 /* these numbers need to be adjusted. */ -#define FIOASYNC 0x667d -#define FIONBIO 0x667e -#define FIOQSIZE 0x667f - -#if defined(__USE_MISC) || defined (__KERNEL__) -#define TIOCGLTC (tIOC | 116) /* get special local chars */ -#define TIOCSLTC (tIOC | 117) /* set special local chars */ -#endif -#define TIOCSPGRP _IOW('t', 118, int) /* set pgrp of tty */ -#define TIOCGPGRP _IOR('t', 119, int) /* get pgrp of tty */ -#define TIOCCONS _IOW('t', 120, int) /* become virtual console */ - -#define FIONREAD 0x467f -#define TIOCINQ FIONREAD - -#if defined(__USE_MISC) || defined (__KERNEL__) -#define TIOCGETP (tIOC | 8) -#define TIOCSETP (tIOC | 9) -#define TIOCSETN (tIOC | 10) /* TIOCSETP wo flush */ -#endif - -#if 0 -#define TIOCSETA _IOW('t', 20, struct termios) /* set termios struct */ -#define TIOCSETAW _IOW('t', 21, struct termios) /* drain output, set */ -#define TIOCSETAF _IOW('t', 22, struct termios) /* drn out, fls in, set */ -#define TIOCGETD _IOR('t', 26, int) /* get line discipline */ -#define TIOCSETD _IOW('t', 27, int) /* set line discipline */ - /* 127-124 compat */ -#endif - -/* I hope the range from 0x5480 on is free ... */ -#define TIOCSCTTY 0x5480 /* become controlling tty */ -#define TIOCGSOFTCAR 0x5481 -#define TIOCSSOFTCAR 0x5482 -#define TIOCLINUX 0x5483 -#define TIOCGSERIAL 0x5484 -#define TIOCSSERIAL 0x5485 - -#define TCSBRKP 0x5486 /* Needed for POSIX tcsendbreak() */ -#define TIOCTTYGSTRUCT 0x5487 /* For debugging only */ -#define TIOCSBRK 0x5427 /* BSD compatibility */ -#define TIOCCBRK 0x5428 /* BSD compatibility */ -#define TIOCGSID 0x7416 /* Return the session ID of FD */ -#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ -#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ - -#define TIOCSERCONFIG 0x5488 -#define TIOCSERGWILD 0x5489 -#define TIOCSERSWILD 0x548a -#define TIOCGLCKTRMIOS 0x548b -#define TIOCSLCKTRMIOS 0x548c -#define TIOCSERGSTRUCT 0x548d /* For debugging only */ -#define TIOCSERGETLSR 0x548e /* Get line status register */ -#define TIOCSERGETMULTI 0x548f /* Get multiport config */ -#define TIOCSERSETMULTI 0x5490 /* Set multiport config */ -#define TIOCMIWAIT 0x5491 /* wait for a change on serial input line(s) */ -#define TIOCGICOUNT 0x5492 /* read serial port inline interrupt counts */ -#define TIOCGHAYESESP 0x5493 /* Get Hayes ESP configuration */ -#define TIOCSHAYESESP 0x5494 /* Set Hayes ESP configuration */ - -/* Socket-level I/O control calls. */ -#define FIOGETOWN _IOR('f', 123, int) -#define FIOSETOWN _IOW('f', 124, int) - -#define SIOCATMARK _IOR('s', 7, int) -#define SIOCSPGRP _IOW('s', 8, pid_t) -#define SIOCGPGRP _IOR('s', 9, pid_t) - -#define SIOCGSTAMP 0x8906 /* Get stamp - linux-specific */ diff --git a/mdk-stage1/dietlibc/include/sys/mman.h b/mdk-stage1/dietlibc/include/sys/mman.h deleted file mode 100644 index 298773a92..000000000 --- a/mdk-stage1/dietlibc/include/sys/mman.h +++ /dev/null @@ -1,184 +0,0 @@ -#ifndef _SYS_MMAN_H -#define _SYS_MMAN_H - -#include -#include - -#define MREMAP_MAYMOVE 1UL -#define MREMAP_FIXED 2UL - -#define PROT_READ 0x1 /* page can be read */ -#define PROT_WRITE 0x2 /* page can be written */ -#define PROT_EXEC 0x4 /* page can be executed */ -#define PROT_NONE 0x0 /* page can not be accessed */ - -#define MAP_SHARED 0x01 /* Share changes */ -#define MAP_PRIVATE 0x02 /* Changes are private */ - -#ifdef __mips__ -#define MAP_FIXED 0x010 /* Interpret addr exactly */ -#define MAP_NORESERVE 0x0400 /* don't check for reservations */ -#define MAP_ANONYMOUS 0x0800 /* don't use a file */ -#define MAP_GROWSDOWN 0x1000 /* stack-like segment */ -#define MAP_DENYWRITE 0x2000 /* ETXTBSY */ -#define MAP_EXECUTABLE 0x4000 /* mark it as an executable */ -#define MAP_LOCKED 0x8000 /* pages are locked */ -#define MS_ASYNC 0x0001 /* sync memory asynchronously */ -#define MS_INVALIDATE 0x0002 /* invalidate mappings & caches */ -#define MS_SYNC 0x0004 /* synchronous memory sync */ -#define MCL_CURRENT 1 /* lock all current mappings */ -#define MCL_FUTURE 2 /* lock all future mappings */ -#define MADV_NORMAL 0x0 /* default page-in behavior */ -#define MADV_RANDOM 0x1 /* page-in minimum required */ -#define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ -#define MADV_WILLNEED 0x3 /* pre-fault pages */ -#define MADV_DONTNEED 0x4 /* discard these pages */ -#else - -#ifdef __alpha__ -#define MAP_FIXED 0x100 /* Interpret addr exactly */ -#define MAP_ANONYMOUS 0x10 /* don't use a file */ -#define MAP_GROWSDOWN 0x1000 /* stack-like segment */ -#define MAP_DENYWRITE 0x2000 /* ETXTBSY */ -#define MAP_EXECUTABLE 0x4000 /* mark it as an executable */ -#define MAP_LOCKED 0x8000 /* lock the mapping */ -#define MAP_NORESERVE 0x10000 /* don't check for reservations */ -#define MS_ASYNC 1 /* sync memory asynchronously */ -#define MS_SYNC 2 /* synchronous memory sync */ -#define MS_INVALIDATE 4 /* invalidate the caches */ -#define MCL_CURRENT 8192 /* lock all currently mapped pages */ -#define MCL_FUTURE 16384 /* lock all additions to address space */ -#define MADV_NORMAL 0 /* no further special treatment */ -#define MADV_RANDOM 1 /* expect random page references */ -#define MADV_SEQUENTIAL 2 /* expect sequential page references */ -#define MADV_WILLNEED 3 /* will need these pages */ -#define MADV_SPACEAVAIL 5 /* ensure resources are available */ -#define MADV_DONTNEED 6 /* dont need these pages */ -#else -#define MAP_FIXED 0x10 /* Interpret addr exactly */ -#define MAP_ANONYMOUS 0x20 /* don't use a file */ -#endif - -#if defined(__i386__) || defined(__s390__) || defined(__x86_64__) -#define MAP_GROWSDOWN 0x0100 /* stack-like segment */ -#define MAP_DENYWRITE 0x0800 /* ETXTBSY */ -#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ -#define MAP_LOCKED 0x2000 /* pages are locked */ -#define MAP_NORESERVE 0x4000 /* don't check for reservations */ -#define MS_ASYNC 1 /* sync memory asynchronously */ -#define MS_INVALIDATE 2 /* invalidate the caches */ -#define MS_SYNC 4 /* synchronous memory sync */ -#define MCL_CURRENT 1 /* lock all current mappings */ -#define MCL_FUTURE 2 /* lock all future mappings */ -#define MADV_NORMAL 0x0 /* default page-in behavior */ -#define MADV_RANDOM 0x1 /* page-in minimum required */ -#define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ -#define MADV_WILLNEED 0x3 /* pre-fault pages */ -#define MADV_DONTNEED 0x4 /* discard these pages */ -#elif defined(__sparc__) || defined (__powerpc__) -#define MAP_RENAME MAP_ANONYMOUS /* In SunOS terminology */ -#define MAP_NORESERVE 0x40 /* don't reserve swap pages */ -#define MAP_INHERIT 0x80 /* SunOS doesn't do this, but... */ -#define MAP_LOCKED 0x100 /* lock the mapping */ -#define _MAP_NEW 0x80000000 /* Binary compatibility is fun... */ -#define MAP_GROWSDOWN 0x0100 /* stack-like segment */ -#define MAP_DENYWRITE 0x0800 /* ETXTBSY */ -#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ -#define MS_ASYNC 1 /* sync memory asynchronously */ -#define MS_INVALIDATE 2 /* invalidate the caches */ -#define MS_SYNC 4 /* synchronous memory sync */ -#define MCL_CURRENT 0x2000 /* lock all currently mapped pages */ -#define MCL_FUTURE 0x4000 /* lock all additions to address space */ -#define MADV_NORMAL 0x0 /* default page-in behavior */ -#define MADV_RANDOM 0x1 /* page-in minimum required */ -#define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ -#define MADV_WILLNEED 0x3 /* pre-fault pages */ -#define MADV_DONTNEED 0x4 /* discard these pages */ -#define MADV_FREE 0x5 /* (Solaris) contents can be freed */ -#elif defined (__arm__) -#define MAP_GROWSDOWN 0x0100 /* stack-like segment */ -#define MAP_DENYWRITE 0x0800 /* ETXTBSY */ -#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ -#define MAP_LOCKED 0x2000 /* pages are locked */ -#define MAP_NORESERVE 0x4000 /* don't check for reservations */ -#define MS_ASYNC 1 /* sync memory asynchronously */ -#define MS_INVALIDATE 2 /* invalidate the caches */ -#define MS_SYNC 4 /* synchronous memory sync */ -#define MCL_CURRENT 1 /* lock all current mappings */ -#define MCL_FUTURE 2 /* lock all future mappings */ -#define MADV_NORMAL 0x0 /* default page-in behavior */ -#define MADV_RANDOM 0x1 /* page-in minimum required */ -#define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ -#define MADV_WILLNEED 0x3 /* pre-fault pages */ -#define MADV_DONTNEED 0x4 /* discard these pages */ - -#elif defined(__hppa__) -#define MAP_TYPE 0x03 /* Mask for type of mapping */ -#define MAP_FIXED 0x04 /* Interpret addr exactly */ -#define MAP_ANONYMOUS 0x10 /* don't use a file */ - -#define MAP_DENYWRITE 0x0800 /* ETXTBSY */ -#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ -#define MAP_LOCKED 0x2000 /* pages are locked */ -#define MAP_NORESERVE 0x4000 /* don't check for reservations */ -#define MAP_GROWSDOWN 0x8000 /* stack-like segment */ - -#define MS_SYNC 1 /* synchronous memory sync */ -#define MS_ASYNC 2 /* sync memory asynchronously */ -#define MS_INVALIDATE 4 /* invalidate the caches */ - -#define MCL_CURRENT 1 /* lock all current mappings */ -#define MCL_FUTURE 2 - -#elif defined(__ia64__) - -#define MAP_TYPE 0x0f /* Mask for type of mapping */ -#define MAP_FIXED 0x10 /* Interpret addr exactly */ -#define MAP_ANONYMOUS 0x20 /* don't use a file */ - -#define MAP_GROWSDOWN 0x0100 /* stack-like segment */ -#define MAP_GROWSUP 0x0200 /* register stack-like segment */ -#define MAP_DENYWRITE 0x0800 /* ETXTBSY */ -#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ -#define MAP_LOCKED 0x2000 /* pages are locked */ -#define MAP_NORESERVE 0x4000 /* don't check for reservations */ -#define MAP_WRITECOMBINED 0x10000 /* write-combine the area */ -#define MAP_NONCACHED 0x20000 /* don't cache the memory */ - -#define MS_ASYNC 1 /* sync memory asynchronously */ -#define MS_INVALIDATE 2 /* invalidate the caches */ -#define MS_SYNC 4 /* synchronous memory sync */ - -#endif - -#endif - -/* compatibility flags */ -#define MAP_ANON MAP_ANONYMOUS -#define MAP_FILE 0 - -#define MAP_FAILED ((void *) -1) - -extern void *mmap (void *__addr, size_t __len, int __prot, - int __flags, int __fd, off_t __offset); - -extern int munmap (void *__addr, size_t __len) __THROW; -extern int mprotect (void *__addr, size_t __len, int __prot) __THROW; -extern int msync (void *__addr, size_t __len, int __flags) __THROW; -extern void *mremap (void *__addr, size_t __old_len, size_t __new_len, - unsigned long __may_move) __THROW; -extern int mincore (void *__start, size_t __len, unsigned char *__vec); - -extern void *mmap64 (void *__addr, size_t __len, int __prot, - int __flags, int __fd, off64_t __offset) __THROW; - -int mlockall(int flags) __THROW; -int mlock(const void *addr, size_t len) __THROW; -int munlock(const void *addr, size_t len) __THROW; -int munlockall(void) __THROW; - -int madvise(void *start, size_t length, int advice) __THROW; - -#define _POSIX_MAPPED_FILES - -#endif diff --git a/mdk-stage1/dietlibc/include/sys/mount.h b/mdk-stage1/dietlibc/include/sys/mount.h deleted file mode 100644 index a5170fda9..000000000 --- a/mdk-stage1/dietlibc/include/sys/mount.h +++ /dev/null @@ -1,80 +0,0 @@ -#ifndef _SYS_MOUNT_H -#define _SYS_MOUNT_H - -#include -#include -#define _LINUX_CONFIG_H - -#define BLOCK_SIZE 1024 -#define BLOCK_SIZE_BITS 10 - - -/* These are the fs-independent mount-flags: up to 16 flags are - supported */ -enum -{ - MS_RDONLY = 1, /* Mount read-only. */ -#define MS_RDONLY MS_RDONLY - MS_NOSUID = 2, /* Ignore suid and sgid bits. */ -#define MS_NOSUID MS_NOSUID - MS_NODEV = 4, /* Disallow access to device special files. */ -#define MS_NODEV MS_NODEV - MS_NOEXEC = 8, /* Disallow program execution. */ -#define MS_NOEXEC MS_NOEXEC - MS_SYNCHRONOUS = 16, /* Writes are synced at once. */ -#define MS_SYNCHRONOUS MS_SYNCHRONOUS - MS_REMOUNT = 32, /* Alter flags of a mounted FS. */ -#define MS_REMOUNT MS_REMOUNT - MS_MANDLOCK = 64, /* Allow mandatory locks on an FS. */ -#define MS_MANDLOCK MS_MANDLOCK - S_WRITE = 128, /* Write on file/directory/symlink. */ -#define S_WRITE S_WRITE - S_APPEND = 256, /* Append-only file. */ -#define S_APPEND S_APPEND - S_IMMUTABLE = 512, /* Immutable file. */ -#define S_IMMUTABLE S_IMMUTABLE - MS_NOATIME = 1024, /* Do not update access times. */ -#define MS_NOATIME MS_NOATIME - MS_NODIRATIME = 2048, /* Do not update directory access times. */ -#define MS_NODIRATIME MS_NODIRATIME - MS_BIND = 4096, /* Bind directory at different place. */ -#define MS_BIND MS_BIND -}; - -/* Flags that can be altered by MS_REMOUNT */ -#define MS_RMT_MASK (MS_RDONLY | MS_MANDLOCK) - - -/* Magic mount flag number. Has to be or-ed to the flag values. */ - -#define MS_MGC_VAL 0xc0ed0000 /* Magic flag number to indicate "new" flags */ -#define MS_MGC_MSK 0xffff0000 /* Magic flag number mask */ - - -/* The read-only stuff doesn't really belong here, but any other place - is probably as bad and I don't want to create yet another include - file. */ - -#define BLKROSET _IO(0x12, 93) /* Set device read-only (0 = read-write). */ -#define BLKROGET _IO(0x12, 94) /* Get read-only status (0 = read_write). */ -#define BLKRRPART _IO(0x12, 95) /* Re-read partition table. */ -#define BLKGETSIZE _IO(0x12, 96) /* Return device size. */ -#define BLKFLSBUF _IO(0x12, 97) /* Flush buffer cache. */ -#define BLKRASET _IO(0x12, 98) /* Set read ahead for block device. */ -#define BLKRAGET _IO(0x12, 99) /* Get current read ahead setting. */ - - -/* Possible value for FLAGS parameter of `umount2'. */ -enum -{ - MNT_FORCE = 1 /* Force unmounting. */ -#define MNT_FORCE MNT_FORCE -}; - -int mount(const char* specialfile, const char* dir, const char* filesystemtype, - unsigned long rwflag, const void * data) __THROW; - -int umount(const char *specialfile) __THROW; -int umount2(const char *specialfile, int mflag) __THROW; - -#endif diff --git a/mdk-stage1/dietlibc/include/sys/msg.h b/mdk-stage1/dietlibc/include/sys/msg.h deleted file mode 100644 index 564fd9472..000000000 --- a/mdk-stage1/dietlibc/include/sys/msg.h +++ /dev/null @@ -1,57 +0,0 @@ -#ifndef _SYS_MSG_H -#define _SYS_MSG_H - -#include - -/* ipcs ctl commands */ -#define MSG_STAT 11 -#define MSG_INFO 12 - -/* msgrcv options */ -#define MSG_NOERROR 010000 /* no error if message is too big */ -#define MSG_EXCEPT 020000 /* recv any msg except of specified type.*/ - -struct msqid_ds { - struct ipc_perm msg_perm; - struct msg *msg_first; /* first message on queue,unused */ - struct msg *msg_last; /* last message in queue,unused */ - time_t msg_stime; /* last msgsnd time */ - time_t msg_rtime; /* last msgrcv time */ - time_t msg_ctime; /* last change time */ - unsigned long msg_lcbytes; /* Reuse junk fields for 32 bit */ - unsigned long msg_lqbytes; /* ditto */ - unsigned short msg_cbytes; /* current number of bytes on queue */ - unsigned short msg_qnum; /* number of messages in queue */ - unsigned short msg_qbytes; /* max number of bytes on queue */ - pid_t msg_lspid; /* pid of last msgsnd */ - pid_t msg_lrpid; /* last receive pid */ -}; - -/* message buffer for msgsnd and msgrcv calls */ -struct msgbuf { - long mtype; /* type of message */ - char mtext[1]; /* message text */ -}; - -/* buffer for msgctl calls IPC_INFO, MSG_INFO */ -struct msginfo { - int msgpool; - int msgmap; - int msgmax; - int msgmnb; - int msgmni; - int msgssz; - int msgtql; - unsigned short msgseg; -}; - -#define MSGMNI 16 /* <= IPCMNI */ /* max # of msg queue identifiers */ -#define MSGMAX 8192 /* <= INT_MAX */ /* max size of message (bytes) */ -#define MSGMNB 16384 /* <= INT_MAX */ /* default max size of a message queue */ - -extern int msgctl (int msqid, int cmd, struct msqid_ds *buf) __THROW; -extern int msgget (key_t key, int msgflg) __THROW; -extern int msgrcv (int msqid, void *msgp, size_t msgsz, long int msgtyp, int msgflg) __THROW; -extern int msgsnd (int msqid, const void *msgp, size_t msgsz, int msgflg) __THROW; - -#endif diff --git a/mdk-stage1/dietlibc/include/sys/mtio.h b/mdk-stage1/dietlibc/include/sys/mtio.h deleted file mode 100644 index 08c735dcc..000000000 --- a/mdk-stage1/dietlibc/include/sys/mtio.h +++ /dev/null @@ -1,340 +0,0 @@ -#ifndef _SYS_MTIO_H -#define _SYS_MTIO_H - -#include - -/* structure for MTIOCTOP - mag tape op command */ -struct mtop { - short int mt_op; /* operations defined below */ - int mt_count; /* how many of them */ -}; - -/* Magnetic Tape operations [Not all operations supported by all drivers]: */ -#define MTRESET 0 /* +reset drive in case of problems */ -#define MTFSF 1 /* forward space over FileMark, - * position at first record of next file - */ -#define MTBSF 2 /* backward space FileMark (position before FM) */ -#define MTFSR 3 /* forward space record */ -#define MTBSR 4 /* backward space record */ -#define MTWEOF 5 /* write an end-of-file record (mark) */ -#define MTREW 6 /* rewind */ -#define MTOFFL 7 /* rewind and put the drive offline (eject?) */ -#define MTNOP 8 /* no op, set status only (read with MTIOCGET) */ -#define MTRETEN 9 /* retension tape */ -#define MTBSFM 10 /* +backward space FileMark, position at FM */ -#define MTFSFM 11 /* +forward space FileMark, position at FM */ -#define MTEOM 12 /* goto end of recorded media (for appending files). - * MTEOM positions after the last FM, ready for - * appending another file. - */ -#define MTERASE 13 /* erase tape -- be careful! */ - -#define MTRAS1 14 /* run self test 1 (nondestructive) */ -#define MTRAS2 15 /* run self test 2 (destructive) */ -#define MTRAS3 16 /* reserved for self test 3 */ - -#define MTSETBLK 20 /* set block length (SCSI) */ -#define MTSETDENSITY 21 /* set tape density (SCSI) */ -#define MTSEEK 22 /* seek to block (Tandberg, etc.) */ -#define MTTELL 23 /* tell block (Tandberg, etc.) */ -#define MTSETDRVBUFFER 24 /* set the drive buffering according to SCSI-2 */ - /* ordinary buffered operation with code 1 */ -#define MTFSS 25 /* space forward over setmarks */ -#define MTBSS 26 /* space backward over setmarks */ -#define MTWSM 27 /* write setmarks */ - -#define MTLOCK 28 /* lock the drive door */ -#define MTUNLOCK 29 /* unlock the drive door */ -#define MTLOAD 30 /* execute the SCSI load command */ -#define MTUNLOAD 31 /* execute the SCSI unload command */ -#define MTCOMPRESSION 32/* control compression with SCSI mode page 15 */ -#define MTSETPART 33 /* Change the active tape partition */ -#define MTMKPART 34 /* Format the tape with one or two partitions */ - -/* structure for MTIOCGET - mag tape get status command */ - -typedef int daddr_t; - -struct mtget { - long int mt_type; /* type of magtape device */ - long int mt_resid; /* residual count: (not sure) - * number of bytes ignored, or - * number of files not skipped, or - * number of records not skipped. - */ - /* the following registers are device dependent */ - long int mt_dsreg; /* status register */ - long int mt_gstat; /* generic (device independent) status */ - long int mt_erreg; /* error register */ - /* The next two fields are not always used */ - daddr_t mt_fileno; /* number of current file on tape */ - daddr_t mt_blkno; /* current block number */ -}; - -/* - * Constants for mt_type. Not all of these are supported, - * and these are not all of the ones that are supported. - */ -#define MT_ISUNKNOWN 0x01 -#define MT_ISQIC02 0x02 /* Generic QIC-02 tape streamer */ -#define MT_ISWT5150 0x03 /* Wangtek 5150EQ, QIC-150, QIC-02 */ -#define MT_ISARCHIVE_5945L2 0x04 /* Archive 5945L-2, QIC-24, QIC-02? */ -#define MT_ISCMSJ500 0x05 /* CMS Jumbo 500 (QIC-02?) */ -#define MT_ISTDC3610 0x06 /* Tandberg 6310, QIC-24 */ -#define MT_ISARCHIVE_VP60I 0x07 /* Archive VP60i, QIC-02 */ -#define MT_ISARCHIVE_2150L 0x08 /* Archive Viper 2150L */ -#define MT_ISARCHIVE_2060L 0x09 /* Archive Viper 2060L */ -#define MT_ISARCHIVESC499 0x0A /* Archive SC-499 QIC-36 controller */ -#define MT_ISQIC02_ALL_FEATURES 0x0F /* Generic QIC-02 with all features */ -#define MT_ISWT5099EEN24 0x11 /* Wangtek 5099-een24, 60MB, QIC-24 */ -#define MT_ISTEAC_MT2ST 0x12 /* Teac MT-2ST 155mb drive, Teac DC-1 card (Wangtek type) */ -#define MT_ISEVEREX_FT40A 0x32 /* Everex FT40A (QIC-40) */ -#define MT_ISDDS1 0x51 /* DDS device without partitions */ -#define MT_ISDDS2 0x52 /* DDS device with partitions */ -#define MT_ISONSTREAM_SC 0x61 /* OnStream SCSI tape drives (SC-x0) - and SCSI emulated (DI, DP, USB) */ -#define MT_ISSCSI1 0x71 /* Generic ANSI SCSI-1 tape unit */ -#define MT_ISSCSI2 0x72 /* Generic ANSI SCSI-2 tape unit */ - -/* QIC-40/80/3010/3020 ftape supported drives. - * 20bit vendor ID + 0x800000 (see ftape-vendors.h) - */ -#define MT_ISFTAPE_UNKNOWN 0x800000 /* obsolete */ -#define MT_ISFTAPE_FLAG 0x800000 - -struct mt_tape_info { - long int t_type; /* device type id (mt_type) */ - char* t_name; /* descriptive name */ -}; - -#define MT_TAPE_INFO { \ - {MT_ISUNKNOWN, "Unknown type of tape device"}, \ - {MT_ISQIC02, "Generic QIC-02 tape streamer"}, \ - {MT_ISWT5150, "Wangtek 5150, QIC-150"}, \ - {MT_ISARCHIVE_5945L2, "Archive 5945L-2"}, \ - {MT_ISCMSJ500, "CMS Jumbo 500"}, \ - {MT_ISTDC3610, "Tandberg TDC 3610, QIC-24"}, \ - {MT_ISARCHIVE_VP60I, "Archive VP60i, QIC-02"}, \ - {MT_ISARCHIVE_2150L, "Archive Viper 2150L"}, \ - {MT_ISARCHIVE_2060L, "Archive Viper 2060L"}, \ - {MT_ISARCHIVESC499, "Archive SC-499 QIC-36 controller"}, \ - {MT_ISQIC02_ALL_FEATURES, "Generic QIC-02 tape, all features"}, \ - {MT_ISWT5099EEN24, "Wangtek 5099-een24, 60MB"}, \ - {MT_ISTEAC_MT2ST, "Teac MT-2ST 155mb data cassette drive"}, \ - {MT_ISEVEREX_FT40A, "Everex FT40A, QIC-40"}, \ - {MT_ISONSTREAM_SC, "OnStream SC-, DI-, DP-, or USB tape drive"}, \ - {MT_ISSCSI1, "Generic SCSI-1 tape"}, \ - {MT_ISSCSI2, "Generic SCSI-2 tape"}, \ - {0, NULL} \ -} - - -/* structure for MTIOCPOS - mag tape get position command */ - -struct mtpos { - long int mt_blkno; /* current block number */ -}; - - -/* structure for MTIOCGETCONFIG/MTIOCSETCONFIG primarily intended - * as an interim solution for QIC-02 until DDI is fully implemented. - */ -struct mtconfiginfo { - long int mt_type; /* drive type */ - long int ifc_type; /* interface card type */ - unsigned short int irqnr; /* IRQ number to use */ - unsigned short int dmanr; /* DMA channel to use */ - unsigned short int port; /* IO port base address */ - - unsigned long int debug; /* debugging flags */ - - unsigned int have_dens:1; - unsigned int have_bsf:1; - unsigned int have_fsr:1; - unsigned int have_bsr:1; - unsigned int have_eod:1; - unsigned int have_seek:1; - unsigned int have_tell:1; - unsigned int have_ras1:1; - unsigned int have_ras2:1; - unsigned int have_ras3:1; - unsigned int have_qfa:1; - - unsigned int pad1:5; - char reserved[10]; -}; - -/* structure for MTIOCVOLINFO, query information about the volume - * currently positioned at (zftape) - */ -struct mtvolinfo { - unsigned int mt_volno; /* vol-number */ - unsigned int mt_blksz; /* blocksize used when recording */ - unsigned int mt_rawsize; /* raw tape space consumed, in kb */ - unsigned int mt_size; /* volume size after decompression, in kb */ - unsigned int mt_cmpr:1; /* this volume has been compressed */ -}; - -/* raw access to a floppy drive, read and write an arbitrary segment. - * For ftape/zftape to support formatting etc. - */ -#define MT_FT_RD_SINGLE 0 -#define MT_FT_RD_AHEAD 1 -#define MT_FT_WR_ASYNC 0 /* start tape only when all buffers are full */ -#define MT_FT_WR_MULTI 1 /* start tape, continue until buffers are empty */ -#define MT_FT_WR_SINGLE 2 /* write a single segment and stop afterwards */ -#define MT_FT_WR_DELETE 3 /* write deleted data marks, one segment at time */ - -struct mtftseg { - unsigned int mt_segno; /* the segment to read or write */ - unsigned int mt_mode; /* modes for read/write (sync/async etc.) */ - int mt_result; /* result of r/w request, not of the ioctl */ - void *mt_data; /* User space buffer: must be 29kb */ -}; - -/* get tape capacity (ftape/zftape) - */ -struct mttapesize { - unsigned long mt_capacity; /* entire, uncompressed capacity of a cartridge */ - unsigned long mt_used; /* what has been used so far, raw uncompressed amount */ -}; - -/* possible values of the ftfmt_op field - */ -#define FTFMT_SET_PARMS 1 /* set software parms */ -#define FTFMT_GET_PARMS 2 /* get software parms */ -#define FTFMT_FORMAT_TRACK 3 /* start formatting a tape track */ -#define FTFMT_STATUS 4 /* monitor formatting a tape track */ -#define FTFMT_VERIFY 5 /* verify the given segment */ - -struct ftfmtparms { - unsigned char ft_qicstd; /* QIC-40/QIC-80/QIC-3010/QIC-3020 */ - unsigned char ft_fmtcode; /* Refer to the QIC specs */ - unsigned char ft_fhm; /* floppy head max */ - unsigned char ft_ftm; /* floppy track max */ - unsigned short ft_spt; /* segments per track */ - unsigned short ft_tpc; /* tracks per cartridge */ -}; - -struct ftfmttrack { - unsigned int ft_track; /* track to format */ - unsigned char ft_gap3; /* size of gap3, for FORMAT_TRK */ -}; - -struct ftfmtstatus { - unsigned int ft_segment; /* segment currently being formatted */ -}; - -struct ftfmtverify { - unsigned int ft_segment; /* segment to verify */ - unsigned long ft_bsm; /* bsm as result of VERIFY cmd */ -}; - -struct mtftformat { - unsigned int fmt_op; /* operation to perform */ - union fmt_arg { - struct ftfmtparms fmt_parms; /* format parameters */ - struct ftfmttrack fmt_track; /* ctrl while formatting */ - struct ftfmtstatus fmt_status; - struct ftfmtverify fmt_verify; /* for verifying */ - } fmt_arg; -}; - -/* mag tape io control commands */ -#define MTIOCTOP _IOW('m', 1, struct mtop) /* do a mag tape op */ -#define MTIOCGET _IOR('m', 2, struct mtget) /* get tape status */ -#define MTIOCPOS _IOR('m', 3, struct mtpos) /* get tape position */ - -/* The next two are used by the QIC-02 driver for runtime reconfiguration. - * See tpqic02.h for struct mtconfiginfo. - */ -#define MTIOCGETCONFIG _IOR('m', 4, struct mtconfiginfo) /* get tape config */ -#define MTIOCSETCONFIG _IOW('m', 5, struct mtconfiginfo) /* set tape config */ - -/* the next six are used by the floppy ftape drivers and its frontends - * sorry, but MTIOCTOP commands are write only. - */ -#define MTIOCRDFTSEG _IOWR('m', 6, struct mtftseg) /* read a segment */ -#define MTIOCWRFTSEG _IOWR('m', 7, struct mtftseg) /* write a segment */ -#define MTIOCVOLINFO _IOR('m', 8, struct mtvolinfo) /* info about volume */ -#define MTIOCGETSIZE _IOR('m', 9, struct mttapesize)/* get cartridge size*/ -#define MTIOCFTFORMAT _IOWR('m', 10, struct mtftformat) /* format ftape */ -#define MTIOCFTCMD _IOWR('m', 11, struct mtftcmd) /* send QIC-117 cmd */ - -/* Generic Mag Tape (device independent) status macros for examining - * mt_gstat -- HP-UX compatible. - * There is room for more generic status bits here, but I don't - * know which of them are reserved. At least three or so should - * be added to make this really useful. - */ -#define GMT_EOF(x) ((x) & 0x80000000) -#define GMT_BOT(x) ((x) & 0x40000000) -#define GMT_EOT(x) ((x) & 0x20000000) -#define GMT_SM(x) ((x) & 0x10000000) /* DDS setmark */ -#define GMT_EOD(x) ((x) & 0x08000000) /* DDS EOD */ -#define GMT_WR_PROT(x) ((x) & 0x04000000) -/* #define GMT_ ? ((x) & 0x02000000) */ -#define GMT_ONLINE(x) ((x) & 0x01000000) -#define GMT_D_6250(x) ((x) & 0x00800000) -#define GMT_D_1600(x) ((x) & 0x00400000) -#define GMT_D_800(x) ((x) & 0x00200000) -/* #define GMT_ ? ((x) & 0x00100000) */ -/* #define GMT_ ? ((x) & 0x00080000) */ -#define GMT_DR_OPEN(x) ((x) & 0x00040000) /* door open (no tape) */ -/* #define GMT_ ? ((x) & 0x00020000) */ -#define GMT_IM_REP_EN(x) ((x) & 0x00010000) /* immediate report mode */ -/* 16 generic status bits unused */ - - -/* SCSI-tape specific definitions */ -/* Bitfield shifts in the status */ -#define MT_ST_BLKSIZE_SHIFT 0 -#define MT_ST_BLKSIZE_MASK 0xffffff -#define MT_ST_DENSITY_SHIFT 24 -#define MT_ST_DENSITY_MASK 0xff000000 - -#define MT_ST_SOFTERR_SHIFT 0 -#define MT_ST_SOFTERR_MASK 0xffff - -/* Bitfields for the MTSETDRVBUFFER ioctl */ -#define MT_ST_OPTIONS 0xf0000000 -#define MT_ST_BOOLEANS 0x10000000 -#define MT_ST_SETBOOLEANS 0x30000000 -#define MT_ST_CLEARBOOLEANS 0x40000000 -#define MT_ST_WRITE_THRESHOLD 0x20000000 -#define MT_ST_DEF_BLKSIZE 0x50000000 -#define MT_ST_DEF_OPTIONS 0x60000000 -#define MT_ST_TIMEOUTS 0x70000000 -#define MT_ST_SET_TIMEOUT (MT_ST_TIMEOUTS | 0x000000) -#define MT_ST_SET_LONG_TIMEOUT (MT_ST_TIMEOUTS | 0x100000) - -#define MT_ST_BUFFER_WRITES 0x1 -#define MT_ST_ASYNC_WRITES 0x2 -#define MT_ST_READ_AHEAD 0x4 -#define MT_ST_DEBUGGING 0x8 -#define MT_ST_TWO_FM 0x10 -#define MT_ST_FAST_MTEOM 0x20 -#define MT_ST_AUTO_LOCK 0x40 -#define MT_ST_DEF_WRITES 0x80 -#define MT_ST_CAN_BSR 0x100 -#define MT_ST_NO_BLKLIMS 0x200 -#define MT_ST_CAN_PARTITIONS 0x400 -#define MT_ST_SCSI2LOGICAL 0x800 -#define MT_ST_SYSV 0x1000 - -/* The mode parameters to be controlled. Parameter chosen with bits 20-28 */ -#define MT_ST_CLEAR_DEFAULT 0xfffff -#define MT_ST_DEF_DENSITY (MT_ST_DEF_OPTIONS | 0x100000) -#define MT_ST_DEF_COMPRESSION (MT_ST_DEF_OPTIONS | 0x200000) -#define MT_ST_DEF_DRVBUFFER (MT_ST_DEF_OPTIONS | 0x300000) - -/* The offset for the arguments for the special HP changer load command. */ -#define MT_ST_HPLOADER_OFFSET 10000 - -/* Specify default tape device. */ -#ifndef DEFTAPE -#define DEFTAPE "/dev/tape/0" -#endif - -#endif diff --git a/mdk-stage1/dietlibc/include/sys/param.h b/mdk-stage1/dietlibc/include/sys/param.h deleted file mode 100644 index 0744dccdb..000000000 --- a/mdk-stage1/dietlibc/include/sys/param.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef _SYS_PARAM_H -#define _SYS_PARAM_H - -#include - -#define MAXPATHLEN PATH_MAX -#define MAXHOSTNAMELEN 64 -#define NGROUPS 32 -#define NOGROUP (-1) - -#undef MIN -#undef MAX -#define MIN(a,b) (((a)<(b))?(a):(b)) -#define MAX(a,b) (((a)>(b))?(a):(b)) - -#ifdef __alpha__ -#define HZ 1024 -#else -#define HZ 100 -#endif - -#ifndef howmany -# define howmany(x, y) (((x)+((y)-1))/(y)) -#endif -#define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) -#define powerof2(x) ((((x)-1)&(x))==0) - -#endif diff --git a/mdk-stage1/dietlibc/include/sys/poll.h b/mdk-stage1/dietlibc/include/sys/poll.h deleted file mode 100644 index fe36df79d..000000000 --- a/mdk-stage1/dietlibc/include/sys/poll.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef _SYS_POLL_H -#define _SYS_POLL_H - -#include - -enum { - POLLIN = 0x0001, -#define POLLIN POLLIN - POLLPRI = 0x0002, -#define POLLPRI POLLPRI - POLLOUT = 0x0004, -#define POLLOUT POLLOUT - POLLERR = 0x0008, -#define POLLERR POLLERR - POLLHUP = 0x0010, -#define POLLHUP POLLHUP - POLLNVAL = 0x0020, -#define POLLNVAL POLLNVAL - POLLRDNORM = 0x0040, -#define POLLRDNORM POLLRDNORM - POLLRDBAND = 0x0080, -#define POLLRDBAND POLLRDBAND - POLLWRBAND = 0x0200, -#define POLLWRBAND POLLWRBAND - POLLMSG = 0x0400, -#define POLLMSG POLLMSG -/* POLLREMOVE is for /dev/epoll (/dev/misc/eventpoll), - * a new event notification mechanism for 2.6 */ - POLLREMOVE = 0x1000, -#define POLLREMOVE POLLREMOVE -}; - -#if defined(__sparc__) || defined (__mips__) -#define POLLWRNORM POLLOUT -#else -#define POLLWRNORM 0x0100 -#endif - -struct pollfd { - int fd; - short events; - short revents; -}; - -extern int poll(struct pollfd *ufds, unsigned int nfds, int timeout) __THROW; - -#endif /* _SYS_POLL_H */ diff --git a/mdk-stage1/dietlibc/include/sys/ppc-ioctl.h b/mdk-stage1/dietlibc/include/sys/ppc-ioctl.h deleted file mode 100644 index c3de6d254..000000000 --- a/mdk-stage1/dietlibc/include/sys/ppc-ioctl.h +++ /dev/null @@ -1,164 +0,0 @@ - -#define _IOC_NRBITS 8 -#define _IOC_TYPEBITS 8 -#define _IOC_SIZEBITS 13 -#define _IOC_DIRBITS 3 - -#define _IOC_NRMASK ((1 << _IOC_NRBITS)-1) -#define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1) -#define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1) -#define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1) - -#define _IOC_NRSHIFT 0 -#define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS) -#define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS) -#define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS) - -/* - * Direction bits _IOC_NONE could be 0, but OSF/1 gives it a bit. - * And this turns out useful to catch old ioctl numbers in header - * files for us. - */ -#define _IOC_NONE 1U -#define _IOC_READ 2U -#define _IOC_WRITE 4U - -#define _IOC(dir,type,nr,size) \ - (((dir) << _IOC_DIRSHIFT) | \ - ((type) << _IOC_TYPESHIFT) | \ - ((nr) << _IOC_NRSHIFT) | \ - ((size) << _IOC_SIZESHIFT)) - -/* used to create numbers */ -#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0) -#define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size)) -#define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size)) -#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size)) - -/* used to decode them.. */ -#define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) -#define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK) -#define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK) -#define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK) - -/* various drivers, such as the pcmcia stuff, need these... */ -#define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT) -#define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT) -#define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT) -#define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT) -#define IOCSIZE_SHIFT (_IOC_SIZESHIFT) - -#define FIOCLEX _IO('f', 1) -#define FIONCLEX _IO('f', 2) -#define FIOASYNC _IOW('f', 125, int) -#define FIONBIO _IOW('f', 126, int) -#define FIONREAD _IOR('f', 127, int) -#define TIOCINQ FIONREAD -#define FIOQSIZE _IOR('f', 128, loff_t) - -#define TIOCGETP _IOR('t', 8, struct sgttyb) -#define TIOCSETP _IOW('t', 9, struct sgttyb) -#define TIOCSETN _IOW('t', 10, struct sgttyb) /* TIOCSETP wo flush */ - -#define TIOCSETC _IOW('t', 17, struct tchars) -#define TIOCGETC _IOR('t', 18, struct tchars) -#define TCGETS _IOR('t', 19, struct termios) -#define TCSETS _IOW('t', 20, struct termios) -#define TCSETSW _IOW('t', 21, struct termios) -#define TCSETSF _IOW('t', 22, struct termios) - -#define TCGETA _IOR('t', 23, struct termio) -#define TCSETA _IOW('t', 24, struct termio) -#define TCSETAW _IOW('t', 25, struct termio) -#define TCSETAF _IOW('t', 28, struct termio) - -#define TCSBRK _IO('t', 29) -#define TCXONC _IO('t', 30) -#define TCFLSH _IO('t', 31) - -#define TIOCSWINSZ _IOW('t', 103, struct winsize) -#define TIOCGWINSZ _IOR('t', 104, struct winsize) -#define TIOCSTART _IO('t', 110) /* start output, like ^Q */ -#define TIOCSTOP _IO('t', 111) /* stop output, like ^S */ -#define TIOCOUTQ _IOR('t', 115, int) /* output queue size */ - -#define TIOCGLTC _IOR('t', 116, struct ltchars) -#define TIOCSLTC _IOW('t', 117, struct ltchars) -#define TIOCSPGRP _IOW('t', 118, int) -#define TIOCGPGRP _IOR('t', 119, int) - -#define TIOCEXCL 0x540C -#define TIOCNXCL 0x540D -#define TIOCSCTTY 0x540E - -#define TIOCSTI 0x5412 -#define TIOCMGET 0x5415 -#define TIOCMBIS 0x5416 -#define TIOCMBIC 0x5417 -#define TIOCMSET 0x5418 -# define TIOCM_LE 0x001 -# define TIOCM_DTR 0x002 -# define TIOCM_RTS 0x004 -# define TIOCM_ST 0x008 -# define TIOCM_SR 0x010 -# define TIOCM_CTS 0x020 -# define TIOCM_CAR 0x040 -# define TIOCM_RNG 0x080 -# define TIOCM_DSR 0x100 -# define TIOCM_CD TIOCM_CAR -# define TIOCM_RI TIOCM_RNG - -#define TIOCGSOFTCAR 0x5419 -#define TIOCSSOFTCAR 0x541A -#define TIOCLINUX 0x541C -#define TIOCCONS 0x541D -#define TIOCGSERIAL 0x541E -#define TIOCSSERIAL 0x541F -#define TIOCPKT 0x5420 -# define TIOCPKT_DATA 0 -# define TIOCPKT_FLUSHREAD 1 -# define TIOCPKT_FLUSHWRITE 2 -# define TIOCPKT_STOP 4 -# define TIOCPKT_START 8 -# define TIOCPKT_NOSTOP 16 -# define TIOCPKT_DOSTOP 32 - - -#define TIOCNOTTY 0x5422 -#define TIOCSETD 0x5423 -#define TIOCGETD 0x5424 -#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ -#define TIOCTTYGSTRUCT 0x5426 /* For debugging only */ -#define TIOCSBRK 0x5427 /* BSD compatibility */ -#define TIOCCBRK 0x5428 /* BSD compatibility */ -#define TIOCGSID 0x5429 /* Return the session ID of FD */ -#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ -#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ - -#define TIOCSERCONFIG 0x5453 -#define TIOCSERGWILD 0x5454 -#define TIOCSERSWILD 0x5455 -#define TIOCGLCKTRMIOS 0x5456 -#define TIOCSLCKTRMIOS 0x5457 -#define TIOCSERGSTRUCT 0x5458 /* For debugging only */ -#define TIOCSERGETLSR 0x5459 /* Get line status register */ - /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ -# define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ -#define TIOCSERGETMULTI 0x545A /* Get multiport config */ -#define TIOCSERSETMULTI 0x545B /* Set multiport config */ - -#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */ -#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ - -#if 0 /* These are defined this way on Alpha - maybe later. */ -/* Socket-level I/O control calls. */ - -#define FIOGETOWN _IOR('f', 123, int) -#define FIOSETOWN _IOW('f', 124, int) - -#define SIOCATMARK _IOR('s', 7, int) -#define SIOCSPGRP _IOW('s', 8, pid_t) -#define SIOCGPGRP _IOR('s', 9, pid_t) - -#define SIOCGSTAMP 0x8906 /* Get stamp - linux-specific */ -#endif diff --git a/mdk-stage1/dietlibc/include/sys/prctl.h b/mdk-stage1/dietlibc/include/sys/prctl.h deleted file mode 100644 index 26749cbd4..000000000 --- a/mdk-stage1/dietlibc/include/sys/prctl.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef _SYS_PRCTL_H -#define _SYS_PRCTL_H - -#include - -int prctl(int option, unsigned long arg2, unsigned long arg3 , unsigned long arg4, unsigned long arg5) __THROW; - -#endif diff --git a/mdk-stage1/dietlibc/include/sys/ptrace.h b/mdk-stage1/dietlibc/include/sys/ptrace.h deleted file mode 100644 index b09d3ac3a..000000000 --- a/mdk-stage1/dietlibc/include/sys/ptrace.h +++ /dev/null @@ -1,846 +0,0 @@ -#ifndef _SYS_PTRACE_H -#define _SYS_PTRACE_H - -#include - -#define PTRACE_TRACEME 0 -#define PTRACE_PEEKTEXT 1 -#define PTRACE_PEEKDATA 2 -#define PTRACE_PEEKUSR 3 -#define PTRACE_PEEKUSER PTRACE_PEEKUSR -#define PTRACE_POKETEXT 4 -#define PTRACE_POKEDATA 5 -#define PTRACE_POKEUSR 6 -#define PTRACE_POKEUSER PTRACE_POKEUSR -#define PTRACE_CONT 7 -#define PTRACE_KILL 8 -#define PTRACE_SINGLESTEP 9 - -#define PTRACE_ATTACH 0x10 -#define PTRACE_DETACH 0x11 - -#define PTRACE_SYSCALL 24 - -#define PT_TRACE_ME PTRACE_TRACEME -#define PT_READ_I PTRACE_PEEKTEXT -#define PT_READ_D PTRACE_PEEKDATA -#define PT_READ_U PTRACE_READ_U -#define PT_WRITE_I PTRACE_POKETEXT -#define PT_WRITE_D PTRACE_POKEDATA -#define PT_WRITE_U PTRACE_POKEUSER -#define PT_CONTINUE PTRACE_CONT -#define PT_KILL PTRACE_KILL -#define PT_STEP PTRACE_SINGLESTEP -#define PT_GETREGS PTRACE_GETREGS -#define PT_SETREGS PTRACE_SETREGS -#define PT_GETFPREGS PTRACE_GETFPREGS -#define PT_SETFPREGS PTRACE_SETFPREGS -#define PT_ATTACH PTRACE_ATTACH -#define PT_DETACH PTRACE_DETACH - -#if defined(__i386__) -#define EBX 0 -#define ECX 1 -#define EDX 2 -#define ESI 3 -#define EDI 4 -#define EBP 5 -#define EAX 6 -#define DS 7 -#define ES 8 -#define FS 9 -#define GS 10 -#define ORIG_EAX 11 -#define EIP 12 -#define CS 13 -#define EFL 14 -#define UESP 15 -#define SS 16 -#define FRAME_SIZE 17 - -/* this struct defines the way the registers are stored on the - stack during a system call. */ - -struct pt_regs { - long ebx; - long ecx; - long edx; - long esi; - long edi; - long ebp; - long eax; - int xds; - int xes; - long orig_eax; - long eip; - int xcs; - long eflags; - long esp; - int xss; -}; - -/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */ -#define PTRACE_GETREGS 12 -#define PTRACE_SETREGS 13 -#define PTRACE_GETFPREGS 14 -#define PTRACE_SETFPREGS 15 -#define PTRACE_GETFPXREGS 18 -#define PTRACE_SETFPXREGS 19 - -#define PTRACE_SETOPTIONS 21 - -/* options set using PTRACE_SETOPTIONS */ -#define PTRACE_O_TRACESYSGOOD 0x00000001 - -#elif defined(__s390__) - -#define PT_PSWMASK 0x00 -#define PT_PSWADDR 0x04 -#define PT_GPR0 0x08 -#define PT_GPR1 0x0C -#define PT_GPR2 0x10 -#define PT_GPR3 0x14 -#define PT_GPR4 0x18 -#define PT_GPR5 0x1C -#define PT_GPR6 0x20 -#define PT_GPR7 0x24 -#define PT_GPR8 0x28 -#define PT_GPR9 0x2C -#define PT_GPR10 0x30 -#define PT_GPR11 0x34 -#define PT_GPR12 0x38 -#define PT_GPR13 0x3C -#define PT_GPR14 0x40 -#define PT_GPR15 0x44 -#define PT_ACR0 0x48 -#define PT_ACR1 0x4C -#define PT_ACR2 0x50 -#define PT_ACR3 0x54 -#define PT_ACR4 0x58 -#define PT_ACR5 0x5C -#define PT_ACR6 0x60 -#define PT_ACR7 0x64 -#define PT_ACR8 0x68 -#define PT_ACR9 0x6C -#define PT_ACR10 0x70 -#define PT_ACR11 0x74 -#define PT_ACR12 0x78 -#define PT_ACR13 0x7C -#define PT_ACR14 0x80 -#define PT_ACR15 0x84 -#define PT_ORIGGPR2 0x88 -#define PT_FPC 0x90 -#define PT_FPR0_HI 0x98 -#define PT_FPR0_LO 0x9C -#define PT_FPR1_HI 0xA0 -#define PT_FPR1_LO 0xA4 -#define PT_FPR2_HI 0xA8 -#define PT_FPR2_LO 0xAC -#define PT_FPR3_HI 0xB0 -#define PT_FPR3_LO 0xB4 -#define PT_FPR4_HI 0xB8 -#define PT_FPR4_LO 0xBC -#define PT_FPR5_HI 0xC0 -#define PT_FPR5_LO 0xC4 -#define PT_FPR6_HI 0xC8 -#define PT_FPR6_LO 0xCC -#define PT_FPR7_HI 0xD0 -#define PT_FPR7_LO 0xD4 -#define PT_FPR8_HI 0xD8 -#define PT_FPR8_LO 0XDC -#define PT_FPR9_HI 0xE0 -#define PT_FPR9_LO 0xE4 -#define PT_FPR10_HI 0xE8 -#define PT_FPR10_LO 0xEC -#define PT_FPR11_HI 0xF0 -#define PT_FPR11_LO 0xF4 -#define PT_FPR12_HI 0xF8 -#define PT_FPR12_LO 0xFC -#define PT_FPR13_HI 0x100 -#define PT_FPR13_LO 0x104 -#define PT_FPR14_HI 0x108 -#define PT_FPR14_LO 0x10C -#define PT_FPR15_HI 0x110 -#define PT_FPR15_LO 0x114 -#define PT_CR_9 0x118 -#define PT_CR_10 0x11C -#define PT_CR_11 0x120 -#define PT_IEEE_IP 0x13C -#define PT_LASTOFF PT_IEEE_IP -#define PT_ENDREGS 0x140-1 - -#define NUM_GPRS 16 -#define NUM_FPRS 16 -#define NUM_CRS 16 -#define NUM_ACRS 16 -#define GPR_SIZE 4 -#define FPR_SIZE 8 -#define FPC_SIZE 4 -#define FPC_PAD_SIZE 4 /* gcc insists on aligning the fpregs */ -#define CR_SIZE 4 -#define ACR_SIZE 4 - -#define STACK_FRAME_OVERHEAD 96 /* size of minimum stack frame */ - -#include - -/* this typedef defines how a Program Status Word looks like */ -typedef struct { - uint32_t mask; - uint32_t addr; -} psw_t __attribute__ ((aligned(8))); - -typedef union -{ - float f; - double d; - uint64_t ui; - struct - { - uint32_t hi; - uint32_t lo; - } fp; -} freg_t; - -typedef struct -{ - uint32_t fpc; - freg_t fprs[NUM_FPRS]; -} s390_fp_regs; - -#define FPC_EXCEPTION_MASK 0xF8000000 -#define FPC_FLAGS_MASK 0x00F80000 -#define FPC_DXC_MASK 0x0000FF00 -#define FPC_RM_MASK 0x00000003 -#define FPC_VALID_MASK 0xF8F8FF03 - -typedef struct -{ - psw_t psw; - uint32_t gprs[NUM_GPRS]; - uint32_t acrs[NUM_ACRS]; - uint32_t orig_gpr2; -} s390_regs; - -struct pt_regs -{ - psw_t psw; - uint32_t gprs[NUM_GPRS]; - uint32_t acrs[NUM_ACRS]; - uint32_t orig_gpr2; - uint32_t trap; - uint32_t old_ilc; -}; - -typedef struct -{ - uint32_t cr[3]; -} per_cr_words __attribute__((packed)); - -#define PER_EM_MASK 0xE8000000 - -typedef uint32_t addr_t; - -typedef struct -{ - unsigned em_branching : 1; - unsigned em_instruction_fetch : 1; - /* - * Switching on storage alteration automatically fixes - * the storage alteration event bit in the users std. - */ - unsigned em_storage_alteration : 1; - unsigned em_gpr_alt_unused : 1; - unsigned em_store_real_address : 1; - unsigned : 3; - unsigned branch_addr_ctl : 1; - unsigned : 1; - unsigned storage_alt_space_ctl : 1; - unsigned : 21; - addr_t starting_addr; - addr_t ending_addr; -} per_cr_bits __attribute__((packed)); - -typedef struct -{ - uint16_t perc_atmid; /* 0x096 */ - uint32_t address; /* 0x098 */ - uint8_t access_id; /* 0x0a1 */ -} per_lowcore_words __attribute__((packed)); - -typedef struct -{ - unsigned perc_branching : 1; /* 0x096 */ - unsigned perc_instruction_fetch : 1; - unsigned perc_storage_alteration : 1; - unsigned perc_gpr_alt_unused : 1; - unsigned perc_store_real_address : 1; - unsigned : 4; - unsigned atmid_validity_bit : 1; - unsigned atmid_psw_bit_32 : 1; - unsigned atmid_psw_bit_5 : 1; - unsigned atmid_psw_bit_16 : 1; - unsigned atmid_psw_bit_17 : 1; - unsigned si : 2; - addr_t address; /* 0x098 */ - unsigned : 4; /* 0x0a1 */ - unsigned access_id : 4; -} per_lowcore_bits __attribute__((packed)); - -typedef struct -{ - union { - per_cr_words words; - per_cr_bits bits; - } control_regs __attribute__((packed)); - /* - * Use these flags instead of setting em_instruction_fetch - * directly they are used so that single stepping can be - * switched on & off while not affecting other tracing - */ - unsigned single_step : 1; - unsigned instruction_fetch : 1; - unsigned : 30; - /* - * These addresses are copied into cr10 & cr11 if single - * stepping is switched off - */ - uint32_t starting_addr; - uint32_t ending_addr; - union { - per_lowcore_words words; - per_lowcore_bits bits; - } lowcore; -} per_struct __attribute__((packed)); - -typedef struct -{ - uint32_t len; - addr_t kernel_addr; - addr_t process_addr; -} ptrace_area; - -/* - * S/390 specific non posix ptrace requests. I chose unusual values so - * they are unlikely to clash with future ptrace definitions. - */ -#define PTRACE_PEEKUSR_AREA 0x5000 -#define PTRACE_POKEUSR_AREA 0x5001 -#define PTRACE_PEEKTEXT_AREA 0x5002 -#define PTRACE_PEEKDATA_AREA 0x5003 -#define PTRACE_POKETEXT_AREA 0x5004 -#define PTRACE_POKEDATA_AREA 0x5005 -/* - * PT_PROT definition is loosely based on hppa bsd definition in - * gdb/hppab-nat.c - */ -#define PTRACE_PROT 21 - -typedef enum -{ - ptprot_set_access_watchpoint, - ptprot_set_write_watchpoint, - ptprot_disable_watchpoint -} ptprot_flags; - -typedef struct -{ - addr_t lowaddr; - addr_t hiaddr; - ptprot_flags prot; -} ptprot_area; - -/* Sequence of bytes for breakpoint illegal instruction. */ -#define S390_BREAKPOINT {0x0,0x1} -#define S390_BREAKPOINT_U16 ((uint16_t)0x0001) -#define S390_SYSCALL_OPCODE ((uint16_t)0x0a00) -#define S390_SYSCALL_SIZE 2 - -/* - * The user_regs_struct defines the way the user registers are - * store on the stack for signal handling. - */ -struct user_regs_struct -{ - psw_t psw; - uint32_t gprs[NUM_GPRS]; - uint32_t acrs[NUM_ACRS]; - uint32_t orig_gpr2; - s390_fp_regs fp_regs; - /* - * These per registers are in here so that gdb can modify them - * itself as there is no "official" ptrace interface for hardware - * watchpoints. This is the way intel does it. - */ - per_struct per_info; - addr_t ieee_instruction_pointer; - /* Used to give failing instruction back to user for ieee exceptions */ -}; - -#elif defined(__arm__) - -/* this assumes armv */ -#define USR26_MODE 0x00 -#define FIQ26_MODE 0x01 -#define IRQ26_MODE 0x02 -#define SVC26_MODE 0x03 -#define USR_MODE 0x10 -#define FIQ_MODE 0x11 -#define IRQ_MODE 0x12 -#define SVC_MODE 0x13 -#define ABT_MODE 0x17 -#define UND_MODE 0x1b -#define SYSTEM_MODE 0x1f -#define MODE_MASK 0x1f -#define T_BIT 0x20 -#define F_BIT 0x40 -#define I_BIT 0x80 -#define CC_V_BIT (1 << 28) -#define CC_C_BIT (1 << 29) -#define CC_Z_BIT (1 << 30) -#define CC_N_BIT (1 << 31) -#define PCMASK 0 - -struct pt_regs { - long uregs[18]; -}; - -#define ARM_cpsr uregs[16] -#define ARM_pc uregs[15] -#define ARM_lr uregs[14] -#define ARM_sp uregs[13] -#define ARM_ip uregs[12] -#define ARM_fp uregs[11] -#define ARM_r10 uregs[10] -#define ARM_r9 uregs[9] -#define ARM_r8 uregs[8] -#define ARM_r7 uregs[7] -#define ARM_r6 uregs[6] -#define ARM_r5 uregs[5] -#define ARM_r4 uregs[4] -#define ARM_r3 uregs[3] -#define ARM_r2 uregs[2] -#define ARM_r1 uregs[1] -#define ARM_r0 uregs[0] -#define ARM_ORIG_r0 uregs[17] - -#elif defined(__alpha__) - -struct pt_regs { - unsigned long r0; - unsigned long r1; - unsigned long r2; - unsigned long r3; - unsigned long r4; - unsigned long r5; - unsigned long r6; - unsigned long r7; - unsigned long r8; - unsigned long r19; - unsigned long r20; - unsigned long r21; - unsigned long r22; - unsigned long r23; - unsigned long r24; - unsigned long r25; - unsigned long r26; - unsigned long r27; - unsigned long r28; - unsigned long hae; -/* JRP - These are the values provided to a0-a2 by PALcode */ - unsigned long trap_a0; - unsigned long trap_a1; - unsigned long trap_a2; -/* These are saved by PAL-code: */ - unsigned long ps; - unsigned long pc; - unsigned long gp; - unsigned long r16; - unsigned long r17; - unsigned long r18; -}; - -struct switch_stack { - unsigned long r9; - unsigned long r10; - unsigned long r11; - unsigned long r12; - unsigned long r13; - unsigned long r14; - unsigned long r15; - unsigned long r26; - unsigned long fp[32]; /* fp[31] is fpcr */ -}; - -#elif defined(__mips__) - -/* 0 - 31 are integer registers, 32 - 63 are fp registers. */ -#define FPR_BASE 32 -#define PC 64 -#define CAUSE 65 -#define BADVADDR 66 -#define MMHI 67 -#define MMLO 68 -#define FPC_CSR 69 -#define FPC_EIR 70 - -struct pt_regs { - /* Pad bytes for argument save space on the stack. */ - unsigned long pad0[6]; - /* Saved main processor registers. */ - unsigned long regs[32]; - /* Other saved registers. */ - unsigned long lo; - unsigned long hi; - /* saved cp0 registers */ - unsigned long cp0_epc; - unsigned long cp0_badvaddr; - unsigned long cp0_status; - unsigned long cp0_cause; -}; - -#elif defined(__sparc__) - -struct pt_regs { - unsigned long psr; - unsigned long pc; - unsigned long npc; - unsigned long y; - unsigned long u_regs[16]; /* globals and ins */ -}; - -#define UREG_G0 0 -#define UREG_G1 1 -#define UREG_G2 2 -#define UREG_G3 3 -#define UREG_G4 4 -#define UREG_G5 5 -#define UREG_G6 6 -#define UREG_G7 7 -#define UREG_I0 8 -#define UREG_I1 9 -#define UREG_I2 10 -#define UREG_I3 11 -#define UREG_I4 12 -#define UREG_I5 13 -#define UREG_I6 14 -#define UREG_I7 15 -#define UREG_WIM UREG_G0 -#define UREG_FADDR UREG_G0 -#define UREG_FP UREG_I6 -#define UREG_RETPC UREG_I7 - -/* A register window */ -struct reg_window { - unsigned long locals[8]; - unsigned long ins[8]; -}; - -/* A Sparc stack frame */ -struct sparc_stackf { - unsigned long locals[8]; - unsigned long ins[6]; - struct sparc_stackf *fp; - unsigned long callers_pc; - char *structptr; - unsigned long xargs[6]; - unsigned long xxargs[1]; -}; - -#define TRACEREG_SZ sizeof(struct pt_regs) -#define STACKFRAME_SZ sizeof(struct sparc_stackf) -#define REGWIN_SZ sizeof(struct reg_window) - -/* These are for pt_regs. */ -#define PT_PSR 0x0 -#define PT_PC 0x4 -#define PT_NPC 0x8 -#define PT_Y 0xc -#define PT_G0 0x10 -#define PT_WIM PT_G0 -#define PT_G1 0x14 -#define PT_G2 0x18 -#define PT_G3 0x1c -#define PT_G4 0x20 -#define PT_G5 0x24 -#define PT_G6 0x28 -#define PT_G7 0x2c -#define PT_I0 0x30 -#define PT_I1 0x34 -#define PT_I2 0x38 -#define PT_I3 0x3c -#define PT_I4 0x40 -#define PT_I5 0x44 -#define PT_I6 0x48 -#define PT_FP PT_I6 -#define PT_I7 0x4c - -/* Reg_window offsets */ -#define RW_L0 0x00 -#define RW_L1 0x04 -#define RW_L2 0x08 -#define RW_L3 0x0c -#define RW_L4 0x10 -#define RW_L5 0x14 -#define RW_L6 0x18 -#define RW_L7 0x1c -#define RW_I0 0x20 -#define RW_I1 0x24 -#define RW_I2 0x28 -#define RW_I3 0x2c -#define RW_I4 0x30 -#define RW_I5 0x34 -#define RW_I6 0x38 -#define RW_I7 0x3c - -/* Stack_frame offsets */ -#define SF_L0 0x00 -#define SF_L1 0x04 -#define SF_L2 0x08 -#define SF_L3 0x0c -#define SF_L4 0x10 -#define SF_L5 0x14 -#define SF_L6 0x18 -#define SF_L7 0x1c -#define SF_I0 0x20 -#define SF_I1 0x24 -#define SF_I2 0x28 -#define SF_I3 0x2c -#define SF_I4 0x30 -#define SF_I5 0x34 -#define SF_FP 0x38 -#define SF_PC 0x3c -#define SF_RETP 0x40 -#define SF_XARG0 0x44 -#define SF_XARG1 0x48 -#define SF_XARG2 0x4c -#define SF_XARG3 0x50 -#define SF_XARG4 0x54 -#define SF_XARG5 0x58 -#define SF_XXARG 0x5c - -/* Stuff for the ptrace system call */ -#define PTRACE_SUNATTACH 10 -#define PTRACE_SUNDETACH 11 -#define PTRACE_GETREGS 12 -#define PTRACE_SETREGS 13 -#define PTRACE_GETFPREGS 14 -#define PTRACE_SETFPREGS 15 -#define PTRACE_READDATA 16 -#define PTRACE_WRITEDATA 17 -#define PTRACE_READTEXT 18 -#define PTRACE_WRITETEXT 19 -#define PTRACE_GETFPAREGS 20 -#define PTRACE_SETFPAREGS 21 - -#define PTRACE_GETUCODE 29 /* stupid bsd-ism */ - -#elif defined(__powerpc__) - -struct pt_regs { - unsigned long gpr[32]; - unsigned long nip; - unsigned long msr; - unsigned long orig_gpr3; /* Used for restarting system calls */ - unsigned long ctr; - unsigned long link; - unsigned long xer; - unsigned long ccr; - unsigned long mq; /* 601 only (not used at present) */ - /* Used on APUS to hold IPL value. */ - unsigned long trap; /* Reason for being here */ - unsigned long dar; /* Fault registers */ - unsigned long dsisr; - unsigned long result; /* Result of a system call */ -}; - -/* - * Offsets used by 'ptrace' system call interface. - * These can't be changed without breaking binary compatibility - * with MkLinux, etc. - */ -#define PT_R0 0 -#define PT_R1 1 -#define PT_R2 2 -#define PT_R3 3 -#define PT_R4 4 -#define PT_R5 5 -#define PT_R6 6 -#define PT_R7 7 -#define PT_R8 8 -#define PT_R9 9 -#define PT_R10 10 -#define PT_R11 11 -#define PT_R12 12 -#define PT_R13 13 -#define PT_R14 14 -#define PT_R15 15 -#define PT_R16 16 -#define PT_R17 17 -#define PT_R18 18 -#define PT_R19 19 -#define PT_R20 20 -#define PT_R21 21 -#define PT_R22 22 -#define PT_R23 23 -#define PT_R24 24 -#define PT_R25 25 -#define PT_R26 26 -#define PT_R27 27 -#define PT_R28 28 -#define PT_R29 29 -#define PT_R30 30 -#define PT_R31 31 - -#define PT_NIP 32 -#define PT_MSR 33 -#define PT_CTR 35 -#define PT_LNK 36 -#define PT_XER 37 -#define PT_CCR 38 -#define PT_MQ 39 - -#define PT_FPR0 48 /* each FP reg occupies 2 slots in this space */ -#define PT_FPR31 (PT_FPR0 + 2*31) -#define PT_FPSCR (PT_FPR0 + 2*32 + 1) - -#elif defined(__hppa__) - -#include - -struct pt_regs { - unsigned long gr[32]; /* PSW is in gr[0] */ - uint64_t fr[32]; - unsigned long sr[ 8]; - unsigned long iasq[2]; - unsigned long iaoq[2]; - unsigned long cr27; - unsigned long pad0; /* available for other uses */ - unsigned long orig_r28; - unsigned long ksp; - unsigned long kpc; - unsigned long sar; /* CR11 */ - unsigned long iir; /* CR19 */ - unsigned long isr; /* CR20 */ - unsigned long ior; /* CR21 */ - unsigned long ipsw; /* CR22 */ -}; - -#define PTRACE_SINGLEBLOCK 12 /* resume execution until next branch */ -#define PTRACE_GETSIGINFO 13 /* get child's siginfo structure */ -#define PTRACE_SETSIGINFO 14 /* set child's siginfo structure */ - -#elif defined(__ia64__) - -struct ia64_fpreg { - union { - unsigned long bits[2]; - } u; -} __attribute__ ((aligned (16))); - -struct pt_regs { - unsigned long cr_ipsr; /* interrupted task's psr */ - unsigned long cr_iip; /* interrupted task's instruction pointer */ - unsigned long cr_ifs; /* interrupted task's function state */ - unsigned long ar_unat; /* interrupted task's NaT register (preserved) */ - unsigned long ar_pfs; /* prev function state */ - unsigned long ar_rsc; /* RSE configuration */ - unsigned long ar_rnat; /* RSE NaT */ - unsigned long ar_bspstore; /* RSE bspstore */ - unsigned long pr; /* 64 predicate registers (1 bit each) */ - unsigned long b6; /* scratch */ - unsigned long loadrs; /* size of dirty partition << 16 */ - unsigned long r1; /* the gp pointer */ - unsigned long r2; /* scratch */ - unsigned long r3; /* scratch */ - unsigned long r12; /* interrupted task's memory stack pointer */ - unsigned long r13; /* thread pointer */ - unsigned long r14; /* scratch */ - unsigned long r15; /* scratch */ - unsigned long r8; /* scratch (return value register 0) */ - unsigned long r9; /* scratch (return value register 1) */ - unsigned long r10; /* scratch (return value register 2) */ - unsigned long r11; /* scratch (return value register 3) */ - unsigned long r16; /* scratch */ - unsigned long r17; /* scratch */ - unsigned long r18; /* scratch */ - unsigned long r19; /* scratch */ - unsigned long r20; /* scratch */ - unsigned long r21; /* scratch */ - unsigned long r22; /* scratch */ - unsigned long r23; /* scratch */ - unsigned long r24; /* scratch */ - unsigned long r25; /* scratch */ - unsigned long r26; /* scratch */ - unsigned long r27; /* scratch */ - unsigned long r28; /* scratch */ - unsigned long r29; /* scratch */ - unsigned long r30; /* scratch */ - unsigned long r31; /* scratch */ - unsigned long ar_ccv; /* compare/exchange value (scratch) */ - unsigned long ar_fpsr; /* floating point status (preserved) */ - unsigned long b0; /* return pointer (bp) */ - unsigned long b7; /* scratch */ - struct ia64_fpreg f6; /* scratch */ - struct ia64_fpreg f7; /* scratch */ - struct ia64_fpreg f8; /* scratch */ - struct ia64_fpreg f9; /* scratch */ -}; - -struct switch_stack { - unsigned long caller_unat; /* user NaT collection register (preserved) */ - unsigned long ar_fpsr; /* floating-point status register */ - - struct ia64_fpreg f2; /* preserved */ - struct ia64_fpreg f3; /* preserved */ - struct ia64_fpreg f4; /* preserved */ - struct ia64_fpreg f5; /* preserved */ - - struct ia64_fpreg f10; /* scratch, but untouched by kernel */ - struct ia64_fpreg f11; /* scratch, but untouched by kernel */ - struct ia64_fpreg f12; /* scratch, but untouched by kernel */ - struct ia64_fpreg f13; /* scratch, but untouched by kernel */ - struct ia64_fpreg f14; /* scratch, but untouched by kernel */ - struct ia64_fpreg f15; /* scratch, but untouched by kernel */ - struct ia64_fpreg f16; /* preserved */ - struct ia64_fpreg f17; /* preserved */ - struct ia64_fpreg f18; /* preserved */ - struct ia64_fpreg f19; /* preserved */ - struct ia64_fpreg f20; /* preserved */ - struct ia64_fpreg f21; /* preserved */ - struct ia64_fpreg f22; /* preserved */ - struct ia64_fpreg f23; /* preserved */ - struct ia64_fpreg f24; /* preserved */ - struct ia64_fpreg f25; /* preserved */ - struct ia64_fpreg f26; /* preserved */ - struct ia64_fpreg f27; /* preserved */ - struct ia64_fpreg f28; /* preserved */ - struct ia64_fpreg f29; /* preserved */ - struct ia64_fpreg f30; /* preserved */ - struct ia64_fpreg f31; /* preserved */ - - unsigned long r4; /* preserved */ - unsigned long r5; /* preserved */ - unsigned long r6; /* preserved */ - unsigned long r7; /* preserved */ - - unsigned long b0; /* so we can force a direct return in copy_thread */ - unsigned long b1; - unsigned long b2; - unsigned long b3; - unsigned long b4; - unsigned long b5; - - unsigned long ar_pfs; /* previous function state */ - unsigned long ar_lc; /* loop counter (preserved) */ - unsigned long ar_unat; /* NaT bits for r4-r7 */ - unsigned long ar_rnat; /* RSE NaT collection register */ - unsigned long ar_bspstore; /* RSE dirty base (preserved) */ - unsigned long pr; /* 64 predicate registers (1 bit each) */ -}; - -#endif - -extern long int ptrace(int request, ...) __THROW; - -#endif diff --git a/mdk-stage1/dietlibc/include/sys/reboot.h b/mdk-stage1/dietlibc/include/sys/reboot.h deleted file mode 100644 index b17a556e5..000000000 --- a/mdk-stage1/dietlibc/include/sys/reboot.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef _SYS_REBOOT_H -#define _SYS_REBOOT_H - -#define LINUX_REBOOT_MAGIC1 0xfee1dead -#define LINUX_REBOOT_MAGIC2 672274793 -#define LINUX_REBOOT_MAGIC2A 85072278 -#define LINUX_REBOOT_MAGIC2B 369367448 - -#define LINUX_REBOOT_CMD_RESTART 0x01234567 -#define LINUX_REBOOT_CMD_HALT 0xCDEF0123 -#define LINUX_REBOOT_CMD_CAD_ON 0x89ABCDEF -#define LINUX_REBOOT_CMD_CAD_OFF 0x00000000 -#define LINUX_REBOOT_CMD_POWER_OFF 0x4321FEDC -#define LINUX_REBOOT_CMD_RESTART2 0xA1B2C3D4 - -/* Reboot or halt the system. */ -int reboot (int flag); - -/* the glibc people changed their macro names :-/ */ -#define RB_AUTOBOOT 0x01234567 -#define RB_HALT_SYSTEM 0xcdef0123 -#define RB_ENABLE_CAD 0x89abcdef -#define RB_DISABLE_CAD 0 -#define RB_POWER_OFF 0x4321fedc - -#endif /* _SYS_REBOOT_H */ diff --git a/mdk-stage1/dietlibc/include/sys/resource.h b/mdk-stage1/dietlibc/include/sys/resource.h deleted file mode 100644 index df31b82ab..000000000 --- a/mdk-stage1/dietlibc/include/sys/resource.h +++ /dev/null @@ -1,67 +0,0 @@ -#ifndef _SYS_RESOURCE_H -#define _SYS_RESOURCE_H - -#include -#include - -#define RUSAGE_SELF 0 -#define RUSAGE_CHILDREN (-1) -#define RUSAGE_BOTH (-2) /* sys_wait4() uses this */ - -struct rusage { - struct timeval ru_utime; /* user time used */ - struct timeval ru_stime; /* system time used */ - long ru_maxrss; /* maximum resident set size */ - long ru_ixrss; /* integral shared memory size */ - long ru_idrss; /* integral unshared data size */ - long ru_isrss; /* integral unshared stack size */ - long ru_minflt; /* page reclaims */ - long ru_majflt; /* page faults */ - long ru_nswap; /* swaps */ - long ru_inblock; /* block input operations */ - long ru_oublock; /* block output operations */ - long ru_msgsnd; /* messages sent */ - long ru_msgrcv; /* messages received */ - long ru_nsignals; /* signals received */ - long ru_nvcsw; /* voluntary context switches */ - long ru_nivcsw; /* involuntary " */ -}; - -struct rlimit { - unsigned long rlim_cur; - unsigned long rlim_max; -}; - -#define PRIO_MIN (-20) -#define PRIO_MAX 20 - -#define PRIO_PROCESS 0 -#define PRIO_PGRP 1 -#define PRIO_USER 2 - -#define RLIMIT_CPU 0 /* CPU time in ms */ -#define RLIMIT_FSIZE 1 /* Maximum filesize */ -#define RLIMIT_DATA 2 /* max data size */ -#define RLIMIT_STACK 3 /* max stack size */ -#define RLIMIT_CORE 4 /* max core file size */ -#define RLIMIT_RSS 5 /* max resident set size */ -#define RLIMIT_NPROC 6 /* max number of processes */ -#define RLIMIT_NOFILE 7 /* max number of open files */ -#define RLIMIT_MEMLOCK 8 /* max locked-in-memory address space */ -#define RLIMIT_AS 9 /* address space limit */ -#define RLIMIT_LOCKS 10 /* maximum file locks held */ - -#define RLIM_NLIMITS 11 - -#define RLIM_INFINITY ((long)(~0UL>>1)) - -int getpriority(int which, int who) __THROW; -int setpriority(int which, int who, int prio) __THROW; - -int getrlimit (int resource, struct rlimit *rlim); -int getrusage (int who, struct rusage *usage); -int setrlimit (int resource, const struct rlimit *rlim); - -typedef unsigned long rlim_t; - -#endif diff --git a/mdk-stage1/dietlibc/include/sys/s390-ioctl.h b/mdk-stage1/dietlibc/include/sys/s390-ioctl.h deleted file mode 100644 index 4682a0fda..000000000 --- a/mdk-stage1/dietlibc/include/sys/s390-ioctl.h +++ /dev/null @@ -1,141 +0,0 @@ - -/* ioctl command encoding: 32 bits total, command in lower 16 bits, - * size of the parameter structure in the lower 14 bits of the - * upper 16 bits. - * Encoding the size of the parameter structure in the ioctl request - * is useful for catching programs compiled with old versions - * and to avoid overwriting user space outside the user buffer area. - * The highest 2 bits are reserved for indicating the ``access mode''. - * NOTE: This limits the max parameter size to 16kB -1 ! - */ - -/* - * The following is for compatibility across the various Linux - * platforms. The i386 ioctl numbering scheme doesn't really enforce - * a type field. De facto, however, the top 8 bits of the lower 16 - * bits are indeed used as a type field, so we might just as well make - * this explicit here. Please be sure to use the decoding macros - * below from now on. - */ -#define _IOC_NRBITS 8 -#define _IOC_TYPEBITS 8 -#define _IOC_SIZEBITS 14 -#define _IOC_DIRBITS 2 - -#define _IOC_NRMASK ((1 << _IOC_NRBITS)-1) -#define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1) -#define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1) -#define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1) - -#define _IOC_NRSHIFT 0 -#define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS) -#define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS) -#define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS) - -/* - * Direction bits. - */ -#define _IOC_NONE 0U -#define _IOC_WRITE 1U -#define _IOC_READ 2U - -#define _IOC(dir,type,nr,size) \ - (((dir) << _IOC_DIRSHIFT) | \ - ((type) << _IOC_TYPESHIFT) | \ - ((nr) << _IOC_NRSHIFT) | \ - ((size) << _IOC_SIZESHIFT)) - -/* used to create numbers */ -#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0) -#define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size)) -#define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size)) -#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size)) - -/* used to decode ioctl numbers.. */ -#define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) -#define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK) -#define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK) -#define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK) - -/* ...and for the drivers/sound files... */ - -#define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT) -#define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT) -#define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT) -#define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT) -#define IOCSIZE_SHIFT (_IOC_SIZESHIFT) - -/* 0x54 is just a magic number to make these relatively unique ('T') */ - -#define TCGETS 0x5401 -#define TCSETS 0x5402 -#define TCSETSW 0x5403 -#define TCSETSF 0x5404 -#define TCGETA 0x5405 -#define TCSETA 0x5406 -#define TCSETAW 0x5407 -#define TCSETAF 0x5408 -#define TCSBRK 0x5409 -#define TCXONC 0x540A -#define TCFLSH 0x540B -#define TIOCEXCL 0x540C -#define TIOCNXCL 0x540D -#define TIOCSCTTY 0x540E -#define TIOCGPGRP 0x540F -#define TIOCSPGRP 0x5410 -#define TIOCOUTQ 0x5411 -#define TIOCSTI 0x5412 -#define TIOCGWINSZ 0x5413 -#define TIOCSWINSZ 0x5414 -#define TIOCMGET 0x5415 -#define TIOCMBIS 0x5416 -#define TIOCMBIC 0x5417 -#define TIOCMSET 0x5418 -#define TIOCGSOFTCAR 0x5419 -#define TIOCSSOFTCAR 0x541A -#define FIONREAD 0x541B -#define TIOCINQ FIONREAD -#define TIOCLINUX 0x541C -#define TIOCCONS 0x541D -#define TIOCGSERIAL 0x541E -#define TIOCSSERIAL 0x541F -#define TIOCPKT 0x5420 -#define FIONBIO 0x5421 -#define TIOCNOTTY 0x5422 -#define TIOCSETD 0x5423 -#define TIOCGETD 0x5424 -#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ -#define TIOCTTYGSTRUCT 0x5426 /* For debugging only */ -#define TIOCSBRK 0x5427 /* BSD compatibility */ -#define TIOCCBRK 0x5428 /* BSD compatibility */ -#define TIOCGSID 0x5429 /* Return the session ID of FD */ -#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ -#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ - -#define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ -#define FIOCLEX 0x5451 -#define FIOASYNC 0x5452 -#define TIOCSERCONFIG 0x5453 -#define TIOCSERGWILD 0x5454 -#define TIOCSERSWILD 0x5455 -#define TIOCGLCKTRMIOS 0x5456 -#define TIOCSLCKTRMIOS 0x5457 -#define TIOCSERGSTRUCT 0x5458 /* For debugging only */ -#define TIOCSERGETLSR 0x5459 /* Get line status register */ -#define TIOCSERGETMULTI 0x545A /* Get multiport config */ -#define TIOCSERSETMULTI 0x545B /* Set multiport config */ - -#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */ -#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ -#define FIOQSIZE 0x545E - -/* Used for packet mode */ -#define TIOCPKT_DATA 0 -#define TIOCPKT_FLUSHREAD 1 -#define TIOCPKT_FLUSHWRITE 2 -#define TIOCPKT_STOP 4 -#define TIOCPKT_START 8 -#define TIOCPKT_NOSTOP 16 -#define TIOCPKT_DOSTOP 32 - -#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ diff --git a/mdk-stage1/dietlibc/include/sys/select.h b/mdk-stage1/dietlibc/include/sys/select.h deleted file mode 100644 index ce67b8bee..000000000 --- a/mdk-stage1/dietlibc/include/sys/select.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef _SYS_SELECT_H -#define _SYS_SELECT_H - -typedef long int fd_mask; - -#define NFDBITS (8 * sizeof(unsigned long)) -#define FD_SETSIZE 1024 -#define __FDSET_LONGS (FD_SETSIZE/NFDBITS) -#define __FDELT(d) ((d) / NFDBITS) -#define __FDMASK(d) (1UL << ((d) % NFDBITS)) - -typedef struct { - unsigned long fds_bits [__FDSET_LONGS]; -} fd_set; - -#define FD_SET(d, set) ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d)) -#define FD_CLR(d, set) ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d)) -#define FD_ISSET(d, set) (((set)->fds_bits[__FDELT(d)] & __FDMASK(d)) != 0) -#define FD_ZERO(set) \ - ((void) memset ((void*) (set), 0, sizeof (fd_set))) - -#endif diff --git a/mdk-stage1/dietlibc/include/sys/sem.h b/mdk-stage1/dietlibc/include/sys/sem.h deleted file mode 100644 index ad16b5f53..000000000 --- a/mdk-stage1/dietlibc/include/sys/sem.h +++ /dev/null @@ -1,81 +0,0 @@ -#ifndef _SYS_SEM_H -#define _SYS_SEM_H - -#include - -/* semop flags */ -#define SEM_UNDO 0x1000 /* undo the operation on exit */ - -/* semctl Command Definitions. */ -#define GETPID 11 /* get sempid */ -#define GETVAL 12 /* get semval */ -#define GETALL 13 /* get all semval's */ -#define GETNCNT 14 /* get semncnt */ -#define GETZCNT 15 /* get semzcnt */ -#define SETVAL 16 /* set semval */ -#define SETALL 17 /* set all semval's */ - -/* ipcs ctl cmds */ -#define SEM_STAT 18 -#define SEM_INFO 19 - -struct semid_ds { - struct ipc_perm sem_perm; /* permissions .. see ipc.h */ - time_t sem_otime; /* last semop time */ - time_t sem_ctime; /* last change time */ - struct sem *sem_base; /* ptr to first semaphore in array */ - struct sem_queue *sem_pending; /* pending operations to be processed */ - struct sem_queue **sem_pending_last; /* last pending operation */ - struct sem_undo *undo; /* undo requests on this array */ - unsigned short sem_nsems; /* no. of semaphores in array */ -}; - -/* semop system calls takes an array of these. */ -struct sembuf { - unsigned short sem_num; /* semaphore index in array */ - short sem_op; /* semaphore operation */ - short sem_flg; /* operation flags */ -}; - -/* please complain to the glibc goons for the following misbehaviour */ -#if 0 -/* arg for semctl system calls. */ -union semun { - int val; /* value for SETVAL */ - struct semid_ds *buf; /* buffer for IPC_STAT & IPC_SET */ - unsigned short *array; /* array for GETALL & SETALL */ - struct seminfo *__buf; /* buffer for IPC_INFO */ - void *__pad; -}; -#endif -#define _SEM_SEMUN_UNDEFINED - -struct seminfo { - int semmap; - int semmni; - int semmns; - int semmnu; - int semmsl; - int semopm; - int semume; - int semusz; - int semvmx; - int semaem; -}; - -#define SEMMNI 128 /* <= IPCMNI max # of semaphore identifiers */ -#define SEMMSL 250 /* <= 8 000 max num of semaphores per id */ -#define SEMMNS (SEMMNI*SEMMSL) /* <= INT_MAX max # of semaphores in system */ -#define SEMOPM 32 /* <= 1 000 max num of ops per semop call */ -#define SEMVMX 32767 /* <= 32767 semaphore maximum value */ - -extern int semget( key_t key, int nsems, int semflg) __THROW; - -/* The prototype really is: - * extern int semctl(int semid, int semnum, int cmd, union semun arg) __THROW; - * glibc bug compatibility forces us to write it like this: */ -extern int semctl(int semid, int semnum, int cmd, ...) __THROW; - -extern int semop(int semid, struct sembuf *sops, unsigned nsops) __THROW; - -#endif diff --git a/mdk-stage1/dietlibc/include/sys/sendfile.h b/mdk-stage1/dietlibc/include/sys/sendfile.h deleted file mode 100644 index ce6630676..000000000 --- a/mdk-stage1/dietlibc/include/sys/sendfile.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef _SYS_SENDFILE_H -#define _SYS_SENDFILE_H - -#include -#include - -extern ssize_t sendfile (int out_fd, int in_fd, off_t* offset, - size_t count) __THROW; - -extern ssize_t sendfile64 (int out_fd, int in_fd, loff_t* offset, - size_t count) __THROW; - -#endif /* sys/sendfile.h */ diff --git a/mdk-stage1/dietlibc/include/sys/shm.h b/mdk-stage1/dietlibc/include/sys/shm.h deleted file mode 100644 index 879a8786e..000000000 --- a/mdk-stage1/dietlibc/include/sys/shm.h +++ /dev/null @@ -1,75 +0,0 @@ -#ifndef _SYS_SHM_H -#define _SYS_SHM_H - -#include - -#define SHMMAX 0x2000000 /* max shared seg size (bytes) */ -#define SHMMIN 1 /* min shared seg size (bytes) */ -#define SHMMNI 4096 /* max num of segs system wide */ -#define SHMALL (SHMMAX/PAGE_SIZE*(SHMMNI/16)) /* max shm system wide (pages) */ -#define SHMSEG SHMMNI /* max shared segs per process */ - -struct shmid_ds { - struct ipc_perm shm_perm; /* operation perms */ - int shm_segsz; /* size of segment (bytes) */ - time_t shm_atime; /* last attach time */ - time_t shm_dtime; /* last detach time */ - time_t shm_ctime; /* last change time */ - pid_t shm_cpid; /* pid of creator */ - pid_t shm_lpid; /* pid of last operator */ - unsigned short shm_nattch; /* no. of current attaches */ - unsigned short shm_unused; /* compatibility */ - void *shm_unused2; /* ditto - used by DIPC */ - void *shm_unused3; /* unused */ -}; - -/* permission flag for shmget */ -#define SHM_R 0400 /* or S_IRUGO from */ -#define SHM_W 0200 /* or S_IWUGO from */ - -/* mode for attach */ -#define SHM_RDONLY 010000 /* read-only access */ -#define SHM_RND 020000 /* round attach address to SHMLBA boundary */ -#define SHM_REMAP 040000 /* take-over region on attach */ - -/* super user shmctl commands */ -#define SHM_LOCK 11 -#define SHM_UNLOCK 12 - -/* ipcs ctl commands */ -#define SHM_STAT 13 -#define SHM_INFO 14 - -/* Obsolete, used only for backwards compatibility */ -struct shminfo { - int shmmax; - int shmmin; - int shmmni; - int shmseg; - int shmall; -}; - -struct shm_info { - int used_ids; - unsigned long shm_tot; /* total allocated shm */ - unsigned long shm_rss; /* total resident shm */ - unsigned long shm_swp; /* total swapped shm */ - unsigned long swap_attempts; - unsigned long swap_successes; -}; - -#if defined(__i386__) || defined(__mips__) || defined(__arm__) || defined(__powerpc__) || defined(__s390__) || defined(__hppa__) || defined(__x86_64__) || defined(__ia64__) -#define PAGE_SIZE 4096UL -#define PAGE_SHIFT 12 -#elif defined(__alpha__) || defined(__sparc__) -/* sun4* has 4k except sun4 architecture, sparc64 has 8k */ -#define PAGE_SIZE 8192UL -#define PAGE_SHIFT 13 -#endif - -extern int shmget(key_t key, int size, int shmflg) __THROW; -extern void *shmat(int shmid, const void *shmaddr, int shmflg) __THROW; -extern int shmdt (const void *shmaddr) __THROW; -extern int shmctl(int shmid, int cmd, struct shmid_ds *buf) __THROW; - -#endif diff --git a/mdk-stage1/dietlibc/include/sys/signal.h b/mdk-stage1/dietlibc/include/sys/signal.h deleted file mode 100644 index 2e602dad8..000000000 --- a/mdk-stage1/dietlibc/include/sys/signal.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/mdk-stage1/dietlibc/include/sys/socket.h b/mdk-stage1/dietlibc/include/sys/socket.h deleted file mode 100644 index a1130c4f6..000000000 --- a/mdk-stage1/dietlibc/include/sys/socket.h +++ /dev/null @@ -1,526 +0,0 @@ -#ifndef _SYS_SOCKET_H -#define _SYS_SOCKET_H - -#include -#include - -/* For setsockoptions(2) */ -#if defined(__alpha__) || defined(__mips__) -#define SOL_SOCKET 0xffff - -#define SO_DEBUG 0x0001 -#define SO_REUSEADDR 0x0004 -#define SO_TYPE 0x1008 -#define SO_ERROR 0x1007 -#define SO_DONTROUTE 0x0010 -#define SO_BROADCAST 0x0020 -#define SO_SNDBUF 0x1001 -#define SO_RCVBUF 0x1002 -#define SO_KEEPALIVE 0x0008 -#define SO_OOBINLINE 0x0100 -#define SO_NO_CHECK 11 -#define SO_PRIORITY 12 -#define SO_LINGER 0x0080 -#define SO_BSDCOMPAT 14 -/* To add :#define SO_REUSEPORT 15 */ -#define SO_PASSCRED 17 -#define SO_PEERCRED 18 -#define SO_RCVLOWAT 0x1004 -#define SO_SNDLOWAT 0x1003 -#define SO_RCVTIMEO 0x1006 -#define SO_SNDTIMEO 0x1005 -#define SO_ACCEPTCONN 0x1009 - -#define SO_STYLE SO_TYPE /* Synonym */ - -#elif defined(__hppa__) -#define SOL_SOCKET 0xffff - -#define SO_DEBUG 0x0001 -#define SO_REUSEADDR 0x0004 -#define SO_KEEPALIVE 0x0008 -#define SO_DONTROUTE 0x0010 -#define SO_BROADCAST 0x0020 -#define SO_LINGER 0x0080 -#define SO_OOBINLINE 0x0100 -/* To add :#define SO_REUSEPORT 0x0200 */ -#define SO_SNDBUF 0x1001 -#define SO_RCVBUF 0x1002 -#define SO_SNDLOWAT 0x1003 -#define SO_RCVLOWAT 0x1004 -#define SO_SNDTIMEO 0x1005 -#define SO_RCVTIMEO 0x1006 -#define SO_ERROR 0x1007 -#define SO_TYPE 0x1008 -#define SO_PEERNAME 0x2000 - -#define SO_NO_CHECK 0x400b -#define SO_PRIORITY 0x400c -#define SO_BSDCOMPAT 0x400e -#define SO_PASSCRED 0x4010 -#define SO_PEERCRED 0x4011 -#define SO_TIMESTAMP 0x4012 -#define SCM_TIMESTAMP SO_TIMESTAMP - -/* Security levels - as per NRL IPv6 - don't actually do anything */ -#define SO_SECURITY_AUTHENTICATION 0x4016 -#define SO_SECURITY_ENCRYPTION_TRANSPORT 0x4017 -#define SO_SECURITY_ENCRYPTION_NETWORK 0x4018 - -#define SO_BINDTODEVICE 0x4019 - -/* Socket filtering */ -#define SO_ATTACH_FILTER 0x401a -#define SO_DETACH_FILTER 0x401b - -#define SO_ACCEPTCONN 0x401c - -#elif defined(__sparc__) -#define SOL_SOCKET 0xffff - -#define SO_DEBUG 0x0001 -#define SO_PASSCRED 0x0002 -#define SO_REUSEADDR 0x0004 -#define SO_KEEPALIVE 0x0008 -#define SO_DONTROUTE 0x0010 -#define SO_BROADCAST 0x0020 -#define SO_PEERCRED 0x0040 -#define SO_LINGER 0x0080 -#define SO_OOBINLINE 0x0100 -/* To add :#define SO_REUSEPORT 0x0200 */ -#define SO_BSDCOMPAT 0x0400 -#define SO_RCVLOWAT 0x0800 -#define SO_SNDLOWAT 0x1000 -#define SO_RCVTIMEO 0x2000 -#define SO_SNDTIMEO 0x4000 -#define SO_ACCEPTCONN 0x8000 - -#define SO_DONTLINGER (~SO_LINGER) /* Older SunOS compat. hack */ - -#define SO_SNDBUF 0x1001 -#define SO_RCVBUF 0x1002 -#define SO_ERROR 0x1007 -#define SO_TYPE 0x1008 - -#define SO_ATTACH_FILTER 0x001a -#define SO_DETACH_FILTER 0x001b - -#define SO_PEERNAME 0x001c -#define SO_TIMESTAMP 0x001d -#define SCM_TIMESTAMP SO_TIMESTAMP - -/* Security levels - as per NRL IPv6 - don't actually do anything */ -#define SO_SECURITY_AUTHENTICATION 0x5001 -#define SO_SECURITY_ENCRYPTION_TRANSPORT 0x5002 -#define SO_SECURITY_ENCRYPTION_NETWORK 0x5004 - -#else - -#define SOL_SOCKET 1 - -#define SO_DEBUG 1 -#define SO_REUSEADDR 2 -#define SO_TYPE 3 -#define SO_ERROR 4 -#define SO_DONTROUTE 5 -#define SO_BROADCAST 6 -#define SO_SNDBUF 7 -#define SO_RCVBUF 8 -#define SO_KEEPALIVE 9 -#define SO_OOBINLINE 10 -#define SO_NO_CHECK 11 -#define SO_PRIORITY 12 -#define SO_LINGER 13 -#define SO_BSDCOMPAT 14 -/* To add :#define SO_REUSEPORT 15 */ -#define SO_PASSCRED 16 -#define SO_PEERCRED 17 -#define SO_RCVLOWAT 18 -#define SO_SNDLOWAT 19 -#define SO_RCVTIMEO 20 -#define SO_SNDTIMEO 21 -#define SO_ACCEPTCONN 30 - -#endif - -#if !defined(__hppa__) && !defined(__sparc__) -/* Security levels - as per NRL IPv6 - don't actually do anything */ -#define SO_SECURITY_AUTHENTICATION 22 -#define SO_SECURITY_ENCRYPTION_TRANSPORT 23 -#define SO_SECURITY_ENCRYPTION_NETWORK 24 - -#define SO_BINDTODEVICE 25 - -/* Socket filtering */ -#define SO_ATTACH_FILTER 26 -#define SO_DETACH_FILTER 27 - -#define SO_PEERNAME 28 -#define SO_TIMESTAMP 29 -#define SCM_TIMESTAMP SO_TIMESTAMP -#endif - -/* Socket types. */ -#ifdef __mips__ -#define SOCK_DGRAM 1 /* datagram (conn.less) socket */ -#define SOCK_STREAM 2 /* stream (connection) socket */ -#else -#define SOCK_STREAM 1 /* stream (connection) socket */ -#define SOCK_DGRAM 2 /* datagram (conn.less) socket */ -#endif -#define SOCK_RAW 3 /* raw socket */ -#define SOCK_RDM 4 /* reliably-delivered message */ -#define SOCK_SEQPACKET 5 /* sequential packet socket */ -#define SOCK_PACKET 10 /* linux specific way of */ - /* getting packets at the dev */ - /* level. For writing rarp and */ - /* other similar things on the */ - /* user level. */ - -struct sockaddr { - sa_family_t sa_family; - char sa_data[14]; -}; - -struct linger { - int l_onoff; - int l_linger; -}; - -struct iovec { - void* iov_base; /* BSD uses caddr_t (1003.1g requires void *) */ - size_t iov_len; /* Must be size_t (1003.1g) */ -}; - -struct msghdr { - void* msg_name; /* Socket name */ - int msg_namelen; /* Length of name */ - struct iovec* msg_iov; /* Data blocks */ - size_t msg_iovlen; /* Number of blocks */ - void* msg_control; /* Per protocol magic (eg BSD file descriptor passing) */ - size_t msg_controllen; /* Length of cmsg list */ - unsigned msg_flags; -}; - -struct cmsghdr { - size_t cmsg_len; /* data byte count, including hdr */ - int cmsg_level; /* originating protocol */ - int cmsg_type; /* protocol-specific type */ -}; - -#define UIO_FASTIOV 8 -#define UIO_MAXIOV 1024 - -/* "Socket"-level control message types: */ - -#define SCM_RIGHTS 0x01 /* rw: access rights (array of int) */ -#define SCM_CREDENTIALS 0x02 /* rw: struct ucred */ -#define SCM_CONNECT 0x03 /* rw: struct scm_connect */ - -struct ucred { - unsigned int pid; - unsigned int uid; - unsigned int gid; -}; - -/* Supported address families. */ -#define AF_UNSPEC 0 -#define AF_UNIX 1 /* Unix domain sockets */ -#define AF_LOCAL 1 /* POSIX name for AF_UNIX */ -#define AF_INET 2 /* Internet IP Protocol */ -#define AF_AX25 3 /* Amateur Radio AX.25 */ -#define AF_IPX 4 /* Novell IPX */ -#define AF_APPLETALK 5 /* AppleTalk DDP */ -#define AF_NETROM 6 /* Amateur Radio NET/ROM */ -#define AF_BRIDGE 7 /* Multiprotocol bridge */ -#define AF_ATMPVC 8 /* ATM PVCs */ -#define AF_X25 9 /* Reserved for X.25 project */ -#define AF_INET6 10 /* IP version 6 */ -#define AF_ROSE 11 /* Amateur Radio X.25 PLP */ -#define AF_DECnet 12 /* Reserved for DECnet project */ -#define AF_NETBEUI 13 /* Reserved for 802.2LLC project*/ -#define AF_SECURITY 14 /* Security callback pseudo AF */ -#define AF_KEY 15 /* PF_KEY key management API */ -#define AF_NETLINK 16 -#define AF_ROUTE AF_NETLINK /* Alias to emulate 4.4BSD */ -#define AF_PACKET 17 /* Packet family */ -#define AF_ASH 18 /* Ash */ -#define AF_ECONET 19 /* Acorn Econet */ -#define AF_ATMSVC 20 /* ATM SVCs */ -#define AF_SNA 22 /* Linux SNA Project (nutters!) */ -#define AF_IRDA 23 /* IRDA sockets */ -#define AF_PPPOX 24 /* PPPoX sockets */ -#define AF_WANPIPE 25 /* Wanpipe API Sockets */ -#define AF_MAX 32 /* For now.. */ - -/* Protocol families, same as address families. */ -#define PF_UNSPEC AF_UNSPEC -#define PF_UNIX AF_UNIX -#define PF_LOCAL AF_LOCAL -#define PF_INET AF_INET -#define PF_AX25 AF_AX25 -#define PF_IPX AF_IPX -#define PF_APPLETALK AF_APPLETALK -#define PF_NETROM AF_NETROM -#define PF_BRIDGE AF_BRIDGE -#define PF_ATMPVC AF_ATMPVC -#define PF_X25 AF_X25 -#define PF_INET6 AF_INET6 -#define PF_ROSE AF_ROSE -#define PF_DECnet AF_DECnet -#define PF_NETBEUI AF_NETBEUI -#define PF_SECURITY AF_SECURITY -#define PF_KEY AF_KEY -#define PF_NETLINK AF_NETLINK -#define PF_ROUTE AF_ROUTE -#define PF_PACKET AF_PACKET -#define PF_ASH AF_ASH -#define PF_ECONET AF_ECONET -#define PF_ATMSVC AF_ATMSVC -#define PF_SNA AF_SNA -#define PF_IRDA AF_IRDA -#define PF_PPPOX AF_PPPOX -#define PF_WANPIPE AF_WANPIPE -#define PF_MAX AF_MAX - -/* Maximum queue length specifiable by listen. */ -#define SOMAXCONN 128 - -/* Flags we can use with send/ and recv. - Added those for 1003.1g not all are supported yet */ -#define MSG_OOB 1 -#define MSG_PEEK 2 -#define MSG_DONTROUTE 4 -#define MSG_TRYHARD 4 /* Synonym for MSG_DONTROUTE for DECnet */ -#define MSG_CTRUNC 8 -#define MSG_PROBE 0x10 /* Do not send. Only probe path f.e. for MTU */ -#define MSG_TRUNC 0x20 -#define MSG_DONTWAIT 0x40 /* Nonblocking io */ -#define MSG_EOR 0x80 /* End of record */ -#define MSG_WAITALL 0x100 /* Wait for a full request */ -#define MSG_FIN 0x200 -#define MSG_EOF MSG_FIN -#define MSG_SYN 0x400 -#define MSG_CONFIRM 0x800 /* Confirm path validity */ -#define MSG_RST 0x1000 -#define MSG_ERRQUEUE 0x2000 /* Fetch message from error queue */ -#define MSG_NOSIGNAL 0x4000 /* Do not generate SIGPIPE */ -#define MSG_MORE 0x8000 /* Sender will send more */ - -/* Setsockoptions(2) level. Thanks to BSD these must match IPPROTO_xxx */ -#define SOL_IP 0 -/* #define SOL_ICMP 1 No-no-no! Due to Linux :-) we cannot use SOL_ICMP=1 */ -#define SOL_TCP 6 -#define SOL_UDP 17 -#define SOL_IPV6 41 -#define SOL_ICMPV6 58 -#define SOL_RAW 255 -#define SOL_IPX 256 -#define SOL_AX25 257 -#define SOL_ATALK 258 -#define SOL_NETROM 259 -#define SOL_ROSE 260 -#define SOL_DECNET 261 -#define SOL_X25 262 -#define SOL_PACKET 263 -#define SOL_ATM 264 /* ATM layer (cell level) */ -#define SOL_AAL 265 /* ATM Adaption Layer (packet level) */ -#define SOL_IRDA 266 - -/* IPX options */ -#define IPX_TYPE 1 - -#define CMSG_ALIGN(len) ( ((len)+sizeof(long)-1) & ~(sizeof(long)-1) ) -#define __CMSG_NXTHDR(ctl, len, cmsg) __cmsg_nxthdr((ctl),(len),(cmsg)) -#define CMSG_NXTHDR(mhdr, cmsg) cmsg_nxthdr((mhdr), (cmsg)) - -static inline struct cmsghdr* __cmsg_nxthdr(void *__ctl, size_t __size, struct cmsghdr *__cmsg) -{ - struct cmsghdr * __ptr; - __ptr = (struct cmsghdr*)(((unsigned char *) __cmsg) + CMSG_ALIGN(__cmsg->cmsg_len)); - if ((unsigned long)((char*)(__ptr+1) - (char *) __ctl) > __size) - return (struct cmsghdr *)0; - return __ptr; -} - -static inline struct cmsghdr* cmsg_nxthdr (struct msghdr *__msg, struct cmsghdr *__cmsg) -{ - return __cmsg_nxthdr(__msg->msg_control, __msg->msg_controllen, __cmsg); -} - -#define CMSG_DATA(cmsg) ((void *)((char *)(cmsg) + CMSG_ALIGN(sizeof(struct cmsghdr)))) -#define CMSG_SPACE(len) (CMSG_ALIGN(sizeof(struct cmsghdr)) + CMSG_ALIGN(len)) -#define CMSG_LEN(len) (CMSG_ALIGN(sizeof(struct cmsghdr)) + (len)) - -#define __CMSG_FIRSTHDR(ctl,len) ((len) >= sizeof(struct cmsghdr) ? \ - (struct cmsghdr *)(ctl) : \ - (struct cmsghdr *)NULL) -#define CMSG_FIRSTHDR(msg) __CMSG_FIRSTHDR((msg)->msg_control, (msg)->msg_controllen) - -struct sockaddr_storage { - sa_family_t ss_family; - uint32_t __ss_align; - char __ss_padding[(128 - (2 * sizeof (uint32_t ))) ]; -}; - -#ifndef SOCK_DGRAM -/* the Linux kernel headers suck really badly on non-x86 */ -#define SOCK_STREAM 1 /* stream (connection) socket */ -#define SOCK_DGRAM 2 /* datagram (conn.less) socket */ -#define SOCK_RAW 3 /* raw socket */ -#define SOCK_RDM 4 /* reliably-delivered message */ -#define SOCK_SEQPACKET 5 /* sequential packet socket */ -#define SOCK_PACKET 10 /* linux specific way of */ -#endif - -int socket(int domain, int type, int protocol) __THROW; -int accept(int s, struct sockaddr *addr, socklen_t *addrlen) __THROW; -int connect(int sockfd, const struct sockaddr *serv_addr, socklen_t addrlen) __THROW; -int bind(int sockfd, const struct sockaddr *my_addr, socklen_t addrlen) __THROW; -int recv(int s, void *buf, size_t len, int flags) __THROW; -int recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen) __THROW; -int recvmsg(int s, struct msghdr *msg, int flags) __THROW; -int send(int s, const void *msg, size_t len, int flags) __THROW; -int sendto(int s, const void *msg, size_t len, int flags, const struct sockaddr *to, socklen_t tolen) __THROW; -int sendmsg(int s, const struct msghdr *msg, int flags) __THROW; - -int getpeername(int s, struct sockaddr *name, socklen_t *namelen) __THROW; -int getsockname(int s , struct sockaddr * name , socklen_t * namelen) __THROW; - -int getsockopt(int s, int level, int optname, void *optval, socklen_t *optlen) __THROW; -int setsockopt(int s, int level, int optname, const void *optval, socklen_t optlen) __THROW; - -int listen(int s, int backlog) __THROW; - -#define SHUT_RD 0 -#define SHUT_WR 1 -#define SHUT_RDWR 2 -int shutdown(int s, int how) __THROW; - -int socketpair(int d, int type, int protocol, int sv[2]); - -/* currently not supported: */ -#define NI_NOFQDN 1 - -#define NI_NUMERICHOST 2 -#define NI_NAMEREQD 4 -#define NI_NUMERICSERV 8 -#define NI_DGRAM 16 - -struct addrinfo { - int ai_flags; - int ai_family; - int ai_socktype; - int ai_protocol; - size_t ai_addrlen; - struct sockaddr *ai_addr; - char *ai_canonname; - struct addrinfo *ai_next; -}; - -int getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host, - size_t hostlen, char *serv, size_t servlen, int flags) __THROW; -int getaddrinfo(const char *node, const char *service, const struct - addrinfo *hints, struct addrinfo **res) __THROW; -void freeaddrinfo(struct addrinfo *res) __THROW; -const char *gai_strerror(int errcode) __THROW; - -#define EAI_FAMILY -1 -#define EAI_SOCKTYPE -2 -#define EAI_BADFLAGS -3 -#define EAI_NONAME -4 -#define EAI_SERVICE -5 -#define EAI_ADDRFAMILY -6 -#define EAI_NODATA -7 -#define EAI_MEMORY -8 -#define EAI_FAIL -9 -#define EAI_AGAIN -10 -#define EAI_SYSTEM -11 - -#define AI_NUMERICHOST 1 -#define AI_CANONNAME 2 -#define AI_PASSIVE 4 - -/* Linux-specific socket ioctls */ -#define SIOCINQ FIONREAD -#define SIOCOUTQ TIOCOUTQ - -/* Routing table calls. */ -#define SIOCADDRT 0x890B /* add routing table entry */ -#define SIOCDELRT 0x890C /* delete routing table entry */ -#define SIOCRTMSG 0x890D /* call to routing system */ - -/* Socket configuration controls. */ -#define SIOCGIFNAME 0x8910 /* get iface name */ -#define SIOCSIFLINK 0x8911 /* set iface channel */ -#define SIOCGIFCONF 0x8912 /* get iface list */ -#define SIOCGIFFLAGS 0x8913 /* get flags */ -#define SIOCSIFFLAGS 0x8914 /* set flags */ -#define SIOCGIFADDR 0x8915 /* get PA address */ -#define SIOCSIFADDR 0x8916 /* set PA address */ -#define SIOCGIFDSTADDR 0x8917 /* get remote PA address */ -#define SIOCSIFDSTADDR 0x8918 /* set remote PA address */ -#define SIOCGIFBRDADDR 0x8919 /* get broadcast PA address */ -#define SIOCSIFBRDADDR 0x891a /* set broadcast PA address */ -#define SIOCGIFNETMASK 0x891b /* get network PA mask */ -#define SIOCSIFNETMASK 0x891c /* set network PA mask */ -#define SIOCGIFMETRIC 0x891d /* get metric */ -#define SIOCSIFMETRIC 0x891e /* set metric */ -#define SIOCGIFMEM 0x891f /* get memory address (BSD) */ -#define SIOCSIFMEM 0x8920 /* set memory address (BSD) */ -#define SIOCGIFMTU 0x8921 /* get MTU size */ -#define SIOCSIFMTU 0x8922 /* set MTU size */ -#define SIOCSIFNAME 0x8923 /* set interface name */ -#define SIOCSIFHWADDR 0x8924 /* set hardware address */ -#define SIOCGIFENCAP 0x8925 /* get/set encapsulations */ -#define SIOCSIFENCAP 0x8926 -#define SIOCGIFHWADDR 0x8927 /* Get hardware address */ -#define SIOCGIFSLAVE 0x8929 /* Driver slaving support */ -#define SIOCSIFSLAVE 0x8930 -#define SIOCADDMULTI 0x8931 /* Multicast address lists */ -#define SIOCDELMULTI 0x8932 -#define SIOCGIFINDEX 0x8933 /* name -> if_index mapping */ -#define SIOGIFINDEX SIOCGIFINDEX /* misprint compatibility :-) */ -#define SIOCSIFPFLAGS 0x8934 /* set/get extended flags set */ -#define SIOCGIFPFLAGS 0x8935 -#define SIOCDIFADDR 0x8936 /* delete PA address */ -#define SIOCSIFHWBROADCAST 0x8937 /* set hardware broadcast addr */ -#define SIOCGIFCOUNT 0x8938 /* get number of devices */ - -#define SIOCGIFBR 0x8940 /* Bridging support */ -#define SIOCSIFBR 0x8941 /* Set bridging options */ - -#define SIOCGIFTXQLEN 0x8942 /* Get the tx queue length */ -#define SIOCSIFTXQLEN 0x8943 /* Set the tx queue length */ - -#define SIOCGIFDIVERT 0x8944 /* Frame diversion support */ -#define SIOCSIFDIVERT 0x8945 /* Set frame diversion options */ - -#define SIOCETHTOOL 0x8946 /* Ethtool interface */ - -/* ARP cache control calls. */ - /* 0x8950 - 0x8952 * obsolete calls, don't re-use */ -#define SIOCDARP 0x8953 /* delete ARP table entry */ -#define SIOCGARP 0x8954 /* get ARP table entry */ -#define SIOCSARP 0x8955 /* set ARP table entry */ - -/* RARP cache control calls. */ -#define SIOCDRARP 0x8960 /* delete RARP table entry */ -#define SIOCGRARP 0x8961 /* get RARP table entry */ -#define SIOCSRARP 0x8962 /* set RARP table entry */ - -/* Driver configuration calls */ - -#define SIOCGIFMAP 0x8970 /* Get device parameters */ -#define SIOCSIFMAP 0x8971 /* Set device parameters */ - -/* DLCI configuration calls */ - -#define SIOCADDDLCI 0x8980 /* Create new DLCI device */ -#define SIOCDELDLCI 0x8981 /* Delete DLCI device */ - -#define SIOCDEVPRIVATE 0x89F0 /* to 89FF */ - -#define _LINUX_SOCKET_H - -#endif diff --git a/mdk-stage1/dietlibc/include/sys/soundcard.h b/mdk-stage1/dietlibc/include/sys/soundcard.h deleted file mode 100644 index e8766499a..000000000 --- a/mdk-stage1/dietlibc/include/sys/soundcard.h +++ /dev/null @@ -1,1300 +0,0 @@ -#ifndef _SYS_SOUNDCARD_H -#define _SYS_SOUNDCARD_H - -/* - * Copyright by Hannu Savolainen 1993-1997 - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. 2. - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - - -/* - * OSS interface version. With versions earlier than 3.6 this value is - * an integer with value less than 361. In versions 3.6 and later - * it's a six digit hexadecimal value. For example value - * of 0x030600 represents OSS version 3.6.0. - * Use ioctl(fd, OSS_GETVERSION, &int) to get the version number of - * the currently active driver. - */ -#define SOUND_VERSION 0x030802 -#define OPEN_SOUND_SYSTEM - -/* In Linux we need to be prepared for cross compiling */ -#include - -/* - * Supported card ID numbers (Should be somewhere else?) - */ - -#define SNDCARD_ADLIB 1 -#define SNDCARD_SB 2 -#define SNDCARD_PAS 3 -#define SNDCARD_GUS 4 -#define SNDCARD_MPU401 5 -#define SNDCARD_SB16 6 -#define SNDCARD_SB16MIDI 7 -#define SNDCARD_UART6850 8 -#define SNDCARD_GUS16 9 -#define SNDCARD_MSS 10 -#define SNDCARD_PSS 11 -#define SNDCARD_SSCAPE 12 -#define SNDCARD_PSS_MPU 13 -#define SNDCARD_PSS_MSS 14 -#define SNDCARD_SSCAPE_MSS 15 -#define SNDCARD_TRXPRO 16 -#define SNDCARD_TRXPRO_SB 17 -#define SNDCARD_TRXPRO_MPU 18 -#define SNDCARD_MAD16 19 -#define SNDCARD_MAD16_MPU 20 -#define SNDCARD_CS4232 21 -#define SNDCARD_CS4232_MPU 22 -#define SNDCARD_MAUI 23 -#define SNDCARD_PSEUDO_MSS 24 -#define SNDCARD_GUSPNP 25 -#define SNDCARD_UART401 26 -/* Sound card numbers 27 to N are reserved. Don't add more numbers here. */ - -/*********************************** - * IOCTL Commands for /dev/sequencer - */ - -#ifndef _SIOWR -#if defined(_IOWR) && (defined(_AIX) || (!defined(sun) && !defined(sparc) && !defined(__sparc__) && !defined(__INCioctlh) && !defined(__Lynx__))) -/* Use already defined ioctl defines if they exist (except with Sun or Sparc) */ -#define SIOCPARM_MASK IOCPARM_MASK -#define SIOC_VOID IOC_VOID -#define SIOC_OUT IOC_OUT -#define SIOC_IN IOC_IN -#define SIOC_INOUT IOC_INOUT -#define _SIOC_SIZE _IOC_SIZE -#define _SIOC_DIR _IOC_DIR -#define _SIOC_NONE _IOC_NONE -#define _SIOC_READ _IOC_READ -#define _SIOC_WRITE _IOC_WRITE -#define _SIO _IO -#define _SIOR _IOR -#define _SIOW _IOW -#define _SIOWR _IOWR -#else - -/* Ioctl's have the command encoded in the lower word, - * and the size of any in or out parameters in the upper - * word. The high 2 bits of the upper word are used - * to encode the in/out status of the parameter; for now - * we restrict parameters to at most 8191 bytes. - */ -/* #define SIOCTYPE (0xff<<8) */ -#define SIOCPARM_MASK 0x1fff /* parameters must be < 8192 bytes */ -#define SIOC_VOID 0x00000000 /* no parameters */ -#define SIOC_OUT 0x20000000 /* copy out parameters */ -#define SIOC_IN 0x40000000 /* copy in parameters */ -#define SIOC_INOUT (SIOC_IN|SIOC_OUT) -/* the 0x20000000 is so we can distinguish new ioctl's from old */ -#define _SIO(x,y) ((int)(SIOC_VOID|(x<<8)|y)) -#define _SIOR(x,y,t) ((int)(SIOC_OUT|((sizeof(t)&SIOCPARM_MASK)<<16)|(x<<8)|y)) -#define _SIOW(x,y,t) ((int)(SIOC_IN|((sizeof(t)&SIOCPARM_MASK)<<16)|(x<<8)|y)) -/* this should be _SIORW, but stdio got there first */ -#define _SIOWR(x,y,t) ((int)(SIOC_INOUT|((sizeof(t)&SIOCPARM_MASK)<<16)|(x<<8)|y)) -#define _SIOC_SIZE(x) ((x>>16)&SIOCPARM_MASK) -#define _SIOC_DIR(x) (x & 0xf0000000) -#define _SIOC_NONE SIOC_VOID -#define _SIOC_READ SIOC_OUT -#define _SIOC_WRITE SIOC_IN -# endif /* _IOWR */ -#endif /* !_SIOWR */ - -#define SNDCTL_SEQ_RESET _SIO ('Q', 0) -#define SNDCTL_SEQ_SYNC _SIO ('Q', 1) -#define SNDCTL_SYNTH_INFO _SIOWR('Q', 2, struct synth_info) -#define SNDCTL_SEQ_CTRLRATE _SIOWR('Q', 3, int) /* Set/get timer resolution (HZ) */ -#define SNDCTL_SEQ_GETOUTCOUNT _SIOR ('Q', 4, int) -#define SNDCTL_SEQ_GETINCOUNT _SIOR ('Q', 5, int) -#define SNDCTL_SEQ_PERCMODE _SIOW ('Q', 6, int) -#define SNDCTL_FM_LOAD_INSTR _SIOW ('Q', 7, struct sbi_instrument) /* Obsolete. Don't use!!!!!! */ -#define SNDCTL_SEQ_TESTMIDI _SIOW ('Q', 8, int) -#define SNDCTL_SEQ_RESETSAMPLES _SIOW ('Q', 9, int) -#define SNDCTL_SEQ_NRSYNTHS _SIOR ('Q',10, int) -#define SNDCTL_SEQ_NRMIDIS _SIOR ('Q',11, int) -#define SNDCTL_MIDI_INFO _SIOWR('Q',12, struct midi_info) -#define SNDCTL_SEQ_THRESHOLD _SIOW ('Q',13, int) -#define SNDCTL_SYNTH_MEMAVL _SIOWR('Q',14, int) /* in=dev#, out=memsize */ -#define SNDCTL_FM_4OP_ENABLE _SIOW ('Q',15, int) /* in=dev# */ -#define SNDCTL_SEQ_PANIC _SIO ('Q',17) -#define SNDCTL_SEQ_OUTOFBAND _SIOW ('Q',18, struct seq_event_rec) -#define SNDCTL_SEQ_GETTIME _SIOR ('Q',19, int) -#define SNDCTL_SYNTH_ID _SIOWR('Q',20, struct synth_info) -#define SNDCTL_SYNTH_CONTROL _SIOWR('Q',21, struct synth_control) -#define SNDCTL_SYNTH_REMOVESAMPLE _SIOWR('Q',22, struct remove_sample) - -typedef struct synth_control -{ - int devno; /* Synthesizer # */ - char data[4000]; /* Device spesific command/data record */ -}synth_control; - -typedef struct remove_sample -{ - int devno; /* Synthesizer # */ - int bankno; /* MIDI bank # (0=General MIDI) */ - int instrno; /* MIDI instrument number */ -} remove_sample; - -typedef struct seq_event_rec { - unsigned char arr[8]; -} seq_event_rec; - -#define SNDCTL_TMR_TIMEBASE _SIOWR('T', 1, int) -#define SNDCTL_TMR_START _SIO ('T', 2) -#define SNDCTL_TMR_STOP _SIO ('T', 3) -#define SNDCTL_TMR_CONTINUE _SIO ('T', 4) -#define SNDCTL_TMR_TEMPO _SIOWR('T', 5, int) -#define SNDCTL_TMR_SOURCE _SIOWR('T', 6, int) -# define TMR_INTERNAL 0x00000001 -# define TMR_EXTERNAL 0x00000002 -# define TMR_MODE_MIDI 0x00000010 -# define TMR_MODE_FSK 0x00000020 -# define TMR_MODE_CLS 0x00000040 -# define TMR_MODE_SMPTE 0x00000080 -#define SNDCTL_TMR_METRONOME _SIOW ('T', 7, int) -#define SNDCTL_TMR_SELECT _SIOW ('T', 8, int) - -/* - * Some big endian/little endian handling macros - */ - -#if defined(_AIX) || defined(AIX) || defined(sparc) || defined(__sparc__) || defined(HPPA) || defined(PPC) -/* Big endian machines */ -# define _PATCHKEY(id) (0xfd00|id) -# define AFMT_S16_NE AFMT_S16_BE -#else -# define _PATCHKEY(id) ((id<<8)|0xfd) -# define AFMT_S16_NE AFMT_S16_LE -#endif - -/* - * Sample loading mechanism for internal synthesizers (/dev/sequencer) - * The following patch_info structure has been designed to support - * Gravis UltraSound. It tries to be universal format for uploading - * sample based patches but is probably too limited. - * - * (PBD) As Hannu guessed, the GUS structure is too limited for - * the WaveFront, but this is the right place for a constant definition. - */ - -struct patch_info { - unsigned short key; /* Use WAVE_PATCH here */ -#define WAVE_PATCH _PATCHKEY(0x04) -#define GUS_PATCH WAVE_PATCH -#define WAVEFRONT_PATCH _PATCHKEY(0x06) - - short device_no; /* Synthesizer number */ - short instr_no; /* Midi pgm# */ - - unsigned int mode; -/* - * The least significant byte has the same format than the GUS .PAT - * files - */ -#define WAVE_16_BITS 0x01 /* bit 0 = 8 or 16 bit wave data. */ -#define WAVE_UNSIGNED 0x02 /* bit 1 = Signed - Unsigned data. */ -#define WAVE_LOOPING 0x04 /* bit 2 = looping enabled-1. */ -#define WAVE_BIDIR_LOOP 0x08 /* bit 3 = Set is bidirectional looping. */ -#define WAVE_LOOP_BACK 0x10 /* bit 4 = Set is looping backward. */ -#define WAVE_SUSTAIN_ON 0x20 /* bit 5 = Turn sustaining on. (Env. pts. 3)*/ -#define WAVE_ENVELOPES 0x40 /* bit 6 = Enable envelopes - 1 */ -#define WAVE_FAST_RELEASE 0x80 /* bit 7 = Shut off immediately after note off */ - /* (use the env_rate/env_offs fields). */ -/* Linux specific bits */ -#define WAVE_VIBRATO 0x00010000 /* The vibrato info is valid */ -#define WAVE_TREMOLO 0x00020000 /* The tremolo info is valid */ -#define WAVE_SCALE 0x00040000 /* The scaling info is valid */ -#define WAVE_FRACTIONS 0x00080000 /* Fraction information is valid */ -/* Reserved bits */ -#define WAVE_ROM 0x40000000 /* For future use */ -#define WAVE_MULAW 0x20000000 /* For future use */ -/* Other bits must be zeroed */ - - int len; /* Size of the wave data in bytes */ - int loop_start, loop_end; /* Byte offsets from the beginning */ - -/* - * The base_freq and base_note fields are used when computing the - * playback speed for a note. The base_note defines the tone frequency - * which is heard if the sample is played using the base_freq as the - * playback speed. - * - * The low_note and high_note fields define the minimum and maximum note - * frequencies for which this sample is valid. It is possible to define - * more than one samples for an instrument number at the same time. The - * low_note and high_note fields are used to select the most suitable one. - * - * The fields base_note, high_note and low_note should contain - * the note frequency multiplied by 1000. For example value for the - * middle A is 440*1000. - */ - - unsigned int base_freq; - unsigned int base_note; - unsigned int high_note; - unsigned int low_note; - int panning; /* -128=left, 127=right */ - int detuning; - -/* New fields introduced in version 1.99.5 */ - - /* Envelope. Enabled by mode bit WAVE_ENVELOPES */ - unsigned char env_rate[ 6 ]; /* GUS HW ramping rate */ - unsigned char env_offset[ 6 ]; /* 255 == 100% */ - - /* - * The tremolo, vibrato and scale info are not supported yet. - * Enable by setting the mode bits WAVE_TREMOLO, WAVE_VIBRATO or - * WAVE_SCALE - */ - - unsigned char tremolo_sweep; - unsigned char tremolo_rate; - unsigned char tremolo_depth; - - unsigned char vibrato_sweep; - unsigned char vibrato_rate; - unsigned char vibrato_depth; - - int scale_frequency; - unsigned int scale_factor; /* from 0 to 2048 or 0 to 2 */ - - int volume; - int fractions; - int reserved1; - int spare[2]; - char data[1]; /* The waveform data starts here */ - }; - -struct sysex_info { - short key; /* Use SYSEX_PATCH or MAUI_PATCH here */ -#define SYSEX_PATCH _PATCHKEY(0x05) -#define MAUI_PATCH _PATCHKEY(0x06) - short device_no; /* Synthesizer number */ - int len; /* Size of the sysex data in bytes */ - unsigned char data[1]; /* Sysex data starts here */ - }; - -/* - * /dev/sequencer input events. - * - * The data written to the /dev/sequencer is a stream of events. Events - * are records of 4 or 8 bytes. The first byte defines the size. - * Any number of events can be written with a write call. There - * is a set of macros for sending these events. Use these macros if you - * want to maximize portability of your program. - * - * Events SEQ_WAIT, SEQ_MIDIPUTC and SEQ_ECHO. Are also input events. - * (All input events are currently 4 bytes long. Be prepared to support - * 8 byte events also. If you receive any event having first byte >= 128, - * it's a 8 byte event. - * - * The events are documented at the end of this file. - * - * Normal events (4 bytes) - * There is also a 8 byte version of most of the 4 byte events. The - * 8 byte one is recommended. - */ -#define SEQ_NOTEOFF 0 -#define SEQ_FMNOTEOFF SEQ_NOTEOFF /* Just old name */ -#define SEQ_NOTEON 1 -#define SEQ_FMNOTEON SEQ_NOTEON -#define SEQ_WAIT TMR_WAIT_ABS -#define SEQ_PGMCHANGE 3 -#define SEQ_FMPGMCHANGE SEQ_PGMCHANGE -#define SEQ_SYNCTIMER TMR_START -#define SEQ_MIDIPUTC 5 -#define SEQ_DRUMON 6 /*** OBSOLETE ***/ -#define SEQ_DRUMOFF 7 /*** OBSOLETE ***/ -#define SEQ_ECHO TMR_ECHO /* For synching programs with output */ -#define SEQ_AFTERTOUCH 9 -#define SEQ_CONTROLLER 10 - -/******************************************* - * Midi controller numbers - ******************************************* - * Controllers 0 to 31 (0x00 to 0x1f) and - * 32 to 63 (0x20 to 0x3f) are continuous - * controllers. - * In the MIDI 1.0 these controllers are sent using - * two messages. Controller numbers 0 to 31 are used - * to send the MSB and the controller numbers 32 to 63 - * are for the LSB. Note that just 7 bits are used in MIDI bytes. - */ - -#define CTL_BANK_SELECT 0x00 -#define CTL_MODWHEEL 0x01 -#define CTL_BREATH 0x02 -/* undefined 0x03 */ -#define CTL_FOOT 0x04 -#define CTL_PORTAMENTO_TIME 0x05 -#define CTL_DATA_ENTRY 0x06 -#define CTL_MAIN_VOLUME 0x07 -#define CTL_BALANCE 0x08 -/* undefined 0x09 */ -#define CTL_PAN 0x0a -#define CTL_EXPRESSION 0x0b -/* undefined 0x0c */ -/* undefined 0x0d */ -/* undefined 0x0e */ -/* undefined 0x0f */ -#define CTL_GENERAL_PURPOSE1 0x10 -#define CTL_GENERAL_PURPOSE2 0x11 -#define CTL_GENERAL_PURPOSE3 0x12 -#define CTL_GENERAL_PURPOSE4 0x13 -/* undefined 0x14 - 0x1f */ - -/* undefined 0x20 */ -/* The controller numbers 0x21 to 0x3f are reserved for the */ -/* least significant bytes of the controllers 0x00 to 0x1f. */ -/* These controllers are not recognised by the driver. */ - -/* Controllers 64 to 69 (0x40 to 0x45) are on/off switches. */ -/* 0=OFF and 127=ON (intermediate values are possible) */ -#define CTL_DAMPER_PEDAL 0x40 -#define CTL_SUSTAIN 0x40 /* Alias */ -#define CTL_HOLD 0x40 /* Alias */ -#define CTL_PORTAMENTO 0x41 -#define CTL_SOSTENUTO 0x42 -#define CTL_SOFT_PEDAL 0x43 -/* undefined 0x44 */ -#define CTL_HOLD2 0x45 -/* undefined 0x46 - 0x4f */ - -#define CTL_GENERAL_PURPOSE5 0x50 -#define CTL_GENERAL_PURPOSE6 0x51 -#define CTL_GENERAL_PURPOSE7 0x52 -#define CTL_GENERAL_PURPOSE8 0x53 -/* undefined 0x54 - 0x5a */ -#define CTL_EXT_EFF_DEPTH 0x5b -#define CTL_TREMOLO_DEPTH 0x5c -#define CTL_CHORUS_DEPTH 0x5d -#define CTL_DETUNE_DEPTH 0x5e -#define CTL_CELESTE_DEPTH 0x5e /* Alias for the above one */ -#define CTL_PHASER_DEPTH 0x5f -#define CTL_DATA_INCREMENT 0x60 -#define CTL_DATA_DECREMENT 0x61 -#define CTL_NONREG_PARM_NUM_LSB 0x62 -#define CTL_NONREG_PARM_NUM_MSB 0x63 -#define CTL_REGIST_PARM_NUM_LSB 0x64 -#define CTL_REGIST_PARM_NUM_MSB 0x65 -/* undefined 0x66 - 0x78 */ -/* reserved 0x79 - 0x7f */ - -/* Pseudo controllers (not midi compatible) */ -#define CTRL_PITCH_BENDER 255 -#define CTRL_PITCH_BENDER_RANGE 254 -#define CTRL_EXPRESSION 253 /* Obsolete */ -#define CTRL_MAIN_VOLUME 252 /* Obsolete */ -#define SEQ_BALANCE 11 -#define SEQ_VOLMODE 12 - -/* - * Volume mode decides how volumes are used - */ - -#define VOL_METHOD_ADAGIO 1 -#define VOL_METHOD_LINEAR 2 - -/* - * Note! SEQ_WAIT, SEQ_MIDIPUTC and SEQ_ECHO are used also as - * input events. - */ - -/* - * Event codes 0xf0 to 0xfc are reserved for future extensions. - */ - -#define SEQ_FULLSIZE 0xfd /* Long events */ -/* - * SEQ_FULLSIZE events are used for loading patches/samples to the - * synthesizer devices. These events are passed directly to the driver - * of the associated synthesizer device. There is no limit to the size - * of the extended events. These events are not queued but executed - * immediately when the write() is called (execution can take several - * seconds of time). - * - * When a SEQ_FULLSIZE message is written to the device, it must - * be written using exactly one write() call. Other events cannot - * be mixed to the same write. - * - * For FM synths (YM3812/OPL3) use struct sbi_instrument and write it to the - * /dev/sequencer. Don't write other data together with the instrument structure - * Set the key field of the structure to FM_PATCH. The device field is used to - * route the patch to the corresponding device. - * - * For wave table use struct patch_info. Initialize the key field - * to WAVE_PATCH. - */ -#define SEQ_PRIVATE 0xfe /* Low level HW dependent events (8 bytes) */ -#define SEQ_EXTENDED 0xff /* Extended events (8 bytes) OBSOLETE */ - -/* - * Record for FM patches - */ - -typedef unsigned char sbi_instr_data[32]; - -struct sbi_instrument { - unsigned short key; /* FM_PATCH or OPL3_PATCH */ -#define FM_PATCH _PATCHKEY(0x01) -#define OPL3_PATCH _PATCHKEY(0x03) - short device; /* Synth# (0-4) */ - int channel; /* Program# to be initialized */ - sbi_instr_data operators; /* Register settings for operator cells (.SBI format) */ - }; - -struct synth_info { /* Read only */ - char name[30]; - int device; /* 0-N. INITIALIZE BEFORE CALLING */ - int synth_type; -#define SYNTH_TYPE_FM 0 -#define SYNTH_TYPE_SAMPLE 1 -#define SYNTH_TYPE_MIDI 2 /* Midi interface */ - - int synth_subtype; -#define FM_TYPE_ADLIB 0x00 -#define FM_TYPE_OPL3 0x01 -#define MIDI_TYPE_MPU401 0x401 - -#define SAMPLE_TYPE_BASIC 0x10 -#define SAMPLE_TYPE_GUS SAMPLE_TYPE_BASIC -#define SAMPLE_TYPE_WAVEFRONT 0x11 - - int perc_mode; /* No longer supported */ - int nr_voices; - int nr_drums; /* Obsolete field */ - int instr_bank_size; - unsigned int capabilities; -#define SYNTH_CAP_PERCMODE 0x00000001 /* No longer used */ -#define SYNTH_CAP_OPL3 0x00000002 /* Set if OPL3 supported */ -#define SYNTH_CAP_INPUT 0x00000004 /* Input (MIDI) device */ - int dummies[19]; /* Reserve space */ - }; - -struct sound_timer_info { - char name[32]; - int caps; - }; - -#define MIDI_CAP_MPU401 1 /* MPU-401 intelligent mode */ - -struct midi_info { - char name[30]; - int device; /* 0-N. INITIALIZE BEFORE CALLING */ - unsigned int capabilities; /* To be defined later */ - int dev_type; - int dummies[18]; /* Reserve space */ - }; - -/******************************************** - * ioctl commands for the /dev/midi## - */ -typedef struct { - unsigned char cmd; - char nr_args, nr_returns; - unsigned char data[30]; - } mpu_command_rec; - -#define SNDCTL_MIDI_PRETIME _SIOWR('m', 0, int) -#define SNDCTL_MIDI_MPUMODE _SIOWR('m', 1, int) -#define SNDCTL_MIDI_MPUCMD _SIOWR('m', 2, mpu_command_rec) - -/******************************************** - * IOCTL commands for /dev/dsp and /dev/audio - */ - -#define SNDCTL_DSP_RESET _SIO ('P', 0) -#define SNDCTL_DSP_SYNC _SIO ('P', 1) -#define SNDCTL_DSP_SPEED _SIOWR('P', 2, int) -#define SNDCTL_DSP_STEREO _SIOWR('P', 3, int) -#define SNDCTL_DSP_GETBLKSIZE _SIOWR('P', 4, int) -#define SNDCTL_DSP_SAMPLESIZE SNDCTL_DSP_SETFMT -#define SNDCTL_DSP_CHANNELS _SIOWR('P', 6, int) -#define SOUND_PCM_WRITE_CHANNELS SNDCTL_DSP_CHANNELS -#define SOUND_PCM_WRITE_FILTER _SIOWR('P', 7, int) -#define SNDCTL_DSP_POST _SIO ('P', 8) -#define SNDCTL_DSP_SUBDIVIDE _SIOWR('P', 9, int) -#define SNDCTL_DSP_SETFRAGMENT _SIOWR('P',10, int) - -/* Audio data formats (Note! U8=8 and S16_LE=16 for compatibility) */ -#define SNDCTL_DSP_GETFMTS _SIOR ('P',11, int) /* Returns a mask */ -#define SNDCTL_DSP_SETFMT _SIOWR('P',5, int) /* Selects ONE fmt*/ -# define AFMT_QUERY 0x00000000 /* Return current fmt */ -# define AFMT_MU_LAW 0x00000001 -# define AFMT_A_LAW 0x00000002 -# define AFMT_IMA_ADPCM 0x00000004 -# define AFMT_U8 0x00000008 -# define AFMT_S16_LE 0x00000010 /* Little endian signed 16*/ -# define AFMT_S16_BE 0x00000020 /* Big endian signed 16 */ -# define AFMT_S8 0x00000040 -# define AFMT_U16_LE 0x00000080 /* Little endian U16 */ -# define AFMT_U16_BE 0x00000100 /* Big endian U16 */ -# define AFMT_MPEG 0x00000200 /* MPEG (2) audio */ -# define AFMT_AC3 0x00000400 /* Dolby Digital AC3 */ - -/* - * Buffer status queries. - */ -typedef struct audio_buf_info { - int fragments; /* # of available fragments (partially usend ones not counted) */ - int fragstotal; /* Total # of fragments allocated */ - int fragsize; /* Size of a fragment in bytes */ - - int bytes; /* Available space in bytes (includes partially used fragments) */ - /* Note! 'bytes' could be more than fragments*fragsize */ - } audio_buf_info; - -#define SNDCTL_DSP_GETOSPACE _SIOR ('P',12, audio_buf_info) -#define SNDCTL_DSP_GETISPACE _SIOR ('P',13, audio_buf_info) -#define SNDCTL_DSP_NONBLOCK _SIO ('P',14) -#define SNDCTL_DSP_GETCAPS _SIOR ('P',15, int) -# define DSP_CAP_REVISION 0x000000ff /* Bits for revision level (0 to 255) */ -# define DSP_CAP_DUPLEX 0x00000100 /* Full duplex record/playback */ -# define DSP_CAP_REALTIME 0x00000200 /* Real time capability */ -# define DSP_CAP_BATCH 0x00000400 /* Device has some kind of */ - /* internal buffers which may */ - /* cause some delays and */ - /* decrease precision of timing */ -# define DSP_CAP_COPROC 0x00000800 /* Has a coprocessor */ - /* Sometimes it's a DSP */ - /* but usually not */ -# define DSP_CAP_TRIGGER 0x00001000 /* Supports SETTRIGGER */ -# define DSP_CAP_MMAP 0x00002000 /* Supports mmap() */ -# define DSP_CAP_MULTI 0x00004000 /* support multiple open */ -# define DSP_CAP_BIND 0x00008000 /* channel binding to front/rear/cneter/lfe */ - - -#define SNDCTL_DSP_GETTRIGGER _SIOR ('P',16, int) -#define SNDCTL_DSP_SETTRIGGER _SIOW ('P',16, int) -# define PCM_ENABLE_INPUT 0x00000001 -# define PCM_ENABLE_OUTPUT 0x00000002 - -typedef struct count_info { - int bytes; /* Total # of bytes processed */ - int blocks; /* # of fragment transitions since last time */ - int ptr; /* Current DMA pointer value */ - } count_info; - -#define SNDCTL_DSP_GETIPTR _SIOR ('P',17, count_info) -#define SNDCTL_DSP_GETOPTR _SIOR ('P',18, count_info) - -typedef struct buffmem_desc { - unsigned *buffer; - int size; - } buffmem_desc; -#define SNDCTL_DSP_MAPINBUF _SIOR ('P', 19, buffmem_desc) -#define SNDCTL_DSP_MAPOUTBUF _SIOR ('P', 20, buffmem_desc) -#define SNDCTL_DSP_SETSYNCRO _SIO ('P', 21) -#define SNDCTL_DSP_SETDUPLEX _SIO ('P', 22) -#define SNDCTL_DSP_GETODELAY _SIOR ('P', 23, int) - -#define SNDCTL_DSP_GETCHANNELMASK _SIOWR('P', 64, int) -#define SNDCTL_DSP_BIND_CHANNEL _SIOWR('P', 65, int) -# define DSP_BIND_QUERY 0x00000000 -# define DSP_BIND_FRONT 0x00000001 -# define DSP_BIND_SURR 0x00000002 -# define DSP_BIND_CENTER_LFE 0x00000004 -# define DSP_BIND_HANDSET 0x00000008 -# define DSP_BIND_MIC 0x00000010 -# define DSP_BIND_MODEM1 0x00000020 -# define DSP_BIND_MODEM2 0x00000040 -# define DSP_BIND_I2S 0x00000080 -# define DSP_BIND_SPDIF 0x00000100 - -#define SNDCTL_DSP_SETSPDIF _SIOW ('P', 66, int) -#define SNDCTL_DSP_GETSPDIF _SIOR ('P', 67, int) -# define SPDIF_PRO 0x0001 -# define SPDIF_N_AUD 0x0002 -# define SPDIF_COPY 0x0004 -# define SPDIF_PRE 0x0008 -# define SPDIF_CC 0x07f0 -# define SPDIF_L 0x0800 -# define SPDIF_DRS 0x4000 -# define SPDIF_V 0x8000 - -/* - * Application's profile defines the way how playback underrun situations should be handled. - * - * APF_NORMAL (the default) and APF_NETWORK make the driver to cleanup the - * playback buffer whenever an underrun occurs. This consumes some time - * prevents looping the existing buffer. - * APF_CPUINTENS is intended to be set by CPU intensive applications which - * are likely to run out of time occasionally. In this mode the buffer cleanup is - * disabled which saves CPU time but also let's the previous buffer content to - * be played during the "pause" after the underrun. - */ -#define SNDCTL_DSP_PROFILE _SIOW ('P', 23, int) -#define APF_NORMAL 0 /* Normal applications */ -#define APF_NETWORK 1 /* Underruns probably caused by an "external" delay */ -#define APF_CPUINTENS 2 /* Underruns probably caused by "overheating" the CPU */ - -#define SOUND_PCM_READ_RATE _SIOR ('P', 2, int) -#define SOUND_PCM_READ_CHANNELS _SIOR ('P', 6, int) -#define SOUND_PCM_READ_BITS _SIOR ('P', 5, int) -#define SOUND_PCM_READ_FILTER _SIOR ('P', 7, int) - -/* Some alias names */ -#define SOUND_PCM_WRITE_BITS SNDCTL_DSP_SETFMT -#define SOUND_PCM_WRITE_RATE SNDCTL_DSP_SPEED -#define SOUND_PCM_POST SNDCTL_DSP_POST -#define SOUND_PCM_RESET SNDCTL_DSP_RESET -#define SOUND_PCM_SYNC SNDCTL_DSP_SYNC -#define SOUND_PCM_SUBDIVIDE SNDCTL_DSP_SUBDIVIDE -#define SOUND_PCM_SETFRAGMENT SNDCTL_DSP_SETFRAGMENT -#define SOUND_PCM_GETFMTS SNDCTL_DSP_GETFMTS -#define SOUND_PCM_SETFMT SNDCTL_DSP_SETFMT -#define SOUND_PCM_GETOSPACE SNDCTL_DSP_GETOSPACE -#define SOUND_PCM_GETISPACE SNDCTL_DSP_GETISPACE -#define SOUND_PCM_NONBLOCK SNDCTL_DSP_NONBLOCK -#define SOUND_PCM_GETCAPS SNDCTL_DSP_GETCAPS -#define SOUND_PCM_GETTRIGGER SNDCTL_DSP_GETTRIGGER -#define SOUND_PCM_SETTRIGGER SNDCTL_DSP_SETTRIGGER -#define SOUND_PCM_SETSYNCRO SNDCTL_DSP_SETSYNCRO -#define SOUND_PCM_GETIPTR SNDCTL_DSP_GETIPTR -#define SOUND_PCM_GETOPTR SNDCTL_DSP_GETOPTR -#define SOUND_PCM_MAPINBUF SNDCTL_DSP_MAPINBUF -#define SOUND_PCM_MAPOUTBUF SNDCTL_DSP_MAPOUTBUF - -/* - * ioctl calls to be used in communication with coprocessors and - * DSP chips. - */ - -typedef struct copr_buffer { - int command; /* Set to 0 if not used */ - int flags; -#define CPF_NONE 0x0000 -#define CPF_FIRST 0x0001 /* First block */ -#define CPF_LAST 0x0002 /* Last block */ - int len; - int offs; /* If required by the device (0 if not used) */ - - unsigned char data[4000]; /* NOTE! 4000 is not 4k */ - } copr_buffer; - -typedef struct copr_debug_buf { - int command; /* Used internally. Set to 0 */ - int parm1; - int parm2; - int flags; - int len; /* Length of data in bytes */ - } copr_debug_buf; - -typedef struct copr_msg { - int len; - unsigned char data[4000]; - } copr_msg; - -#define SNDCTL_COPR_RESET _SIO ('C', 0) -#define SNDCTL_COPR_LOAD _SIOWR('C', 1, copr_buffer) -#define SNDCTL_COPR_RDATA _SIOWR('C', 2, copr_debug_buf) -#define SNDCTL_COPR_RCODE _SIOWR('C', 3, copr_debug_buf) -#define SNDCTL_COPR_WDATA _SIOW ('C', 4, copr_debug_buf) -#define SNDCTL_COPR_WCODE _SIOW ('C', 5, copr_debug_buf) -#define SNDCTL_COPR_RUN _SIOWR('C', 6, copr_debug_buf) -#define SNDCTL_COPR_HALT _SIOWR('C', 7, copr_debug_buf) -#define SNDCTL_COPR_SENDMSG _SIOWR('C', 8, copr_msg) -#define SNDCTL_COPR_RCVMSG _SIOR ('C', 9, copr_msg) - -/********************************************* - * IOCTL commands for /dev/mixer - */ - -/* - * Mixer devices - * - * There can be up to 20 different analog mixer channels. The - * SOUND_MIXER_NRDEVICES gives the currently supported maximum. - * The SOUND_MIXER_READ_DEVMASK returns a bitmask which tells - * the devices supported by the particular mixer. - */ - -#define SOUND_MIXER_NRDEVICES 25 -#define SOUND_MIXER_VOLUME 0 -#define SOUND_MIXER_BASS 1 -#define SOUND_MIXER_TREBLE 2 -#define SOUND_MIXER_SYNTH 3 -#define SOUND_MIXER_PCM 4 -#define SOUND_MIXER_SPEAKER 5 -#define SOUND_MIXER_LINE 6 -#define SOUND_MIXER_MIC 7 -#define SOUND_MIXER_CD 8 -#define SOUND_MIXER_IMIX 9 /* Recording monitor */ -#define SOUND_MIXER_ALTPCM 10 -#define SOUND_MIXER_RECLEV 11 /* Recording level */ -#define SOUND_MIXER_IGAIN 12 /* Input gain */ -#define SOUND_MIXER_OGAIN 13 /* Output gain */ -/* - * The AD1848 codec and compatibles have three line level inputs - * (line, aux1 and aux2). Since each card manufacturer have assigned - * different meanings to these inputs, it's inpractical to assign - * specific meanings (line, cd, synth etc.) to them. - */ -#define SOUND_MIXER_LINE1 14 /* Input source 1 (aux1) */ -#define SOUND_MIXER_LINE2 15 /* Input source 2 (aux2) */ -#define SOUND_MIXER_LINE3 16 /* Input source 3 (line) */ -#define SOUND_MIXER_DIGITAL1 17 /* Digital (input) 1 */ -#define SOUND_MIXER_DIGITAL2 18 /* Digital (input) 2 */ -#define SOUND_MIXER_DIGITAL3 19 /* Digital (input) 3 */ -#define SOUND_MIXER_PHONEIN 20 /* Phone input */ -#define SOUND_MIXER_PHONEOUT 21 /* Phone output */ -#define SOUND_MIXER_VIDEO 22 /* Video/TV (audio) in */ -#define SOUND_MIXER_RADIO 23 /* Radio in */ -#define SOUND_MIXER_MONITOR 24 /* Monitor (usually mic) volume */ - -/* Some on/off settings (SOUND_SPECIAL_MIN - SOUND_SPECIAL_MAX) */ -/* Not counted to SOUND_MIXER_NRDEVICES, but use the same number space */ -#define SOUND_ONOFF_MIN 28 -#define SOUND_ONOFF_MAX 30 - -/* Note! Number 31 cannot be used since the sign bit is reserved */ -#define SOUND_MIXER_NONE 31 - -/* - * The following unsupported macros are no longer functional. - * Use SOUND_MIXER_PRIVATE# macros in future. - */ -#define SOUND_MIXER_ENHANCE SOUND_MIXER_NONE -#define SOUND_MIXER_MUTE SOUND_MIXER_NONE -#define SOUND_MIXER_LOUD SOUND_MIXER_NONE - - -#define SOUND_DEVICE_LABELS {"Vol ", "Bass ", "Trebl", "Synth", "Pcm ", "Spkr ", "Line ", \ - "Mic ", "CD ", "Mix ", "Pcm2 ", "Rec ", "IGain", "OGain", \ - "Line1", "Line2", "Line3", "Digital1", "Digital2", "Digital3", \ - "PhoneIn", "PhoneOut", "Video", "Radio", "Monitor"} - -#define SOUND_DEVICE_NAMES {"vol", "bass", "treble", "synth", "pcm", "speaker", "line", \ - "mic", "cd", "mix", "pcm2", "rec", "igain", "ogain", \ - "line1", "line2", "line3", "dig1", "dig2", "dig3", \ - "phin", "phout", "video", "radio", "monitor"} - -/* Device bitmask identifiers */ - -#define SOUND_MIXER_RECSRC 0xff /* Arg contains a bit for each recording source */ -#define SOUND_MIXER_DEVMASK 0xfe /* Arg contains a bit for each supported device */ -#define SOUND_MIXER_RECMASK 0xfd /* Arg contains a bit for each supported recording source */ -#define SOUND_MIXER_CAPS 0xfc -# define SOUND_CAP_EXCL_INPUT 0x00000001 /* Only one recording source at a time */ -#define SOUND_MIXER_STEREODEVS 0xfb /* Mixer channels supporting stereo */ -#define SOUND_MIXER_OUTSRC 0xfa /* Arg contains a bit for each input source to output */ -#define SOUND_MIXER_OUTMASK 0xf9 /* Arg contains a bit for each supported input source to output */ - -/* Device mask bits */ - -#define SOUND_MASK_VOLUME (1 << SOUND_MIXER_VOLUME) -#define SOUND_MASK_BASS (1 << SOUND_MIXER_BASS) -#define SOUND_MASK_TREBLE (1 << SOUND_MIXER_TREBLE) -#define SOUND_MASK_SYNTH (1 << SOUND_MIXER_SYNTH) -#define SOUND_MASK_PCM (1 << SOUND_MIXER_PCM) -#define SOUND_MASK_SPEAKER (1 << SOUND_MIXER_SPEAKER) -#define SOUND_MASK_LINE (1 << SOUND_MIXER_LINE) -#define SOUND_MASK_MIC (1 << SOUND_MIXER_MIC) -#define SOUND_MASK_CD (1 << SOUND_MIXER_CD) -#define SOUND_MASK_IMIX (1 << SOUND_MIXER_IMIX) -#define SOUND_MASK_ALTPCM (1 << SOUND_MIXER_ALTPCM) -#define SOUND_MASK_RECLEV (1 << SOUND_MIXER_RECLEV) -#define SOUND_MASK_IGAIN (1 << SOUND_MIXER_IGAIN) -#define SOUND_MASK_OGAIN (1 << SOUND_MIXER_OGAIN) -#define SOUND_MASK_LINE1 (1 << SOUND_MIXER_LINE1) -#define SOUND_MASK_LINE2 (1 << SOUND_MIXER_LINE2) -#define SOUND_MASK_LINE3 (1 << SOUND_MIXER_LINE3) -#define SOUND_MASK_DIGITAL1 (1 << SOUND_MIXER_DIGITAL1) -#define SOUND_MASK_DIGITAL2 (1 << SOUND_MIXER_DIGITAL2) -#define SOUND_MASK_DIGITAL3 (1 << SOUND_MIXER_DIGITAL3) -#define SOUND_MASK_PHONEIN (1 << SOUND_MIXER_PHONEIN) -#define SOUND_MASK_PHONEOUT (1 << SOUND_MIXER_PHONEOUT) -#define SOUND_MASK_RADIO (1 << SOUND_MIXER_RADIO) -#define SOUND_MASK_VIDEO (1 << SOUND_MIXER_VIDEO) -#define SOUND_MASK_MONITOR (1 << SOUND_MIXER_MONITOR) - -/* Obsolete macros */ -#define SOUND_MASK_MUTE (1 << SOUND_MIXER_MUTE) -#define SOUND_MASK_ENHANCE (1 << SOUND_MIXER_ENHANCE) -#define SOUND_MASK_LOUD (1 << SOUND_MIXER_LOUD) - -#define MIXER_READ(dev) _SIOR('M', dev, int) -#define SOUND_MIXER_READ_VOLUME MIXER_READ(SOUND_MIXER_VOLUME) -#define SOUND_MIXER_READ_BASS MIXER_READ(SOUND_MIXER_BASS) -#define SOUND_MIXER_READ_TREBLE MIXER_READ(SOUND_MIXER_TREBLE) -#define SOUND_MIXER_READ_SYNTH MIXER_READ(SOUND_MIXER_SYNTH) -#define SOUND_MIXER_READ_PCM MIXER_READ(SOUND_MIXER_PCM) -#define SOUND_MIXER_READ_SPEAKER MIXER_READ(SOUND_MIXER_SPEAKER) -#define SOUND_MIXER_READ_LINE MIXER_READ(SOUND_MIXER_LINE) -#define SOUND_MIXER_READ_MIC MIXER_READ(SOUND_MIXER_MIC) -#define SOUND_MIXER_READ_CD MIXER_READ(SOUND_MIXER_CD) -#define SOUND_MIXER_READ_IMIX MIXER_READ(SOUND_MIXER_IMIX) -#define SOUND_MIXER_READ_ALTPCM MIXER_READ(SOUND_MIXER_ALTPCM) -#define SOUND_MIXER_READ_RECLEV MIXER_READ(SOUND_MIXER_RECLEV) -#define SOUND_MIXER_READ_IGAIN MIXER_READ(SOUND_MIXER_IGAIN) -#define SOUND_MIXER_READ_OGAIN MIXER_READ(SOUND_MIXER_OGAIN) -#define SOUND_MIXER_READ_LINE1 MIXER_READ(SOUND_MIXER_LINE1) -#define SOUND_MIXER_READ_LINE2 MIXER_READ(SOUND_MIXER_LINE2) -#define SOUND_MIXER_READ_LINE3 MIXER_READ(SOUND_MIXER_LINE3) - -/* Obsolete macros */ -#define SOUND_MIXER_READ_MUTE MIXER_READ(SOUND_MIXER_MUTE) -#define SOUND_MIXER_READ_ENHANCE MIXER_READ(SOUND_MIXER_ENHANCE) -#define SOUND_MIXER_READ_LOUD MIXER_READ(SOUND_MIXER_LOUD) - -#define SOUND_MIXER_READ_RECSRC MIXER_READ(SOUND_MIXER_RECSRC) -#define SOUND_MIXER_READ_DEVMASK MIXER_READ(SOUND_MIXER_DEVMASK) -#define SOUND_MIXER_READ_RECMASK MIXER_READ(SOUND_MIXER_RECMASK) -#define SOUND_MIXER_READ_STEREODEVS MIXER_READ(SOUND_MIXER_STEREODEVS) -#define SOUND_MIXER_READ_CAPS MIXER_READ(SOUND_MIXER_CAPS) - -#define MIXER_WRITE(dev) _SIOWR('M', dev, int) -#define SOUND_MIXER_WRITE_VOLUME MIXER_WRITE(SOUND_MIXER_VOLUME) -#define SOUND_MIXER_WRITE_BASS MIXER_WRITE(SOUND_MIXER_BASS) -#define SOUND_MIXER_WRITE_TREBLE MIXER_WRITE(SOUND_MIXER_TREBLE) -#define SOUND_MIXER_WRITE_SYNTH MIXER_WRITE(SOUND_MIXER_SYNTH) -#define SOUND_MIXER_WRITE_PCM MIXER_WRITE(SOUND_MIXER_PCM) -#define SOUND_MIXER_WRITE_SPEAKER MIXER_WRITE(SOUND_MIXER_SPEAKER) -#define SOUND_MIXER_WRITE_LINE MIXER_WRITE(SOUND_MIXER_LINE) -#define SOUND_MIXER_WRITE_MIC MIXER_WRITE(SOUND_MIXER_MIC) -#define SOUND_MIXER_WRITE_CD MIXER_WRITE(SOUND_MIXER_CD) -#define SOUND_MIXER_WRITE_IMIX MIXER_WRITE(SOUND_MIXER_IMIX) -#define SOUND_MIXER_WRITE_ALTPCM MIXER_WRITE(SOUND_MIXER_ALTPCM) -#define SOUND_MIXER_WRITE_RECLEV MIXER_WRITE(SOUND_MIXER_RECLEV) -#define SOUND_MIXER_WRITE_IGAIN MIXER_WRITE(SOUND_MIXER_IGAIN) -#define SOUND_MIXER_WRITE_OGAIN MIXER_WRITE(SOUND_MIXER_OGAIN) -#define SOUND_MIXER_WRITE_LINE1 MIXER_WRITE(SOUND_MIXER_LINE1) -#define SOUND_MIXER_WRITE_LINE2 MIXER_WRITE(SOUND_MIXER_LINE2) -#define SOUND_MIXER_WRITE_LINE3 MIXER_WRITE(SOUND_MIXER_LINE3) - -/* Obsolete macros */ -#define SOUND_MIXER_WRITE_MUTE MIXER_WRITE(SOUND_MIXER_MUTE) -#define SOUND_MIXER_WRITE_ENHANCE MIXER_WRITE(SOUND_MIXER_ENHANCE) -#define SOUND_MIXER_WRITE_LOUD MIXER_WRITE(SOUND_MIXER_LOUD) - -#define SOUND_MIXER_WRITE_RECSRC MIXER_WRITE(SOUND_MIXER_RECSRC) - -typedef struct mixer_info -{ - char id[16]; - char name[32]; - int modify_counter; - int fillers[10]; -} mixer_info; - -typedef struct _old_mixer_info /* Obsolete */ -{ - char id[16]; - char name[32]; -} _old_mixer_info; - -#define SOUND_MIXER_INFO _SIOR ('M', 101, mixer_info) -#define SOUND_OLD_MIXER_INFO _SIOR ('M', 101, _old_mixer_info) - -/* - * A mechanism for accessing "proprietary" mixer features. This method - * permits passing 128 bytes of arbitrary data between a mixer application - * and the mixer driver. Interpretation of the record is defined by - * the particular mixer driver. - */ -typedef unsigned char mixer_record[128]; - -#define SOUND_MIXER_ACCESS _SIOWR('M', 102, mixer_record) - -/* - * Two ioctls for special souncard function - */ -#define SOUND_MIXER_AGC _SIOWR('M', 103, int) -#define SOUND_MIXER_3DSE _SIOWR('M', 104, int) - -/* - * The SOUND_MIXER_PRIVATE# commands can be redefined by low level drivers. - * These features can be used when accessing device specific features. - */ -#define SOUND_MIXER_PRIVATE1 _SIOWR('M', 111, int) -#define SOUND_MIXER_PRIVATE2 _SIOWR('M', 112, int) -#define SOUND_MIXER_PRIVATE3 _SIOWR('M', 113, int) -#define SOUND_MIXER_PRIVATE4 _SIOWR('M', 114, int) -#define SOUND_MIXER_PRIVATE5 _SIOWR('M', 115, int) - -/* - * SOUND_MIXER_GETLEVELS and SOUND_MIXER_SETLEVELS calls can be used - * for querying current mixer settings from the driver and for loading - * default volume settings _prior_ activating the mixer (loading - * doesn't affect current state of the mixer hardware). These calls - * are for internal use only. - */ - -typedef struct mixer_vol_table { - int num; /* Index to volume table */ - char name[32]; - int levels[32]; -} mixer_vol_table; - -#define SOUND_MIXER_GETLEVELS _SIOWR('M', 116, mixer_vol_table) -#define SOUND_MIXER_SETLEVELS _SIOWR('M', 117, mixer_vol_table) - -/* - * An ioctl for identifying the driver version. It will return value - * of the SOUND_VERSION macro used when compiling the driver. - * This call was introduced in OSS version 3.6 and it will not work - * with earlier versions (returns EINVAL). - */ -#define OSS_GETVERSION _SIOR ('M', 118, int) - -/* - * Level 2 event types for /dev/sequencer - */ - -/* - * The 4 most significant bits of byte 0 specify the class of - * the event: - * - * 0x8X = system level events, - * 0x9X = device/port specific events, event[1] = device/port, - * The last 4 bits give the subtype: - * 0x02 = Channel event (event[3] = chn). - * 0x01 = note event (event[4] = note). - * (0x01 is not used alone but always with bit 0x02). - * event[2] = MIDI message code (0x80=note off etc.) - * - */ - -#define EV_SEQ_LOCAL 0x80 -#define EV_TIMING 0x81 -#define EV_CHN_COMMON 0x92 -#define EV_CHN_VOICE 0x93 -#define EV_SYSEX 0x94 -/* - * Event types 200 to 220 are reserved for application use. - * These numbers will not be used by the driver. - */ - -/* - * Events for event type EV_CHN_VOICE - */ - -#define MIDI_NOTEOFF 0x80 -#define MIDI_NOTEON 0x90 -#define MIDI_KEY_PRESSURE 0xA0 - -/* - * Events for event type EV_CHN_COMMON - */ - -#define MIDI_CTL_CHANGE 0xB0 -#define MIDI_PGM_CHANGE 0xC0 -#define MIDI_CHN_PRESSURE 0xD0 -#define MIDI_PITCH_BEND 0xE0 - -#define MIDI_SYSTEM_PREFIX 0xF0 - -/* - * Timer event types - */ -#define TMR_WAIT_REL 1 /* Time relative to the prev time */ -#define TMR_WAIT_ABS 2 /* Absolute time since TMR_START */ -#define TMR_STOP 3 -#define TMR_START 4 -#define TMR_CONTINUE 5 -#define TMR_TEMPO 6 -#define TMR_ECHO 8 -#define TMR_CLOCK 9 /* MIDI clock */ -#define TMR_SPP 10 /* Song position pointer */ -#define TMR_TIMESIG 11 /* Time signature */ - -/* - * Local event types - */ -#define LOCL_STARTAUDIO 1 - -#if (!defined(__KERNEL__) && !defined(KERNEL) && !defined(INKERNEL) && !defined(_KERNEL)) || defined(USE_SEQ_MACROS) -/* - * Some convenience macros to simplify programming of the - * /dev/sequencer interface - * - * These macros define the API which should be used when possible. - */ -#define SEQ_DECLAREBUF() SEQ_USE_EXTBUF() - -void seqbuf_dump(void); /* This function must be provided by programs */ - -extern int OSS_init(int seqfd, int buflen); -extern void OSS_seqbuf_dump(int fd, unsigned char *buf, int buflen); -extern void OSS_seq_advbuf(int len, int fd, unsigned char *buf, int buflen); -extern void OSS_seq_needbuf(int len, int fd, unsigned char *buf, int buflen); -extern void OSS_patch_caching(int dev, int chn, int patch, - int fd, unsigned char *buf, int buflen); -extern void OSS_drum_caching(int dev, int chn, int patch, - int fd, unsigned char *buf, int buflen); -extern void OSS_write_patch(int fd, unsigned char *buf, int len); -extern int OSS_write_patch2(int fd, unsigned char *buf, int len); - -#define SEQ_PM_DEFINES int __foo_bar___ -#ifdef OSSLIB -# define SEQ_USE_EXTBUF() \ - extern unsigned char *_seqbuf; \ - extern int _seqbuflen;extern int _seqbufptr -# define SEQ_DEFINEBUF(len) SEQ_USE_EXTBUF();static int _requested_seqbuflen=len -# define _SEQ_ADVBUF(len) OSS_seq_advbuf(len, seqfd, _seqbuf, _seqbuflen) -# define _SEQ_NEEDBUF(len) OSS_seq_needbuf(len, seqfd, _seqbuf, _seqbuflen) -# define SEQ_DUMPBUF() OSS_seqbuf_dump(seqfd, _seqbuf, _seqbuflen) - -# define SEQ_LOAD_GMINSTR(dev, instr) \ - OSS_patch_caching(dev, -1, instr, seqfd, _seqbuf, _seqbuflen) -# define SEQ_LOAD_GMDRUM(dev, drum) \ - OSS_drum_caching(dev, -1, drum, seqfd, _seqbuf, _seqbuflen) -#else /* !OSSLIB */ - -# define SEQ_LOAD_GMINSTR(dev, instr) -# define SEQ_LOAD_GMDRUM(dev, drum) - -# define SEQ_USE_EXTBUF() \ - extern unsigned char _seqbuf[]; \ - extern int _seqbuflen;extern int _seqbufptr - -#ifndef USE_SIMPLE_MACROS -/* Sample seqbuf_dump() implementation: - * - * SEQ_DEFINEBUF (2048); -- Defines a buffer for 2048 bytes - * - * int seqfd; -- The file descriptor for /dev/sequencer. - * - * void - * seqbuf_dump () - * { - * if (_seqbufptr) - * if (write (seqfd, _seqbuf, _seqbufptr) == -1) - * { - * perror ("write /dev/sequencer"); - * exit (-1); - * } - * _seqbufptr = 0; - * } - */ - -#define SEQ_DEFINEBUF(len) unsigned char _seqbuf[len]; int _seqbuflen = len;int _seqbufptr = 0 -#define _SEQ_NEEDBUF(len) if ((_seqbufptr+(len)) > _seqbuflen) seqbuf_dump() -#define _SEQ_ADVBUF(len) _seqbufptr += len -#define SEQ_DUMPBUF seqbuf_dump -#else -/* - * This variation of the sequencer macros is used just to format one event - * using fixed buffer. - * - * The program using the macro library must define the following macros before - * using this library. - * - * #define _seqbuf name of the buffer (unsigned char[]) - * #define _SEQ_ADVBUF(len) If the applic needs to know the exact - * size of the event, this macro can be used. - * Otherwise this must be defined as empty. - * #define _seqbufptr Define the name of index variable or 0 if - * not required. - */ -#define _SEQ_NEEDBUF(len) /* empty */ -#endif -#endif /* !OSSLIB */ - -#define SEQ_VOLUME_MODE(dev, mode) {_SEQ_NEEDBUF(8);\ - _seqbuf[_seqbufptr] = SEQ_EXTENDED;\ - _seqbuf[_seqbufptr+1] = SEQ_VOLMODE;\ - _seqbuf[_seqbufptr+2] = (dev);\ - _seqbuf[_seqbufptr+3] = (mode);\ - _seqbuf[_seqbufptr+4] = 0;\ - _seqbuf[_seqbufptr+5] = 0;\ - _seqbuf[_seqbufptr+6] = 0;\ - _seqbuf[_seqbufptr+7] = 0;\ - _SEQ_ADVBUF(8);} - -/* - * Midi voice messages - */ - -#define _CHN_VOICE(dev, event, chn, note, parm) \ - {_SEQ_NEEDBUF(8);\ - _seqbuf[_seqbufptr] = EV_CHN_VOICE;\ - _seqbuf[_seqbufptr+1] = (dev);\ - _seqbuf[_seqbufptr+2] = (event);\ - _seqbuf[_seqbufptr+3] = (chn);\ - _seqbuf[_seqbufptr+4] = (note);\ - _seqbuf[_seqbufptr+5] = (parm);\ - _seqbuf[_seqbufptr+6] = (0);\ - _seqbuf[_seqbufptr+7] = 0;\ - _SEQ_ADVBUF(8);} - -#define SEQ_START_NOTE(dev, chn, note, vol) \ - _CHN_VOICE(dev, MIDI_NOTEON, chn, note, vol) - -#define SEQ_STOP_NOTE(dev, chn, note, vol) \ - _CHN_VOICE(dev, MIDI_NOTEOFF, chn, note, vol) - -#define SEQ_KEY_PRESSURE(dev, chn, note, pressure) \ - _CHN_VOICE(dev, MIDI_KEY_PRESSURE, chn, note, pressure) - -/* - * Midi channel messages - */ - -#define _CHN_COMMON(dev, event, chn, p1, p2, w14) \ - {_SEQ_NEEDBUF(8);\ - _seqbuf[_seqbufptr] = EV_CHN_COMMON;\ - _seqbuf[_seqbufptr+1] = (dev);\ - _seqbuf[_seqbufptr+2] = (event);\ - _seqbuf[_seqbufptr+3] = (chn);\ - _seqbuf[_seqbufptr+4] = (p1);\ - _seqbuf[_seqbufptr+5] = (p2);\ - *(short *)&_seqbuf[_seqbufptr+6] = (w14);\ - _SEQ_ADVBUF(8);} -/* - * SEQ_SYSEX permits sending of sysex messages. (It may look that it permits - * sending any MIDI bytes but it's absolutely not possible. Trying to do - * so _will_ cause problems with MPU401 intelligent mode). - * - * Sysex messages are sent in blocks of 1 to 6 bytes. Longer messages must be - * sent by calling SEQ_SYSEX() several times (there must be no other events - * between them). First sysex fragment must have 0xf0 in the first byte - * and the last byte (buf[len-1] of the last fragment must be 0xf7. No byte - * between these sysex start and end markers cannot be larger than 0x7f. Also - * lengths of each fragments (except the last one) must be 6. - * - * Breaking the above rules may work with some MIDI ports but is likely to - * cause fatal problems with some other devices (such as MPU401). - */ -#define SEQ_SYSEX(dev, buf, len) \ - {int ii, ll=(len); \ - unsigned char *bufp=buf;\ - if (ll>6)ll=6;\ - _SEQ_NEEDBUF(8);\ - _seqbuf[_seqbufptr] = EV_SYSEX;\ - _seqbuf[_seqbufptr+1] = (dev);\ - for(ii=0;ii>8)&0xff);\ - _seqbuf[_seqbufptr+7] = 0;\ - _SEQ_ADVBUF(8);} -/* - * The following 5 macros are incorrectly implemented and obsolete. - * Use SEQ_BENDER and SEQ_CONTROL (with proper controller) instead. - */ -#define SEQ_PITCHBEND(dev, voice, value) SEQ_V2_X_CONTROL(dev, voice, CTRL_PITCH_BENDER, value) -#define SEQ_BENDER_RANGE(dev, voice, value) SEQ_V2_X_CONTROL(dev, voice, CTRL_PITCH_BENDER_RANGE, value) -#define SEQ_EXPRESSION(dev, voice, value) SEQ_CONTROL(dev, voice, CTL_EXPRESSION, value*128) -#define SEQ_MAIN_VOLUME(dev, voice, value) SEQ_CONTROL(dev, voice, CTL_MAIN_VOLUME, (value*16383)/100) -#define SEQ_PANNING(dev, voice, pos) SEQ_CONTROL(dev, voice, CTL_PAN, (pos+128) / 2) - -/* - * Timing and syncronization macros - */ - -#define _TIMER_EVENT(ev, parm) {_SEQ_NEEDBUF(8);\ - _seqbuf[_seqbufptr+0] = EV_TIMING; \ - _seqbuf[_seqbufptr+1] = (ev); \ - _seqbuf[_seqbufptr+2] = 0;\ - _seqbuf[_seqbufptr+3] = 0;\ - *(unsigned int *)&_seqbuf[_seqbufptr+4] = (parm); \ - _SEQ_ADVBUF(8);} - -#define SEQ_START_TIMER() _TIMER_EVENT(TMR_START, 0) -#define SEQ_STOP_TIMER() _TIMER_EVENT(TMR_STOP, 0) -#define SEQ_CONTINUE_TIMER() _TIMER_EVENT(TMR_CONTINUE, 0) -#define SEQ_WAIT_TIME(ticks) _TIMER_EVENT(TMR_WAIT_ABS, ticks) -#define SEQ_DELTA_TIME(ticks) _TIMER_EVENT(TMR_WAIT_REL, ticks) -#define SEQ_ECHO_BACK(key) _TIMER_EVENT(TMR_ECHO, key) -#define SEQ_SET_TEMPO(value) _TIMER_EVENT(TMR_TEMPO, value) -#define SEQ_SONGPOS(pos) _TIMER_EVENT(TMR_SPP, pos) -#define SEQ_TIME_SIGNATURE(sig) _TIMER_EVENT(TMR_TIMESIG, sig) - -/* - * Local control events - */ - -#define _LOCAL_EVENT(ev, parm) {_SEQ_NEEDBUF(8);\ - _seqbuf[_seqbufptr+0] = EV_SEQ_LOCAL; \ - _seqbuf[_seqbufptr+1] = (ev); \ - _seqbuf[_seqbufptr+2] = 0;\ - _seqbuf[_seqbufptr+3] = 0;\ - *(unsigned int *)&_seqbuf[_seqbufptr+4] = (parm); \ - _SEQ_ADVBUF(8);} - -#define SEQ_PLAYAUDIO(devmask) _LOCAL_EVENT(LOCL_STARTAUDIO, devmask) -/* - * Events for the level 1 interface only - */ - -#define SEQ_MIDIOUT(device, byte) {_SEQ_NEEDBUF(4);\ - _seqbuf[_seqbufptr] = SEQ_MIDIPUTC;\ - _seqbuf[_seqbufptr+1] = (byte);\ - _seqbuf[_seqbufptr+2] = (device);\ - _seqbuf[_seqbufptr+3] = 0;\ - _SEQ_ADVBUF(4);} - -/* - * Patch loading. - */ -#ifdef OSSLIB -# define SEQ_WRPATCH(patchx, len) \ - OSS_write_patch(seqfd, (char*)(patchx), len) -# define SEQ_WRPATCH2(patchx, len) \ - OSS_write_patch2(seqfd, (char*)(patchx), len) -#else -# define SEQ_WRPATCH(patchx, len) \ - {if (_seqbufptr) SEQ_DUMPBUF();\ - if (write(seqfd, (char*)(patchx), len)==-1) \ - perror("Write patch: /dev/sequencer");} -# define SEQ_WRPATCH2(patchx, len) \ - (SEQ_DUMPBUF(), write(seqfd, (char*)(patchx), len)) -#endif - -#endif - -#endif diff --git a/mdk-stage1/dietlibc/include/sys/sparc-ioctl.h b/mdk-stage1/dietlibc/include/sys/sparc-ioctl.h deleted file mode 100644 index 07b502465..000000000 --- a/mdk-stage1/dietlibc/include/sys/sparc-ioctl.h +++ /dev/null @@ -1,172 +0,0 @@ -#define _IOC_NRBITS 8 -#define _IOC_TYPEBITS 8 -#define _IOC_SIZEBITS 8 -#define _IOC_RESVBITS 5 -#define _IOC_DIRBITS 3 - -#define _IOC_NRMASK ((1 << _IOC_NRBITS)-1) -#define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1) -#define _IOC_RESVMASK ((1 << _IOC_RESVBITS)-1) -#define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1) -#define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1) - -#define _IOC_NRSHIFT 0 -#define _IOC_TYPESHIFT (_IOC_NRSHIFT + _IOC_NRBITS) -#define _IOC_SIZESHIFT (_IOC_TYPESHIFT + _IOC_TYPEBITS) -#define _IOC_RESVSHIFT (_IOC_SIZESHIFT + _IOC_SIZEBITS) -#define _IOC_DIRSHIFT (_IOC_RESVSHIFT + _IOC_RESVBITS) - -#define _IOC_NONE 1U -#define _IOC_READ 2U -#define _IOC_WRITE 4U - -#define _IOC(dir,type,nr,size) \ - (((dir) << _IOC_DIRSHIFT) | \ - ((type) << _IOC_TYPESHIFT) | \ - ((nr) << _IOC_NRSHIFT) | \ - ((size) << _IOC_SIZESHIFT)) - -#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0) -#define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size)) -#define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size)) -#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size)) - -#define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) -#define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK) -#define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK) -#define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK) - -/* ...and for the PCMCIA... */ - -#define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT) -#define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT) -#define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT) -#define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT) -#define IOCSIZE_SHIFT (_IOC_SIZESHIFT) - -/* Big T */ -#define TCGETA _IOR('T', 1, struct termio) -#define TCSETA _IOW('T', 2, struct termio) -#define TCSETAW _IOW('T', 3, struct termio) -#define TCSETAF _IOW('T', 4, struct termio) -#define TCSBRK _IO('T', 5) -#define TCXONC _IO('T', 6) -#define TCFLSH _IO('T', 7) -#define TCGETS _IOR('T', 8, struct termios) -#define TCSETS _IOW('T', 9, struct termios) -#define TCSETSW _IOW('T', 10, struct termios) -#define TCSETSF _IOW('T', 11, struct termios) - -/* Note that all the ioctls that are not available in Linux have a - * double underscore on the front to: a) avoid some programs to - * thing we support some ioctls under Linux (autoconfiguration stuff) - */ -/* Little t */ -#define TIOCGETD _IOR('t', 0, int) -#define TIOCSETD _IOW('t', 1, int) -#define __TIOCHPCL _IO('t', 2) /* SunOS Specific */ -#define __TIOCMODG _IOR('t', 3, int) /* SunOS Specific */ -#define __TIOCMODS _IOW('t', 4, int) /* SunOS Specific */ -#define __TIOCGETP _IOR('t', 8, struct sgttyb) /* SunOS Specific */ -#define __TIOCSETP _IOW('t', 9, struct sgttyb) /* SunOS Specific */ -#define __TIOCSETN _IOW('t', 10, struct sgttyb) /* SunOS Specific */ -#define TIOCEXCL _IO('t', 13) -#define TIOCNXCL _IO('t', 14) -#define __TIOCFLUSH _IOW('t', 16, int) /* SunOS Specific */ -#define __TIOCSETC _IOW('t', 17, struct tchars) /* SunOS Specific */ -#define __TIOCGETC _IOR('t', 18, struct tchars) /* SunOS Specific */ -#define __TIOCTCNTL _IOW('t', 32, int) /* SunOS Specific */ -#define __TIOCSIGNAL _IOW('t', 33, int) /* SunOS Specific */ -#define __TIOCSETX _IOW('t', 34, int) /* SunOS Specific */ -#define __TIOCGETX _IOR('t', 35, int) /* SunOS Specific */ -#define TIOCCONS _IO('t', 36) -#define __TIOCSSIZE _IOW('t', 37, struct sunos_ttysize) /* SunOS Specific */ -#define __TIOCGSIZE _IOR('t', 38, struct sunos_ttysize) /* SunOS Specific */ -#define TIOCGSOFTCAR _IOR('t', 100, int) -#define TIOCSSOFTCAR _IOW('t', 101, int) -#define __TIOCUCNTL _IOW('t', 102, int) /* SunOS Specific */ -#define TIOCSWINSZ _IOW('t', 103, struct winsize) -#define TIOCGWINSZ _IOR('t', 104, struct winsize) -#define __TIOCREMOTE _IOW('t', 105, int) /* SunOS Specific */ -#define TIOCMGET _IOR('t', 106, int) -#define TIOCMBIC _IOW('t', 107, int) -#define TIOCMBIS _IOW('t', 108, int) -#define TIOCMSET _IOW('t', 109, int) -#define __TIOCSTART _IO('t', 110) /* SunOS Specific */ -#define __TIOCSTOP _IO('t', 111) /* SunOS Specific */ -#define TIOCPKT _IOW('t', 112, int) -#define TIOCNOTTY _IO('t', 113) -#define TIOCSTI _IOW('t', 114, char) -#define TIOCOUTQ _IOR('t', 115, int) -#define __TIOCGLTC _IOR('t', 116, struct ltchars) /* SunOS Specific */ -#define __TIOCSLTC _IOW('t', 117, struct ltchars) /* SunOS Specific */ -/* 118 is the non-posix setpgrp tty ioctl */ -/* 119 is the non-posix getpgrp tty ioctl */ -#define __TIOCCDTR _IO('t', 120) /* SunOS Specific */ -#define __TIOCSDTR _IO('t', 121) /* SunOS Specific */ -#define TIOCCBRK _IO('t', 122) -#define TIOCSBRK _IO('t', 123) -#define __TIOCLGET _IOW('t', 124, int) /* SunOS Specific */ -#define __TIOCLSET _IOW('t', 125, int) /* SunOS Specific */ -#define __TIOCLBIC _IOW('t', 126, int) /* SunOS Specific */ -#define __TIOCLBIS _IOW('t', 127, int) /* SunOS Specific */ -#define __TIOCISPACE _IOR('t', 128, int) /* SunOS Specific */ -#define __TIOCISIZE _IOR('t', 129, int) /* SunOS Specific */ -#define TIOCSPGRP _IOW('t', 130, int) -#define TIOCGPGRP _IOR('t', 131, int) -#define TIOCSCTTY _IO('t', 132) -#define TIOCGSID _IOR('t', 133, int) -/* Get minor device of a pty master's FD -- Solaris equiv is ISPTM */ -#define TIOCGPTN _IOR('t', 134, unsigned int) /* Get Pty Number */ -#define TIOCSPTLCK _IOW('t', 135, int) /* Lock/unlock PTY */ - -/* Little f */ -#define FIOCLEX _IO('f', 1) -#define FIONCLEX _IO('f', 2) -#define FIOASYNC _IOW('f', 125, int) -#define FIONBIO _IOW('f', 126, int) -#define FIONREAD _IOR('f', 127, int) -#define TIOCINQ FIONREAD -#define FIOQSIZE _IOR('f', 128, loff_t) - -/* SCARY Rutgers local SunOS kernel hackery, perhaps I will support it - * someday. This is completely bogus, I know... - */ -#define __TCGETSTAT _IO('T', 200) /* Rutgers specific */ -#define __TCSETSTAT _IO('T', 201) /* Rutgers specific */ - -/* Linux specific, no SunOS equivalent. */ -#define TIOCLINUX 0x541C -#define TIOCGSERIAL 0x541E -#define TIOCSSERIAL 0x541F -#define TCSBRKP 0x5425 -#define TIOCTTYGSTRUCT 0x5426 -#define TIOCSERCONFIG 0x5453 -#define TIOCSERGWILD 0x5454 -#define TIOCSERSWILD 0x5455 -#define TIOCGLCKTRMIOS 0x5456 -#define TIOCSLCKTRMIOS 0x5457 -#define TIOCSERGSTRUCT 0x5458 /* For debugging only */ -#define TIOCSERGETLSR 0x5459 /* Get line status register */ -#define TIOCSERGETMULTI 0x545A /* Get multiport config */ -#define TIOCSERSETMULTI 0x545B /* Set multiport config */ -#define TIOCMIWAIT 0x545C /* Wait input */ -#define TIOCGICOUNT 0x545D /* Read serial port inline interrupt counts */ - -/* Used for packet mode */ -#define TIOCPKT_DATA 0 -#define TIOCPKT_FLUSHREAD 1 -#define TIOCPKT_FLUSHWRITE 2 -#define TIOCPKT_STOP 4 -#define TIOCPKT_START 8 -#define TIOCPKT_NOSTOP 16 -#define TIOCPKT_DOSTOP 32 - -/* Socket-level I/O control calls. */ -#define FIOSETOWN 0x8901 -#define SIOCSPGRP 0x8902 -#define FIOGETOWN 0x8903 -#define SIOCGPGRP 0x8904 -#define SIOCATMARK 0x8905 -#define SIOCGSTAMP 0x8906 /* Get stamp */ - diff --git a/mdk-stage1/dietlibc/include/sys/stat.h b/mdk-stage1/dietlibc/include/sys/stat.h deleted file mode 100644 index d31cbd1f2..000000000 --- a/mdk-stage1/dietlibc/include/sys/stat.h +++ /dev/null @@ -1,516 +0,0 @@ -#ifndef _SYS_STAT_H -#define _SYS_STAT_H - -#include -#include -#include - -#if defined(__i386__) -struct stat { - unsigned short st_dev; - unsigned short __pad1; - unsigned long st_ino; - unsigned short st_mode; - unsigned short st_nlink; - unsigned short st_uid; - unsigned short st_gid; - unsigned short st_rdev; - unsigned short __pad2; - unsigned long st_size; - unsigned long st_blksize; - unsigned long st_blocks; - signed long st_atime; - unsigned long __unused1; - signed long st_mtime; - unsigned long __unused2; - signed long st_ctime; - unsigned long __unused3; - unsigned long __unused4; - unsigned long __unused5; -}; - -struct stat64 { - unsigned short st_dev; - unsigned char __pad0[10]; - -#define STAT64_HAS_BROKEN_ST_INO 1 - unsigned long __st_ino; - - unsigned int st_mode; - unsigned int st_nlink; - - unsigned long st_uid; - unsigned long st_gid; - - unsigned short st_rdev; - unsigned char __pad3[10]; - -__extension__ long long st_size; - unsigned long st_blksize; - - unsigned long st_blocks; /* Number 512-byte blocks allocated. */ - unsigned long __pad4; /* future possible st_blocks high bits */ - - unsigned long st_atime; - unsigned long __pad5; - - signed long st_mtime; - unsigned long __pad6; - - unsigned long st_ctime; - unsigned long __pad7; /* will be high 32 bits of ctime someday */ - -__extension__ unsigned long long st_ino; -}; -#elif defined(__sparc__) -struct stat { - unsigned short st_dev; - unsigned long st_ino; - unsigned short st_mode; - short st_nlink; - unsigned short st_uid; - unsigned short st_gid; - unsigned short st_rdev; - long st_size; - long st_atime; - unsigned long __unused1; - long st_mtime; - unsigned long __unused2; - long st_ctime; - unsigned long __unused3; - long st_blksize; - long st_blocks; - unsigned long __unused4[2]; -}; - -struct stat64 { - unsigned char __pad0[6]; - unsigned short st_dev; - -__extension__ unsigned long long st_ino; - - unsigned int st_mode; - unsigned int st_nlink; - - unsigned int st_uid; - unsigned int st_gid; - - unsigned char __pad2[6]; - unsigned short st_rdev; - - unsigned char __pad3[8]; - -__extension__ long long st_size; - unsigned int st_blksize; - - unsigned char __pad4[8]; - unsigned int st_blocks; - - signed int st_atime; - unsigned int __unused1; - - signed int st_mtime; - unsigned int __unused2; - - signed int st_ctime; - unsigned int __unused3; - - unsigned int __unused4; - unsigned int __unused5; -}; -#elif defined(__alpha__) -struct stat { - unsigned int st_dev; - unsigned int st_ino; - unsigned int st_mode; - unsigned int st_nlink; - unsigned int st_uid; - unsigned int st_gid; - unsigned int st_rdev; - long st_size; - signed long st_atime; - signed long st_mtime; - signed long st_ctime; - unsigned int st_blksize; - int st_blocks; - unsigned int st_flags; - unsigned int st_gen; -}; -#elif defined(__mips__) -struct stat { - unsigned int st_dev; - long st_pad1[3]; /* Reserved for network id */ - ino_t st_ino; - unsigned int st_mode; - int st_nlink; - int st_uid; - int st_gid; - unsigned int st_rdev; - long st_pad2[2]; - long st_size; - long st_pad3; - /* - * Actually this should be timestruc_t st_atime, st_mtime and st_ctime - * but we don't have it under Linux. - */ - time_t st_atime; - long reserved0; - time_t st_mtime; - long reserved1; - time_t st_ctime; - long reserved2; - long st_blksize; - long st_blocks; - char st_fstype[16]; /* Filesystem type name */ - long st_pad4[8]; - /* Linux specific fields */ - unsigned int st_flags; - unsigned int st_gen; -}; - -struct stat64 { - unsigned long st_dev; - unsigned long st_pad0[3]; /* Reserved for st_dev expansion */ -__extension__ unsigned long long st_ino; - unsigned int st_mode; - unsigned int st_nlink; - unsigned int st_uid; - unsigned int st_gid; - unsigned long st_rdev; - unsigned long st_pad1[3]; /* Reserved for st_rdev expansion */ -__extension__ long long st_size; - /* - * Actually this should be timestruc_t st_atime, st_mtime and st_ctime - * but we don't have it under Linux. - */ - time_t st_atime; - unsigned long reserved0; /* Reserved for st_atime expansion */ - time_t st_mtime; - unsigned long reserved1; /* Reserved for st_atime expansion */ - time_t st_ctime; - unsigned long reserved2; /* Reserved for st_atime expansion */ - unsigned long st_blksize; - unsigned long st_pad2; -__extension__ long long st_blocks; -}; -#elif defined(__powerpc__) -struct stat { - dev_t st_dev; - ino_t st_ino; - mode_t st_mode; - nlink_t st_nlink; - uid_t st_uid; - gid_t st_gid; - dev_t st_rdev; - off_t st_size; - unsigned long st_blksize; - unsigned long st_blocks; - signed long st_atime; - unsigned long __unused1; - signed long st_mtime; - unsigned long __unused2; - signed long st_ctime; - unsigned long __unused3; - unsigned long __unused4; - unsigned long __unused5; -}; - -/* This matches struct stat64 in glibc2.1. - */ -struct stat64 { -__extension__ unsigned long long st_dev; /* Device. */ -__extension__ unsigned long long st_ino; /* File serial number. */ - unsigned int st_mode; /* File mode. */ - unsigned int st_nlink; /* Link count. */ - unsigned int st_uid; /* User ID of the file's owner. */ - unsigned int st_gid; /* Group ID of the file's group. */ -__extension__ unsigned long long st_rdev; /* Device number, if device. */ - unsigned short int __pad2; -__extension__ long long st_size; /* Size of file, in bytes. */ - long st_blksize; /* Optimal block size for I/O. */ - -__extension__ long long st_blocks; /* Number 512-byte blocks allocated. */ - long st_atime; /* Time of last access. */ - unsigned long int __unused1; - long st_mtime; /* Time of last modification. */ - unsigned long int __unused2; - long st_ctime; /* Time of last status change. */ - unsigned long int __unused3; - unsigned long int __unused4; - unsigned long int __unused5; -}; -#elif defined(__arm__) -struct stat { - unsigned short st_dev; - unsigned short __pad1; - unsigned long st_ino; - unsigned short st_mode; - unsigned short st_nlink; - unsigned short st_uid; - unsigned short st_gid; - unsigned short st_rdev; - unsigned short __pad2; - unsigned long st_size; - unsigned long st_blksize; - unsigned long st_blocks; - signed long st_atime; - unsigned long __unused1; - signed long st_mtime; - unsigned long __unused2; - signed long st_ctime; - unsigned long __unused3; - unsigned long __unused4; - unsigned long __unused5; -}; - -/* This matches struct stat64 in glibc2.1, hence the absolutely - * insane amounts of padding around dev_t's. - */ -struct stat64 { - unsigned short st_dev; - unsigned char __pad0[10]; - -#define STAT64_HAS_BROKEN_ST_INO 1 - unsigned long __st_ino; - unsigned int st_mode; - unsigned int st_nlink; - - unsigned long st_uid; - unsigned long st_gid; - - unsigned short st_rdev; - unsigned char __pad3[10]; - -__extension__ long long st_size; - unsigned long st_blksize; - - unsigned long st_blocks; /* Number 512-byte blocks allocated. */ - unsigned long __pad4; /* future possible st_blocks high bits */ - - signed long st_atime; - unsigned long __pad5; - - signed long st_mtime; - unsigned long __pad6; - - signed long st_ctime; - unsigned long __pad7; /* will be high 32 bits of ctime someday */ - -__extension__ unsigned long long st_ino; -}; -#elif defined(__s390__) -struct stat { - unsigned short st_dev; - unsigned short __pad1; - unsigned long st_ino; - unsigned short st_mode; - unsigned short st_nlink; - unsigned short st_uid; - unsigned short st_gid; - unsigned short st_rdev; - unsigned short __pad2; - unsigned long st_size; - unsigned long st_blksize; - unsigned long st_blocks; - unsigned long st_atime; - unsigned long __unused1; - unsigned long st_mtime; - unsigned long __unused2; - unsigned long st_ctime; - unsigned long __unused3; - unsigned long __unused4; - unsigned long __unused5; -}; -struct stat64 { - unsigned char __pad0[6]; - unsigned short st_dev; - unsigned int __pad1; -#define STAT64_HAS_BROKEN_ST_INO 1 - unsigned long __st_ino; - unsigned int st_mode; - unsigned int st_nlink; - unsigned long st_uid; - unsigned long st_gid; - unsigned char __pad2[6]; - unsigned short st_rdev; - unsigned int __pad3; -__extension__ long long st_size; - unsigned long st_blksize; - unsigned char __pad4[4]; - unsigned long __pad5; /* future possible st_blocks high bits */ - unsigned long st_blocks; /* Number 512-byte blocks allocated. */ - unsigned long st_atime; - unsigned long __pad6; - unsigned long st_mtime; - unsigned long __pad7; - unsigned long st_ctime; - unsigned long __pad8; /* will be high 32 bits of ctime someday */ -__extension__ unsigned long long st_ino; -}; - -#elif defined(__hppa__) - -struct stat { - unsigned long long st_dev; - unsigned short int _pad1; - unsigned long st_ino; - unsigned long st_mode; - unsigned long st_nlink; - unsigned long st_uid; - unsigned long st_gid; - unsigned long long st_rdev; - unsigned short int _pad2; - unsigned long st_size; - unsigned long st_blksize; - unsigned long st_blocks; - unsigned long st_atime; - unsigned long int unused1; - unsigned long st_mtime; - unsigned long int unused2; - unsigned long st_ctime; - unsigned long int unused3; - unsigned long long unused4; -}; - -struct stat64 { - unsigned long long st_dev; - unsigned int __pad1; -#define STAT64_HAS_BROKEN_ST_INO 1 - unsigned long __st_ino; - unsigned long st_mode; - unsigned long st_nlink; - unsigned long st_uid; - unsigned long st_gid; - unsigned long long st_rdev; - unsigned int __pad2; - unsigned long long st_size; - unsigned long long st_blksize; - - unsigned long long st_blocks; - unsigned long st_atime; - unsigned long int __unused1; - unsigned long st_mtime; - unsigned long int __unused2; - unsigned long st_ctime; - unsigned long int __unused3; - unsigned long long st_ino; -}; - -#elif defined(__x86_64__) -struct stat { - unsigned long st_dev; - unsigned long st_ino; - unsigned long st_nlink; - unsigned int st_mode; - unsigned int st_uid; - unsigned int st_gid; - unsigned int __pad0; - unsigned long st_rdev; - unsigned long st_size; - unsigned long st_blksize; - unsigned long st_blocks; - unsigned long st_atime; - unsigned long __reserved0; - unsigned long st_mtime; - unsigned long __reserved1; - unsigned long st_ctime; - unsigned long __reserved2; - long __unused[3]; -}; - -#elif defined(__ia64__) - -struct stat { - unsigned long st_dev; - unsigned long st_ino; - unsigned long st_nlink; - unsigned int st_mode; - unsigned int st_uid; - unsigned int st_gid; - unsigned int __pad; - unsigned long st_rdev; - unsigned long st_size; - unsigned long st_atime; - unsigned long reserved; - unsigned long st_mtime; - unsigned long reserved2; - unsigned long st_ctime; - unsigned long reserved3; - unsigned long st_blksize; - long st_blocks; - unsigned long pad[3]; -}; - -#endif - -#define S_IFMT 00170000 -#define S_IFSOCK 0140000 -#define S_IFLNK 0120000 -#define S_IFREG 0100000 -#define S_IFBLK 0060000 -#define S_IFDIR 0040000 -#define S_IFCHR 0020000 -#define S_IFIFO 0010000 -#define S_ISUID 0004000 -#define S_ISGID 0002000 -#define S_ISVTX 0001000 - -#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) -#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) -#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) -#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) -#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) -#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) -#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) - -#define S_IRWXU 00700 -#define S_IRUSR 00400 -#define S_IWUSR 00200 -#define S_IXUSR 00100 - -#define S_IRWXG 00070 -#define S_IRGRP 00040 -#define S_IWGRP 00020 -#define S_IXGRP 00010 - -#define S_IRWXO 00007 -#define S_IROTH 00004 -#define S_IWOTH 00002 -#define S_IXOTH 00001 - -extern int stat(const char *__file, struct stat *__buf) __THROW; -extern int fstat(int __fd, struct stat *__buf) __THROW; -extern int lstat(const char *__file, struct stat *__buf) __THROW; - -#if __WORDSIZE == 64 -#define __NO_STAT64 -#else -extern int stat64(const char *__file, struct stat64 *__buf) __THROW; -extern int fstat64(int __fd, struct stat64 *__buf) __THROW; -extern int lstat64(const char *__file, struct stat64 *__buf) __THROW; - -#if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64 -#define lstat lstat64 -#define fstat fstat64 -#define stat stat64 -#define pread pread64 -#define pwrite pwrite64 -#endif -#endif - -#define major(dev) (((dev)>>8) & 0xff) -#define minor(dev) ((dev) & 0xff) -#define makedev(major, minor) ((((unsigned int) (major)) << 8) | ((unsigned int) (minor))) - -extern int chmod (const char *__file, mode_t __mode) __THROW; -extern int fchmod (int __fd, mode_t __mode) __THROW; -extern mode_t umask (mode_t __mask) __THROW; -extern int mkdir (const char *__path, mode_t __mode) __THROW; -extern int mknod (const char *__path, mode_t __mode, dev_t __dev) __THROW; -extern int mkfifo (const char *__path, mode_t __mode) __THROW; - -#define S_IREAD S_IRUSR -#define S_IWRITE S_IWUSR -#define S_IEXEC S_IXUSR - -#endif diff --git a/mdk-stage1/dietlibc/include/sys/syscall.h b/mdk-stage1/dietlibc/include/sys/syscall.h deleted file mode 100644 index 5d6b5a4ad..000000000 --- a/mdk-stage1/dietlibc/include/sys/syscall.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _SYSCALL_H -#define _SYSCALL_H - -#include - -#endif diff --git a/mdk-stage1/dietlibc/include/sys/sysinfo.h b/mdk-stage1/dietlibc/include/sys/sysinfo.h deleted file mode 100644 index cf88be34c..000000000 --- a/mdk-stage1/dietlibc/include/sys/sysinfo.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef _SYS_SYSINFO_H -#define _SYS_SYSINFO_H - -#include - -#define SI_LOAD_SHIFT 16 -struct sysinfo { - long uptime; /* Seconds since boot */ - unsigned long loads[3]; /* 1, 5, and 15 minute load averages */ - unsigned long totalram; /* Total usable main memory size */ - unsigned long freeram; /* Available memory size */ - unsigned long sharedram; /* Amount of shared memory */ - unsigned long bufferram; /* Memory used by buffers */ - unsigned long totalswap; /* Total swap space size */ - unsigned long freeswap; /* swap space still available */ - unsigned short procs; /* Number of current processes */ - unsigned short pad; /* explicit padding */ - unsigned long totalhigh; /* Total high memory size */ - unsigned long freehigh; /* Available high memory size */ - unsigned int mem_unit; /* Memory unit size in bytes */ - char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding: libc5 uses this.. */ -}; - - -int sysinfo(struct sysinfo *info) __THROW; - -#endif diff --git a/mdk-stage1/dietlibc/include/sys/syslog.h b/mdk-stage1/dietlibc/include/sys/syslog.h deleted file mode 100644 index 8722038a5..000000000 --- a/mdk-stage1/dietlibc/include/sys/syslog.h +++ /dev/null @@ -1,102 +0,0 @@ -#ifndef _SYS_SYSLOG_H -#define _SYS_SYSLOG_H 1 - -#include -#include - -#define _PATH_LOG "/dev/log" - -/* - * priorities/facilities are encoded into a single 32-bit quantity, where the - * bottom 3 bits are the priority (0-7) and the top 28 bits are the facility - * (0-big number). Both the priorities and the facilities map roughly - * one-to-one to strings in the syslogd(8) source code. This mapping is - * included in this file. - * - * priorities (these are ordered) - */ -#define LOG_EMERG 0 /* system is unusable */ -#define LOG_ALERT 1 /* action must be taken immediately */ -#define LOG_CRIT 2 /* critical conditions */ -#define LOG_ERR 3 /* error conditions */ -#define LOG_WARNING 4 /* warning conditions */ -#define LOG_NOTICE 5 /* normal but significant condition */ -#define LOG_INFO 6 /* informational */ -#define LOG_DEBUG 7 /* debug-level messages */ - -#define LOG_PRIMASK 0x07 /* mask to extract priority part (internal) */ - /* extract priority */ -#define LOG_PRI(p) ((p) & LOG_PRIMASK) -#define LOG_MAKEPRI(fac, pri) (((fac) << 3) | (pri)) - -/* facility codes */ -#define LOG_KERN (0<<3) /* kernel messages */ -#define LOG_USER (1<<3) /* random user-level messages */ -#define LOG_MAIL (2<<3) /* mail system */ -#define LOG_DAEMON (3<<3) /* system daemons */ -#define LOG_AUTH (4<<3) /* security/authorization messages */ -#define LOG_SYSLOG (5<<3) /* messages generated internally by syslogd */ -#define LOG_LPR (6<<3) /* line printer subsystem */ -#define LOG_NEWS (7<<3) /* network news subsystem */ -#define LOG_UUCP (8<<3) /* UUCP subsystem */ -#define LOG_CRON (9<<3) /* clock daemon */ -#define LOG_AUTHPRIV (10<<3) /* security/authorization messages (private) */ -#define LOG_FTP (11<<3) /* ftp daemon */ - - /* other codes through 15 reserved for system use */ -#define LOG_LOCAL0 (16<<3) /* reserved for local use */ -#define LOG_LOCAL1 (17<<3) /* reserved for local use */ -#define LOG_LOCAL2 (18<<3) /* reserved for local use */ -#define LOG_LOCAL3 (19<<3) /* reserved for local use */ -#define LOG_LOCAL4 (20<<3) /* reserved for local use */ -#define LOG_LOCAL5 (21<<3) /* reserved for local use */ -#define LOG_LOCAL6 (22<<3) /* reserved for local use */ -#define LOG_LOCAL7 (23<<3) /* reserved for local use */ - -#define LOG_NFACILITIES 24 /* current number of facilities */ -#define LOG_FACMASK 0x03f8 /* mask to extract facility part */ - /* facility of pri */ -#define LOG_FAC(p) (((p) & LOG_FACMASK) >> 3) - -/* - * arguments to setlogmask. - */ -#define LOG_MASK(pri) (1 << (pri)) /* mask for one priority */ -#define LOG_UPTO(pri) ((1 << ((pri)+1)) - 1) /* all priorities through pri */ - -/* - * Option flags for openlog. - * - * LOG_ODELAY no longer does anything. - * LOG_NDELAY is the inverse of what it used to be. - */ -#define LOG_PID 0x01 /* log the pid with each message */ -#define LOG_CONS 0x02 /* log on the console if errors in sending */ -#define LOG_ODELAY 0x04 /* delay open until first syslog() (default) */ -#define LOG_NDELAY 0x08 /* don't delay open */ -#define LOG_NOWAIT 0x10 /* don't wait for console forks: DEPRECATED */ -#define LOG_PERROR 0x20 /* log to stderr as well */ - -/* Open connection to system logger. */ -/* against the glibc-routine ident has not to be const ! */ -/* instead ident is limited to 80 characters ! */ -void openlog (const char *ident, int option, int facility); - -void closelog (void) __THROW; - -int setlogmask (int mask) __THROW; - -void syslog (int priority, const char *format, ...) __THROW; - -void vsyslog (int priority, const char *format, va_list arg_ptr) __THROW; - -/* yuck yuck yuck, only needed for syslogd. */ -typedef struct _code { - const char *const c_name; - int c_val; -} CODE; - -extern CODE prioritynames[]; -extern CODE facilitynames[]; - -#endif diff --git a/mdk-stage1/dietlibc/include/sys/sysmacros.h b/mdk-stage1/dietlibc/include/sys/sysmacros.h deleted file mode 100644 index 8a8124131..000000000 --- a/mdk-stage1/dietlibc/include/sys/sysmacros.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _SYSMACROS_H -#define _SYSMACROS_H - -#include - -#endif diff --git a/mdk-stage1/dietlibc/include/sys/time.h b/mdk-stage1/dietlibc/include/sys/time.h deleted file mode 100644 index 9fc40089f..000000000 --- a/mdk-stage1/dietlibc/include/sys/time.h +++ /dev/null @@ -1,68 +0,0 @@ -#ifndef _SYS_TIME_H -#define _SYS_TIME_H 1 - -#include -#include -#include - -struct timespec { - time_t tv_sec; /* seconds */ - long tv_nsec; /* nanoseconds */ -}; - -struct timeval { - time_t tv_sec; /* seconds */ - suseconds_t tv_usec; /* microseconds */ -}; - -struct timezone { - int tz_minuteswest; /* minutes west of Greenwich */ - int tz_dsttime; /* type of dst correction */ -}; - -#define ITIMER_REAL 0 -#define ITIMER_VIRTUAL 1 -#define ITIMER_PROF 2 - -struct itimerspec { - struct timespec it_interval; /* timer period */ - struct timespec it_value; /* timer expiration */ -}; - -struct itimerval { - struct timeval it_interval; /* timer interval */ - struct timeval it_value; /* current value */ -}; - -#if defined _GNU_SOURCE || defined _BSD_SOURCE -typedef struct timezone *__timezone_ptr_t; -#else -typedef void *__timezone_ptr_t; -#endif - -int getitimer(int which, struct itimerval *value) __THROW; -int setitimer(int which, const struct itimerval *value, struct itimerval *ovalue) __THROW; - -int gettimeofday(struct timeval *tv, struct timezone *tz) __THROW; -int settimeofday(const struct timeval *tv , const struct timezone *tz) __THROW; - -extern int utimes (const char *__file, const struct timeval __tvp[2]) __THROW; - -extern int adjtime (const struct timeval *delta, struct timeval *olddelta) __THROW; - -struct tm { - int tm_sec; /* Seconds. [0-60] (1 leap second) */ - int tm_min; /* Minutes. [0-59] */ - int tm_hour; /* Hours. [0-23] */ - int tm_mday; /* Day. [1-31] */ - int tm_mon; /* Month. [0-11] */ - int tm_year; /* Year - 1900. */ - int tm_wday; /* Day of week. [0-6] */ - int tm_yday; /* Days in year.[0-365] */ - int tm_isdst; /* DST. [-1/0/1]*/ - - long int tm_gmtoff; /* Seconds east of UTC. */ - const char *tm_zone; /* Timezone abbreviation. */ -}; - -#endif diff --git a/mdk-stage1/dietlibc/include/sys/timeb.h b/mdk-stage1/dietlibc/include/sys/timeb.h deleted file mode 100644 index ceed377e7..000000000 --- a/mdk-stage1/dietlibc/include/sys/timeb.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef __SYS_TIMEB_H -#define __SYS_TIMEB_H 1 - -struct timeb { - time_t time; - unsigned short millitm; - short timezone; - short dstflag; -}; - -int ftime(struct timeb *tp); - -#endif diff --git a/mdk-stage1/dietlibc/include/sys/times.h b/mdk-stage1/dietlibc/include/sys/times.h deleted file mode 100644 index 27f75cdc5..000000000 --- a/mdk-stage1/dietlibc/include/sys/times.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef _SYS_TIMES_H -#define _SYS_TIMES_H - -#include -#include - -struct tms { - clock_t tms_utime; - clock_t tms_stime; - clock_t tms_cutime; - clock_t tms_cstime; -}; - -clock_t times(struct tms *buf) __THROW; - -#endif diff --git a/mdk-stage1/dietlibc/include/sys/timex.h b/mdk-stage1/dietlibc/include/sys/timex.h deleted file mode 100644 index cf024e009..000000000 --- a/mdk-stage1/dietlibc/include/sys/timex.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef _SYS_TIMEX_H -#define _SYS_TIMEX_H - -struct timex { - unsigned int modes; /* mode selector */ - long int offset; /* time offset (usec) */ - long int freq; /* frequency offset (scaled ppm) */ - long int maxerror; /* maximum error (usec) */ - long int esterror; /* estimated error (usec) */ - int status; /* clock command/status */ - long int constant; /* pll time constant */ - long int precision; /* clock precision (usec) (read only) */ - long int tolerance; /* clock frequency tolerance (ppm) (read only) */ - struct timeval time; /* (read only) */ - long int tick; /* (modified) usecs between clock ticks */ - - long int ppsfreq; /* pps frequency (scaled ppm) (ro) */ - long int jitter; /* pps jitter (us) (ro) */ - int shift; /* interval duration (s) (shift) (ro) */ - long int stabil; /* pps stability (scaled ppm) (ro) */ - long int jitcnt; /* jitter limit exceeded (ro) */ - long int calcnt; /* calibration intervals (ro) */ - long int errcnt; /* calibration errors (ro) */ - long int stbcnt; /* stability limit exceeded (ro) */ - - /* ??? */ - int :32; int :32; int :32; int :32; - int :32; int :32; int :32; int :32; - int :32; int :32; int :32; int :32; -}; - -#define ADJ_OFFSET 0x0001 /* time offset */ -#define ADJ_FREQUENCY 0x0002 /* frequency offset */ -#define ADJ_MAXERROR 0x0004 /* maximum time error */ -#define ADJ_ESTERROR 0x0008 /* estimated time error */ -#define ADJ_STATUS 0x0010 /* clock status */ -#define ADJ_TIMECONST 0x0020 /* pll time constant */ -#define ADJ_TICK 0x4000 /* tick value */ -#define ADJ_OFFSET_SINGLESHOT 0x8001 /* old-fashioned adjtime */ - -#define TIME_OK 0 /* clock synchronized */ -#define TIME_INS 1 /* insert leap second */ -#define TIME_DEL 2 /* delete leap second */ -#define TIME_OOP 3 /* leap second in progress */ -#define TIME_WAIT 4 /* leap second has occurred */ -#define TIME_BAD 5 /* clock not synchronized */ - -int adjtimex(struct timex *buf); - -#endif diff --git a/mdk-stage1/dietlibc/include/sys/types.h b/mdk-stage1/dietlibc/include/sys/types.h deleted file mode 100644 index a3d2bf4be..000000000 --- a/mdk-stage1/dietlibc/include/sys/types.h +++ /dev/null @@ -1,133 +0,0 @@ -#ifndef _SYS_TYPES_H -#define _SYS_TYPES_H - -#include -#include - -typedef unsigned long int blkcnt_t; /* Used for file block counts */ -typedef unsigned long int blksize_t; /* Used for block sizes */ -typedef unsigned long int clock_t; /* Used for system times in - clock ticks or CLOCKS_PER_SEC - (see ). */ - -/* TODO: - clockid_t - Used for clock ID type in the clock and timer functions. - fsblkcnt_t - Used for file system block counts - fsfilcnt_t - Used for file system file counts - pthread_attr_t - Used to identify a thread attribute object. - pthread_cond_t - Used for condition variables. - pthread_condattr_t - Used to identify a condition attribute object. - pthread_key_t - Used for thread-specific data keys. - pthread_mutex_t - Used for mutexes. - pthread_mutexattr_t - Used to identify a mutex attribute object. - pthread_once_t - Used for dynamic package initialisation. - pthread_rwlock_t - Used for read-write locks. - pthread_rwlockattr_t - Used for read-write lock attributes. - pthread_t - Used to identify a thread. - timer_t - Used for timer ID returned by timer_create(). -*/ - -#if defined(__alpha__) || defined(__mips__) || defined(__powerpc__) || defined(__hppa__) || defined(__sparc64__) \ - || defined(__x86_64__) || defined(__ia64__) -typedef unsigned int uid_t; /* Used for user IDs. */ -typedef unsigned int gid_t; /* Used for group IDs. */ -typedef unsigned int dev_t; /* Used for device IDs. */ -#else -typedef unsigned short uid_t; /* Used for user IDs. */ -typedef unsigned short gid_t; /* Used for group IDs. */ -typedef unsigned short dev_t; /* Used for device IDs. */ -#endif - -#if defined(__alpha__) || defined(__mips__) || defined(__powerpc__) || defined(__sparc64__) \ - || defined(__x86_64__) || defined(__ia64__) -typedef unsigned int mode_t; /* Used for some file attributes. */ -#else -typedef unsigned short mode_t; /* Used for some file attributes. */ -#endif - -#if defined(__alpha__) || defined(__mips__) || defined(__sparc64__) \ - || defined(__x86_64__) || defined(__ia64__) -typedef unsigned int nlink_t; /* Used for link counts. */ -#else -typedef unsigned short nlink_t; /* Used for link counts. */ -#endif - -typedef signed int id_t; /* Used as a general identifier; can be - used to contain at least a pid_t, - uid_t or a gid_t. */ -typedef unsigned long ino_t; /* Used for file serial numbers. */ -typedef signed int key_t; /* Used for interprocess communication. */ -typedef signed int pid_t; /* Used for process IDs and process group IDs. */ -typedef signed long ssize_t; /* Used for a count of bytes or an error indication. */ -typedef signed long suseconds_t; /* Used for time in microseconds. */ -typedef signed long time_t; /* Used for time in seconds. */ -typedef signed long useconds_t; /* Used for time in microseconds. */ - -/* non-susv2 types: */ -__extension__ typedef signed long long loff_t; /* 64-bit offset */ - -__extension__ typedef signed long long off64_t; -#if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64 -typedef off64_t off_t; -#else -typedef signed long off_t; /* Used for file sizes. */ -#endif - -__extension__ typedef unsigned long long ino64_t; -__extension__ typedef signed long long blkcnt64_t; - -typedef uint32_t uid32_t; -typedef uint32_t gid32_t; - -typedef long int fpos_t; - -#define __socklen_t_defined -typedef unsigned int socklen_t; -typedef unsigned short sa_family_t; - -#ifdef _BSD_SOURCE -/* die, BSD, die! */ -typedef uint16_t nshort; -typedef uint32_t ntime; -typedef uint32_t nlong; -typedef uint32_t ulong; -typedef uint16_t n_short; -typedef uint32_t n_time; -typedef uint32_t n_long; -# ifndef __dietlibc_u_char_defined -typedef char* caddr_t; -typedef uint32_t u_long; -typedef unsigned char u_char; -typedef unsigned short u_short; -typedef unsigned int u_int; -# define __dietlibc_u_char_defined -# endif -typedef unsigned char uchar; -typedef unsigned short ushort; -typedef unsigned int uint; -#endif - -#ifdef _GNU_SOURCE -typedef uint8_t u_int8_t; -typedef uint16_t u_int16_t; -typedef uint32_t u_int32_t; -#ifndef __STRICT_ANSI__ -typedef uint64_t u_int64_t; -#endif -#endif - -#endif diff --git a/mdk-stage1/dietlibc/include/sys/ucontext.h b/mdk-stage1/dietlibc/include/sys/ucontext.h deleted file mode 100644 index 573c6c7fb..000000000 --- a/mdk-stage1/dietlibc/include/sys/ucontext.h +++ /dev/null @@ -1,110 +0,0 @@ -#ifndef _SYS_UCONTEXT_H -#define _SYS_UCONTEXT_H - -#include -#include - -typedef struct sigcontext mcontext_t; - -#if defined(__i386__) || defined(__arm__) || defined(__mips__) || defined(__mips64__) || defined(__powerpc__) || defined(__hppa__) -struct ucontext { - unsigned long uc_flags; - struct ucontext *uc_link; - stack_t uc_stack; - struct sigcontext uc_mcontext; - sigset_t uc_sigmask; /* mask last for extensibility */ -}; -#elif defined(__alpha__) -struct ucontext { - unsigned long uc_flags; - struct ucontext *uc_link; - unsigned long uc_osf_sigmask; - stack_t uc_stack; - struct sigcontext uc_mcontext; - sigset_t uc_sigmask; /* mask last for extensibility */ -}; -#elif defined(__sparc__) || defined(__sparc64__) - -#define MC_TSTATE 0 -#define MC_PC 1 -#define MC_NPC 2 -#define MC_Y 3 -#define MC_G1 4 -#define MC_G2 5 -#define MC_G3 6 -#define MC_G4 7 -#define MC_G5 8 -#define MC_G6 9 -#define MC_G7 10 -#define MC_O0 11 -#define MC_O1 12 -#define MC_O2 13 -#define MC_O3 14 -#define MC_O4 15 -#define MC_O5 16 -#define MC_O6 17 -#define MC_O7 18 -#define MC_NGREG 19 - -typedef unsigned long mc_greg_t; -typedef mc_greg_t mc_gregset_t[MC_NGREG]; - -#define MC_MAXFPQ 16 -struct mc_fq { - unsigned long *mcfq_addr; - unsigned int mcfq_insn; -}; - -typedef struct mc_fpu { - union { - unsigned int sregs[32]; - unsigned long dregs[32]; - long double qregs[16]; - } mcfpu_fregs; - unsigned long mcfpu_fsr; - unsigned long mcfpu_fprs; - unsigned long mcfpu_gsr; - struct mc_fq *mcfpu_fq; - unsigned char mcfpu_qcnt; - unsigned char mcfpu_qentsz; - unsigned char mcfpu_enab; -} mc_fpu_t; - -typedef struct { - mc_gregset_t mc_gregs; - mc_greg_t mc_fp; - mc_greg_t mc_i7; - mc_fpu_t mc_fpregs; -} mcontext_t; - -struct ucontext { - struct ucontext *uc_link; - unsigned long uc_flags; - sigset_t uc_sigmask; - mcontext_t uc_mcontext; -}; -#elif defined(__s390__) -struct ucontext { - unsigned long uc_flags; - struct ucontext *uc_link; - stack_t uc_stack; - _sigregs uc_mcontext; - sigset_t uc_sigmask; /* mask last for extensibility */ -}; -#elif defined(__ia64__) - -/* oh my god is this ugly! --fefe*/ -struct ucontext { - struct sigcontext uc_mcontext; -}; - -#define uc_link uc_mcontext.sc_gr[0] /* wrong type; nobody cares */ -#define uc_sigmask uc_mcontext.sc_sigmask -#define uc_stack uc_mcontext.sc_stack -#else -#error NEED TO PORT ! -#endif - -typedef struct ucontext ucontext_t; - -#endif diff --git a/mdk-stage1/dietlibc/include/sys/uio.h b/mdk-stage1/dietlibc/include/sys/uio.h deleted file mode 100644 index 5edbdc8b2..000000000 --- a/mdk-stage1/dietlibc/include/sys/uio.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef _SYS_UIO -#define _SYS_UIO 1 - -#include - -int readv(int filedes, const struct iovec *vector, size_t count); -int writev(int filedes, const struct iovec *vector, size_t count); - -#endif diff --git a/mdk-stage1/dietlibc/include/sys/un.h b/mdk-stage1/dietlibc/include/sys/un.h deleted file mode 100644 index 000a937c1..000000000 --- a/mdk-stage1/dietlibc/include/sys/un.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef _SYS_UN_H -#define _SYS_UN_H - -#include - -#define UNIX_PATH_MAX 108 - -struct sockaddr_un { - sa_family_t sun_family; /* AF_UNIX */ - char sun_path[UNIX_PATH_MAX]; /* pathname */ -}; - -#endif /* sys/un.h */ diff --git a/mdk-stage1/dietlibc/include/sys/utsname.h b/mdk-stage1/dietlibc/include/sys/utsname.h deleted file mode 100644 index 37bf6c811..000000000 --- a/mdk-stage1/dietlibc/include/sys/utsname.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef _SYS_UTSNAME_H -#define _SYS_UTSNAME_H 1 - -#include - -/* Length of the entries in `struct utsname' is 65. */ -#define _UTSNAME_LENGTH 65 -#define _UTSNAME_NODENAME_LENGTH _UTSNAME_LENGTH - -/* Linux provides as additional information in the `struct utsname' - the name of the current domain. Define _UTSNAME_DOMAIN_LENGTH - to a value != 0 to activate this entry. */ -#define _UTSNAME_DOMAIN_LENGTH _UTSNAME_LENGTH - -struct utsname { - /* Name of the implementation of the operating system. */ - char sysname[_UTSNAME_LENGTH]; - - /* Name of this node on the network. */ - char nodename[_UTSNAME_NODENAME_LENGTH]; - - /* Current release level of this implementation. */ - char release[_UTSNAME_LENGTH]; - /* Current version level of this release. */ - char version[_UTSNAME_LENGTH]; - - /* Name of the hardware type the system is running on. */ - char machine[_UTSNAME_LENGTH]; - - /* Name of the domain of this node on the network. */ - char domainname[_UTSNAME_DOMAIN_LENGTH]; -}; - -extern int uname (struct utsname *__name) __THROW; -#endif diff --git a/mdk-stage1/dietlibc/include/sys/vfs.h b/mdk-stage1/dietlibc/include/sys/vfs.h deleted file mode 100644 index 19b3242bb..000000000 --- a/mdk-stage1/dietlibc/include/sys/vfs.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef _SYS_VFS_H -#define _SYS_VFS_H - -#include -#include - -typedef struct { - int __val[2]; -} __kernel_fsid_t; - -struct statfs { - long f_type; - long f_bsize; -#ifdef __mips__ - long f_frsize; -#endif - long f_blocks; - long f_bfree; -#ifndef __mips__ - long f_bavail; -#endif - long f_files; - long f_ffree; -#ifdef __mips__ - long f_bavail; -#endif - __kernel_fsid_t f_fsid; - long f_namelen; - long f_spare[6]; -}; - -int statfs(const char *path, struct statfs *buf) __THROW; -int fstatfs(int fd, struct statfs *buf) __THROW; - -#endif diff --git a/mdk-stage1/dietlibc/include/sys/wait.h b/mdk-stage1/dietlibc/include/sys/wait.h deleted file mode 100644 index 0ba55499e..000000000 --- a/mdk-stage1/dietlibc/include/sys/wait.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef _SYS_WAIT_H -#define _SYS_WAIT_H - -#include -#include - -#define WNOHANG 0x00000001 -#define WUNTRACED 0x00000002 - -#define __WNOTHREAD 0x20000000 /* Don't wait on children of other threads in this group */ -#define __WALL 0x40000000 /* Wait on all children, regardless of type */ -#define __WCLONE 0x80000000 /* Wait only on non-SIGCHLD children */ - -/* If WIFEXITED(STATUS), the low-order 8 bits of the status. */ -#define __WEXITSTATUS(status) (((status) & 0xff00) >> 8) -#define WEXITSTATUS __WEXITSTATUS - -/* If WIFSIGNALED(STATUS), the terminating signal. */ -#define __WTERMSIG(status) ((status) & 0x7f) -#define WTERMSIG __WTERMSIG - -/* If WIFSTOPPED(STATUS), the signal that stopped the child. */ -#define __WSTOPSIG(status) __WEXITSTATUS(status) -#define WSTOPSIG __WSTOPSIG - -/* Nonzero if STATUS indicates normal termination. */ -#define WIFEXITED(status) (__WTERMSIG(status) == 0) - -/* Nonzero if STATUS indicates termination by a signal. */ -#define WIFSIGNALED(status) (!WIFSTOPPED(status) && !WIFEXITED(status)) - -/* Nonzero if STATUS indicates the child is stopped. */ -#define WIFSTOPPED(status) (((status) & 0xff) == 0x7f) - -/* Nonzero if STATUS indicates the child dumped core. */ -#define WCOREDUMP(status) ((status) & 0x80) - -pid_t wait(int *status) __THROW; -pid_t waitpid(pid_t pid, int *status, int options) __THROW; - -pid_t wait3(int *status, int options, struct rusage *rusage) __THROW; - -pid_t wait4(pid_t pid, int *status, int options, struct rusage *rusage) __THROW; - -#endif diff --git a/mdk-stage1/dietlibc/include/sysexits.h b/mdk-stage1/dietlibc/include/sysexits.h deleted file mode 100644 index 5540795ff..000000000 --- a/mdk-stage1/dietlibc/include/sysexits.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef _SYSEXITS_H -#define _SYSEXITS_H 1 - -#define EX_OK 0 - -#define EX__BASE 64 - -#define EX_USAGE 64 -#define EX_DATAERR 65 -#define EX_NOINPUT 66 -#define EX_NOUSER 67 -#define EX_NOHOST 68 -#define EX_UNAVAILABLE 69 -#define EX_SOFTWARE 70 -#define EX_OSERR 71 -#define EX_OSFILE 72 -#define EX_CANTCREAT 73 -#define EX_IOERR 74 -#define EX_TEMPFAIL 75 -#define EX_PROTOCOL 76 -#define EX_NOPERM 77 -#define EX_CONFIG 78 - -#define EX__MAX 78 - -#endif diff --git a/mdk-stage1/dietlibc/include/syslog.h b/mdk-stage1/dietlibc/include/syslog.h deleted file mode 100644 index 830b4928a..000000000 --- a/mdk-stage1/dietlibc/include/syslog.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/mdk-stage1/dietlibc/include/tar.h b/mdk-stage1/dietlibc/include/tar.h deleted file mode 100644 index a78bbce54..000000000 --- a/mdk-stage1/dietlibc/include/tar.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef _TAR_H_ -#define _TAR_H_ - -#define TMAGIC "ustar" -#define TVERSION "00" - -#define TMAGLEN 6 -#define TVERSLEN 2 - -#define REGTYPE '0' -#define AREGTYPE '\0' -#define LNKTYPE '1' -#define SYMTYPE '2' -#define CHRTYPE '3' -#define BLKTYPE '4' -#define DIRTYPE '5' -#define FIFOTYPE '6' -#define CONTTYPE '7' - -#define TSUID 04000 -#define TSGID 02000 -#define TSVTX 01000 - -#define TUREAD 00400 -#define TUWRITE 00200 -#define TUEXEC 00100 - -#define TGREAD 00040 -#define TGWRITE 00020 -#define TGEXEC 00010 - -#define TOREAD 00004 -#define TOWRITE 00002 -#define TOEXEC 00001 - -#endif /* _TAR_H_ */ diff --git a/mdk-stage1/dietlibc/include/termio.h b/mdk-stage1/dietlibc/include/termio.h deleted file mode 100644 index 55d1f242b..000000000 --- a/mdk-stage1/dietlibc/include/termio.h +++ /dev/null @@ -1,4 +0,0 @@ -/* this looks horribly wrong, but glibc does it like that */ - -#include -#include diff --git a/mdk-stage1/dietlibc/include/termios.h b/mdk-stage1/dietlibc/include/termios.h deleted file mode 100644 index 12e02c5d7..000000000 --- a/mdk-stage1/dietlibc/include/termios.h +++ /dev/null @@ -1,383 +0,0 @@ -#ifndef _TERMIOS_H -#define _TERMIOS_H - -#include -#include - -struct winsize { - unsigned short ws_row; - unsigned short ws_col; - unsigned short ws_xpixel; - unsigned short ws_ypixel; -}; - -#define NCC 8 -struct termio { - unsigned short c_iflag; /* input mode flags */ - unsigned short c_oflag; /* output mode flags */ - unsigned short c_cflag; /* control mode flags */ - unsigned short c_lflag; /* local mode flags */ - unsigned char c_line; /* line discipline */ - unsigned char c_cc[NCC]; /* control characters */ -}; - -/* modem lines */ -#ifdef __mips__ -#define TIOCM_LE 0x001 -#define TIOCM_DTR 0x002 -#define TIOCM_RTS 0x004 -#define TIOCM_ST 0x010 -#define TIOCM_SR 0x020 -#define TIOCM_CTS 0x040 -#define TIOCM_CAR 0x100 -#define TIOCM_RNG 0x200 -#define TIOCM_DSR 0x400 -#define TIOCM_CD TIOCM_CAR -#define TIOCM_RI TIOCM_RNG -#define TIOCM_OUT1 0x2000 -#define TIOCM_OUT2 0x4000 -#define TIOCM_LOOP 0x8000 -#else -#define TIOCM_LE 0x001 -#define TIOCM_DTR 0x002 -#define TIOCM_RTS 0x004 -#define TIOCM_ST 0x008 -#define TIOCM_SR 0x010 -#define TIOCM_CTS 0x020 -#define TIOCM_CAR 0x040 -#define TIOCM_RNG 0x080 -#define TIOCM_DSR 0x100 -#define TIOCM_CD TIOCM_CAR -#define TIOCM_RI TIOCM_RNG -#define TIOCM_OUT1 0x2000 -#define TIOCM_OUT2 0x4000 -#define TIOCM_LOOP 0x8000 -#endif - -/* line disciplines */ -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 /* X.25 async */ -#define N_6PACK 7 -#define N_MASC 8 /* Reserved for Mobitex module */ -#define N_R3964 9 /* Reserved for Simatic R3964 module */ -#define N_PROFIBUS_FDL 10 /* Reserved for Profibus */ -#define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ -#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ -#define N_HDLC 13 /* synchronous HDLC */ -#define N_SYNC_PPP 14 /* synchronous PPP */ -#define N_HCI 15 /* Bluetooth HCI UART */ - -typedef unsigned char cc_t; -typedef unsigned int speed_t; -typedef unsigned int tcflag_t; - -#define _POSIX_VDISABLE '\0' - -#if defined(__i386__) || defined(__arm__) || defined(__ia64__) || defined(__hppa__) || defined(__s390__) || defined(__s390x__) || defined(__x86_64__) -#define NCCS 19 -struct termios { - tcflag_t c_iflag; /* input mode flags */ - tcflag_t c_oflag; /* output mode flags */ - tcflag_t c_cflag; /* control mode flags */ - tcflag_t c_lflag; /* local mode flags */ - cc_t c_line; /* line discipline */ - cc_t c_cc[NCCS]; /* control characters */ -}; -#elif defined(__mips__) || defined(__mips64__) -#define NCCS 23 -struct termios { - tcflag_t c_iflag; /* input mode flags */ - tcflag_t c_oflag; /* output mode flags */ - tcflag_t c_cflag; /* control mode flags */ - tcflag_t c_lflag; /* local mode flags */ - /* - * Seems nonexistent in the ABI, but Linux assumes existence ... - */ - cc_t c_line; /* line discipline */ - cc_t c_cc[NCCS]; /* control characters */ -}; -#elif defined(powerpc) || defined(__alpha__) -#define NCCS 19 -struct termios { - tcflag_t c_iflag; /* input mode flags */ - tcflag_t c_oflag; /* output mode flags */ - tcflag_t c_cflag; /* control mode flags */ - tcflag_t c_lflag; /* local mode flags */ - cc_t c_cc[NCCS]; /* control characters */ - cc_t c_line; /* line discipline (== c_cc[19]) */ - speed_t c_ispeed; /* input speed */ - speed_t c_ospeed; /* output speed */ -}; -#elif defined(__sparc__) -#define NCCS 17 -struct termios { - tcflag_t c_iflag; /* input mode flags */ - tcflag_t c_oflag; /* output mode flags */ - tcflag_t c_cflag; /* control mode flags */ - tcflag_t c_lflag; /* local mode flags */ - cc_t c_line; /* line discipline */ - cc_t c_cc[NCCS]; /* control characters */ -}; -#else -# error "Struct termios undefined on your architecture" -#endif - -/* c_cc characters */ -#if defined(__alpha__) -#define VEOF 0 -#define VEOL 1 -#define VEOL2 2 -#define VERASE 3 -#define VWERASE 4 -#define VKILL 5 -#define VREPRINT 6 -#define VSWTC 7 -#define VINTR 8 -#define VQUIT 9 -#define VSUSP 10 -#define VSTART 12 -#define VSTOP 13 -#define VLNEXT 14 -#define VDISCARD 15 -#define VMIN 16 -#define VTIME 17 -#elif defined(__mips__) -#define VINTR 0 -#define VQUIT 1 -#define VERASE 2 -#define VKILL 3 -#define VMIN 4 -#define VTIME 5 -#define VEOL2 6 -#define VSWTC 7 -#define VSWTCH VSWTC -#define VSTART 8 -#define VSTOP 9 -#define VSUSP 10 -#define VREPRINT 12 -#define VDISCARD 13 -#define VWERASE 14 -#define VLNEXT 15 -#define VEOF 16 -#define VEOL 17 -#elif defined(__powerpc__) -#define VINTR 0 -#define VQUIT 1 -#define VERASE 2 -#define VKILL 3 -#define VEOF 4 -#define VMIN 5 -#define VEOL 6 -#define VTIME 7 -#define VEOL2 8 -#define VSWTC 9 -#define VWERASE 10 -#define VREPRINT 11 -#define VSUSP 12 -#define VSTART 13 -#define VSTOP 14 -#define VLNEXT 15 -#define VDISCARD 16 -#elif defined(__sparc__) -#define VINTR 0 -#define VQUIT 1 -#define VERASE 2 -#define VKILL 3 -#define VEOF 4 -#define VEOL 5 -#define VEOL2 6 -#define VSWTC 7 -#define VSTART 8 -#define VSTOP 9 -#define VSUSP 10 -#define VDSUSP 11 -#define VREPRINT 12 -#define VDISCARD 13 -#define VWERASE 14 -#define VLNEXT 15 -#define VMIN 16 -#define VTIME 17 -#else /* arm, i386, parisc, s390, x86_64 */ -#define VINTR 0 -#define VQUIT 1 -#define VERASE 2 -#define VKILL 3 -#define VEOF 4 -#define VTIME 5 -#define VMIN 6 -#define VSWTC 7 -#define VSTART 8 -#define VSTOP 9 -#define VSUSP 10 -#define VEOL 11 -#define VREPRINT 12 -#define VDISCARD 13 -#define VWERASE 14 -#define VLNEXT 15 -#define VEOL2 16 -#endif - -/* c_iflag bits */ -#define IGNBRK 0000001 -#define BRKINT 0000002 -#define IGNPAR 0000004 -#define PARMRK 0000010 -#define INPCK 0000020 -#define ISTRIP 0000040 -#define INLCR 0000100 -#define IGNCR 0000200 -#define ICRNL 0000400 -#define IUCLC 0001000 -#define IXON 0002000 -#define IXANY 0004000 -#define IXOFF 0010000 -#define IMAXBEL 0020000 - -/* c_oflag bits */ -#define OPOST 0000001 -#define OLCUC 0000002 -#define ONLCR 0000004 -#define OCRNL 0000010 -#define ONOCR 0000020 -#define ONLRET 0000040 -#define OFILL 0000100 -#define OFDEL 0000200 -#define NLDLY 0000400 -#define NL0 0000000 -#define NL1 0000400 -#define CRDLY 0003000 -#define CR0 0000000 -#define CR1 0001000 -#define CR2 0002000 -#define CR3 0003000 -#define TABDLY 0014000 -#define TAB0 0000000 -#define TAB1 0004000 -#define TAB2 0010000 -#define TAB3 0014000 -#define XTABS 0014000 -#define BSDLY 0020000 -#define BS0 0000000 -#define BS1 0020000 -#define VTDLY 0040000 -#define VT0 0000000 -#define VT1 0040000 -#define FFDLY 0100000 -#define FF0 0000000 -#define FF1 0100000 - -/* c_cflag bit meaning */ -#define CBAUD 0010017 -#define B0 0000000 /* hang up */ -#define B50 0000001 -#define B75 0000002 -#define B110 0000003 -#define B134 0000004 -#define B150 0000005 -#define B200 0000006 -#define B300 0000007 -#define B600 0000010 -#define B1200 0000011 -#define B1800 0000012 -#define B2400 0000013 -#define B4800 0000014 -#define B9600 0000015 -#define B19200 0000016 -#define B38400 0000017 -#define EXTA B19200 -#define EXTB B38400 -#define CSIZE 0000060 -#define CS5 0000000 -#define CS6 0000020 -#define CS7 0000040 -#define CS8 0000060 -#define CSTOPB 0000100 -#define CREAD 0000200 -#define PARENB 0000400 -#define PARODD 0001000 -#define HUPCL 0002000 -#define CLOCAL 0004000 -#define CBAUDEX 0010000 -#define B57600 0010001 -#define B115200 0010002 -#define B230400 0010003 -#define B460800 0010004 -#define B500000 0010005 -#define B576000 0010006 -#define B921600 0010007 -#define B1000000 0010010 -#define B1152000 0010011 -#define B1500000 0010012 -#define B2000000 0010013 -#define B2500000 0010014 -#define B3000000 0010015 -#define B3500000 0010016 -#define B4000000 0010017 -#define CIBAUD 002003600000 /* input baud rate (not used) */ -#define CMSPAR 010000000000 /* mark or space (stick) parity */ -#define CRTSCTS 020000000000 /* flow control */ - -/* c_lflag bits */ -#define ISIG 0000001 -#define ICANON 0000002 -#define XCASE 0000004 -#define ECHO 0000010 -#define ECHOE 0000020 -#define ECHOK 0000040 -#define ECHONL 0000100 -#define NOFLSH 0000200 -#define ECHOCTL 0001000 -#define ECHOPRT 0002000 -#define ECHOKE 0004000 -#ifdef __mips__ -#define IEXTEN 0000400 -#define FLUSHO 0020000 -#define TOSTOP 0100000 -#else -#define TOSTOP 0000400 -#define FLUSHO 0010000 -#define IEXTEN 0100000 -#endif -#define PENDIN 0040000 - -/* tcflow() and TCXONC use these */ -#define TCOOFF 0 -#define TCOON 1 -#define TCIOFF 2 -#define TCION 3 - -/* tcflush() and TCFLSH use these */ -#define TCIFLUSH 0 -#define TCOFLUSH 1 -#define TCIOFLUSH 2 - -/* tcsetattr uses these */ -#ifdef __mips__ -#define TCSANOW 0x540e -#define TCSADRAIN 0x540f -#define TCSAFLUSH 0x5410 -#else -#define TCSANOW 0 -#define TCSADRAIN 1 -#define TCSAFLUSH 2 -#endif - -int tcgetattr(int fd, struct termios *termios_p) __THROW; -int tcsetattr(int fd, int optional_actions, struct termios *termios_p) __THROW; -speed_t cfgetospeed(struct termios *termios_p) __THROW; -int cfsetospeed(struct termios *termios_p, speed_t speed) __THROW; -speed_t cfgetispeed(struct termios *termios_p) __THROW; -int cfsetispeed(struct termios *termios_p, speed_t speed) __THROW; -void cfmakeraw(struct termios *t) __THROW; - -int tcflush(int fd, int queue_selector) __THROW; -int tcdrain(int fd) __THROW; -int tcflow (int fd,int action) __THROW; -int tcsendbreak (int fd,int duration) __THROW; - -#endif diff --git a/mdk-stage1/dietlibc/include/time.h b/mdk-stage1/dietlibc/include/time.h deleted file mode 100644 index 29681fa3d..000000000 --- a/mdk-stage1/dietlibc/include/time.h +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef _TIME_H -#define _TIME_H - -#include -#include - -extern int __isleap(int year); - -int nanosleep(const struct timespec *req, struct timespec *rem) __THROW; - -time_t mktime(struct tm *timeptr) __THROW __pure__; - -char *asctime(const struct tm *timeptr) __THROW; -char *asctime_r(const struct tm *timeptr, char *buf) __THROW; - -char *ctime(const time_t *timep) __THROW; - -size_t strftime(char *s, size_t max, const char *format, const struct tm *tm) __THROW __attribute__((format(strftime,3,0))); -time_t time(time_t *t) __THROW; - -int stime(time_t *t) __THROW; - -double difftime(time_t time1, time_t time0) __THROW __attribute__((const)); - -#define CLOCKS_PER_SEC 1000000l - -extern long int timezone; -extern int daylight; -extern char* tzname[2]; - -void tzset (void) __THROW; - -struct tm* localtime(const time_t* t) __THROW; -struct tm* gmtime(const time_t* t) __THROW; -struct tm* localtime_r(const time_t* t, struct tm* r) __THROW; -struct tm* gmtime_r(const time_t* t, struct tm* r) __THROW; - -clock_t clock(void); - -#endif diff --git a/mdk-stage1/dietlibc/include/unistd.h b/mdk-stage1/dietlibc/include/unistd.h deleted file mode 100644 index 2fba5d584..000000000 --- a/mdk-stage1/dietlibc/include/unistd.h +++ /dev/null @@ -1,233 +0,0 @@ -#ifndef _UNISTD_H -#define _UNISTD_H - -#include -#include -#include -#include -#include - -extern int optind,opterr; -extern char *optarg; -int getopt(int argc, char *const argv[], const char *options); - -/* Values for the second argument to access. - These may be OR'd together. */ -#define R_OK 4 /* Test for read permission. */ -#define W_OK 2 /* Test for write permission. */ -#define X_OK 1 /* Test for execute permission. */ -#define F_OK 0 /* Test for existence. */ - -/* Test for access to NAME using the real UID and real GID. */ -extern int access (const char *__name, int __type) __THROW; - -#ifndef SEEK_SET -#define SEEK_SET 0 -#define SEEK_CUR 1 -#define SEEK_END 2 -#endif - -#define STDIN_FILENO 0 -#define STDOUT_FILENO 1 -#define STDERR_FILENO 2 - -off_t lseek(int fildes, off_t offset, int whence) __THROW; -#ifndef __NO_STAT64 -loff_t lseek64(int fildes, loff_t offset, int whence) __THROW; -#if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64 -#define lseek(fildes,offset,whence) lseek64(fildes,offset,whence) -#endif -#endif - -int chdir(const char *path) __THROW; -int fchdir(int fd) __THROW; -int rmdir(const char *pathname) __THROW; -char *getcwd(char *buf, size_t size) __THROW; - -int open(const char* pathname,int flags, ...) __THROW; -int open64(const char* pathname,int flags, ...) __THROW; -int creat(const char* pathname,mode_t mode) __THROW; -int creat64(const char* pathname,mode_t mode) __THROW; -int write(int fd,const void* buf,size_t len) __THROW; -int read(int fd,void* buf,size_t len) __THROW; -int close(int fd) __THROW; - -int unlink(const char *pathname) __THROW; - -int pread(int fd, void *buf, size_t count, off_t offset); -int pwrite(int fd, const void *buf, size_t count, off_t offset); - -int execve(const char *filename, char *const argv [], char *const envp[]) __THROW; -int execlp(const char *file, const char *arg, ...) __THROW; -int execv(const char *path, char *const argv[]) __THROW; -int execvp(const char *file, char *const argv[]) __THROW; -int execl(const char *path, ...) __THROW; -int execle(const char *path, ...) __THROW; - -pid_t getpid(void) __THROW; -pid_t getppid(void) __THROW; - -int setpgid (pid_t pid,pid_t pgid) __THROW; -pid_t getpgid (pid_t pid) __THROW; -int setpgrp (void) __THROW; -pid_t getpgrp (void) __THROW; -pid_t getsid(pid_t pid) __THROW; -pid_t setsid (void) __THROW; -int dup (int oldfd) __THROW; -int dup2 (int oldfd,int newfd) __THROW; - -struct dirent; -struct dirent64; -int getdents(int fd, struct dirent *dirp, unsigned int count) __THROW; -int getdents64(int fd, struct dirent64 *dirp, unsigned int count) __THROW; - -pid_t fork(void) __THROW; -pid_t vfork(void) __THROW; - -int readlink(const char *path, char *buf, size_t bufsiz) __THROW; -int symlink(const char *oldpath, const char *newpath) __THROW; -int link(const char *oldpath, const char *newpath) __THROW; - -int chown(const char *path, uid_t owner, gid_t group) __THROW; -int fchown(int fd, uid_t owner, gid_t group) __THROW; -int lchown(const char *path, uid_t owner, gid_t group) __THROW; - -int fsync(int fd) __THROW; -#define _POSIX_SYNCHRONIZED_IO -int fdatasync(int fd) __THROW; - -int pipe(int filedes[2]) __THROW; - -char *ttyname (int desc) __THROW; - -int brk(void *end_data_segment) __THROW; -void *sbrk(ptrdiff_t increment) __THROW; - -int gethostname(char *name, size_t len) __THROW; -int sethostname(const char *name, size_t len) __THROW; - -int usleep(unsigned long useconds) __THROW; -unsigned int sleep(unsigned int seconds) __THROW; - -unsigned int alarm(unsigned int seconds) __THROW; -int sync(void) __THROW; - -int isatty(int desc) __THROW; - -void _exit(int status) __THROW __attribute__((noreturn)); - -extern int daemon(int nochdir,int noclose) __THROW; - -int pause(void) __THROW; - -#if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64 -#define open open64 -#define creat creat64 -#define truncate truncate64 -#define ftruncate ftruncate64 -#define getdents getdents64 -#endif - -extern char* getlogin(void) __THROW; -/* warning: the diet libc getlogin() simply returns getenv("LOGNAME") */ - -int chroot(const char *path) __THROW; - -uid_t getuid(void) __THROW; -uid_t geteuid(void) __THROW; -gid_t getgid(void) __THROW; -gid_t getegid(void) __THROW; -int setuid(uid_t uid) __THROW; -/* int seteuid(uid_t uid) __THROW; */ -int setgid(gid_t gid) __THROW; -/* int setegid(gid_t gid) __THROW; */ -int setregid(gid_t rgid, gid_t egid) __THROW; -int setreuid(uid_t ruid, uid_t euid) __THROW; -#define seteuid(euid) setreuid(-1,euid) -#define setegid(egid) setregid(-1,egid) - -int rename(const char *oldpath, const char *newpath) __THROW; -int truncate(const char *path, off_t length) __THROW; -int ftruncate(int fd, off_t length) __THROW; -#ifndef __NO_STAT64 -int truncate64(const char *path, loff_t length) __THROW; -int ftruncate64(int fd, loff_t length) __THROW; -#endif - -int select(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout) __THROW; - -int nice(int inc) __THROW; - -extern char **__environ; - -char *crypt(const char *key, const char *salt) __THROW; -void encrypt(char block[64], int edflag) __THROW; -void setkey(const char *key) __THROW; - -size_t getpagesize(void) __THROW __attribute__((__const__)); - -int getdomainname(char *name, size_t len) __THROW; -int setdomainname(const char *name, size_t len) __THROW; - -int getgroups(int size, gid_t list[]) __THROW; -int getdtablesize(void) __THROW; -char *getpass(const char * prompt) __THROW; - -/* warning: linux specific: */ -int llseek(int fildes, unsigned long hi, unsigned long lo, loff_t* result,int whence) __THROW; - -/* include to get all the definitions! */ -struct __sysctl_args; -int _sysctl(struct __sysctl_args *args) __THROW; - -#define _SC_CLK_TCK 1 -#define _SC_ARG_MAX 2 -#define _SC_NGROUPS_MAX 3 -#define _SC_OPEN_MAX 4 -#define _SC_PAGESIZE 5 -#define _SC_NPROCESSORS_ONLN 6 -#define _SC_NPROCESSORS_CONF _SC_NPROCESSORS_ONLN -long sysconf(int name) __THROW; -#define _PC_PATH_MAX 1 -#define _PC_VDISABLE 2 - -pid_t tcgetpgrp(int fd) __THROW; -int tcsetpgrp(int fd, pid_t pgrpid) __THROW; - -int profil(unsigned short *buf, size_t bufsiz, size_t offset, unsigned int scale); - -/* Linux only: */ -int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid) __THROW; -int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid) __THROW; -int setresuid(uid_t ruid, uid_t euid, uid_t suid) __THROW; -int setresgid(gid_t rgid, gid_t egid, gid_t sgid) __THROW; - -/* 32-bit uid support */ -int chown32(const char *path, uid32_t owner, gid32_t group) __THROW; -int fchown32(int fd, uid32_t owner, gid32_t group) __THROW; -int lchown32(const char *path, uid32_t owner, gid32_t group) __THROW; -uid32_t getuid32(void) __THROW; -uid32_t geteuid32(void) __THROW; -gid32_t getgid32(void) __THROW; -gid32_t getegid32(void) __THROW; -int setuid32(uid32_t uid) __THROW; -int setgid32(gid32_t gid) __THROW; -int setreuid32(uid32_t ruid, uid32_t euid) __THROW; -int setregid32(gid32_t rgid, gid32_t egid) __THROW; -#define seteuid32(euid) setreuid32(-1,euid) -#define setegid32(egid) setregid32(-1,egid) -int getgroups32(int size, gid32_t list[]) __THROW; -int getresuid32(uid32_t *ruid, uid32_t *euid, uid32_t *suid); -int getresgid32(gid32_t *rgid, gid32_t *egid, gid32_t *sgid); -int setresuid32(uid32_t ruid, uid32_t euid, uid32_t suid) __THROW; -int setresgid32(gid32_t rgid, gid32_t egid, gid32_t sgid) __THROW; - -#ifdef _BSD_SOURCE -char *getusershell(void); -void setusershell(void); -void endusershell(void); -#endif - -#define _POSIX_VERSION 199506L - -#endif diff --git a/mdk-stage1/dietlibc/include/utime.h b/mdk-stage1/dietlibc/include/utime.h deleted file mode 100644 index 41674f379..000000000 --- a/mdk-stage1/dietlibc/include/utime.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef _UTIME_H -#define _UTIME_H - -#include -#include -#include - -struct utimbuf { - time_t actime; /* access time */ - time_t modtime; /* modification time */ -}; - -int utime(const char *filename, struct utimbuf *buf) __THROW; - - -#endif diff --git a/mdk-stage1/dietlibc/include/utmp.h b/mdk-stage1/dietlibc/include/utmp.h deleted file mode 100644 index cc2adc9f6..000000000 --- a/mdk-stage1/dietlibc/include/utmp.h +++ /dev/null @@ -1,94 +0,0 @@ -#ifndef _UTMP_H -#define _UTMP_H - -#include -#include -#include - -#define UT_LINESIZE 32 -#define UT_NAMESIZE 32 -#define UT_HOSTSIZE 256 - -#define _PATH_UTMP "/var/run/utmp" -#define _PATH_WTMP "/var/log/wtmp" -#ifdef _BSD_SOURCE -/* die, BSD, die!!! */ -#define UTMP_FILE _PATH_UTMP -#define WTMP_FILE _PATH_WTMP -#endif - -/* The structure describing an entry in the database of - previous logins. */ -struct lastlog - { - time_t ll_time; - char ll_line[UT_LINESIZE]; - char ll_host[UT_HOSTSIZE]; - }; - -/* The structure describing the status of a terminated process. This - type is used in `struct utmp' below. */ -struct exit_status - { - short int e_termination; /* Process termination status. */ - short int e_exit; /* Process exit status. */ - }; - -/* The structure describing an entry in the user accounting database. */ -struct utmp -{ - short int ut_type; /* Type of login. */ - pid_t ut_pid; /* Process ID of login process. */ - char ut_line[UT_LINESIZE]; /* Devicename. */ - char ut_id[4]; /* Inittab ID. */ - char ut_user[UT_NAMESIZE]; /* Username. */ - char ut_host[UT_HOSTSIZE]; /* Hostname for remote login. */ -#define ut_name ut_user - struct exit_status ut_exit; /* Exit status of a process marked - as DEAD_PROCESS. */ - long int ut_session; /* Session ID, used for windowing. */ -#define ut_time ut_tv.tv_sec - struct timeval ut_tv; /* Time entry was made. */ -#define ut_addr ut_addr_v6[0] - int32_t ut_addr_v6[4]; /* Internet address of remote host. */ - char __unused[20]; /* Reserved for future use. */ -}; - -/* Values for the `ut_type' field of a `struct utmp'. */ -#define EMPTY 0 /* No valid user accounting information. */ - -#define RUN_LVL 1 /* The system's runlevel. */ -#define BOOT_TIME 2 /* Time of system boot. */ -#define NEW_TIME 3 /* Time after system clock changed. */ -#define OLD_TIME 4 /* Time when system clock changed. */ - -#define INIT_PROCESS 5 /* Process spawned by the init process. */ -#define LOGIN_PROCESS 6 /* Session leader of a logged in user. */ -#define USER_PROCESS 7 /* Normal process. */ -#define DEAD_PROCESS 8 /* Terminated process. */ - -#define ACCOUNTING 9 - -/* Tell the user that we have a modern system with UT_HOST, UT_PID, - UT_TYPE, UT_ID and UT_TV fields. */ -#define _HAVE_UT_TYPE 1 -#define _HAVE_UT_PID 1 -#define _HAVE_UT_ID 1 -#define _HAVE_UT_TV 1 -#define _HAVE_UT_HOST 1 - -struct utmp *getutent(void) __THROW; -struct utmp *getutid(struct utmp *ut) __THROW; -struct utmp *getutline(struct utmp *ut) __THROW; - -void pututline(struct utmp *ut) __THROW; - -void setutent(void) __THROW; -void endutent(void) __THROW; - -void utmpname(const char *file) __THROW; - -void updwtmp(const char *wtmp_file, const struct utmp *ut); -void logwtmp(const char *line, const char *name, const char *host); - -#endif diff --git a/mdk-stage1/dietlibc/include/write12.h b/mdk-stage1/dietlibc/include/write12.h deleted file mode 100644 index 960b4b722..000000000 --- a/mdk-stage1/dietlibc/include/write12.h +++ /dev/null @@ -1,4 +0,0 @@ -#include - -int __write1 ( const char* s ) __attribute__ (( regparm(1) )); -int __write2 ( const char* s ) __attribute__ (( regparm(1) )); -- cgit v1.2.1