diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-06-13 08:52:46 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-06-13 08:52:46 +0000 |
commit | 837deb53e102d84d77ffa17334728eb8feb30669 (patch) | |
tree | fc8168b503af84f41fe67904eb9c2523b19a1a16 | |
parent | 3f0e861851681f448489cb09a530ae798f0ca36b (diff) | |
download | drakx-837deb53e102d84d77ffa17334728eb8feb30669.tar drakx-837deb53e102d84d77ffa17334728eb8feb30669.tar.gz drakx-837deb53e102d84d77ffa17334728eb8feb30669.tar.bz2 drakx-837deb53e102d84d77ffa17334728eb8feb30669.tar.xz drakx-837deb53e102d84d77ffa17334728eb8feb30669.zip |
remove deprecated files
141 files changed, 0 insertions, 3444 deletions
diff --git a/mdk-stage1/dietlibc/BUGS b/mdk-stage1/dietlibc/BUGS deleted file mode 100644 index d030db5e6..000000000 --- a/mdk-stage1/dietlibc/BUGS +++ /dev/null @@ -1,8 +0,0 @@ -Please report bugs to - - felix-dietlibc@fefe.de - -or to the mailing list at - - dietlibc@fefe.de - diff --git a/mdk-stage1/dietlibc/CAVEAT b/mdk-stage1/dietlibc/CAVEAT deleted file mode 100644 index efd20d6f5..000000000 --- a/mdk-stage1/dietlibc/CAVEAT +++ /dev/null @@ -1,5 +0,0 @@ - -Beware! Much of this code is untested! - -Someday, we will have a test suite and everything will be just fine. - diff --git a/mdk-stage1/dietlibc/CHANGES b/mdk-stage1/dietlibc/CHANGES deleted file mode 100644 index de4f88c3e..000000000 --- a/mdk-stage1/dietlibc/CHANGES +++ /dev/null @@ -1,911 +0,0 @@ -0.22: - fix i386 libm - fix netinet/ip_icmp.h (Rui Prior) - make strings.h susv3 compliant (Gunnar Ritter) - remove stdio dependence in abort - fix truncate64, ftruncate64 (Luc Van Oostenryck and Yuri Kozlov) - fix and improve erand48() (Luc Van Oostenryck) - fix realpath for non-existant directories (Gergely Nagy and Gerrit Pape) - fix DNS timeout and IPv6 socket reuse - strtoul now accepts "-1" as well (Thomas Ogrisegg) - add i386 strcasecmp and __ltostr (Thomas Ogrisegg) - add killpg prototype (Luc Van Oostenryck) - remove some compiler warnings (Luc Van Oostenryck) - better rand() from Knuth's TAOCP (Luc Van Oostenryck) - fix unified x86_64 unified syscall 64-bit return value issue (Gwenole) - the getdents64 emulation was broken and repairing it opened a can of - worms. So I ripped it out. I also changed the readdir64 emulation - to work if there is no getdents64. - fix ia64 start.S (Thanks to Volker Birk for an account on his ia64 box) - many ia64 fixes (waitpid, nice, fork, vfork, time, utime ...) - More fixes from Gwenole (printf %p only printed the last 32 bits, I - botched the getdents64 #ifdefs, we violated the x86_64 ABI) - change signal() to do as glibc does - remove a few more warnings - add new 2.5 syscall #defines - add epoll_create, epoll_ctl and epoll_wait - the new x86 syscall numbers exceed 255, breaking our %al optimization - I worked around it with conditional assembly in cpp macros. Ugh. - more MIPS fixes (the stoned MIPS ABI for restartable syscalls expects - the instruction before the syscall to be a load immediate) - fix fread() from a pipe (oops, tried to lseek) - #define _POSIX_VDISABLE in termios.h (Laurent Bercot) - two *printf fixes (Gernot Tenchio) - add nan and +-inf handling in __dtostr - add _SC_NGROUPS_MAX support to sysconf (Felix J. Ogris) - make assert() use expect(), slight optimization - add i386 vfork (Thomas Ogrisegg) - fix SA_NODEFER on sparc (Gerrit Pape, Thomas Bader) - fix sin, cos and __dtostr (Gernot Tenchio) - add /dev/epoll ioctl constants to sys/ioctl.h - add linux/eventpoll.h for /dev/epoll - fix lseek64 on 64-bit architectures - Olaf: fix x86_64 start-code (we have reg-args) - fixing some broken macros in sparc32-code (.udiv,.urem) - adding strndup (GNU Extension) - fix glob strncpy (R.L. Horn) - fix regfree (Uwe Ohse) - fix puts in full stdio mode (would omit \n) - fix wrong types on powerpc, broke *stat (Gerrit Pape) - allow more than 64k in i386 memchr (Karsten Scheibler) - make strftime work it WANT_TZFILE_PARSER is not set (Gwenole Beauchesne) - build parisc on parisc64, change libgcc link order on sparc (Gerrit Pape) - -0.21: - use gcc's size_t, ptrdiff_t and wchar_t types (Olaf) - use -G 8 on MIPS to reduce code size (Johannes Stezenbach) - add munlock (Jens Låås) - argh, atexit fell victim to bit rot (or maybe Olaf) - add WANT_INET_ADDR_DNS to make gethostbyname not look up IP numbers - but use them to fill in the struct hostent directly. - signal is now a correct signal (Olaf) - read optimizer cflags for diet -Os gcc from ~/.diet/gcc, overriding - the built-in defaults. - add file "SECURITY". I will document design tradeoffs that have - security implications there. - fixed regex LINEEND condition - add .size directive to i386 syscalls - shove a few more bytes off the i386 socket calls - setjmp, longjmp and clone for x86_64 are now implemented but not tested (Olaf) - fix sparc signals - -0.20: - calloc was botched - umount and stime for x86_64 (Gwenole Beauchesne) - some malloc fixes for very big numbers (Enrico Scholz, me) - x86_64 unified syscall did not preserve rbx violating ABI (Gwenole) - realpath fix if path did not contain a slash (Gwenole) - add ucontext - add asm/statfs.h to work around people using <linux/fs.h> - -0.19: - current gcc cvs makes __thread a keyword (Eric Troan) - be more strict regarding hostile DNS packets (me) - fix ia64 compile problems (Gerrit Pape) - make killpg a function and not a macro (broke bash 2.05b) - fix ia64 start code and unified syscall (me) - add sparc/strlen.S from Thomas Ogrisegg - add more space to ARM __jmp_buf in setjmp.h (Andre) - fix libcompat/syscall.S (did't compile on arm) - add integer overflow fix in xdr_array after bugtraq advisory (me) - fix x86_64 socket calls and mmap (and some more) (Gwenole Beauchesne) - add calloc integer overflow fix after RUS-CERT advisory (me) - add fread and fwrite integer overflow fix (me) - -0.18: - add stpcpy (from Thomas Ogrisegg) - check in mktime fix (from Luc Van Oostenryck) - add libm2.s from contrib to i386 (oops, how long has it been sitting - there?) - add truncate64 and ftruncate64 and prototype for truncate (only had ftruncate) - Michal Ludvig ported the diet libc to the x86_64 architecture (the - upcoming AMD Hammer chips!). You can't even buy the chips yet and - the diet libc already supports it! Amazing ;-) - Michal's patch also fixed several of the outstanding warnings. Thanks! - Andre sent a patch to add ARM profiling. He says it does not work - yet, but it's a start. - added getdents64 backwards compatibility and include it in large file - support #defines - perror now checks if the message is NULL like glibc (Thomas Ogrisegg) - ftell did not take ungetc into account (Kevin Ryde through Debian). - Thomas Ogrisegg sent a port to IA64! - sigaddset, sigdelset and setismember segfaulted for signal 0 (Gunnar Ritter) - Enrico Scholz reported several bugs in the header files. - change __malloc__ to __attribute_malloc__ - add pa-risc socketcall (but see TODO) (Felix J. Ogris) - fix *rand48 initialization (Kevin Ryde) - fnmatch infinite loop fix (Piotr Esden-Tempski) - make signal() into a sigaction wrapper function - add memrchr (Emil) - remove __attribute__((const)) from getpid() (Yuri Kozlov) - make getserv* also work if proto is NULL (Jens Låås) - now clone on parisc works (Thomas Ogrisegg) - getopt* fix from Thomas Walpuski - add syscall() to libcompat (Thomas Ogrisegg) - fix strncpy and strrchr i386 assembly versions for dynamic linking - (John K. Hohm) - allow short option grouping in getopt* (Ralf Wildenhues) - make the DNS resolver IPv6 transport capable (WANT_IPV6_DNS) - mention -v in diet.1 (Bryan Henderson) - auto-detect gcc 3 on i386 and remove compiler option warnings - putenv tweak (Thomas Ogrisegg) - add missing socket syscalls for PA-RISC and IA64 (Thomas Ogrisegg) - add cpio.h and tar.h (Thomas Ogrisegg) - change opendir/readdir/closedir from malloc to mmap (Thomas Ogrisegg) - cleanups from Florian LaRoche - -0.17: - fix several bugs in getservent_r - Gunnar Ritter reported the following: - moved tcgetpgrp and tcsetpgrp to unistd.h - adjusted lstat->lstat64 #define to make it work with function pointers - move __dietlibc__ #define from features.h to diet - Thomas Ogrisegg sent x86 memccpy and strncpy routines and introduced - an dietfeatures.h #define WANT_FULL_POSIX_COMPAT - Thomas also sent me profiling support (so far only on x86, but - profiling/PORTING describes what needs to be done for other - architectures)! - add contrib/dprof.c, also from Thomas. - Andreas Krennmair sent a patch to add the BSD regex interface to - libcompat - Andre noticed that __dtostr never sets first to false. Oops! - Andre has provided a largely untested patch that seems to fix the problem. - Igor Gilitschenski sent a patch for the "%8.7lx" issue. - abort did not flush all stdio streams - fix some nasty regular expression bugs - write a stupid malloc checker (contrib/debug-realloc.c) to help me - debug my regular expressions. Please read contrib/debug-realloc.txt - our i386 memchr,memcmp were broken for the count=0 case - fix DNS domain search - i386 memccpy exchanged esi and edi :-( I should do more checks before - accepting external code... - -0.16: - "diet -v" or "diet -Os" segfaulted without further arguments. - Andre found two very embarassing bugs in my four lines of md5 glue. - I need to get more sleep. - Thanks Ogrisegg found that ptrace does not work as documented and - provided a wrapper that emulates the glibc behaviour. - Dirk Engling saved 8 bytes and 4 cycles in the ARM clone() - fix ptrace.h for S/390 and ARM - provide a PORTING document so we don't lose track of which file need - to be touched to port the diet libc to a new platform. - remove a few warnings - provide a prototype for usleep. - make __dtostr work on ARM by using long instead of long long. - Idea by Dirk Engling. - fix an argument counting bug in *scanf (Thomas Ogrisegg) - Forgot an #endif in asm/sigcontext.h (Mike Castle) - Kurt Garloff sent in patches to - fix struct termios on non-x86 architectures - printf("%+05d\n",500) was broken (Raimar Falke told me, Olaf fixed it) - create libcompat.a (and move daemon to it) - add getdelim and getline - *printf now recognize 'z' integer flag (and ignore it) - Dirk Engling provided a strcpy.S for ARM. - Olaf: fixed *scanf familie. It hadn't wored with "long long". - Hans Lermen fixed i386/getenv.S - diet -Os no longer discards -fpic and -fno-pic - fix i386 rand/random to use correct RAND_MAX (thanks, Jaroslav - Macodiseas) - sys/ipc.h now includes sys/types.h - Olaf: started to make the sparc64 port - scandir should not sort if compar() is NULL (reported by Andrea Marrosu) - -0.15: - vfork sucks. I reverted to the old behavior where vfork==fork. - fix bsearch (and remove i386 assembly bsearch, needs to be redone). - Thanks Ogrisegg sent a patch to make the PA-RISC unified syscall - thread-safe! - remove vfork and add alarm to dynamic syscalls. - fix diet-dyn to link in dyn_dstop.o and not dyn_stop.o. - The MD5 code generated unaligned accesses when passed an unaligned - pointer on little endian ARM and MIPS. - MIPS unified syscall didn't compile anymore. - Put up new mipsel target to cross compile for little endian mips. - The mips target will again explicitly set endianness to big endian. - Compiling natively on a MIPS box should not touch the endianness. - Duh, when we removed return0, we broke tzset when the time zone parser - was disabled. Uwe Ohse noticed this. Thanks! - Fix gethostbyname to match host names case insensitively in /etc/hosts. - Oops, this was reported 6 weeks ago but I overlooked the email. - Thanks, Denis Rachal! - vsnprintf's zero termination was broken. - Uwe Ohse found a few more bugs: - Remove WANT_BUGGY_GLIBC_STRSEP. The Linux man page is broken, glibc - does it correctly. - Make inet_aton use strtoul instead of strtol - fdopen would close the file descriptor if it could not malloc the - buffer. - strftime updates. - Make _FILE_OFFSET_BITS includes -Wundef clean - Andre found a typo in endian.h for big endian mips - Ryan told me that fmod was not included in libm. Oops. - strstr(whatever,"") returned NULL, not whatever. Found by a new test - suite entry for strstr that I wrote. - Thomas Ogrisegg suggested or sent patches for the following: - add <asm/sigcontext.h> for profiling support. - make strncpy a #define in string.h to save a few bytes. - an i386 assembler getenv implementation (roughly half the size) - add grantpt, ptsname, unlockpt - add a getenv test suite entry. - Andre contributed an ARM assembler md5 implementation and he fixed mmap - on ARM. - add glibc macro names in sys/reboot.h. Mentioned by Laurent G. Bercot - getservent_r did not parse lines without aliases. Thanks, Jaroslav - Macodiseas! - fix MIPS start code (argv[0] was always corrupt) - removed annoying -Wconversion gcc switch - add -v to diet.c and fix MIPS CFLAGS in diet. Thanks, Johannes Stezenbach - Kurt Garloff sent these diffs: - add fdatasync (and make it a pthread cancellation point) - numerous alpha issues, like using .quad instead of .long for - offsets, change strip to -strip in Makefile (so a failing strip does - not abort the make), try to be more friendly to the gcc 2.96 that - SuSE 7.1 AXP ships with. - -0.14: - fix brk again (missing __brk, trivial oversight) - a new i386/atol.S that is 4 bytes smaller (and faster, too!). Thanks, - Thomas Ogrisegg! - Thomas also contributed a PA-RISC port including testandset, so - libpthread will work once we implement clone! Great work, Thomas. - made the fake locale more believable. - If you need gettext, use http://www.ca.postgresql.org/~petere/gettext.html - moved _exit into the unified syscall on x86. - Uwe Ohse found many more bugs: - getpass EINTR handling, ttyname, sysconf_cpus with SLASH_PROC_OK, - liblatin1 was more or less completely broken if you gave it chars as - arguments, not ints (signedness). execvp had a buffer overflow in - case a PATH element exceeded PATH_MAX, but it's not a security - problem since setuid programs need to set their path to some known - value anyway. - hasmntopt did not work with foo=bar style options - Uwe also improved ftw's stack usage. - Put movl instead of popl rationale in comment in i386/unified.S since - three people have suggested saving a few bytes with popl now ;) - I discovered __attribute__((malloc)) and started using it. For gcc 3, - it improves the optimizer when functions return malloced pointers. - Steven Rostedt pointed out that my setvbuf was broken with regard to - size==0 and sent a patch to fix it. - Thomas Ogrisegg made setenv smaller. - Olaf: implemented the parisc clone and an atomic testandset, modified the - libpthread to respect the parisc UPgrowing stack. still non functional, - because the unified syscall uses errno :( - tcgetospeed read from the wrong termios field. Thanks, Gunnar Ritter! - Fixed asprintf (relied on vsnprintf(NULL,...) to return length but - don't write anything which was no longer the case. It also - allocated one byte unnecessarily, which Uwe Ohse found. - Fix ttyname (readlink does not \0-terminate, forgot to do that). - -0.13: - add readdir64 and automatic mapping if _FILE_OFFSET_BITS == 64 - make diet not include the linker safeguard stuff when preprocessing - Olaf: port to S/390! - me: fix vfork (it was put into dietlibc.a twice) - res_query did not initialize last - diet (not diet-dyn, of course) now adds -static to the gcc command line - fixed fflush on input streams (tic from ncurses exposed this) - duh, there is an alarm system call, too, so we use it and not setitimer - fix comparison in gmtime_r that caused Jan 1 to be converted to Dec 32. - rewrote __dtostr (it also has one more argument now) - Thanks to Erik Troan for bringing these to my attention: - make putenv behave like glibc (putenv("HOME") == unsetenv("HOME")) - fix strncat for the case where n == 0 (security implications?) - fix bsearch (it didn't find the very last element in the array, same - bug in both the C and the i386 assembly version). - fixed FNM_PATHNAME in fnmatch - fix brk (the syscall was documented incorrectly in the Linux man page) - Thanks, Thomas Ogrisegg! - added negated character classes to fnmatch (not required by POSIX) - make the utmp routines open utmp read-only if read-write doesn't work. - remove syscalls.c directory, it is obsolete now with unified syscalls - -0.12: - more contributions from Frank Klemm. - iconv can now do UCS-2, too. - Imported several x86 assembly routines from Wouter van Kleunen. - Lots of bug fixes, and several more i386 specific versions of common - routines to make them smaller. - add memmem (a GNU extension that looks useful) - several changes from Michal Ludvig: inttypes.h gets C99 macros, - add pivot_root syscall, %n for *scanf. - add adjtimex (thanks, Laurent BERCOT) - add Frank Klemm's optimized md5 - add -Os option to diet (see diet.1). - several IPv6 constants and HZ were missing, thanks Johannes Kloos. - add 32-bit uid/gid syscalls. - add rand48 (thanks, Johannes Kloos) - fixed a lot of bugs in getopt* (thanks, Johannes) - add strxfrm and tweak limits.h. glib-1.3.8 now compiles without changes. - add a few more module syscalls. modutils-2.4.9 now compiles without changes. - fix gethostent alias list termination. Major oops. - add execle and two DNS constants (from Johannes Kloos). - opendir did not close-on-exec (thanks, Laurent Bercot). - DNS will now properly signal errors and set h_errno. - A few more cleanups (thanks, Andreas Jabs and Matthias Andree). - Added an uber-cool linker safeguard feature! Idea by Matthias Andree. - If you enable WANT_SAFEGUARD in dietfeatures.h, diet will include an - external reference to a symbol that is only in the diet libc. So, - when you accidentally link a diet libc compiled object file against - glibc, the linker will barf. This will bloat your object files, but - you can remove all the references with "strip -R .note" from - the binaries in the end (which you should do anyway). - fix ARM unified syscall (select did not work). - add getpwent_r ala glibc and replace getpwent - do the same for getgrent and getspent - remove entlib (new code is smaller) - rewrite getserv* to use parselib (and provide ..._r, too) - add getpwnam_r and getpwuid_r - rewrite getproto* to use parselib (and protive ..._r, too) - Olaf muddled with the dynamic linker. It's a clean-room - implementation in the sense that it once worked for Olaf in a clean - room ;) - add if_nameindex and if_freenameindex. - fixed arm unified syscalls to work with current binutils (; is no - longer a line separator but starts a comment, switched to .macro) - changed all st_[cma]time types to signed long so comparisons against - LONG_MIN will work correctly. (GNU tar does this) - fixed two bugs regarding ungetc. - add getusershell, setusershell, endusershell (for vs_ftpd) - add prctl, dirfd (also for vs_ftpd) - fixed strftime (was completely hosed) - added real make install target - -0.11: - fix major oops in DNS routines (only with WANT_FULL_RESOLV_CONF enabled). - fix vsscanf bug (Thanks, David Chappell). - add floor, ceil and memchr prototypes. - add __builtin_expect and expect #defines for gcc versions below 3.0 - cleaner errno vs __errno_location handling - add placeholder iconv (iconv_open will always return EINVAL) - try to remove kernel 2.4 header dependency in IPv6 sockaddr_in6 - initialization of getaddrinfo. - fix vsnprintf %X (printed lower case) - I wrote a new getopt. It appears to actually work (it is POSIX - compliant, it does not sort argv like the GNU version) and is only - a little over 300 bytes on x86. - Guillaume Cottenceau just wrote me that strncat should be even more - broken than it already is: it should append n bytes AND THEN \0! - I wonder how many programmers have produces off-by-one errors here... - Fix regexec offset return. autoconf now believes that diet libc has - POSIX regular expressions. - Fix fnmatch (a/b/* matched a/b/c/d even if FNM_PATHNAME was set) - Fix regular expression match for x* when there is no x at all. - Fix memory leak in error case in gethostbyname(2|). Thanks, Dietz Pröpper. - Add %h to vsnprintf. - Add FAQ. - Make %h work for signed numbers and add %hh to vsnprintf. - initgroups ignored the group argument :-( - remove printf references and nested functions from glob. - added an errno in libpthread that will display a prominent linker - warning. - started getting rid of kernel headers. Big task! :-( - add res_mkquery. The diet libc can now compile and link mtr. - Olaf: added a lot of code in libdl (not yet complete), changed the - startup code to make it work with his libdl and ld.so (needs still work - too) - __dns_readstartfiles only took the first domain or search path. - Thanks, Anthony de Boer - Olaf: added clone and a new unified_syscall for PowerPC - also dynlinker is now available (i386 only at this time) - crufted together a stdarg.h implementation from the various gcc headers. - implement getopt_long (ugh, the GNU people need professional help) - fixed word delimiters in regex (they looked for space, i.e. "," did - not work as delimiter) - errno.h now declares sys_errlist and sys_nerr. - added mkdtemp. - Uwe Ohse reported all of the following bugs: - ttyname should return 0 if !isatty. - realpath returns NULL if "." cannot be opened - putenv erroneously accepted (and mishandled) entries without "=". - popen returned 255 instead of 127 if /bin/sh could not be run. - fgetc did not set the internal EOF indicator on EOF. - bsearch contained an assumption about integer arithmetic overflow - behavior. - system did not set SIGCHLD and thus contained a race. - popen did not set close-on-exec and could leak an fd on malloc error. - daemon did not check whether open returns an fd below 3 - perror did not save errno. - Olaf: Peter Jones reported some problems with perror; strerror had the - same problem. - Peter also posted a patch to atexit/exit. With some modifications it is - now implemented. - Unbuffered stdio and ungetc can no longer be disabled. I will try to - implement part of it using ELF weak symbols. - Added minimal sysconf (tehe) from David Chappell. - Added overflow handling for strtoul and strtol. - Added WANT_ETC_HOSTS in dietfeatures.h and made gethostbyname/2 use - it before falling back to DNS if enabled. - Added a littie backwards compatibility cruft for gpm (man, do these - sources stink!) - Added openpty. - Squeeze a few bytes off the is* routines, courtesy of Peter Jones. - Fix fseek return value. - Add dirname and basename. - Add a few i386 math routines contributed by Frank Klemm. - Fixed getservent (did not allow _ and - in the aliases). - Thanks, Oden Eriksson - Added a float.h so configure believes we have ANSI header files. - Fix a lot more stdio bugs that Uwe Ohse pointed out. - Olaf: has added a new scanf and printf core that is suitable for all - scanf and printf function implementations - Imported a few more functions and optimizations from Frank Klemm (he - also rewrote dtostr to have more precision) - Olaf: checked in a new sig* function family (based on rt_sig*). - legacy <2.2 signal-handling doesn't work at the moment. - Made rudimentary iconv that can convert back and forth between - iso-8859-1, utf-8 and ucs-4 (for debugging). - Thanks to Markus Kuhn for the excellent utf-8(7)! - -0.10: - update getpagesize. - add personality. - add "%*s" and "%*.*s" support to vsnprintf. - add putchar (apparently arm-linux-gcc will substitute printf("\n") - with putchar('\n') behind your back...?! - import include/scsi/ from glibc. - add iopl. - add execl and sigdelset prototypes. - add getopt_long stuff to getopt.h (may compile but won't link). - add RPC headers (no code yet). - add mlockall, munlockall - make "diet gcc foo.c" work. - added Sun RPC code and removed as many warnings as possible in a - heroic act of self-mutilation. - added getproto* and getdtablesize for the RPC cruft :-( - added getpass. mount from util-linux actually compiles now! - fix the sig*set routines. mount actually works now *bg* - fix fwrite dividing by zero when trying to fwrite n records of size 0. - added an initial regex implementation (3500 bytes!!!). - add llseek and lseek64 with optional lseek fall-back. - add res_init. - add asprintf (ugh, what an ugly function). - expanded arpa/nameser.h to include backwards compatibility defines - add ut_name alias to ut_host in struct utmp. - add inet_ntop, inet_pton, gethostbyname2. - add sysinfo, recvmsg, sendmsg. - add endmntent, getmntent, setmntent. - fix fnmatch (thanks, Guillaume Cottenceau!) - add setenv. - remove __restrict from mntent.h, add __restrict__ removal alias for - older gcc versions in sys/cdefs.h. - add rlim_t, sig_atomic_t declarations. - add sigsetjmp #define for __sigsetjmp (oops). - (Thanks to Chris Siebenmann for these three bug reports) - add a gruesome hack to printf floating point to accept %f and kludge - together support for %.2f. Don't look at the code, please! - fixed tcsetpgrp (oops, this is embarassing! Thanks, Chris Siebenmann) - imported fix for entlib by Jeff Garzik. - add glob implementation from Guillaume Cottenceau (Thanks!!) - add libdl fragments from Olaf (Yeah! One step closer to dynamic linking!) - add REG_ICASE and word start/end handling to my regular expressions. - my regular expressions now actually match substrings (i.e. "foobar" to "bar"). - wrap getcwd to comply to man page (the syscall returns the number of - bytes, not the buffer) - add realpath. - fix vfprintf. - fix *scanf %s zero termination. - add abs, labs, llabs. - add <sys/io.h>, ioperm syscall. - add flock to <sys/file.h> - fixes to bsearch and the regular expressions. - add fake herror. - add scandir and alphasort. - add killpg - implemented a gross hack to make libpthread compile when - dietfeatures.h does not define WANT_THREAD_SAFE (it's empty then). - add getaddrinfo and freeaddrinfo (man, what a fucked up interface!) - fix sigsuspend (syscall had completely fscked up arguments!) - RLIM_INFINITY from the kernel is broken. Thanks to Chris Siebenmann - for sending a patch. - add getserv*. - add WANT_FULL_RESOLV_CONF so that the DNS routines use "domain" and - "search" from resolv.conf. - -0.9: - fixed initgroups (oops) - Cleanup appending file open for stdio (thanks, James Antill) - imported vfprintf fix from James Antill. - add fnmatch - change index, rindex and bcmp as weak ELF symbols (were #defined before) - Olaf added character classes to *scanf. - Put object and library files into a separate directory (bin-$ARCH). - Add "cross" make target to make all architectures. - Add "diet" program and man page. - Add getgrnam, getgrgid - Add cfmakeraw (Thanks, Antonio Musumeci) - localtime won't call gettimeofday when the tzfile parser is used. - -0.8: - vsnprintf(0,...) estimated the length of strings with a padding width - incorrectly. - new reboot() from Olaf. - added prototypes for getsockopt and setsockopt. - added experimental sem* and shm* - define EXIT_SUCCESS and EXIT_FAILURE - added setvbuf (only changes mode, not buffer) - added dietwarning.h (woohoo, linker warnings!) and used it to warn of - insecurity (system, sprintf) or bloat (printf and stdio). - added qsort() and bsearch(). Benchmark on 1000 random ints: - glibc: 679414 cycles qsort and 3352 cycles bsearch - diet libc: 300010 cycles qsort, 553 cycles bsearch - I have no idea why glibc is so slow. - added __isnan (references by libm.a from glibc). - added popen() and pclose(). Now the diet libc can link slsh (from - S-Lang!) - corrected usleep. It was more of an msleep until now. - corrected __dtostr (it looped when trying to format "0.0"). - several fixes to stdio (thanks to S-Lang's excellent test suite!) - added ungetc (does it work?) - added inet_aton (yuck!) - added gethostbyname, gethostbyaddr, gethostbyname_r and gethostbyaddr_r - added h_errno and __h_errno_location - added inet_ntoa - added setpgrp and getpgrp, strsignal and execv (thanks, Olaf) - add bcopy, index, rindex macros - add isgraph and isxdigit - add strftime (ugh!!!) - Olaf fixed strftime, gmtime_r leap year bug. - Jeff Garzik contributed a spec file. I put it in contrib and hope - everbody knows what to do with it... - Olaf checked in a ton of libpthread stuff. - added mkstemp using /dev/urandom (harder to guess than getpid()). - add large file backwards compatibility support (so gzip will run on - kernel 2.2 and 2.0) - added shutdown - added nice - added pseudo-locale support for is* (they are now weak aliases, - isupper -> __isupper_ascii etc). So, for example, liblatin1 can - overwrite the default is* functions. - added liblatin1.a - added tzfile implementation (does it work for anyone else?) - added syslog(3) (thanks to Rene Müller!) - Jeff Garzik contributed getgr*, getpw* and getsp* in one tiny package. - Thanks! - merged duplicate code in execv and execvp into exec_lib.o - -0.7.2: - added several prototypes to already implemented functions and - <sys/reboot.h>. Thanks for Abraham for pointing this out. - added prototypes for process group and dup syscalls. Thanks to - Abraham again. He also contributed an implementation for daemon(), - an ugly BSD hack. I decided to diversify the lib/ directory a - little and now created a libugly/ directory for stuff like system() - and daemon() ;-) - added libstdio and moved all that stdio crap from lib/ there. The - idea is to start separating now what we will separate for shared - libraries anyway. - optimized x86 unified-syscall by Olaf. - added limits.h, removed __ARCHBITS from endian.h (use __WORDSIZE from - limits.h instead) - added remove.c and enough cruft to limits.h to make it compile lzo, - lzop and bzip2. - added mktime, asctime_r, asctime and ctime (needed for gzip). - Someone will need to implement a reader for the glibc localtime file - format some day (man tzfile, ugh!) :-( - added unlink prototype to unistd.h. - added gmtime and gmtime_r. - fixed sparc unified syscall error handling (please upgrade!). - removed readdir glibc compatibility cruft. - removed stat glibc compatibility cruft. - oops, my fread was broken for pipes. - Olaf found a bug in pipe() for sparc, too. - -0.7.1: - optimized away the static arrays from __ltostr and __lltostr. - optimized away the static arrays (and more!) from strtoul and strtoull. - added system (by Olaf). - added tolower and toupper - added getopt from Olaf (~600 bytes on x86!) - added clone for mips (by Olaf). - fixed longjmp and setjmp on sparc not to require glibc include files. - added pause for all (by Olaf). - added __attribute__ ((__const__)) to ctype.h - added isupper and islower. - added putc and putchar as macros. - added strcasecmp and strncasecmp (thanks to Abraham vd Merwe for - insightful discussions and patches I partially used for the last three) - added getpriority and setpriority (also by Abraham) - oops, I broke strtoul in a recent optimization attempt. - oi, setjmp and longjmp were broken on other platforms, too! - Thanks to Sébastien Côté for reporting this. - -0.7: - clone support for i386,alpha,arm and sparc by Olaf. - Initial dynamic loading glue for i386, also by Olaf. - We don't have a dynamic loader yet, so this is not yet usable. - added readv, sigdelset, sigaltstack, sigfillset, sigismember, usleep, - vsprintf, writev, all by Olaf. - imported readdir fix from Guillaume. Mhh, can the kernel interface - really be this broken? - Found a kludgy way to detect whether the kernel includes define struct - stat64 (they also define STAT64_HAS_BROKEN_ST_INO). If this does - not work for you, please tell me! - Removed bogus __seek_types enum, it's a bunch of #defines now. - Fixed stdio line buffering. The code was already there but I forgot - to mark stdio and stdout as line buffered. This should really be - done dynamically using isatty, though. - Removed superfluous "if (1)" in execvp.c - -0.6.14: - *scanf did not append the 0 byte for %s. - added creat and changed creat to call open directly instead of open64. - did for fread what 0.6.10 did for fwrite. - repaired buffered stdio a little (line buffering is still not - supported). - [All of these bugs have been reported by Guillaume. Thanks!] - added __pure__ to strchr and strrchr in <string.h> - -0.6.13: - included COPYING to make clear that the diet libc is covered by the - GNU General Public License (and _not_ the LGPL). That means that - you need to obtain a license from me if you want to use the diet - libc in a proprietary program that you want to distribute. - The x86 unified syscall swapped arguments #4 and #5 and noone - noticed until now! Thanks to Guillaume Cottenceau for reporting - this! - The malloc had a subtle bug with small allocations that could cause - segfault. Guillaume reported it, Olaf fixed it. - -0.6.12: - added assert, statfs and fstatfs - added include/net/if.h so fget compiles again. - -0.6.11: - added putenv. - -0.6.10: - fixed fwrite. It returned the number of bytes written, not the number - of records. Thanks to Albert D. Cahalan for pointing this out. - fixed fgets. It returned EOF on empty lines. Thanks, Erik Frey. - added brk and sbrk. harold@nb.com.sg made me do it. - -0.6.9: - fixed execvp not to return on ENOENT - did for {open|read|close|seek|tell}dir what I did for stat before. - The glibc compatibility part is currently non-functional. - fixed white space handling in sscanf " (" would not match " (". - fixed printf to accept 'l' flag. - fixed getpwuid (ignored last line) - -0.6.8: - Olaf contributed initial thread-safe syscalls for i386, alpha, sparc, - mips and arm. I did the one for ppc. They can be enabled in dietfeatures.h. - added strlcpy and strlcat from OpenBSD. - added stat64, fstat64 and lstat64. - added endian.h and made ending of strlen.c endianness-aware - added string routines size tweak to dietfeatures.h. Most of the - string routines have been unrolled. This is up to three times as - fast but creates up to three times larger code. Now you can disable - the unrolling. - added sendfile. - I also added pread. It works on x86 and sparc but not on ppc and mips. - I have no idea what's going on. strace disagrees with the kernel. - Can anyone help? I asked the Linux kernel mailing list for help, too. - added a few aliases of the type __libc_open for open. nm on - libpthreads.so indicates that we will need them. - -0.6.7: - the sources now compile without warnings with -Wall. - printf now prints "(null)" when %s is passed NULL. This can be - removed with WANT_NULL_PRINTF in dietfeatures.h - added vfprintf, execl, ttyname. - stat, lstat and fstat are now #defined to __dietstat, __dietlstat and - __dietfstat so they can use the normal kernel struct stat. - stat, lstat and fstat are now C wrappers that convert to the glibc - struct stat. So we can avoid that overhead for programs that use - dietlibc headers. - -0.6.6: - changed the Makefiles so you can now set CFLAGS on the command line - added memccmp (analogous to memccpy) and strncmp. - Olaf fixed another bug in the sparc unified syscall. - Paul Clifford contributed a C version of his strlen.S that is much - more efficient than the previous strlen on all platforms! It also - looks like technology from Roswell. ;-} - added a "real" stdio. Well, almost. Please contribute! - added dietfeatures.h so you can remove features you don't need. - removed debug code from vsnprintf that changed \0 to ' ' (argh!). - stdio now works with simple programs and minigzip from libz. - stdio uses some major trickery to avoid linking the stdio, stderr and - stdout (and reserving space for them) when they are not used. - -0.6.5: - Red Plait <redplait@ixcelerator.com> found several bugs in diet libc, - most of them bugs in the new header files, but also missing sigset - functions. - Paul Clifford contributed an assembly strlen.S for ARM and fixed - several bugs. - Fixed ppc/setjmp and mips/pipe. - Olaf contributed a new sparc unified syscall. - -0.6.4: - declared is* static inline in getservent. - added assert_fail, strtoul, isalpha, isdigit, isalnum, isascii. - changed strlen to return 0 when passed NULL. - new, much smaller unified syscall for MIPS. Thanks to Olaf the Mad - Scientist who actually implemented this without access to a MIPS - box, just from reading the architecture manual. And it worked out - of the box. - started a set of system includes, mainly so that I can use lcc and - my alpha-linux cross compiler (which is unable to cross-compile - glibc). diet libc can now be compiled without any include files - from a normal libc. The includes do declare more than diet libc - currently delivers and they are still far from complete for real - applications. - I will only add assembly versions that are smaller _and_ faster than - the C version. Larger routines are only accepted if they are called - very often and are substantially faster. - added i386 assembly strchr, which is smaller and faster than the old - version. It is, however, larger than the version contributed by - proton (thanks, anyway). - added i386 strlen (31% faster, 14% smaller) - "make t" will now create a map file called "mapfile". - -0.6.3: - added sys_errlist, strerror and perror - added isblank - added atol - -0.6.2: - mmap for ARM didn't compile. Thanks, Paul! - -0.6.1: - split mmap into the architecture specific subdirectories. - getenv now copes with environ==NULL, thanks Paul Clifford. - Paul also contributed a smaller ARM startup code. - -0.6: - strcat returned the wrong result. Thanks, Dietz Pröpper. - strtod now understands a negative exponent (oops, thanks Bertram Barth) - Port to arm-linux-gnu, but on the Netwinder I use for testing the - __dtostr does not work (I have no idea why!) - The MIPS port now uses (much smaller) non-PIC code. That means that - the applications you link against diet libc also have to be compiled - non-PIC. I suggest copying the CFLAGS from the diet libc Makefile. - Thanks to Ralf Bächle for helping me with this! - I made subdirectories for the architectures and use VPATH to override - VPATH so that make finds the source file automatically. That should - simplify the sources greatly. - Olaf Dreesen contributed Alpha support including setjmp and longjmp! - ARM and MIPS now also have setjmp and longjmp - "compile" and "load" are now make targets. Use them for djb programs. - added contrib/elftrunc.c which will remove unnecessary ELF headers. - Again, contributed from Olaf. Great work! - -0.5.12: - printf also does signed numbers. - If you don't use atexit, dietlibc now does not link exit, only _exit. - *printf now correctly returns the number of bytes written. - Olaf contributed experimental sscanf and vsscanf implementations. - If passed NULL as buffer, snprintf will not write anything but still - return the number of bytes it would have written. - Initial MIPS port! (Oh, the agony!) - No setjmp and longjmp support yet! Please contribute! - I even implemented unified syscalls for MIPS. Still, MIPS code is - almost twice the size of SPARC code. If anyone knows why: please - tell me! - -0.5.11: - I implemented new unified syscalls for x86, sparc and ppc, this time based - on .s files and not .c files, and I moved the syscalls into - subdirectores to clean the dietlibc sources up a little. - A binary consisting of printf("%s is %d\n","olaf",23) is now - 2864 bytes on sparc - 2488 bytes on intel - I kludgily implemented fprintf(stdout,... and fprintf(stderr,... - to make a few more applications work. - Olaf Dreesen also implemented some unified syscall stuff for x86. - He discovered that with our unified syscall interface it actually - costs <10 bytes total to make all system calls thread safe! - I implemented atexit() (can register up to 4 callbacks). - I implemented strtod and __dtostr (the opposite). Now we can add - floating point support to vsnprintf and sscanf! - -0.5.10: - I actually saw that I can not only merge the errno handling code of - the system calls on x86, I can also merge the rest (including the - arguments) except for setting the system call number. All those - system calls are now just a jump to a unified system call handler. - I got rid of x86openclose again. The savings are substantial: - chown from embutils went from 7664 to 7184 bytes! - If I'd move the system call wrappers to assembly language, I could - even reduce the alignment (does not matter since it's just a jump - anyway) and get rid of the "ret" behind each jump (one byte per - system call!) - -0.5.9: - added memchr, strpbrk, strstr, strtol, isspace (hehe) - fixed strdup - fixed return values for strcpy and strcat (thanks to Norbert Berzen) - Olaf Dreesen contributed a strtol and initial {sn|vsn|}printf implementation - (no signed integers, only strings and unsigned integers (but - supporting octal, hex and decimal). Thanks, Olaf! (by the way: - that code must be wonderful, I don't understand it at all *bg*) - Olaf's printf does understand padding like in "%08d" and "%8d" and - automatically pads pointers with '0'. - Rewrote the x86 start code, old: 22 instructions, new: 12 instructions. - Thanks to proton for inspiration on this. - The new x86 start code also does not reference exit any more, thus saving - 64 bytes for executables that don't call exit explicitly. - [insert maniacal laughter] EVERY BYTE COUNTS!1!! ;-) - Moved errno and environ to start.S, saving no byte binary size but - speeding up compilation and slightly shortening dietlibc.a ;-) - For x86: joined open and close into one assembler file, sharing the - errno handling. This is a feasibility test and it actually saves a - few bytes. I think I will reimplement the _syscall[1-6] macros on - all platforms now to share the errno handling code for them. - -0.5.8: - fixed strchr to be able to look for 0. - - added _llseek, ftruncate, getpgid, getresgid, getresuid, getsid, - memccpy, memmove, mprotect, setregid, setresgid, setresuid, setreuid, - strncpy, swapon, truncate, strtok, strtok_r, strspn, strcspn (all - contributed by Olaf Dreesen) - - added execvp, getcwd - - fixed __xmknod - - Note: can it be that the ftw interface really is so broken that I - cannot implement it without having to implement some searching data - structure? I included an experimental ftw implementation that will - not follow symlinks. - -0.5.7: - oops, if_nametoindex was broken! - -0.5.6: - ported to ppc-linux. - fixed i386 sigsetjmp (I mistyped the function name) - included sigjmp.c - -0.5.5: - added wait, sys_siglist, longjmp/setjmp/sigsetjmp for i386 and sparc - actually, it wasn't fork that wasn't working for sparc, it was pipe. - I fixed it now. - dietlibc/SPARC assumes -msupersparc (does not provide div, mul, etc) - fixed readdir to use getdents and not the intel inline asm - -0.5.4: - ported to sparclinux (sparc32 only). Beware: does not work yet. - added raise, abort, readlink, strcat, geteuid, geteuid, wait3, access - -0.5.3: - added tcsetattr and getenv to compile e3 - -0.5.2: - added vhangup, tcgetattr, isatty and memcmp for fgetty - (http://www.fefe.de/fgetty/) - added localtime from uC-libc. - -0.5.1: - stat and friends actually work now. Yuck! Another case of - translation between kernel and userland. Why can't the kernel - people and the libc people simply agree on a standard? - removed many unnecessary includes to speed up compilation. - added -fomit-frame-pointer and i386 compilation target to reduce code size. - inlined socketcall to reduce code size. - "load" and "compile" are examples for djb code. - -0.5: - Olaf Dreesen contributed a much smaller implementation of malloc and friends. - each object file is now treated with "strip -x -R .note -R .comment" - split each system call into a separate object file - added ntohs, htons, alarm, if_indextoname and if_nametoindex - -0.4.1: - oops, the strchr implementation was wrong. Thanks Jens Laas! - -0.4: - copied opendir and friends from uC-libc. - added getservent and getservby* in gerservent.c - -0.3: - remove readdir system call - added getdents system call - added getpwnam/getpwuid implementation in getpwnam.c - added a few string functions (in str*.c) - diff --git a/mdk-stage1/dietlibc/COPYING b/mdk-stage1/dietlibc/COPYING deleted file mode 100644 index 5b6e7c66c..000000000 --- a/mdk-stage1/dietlibc/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - 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. - - This program 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - <signature of Ty Coon>, 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/mdk-stage1/dietlibc/FAQ b/mdk-stage1/dietlibc/FAQ deleted file mode 100644 index d6595dcc9..000000000 --- a/mdk-stage1/dietlibc/FAQ +++ /dev/null @@ -1,224 +0,0 @@ -diet libc FAQ. - - -Q: How do I compile this? I don't see a configure? -A: Just type make. - - -Q: How do I install it? make install? -A: Yep. It will then install itself to /opt/diet, with the wrapper in - /opt/diet/bin/diet. Or you don't install it at all. - The diet libc comes with a wrapper called "diet", which can be found - in bin-$(ARCH)/diet, i.e. bin-i386/diet for most of us. Copy this - wrapper somewhere in your path (for example ~/bin) and then just - compile stuff by prepending diet to the command line, e.g. "diet gcc - -pipe -g -o t t.c". - - -Q: How do I compile programs using autoconf with the diet libc? -A: Set CC in the environment properly. For Bourne Shells: - - $ CC="diet gcc -nostdinc" ./configure --disable-nls - - That should be enough, but you might also want to set - --disable-shared and --enable-static for packages using libtool. - - -Q: My program complains about missing asm/* or linux/* header files! -A: It is quite linux specific. You can try omitting the -nostdinc, but - except for some cases conflicts are likely. You should not be using - the kernel headers in your software. - - -Q: Do you have cross compiling support? -A: Yes. Just type something like "make ARCH=arm CROSS=arm-linux- all". - For arm, alpha, mips, ppc, sparc and i386, shortcuts exist. You can - also use "make arm", for example. You still use the same "diet" - program as for normal compilation, but you can then say - - $ diet sparc-linux-gcc -pipe -g -o t t.c - - Programs using autoconf can be configured like this: - - $ CC="diet sparc-linux-gcc" ./configure --disable-nls - - -Q: There are a few warnings about possibly uninitialized variables when - compiling the diet libc. Can't you remove them? -A: This type of warning can only be removed by a) compiling without - warnings or b) initializing the variables in question. In all cases, - the variables won't actually be used uninitialized, but adding an - explicit initializer will add a few bytes of code. As you know, the - goal of the diet libc is to not waste a single byte of code, so we - don't add initializers ;-) - - -Q: When linking binaries, I get warnings about stdio and printf all the - time. What gives? -A: Since the diet libc was written to make writing small programs - possible, it also tries to assist in the process of seeing causes of - bloat. Premier causes for bloat are stdio and the printf family of - functions. The diet libc will also warn you if you still use - assert() (which is normally not enabled in production code) or if you - use functions that use static buffers (like gethostbyname and - friends). - - -Q: My program stopped parsing command line arguments properly! Now what? -A: The getopt in the diet libc adheres to the Single Unix Specification. - In particular, it initialized optind to 1 (not 0) and breaks if - someone sets optint to 0 (as some misguided legacy programs to). - Also, it does not reorder arguments, i.e. something like "rm -f foo -v" - will not see -v as option but rather as non-option argument. If you - need GNU getopt behaviour, please use GNU getopt instead of the diet - libc code. - - -Q: I get linker errors about missing __ctype_b! -A: This happens when you link in code that was compiled with the glibc - headers. The most common culprit is a library like -lncurses, - -lcrypto or -lresolv. All external libraries you use have to be - compiled with the diet libc headers (CC="diet gcc"), and there is no - libresolv with the diet libc, it's in the main libc! - - -Q: My program links, but when I run it, I get no output at all and it - appears to terminate immediately. -A: This normally happens if you link in glibc. The major reason for - this was that shared libraries were linked in. diet sets -static - since version 0.13, so if it still happens to you, you need to strace - and debug your software. - - -Q: Why aren't you compatible to glibc? I thought the interface was a - standard? -A: Yes, the interface is, but a lot of details are missing. For - example, the diet libc uses a different "struct stat" layout than - glibc. We use the one from the kernel, glibc uses an own one and - links in translation code. This is part of the reason why glibc is - so big and ugly. If we support all of this, we end up as bloated as - glibc. - - -Q: Where is the test suite? -A: The humble beginnings are in the "test" directory, but it can't be - run automatically yet. - - -Q: GPL sucks! Now I can't compile my BSD programs with the diet libc! -A: Wrong. You can compile them, and you can use them. You just can't - redistribute the binaries. If you are a distribution vendor and want - to use the diet libc to make BSD licensed binaries for the install - or rescue floppy which you sell commercially, please talk to me. - - -Q: Where are the shared libaries? make install didn't install them! -A: You have to explicitly build them with "make dyn". Since they are - experimental and only supported on a small subset of the platforms, - that is not default. Also, I recommend you only use shared libraries - if you really know what you are doing. For example, you can't just - use your system shared libraries, because they have a dependency on - glibc in them, so the program will crash. And you have to explicitly - compile the code with -fPIC or -fpic. You can then use them by - substituting "diet-dyn" for "diet" on the command line. - - -Q: My target platform does not have a MMU. Should I be using uClibc? -A: I am not aware of any issues with MMU-less systems. You should be - able to use the diet libc just fine. Having a MMU or not is mostly - an issue for the kernel, not libc. - - -Q: How do I make myself a cross compiler? -A: untar binutils and gcc (I used version 2.11.2 and 3.0.4 respectively) - Then use the --target=arm-linux (or whatever platform you want) - configure options. For gcc, add --enable-languages=c (otherwise gcc - will try to make C++, Objective C and Java, too, and those - compilations will fail because they require installed libc headers - which you don't have yet). I recommend using --enable-static - --disable-shared, too, because otherwise the binutils shared - libraries will overwrite each other if you install more than one - cross binutils for different targets. - binutils$ ./configure --enable-static --disable-shared --prefix=/opt/cross --target=arm-linux - gcc$ ./configure --enable-static --disable-shared --prefix=/opt/cross --target=arm-linux --enable-languages=c - For some platforms, gcc compilation will fail while trying to compile - some part of libgcc.a because it depends on some libc header file. - This is a gcc bug and you should complain using gccbug, because you - can't cross-compile libc unless you successfully installed the cross - compiler. - - -Q: Where are the xdr_* symbols? -Q: Where are the RPC symbols? -Q: util-linux says that rpcgen output does not work?! -A: Add -lrpc. The code is from Sun and frankly it is so ugly and so - rarely used that I don't want to include it in libc. - - -Q: I am missing some BSD/GNU extension! -A: I started adding a few of them to libcompat. You have to link it in - manually, though, as using them is bad for portability and I want - people to make a conscious effort to write non-portable applications - by not including them in the libc itself. - - -Q: I'm just starting with the diet libc. Should I use the tarball or - the CVS version? -A: Always use the CVS version. We generally don't add unstable test - stuff on the CVS tree, and our APIs are stable (they are - standardized, remember?). In fact, we don't add much stuff at all. - Most changes are bug fixes and optimizations, and in general you'll - want those. - - -Q: Does the diet libc support profiling (with gprof)? -A: There is experimental support for profiling, but so far it only works - on x86. To use it, do "make profiling" before make install. Then, - diet will link in the support code if it finds a -pg on the gcc - command line. - - -Q: I get compiler errors in a line with caddr_t, u_long, n_short or - nlong or similar. -A: Add -D_BSD_SOURCE to the compiler command line. The diet libc tries - to encourage portable and standards compliant programming, so it - hides these legacy BSD types from the standard name space. The - reason is that the Single Unix Specification contains a specification - of the socket API but does not mention those types. - - -Q: I get compiler errors in a line with u_int8_t or similar. -A: Add -D_GNU_SOURCE to the compiler command line. See previous - question. This is a very questionable GNU extension. The C Standard - defines uint8_t, uint16_t and uint32_t. Use those instead. - - -Q: Can I compile or use the diet libc with a compiler that is not gcc? -A: Compile: no. Use: yes. - - -Q: Can you please port the diet libc to FreeBSD/Solaris/Windows? -A: No. - - -Q: Why do you support non-embedded platforms like IA64 and x86_64? -A: The diet libc is also useful for servers because it can improve - performance by an order of magnitude for certain programming models. - Please see http://www.fefe.de/fnord/ (in particular .../fnord/SPEED) - for an example and/or read http://www.fefe.de/talk.pdf for some - benchmarks. - - -Q: I just compiled hello world and the binary is larger than with glibc! -A: You forgot to add the dynamic glibc to your size comparison. Please - use -static when linking with glibc to see the difference. - - -Q: Should I compile my kernel with the diet libc? -A: The kernel is not linked against any libc. In fact, the libc is the - user space interface to the kernel. So unless you are talking about - "user mode linux" (which is a special version of the kernel that - happens to be a user space program) you cannot link the kernel - against the diet libc. Linking user space Linux with the diet libc - should be possible in theory but I don't think anyone has actually - tried it. diff --git a/mdk-stage1/dietlibc/PORTING b/mdk-stage1/dietlibc/PORTING deleted file mode 100644 index 4e2a6358c..000000000 --- a/mdk-stage1/dietlibc/PORTING +++ /dev/null @@ -1,28 +0,0 @@ -To port the diet libc to a new architecture, you need to: - - - edit Makefile to detect the architecture - - create a directory for the architecture, and put a Makefile.add in - it. Look at the other Makefile.adds for guidance. - - provide start.S (the start code, look at glibc) - - provide unified.S (the unified syscall) - - provide syscalls.h (the syscall numbers, from asm/unistd.h) - - provide setjmp and longjmp - - edit include/setjmp.h - - pipe, clone and mmap often need special care - - edit include/sys/ioctl.h - - edit include/sys/ptrace.h - - edit include/asm/sigcontext.h - - edit include/sys/ucontext.h - - edit include/endian.h - - edit include/fcntl.h - - edit include/sys/mman.h - - edit include/sys/shm.h - - edit include/sys/stat.h - - edit include/errno.h - - edit syscalls.h - - edit include/termios.h - - edit diet.c to make it recognize the architecture and add proper - CFLAGS - - edit libcompat/syscall.S - -(I may have missed a few) diff --git a/mdk-stage1/dietlibc/SECURITY b/mdk-stage1/dietlibc/SECURITY deleted file mode 100644 index 67debc6e7..000000000 --- a/mdk-stage1/dietlibc/SECURITY +++ /dev/null @@ -1,13 +0,0 @@ -The diet libc was written with small code and embedded devices in mind, -not with security for network servers. - -Of course we still try to avoid buffer overflows, but there are some -parts of the code where tradeoffs have been made. This file is meant to -document them. - - 1. The DNS routines do not check whether the answer came from the IP - of the DNS server. The rationale is that people who can sniff the - network to find out the query, source port and DNS sequence number - can also spoof DNS packets to appear to come from the server we - asked, so it does not actually increase security to have that - check. diff --git a/mdk-stage1/dietlibc/THANKS b/mdk-stage1/dietlibc/THANKS deleted file mode 100644 index cda9400b6..000000000 --- a/mdk-stage1/dietlibc/THANKS +++ /dev/null @@ -1,31 +0,0 @@ -The malloc code was done by Olaf Dreesen, who also helped with the SPARC -start code and fork(). Olaf also did the printf and scanf routines and -he implemented pthreads (wow!) and his now writing a dynamic linker, and -he ported the diet libc to S/390. - -Thomas Ogrisegg ported the diet libc to PA-RISC and IA64 and fixed a few things. - -I initially took some syscalls from Redhat minilibc, but the code has -been completely replaced now. - -I initially took localtime and the directory reading routines from -uClibc, but the code has been completely replaced now. - -syslog and crypt were contributed by René Müller. - -Jeff Garzik contributed {get,set}{pw,gr,sp}ent. - -Uwe Ohse went through the code and fixed many bugs. - -Frank Klemm contributed the math library and a lot of correctness and -smallness patches and rewrote many functions in ix86 assembly language. - -Erik Troan found several important bugs and sent in patches to fix them. - -I also grabbed code from glibc (mostly assembly routines), and looked at -the OpenBSD libc for inspiration. - -Michal Ludvig did the porting to x86_64 and Gwenole Beauchesne helped -finish the port. - -Johannes Stezenbach improved the MIPS port. diff --git a/mdk-stage1/dietlibc/TODO b/mdk-stage1/dietlibc/TODO deleted file mode 100644 index 3e323ad44..000000000 --- a/mdk-stage1/dietlibc/TODO +++ /dev/null @@ -1,26 +0,0 @@ - - "locale" - - real regerror - - improve code size and quality with __restrict__. - - FPU exception handling (for mawk) - - res_mkquery should not assume op is QUERY - - syslog - - gethost/netent -> parselib? - - Look at qsort (the make test suite exhibits the worst case) - - Make __dtostr do scientific notation. - - fix %g in printf. They are more or less completely b0rken (in - particular rounding the last digit does not work). - - qmail-queue dumps core since we added vfork. Editing fork.h to #define - vfork to fork works. What happens here? - - use TCP if buf[2]&2 is non-zero in DNS answers. - - look at mktime: "Falls tm_isdst == -1 gesetzt, so sollte mktime - versuchen herauszufinden, ob Sommerzeit eingestellt ist (und laut linux - manpage auch tzname setzen), ansonsten die angegebene DST - berücksichtigen." - - better rand()? - - try to make zebra compile. - - printf %e - - move DNS stuff to libresolv.a? - - x86_64: readdir fails their test (Gwenole Beauchesne) - - regular expressions standards compliance; test suite from AT&T - - fgetpwent (needed for cvm) - - investigate putting some libgcc symbols in dietlibc.so for gcc<3 diff --git a/mdk-stage1/dietlibc/alpha/signal.S b/mdk-stage1/dietlibc/alpha/signal.S deleted file mode 100644 index ceca0f02d..000000000 --- a/mdk-stage1/dietlibc/alpha/signal.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall(osf_signal,signal) diff --git a/mdk-stage1/dietlibc/alpha/sigprocmask.S b/mdk-stage1/dietlibc/alpha/sigprocmask.S deleted file mode 100644 index d9da836c2..000000000 --- a/mdk-stage1/dietlibc/alpha/sigprocmask.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall_weak(osf_sigprocmask,sigprocmask,__sigprocmask) diff --git a/mdk-stage1/dietlibc/diet.1 b/mdk-stage1/dietlibc/diet.1 deleted file mode 100644 index c28aeba40..000000000 --- a/mdk-stage1/dietlibc/diet.1 +++ /dev/null @@ -1,31 +0,0 @@ -.TH diet 1 "April 2001" -.SH NAME -.PP -diet \- mangle gcc command line arguments -.SH SYNOPSIS -.PP -.B diet [-v] [-Os] -[\fInormal gcc command line\fP] -.SH DESCRIPTION -.PP -diet is a small wrapper around gcc. It will try to look at the command -line you specify and try to mangle it so that gcc will compile against -the diet libc header files and link against the diet libc itself. - -diet tries to be smart for cross compiling. If the first argument is -not gcc but sparc-linux-gcc, diet will guess that you want to cross -compile for sparc and use bin-sparc/dietlibc.a instead of the dietlibc.a -for your default architecture. - -The -v option will make diet print the modified gcc command line before -executing it. - -When passed the -Os option before the gcc argument, diet will mangle the -gcc options to include the best known for-size optimization settings for -the platform. -.SH FILES -~/.diet/\fIcompiler\fR may contain compiler options as you would -specify them on the command line, i.e. separated by spaces. Those will -then be used instead of the built-in defaults for diet -Os. -.SH AUTHOR -Felix von Leitner <felix-dietlibc@fefe.de> diff --git a/mdk-stage1/dietlibc/dietstdarg.h b/mdk-stage1/dietlibc/dietstdarg.h deleted file mode 100644 index 827671b22..000000000 --- a/mdk-stage1/dietlibc/dietstdarg.h +++ /dev/null @@ -1,12 +0,0 @@ -#include <stdarg.h> - -/* this assumes that va_copy() will be a macro, it is on gcc */ -#ifndef va_copy -# ifdef __va_copy -# define va_copy(x, y) __va_copy(x, y) -# else -/* assume copying it works... */ -# define va_copy(x, y) x = y -# endif -#endif - diff --git a/mdk-stage1/dietlibc/dirstream.h b/mdk-stage1/dietlibc/dirstream.h deleted file mode 100644 index dc8fba79c..000000000 --- a/mdk-stage1/dietlibc/dirstream.h +++ /dev/null @@ -1,78 +0,0 @@ -/* Copyright (C) 1991, 1992 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, 1992 Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -/* - * POSIX Standard: 5.1.2 Directory Operations <dirent.h> - */ - -#ifndef _DIRSTREAM_H - -#define _DIRSTREAM_H 1 - -#include <sys/types.h> -#include <dirent.h> -#ifdef _POSIX_THREADS -#include <pthread.h> -#endif - -/* For now, syscall readdir () only supports one entry at a time. It - * will be changed in the future. -#define NUMENT 3 -*/ -#ifndef NUMENT -#define NUMENT 1 -#endif - -#define SINGLE_READDIR 11 -#define MULTI_READDIR 12 -#define NEW_READDIR 13 - -/* Directory stream type. */ -struct __dirstream { - /* file descriptor */ - int dd_fd; - - /* offset of the next dir entry in buffer */ - off_t dd_nextloc; - - /* bytes of valid entries in buffer */ - size_t dd_size; - - /* -> directory buffer */ - struct dirent *dd_buf; - - /* we have to convert */ - struct dirent convbuf; - - /* offset of the next dir entry in directory. */ - off_t dd_nextoff; - - /* total size of buffer */ - size_t dd_max; - - enum {unknown, have_getdents, no_getdents} dd_getdents; - - /* lock */ -#ifdef _POSIX_THREADS - pthread_mutex_t *dd_lock; -#else - void *dd_lock; -#endif -}; /* stream data from opendir() */ - -#endif /* dirent.h */ diff --git a/mdk-stage1/dietlibc/lib/__xmknod.c b/mdk-stage1/dietlibc/lib/__xmknod.c deleted file mode 100644 index 4739a1f5f..000000000 --- a/mdk-stage1/dietlibc/lib/__xmknod.c +++ /dev/null @@ -1,6 +0,0 @@ -#include <sys/stat.h> - -int __xmknod(int ver,char* filename,mode_t mode,dev_t *dev) { - return mknod(filename,mode,*dev); -} - diff --git a/mdk-stage1/dietlibc/lib/alarm.c b/mdk-stage1/dietlibc/lib/alarm.c deleted file mode 100644 index fd35372f2..000000000 --- a/mdk-stage1/dietlibc/lib/alarm.c +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (C) 1991, 1992, 1994, 1997 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. */ - -#include <unistd.h> -#include <sys/time.h> - -/* Schedule an alarm. In SECONDS seconds, the process will get a SIGALRM. - If SECONDS is zero, any currently scheduled alarm will be cancelled. - The function returns the number of seconds remaining until the last - alarm scheduled would have signaled, or zero if there wasn't one. - There is no return value to indicate an error, but you can set `errno' - to 0 and check its value after calling `alarm', and this might tell you. - The signal may come late due to processor scheduling. */ -unsigned int -alarm (seconds) - unsigned int seconds; -{ - struct itimerval old, new; - unsigned int retval; - - new.it_interval.tv_usec = 0; - new.it_interval.tv_sec = 0; - new.it_value.tv_usec = 0; - new.it_value.tv_sec = (long int) seconds; - if (setitimer (ITIMER_REAL, &new, &old) < 0) - return 0; - - retval = old.it_value.tv_sec; - if (old.it_value.tv_usec) - ++retval; - return retval; -} diff --git a/mdk-stage1/dietlibc/lib/errlist.c b/mdk-stage1/dietlibc/lib/errlist.c deleted file mode 100644 index d0e712190..000000000 --- a/mdk-stage1/dietlibc/lib/errlist.c +++ /dev/null @@ -1,132 +0,0 @@ - -const char *const sys_errlist[] = { - "Success", /* 0 */ - "Operation not permitted", /* EPERM */ - "No such file or directory", /* ENOENT */ - "No such process", /* ESRCH */ - "Interrupted system call", /* EINTR */ - "I/O error", /* EIO */ - "No such device or address", /* ENXIO */ - "Arg list too long", /* E2BIG */ - "Exec format error", /* ENOEXEC */ - "Bad file number", /* EBADF */ - "No child processes", /* ECHILD */ - "Try again", /* EAGAIN */ - "Out of memory", /* ENOMEM */ - "Permission denied", /* EACCES */ - "Bad address", /* EFAULT */ - "Block device required", /* ENOTBLK */ - "Device or resource busy", /* EBUSY */ - "File exists", /* EEXIST */ - "Cross-device link", /* EXDEV */ - "No such device", /* ENODEV */ - "Not a directory", /* ENOTDIR */ - "Is a directory", /* EISDIR */ - "Invalid argument", /* EINVAL */ - "File table overflow", /* ENFILE */ - "Too many open files", /* EMFILE */ - "Not a typewriter", /* ENOTTY */ - "Text file busy", /* ETXTBSY */ - "File too large", /* EFBIG */ - "No space left on device", /* ENOSPC */ - "Illegal seek", /* ESPIPE */ - "Read-only file system", /* EROFS */ - "Too many links", /* EMLINK */ - "Broken pipe", /* EPIPE */ - "Math argument out of domain of func", /* EDOM */ - "Math result not representable", /* ERANGE */ - "Resource deadlock would occur", /* EDEADLK */ - "File name too long", /* ENAMETOOLONG */ - "No record locks available", /* ENOLCK */ - "Function not implemented", /* ENOSYS */ - "Directory not empty", /* ENOTEMPTY */ - "Too many symbolic links encountered", /* ELOOP */ - "Operation would block", /* EWOULDBLOCK */ - "No message of desired type", /* ENOMSG */ - "Identifier removed", /* EIDRM */ - "Channel number out of range", /* ECHRNG */ - "Level 2 not synchronized", /* EL2NSYNC */ - "Level 3 halted", /* EL3HLT */ - "Level 3 reset", /* EL3RST */ - "Link number out of range", /* ELNRNG */ - "Protocol driver not attached", /* EUNATCH */ - "No CSI structure available", /* ENOCSI */ - "Level 2 halted", /* EL2HLT */ - "Invalid exchange", /* EBADE */ - "Invalid request descriptor", /* EBADR */ - "Exchange full", /* EXFULL */ - "No anode", /* ENOANO */ - "Invalid request code", /* EBADRQC */ - "Invalid slot", /* EBADSLT */ - "File locking deadlock error", /* EDEADLOCK */ - "Bad font file format", /* EBFONT */ - "Device not a stream", /* ENOSTR */ - "No data available", /* ENODATA */ - "Timer expired", /* ETIME */ - "Out of streams resources", /* ENOSR */ - "Machine is not on the network", /* ENONET */ - "Package not installed", /* ENOPKG */ - "Object is remote", /* EREMOTE */ - "Link has been severed", /* ENOLINK */ - "Advertise error", /* EADV */ - "Srmount error", /* ESRMNT */ - "Communication error on send", /* ECOMM */ - "Protocol error", /* EPROTO */ - "Multihop attempted", /* EMULTIHOP */ - "RFS specific error", /* EDOTDOT */ - "Not a data message", /* EBADMSG */ - "Value too large for defined data type", /* EOVERFLOW */ - "Name not unique on network", /* ENOTUNIQ */ - "File descriptor in bad state", /* EBADFD */ - "Remote address changed", /* EREMCHG */ - "Can not access a needed shared library", /* ELIBACC */ - "Accessing a corrupted shared library", /* ELIBBAD */ - ".lib section in a.out corrupted", /* ELIBSCN */ - "Attempting to link in too many shared libraries", /* ELIBMAX */ - "Cannot exec a shared library directly", /* ELIBEXEC */ - "Illegal byte sequence", /* EILSEQ */ - "Interrupted system call should be restarted", /* ERESTART */ - "Streams pipe error", /* ESTRPIPE */ - "Too many users", /* EUSERS */ - "Socket operation on non-socket", /* ENOTSOCK */ - "Destination address required", /* EDESTADDRREQ */ - "Message too long", /* EMSGSIZE */ - "Protocol wrong type for socket", /* EPROTOTYPE */ - "Protocol not available", /* ENOPROTOOPT */ - "Protocol not supported", /* EPROTONOSUPPORT */ - "Socket type not supported", /* ESOCKTNOSUPPORT */ - "Operation not supported on transport endpoint", /* EOPNOTSUPP */ - "Protocol family not supported", /* EPFNOSUPPORT */ - "Address family not supported by protocol", /* EAFNOSUPPORT */ - "Address already in use", /* EADDRINUSE */ - "Cannot assign requested address", /* EADDRNOTAVAIL */ - "Network is down", /* ENETDOWN */ - "Network is unreachable", /* ENETUNREACH */ - "Network dropped connection because of reset", /* ENETRESET */ - "Software caused connection abort", /* ECONNABORTED */ - "Connection reset by peer", /* ECONNRESET */ - "No buffer space available", /* ENOBUFS */ - "Transport endpoint is already connected", /* EISCONN */ - "Transport endpoint is not connected", /* ENOTCONN */ - "Cannot send after transport endpoint shutdown", /* ESHUTDOWN */ - "Too many references: cannot splice", /* ETOOMANYREFS */ - "Connection timed out", /* ETIMEDOUT */ - "Connection refused", /* ECONNREFUSED */ - "Host is down", /* EHOSTDOWN */ - "No route to host", /* EHOSTUNREACH */ - "Operation already in progress", /* EALREADY */ - "Operation now in progress", /* EINPROGRESS */ - "Stale NFS file handle", /* ESTALE */ - "Structure needs cleaning", /* EUCLEAN */ - "Not a XENIX named type file", /* ENOTNAM */ - "No XENIX semaphores available", /* ENAVAIL */ - "Is a named type file", /* EISNAM */ - "Remote I/O error", /* EREMOTEIO */ - "Quota exceeded", /* EDQUOT */ - "No medium found", /* ENOMEDIUM */ - "Wrong medium type", /* EMEDIUMTYPE */ - 0 -}; - - -const int sys_nerr = ((sizeof (sys_errlist))/(sizeof(char *))-1); diff --git a/mdk-stage1/dietlibc/lib/getservent.c b/mdk-stage1/dietlibc/lib/getservent.c deleted file mode 100644 index bf25d046b..000000000 --- a/mdk-stage1/dietlibc/lib/getservent.c +++ /dev/null @@ -1,137 +0,0 @@ -#include <unistd.h> -#include <fcntl.h> -#include <netdb.h> -#include <sys/mman.h> -#include <errno.h> -#include <netinet/in.h> -#include <string.h> -#include <ctype.h> - -static int servicesfd=-1; -static char* servicesmap; -static unsigned int serviceslen; - -static char* aliases[10]; - -static char *cur; - -/* nameserver 42/tcp name # IEN 116 */ -struct servent *getservent(void) { - static struct servent se; - char *last; - int aliasidx; - if (servicesfd<0) { - servicesfd=open(_PATH_SERVICES,O_RDONLY); - if (servicesfd<0) return 0; - serviceslen=lseek(servicesfd,0,SEEK_END); - servicesmap=mmap(0,serviceslen,PROT_READ|PROT_WRITE,MAP_PRIVATE,servicesfd,0); - if ((long)servicesmap==(-1)) goto error; - cur=servicesmap; - } - last=servicesmap+serviceslen; -again: - se.s_name=0; - se.s_aliases=aliases; aliases[0]=0; - se.s_port=0; - se.s_proto=0; - if (cur>=last) return 0; - if (*cur=='#' || *cur=='\n') goto parseerror; - /* first, the primary name */ - if (!isalpha(*cur)) goto parseerror; - se.s_name=cur; - se.s_aliases=aliases; - while (cur<last && isalnum(*cur)) cur++; - if (cur>=last) return 0; - if (*cur=='\n') goto parseerror; - *cur=0; cur++; - /* second, the port */ - while (cur<last && isblank(*cur)) cur++; - while (cur<last && isdigit(*cur)) { - se.s_port=se.s_port*10+*cur-'0'; - cur++; - } - se.s_port=htons(se.s_port); - if (cur>=last) return 0; - /* third, "/tcp" or "/udp" */ - if (*cur!='/') goto parseerror; - cur++; - se.s_proto=cur; - while (cur<last && isalpha(*cur)) ++cur; - if (cur>=last) return 0; - if (*cur=='\n') { *cur++=0; return &se; } - *cur=0; cur++; - /* now the aliases */ - for (aliasidx=0;aliasidx<10;++aliasidx) { - while (cur<last && isblank(*cur)) ++cur; - aliases[aliasidx]=cur; - while (cur<last && isalpha(*cur)) ++cur; - if (*cur=='\n') { *cur++=0; ++aliasidx; break; } - if (cur>=last || !isblank(*cur)) break; - *cur++=0; - } - aliases[aliasidx]=0; - return &se; -parseerror: - while (cur<last && *cur!='\n') cur++; - cur++; - goto again; -error: - if (servicesmap!=(char*)-1) munmap(servicesmap,serviceslen); - if (servicesfd!=-1) close(servicesfd); - servicesmap=(char*)-1; - servicesfd=-1; - errno=ENOMEM; - return 0; -} - -void setservent(int stayopen) { - cur=servicesmap; -} - -struct servent *getservbyname(const char *name, const char *proto) { - struct servent *s; - setservent(0); - for (s=getservent(); s; s=getservent()) { - char **tmp; -#if 0 - write(1,"found ",6); - write(1,s->s_name,strlen(s->s_name)); - write(1,"/",1); - write(1,s->s_proto,strlen(s->s_proto)); - write(1,"\n",1); - if (!strcmp(name,"auth")) { - tmp=s->s_aliases; - write(1," aka ",5); - while (*tmp) { - write(1,*tmp,strlen(*tmp)); - write(1,", ",2); - ++tmp; - } - write(1,"\n",1); - } -#endif - if (!strcmp(name,s->s_name) && !strcmp(proto,s->s_proto)) - return s; - tmp=s->s_aliases; - while (*tmp) - if (!strcmp(name,*tmp++)) return s; - } - return 0; -} - -struct servent *getservbyport(int port, const char *proto) { - struct servent *s; - for (s=getservent(); s; s=getservent()) { - if (port==s->s_port && !strcmp(proto,s->s_proto)) - return s; - } - return 0; -} - -void endservent(void) { - if (servicesmap!=(char*)-1) munmap(servicesmap,serviceslen); - if (servicesfd!=-1) close(servicesfd); - servicesmap=(char*)-1; - servicesfd=-1; -} - diff --git a/mdk-stage1/dietlibc/lib/memccmp.c b/mdk-stage1/dietlibc/lib/memccmp.c deleted file mode 100644 index 3a8c14f60..000000000 --- a/mdk-stage1/dietlibc/lib/memccmp.c +++ /dev/null @@ -1,17 +0,0 @@ -#define _POSIX_SOURCE -#define _XOPEN_SOURCE -#include <sys/types.h> - -int memccmp(const void *dst, const void *src, int c, size_t count) -{ - register const char *a = dst; - register const char *b = src; - while (count--) - { - register int res=(*a - *b); - if (res) return res; - if (*a==c) return 0; - ++a; ++b; - } - return 0; -} diff --git a/mdk-stage1/dietlibc/lib/nop.c b/mdk-stage1/dietlibc/lib/nop.c deleted file mode 100644 index c05bea813..000000000 --- a/mdk-stage1/dietlibc/lib/nop.c +++ /dev/null @@ -1,7 +0,0 @@ - -int __fflush_stdin() __attribute__((weak,alias("__return0"))); -int __fflush_stdout() __attribute__((weak,alias("__return0"))); -int __fflush_stderr() __attribute__((weak,alias("__return0"))); - -/* used for weak aliases */ -int __return0() { return 0; } diff --git a/mdk-stage1/dietlibc/lib/puts.c b/mdk-stage1/dietlibc/lib/puts.c deleted file mode 100644 index 54415151d..000000000 --- a/mdk-stage1/dietlibc/lib/puts.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <unistd.h> -#include <string.h> -#include "dietstdio.h" -#include "dietfeatures.h" - -int puts(const char *s) { -#ifdef WANT_BUFFERED_STDIO - return fwrite(s,1,strlen(s),stdout) && fputc('\n',stdout); -#else - return write(1,s,strlen(s)) && write(1,"\n",1); -#endif -} diff --git a/mdk-stage1/dietlibc/lib/random.c b/mdk-stage1/dietlibc/lib/random.c deleted file mode 100644 index e7785c455..000000000 --- a/mdk-stage1/dietlibc/lib/random.c +++ /dev/null @@ -1,9 +0,0 @@ -#include <stdlib.h> - -static unsigned int seed=1; - -long int random() { - return ((seed = seed * 1103515245 + 12345) % ((unsigned int)RAND_MAX + 1)); -} - -void srandom(unsigned int i) { seed=i; } diff --git a/mdk-stage1/dietlibc/lib/set_errno.c b/mdk-stage1/dietlibc/lib/set_errno.c deleted file mode 100644 index 6553bc496..000000000 --- a/mdk-stage1/dietlibc/lib/set_errno.c +++ /dev/null @@ -1,9 +0,0 @@ -extern int errno; - -void __set_errno(int error) __attribute__ ((weak)); - -void __set_errno(int error) -{ - errno=error; -} - diff --git a/mdk-stage1/dietlibc/lib/speed.c b/mdk-stage1/dietlibc/lib/speed.c deleted file mode 100644 index a7fcca7c9..000000000 --- a/mdk-stage1/dietlibc/lib/speed.c +++ /dev/null @@ -1,67 +0,0 @@ -#include <unistd.h> -#include <termios.h> -#include <sys/types.h> - -#include <asm/errno.h> - -extern int errno; - -/* Hack around a kernel bug; value must correspond to the one used in tcsetattr.c */ -#define IBAUD0 020000000000 - - -/* Return the output baud rate stored in *TERMIOS_P. */ -speed_t cfgetospeed (struct termios *termios_p) -{ - return termios_p->c_cflag & (CBAUD | CBAUDEX); -} - - -/* Return the input baud rate stored in *TERMIOS_P. - Although for Linux there is no difference between input and output - speed, the numerical 0 is a special case for the input baud rate. It - should set the input baud rate to the output baud rate. */ -speed_t cfgetispeed (struct termios *termios_p) -{ - return ((termios_p->c_iflag & IBAUD0) - ? 0 : termios_p->c_cflag & (CBAUD | CBAUDEX)); -} - - -/* Set the output baud rate stored in *TERMIOS_P to SPEED. */ -int cfsetospeed (struct termios *termios_p, speed_t speed) -{ - if ((speed & ~CBAUD) != 0 && (speed < B57600 || speed > B460800)) { - errno = EINVAL; - return -1; - } - - termios_p->c_cflag &= ~(CBAUD | CBAUDEX); - termios_p->c_cflag |= speed; - - return 0; -} - - -/* Set the input baud rate stored in *TERMIOS_P to SPEED. - Although for Linux there is no difference between input and output - speed, the numerical 0 is a special case for the input baud rate. It - should set the input baud rate to the output baud rate. */ -int cfsetispeed (struct termios *termios_p, speed_t speed) -{ - if ((speed & ~CBAUD) != 0 && (speed < B57600 || speed > B460800)) { - errno = EINVAL; - return -1; - } - - if (speed == 0) - termios_p->c_iflag |= IBAUD0; - else - { - termios_p->c_iflag &= ~IBAUD0; - termios_p->c_cflag &= ~(CBAUD | CBAUDEX); - termios_p->c_cflag |= speed; - } - - return 0; -} diff --git a/mdk-stage1/dietlibc/lib/vfprintf.c b/mdk-stage1/dietlibc/lib/vfprintf.c deleted file mode 100644 index c33a2404b..000000000 --- a/mdk-stage1/dietlibc/lib/vfprintf.c +++ /dev/null @@ -1,19 +0,0 @@ -#include <stdarg.h> -#include <stdio.h> -#include <stdlib.h> -#include "dietstdarg.h" - -int vfprintf(FILE *fstream, const char *format, va_list ap) -{ - char *tmp; - va_list cp_ap; - size_t n = 0; - - va_copy(cp_ap, ap); - n=vsnprintf(0, 1000000, format, cp_ap); - tmp=alloca(n+2); - vsnprintf(tmp, n+1, format, ap); - fwrite(tmp, n,1, fstream); - return n; -} - diff --git a/mdk-stage1/dietlibc/lib/vprintf.c b/mdk-stage1/dietlibc/lib/vprintf.c deleted file mode 100644 index 46ecc47a4..000000000 --- a/mdk-stage1/dietlibc/lib/vprintf.c +++ /dev/null @@ -1,14 +0,0 @@ -#include <stdarg.h> -#include <linux/types.h> -#include <unistd.h> -#include <stdlib.h> - -int vsnprintf (char *str,size_t size,const char *format, va_list arg_ptr); - -int vprintf(const char *format, va_list ap) -{ - char tmp[1000000]; - size_t n = vsnprintf(tmp, sizeof(tmp), format, ap); - write(1, tmp, n); - return n; -} diff --git a/mdk-stage1/dietlibc/libcruft/entlib.c b/mdk-stage1/dietlibc/libcruft/entlib.c deleted file mode 100644 index f88b3f057..000000000 --- a/mdk-stage1/dietlibc/libcruft/entlib.c +++ /dev/null @@ -1,153 +0,0 @@ -/* - * dietlibc/lib/entlib.c - Generic delimited-line parsing library - * - * Copyright 2001 Jeff Garzik <jgarzik@mandrakesoft.com> - * - * This is a brand new implementation, based on the interface - * described in man-pages-1.34-1mdk man pages package. - */ - - -#include "entlib.h" /* this is our only include */ - - -/* - * __ent_start - * - * Allocates and zeroes the module's state structure, - * and open a handle to /etc/passwd. - * - * Returns -1 on failure and sets errno, or zero for success. - */ - -int __ent_start(const char *pathname, struct __ent_state **st_ref) -{ - struct __ent_state *st; - - if (*st_ref) - return 0; - - st = calloc(1, sizeof(*st)); - if (!st) { - errno = ENOMEM; - return -1; - } - - st->fd = open(pathname, O_RDONLY); - if (st->fd == -1) { - /* errno should have been set by open(2) */ - free(st); - st = NULL; - return -1; - } - - *st_ref = st; - return 0; -} - - -/* - * __ent_get_line - * - * Eliminates a previous line from the buffer, if any. - * Then reads in a new line from /etc/passwd, if necessary. - * - * Returns -1 on failure, or zero for success. - */ - -int __ent_get_line(struct __ent_state *st) -{ - int rc; - - /* overwrite previous line, by shifting the rest - * of the rest to the front of the buffer - */ - if (st->bufptr) { - unsigned int slop = st->buflen - st->bufptr; - memmove(st->ent_buf, &st->ent_buf[st->bufptr], slop); - st->bufptr = 0; - st->buflen = slop; - st->ent_buf[st->buflen] = 0; /* null terminate */ - } - - if (st->buflen == __ENT_BUFSIZ || strchr(st->ent_buf, '\n')) - return 0; - - rc = read(st->fd, &st->ent_buf[st->buflen], __ENT_BUFSIZ - st->buflen); - if (rc < 0) - return -1; - - st->buflen += rc; - if (st->buflen == 0) - return -1; - - return 0; -} - - -/* - * __ent_split - * - * Splits a string into parts based on a delimiter. - * Stops processing when \n is reached also. - * - * Returns -1 on failure, or zero on success. - */ - -int __ent_split(struct __ent_state *st, char **parts, - int n_parts, int delimiter, int require_exact) -{ - char *s = &st->ent_buf[st->bufptr]; - int idx = 0; - - /* empty list */ - if (!*s) { - if (!require_exact) - return 0; - return -1; - } - - /* scan through string, sticking string pointers - * into parts[] as delimiters are found - */ - parts[idx++] = s; - while (*s) { - st->bufptr++; - if (*s == '\n') { - *s = 0; /* null terminate */ - break; - } - if (*s == delimiter) { - *s = 0; /* null terminate */ - /* boundary error: too many delimiters */ - if (idx == n_parts) - return -1; - s++; - parts[idx++] = s; - } else { - s++; - } - } - - if (!require_exact) - return 0; - return (n_parts == idx) ? 0 : -1; -} - - -void __ent_set(struct __ent_state *st) -{ - if (!st) - return; - st->buflen = st->bufptr = 0; - lseek(st->fd, 0, SEEK_SET); -} - - -void __ent_end(struct __ent_state *st) -{ - if (!st) - return; - close(st->fd); - free(st); -} diff --git a/mdk-stage1/dietlibc/libcruft/entlib.h b/mdk-stage1/dietlibc/libcruft/entlib.h deleted file mode 100644 index 2659d542e..000000000 --- a/mdk-stage1/dietlibc/libcruft/entlib.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * dietlibc/lib/entlib.h - Generic delimited-line parsing library header - * - * Copyright 2001 Jeff Garzik <jgarzik@mandrakesoft.com> - * - * This is a brand new implementation, based on the interface - * described in man-pages-1.34-1mdk man pages package. - */ - -#ifndef __ENTLIB_H -#define __ENTLIB_H - -#include <sys/types.h> /* for open(2), lseek(2) */ -#include <sys/stat.h> /* for open(2) */ -#include <fcntl.h> /* for open(2) */ -#include <unistd.h> /* for close(2), lseek(2) */ -#include <stdlib.h> /* for calloc(3), free(3) */ -#include <errno.h> /* for errno */ -#include <string.h> /* for memmove(3) */ -#include <stdlib.h> /* for atoi(3) */ -#include <paths.h> /* for the file locations */ - -#include <pwd.h> /* for struct passwd */ -#include <grp.h> /* for struct group */ -#include <shadow.h> /* for struct spwd */ - -/* should be a multiple of 64 to create decent alignment */ -#define __ENT_BUFSIZ (64 * 2) -#define __ENT_RAW_BUFSIZ (__ENT_BUFSIZ + 2) /* some overlap required */ - -struct __ent_state { - char ent_buf[__ENT_RAW_BUFSIZ]; /* raw file data buffer */ - unsigned int buflen; /* amount of valid data in ent_buf */ - unsigned int bufptr; /* next valid position in ent_buf */ - int fd; /* /etc/passwd file descriptor */ -}; - -extern int __ent_start(const char *pathname, struct __ent_state **st_ref); -extern int __ent_get_line(struct __ent_state *st); -extern int __ent_split(struct __ent_state *st, char **parts, int n_parts, int delimiter, int require_exact); -extern void __ent_set(struct __ent_state *st); -extern void __ent_end(struct __ent_state *st); - -#endif /* __ENTLIB_H */ diff --git a/mdk-stage1/dietlibc/libcruft/grent.c b/mdk-stage1/dietlibc/libcruft/grent.c deleted file mode 100644 index 0357657de..000000000 --- a/mdk-stage1/dietlibc/libcruft/grent.c +++ /dev/null @@ -1,54 +0,0 @@ -/* - * dietlibc/lib/grent.c - getgrent(3)/setgrent(3)/endgrent(3) implementation - * - * Copyright 2001 Jeff Garzik <jgarzik@mandrakesoft.com> - * - * This is a brand new implementation, based on the interface - * described in man-pages-1.34-1mdk man pages package. - */ - - -#include "entlib.h" /* this is our only include */ - -#define MAX_GROUP_MEMBERS 16 /* matches Linux kernel task struct */ - -static struct __ent_state *st = NULL; /* state held across calls */ -static char *gr_mem[MAX_GROUP_MEMBERS+1]; -static struct group gr; - -struct group *getgrent(void) -{ - char *parts[4], *grouplist; - unsigned int bufptr; - - if (__ent_start(_PATH_GROUP, &st)) - return NULL; - if (__ent_get_line(st)) - goto err_out; - if (__ent_split(st, parts, 4, ':', 1) < 0) - goto err_out; - - gr.gr_name = parts[0]; - gr.gr_passwd = parts[1]; - gr.gr_gid = (gid_t) atoi(parts[2]); - grouplist = parts[3]; - - memset(&gr_mem, 0, sizeof(gr_mem)); - gr.gr_mem = gr_mem; - - /* rewind bufptr to beginning of group list */ - bufptr = st->bufptr; - st->bufptr = (int) (grouplist - st->ent_buf); - - __ent_split(st, gr_mem, MAX_GROUP_MEMBERS, ',', 0); - st->bufptr = bufptr; - - return &gr; - -err_out: - st->buflen = st->bufptr = 0; /* invalidate file data buffer */ - return NULL; -} - -void setgrent(void) { __ent_set(st); } -void endgrent(void) { __ent_end(st); st=NULL; } diff --git a/mdk-stage1/dietlibc/libcruft/pwent.c b/mdk-stage1/dietlibc/libcruft/pwent.c deleted file mode 100644 index 30a8a0957..000000000 --- a/mdk-stage1/dietlibc/libcruft/pwent.c +++ /dev/null @@ -1,43 +0,0 @@ -/* - * dietlibc/lib/pwent.c - getpwent(3)/setpwent(3)/endpwent(3) implementation - * - * Copyright 2001 Jeff Garzik <jgarzik@mandrakesoft.com> - * - * This is a brand new implementation, based on the interface - * described in man-pages-1.34-1mdk man pages package. - */ - - -#include "entlib.h" /* this is our only include */ - -static struct __ent_state *st = NULL; /* state held across calls */ -static struct passwd pw; - -struct passwd *getpwent(void) -{ - char *parts[7]; - - if (__ent_start(_PATH_PASSWD, &st)) - return NULL; - if (__ent_get_line(st)) - goto err_out; - if (__ent_split(st, parts, 7, ':', 1) < 0) - goto err_out; - - pw.pw_name = parts[0]; - pw.pw_passwd = parts[1]; - pw.pw_uid = (uid_t) atoi(parts[2]); - pw.pw_gid = (gid_t) atoi(parts[3]); - pw.pw_gecos = parts[4]; - pw.pw_dir = parts[5]; - pw.pw_shell = parts[6]; - - return &pw; - -err_out: - st->buflen = st->bufptr = 0; /* invalidate file data buffer */ - return NULL; -} - -void setpwent(void) { __ent_set(st); } -void endpwent(void) { __ent_end(st); st=NULL; } diff --git a/mdk-stage1/dietlibc/libcruft/spent.c b/mdk-stage1/dietlibc/libcruft/spent.c deleted file mode 100644 index e4beb81e4..000000000 --- a/mdk-stage1/dietlibc/libcruft/spent.c +++ /dev/null @@ -1,45 +0,0 @@ -/* - * dietlibc/lib/spent.c - getspent(3)/setspent(3)/endspent(3) implementation - * - * Copyright 2001 Jeff Garzik <jgarzik@mandrakesoft.com> - * - * This is a brand new implementation, based on the interface - * described in man-pages-1.34-1mdk man pages package. - */ - - -#include "entlib.h" /* this is our only include */ - -static struct __ent_state *st = NULL; /* state held across calls */ -static struct spwd sp; - -struct spwd *getspent(void) -{ - char *parts[9]; - - if (__ent_start(_PATH_SHADOW, &st)) - return NULL; - if (__ent_get_line(st)) - goto err_out; - if (__ent_split(st, parts, 9, ':', 1) < 0) - goto err_out; - - sp.sp_namp = parts[0]; - sp.sp_pwdp = parts[1]; - sp.sp_lstchg = atoi(parts[2]); /* XXX: atol */ - sp.sp_min = atoi(parts[3]); - sp.sp_max = atoi(parts[4]); - sp.sp_warn = atoi(parts[5]); - sp.sp_inact = atoi(parts[6]); - sp.sp_expire = atoi(parts[7]); - sp.sp_flag = atoi(parts[8]); - - return &sp; - -err_out: - st->buflen = st->bufptr = 0; /* invalidate file data buffer */ - return NULL; -} - -void setspent(void) { __ent_set(st); } -void endspent(void) { __ent_end(st); st=NULL; } diff --git a/mdk-stage1/dietlibc/libdl/elf_hash.c b/mdk-stage1/dietlibc/libdl/elf_hash.c deleted file mode 100644 index 463dba0dd..000000000 --- a/mdk-stage1/dietlibc/libdl/elf_hash.c +++ /dev/null @@ -1,12 +0,0 @@ -unsigned long elf_hash(const unsigned char *name) -{ - unsigned long h=0, g; - - while (*name) - { - h = (h<<4) + *(name++); - if (g = h&0xf0000000) h ^= g>>24; - h &= ~g; - } - return h; -} diff --git a/mdk-stage1/dietlibc/libpthread/thread_internal.c b/mdk-stage1/dietlibc/libpthread/thread_internal.c deleted file mode 100644 index a93806203..000000000 --- a/mdk-stage1/dietlibc/libpthread/thread_internal.c +++ /dev/null @@ -1,344 +0,0 @@ -#include <signal.h> -#include <string.h> -#include <sys/wait.h> -#include <unistd.h> -#include <stdlib.h> -#include <errno.h> - -#include <sched.h> -#include <sys/resource.h> - -#include <stdio.h> -#include "thread_internal.h" - -static struct _pthread_fastlock __thread_struct_lock = {0}; -static struct _pthread_descr_struct threads[PTHREAD_THREADS_MAX]; -static int _max_used_thread_id=1; -pthread_once_t __thread_inited; - -static struct _pthread_fastlock __manager_thread_signal_lock = {0}; -static struct _pthread_fastlock __manager_thread_data_lock = {1}; -static struct _pthread_fastlock __manager_thread_data_go_lock = {1}; - -//#define DEBUG - -/* find thread */ -int __find_thread_id(int pid) -{ - register int i; - for (i=0; i<_max_used_thread_id; i++) - if (threads[i].pid==pid) - return i; - return -1; -} - -/* get thread */ -_pthread_descr __get_thread_struct(int id) -{ - return threads+id; -} - -/* thread errno location */ -int *__errno_location(void) -{ - int id=0; - if (__thread_inited) id=__find_thread_id(getpid()); - if (id<0) - return 0; - else - return &threads[id].errno; -} - -/* thread self */ -_pthread_descr __thread_self() -{ - register int i=__find_thread_id(getpid()); - if (i<0) - return 0; - else - return threads+i; -} - -/* allocate a thread slot */ -_pthread_descr __thread_get_free() -{ - _pthread_descr ret=0; - int i; - - __NO_ASYNC_CANCEL_BEGIN; - __pthread_lock(&__thread_struct_lock); - - for (i=0; i<PTHREAD_THREADS_MAX; i++) { - if (threads[i].pid==0) { - threads[i].pid=1; /* mark as taken */ - ret = threads+i; - if (i>=_max_used_thread_id) _max_used_thread_id=i+1; - break; - } - } - - __pthread_unlock(&__thread_struct_lock); - __NO_ASYNC_CANCEL_END; - return ret; -} - -/* sleep a little (reschedule for this time) */ -void __thread_wait_some_time() -{ - struct timespec reg; - reg.tv_sec=0; - reg.tv_nsec=SPIN_SLEEP_DURATION; - __libc_nanosleep(®,0); -} - -/* cleanup a thread struct */ -void __thread_cleanup(_pthread_descr th) -{ - /* lib provided stack should be freed */ - if (th->stack_begin) free(th->stack_begin); - - /* an other thread has joined this on */ - if (th->joined) { - th->joined->retval=th->retval; - th->joined->join=0; - th->joined=0; - } - th->pid=0; /* mark struct as free */ -} - -/* SIGHUP handler (thread cnacel) PTHREAD_CANCEL_ASYNCHRONOUS */ -static void __thread_cancel_handler(int sig) -{ - _pthread_descr this; - this = __thread_self(); - this->canceled=1; - if (this->canceltype==PTHREAD_CANCEL_ASYNCHRONOUS) - pthread_exit(PTHREAD_CANCELED); - signal( SIGHUP, __thread_cancel_handler ); -} - -/* kill ALL threads / other then prime task and manager thread */ -static void __kill_all_threads() -{ - int i; - - for (i=2; i<_max_used_thread_id; i++) { - if (threads[i].pid>1) { -#ifdef DEBUG - printf("CANCEL ! %d\n",threads[i].pid); -#endif - threads[i].canceled=1; - kill(threads[i].pid, SIGHUP); /* cancel thread */ - } - } - - __thread_wait_some_time(); - - for (i=2; i<_max_used_thread_id; i++) { - if (threads[i].pid>1) { -#ifdef DEBUG - printf("KILL ! %d\n",threads[i].pid); -#endif - kill(threads[i].pid, SIGTERM); /* KILL thread */ - } - } -} - -__attribute__((weak)) volatile void __thread_start__key(int id) { return; } -__attribute__((weak,alias("__thread_start__key"))) volatile void __thread_exit__key(int id); - -/* support for manager */ -static void *__mthread_starter(void *arg) -{ - _pthread_descr td = (_pthread_descr)arg; - int i = td->stack_size-4096; - - /* just to be sure */ - td->pid=getpid(); - - /* signal handling for a thread */ - signal(SIGTERM, _exit); - signal(SIGCHLD, SIG_DFL); - signal(SIGHUP, __thread_cancel_handler ); - - /* limit stack so that we NEVER have to worry */ - setrlimit(RLIMIT_STACK, (struct rlimit *)(&i)); - - /* set scheduler */ - if (td->policy!=SCHED_OTHER) { - struct sched_param sp; - sp.sched_priority=td->priority; - sched_setscheduler(td->pid,td->policy, &sp); - } - - /* thread_key glue */ - __thread_start__key(td-threads); - -#ifdef DEBUG - printf("in starter %d, parameter %8p\n", td->pid, td->func); -#endif - - if (!td->canceled) { - if (!(setjmp(td->jmp_exit))) { - td->retval=td->func(td->arg); -#ifdef DEBUG - } else { - printf("pthread_exit called in %d\n", td->pid); -#endif - } - } - pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED,0); - - /* thread_key glue */ - __thread_exit__key(td-threads); - -#ifdef DEBUG - printf("end starter %d, retval %8p\n", td->pid, td->retval); -#endif - - /* wake joined thread and put retval */ - if (td->joined) { - td->joined->retval=td->retval; - td->joined->join=0; - td->joined=0; - } - - /* execute all functions on the cleanup-stack */ - for (i=PTHREAD_MAX_CLEANUP;i;) { - if (td->cleanup_stack[--i].func) { - td->cleanup_stack[i].func(td->cleanup_stack[i].arg); - } - } - - return 0; -} - - -/* manager thread and signal handler */ -static char __manager_thread_stack[12*1024]; -static volatile _pthread_descr __manager_thread_data; -static void __manager_SIGCHLD(int sig) -{ - int pid, status, i; - - while(1) { - pid = __libc_waitpid (-1, &status, WNOHANG); - if (pid <= 0) break; - - for (i=0; i<_max_used_thread_id; i++) { - if (threads[i].pid==pid) { - __thread_cleanup(threads+i); - break; - } - } - } -} - -static void __manager_SIGTERM(int sig) -{ - __kill_all_threads(); - _exit(0); -} - -static void* __manager_thread(void *arg) -{ - struct sigaction sig_action_chld; - sig_action_chld.sa_handler = __manager_SIGCHLD; - sigemptyset(&sig_action_chld.sa_mask); - sig_action_chld.sa_flags = SA_RESTART; - - sigaction(SIGCHLD, &sig_action_chld, 0); - signal(SIGTERM, __manager_SIGTERM); - signal(SIGHUP, SIG_IGN); - - __pthread_unlock(&__manager_thread_data_go_lock); /* release init */ - while(1) { - do { - __thread_wait_some_time(); - if (getppid()<0) __manager_SIGTERM(0); - } while (__pthread_trylock(&__manager_thread_data_lock)); - - __manager_thread_data->pid = - __clone(__mthread_starter, - __manager_thread_data->stack_addr, - CLONE_VM | CLONE_FS | CLONE_FILES | SIGCHLD, - __manager_thread_data); - __thread_wait_some_time(); -#ifdef DEBUG - printf("manager new thread %d\n",__manager_thread_data->pid); -#endif - __pthread_unlock(&__manager_thread_data_go_lock); /* release sender */ - } - return 0; -} - -/* pthread_create bottom half */ -int signal_manager_thread(_pthread_descr td) -{ - __NO_ASYNC_CANCEL_BEGIN; - - __pthread_lock(&__manager_thread_signal_lock); /* lock */ - - __manager_thread_data = td; - __thread_wait_some_time(); - __pthread_unlock(&__manager_thread_data_lock); /* signal manager to start */ - __thread_wait_some_time(); - __pthread_lock(&__manager_thread_data_go_lock); /* wait for manager */ - - __pthread_unlock(&__manager_thread_signal_lock); /* unlock */ - - __NO_ASYNC_CANCEL_END; - - return td->pid; -} - - -/* thread stop */ -static void __thread_main_exit() -{ - if (getpid()!=threads[0].pid) { -#ifdef DEBUG - printf("A THREAD ? %d\n",getpid()); -#endif - kill(threads[0].pid, SIGTERM); - while(1) __thread_wait_some_time(); - } -#ifdef DEBUG - else - printf("EXIT ! %d\n",getpid()); -#endif - - /* stop ALL threads */ - kill(threads[1].pid, SIGTERM); - __thread_wait_some_time(); - __kill_all_threads(); -} - -/* thread intern init */ -void __thread_init() -{ - if (atexit(__thread_main_exit)==-1) - exit(42); - -#ifdef DEBUG - printf("INIT ! %d\n",getpid()); - memset(threads,0,sizeof(threads)); -#endif - - threads[0].pid = getpid(); - - ++_max_used_thread_id; - threads[1].stack_size=sizeof(__manager_thread_stack); - threads[1].stack_addr=&__manager_thread_stack[sizeof(__manager_thread_stack)]; - threads[1].stack_begin=0; - threads[1].func=__manager_thread; - - threads[1].pid = __clone(__mthread_starter, threads[1].stack_addr, - CLONE_VM | CLONE_FS | CLONE_FILES, threads+1); - -#ifdef DEBUG - printf("manager thread @ : %d\n",threads[1].pid); -#endif - __pthread_lock(&__manager_thread_data_go_lock); /* wait for manager to be ready */ -} - diff --git a/mdk-stage1/dietlibc/libpthread/thread_key.c b/mdk-stage1/dietlibc/libpthread/thread_key.c deleted file mode 100644 index b0f719fc9..000000000 --- a/mdk-stage1/dietlibc/libpthread/thread_key.c +++ /dev/null @@ -1,41 +0,0 @@ -#include <unistd.h> -#include <errno.h> - -#include <pthread.h> -#include "thread_internal.h" - -struct _pthread_fastlock __thread_keys_lock; -struct _thread_key __thread_keys[PTHREAD_KEYS_MAX]; - -void __thread_start__key(int id) -{ - int i; - - __NO_ASYNC_CANCEL_BEGIN; - __pthread_lock(&__thread_keys_lock); - - for (i=0; i<PTHREAD_KEYS_MAX; i++) { - __thread_keys[i].tkd[id]=0; - } - - __pthread_unlock(&__thread_keys_lock); - __NO_ASYNC_CANCEL_END; -} - -void __thread_exit__key(int id) -{ - int i,try; - - __NO_ASYNC_CANCEL_BEGIN; - __pthread_lock(&__thread_keys_lock); - - for (i=0; i<PTHREAD_KEYS_MAX; i++) { - if ((__thread_keys[i].used) && (__thread_keys[i].destructor)) { - for (try=0;__thread_keys[i].tkd[id] && (try<PTHREAD_DESTRUCTOR_ITERATIONS);++try) - __thread_keys[i].destructor(__thread_keys[i].tkd[id]); - } - } - - __pthread_unlock(&__thread_keys_lock); - __NO_ASYNC_CANCEL_STOP; -} diff --git a/mdk-stage1/dietlibc/libstdio/fgetc.c b/mdk-stage1/dietlibc/libstdio/fgetc.c deleted file mode 100644 index 90d83961a..000000000 --- a/mdk-stage1/dietlibc/libstdio/fgetc.c +++ /dev/null @@ -1,40 +0,0 @@ -#include "dietstdio.h" -#include <unistd.h> - -extern int feof(FILE *stream); - -int fgetc(FILE *stream) { - unsigned char c; -#ifdef WANT_UNGETC - if (stream->ungotten) { - stream->ungotten=0; - return stream->ungetbuf; - } -#endif - if (feof(stream)) - return EOF; -#ifdef WANT_BUFFERED_STDIO - if (__fflush4(stream,BUFINPUT)) return EOF; - if (stream->bm>=stream->bs) { - int len=read(stream->fd,stream->buf,BUFSIZE); - if (len==0) { - stream->flags|=EOFINDICATOR; - return EOF; - } else if (len<0) { - stream->flags|=ERRORINDICATOR; - return EOF; - } - stream->bm=0; - stream->bs=len; - } - c=stream->buf[stream->bm]; - ++stream->bm; - return c; -#else - if (read(stream->fd,&c,1)!=1) { - stream->flags|=ERRORINDICATOR; - return EOF; - } - return c; -#endif -} diff --git a/mdk-stage1/dietlibc/libstdio/fputc.c b/mdk-stage1/dietlibc/libstdio/fputc.c deleted file mode 100644 index b816f7c4d..000000000 --- a/mdk-stage1/dietlibc/libstdio/fputc.c +++ /dev/null @@ -1,19 +0,0 @@ -#include <dietstdio.h> -#ifndef WANT_BUFFERED_STDIO -#include <unistd.h> -#endif - -int fputc(int c, FILE *stream) { -#ifdef WANT_BUFFERED_STDIO - if (__fflush4(stream,0)) return EOF; - if (stream->bm>=BUFSIZE-1) - if (fflush(stream)) return EOF; - stream->buf[stream->bm]=c; - ++stream->bm; - if ((stream->flags&BUFLINEWISE) && c=='\n') /* puke */ - if (fflush(stream)) return EOF; -#else - write(stream->fd,&c,1); -#endif - return 0; -} diff --git a/mdk-stage1/dietlibc/libugly/daemon.c b/mdk-stage1/dietlibc/libugly/daemon.c deleted file mode 100644 index 6748cc3c9..000000000 --- a/mdk-stage1/dietlibc/libugly/daemon.c +++ /dev/null @@ -1,35 +0,0 @@ -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <unistd.h> -#include <paths.h> - -#include "daemon.h" - -int daemon (int nochdir,int noclose) -{ - int fd; - switch (fork ()) - { - case -1: - return (-1); - case 0: - break; - default: - _exit (0); - } - if (setsid () == -1) - return (-1); - if (!nochdir) chdir ("/"); - if (!noclose) - { - fd = open (_PATH_DEVNULL,O_RDWR,0); - if (fd == -1) return (-1); - dup2 (fd,STDIN_FILENO); - dup2 (fd,STDOUT_FILENO); - dup2 (fd,STDERR_FILENO); - close (fd); - } - return (0); -} - diff --git a/mdk-stage1/dietlibc/start.h b/mdk-stage1/dietlibc/start.h deleted file mode 100644 index 7f9e6be28..000000000 --- a/mdk-stage1/dietlibc/start.h +++ /dev/null @@ -1,14 +0,0 @@ -.section ".bss" -.align 8 - -.weak errno -errno: -.global __errno -__errno: - .long 0 - -.weak environ -environ: -.global __environ -__environ: - .long 0 diff --git a/mdk-stage1/dietlibc/syscalls.c/_llseek.c b/mdk-stage1/dietlibc/syscalls.c/_llseek.c deleted file mode 100644 index fdf49eba5..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/_llseek.c +++ /dev/null @@ -1,5 +0,0 @@ -#include <unistd.h> -#include <sys/types.h> -#include "syscalls.h" - -_syscall5(int,_llseek,uint,fd,ulong,hi,ulong,lo,loff_t*,res,uint,wh); diff --git a/mdk-stage1/dietlibc/syscalls.c/_newselect.c b/mdk-stage1/dietlibc/syscalls.c/_newselect.c deleted file mode 100644 index cb42193bd..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/_newselect.c +++ /dev/null @@ -1,6 +0,0 @@ -#include <linux/types.h> -#include <linux/time.h> -#include "syscalls.h" - -_syscall5(int,_newselect,int,n,fd_set *,rd,fd_set *,wr,fd_set *,ex,struct timeval *,timeval); - diff --git a/mdk-stage1/dietlibc/syscalls.c/access.c b/mdk-stage1/dietlibc/syscalls.c/access.c deleted file mode 100644 index 80944733a..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/access.c +++ /dev/null @@ -1,4 +0,0 @@ -#include <linux/types.h> -#include "syscalls.h" - -_syscall2(int,access,const char*,pathname,int,mode) diff --git a/mdk-stage1/dietlibc/syscalls.c/chdir.c b/mdk-stage1/dietlibc/syscalls.c/chdir.c deleted file mode 100644 index a679f528d..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/chdir.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -_syscall1(int,chdir,void*,path) diff --git a/mdk-stage1/dietlibc/syscalls.c/chmod.c b/mdk-stage1/dietlibc/syscalls.c/chmod.c deleted file mode 100644 index 80ad33b40..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/chmod.c +++ /dev/null @@ -1,5 +0,0 @@ -#include <linux/types.h> -#include "syscalls.h" - -_syscall2(int,chmod,const char * ,path,mode_t,mode) - diff --git a/mdk-stage1/dietlibc/syscalls.c/chown.c b/mdk-stage1/dietlibc/syscalls.c/chown.c deleted file mode 100644 index 5a9352684..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/chown.c +++ /dev/null @@ -1,5 +0,0 @@ -#include <linux/types.h> -#include "syscalls.h" - -_syscall3(int,chown,char*,path,uid_t,owner,gid_t,group) - diff --git a/mdk-stage1/dietlibc/syscalls.c/chroot.c b/mdk-stage1/dietlibc/syscalls.c/chroot.c deleted file mode 100644 index ab39f7ebe..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/chroot.c +++ /dev/null @@ -1,4 +0,0 @@ -#include "syscalls.h" - -_syscall1(int,chroot,void*,path) - diff --git a/mdk-stage1/dietlibc/syscalls.c/clone.c b/mdk-stage1/dietlibc/syscalls.c/clone.c deleted file mode 100644 index 985eee4c8..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/clone.c +++ /dev/null @@ -1 +0,0 @@ -#warning "No CLONE support yet" diff --git a/mdk-stage1/dietlibc/syscalls.c/close.c b/mdk-stage1/dietlibc/syscalls.c/close.c deleted file mode 100644 index a7d7f0076..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/close.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -_syscall1(int,close,int,fd) diff --git a/mdk-stage1/dietlibc/syscalls.c/dup.c b/mdk-stage1/dietlibc/syscalls.c/dup.c deleted file mode 100644 index 9c28f0bd6..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/dup.c +++ /dev/null @@ -1,4 +0,0 @@ -#include "syscalls.h" - -_syscall1(int,dup,int,fd) - diff --git a/mdk-stage1/dietlibc/syscalls.c/dup2.c b/mdk-stage1/dietlibc/syscalls.c/dup2.c deleted file mode 100644 index 399314aa8..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/dup2.c +++ /dev/null @@ -1,4 +0,0 @@ -#include "syscalls.h" - -_syscall2(int,dup2,int,one,int,two) - diff --git a/mdk-stage1/dietlibc/syscalls.c/execve.c b/mdk-stage1/dietlibc/syscalls.c/execve.c deleted file mode 100644 index c2bac0117..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/execve.c +++ /dev/null @@ -1,4 +0,0 @@ -#include "syscalls.h" - -_syscall3(int,execve,const char *,fn,void *,argv,void *,envp) - diff --git a/mdk-stage1/dietlibc/syscalls.c/exit.c b/mdk-stage1/dietlibc/syscalls.c/exit.c deleted file mode 100644 index 87087c939..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/exit.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -_syscall1(int,exit,int,exitcode) diff --git a/mdk-stage1/dietlibc/syscalls.c/fchdir.c b/mdk-stage1/dietlibc/syscalls.c/fchdir.c deleted file mode 100644 index b3a41dc7a..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/fchdir.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -_syscall1(int,fchdir,int,fd) diff --git a/mdk-stage1/dietlibc/syscalls.c/fchmod.c b/mdk-stage1/dietlibc/syscalls.c/fchmod.c deleted file mode 100644 index 09e52b6c7..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/fchmod.c +++ /dev/null @@ -1,5 +0,0 @@ -#include <linux/types.h> -#include "syscalls.h" - -_syscall2(int,fchmod,int,filedes,mode_t,mode) - diff --git a/mdk-stage1/dietlibc/syscalls.c/fchown.c b/mdk-stage1/dietlibc/syscalls.c/fchown.c deleted file mode 100644 index 58923a137..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/fchown.c +++ /dev/null @@ -1,5 +0,0 @@ -#include <linux/types.h> -#include "syscalls.h" - -_syscall3(int,fchown,int,fd,uid_t,owner,gid_t,group) - diff --git a/mdk-stage1/dietlibc/syscalls.c/fcntl.c b/mdk-stage1/dietlibc/syscalls.c/fcntl.c deleted file mode 100644 index b21be9531..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/fcntl.c +++ /dev/null @@ -1,4 +0,0 @@ -#include "syscalls.h" - -_syscall3(int,fcntl,int,fd,int,cmd,long,arg) - diff --git a/mdk-stage1/dietlibc/syscalls.c/flock.c b/mdk-stage1/dietlibc/syscalls.c/flock.c deleted file mode 100644 index 6fcb336ef..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/flock.c +++ /dev/null @@ -1,4 +0,0 @@ -#include "syscalls.h" - -_syscall2(int,flock,int,fd,int,op) - diff --git a/mdk-stage1/dietlibc/syscalls.c/fork.c b/mdk-stage1/dietlibc/syscalls.c/fork.c deleted file mode 100644 index 1d4b892b6..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/fork.c +++ /dev/null @@ -1,6 +0,0 @@ -#include "syscalls.h" - -#ifndef __sparc__ - -_syscall0(int,fork) -#endif diff --git a/mdk-stage1/dietlibc/syscalls.c/fsync.c b/mdk-stage1/dietlibc/syscalls.c/fsync.c deleted file mode 100644 index db6198b8a..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/fsync.c +++ /dev/null @@ -1,4 +0,0 @@ -#include "syscalls.h" - -_syscall1(int,fsync,int,fd) - diff --git a/mdk-stage1/dietlibc/syscalls.c/ftruncate.c b/mdk-stage1/dietlibc/syscalls.c/ftruncate.c deleted file mode 100644 index 5f002a899..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/ftruncate.c +++ /dev/null @@ -1,4 +0,0 @@ -#include <sys/types.h> -#include "syscalls.h" - -_syscall2(int,ftruncate,int,fd,off_t,length) diff --git a/mdk-stage1/dietlibc/syscalls.c/getcwd.c b/mdk-stage1/dietlibc/syscalls.c/getcwd.c deleted file mode 100644 index 9e5e4a3e2..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/getcwd.c +++ /dev/null @@ -1,5 +0,0 @@ -#include "syscalls.h" - -/* this syscall exists since Linux 2.1.92 */ - -_syscall2(int,getcwd,char*,buf,unsigned long,size) diff --git a/mdk-stage1/dietlibc/syscalls.c/getdents.c b/mdk-stage1/dietlibc/syscalls.c/getdents.c deleted file mode 100644 index be941b21e..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/getdents.c +++ /dev/null @@ -1,4 +0,0 @@ -#include "syscalls.h" - -_syscall3(int, getdents, unsigned int, fd, void *, dirp, unsigned int, count); - diff --git a/mdk-stage1/dietlibc/syscalls.c/getegid.c b/mdk-stage1/dietlibc/syscalls.c/getegid.c deleted file mode 100644 index 3213d640c..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/getegid.c +++ /dev/null @@ -1,4 +0,0 @@ -#include <linux/types.h> -#include "syscalls.h" - -_syscall0(gid_t,getegid) diff --git a/mdk-stage1/dietlibc/syscalls.c/geteuid.c b/mdk-stage1/dietlibc/syscalls.c/geteuid.c deleted file mode 100644 index 5b31a3cca..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/geteuid.c +++ /dev/null @@ -1,4 +0,0 @@ -#include <linux/types.h> -#include "syscalls.h" - -_syscall0(uid_t,geteuid) diff --git a/mdk-stage1/dietlibc/syscalls.c/getgid.c b/mdk-stage1/dietlibc/syscalls.c/getgid.c deleted file mode 100644 index 2f7d96286..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/getgid.c +++ /dev/null @@ -1,4 +0,0 @@ -#include <linux/types.h> -#include "syscalls.h" - -_syscall0(gid_t,getgid) diff --git a/mdk-stage1/dietlibc/syscalls.c/getgroups.c b/mdk-stage1/dietlibc/syscalls.c/getgroups.c deleted file mode 100644 index 3e4d6797a..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/getgroups.c +++ /dev/null @@ -1,4 +0,0 @@ -#include <linux/types.h> -#include "syscalls.h" - -_syscall2(int,getgroups,int,size,int*,list) diff --git a/mdk-stage1/dietlibc/syscalls.c/getpgid.c b/mdk-stage1/dietlibc/syscalls.c/getpgid.c deleted file mode 100644 index 0b4ff528b..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/getpgid.c +++ /dev/null @@ -1,4 +0,0 @@ -#include <linux/types.h> -#include "syscalls.h" - -_syscall1(pid_t,getpgid,pid_t,pid) diff --git a/mdk-stage1/dietlibc/syscalls.c/getpid.c b/mdk-stage1/dietlibc/syscalls.c/getpid.c deleted file mode 100644 index d60a8db9a..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/getpid.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -_syscall0(int,getpid) diff --git a/mdk-stage1/dietlibc/syscalls.c/getppid.c b/mdk-stage1/dietlibc/syscalls.c/getppid.c deleted file mode 100644 index ee87a8eae..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/getppid.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -_syscall0(int,getppid) diff --git a/mdk-stage1/dietlibc/syscalls.c/getpriority.c b/mdk-stage1/dietlibc/syscalls.c/getpriority.c deleted file mode 100644 index 6f94bcf42..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/getpriority.c +++ /dev/null @@ -1,4 +0,0 @@ -#include "syscalls.h" - -_syscall3(int,getpriority,int,which,int,who) - diff --git a/mdk-stage1/dietlibc/syscalls.c/getresgid.c b/mdk-stage1/dietlibc/syscalls.c/getresgid.c deleted file mode 100644 index 264ec7dce..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/getresgid.c +++ /dev/null @@ -1,8 +0,0 @@ -#include <linux/types.h> -#include "syscalls.h" - -#ifdef __NR_getresgid - -_syscall3(int,getresgid,gid_t*,rgid,gid_t*,egid,gid_t*,sgid) - -#endif diff --git a/mdk-stage1/dietlibc/syscalls.c/getresuid.c b/mdk-stage1/dietlibc/syscalls.c/getresuid.c deleted file mode 100644 index 74e2daec2..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/getresuid.c +++ /dev/null @@ -1,8 +0,0 @@ -#include <linux/types.h> -#include "syscalls.h" - -#ifdef __getresuid - -_syscall3(int,getresuid,uid_t*,ruid,uid_t*,euid,uid_t*,suid) - -#endif diff --git a/mdk-stage1/dietlibc/syscalls.c/getrlimit.c b/mdk-stage1/dietlibc/syscalls.c/getrlimit.c deleted file mode 100644 index 635b2baf4..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/getrlimit.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -_syscall2(int,getrlimit,int,resource,void*,rlim) diff --git a/mdk-stage1/dietlibc/syscalls.c/getrusage.c b/mdk-stage1/dietlibc/syscalls.c/getrusage.c deleted file mode 100644 index 815d3e617..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/getrusage.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -_syscall2(int,getrusage,int,who,void*,rusage) diff --git a/mdk-stage1/dietlibc/syscalls.c/getsid.c b/mdk-stage1/dietlibc/syscalls.c/getsid.c deleted file mode 100644 index 69974c36c..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/getsid.c +++ /dev/null @@ -1,4 +0,0 @@ -#include <linux/types.h> -#include "syscalls.h" - -_syscall1(pid_t,getsid,pid_t,pid) diff --git a/mdk-stage1/dietlibc/syscalls.c/gettimeofday.c b/mdk-stage1/dietlibc/syscalls.c/gettimeofday.c deleted file mode 100644 index 5f4931a0c..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/gettimeofday.c +++ /dev/null @@ -1,5 +0,0 @@ -#include <linux/types.h> -#include <linux/time.h> -#include "syscalls.h" - -_syscall2(int,gettimeofday,struct timeval *,tv,void *,tz) diff --git a/mdk-stage1/dietlibc/syscalls.c/getuid.c b/mdk-stage1/dietlibc/syscalls.c/getuid.c deleted file mode 100644 index bf38447a6..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/getuid.c +++ /dev/null @@ -1,4 +0,0 @@ -#include <linux/types.h> -#include "syscalls.h" - -_syscall0(uid_t,getuid) diff --git a/mdk-stage1/dietlibc/syscalls.c/ioctl.c b/mdk-stage1/dietlibc/syscalls.c/ioctl.c deleted file mode 100644 index 1612109d3..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/ioctl.c +++ /dev/null @@ -1,4 +0,0 @@ -#include "syscalls.h" - -_syscall3(int,ioctl,int,fd,int,request,void *,argp) - diff --git a/mdk-stage1/dietlibc/syscalls.c/kill.c b/mdk-stage1/dietlibc/syscalls.c/kill.c deleted file mode 100644 index e56b0ac1b..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/kill.c +++ /dev/null @@ -1,4 +0,0 @@ -#include <linux/types.h> -#include "syscalls.h" - -_syscall2(int,kill,pid_t,pid,int,sig) diff --git a/mdk-stage1/dietlibc/syscalls.c/lchown.c b/mdk-stage1/dietlibc/syscalls.c/lchown.c deleted file mode 100644 index 976d2ee1f..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/lchown.c +++ /dev/null @@ -1,5 +0,0 @@ -#include <linux/types.h> -#include "syscalls.h" - -_syscall3(int,lchown,char*,path,uid_t,owner,gid_t,group) - diff --git a/mdk-stage1/dietlibc/syscalls.c/link.c b/mdk-stage1/dietlibc/syscalls.c/link.c deleted file mode 100644 index ab9b427d9..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/link.c +++ /dev/null @@ -1,5 +0,0 @@ -#include <linux/types.h> -#include "syscalls.h" - -_syscall2(int,link,const char *,a,const char *,b) - diff --git a/mdk-stage1/dietlibc/syscalls.c/lseek.c b/mdk-stage1/dietlibc/syscalls.c/lseek.c deleted file mode 100644 index 9925a2185..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/lseek.c +++ /dev/null @@ -1,4 +0,0 @@ -#include "syscalls.h" - -_syscall3(unsigned long,lseek,int,fd,unsigned long,offset,int,whence) - diff --git a/mdk-stage1/dietlibc/syscalls.c/mkdir.c b/mdk-stage1/dietlibc/syscalls.c/mkdir.c deleted file mode 100644 index aac682c99..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/mkdir.c +++ /dev/null @@ -1,4 +0,0 @@ -#include <linux/types.h> -#include "syscalls.h" - -_syscall2(int,mkdir,void*,path,mode_t,mode) diff --git a/mdk-stage1/dietlibc/syscalls.c/mknod.c b/mdk-stage1/dietlibc/syscalls.c/mknod.c deleted file mode 100644 index 00e836b73..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/mknod.c +++ /dev/null @@ -1,5 +0,0 @@ -#include <linux/types.h> -#include "syscalls.h" - -_syscall3(int,mknod,const char*,pathname,mode_t,mode,dev_t,dev) - diff --git a/mdk-stage1/dietlibc/syscalls.c/mount.c b/mdk-stage1/dietlibc/syscalls.c/mount.c deleted file mode 100644 index 2d71ee812..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/mount.c +++ /dev/null @@ -1,4 +0,0 @@ -#include "syscalls.h" - -_syscall5(int,mount,const char *,spec,const char *,dir,const char *,type,unsigned long,rwflag,const void *,data); - diff --git a/mdk-stage1/dietlibc/syscalls.c/mprotect.c b/mdk-stage1/dietlibc/syscalls.c/mprotect.c deleted file mode 100644 index 634a12089..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/mprotect.c +++ /dev/null @@ -1,4 +0,0 @@ -#include <linux/types.h> -#include "syscalls.h" - -_syscall3(int,mprotect,const void *,addr, size_t, len, int, prot) diff --git a/mdk-stage1/dietlibc/syscalls.c/mremap.c b/mdk-stage1/dietlibc/syscalls.c/mremap.c deleted file mode 100644 index 37d066bac..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/mremap.c +++ /dev/null @@ -1,5 +0,0 @@ -#include <linux/types.h> -#include "syscalls.h" - -_syscall4(int,mremap,void*,old_address,size_t,old_size,size_t,new_size,unsigned long,flags) - diff --git a/mdk-stage1/dietlibc/syscalls.c/munmap.c b/mdk-stage1/dietlibc/syscalls.c/munmap.c deleted file mode 100644 index 40bc98270..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/munmap.c +++ /dev/null @@ -1,5 +0,0 @@ -#include <linux/types.h> -#include "syscalls.h" - -_syscall2(int,munmap,void*,start,size_t,len) - diff --git a/mdk-stage1/dietlibc/syscalls.c/nanosleep.c b/mdk-stage1/dietlibc/syscalls.c/nanosleep.c deleted file mode 100644 index 71aca1f09..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/nanosleep.c +++ /dev/null @@ -1,5 +0,0 @@ -#include <linux/types.h> -#include <linux/time.h> -#include "syscalls.h" - -_syscall2(int,nanosleep,struct timeval *,in,struct timeval *,out) diff --git a/mdk-stage1/dietlibc/syscalls.c/open.c b/mdk-stage1/dietlibc/syscalls.c/open.c deleted file mode 100644 index 8b3ccfcc3..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/open.c +++ /dev/null @@ -1,4 +0,0 @@ -#include <linux/types.h> -#include "syscalls.h" - -_syscall3(int,open,const char *,fn,int,flags,mode_t,mode) diff --git a/mdk-stage1/dietlibc/syscalls.c/pipe.c b/mdk-stage1/dietlibc/syscalls.c/pipe.c deleted file mode 100644 index 42197c881..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/pipe.c +++ /dev/null @@ -1,4 +0,0 @@ -#include <linux/types.h> -#include "syscalls.h" - -_syscall1(int,pipe,int *,filedes) diff --git a/mdk-stage1/dietlibc/syscalls.c/poll.c b/mdk-stage1/dietlibc/syscalls.c/poll.c deleted file mode 100644 index 10d0d1f78..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/poll.c +++ /dev/null @@ -1,4 +0,0 @@ -#include <linux/types.h> -#include "syscalls.h" - -_syscall3(int,poll,void *,ufds,int,nfds,int,timeout) diff --git a/mdk-stage1/dietlibc/syscalls.c/read.c b/mdk-stage1/dietlibc/syscalls.c/read.c deleted file mode 100644 index f5532054e..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/read.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -_syscall3(int,read,int,fd,const char *,buf,unsigned long,count) diff --git a/mdk-stage1/dietlibc/syscalls.c/readlink.c b/mdk-stage1/dietlibc/syscalls.c/readlink.c deleted file mode 100644 index 482f8fe27..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/readlink.c +++ /dev/null @@ -1,5 +0,0 @@ -#include "syscalls.h" -#include <linux/types.h> - -_syscall3(int,readlink,char*,path,char*,buf,size_t,bufsiz) - diff --git a/mdk-stage1/dietlibc/syscalls.c/reboot.c b/mdk-stage1/dietlibc/syscalls.c/reboot.c deleted file mode 100644 index 0ad474894..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/reboot.c +++ /dev/null @@ -1,4 +0,0 @@ -#include "syscalls.h" - -_syscall3(int,reboot,int,magic,int,magic_too,int,flag) - diff --git a/mdk-stage1/dietlibc/syscalls.c/rename.c b/mdk-stage1/dietlibc/syscalls.c/rename.c deleted file mode 100644 index f86d50728..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/rename.c +++ /dev/null @@ -1,4 +0,0 @@ -#include "syscalls.h" - -_syscall2(int,rename,char*,oldpath,char*,newpath) - diff --git a/mdk-stage1/dietlibc/syscalls.c/rmdir.c b/mdk-stage1/dietlibc/syscalls.c/rmdir.c deleted file mode 100644 index 303885264..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/rmdir.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -_syscall1(int,rmdir,void*,path) diff --git a/mdk-stage1/dietlibc/syscalls.c/setdomainname.c b/mdk-stage1/dietlibc/syscalls.c/setdomainname.c deleted file mode 100644 index 83d3aa8b8..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/setdomainname.c +++ /dev/null @@ -1,4 +0,0 @@ -#include "syscalls.h" - -_syscall2(int,setdomainname,const char *,name,int,len) - diff --git a/mdk-stage1/dietlibc/syscalls.c/setgid.c b/mdk-stage1/dietlibc/syscalls.c/setgid.c deleted file mode 100644 index 1f7263aeb..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/setgid.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -_syscall1(int,setgid,int,gid) diff --git a/mdk-stage1/dietlibc/syscalls.c/setgroups.c b/mdk-stage1/dietlibc/syscalls.c/setgroups.c deleted file mode 100644 index fed3b85c1..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/setgroups.c +++ /dev/null @@ -1,4 +0,0 @@ -#include "syscalls.h" - -_syscall2(int,setgroups,int,size,const int*,list) - diff --git a/mdk-stage1/dietlibc/syscalls.c/sethostname.c b/mdk-stage1/dietlibc/syscalls.c/sethostname.c deleted file mode 100644 index e4b736f87..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/sethostname.c +++ /dev/null @@ -1,4 +0,0 @@ -#include "syscalls.h" - -_syscall2(int,sethostname,const char *,name,int,len) - diff --git a/mdk-stage1/dietlibc/syscalls.c/setitimer.c b/mdk-stage1/dietlibc/syscalls.c/setitimer.c deleted file mode 100644 index 28935cab7..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/setitimer.c +++ /dev/null @@ -1,4 +0,0 @@ -#include "syscalls.h" - -_syscall3(int,setitimer,int,which,void *,value,void *,ovalue) - diff --git a/mdk-stage1/dietlibc/syscalls.c/setpgid.c b/mdk-stage1/dietlibc/syscalls.c/setpgid.c deleted file mode 100644 index 66fbf82dd..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/setpgid.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -_syscall2(int,setpgid,int,name,int,len) diff --git a/mdk-stage1/dietlibc/syscalls.c/setpriority.c b/mdk-stage1/dietlibc/syscalls.c/setpriority.c deleted file mode 100644 index bc04227d2..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/setpriority.c +++ /dev/null @@ -1,4 +0,0 @@ -#include "syscalls.h" - -_syscall3(int,setpriority,int,which,int,who,int,prio) - diff --git a/mdk-stage1/dietlibc/syscalls.c/setregid.c b/mdk-stage1/dietlibc/syscalls.c/setregid.c deleted file mode 100644 index c6911aca8..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/setregid.c +++ /dev/null @@ -1,4 +0,0 @@ -#include <linux/types.h> -#include "syscalls.h" - -_syscall2(int,setregid,gid_t,rgid,gid_t,egid) diff --git a/mdk-stage1/dietlibc/syscalls.c/setresgid.c b/mdk-stage1/dietlibc/syscalls.c/setresgid.c deleted file mode 100644 index 817fd2942..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/setresgid.c +++ /dev/null @@ -1,8 +0,0 @@ -#include <linux/types.h> -#include "syscalls.h" - -#ifdef __NR_setresgid - -_syscall3(int,setresgid,gid_t*,rgid,gid_t*,egid,gid_t*,sgid) - -#endif diff --git a/mdk-stage1/dietlibc/syscalls.c/setresuid.c b/mdk-stage1/dietlibc/syscalls.c/setresuid.c deleted file mode 100644 index 7073d8ac2..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/setresuid.c +++ /dev/null @@ -1,8 +0,0 @@ -#include <linux/types.h> -#include "syscalls.h" - -#ifdef __NR_setresuid - -_syscall3(int,setresuid,uid_t*,ruid,uid_t*,euid,uid_t*,suid) - -#endif diff --git a/mdk-stage1/dietlibc/syscalls.c/setreuid.c b/mdk-stage1/dietlibc/syscalls.c/setreuid.c deleted file mode 100644 index c0c23a12d..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/setreuid.c +++ /dev/null @@ -1,4 +0,0 @@ -#include <linux/types.h> -#include "syscalls.h" - -_syscall2(int,setreuid,uid_t,ruid,uid_t,euid) diff --git a/mdk-stage1/dietlibc/syscalls.c/setrlimit.c b/mdk-stage1/dietlibc/syscalls.c/setrlimit.c deleted file mode 100644 index 213234282..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/setrlimit.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -_syscall2(int,setrlimit,int,resource,void*,rlim) diff --git a/mdk-stage1/dietlibc/syscalls.c/setsid.c b/mdk-stage1/dietlibc/syscalls.c/setsid.c deleted file mode 100644 index 4b35a1316..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/setsid.c +++ /dev/null @@ -1,4 +0,0 @@ -#include <linux/types.h> -#include "syscalls.h" - -_syscall0(pid_t,setsid) diff --git a/mdk-stage1/dietlibc/syscalls.c/setuid.c b/mdk-stage1/dietlibc/syscalls.c/setuid.c deleted file mode 100644 index 620876c9f..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/setuid.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -_syscall1(int,setuid,int,uid) diff --git a/mdk-stage1/dietlibc/syscalls.c/sigaction.c b/mdk-stage1/dietlibc/syscalls.c/sigaction.c deleted file mode 100644 index cfa5c683f..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/sigaction.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -_syscall3(int,sigaction,int,signum,void*,act,void*,oldact) diff --git a/mdk-stage1/dietlibc/syscalls.c/signal.c b/mdk-stage1/dietlibc/syscalls.c/signal.c deleted file mode 100644 index 1a913be45..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/signal.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -_syscall2(int,signal,int,num,void *,len) diff --git a/mdk-stage1/dietlibc/syscalls.c/sigpending.c b/mdk-stage1/dietlibc/syscalls.c/sigpending.c deleted file mode 100644 index 08fb23991..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/sigpending.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -_syscall1(int,sigpending,void*,set) diff --git a/mdk-stage1/dietlibc/syscalls.c/sigprocmask.c b/mdk-stage1/dietlibc/syscalls.c/sigprocmask.c deleted file mode 100644 index e9dcc2d67..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/sigprocmask.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -_syscall3(int,sigprocmask,int,how,void*,set,void*,oldset) diff --git a/mdk-stage1/dietlibc/syscalls.c/sigsuspend.c b/mdk-stage1/dietlibc/syscalls.c/sigsuspend.c deleted file mode 100644 index 0fe90e623..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/sigsuspend.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -_syscall1(int,sigsuspend,void*,mask) diff --git a/mdk-stage1/dietlibc/syscalls.c/socketcall.c b/mdk-stage1/dietlibc/syscalls.c/socketcall.c deleted file mode 100644 index eee1ae86d..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/socketcall.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -_syscall2(int,socketcall,int,code,unsigned long *, args) diff --git a/mdk-stage1/dietlibc/syscalls.c/swapoff.c b/mdk-stage1/dietlibc/syscalls.c/swapoff.c deleted file mode 100644 index e1daa89a9..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/swapoff.c +++ /dev/null @@ -1,4 +0,0 @@ -#include "syscalls.h" - -_syscall1(int,swapoff,const char *,fn) - diff --git a/mdk-stage1/dietlibc/syscalls.c/swapon.c b/mdk-stage1/dietlibc/syscalls.c/swapon.c deleted file mode 100644 index 543e41e79..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/swapon.c +++ /dev/null @@ -1,4 +0,0 @@ -#include <linux/types.h> -#include "syscalls.h" - -_syscall2(int,swapon,const char*,path,int,swapflags) diff --git a/mdk-stage1/dietlibc/syscalls.c/symlink.c b/mdk-stage1/dietlibc/syscalls.c/symlink.c deleted file mode 100644 index b3f4d0b1c..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/symlink.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -_syscall2(int,symlink,const char *,a,const char *,b) diff --git a/mdk-stage1/dietlibc/syscalls.c/sync.c b/mdk-stage1/dietlibc/syscalls.c/sync.c deleted file mode 100644 index cca17461f..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/sync.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -_syscall0(int,sync) diff --git a/mdk-stage1/dietlibc/syscalls.c/syslog.c b/mdk-stage1/dietlibc/syscalls.c/syslog.c deleted file mode 100644 index aace870ea..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/syslog.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -_syscall3(int,syslog,int, type, char *, buf, int, len); diff --git a/mdk-stage1/dietlibc/syscalls.c/time.c b/mdk-stage1/dietlibc/syscalls.c/time.c deleted file mode 100644 index dc15b28f9..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/time.c +++ /dev/null @@ -1,4 +0,0 @@ -#include <linux/types.h> -#include "syscalls.h" - -_syscall1(time_t,time,time_t*,path) diff --git a/mdk-stage1/dietlibc/syscalls.c/truncate.c b/mdk-stage1/dietlibc/syscalls.c/truncate.c deleted file mode 100644 index 721bd7134..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/truncate.c +++ /dev/null @@ -1,4 +0,0 @@ -#include <linux/types.h> -#include "syscalls.h" - -_syscall2(int,truncate,const char*,path,off_t,length) diff --git a/mdk-stage1/dietlibc/syscalls.c/umask.c b/mdk-stage1/dietlibc/syscalls.c/umask.c deleted file mode 100644 index 506038243..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/umask.c +++ /dev/null @@ -1,5 +0,0 @@ -#include <linux/types.h> -#include "syscalls.h" - -_syscall1(int,umask,mode_t,mask) - diff --git a/mdk-stage1/dietlibc/syscalls.c/umount.c b/mdk-stage1/dietlibc/syscalls.c/umount.c deleted file mode 100644 index 4d3ef7637..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/umount.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -_syscall1(int,umount,const char *,dir) diff --git a/mdk-stage1/dietlibc/syscalls.c/uname.c b/mdk-stage1/dietlibc/syscalls.c/uname.c deleted file mode 100644 index 68f135007..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/uname.c +++ /dev/null @@ -1,5 +0,0 @@ -#include <linux/types.h> -#include "syscalls.h" - -_syscall1(int,uname,void *,utsname) - diff --git a/mdk-stage1/dietlibc/syscalls.c/unlink.c b/mdk-stage1/dietlibc/syscalls.c/unlink.c deleted file mode 100644 index 860ccebbf..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/unlink.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -_syscall1(int,unlink,const char *,fn) diff --git a/mdk-stage1/dietlibc/syscalls.c/utime.c b/mdk-stage1/dietlibc/syscalls.c/utime.c deleted file mode 100644 index 185bdf9e8..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/utime.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -_syscall2(int,utime,void*,filename,void*,buf) diff --git a/mdk-stage1/dietlibc/syscalls.c/vhangup.c b/mdk-stage1/dietlibc/syscalls.c/vhangup.c deleted file mode 100644 index bb0669765..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/vhangup.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -_syscall0(int,vhangup) diff --git a/mdk-stage1/dietlibc/syscalls.c/wait4.c b/mdk-stage1/dietlibc/syscalls.c/wait4.c deleted file mode 100644 index 4ae7eabcd..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/wait4.c +++ /dev/null @@ -1,4 +0,0 @@ -#include <linux/types.h> -#include "syscalls.h" - -_syscall4(int,wait4,pid_t,pid,int *,status,int,opts,void *,rusage) diff --git a/mdk-stage1/dietlibc/syscalls.c/waitpid.c b/mdk-stage1/dietlibc/syscalls.c/waitpid.c deleted file mode 100644 index b7167f9ce..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/waitpid.c +++ /dev/null @@ -1,4 +0,0 @@ -#include <linux/types.h> -#include "syscalls.h" - -_syscall3(int,waitpid,int,pid,int *,status,int,options) diff --git a/mdk-stage1/dietlibc/syscalls.c/write.c b/mdk-stage1/dietlibc/syscalls.c/write.c deleted file mode 100644 index d1f7347d5..000000000 --- a/mdk-stage1/dietlibc/syscalls.c/write.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -_syscall3(int,write,int,fd,const char *,buf,unsigned long,count) diff --git a/mdk-stage1/dietlibc/syscalls.s/exit.S b/mdk-stage1/dietlibc/syscalls.s/exit.S deleted file mode 100644 index 11c989529..000000000 --- a/mdk-stage1/dietlibc/syscalls.s/exit.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall_weak(exit,exit,_exit) diff --git a/mdk-stage1/dietlibc/syscalls.s/llseek.S b/mdk-stage1/dietlibc/syscalls.s/llseek.S deleted file mode 100644 index 0318b492e..000000000 --- a/mdk-stage1/dietlibc/syscalls.s/llseek.S +++ /dev/null @@ -1,6 +0,0 @@ -#include "dietfeatures.h" -#include "syscalls.h" - -#ifdef __NR__llseek -syscall(_llseek,llseek) -#endif diff --git a/mdk-stage1/dietlibc/syscalls.s/ptrace.s b/mdk-stage1/dietlibc/syscalls.s/ptrace.s deleted file mode 100644 index 392e6a4ed..000000000 --- a/mdk-stage1/dietlibc/syscalls.s/ptrace.s +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall(ptrace,ptrace) diff --git a/mdk-stage1/dietlibc/syscalls.s/pwrite.S b/mdk-stage1/dietlibc/syscalls.s/pwrite.S deleted file mode 100644 index f52ead7b2..000000000 --- a/mdk-stage1/dietlibc/syscalls.s/pwrite.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall(pwrite,__pwrite) diff --git a/mdk-stage1/dietlibc/syscalls.s/sigaction.S b/mdk-stage1/dietlibc/syscalls.s/sigaction.S deleted file mode 100644 index 32382870c..000000000 --- a/mdk-stage1/dietlibc/syscalls.s/sigaction.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall(sigaction,sigaction) diff --git a/mdk-stage1/dietlibc/syscalls.s/signal.S b/mdk-stage1/dietlibc/syscalls.s/signal.S deleted file mode 100644 index 86c4d5db0..000000000 --- a/mdk-stage1/dietlibc/syscalls.s/signal.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall(signal,signal) diff --git a/mdk-stage1/dietlibc/syscalls.s/sigpending.S b/mdk-stage1/dietlibc/syscalls.s/sigpending.S deleted file mode 100644 index 08715bef5..000000000 --- a/mdk-stage1/dietlibc/syscalls.s/sigpending.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall(sigpending,sigpending) diff --git a/mdk-stage1/dietlibc/syscalls.s/sigprocmask.S b/mdk-stage1/dietlibc/syscalls.s/sigprocmask.S deleted file mode 100644 index 07f5b9d26..000000000 --- a/mdk-stage1/dietlibc/syscalls.s/sigprocmask.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall_weak(sigprocmask,sigprocmask,__sigprocmask) diff --git a/mdk-stage1/dietlibc/syscalls.s/sigsuspend.S b/mdk-stage1/dietlibc/syscalls.s/sigsuspend.S deleted file mode 100644 index 062264ab6..000000000 --- a/mdk-stage1/dietlibc/syscalls.s/sigsuspend.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall_weak(sigsuspend,sigsuspend,__libc_sigsuspend) |