diff -uNr dietlibc-0.28/BUGS dietlibc-0.29/BUGS --- dietlibc-0.28/BUGS 2001-01-09 09:57:37.000000000 -0800 +++ dietlibc-0.29/BUGS 2005-05-15 17:32:59.000000000 -0700 @@ -6,3 +6,9 @@ dietlibc@fefe.de +You need to be subscribed to be able to post to the mailing list. +If you want to report a bug, but do not want to be named or need any +detail to stay confidential, please email me directly and make sure you +mention this. My PGP key is available as + + http://www.fefe.de/felix@fefe.de.asc diff -uNr dietlibc-0.28/CHANGES dietlibc-0.29/CHANGES --- dietlibc-0.28/CHANGES 2005-01-28 08:04:54.000000000 -0800 +++ dietlibc-0.29/CHANGES 2005-05-20 07:46:31.000000000 -0700 @@ -1,3 +1,47 @@ +0.29 + oops, fix LD_RUN_PATH unsetting (Enrico Scholz) + Markus Oberhumer sent the following diffs: + dl_iterate_phdr for libgcc_eh + proper endian.h recognition for __s390x__ + rem and sdiv for sparc + fix stupid dns decoding bug (Gernot Tenchio) + #ifdef powerpc -> #ifdef __powerpc__ (Enrico Scholz) + struct siginfo was wrong for 64-bit platforms + Lots of fixes and patches from Markus Oberhumer. + libstdc++ compatibility + ilp64 compatibility + make diet libc compile with -Werror on 13 platforms + provide time() using gettimeofday for s390x + remove waitpid warnings on ia64, s390/x + provide C++ exception handling support + ppc64 now compiles again + typo in libcompat/syscall.S for WANT_THREAD_SAFE (Björn Döbel) + syscall.h update for all architectures + remove two ppc64 warnings + fix s/390 syscalls > 255 + add "diet -L gcc" option to print the lib path + remove new gcc4 signedness warnings + add link.h (probably only useful to compile an ia64 cross-gcc) + understand -m32 on x86_64 as meaning i386 + now that gcc 4 is out, finally switch -malign-functions to + -falign-functions in diet + MADV_* for hppa and ia64 (Enrico Scholz) + add _PATH_TMP to paths.h + support syscall on sparc and x86_64 (Herbert Poetzl) + change alignment code in gethostbyname_r (Herbert Poetzl) + avoid bus errors in DNS code + implement gettimeofday vsyscall for x86_64 + replace unfinished plug&play DNS hack with zeroconf, + rename dietfeatures.h option to WANT_PLUGPLAY_DNS. + A small dns daemon can be found in contrib/dnsd.c + hack ugly non-thread-safe kludge to communicate proper scope_id + to getaddrinfo + fix bug regarding regular expressions like "(a|)b" + work around gcc 4 bug + make sure diet always leaves -V in front of the gcc command line + sparc64 fixes (Martin) + fix warnings in socketcall functions + 0.28: add tcgetsid (Yuri Kozlov) add _udivdi3, _divdi3, _umoddi3, _moddi3 for MIPS diff -uNr dietlibc-0.28/CVS/Entries dietlibc-0.29/CVS/Entries --- dietlibc-0.28/CVS/Entries 2005-01-31 09:53:07.000000000 -0800 +++ dietlibc-0.29/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,36 +0,0 @@ -/.cvsignore/1.11/Tue Aug 19 21:30:01 2003// -/AUTHOR/1.2/Wed Aug 1 17:42:46 2001// -/BUGS/1.1/Tue Jan 9 17:57:37 2001// -/CAVEAT/1.1/Tue Jan 9 17:57:37 2001// -/CHANGES/1.546/Fri Jan 28 16:04:54 2005// -/COPYING/1.2/Fri Jun 15 22:32:51 2001// -/FAQ/1.26/Fri Dec 17 18:47:58 2004// -/Makefile/1.160/Sat Jan 29 02:39:07 2005// -/PORTING/1.6/Wed Aug 7 01:21:50 2002// -/README/1.7/Mon Feb 18 22:44:35 2002// -/README.security/1.1/Sat Sep 11 12:37:57 2004// -/SECURITY/1.2/Fri Oct 4 19:38:45 2002// -/THANKS/1.11/Fri Dec 5 14:50:49 2003// -/TODO/1.73/Fri Oct 1 10:09:11 2004// -/binshstr.h/1.1/Mon Sep 10 13:17:48 2001// -/diet.1/1.5/Wed Aug 21 22:15:01 2002// -/diet.c/1.60/Fri Dec 17 18:47:58 2004// -/dietdirent.h/1.2/Wed Jul 3 20:33:37 2002// -/dietdns.h/1.1/Wed Oct 10 01:41:02 2001// -/dietfeatures.h/1.57/Fri Dec 17 19:14:49 2004// -/dieticonv.h/1.4/Mon Dec 1 17:42:12 2003// -/dietlibm.h/1.1/Mon Nov 18 01:16:51 2002// -/dietstdio.h/1.27/Tue Nov 11 18:27:41 2003// -/dietstring.h/1.1/Sun Dec 21 12:06:36 2003// -/dietuglyweaks.h/1.6/Thu Apr 29 14:37:25 2004// -/dietwarning.h/1.1/Fri Feb 9 23:48:47 2001// -/dyn_start.c/1.9/Tue Nov 30 22:35:14 2004// -/dyn_stop.c/1.5/Sat Aug 23 16:12:47 2003// -/findcflags.sh/1.5/Wed May 21 11:40:02 2003// -/linuxnet.h/1.1/Sat Jun 16 17:49:29 2001// -/longlong.h/1.1/Thu Aug 12 12:51:36 2004// -/parselib.h/1.4/Tue Apr 8 16:41:27 2003// -/syscalls.h/1.12/Fri Oct 10 13:37:34 2003// -/t.c/1.210/Sat Sep 11 12:37:57 2004// -/threadsafe.sh/1.2/Mon May 3 19:03:45 2004// -D diff -uNr dietlibc-0.28/CVS/Entries.Log dietlibc-0.29/CVS/Entries.Log --- dietlibc-0.28/CVS/Entries.Log 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/CVS/Entries.Log 1969-12-31 16:00:00.000000000 -0800 @@ -1,40 +0,0 @@ -A D/alpha//// -A D/arm//// -A D/contrib//// -A D/dynlinker//// -A D/examples//// -A D/i386//// -A D/ia64//// -A D/include//// -A D/lib//// -A D/libcompat//// -A D/libcruft//// -A D/libcrypt//// -A D/libdl//// -A D/liblatin1//// -A D/libm//// -A D/libpthread//// -A D/libregex//// -A D/librpc//// -A D/libshell//// -A D/libstdio//// -A D/libugly//// -A D/libutf8//// -A D/mips//// -A D/mipsel//// -A D/parisc//// -A D/pending//// -A D/ppc//// -A D/ppc64//// -A D/profiling//// -A D/s390//// -A D/s390x//// -A D/sparc//// -A D/sparc64//// -A D/syscalls.c//// -A D/syscalls.s//// -A D/test//// -A D/x86_64//// -R D/syscalls.c//// -R D/pending//// -R D/libutf8//// diff -uNr dietlibc-0.28/CVS/Repository dietlibc-0.29/CVS/Repository --- dietlibc-0.28/CVS/Repository 2005-01-31 09:53:07.000000000 -0800 +++ dietlibc-0.29/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc diff -uNr dietlibc-0.28/CVS/Root dietlibc-0.29/CVS/Root --- dietlibc-0.28/CVS/Root 2005-01-31 09:53:07.000000000 -0800 +++ dietlibc-0.29/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/FAQ dietlibc-0.29/FAQ --- dietlibc-0.28/FAQ 2004-12-17 10:47:58.000000000 -0800 +++ dietlibc-0.29/FAQ 2005-04-23 04:59:07.000000000 -0700 @@ -241,7 +241,8 @@ Q: Compiling software with "diet -Os gcc..." gives error messages about -malign-loops, -malign-jumps and -malign-functions being obsolete. -A: diet -Os uses some platform dependant gcc options to create tighter +A: UPDATE: the defaults have been changed as of 2005-04-23. + diet -Os uses some platform dependant gcc options to create tighter code. Unfortunately, these options have been renamed on gcc 3. You can fix this by creating a file ~/.diet/gcc containing this line: @@ -251,6 +252,16 @@ i386-linux-gcc, put this in ~/.diet/i386-linux-gcc instead. +Q: Compiling software with "diet -Os gcc..." gives error messages about + -falign-loops, -falign-jumps and -falign-functions. +A: See previous entry for an explanation. You are using gcc 2; please + upgrade to gcc 3 or 4. As a workaround, put + + -Os -fomit-frame-pointer -malign-jumps=1 -malign-loops=1 -mpreferred-stack-boundary=2 + + into ~/.diet/gcc. + + Q: I see lots of uninitialized variables, like "static int foo;". What gives? A: "static" global variables are initialized to 0. ANSI C guarantees that. Technically speaking, static variables go into the .bss ELF segment, diff -uNr dietlibc-0.28/Makefile dietlibc-0.29/Makefile --- dietlibc-0.28/Makefile 2005-01-28 18:39:07.000000000 -0800 +++ dietlibc-0.29/Makefile 2005-05-18 07:38:55.000000000 -0700 @@ -89,7 +89,8 @@ $(OBJDIR)/libcompat.a $(OBJDIR)/libm.a \ $(OBJDIR)/librpc.a $(OBJDIR)/libpthread.a \ $(OBJDIR)/libcrypt.a \ - $(OBJDIR)/diet $(OBJDIR)/diet-i $(OBJDIR)/elftrunc + $(OBJDIR)/diet $(OBJDIR)/diet-i $(OBJDIR)/elftrunc \ + $(OBJDIR)/dnsd all: $(WHAT) @@ -163,6 +164,17 @@ $(CROSS)$(CC) -I. -isystem include $(CFLAGS) -c $< -o $@ $(COMMENT) -$(CROSS)strip -x -R .comment -R .note $@ +ifeq ($(shell $(CC) -v 2>&1 | grep "gcc version"),gcc version 4.0.0) +SAFE_CFLAGS=$(shell echo $(CFLAGS)|sed 's/-Os/-O2/') +SAFER_CFLAGS=$(shell echo $(CFLAGS)|sed 's/-Os/-O/') +else +SAFE_CFLAGS=$(CFLAGS) +SAFER_CFLAGS=$(CFLAGS) +endif + +$(OBJDIR)/crypt.o: libcrypt/crypt.c + $(CROSS)$(CC) -I. -isystem include $(SAFER_CFLAGS) -c $< -o $@ + DIETLIBC_OBJ = $(OBJDIR)/unified.o \ $(SYSCALLOBJ) $(LIBOBJ) $(LIBSTDIOOBJ) $(LIBUGLYOBJ) \ $(LIBCRUFTOBJ) $(LIBCRYPTOBJ) $(LIBSHELLOBJ) $(LIBREGEXOBJ) \ @@ -177,7 +189,7 @@ $(OBJDIR)/libcrypt.a: touch dummy.c - $(CROSS)gcc -c dummy.c + $(CROSS)$(CC) -c dummy.c $(CROSS)ar cru $@ dummy.o rm -f dummy.c dummy.o @@ -199,8 +211,10 @@ $(OBJDIR)/libm.a: $(LIBMATHOBJ) $(CROSS)ar cru $@ $(LIBMATHOBJ) +LD_UNSET = env -u LD_RUN_PATH + $(OBJDIR)/libdietc.so: $(OBJDIR)/dietlibc.a - LD_RUN_PATH= $(CROSS)ld -whole-archive -shared -o $@ $^ + $(LD_UNSET) $(CROSS)ld -whole-archive -shared -o $@ $^ dyn: dyn_lib @@ -246,23 +260,23 @@ DYN_LIBMATH_OBJS = $(patsubst $(OBJDIR)/%.o,$(PICODIR)/%.o,$(LIBMATHOBJ)) $(PICODIR)/libc.so: $(PICODIR) $(DYN_LIBC_OBJ) - LD_RUN_PATH= $(CROSS)$(CC) -nostdlib -shared -o $@ $(CFLAGS) -fPIC $(DYN_LIBC_OBJ) -lgcc -Wl,-soname=libc.so + $(LD_UNSET) $(CROSS)$(CC) -nostdlib -shared -o $@ $(CFLAGS) -fPIC $(DYN_LIBC_OBJ) -lgcc -Wl,-soname=libc.so $(PICODIR)/libpthread.so: $(DYN_PTHREAD_OBJS) dietfeatures.h - LD_RUN_PATH= $(CROSS)$(CC) -nostdlib -shared -o $@ $(CFLAGS) -fPIC $(DYN_PTHREAD_OBJS) -L$(PICODIR) -lc -Wl,-soname=libpthread.so + $(LD_UNSET) $(CROSS)$(CC) -nostdlib -shared -o $@ $(CFLAGS) -fPIC $(DYN_PTHREAD_OBJS) -L$(PICODIR) -lc -Wl,-soname=libpthread.so $(PICODIR)/libdl.so: libdl/_dl_main.c dietfeatures.h - LD_RUN_PATH= $(CROSS)$(CC) -D__OD_CLEAN_ROOM -DNODIETREF -fPIC -nostdlib -shared -Bsymbolic -Wl,-Bsymbolic \ - -o $@ $(CFLAGS) -I. -isystem include libdl/_dl_main.c -Wl,-soname=libdl.so + $(LD_UNSET) $(CROSS)$(CC) -D__OD_CLEAN_ROOM -DNODIETREF -fPIC -nostdlib -shared -Bsymbolic -Wl,-Bsymbolic \ + -o $@ $(SAFE_CFLAGS) -I. -isystem include libdl/_dl_main.c -Wl,-soname=libdl.so #$(PICODIR)/libdl.so: $(DYN_LIBDL_OBJS) dietfeatures.h # $(CROSS)$(CC) -nostdlib -shared -o $@ $(CFLAGS) -fPIC $(DYN_LIBDL_OBJS) -L$(PICODIR) -ldietc -Wl,-soname=libdl.so $(PICODIR)/libcompat.so: $(DYN_LIBCOMPAT_OBJS) dietfeatures.h - LD_RUN_PATH= $(CROSS)$(CC) -nostdlib -shared -o $@ $(CFLAGS) -fPIC $(DYN_LIBCOMPAT_OBJS) -L$(PICODIR) -lc -Wl,-soname=libcompat.so + $(LD_UNSET) $(CROSS)$(CC) -nostdlib -shared -o $@ $(CFLAGS) -fPIC $(DYN_LIBCOMPAT_OBJS) -L$(PICODIR) -lc -Wl,-soname=libcompat.so $(PICODIR)/libm.so: $(DYN_LIBMATH_OBJS) dietfeatures.h - LD_RUN_PATH= $(CROSS)$(CC) -nostdlib -shared -o $@ $(CFLAGS) -fPIC $(DYN_LIBMATH_OBJS) -L$(PICODIR) -lc -Wl,-soname=libm.so + $(LD_UNSET) $(CROSS)$(CC) -nostdlib -shared -o $@ $(CFLAGS) -fPIC $(DYN_LIBMATH_OBJS) -L$(PICODIR) -lc -Wl,-soname=libm.so $(SYSCALLOBJ): syscalls.h @@ -270,6 +284,9 @@ $(OBJDIR)/elftrunc: $(OBJDIR)/diet contrib/elftrunc.c bin-$(MYARCH)/diet $(CROSS)$(CC) $(CFLAGS) -o $@ contrib/elftrunc.c +$(OBJDIR)/dnsd: $(OBJDIR)/diet contrib/dnsd.c + bin-$(MYARCH)/diet $(CROSS)$(CC) $(CFLAGS) -o $@ contrib/dnsd.c + VERSION=dietlibc-$(shell head -n 1 CHANGES|sed 's/://') CURNAME=$(notdir $(shell pwd)) @@ -282,11 +299,11 @@ $(CROSS)strip -R .comment -R .note $@ $(PICODIR)/diet-dyn: $(PICODIR)/start.o $(PICODIR)/dyn_start.o diet.c - LD_RUN_PATH= $(CROSS)$(CC) -isystem include $(CFLAGS) -fPIC -nostdlib -o $@ $^ -DDIETHOME=\"$(HOME)\" -D__DYN_LIB -DVERSION=\"$(VERSION)\" -L$(PICODIR) -lc -lgcc $(PICODIR)/dyn_stop.o -Wl,-dynamic-linker=$(HOME)/$(PICODIR)/libdl.so + $(LD_UNSET) $(CROSS)$(CC) -isystem include $(CFLAGS) -fPIC -nostdlib -o $@ $^ -DDIETHOME=\"$(HOME)\" -D__DYN_LIB -DVERSION=\"$(VERSION)\" -L$(PICODIR) -lc -lgcc $(PICODIR)/dyn_stop.o -Wl,-dynamic-linker=$(HOME)/$(PICODIR)/libdl.so $(CROSS)strip -R .command -R .note $@ $(PICODIR)/diet-dyn-i: $(PICODIR)/start.o $(PICODIR)/dyn_start.o diet.c - LD_RUN_PATH= $(CROSS)$(CC) -isystem include $(CFLAGS) -fPIC -nostdlib -o $@ $^ -DDIETHOME=\"$(prefix)\" -D__DYN_LIB -DVERSION=\"$(VERSION)\" -L$(PICODIR) -lc -lgcc $(PICODIR)/dyn_stop.o -Wl,-dynamic-linker=$(ILIBDIR)/libdl.so -DINSTALLVERSION + $(LD_UNSET) $(CROSS)$(CC) -isystem include $(CFLAGS) -fPIC -nostdlib -o $@ $^ -DDIETHOME=\"$(prefix)\" -D__DYN_LIB -DVERSION=\"$(VERSION)\" -L$(PICODIR) -lc -lgcc $(PICODIR)/dyn_stop.o -Wl,-dynamic-linker=$(ILIBDIR)/libdl.so -DINSTALLVERSION $(CROSS)strip -R .command -R .note $@ $(OBJDIR)/djb: $(OBJDIR)/compile $(OBJDIR)/load @@ -307,7 +324,7 @@ $(MAKE) -C libdl clean tar: clean rename - cd ..; tar cvvf $(VERSION).tar.bz2 $(VERSION) --use=bzip2 --exclude CVS + cd ..; tar cvvf $(VERSION).tar.bz2 --use=bzip2 --exclude CVS $(VERSION) rename: if test $(CURNAME) != $(VERSION); then cd .. && mv $(CURNAME) $(VERSION); fi @@ -332,6 +349,7 @@ $(INSTALL) $(OBJDIR)/diet-i $(DESTDIR)$(BINDIR)/diet -$(INSTALL) $(PICODIR)/diet-dyn-i $(DESTDIR)$(BINDIR)/diet-dyn endif + $(INSTALL) -m 755 $(OBJDIR)/elftrunc $(OBJDIR)/dnsd $(DESTDIR)$(BINDIR) -$(INSTALL) $(OBJDIR)/pstart.o $(OBJDIR)/libgmon.a $(OBJDIR)/dyn_start.o $(OBJDIR)/dyn_stop.o $(DESTDIR)$(ILIBDIR) -$(INSTALL) $(PICODIR)/libc.so $(DESTDIR)$(ILIBDIR)/libc.so -$(INSTALL) $(PICODIR)/libpthread.so $(DESTDIR)$(ILIBDIR)/libpthread.so @@ -354,11 +372,18 @@ -rmdir $(DESTDIR)$(ILIBDIR) $(DESTDIR)$(MAN1DIR) $(DESTDIR)$(BINDIR) .PHONY: sparc ppc mips arm alpha i386 parisc mipsel powerpc s390 sparc64 -.PHONY: x86_64 ia64 +.PHONY: x86_64 ia64 ppc64 s390x -arm sparc ppc alpha i386 mips parisc s390 sparc64 x86_64 ia64: +arm sparc ppc alpha mips parisc s390 sparc64 x86_64 ia64 ppc64 s390x: $(MAKE) ARCH=$@ CROSS=$@-linux- all +i386: +ifeq ($(MYARCH),x86_64) + $(MAKE) ARCH=$@ CC="$(CC) -m32" all +else + $(MAKE) ARCH=$@ CROSS=$@-linux- all +endif + # Cross compile for little endian MIPS mipsel: $(MAKE) ARCH=$@ CROSS=mips-linux- all @@ -452,6 +477,9 @@ # these depend on dietfeatures.h for WANT_INET_ADDR_DNS $(OBJDIR)/gethostbyname_r.o: dietfeatures.h +# WANT_PLUGPLAY_DNS +$(OBJDIR)/getaddrinfo.o: dietfeatures.h + $(OBJDIR)/strsignal.o: include/signal.h $(LIBPTHREAD_OBJS): include/pthread.h diff -uNr dietlibc-0.28/alpha/CVS/Entries dietlibc-0.29/alpha/CVS/Entries --- dietlibc-0.28/alpha/CVS/Entries 2005-01-31 09:53:07.000000000 -0800 +++ dietlibc-0.29/alpha/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,61 +0,0 @@ -/Makefile.add/1.14/Mon Nov 18 01:29:35 2002// -/__alarm.c/1.1/Thu Oct 24 10:18:41 2002// -/__longjmp.S/1.4/Mon Sep 16 11:17:01 2002// -/__pause.c/1.1/Fri Feb 27 22:19:51 2004// -/__testandset.S/1.4/Wed Feb 19 20:16:01 2003// -/__time.c/1.3/Mon Apr 9 15:39:23 2001// -/accept.S/1.2/Tue Jan 30 14:46:52 2001// -/bind.S/1.1/Tue Jan 9 17:57:38 2001// -/clone.S/1.2/Sat Jun 16 20:51:43 2001// -/connect.S/1.2/Tue Jan 30 14:46:52 2001// -/divl.S/1.1/Thu Mar 8 14:58:41 2001// -/divq.S/1.1/Tue Jan 9 17:57:38 2001// -/errlist.S/1.1/Mon Jan 13 15:16:28 2003// -/getegid.S/1.1/Tue Jan 9 17:57:38 2001// -/geteuid.S/1.1/Tue Jan 9 17:57:38 2001// -/getgid.S/1.1/Tue Jan 9 17:57:38 2001// -/getpeername.S/1.1/Tue Jan 9 17:57:38 2001// -/getpid.S/1.1/Tue Jan 9 17:57:38 2001// -/getppid.S/1.1/Tue Jan 9 17:57:38 2001// -/getsockname.S/1.1/Tue Jan 9 17:57:38 2001// -/getsockopt.S/1.1/Tue Jan 9 17:57:38 2001// -/getuid.S/1.1/Tue Jan 9 17:57:38 2001// -/listen.S/1.1/Tue Jan 9 17:57:38 2001// -/lseek64.S/1.1/Mon Nov 12 14:47:01 2001// -/msgctl.S/1.1/Thu May 10 11:33:07 2001// -/msgget.S/1.1/Thu May 10 11:33:07 2001// -/msgrcv.S/1.1/Thu May 10 11:33:07 2001// -/msgsnd.S/1.1/Thu May 10 11:33:07 2001// -/n_sigprocmask.S/1.1/Mon Jul 23 19:36:33 2001// -/pipe.S/1.1/Tue Jan 9 17:57:38 2001// -/recv.S/1.2/Tue Jan 30 14:46:52 2001// -/recvfrom.S/1.2/Tue Jan 30 14:46:52 2001// -/recvmsg.S/1.1/Sun May 6 00:07:29 2001// -/reml.S/1.1/Thu Mar 8 14:58:41 2001// -/remq.S/1.1/Thu Mar 8 14:58:41 2001// -/semctl.S/1.1/Sun Mar 4 19:36:45 2001// -/semget.S/1.1/Sun Mar 4 19:36:45 2001// -/semop.S/1.1/Sun Mar 4 19:36:45 2001// -/send.S/1.2/Tue Jan 30 14:46:52 2001// -/sendmsg.S/1.1/Sun May 6 00:07:29 2001// -/sendto.S/1.2/Tue Jan 30 14:46:52 2001// -/seteuid.c/1.2/Mon Mar 19 20:13:22 2001// -/setjmp.S/1.4/Mon Sep 16 11:17:01 2002// -/setsockopt.S/1.1/Tue Jan 9 17:57:38 2001// -/shmat.S/1.1/Sun Mar 4 19:36:45 2001// -/shmctl.S/1.1/Sun Mar 4 19:36:45 2001// -/shmdt.S/1.1/Sun Mar 4 19:36:45 2001// -/shmget.S/1.1/Sun Mar 4 19:36:45 2001// -/shutdown.S/1.1/Mon Mar 12 03:16:26 2001// -/sigaction.c/1.4/Mon Mar 3 12:18:24 2003// -/socket.S/1.1/Tue Jan 9 17:57:38 2001// -/socketcall.S/1.1/Tue Jan 9 17:57:38 2001// -/socketpair.S/1.1/Fri May 11 15:52:09 2001// -/start.S/1.5/Sat Sep 11 12:37:57 2004// -/strlen.c/1.1/Tue Jan 9 17:57:38 2001// -/syscalls.h/1.2/Sun Nov 24 15:23:02 2002// -/time.S/1.6/Mon Apr 9 15:39:23 2001// -/unified.S/1.5/Mon Jan 21 15:55:18 2002// -/utime.S/1.1/Tue Jan 9 17:57:38 2001// -/waitpid.S/1.2/Tue Jan 30 14:46:52 2001// -D diff -uNr dietlibc-0.28/alpha/CVS/Repository dietlibc-0.29/alpha/CVS/Repository --- dietlibc-0.28/alpha/CVS/Repository 2005-01-31 09:53:07.000000000 -0800 +++ dietlibc-0.29/alpha/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/alpha diff -uNr dietlibc-0.28/alpha/CVS/Root dietlibc-0.29/alpha/CVS/Root --- dietlibc-0.28/alpha/CVS/Root 2005-01-31 09:53:07.000000000 -0800 +++ dietlibc-0.29/alpha/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/alpha/errlist.S dietlibc-0.29/alpha/errlist.S --- dietlibc-0.28/alpha/errlist.S 2003-01-13 07:16:28.000000000 -0800 +++ dietlibc-0.29/alpha/errlist.S 2005-05-14 16:35:39.000000000 -0700 @@ -140,6 +140,11 @@ .quad .LC128 .quad .LC129 .quad .LC130 + .quad .LC131 + .quad .LC132 + .quad .LC133 + .quad .LC134 + .quad .LC135 .quad 0 .size sys_errlist,.-sys_errlist @@ -285,4 +290,9 @@ .LC128: .string "Streams pipe error" .LC129: .string "No medium found" .LC130: .string "Wrong medium type" +.LC131: .string "Operation canceled" +.LC132: .string "Required key not available" +.LC133: .string "Key has expired" +.LC134: .string "Key has been revoked" +.LC135: .string "Key was rejected by service" diff -uNr dietlibc-0.28/alpha/seteuid.c dietlibc-0.29/alpha/seteuid.c --- dietlibc-0.28/alpha/seteuid.c 2001-03-19 12:13:22.000000000 -0800 +++ dietlibc-0.29/alpha/seteuid.c 2005-03-15 00:51:22.000000000 -0800 @@ -2,6 +2,7 @@ #include #undef seteuid +int seteuid(uid_t euid); int seteuid(uid_t euid) { return setreuid(-1,euid); } diff -uNr dietlibc-0.28/alpha/start.S dietlibc-0.29/alpha/start.S --- dietlibc-0.28/alpha/start.S 2004-09-11 05:37:57.000000000 -0700 +++ dietlibc-0.29/alpha/start.S 2005-05-13 11:39:32.000000000 -0700 @@ -1,3 +1,5 @@ +#include "dietfeatures.h" + .text .align 2 .set noreorder @@ -25,7 +27,7 @@ #ifdef WANT_DYNAMIC /* in v0 ($0) is the ld.so _fini pointer */ mov $0, $19 /* mov v0(dynload) to a3 */ - jsr $26, dyn_start + jsr $26, _dyn_start #else #ifdef WANT_STACKGAP jsr $26, stackgap diff -uNr dietlibc-0.28/alpha/syscalls.h dietlibc-0.29/alpha/syscalls.h --- dietlibc-0.28/alpha/syscalls.h 2002-11-24 07:23:02.000000000 -0800 +++ dietlibc-0.29/alpha/syscalls.h 2005-03-23 11:05:25.000000000 -0800 @@ -315,7 +315,7 @@ #define __NR_getdents64 377 #define __NR_gettid 378 #define __NR_readahead 379 -#define __NR_security 380 /* syscall for security modules */ +/* 380 is unused */ #define __NR_tkill 381 #define __NR_setxattr 382 #define __NR_lsetxattr 383 @@ -338,8 +338,6 @@ #define __NR_io_getevents 400 #define __NR_io_submit 401 #define __NR_io_cancel 402 -#define __NR_alloc_hugepages 403 -#define __NR_free_hugepages 404 #define __NR_exit_group 405 #define __NR_lookup_dcookie 406 #define __NR_sys_epoll_create 407 @@ -347,6 +345,33 @@ #define __NR_sys_epoll_wait 409 #define __NR_remap_file_pages 410 #define __NR_set_tid_address 411 +#define __NR_restart_syscall 412 +#define __NR_fadvise64 413 +#define __NR_timer_create 414 +#define __NR_timer_settime 415 +#define __NR_timer_gettime 416 +#define __NR_timer_getoverrun 417 +#define __NR_timer_delete 418 +#define __NR_clock_settime 419 +#define __NR_clock_gettime 420 +#define __NR_clock_getres 421 +#define __NR_clock_nanosleep 422 +#define __NR_semtimedop 423 +#define __NR_tgkill 424 +#define __NR_stat64 425 +#define __NR_lstat64 426 +#define __NR_fstat64 427 +#define __NR_vserver 428 +#define __NR_mbind 429 +#define __NR_get_mempolicy 430 +#define __NR_set_mempolicy 431 +#define __NR_mq_open 432 +#define __NR_mq_unlink 433 +#define __NR_mq_timedsend 434 +#define __NR_mq_timedreceive 435 +#define __NR_mq_notify 436 +#define __NR_mq_getsetattr 437 +#define __NR_waitid 438 #define syscall_weak(name,wsym,sym) \ .text ; \ diff -uNr dietlibc-0.28/arm/CVS/Entries dietlibc-0.29/arm/CVS/Entries --- dietlibc-0.28/arm/CVS/Entries 2005-01-31 09:53:07.000000000 -0800 +++ dietlibc-0.29/arm/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,17 +0,0 @@ -/Makefile.add/1.7/Thu May 9 01:05:10 2002// -/__longjmp.S/1.3/Mon Jul 2 16:06:48 2001// -/__testandset.S/1.1/Fri Mar 9 19:30:52 2001// -/clone.S/1.6/Thu Feb 28 16:27:02 2002// -/dyn_syscalls.S/1.26/Mon Dec 13 10:21:31 2004// -/mcount.S/1.1/Thu May 9 03:50:17 2002// -/md5asm.S/1.5/Fri Mar 8 10:56:15 2002// -/mmap.S/1.6/Mon Feb 18 19:57:39 2002// -/select.S/1.1/Mon Oct 15 21:07:45 2001// -/setjmp.S/1.3/Mon Jul 2 16:06:48 2001// -/start.S/1.9/Sat Sep 11 12:37:57 2004// -/strcpy.S/1.1/Mon Mar 4 12:16:52 2002// -/strlen.S/1.3/Mon Sep 23 16:20:09 2002// -/syscalls.h/1.9/Thu Nov 6 13:00:51 2003// -/unified.S/1.14/Thu Feb 28 16:13:20 2002// -/waitpid.S/1.2/Tue Nov 30 16:26:20 2004// -D diff -uNr dietlibc-0.28/arm/CVS/Repository dietlibc-0.29/arm/CVS/Repository --- dietlibc-0.28/arm/CVS/Repository 2005-01-31 09:53:07.000000000 -0800 +++ dietlibc-0.29/arm/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/arm diff -uNr dietlibc-0.28/arm/CVS/Root dietlibc-0.29/arm/CVS/Root --- dietlibc-0.28/arm/CVS/Root 2005-01-31 09:53:07.000000000 -0800 +++ dietlibc-0.29/arm/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/arm/syscalls.h dietlibc-0.29/arm/syscalls.h --- dietlibc-0.28/arm/syscalls.h 2003-11-06 05:00:51.000000000 -0800 +++ dietlibc-0.29/arm/syscalls.h 2005-03-23 11:05:25.000000000 -0800 @@ -6,7 +6,7 @@ #define __NR_write (__NR_SYSCALL_BASE+ 4) #define __NR_open (__NR_SYSCALL_BASE+ 5) #define __NR_close (__NR_SYSCALL_BASE+ 6) -#define __NR_waitpid (__NR_SYSCALL_BASE+ 7) + /* 7 was sys_waitpid */ #define __NR_creat (__NR_SYSCALL_BASE+ 8) #define __NR_link (__NR_SYSCALL_BASE+ 9) #define __NR_unlink (__NR_SYSCALL_BASE+ 10) @@ -16,8 +16,8 @@ #define __NR_mknod (__NR_SYSCALL_BASE+ 14) #define __NR_chmod (__NR_SYSCALL_BASE+ 15) #define __NR_lchown (__NR_SYSCALL_BASE+ 16) -#define __NR_break (__NR_SYSCALL_BASE+ 17) - + /* 17 was sys_break */ + /* 18 was sys_stat */ #define __NR_lseek (__NR_SYSCALL_BASE+ 19) #define __NR_getpid (__NR_SYSCALL_BASE+ 20) #define __NR_mount (__NR_SYSCALL_BASE+ 21) @@ -27,14 +27,14 @@ #define __NR_stime (__NR_SYSCALL_BASE+ 25) #define __NR_ptrace (__NR_SYSCALL_BASE+ 26) #define __NR_alarm (__NR_SYSCALL_BASE+ 27) - + /* 28 was sys_fstat */ #define __NR_pause (__NR_SYSCALL_BASE+ 29) #define __NR_utime (__NR_SYSCALL_BASE+ 30) -#define __NR_stty (__NR_SYSCALL_BASE+ 31) -#define __NR_gtty (__NR_SYSCALL_BASE+ 32) + /* 31 was sys_stty */ + /* 32 was sys_gtty */ #define __NR_access (__NR_SYSCALL_BASE+ 33) #define __NR_nice (__NR_SYSCALL_BASE+ 34) -#define __NR_ftime (__NR_SYSCALL_BASE+ 35) + /* 35 was sys_ftime */ #define __NR_sync (__NR_SYSCALL_BASE+ 36) #define __NR_kill (__NR_SYSCALL_BASE+ 37) #define __NR_rename (__NR_SYSCALL_BASE+ 38) @@ -43,22 +43,22 @@ #define __NR_dup (__NR_SYSCALL_BASE+ 41) #define __NR_pipe (__NR_SYSCALL_BASE+ 42) #define __NR_times (__NR_SYSCALL_BASE+ 43) -#define __NR_prof (__NR_SYSCALL_BASE+ 44) + /* 44 was sys_prof */ #define __NR_brk (__NR_SYSCALL_BASE+ 45) #define __NR_setgid (__NR_SYSCALL_BASE+ 46) #define __NR_getgid (__NR_SYSCALL_BASE+ 47) -#define __NR_signal (__NR_SYSCALL_BASE+ 48) + /* 48 was sys_signal */ #define __NR_geteuid (__NR_SYSCALL_BASE+ 49) #define __NR_getegid (__NR_SYSCALL_BASE+ 50) #define __NR_acct (__NR_SYSCALL_BASE+ 51) #define __NR_umount2 (__NR_SYSCALL_BASE+ 52) -#define __NR_lock (__NR_SYSCALL_BASE+ 53) + /* 53 was sys_lock */ #define __NR_ioctl (__NR_SYSCALL_BASE+ 54) #define __NR_fcntl (__NR_SYSCALL_BASE+ 55) -#define __NR_mpx (__NR_SYSCALL_BASE+ 56) + /* 56 was sys_mpx */ #define __NR_setpgid (__NR_SYSCALL_BASE+ 57) -#define __NR_ulimit (__NR_SYSCALL_BASE+ 58) - + /* 58 was sys_ulimit */ + /* 59 was sys_olduname */ #define __NR_umask (__NR_SYSCALL_BASE+ 60) #define __NR_chroot (__NR_SYSCALL_BASE+ 61) #define __NR_ustat (__NR_SYSCALL_BASE+ 62) @@ -67,8 +67,8 @@ #define __NR_getpgrp (__NR_SYSCALL_BASE+ 65) #define __NR_setsid (__NR_SYSCALL_BASE+ 66) #define __NR_sigaction (__NR_SYSCALL_BASE+ 67) -#define __NR_sgetmask (__NR_SYSCALL_BASE+ 68) -#define __NR_ssetmask (__NR_SYSCALL_BASE+ 69) + /* 68 was sys_sgetmask */ + /* 69 was sys_ssetmask */ #define __NR_setreuid (__NR_SYSCALL_BASE+ 70) #define __NR_setregid (__NR_SYSCALL_BASE+ 71) #define __NR_sigsuspend (__NR_SYSCALL_BASE+ 72) @@ -83,7 +83,7 @@ #define __NR_setgroups (__NR_SYSCALL_BASE+ 81) #define __NR_select (__NR_SYSCALL_BASE+ 82) #define __NR_symlink (__NR_SYSCALL_BASE+ 83) - + /* 84 was sys_lstat */ #define __NR_readlink (__NR_SYSCALL_BASE+ 85) #define __NR_uselib (__NR_SYSCALL_BASE+ 86) #define __NR_swapon (__NR_SYSCALL_BASE+ 87) @@ -97,10 +97,10 @@ #define __NR_fchown (__NR_SYSCALL_BASE+ 95) #define __NR_getpriority (__NR_SYSCALL_BASE+ 96) #define __NR_setpriority (__NR_SYSCALL_BASE+ 97) -#define __NR_profil (__NR_SYSCALL_BASE+ 98) + /* 98 was sys_profil */ #define __NR_statfs (__NR_SYSCALL_BASE+ 99) #define __NR_fstatfs (__NR_SYSCALL_BASE+100) -#define __NR_ioperm (__NR_SYSCALL_BASE+101) + /* 101 was sys_ioperm */ #define __NR_socketcall (__NR_SYSCALL_BASE+102) #define __NR_syslog (__NR_SYSCALL_BASE+103) #define __NR_setitimer (__NR_SYSCALL_BASE+104) @@ -108,10 +108,10 @@ #define __NR_stat (__NR_SYSCALL_BASE+106) #define __NR_lstat (__NR_SYSCALL_BASE+107) #define __NR_fstat (__NR_SYSCALL_BASE+108) - - + /* 109 was sys_uname */ + /* 110 was sys_iopl */ #define __NR_vhangup (__NR_SYSCALL_BASE+111) -#define __NR_idle (__NR_SYSCALL_BASE+112) + /* 112 was sys_idle */ #define __NR_syscall (__NR_SYSCALL_BASE+113) /* syscall to call a syscall! */ #define __NR_wait4 (__NR_SYSCALL_BASE+114) #define __NR_swapoff (__NR_SYSCALL_BASE+115) @@ -122,7 +122,7 @@ #define __NR_clone (__NR_SYSCALL_BASE+120) #define __NR_setdomainname (__NR_SYSCALL_BASE+121) #define __NR_uname (__NR_SYSCALL_BASE+122) -#define __NR_modify_ldt (__NR_SYSCALL_BASE+123) + /* 123 was sys_modify_ldt */ #define __NR_adjtimex (__NR_SYSCALL_BASE+124) #define __NR_mprotect (__NR_SYSCALL_BASE+125) #define __NR_sigprocmask (__NR_SYSCALL_BASE+126) @@ -136,7 +136,7 @@ #define __NR_bdflush (__NR_SYSCALL_BASE+134) #define __NR_sysfs (__NR_SYSCALL_BASE+135) #define __NR_personality (__NR_SYSCALL_BASE+136) -#define __NR_afs_syscall (__NR_SYSCALL_BASE+137) /* Syscall for Andrew File System */ + /* 137 was sys_afs_syscall */ #define __NR_setfsuid (__NR_SYSCALL_BASE+138) #define __NR_setfsgid (__NR_SYSCALL_BASE+139) #define __NR__llseek (__NR_SYSCALL_BASE+140) @@ -165,7 +165,7 @@ #define __NR_mremap (__NR_SYSCALL_BASE+163) #define __NR_setresuid (__NR_SYSCALL_BASE+164) #define __NR_getresuid (__NR_SYSCALL_BASE+165) -#define __NR_vm86 (__NR_SYSCALL_BASE+166) + /* 166 was sys_vm86 */ #define __NR_query_module (__NR_SYSCALL_BASE+167) #define __NR_poll (__NR_SYSCALL_BASE+168) #define __NR_nfsservctl (__NR_SYSCALL_BASE+169) @@ -221,8 +221,8 @@ #define __NR_mincore (__NR_SYSCALL_BASE+219) #define __NR_madvise (__NR_SYSCALL_BASE+220) #define __NR_fcntl64 (__NR_SYSCALL_BASE+221) -#define __NR_security (__NR_SYSCALL_BASE+223) /* 222 for tux */ + /* 223 is unused */ #define __NR_gettid (__NR_SYSCALL_BASE+224) #define __NR_readahead (__NR_SYSCALL_BASE+225) #define __NR_setxattr (__NR_SYSCALL_BASE+226) @@ -238,7 +238,6 @@ #define __NR_lremovexattr (__NR_SYSCALL_BASE+236) #define __NR_fremovexattr (__NR_SYSCALL_BASE+237) #define __NR_tkill (__NR_SYSCALL_BASE+238) - #define __NR_sendfile64 (__NR_SYSCALL_BASE+239) #define __NR_futex (__NR_SYSCALL_BASE+240) #define __NR_sched_setaffinity (__NR_SYSCALL_BASE+241) @@ -254,9 +253,33 @@ #define __NR_epoll_ctl (__NR_SYSCALL_BASE+251) #define __NR_epoll_wait (__NR_SYSCALL_BASE+252) #define __NR_remap_file_pages (__NR_SYSCALL_BASE+253) -#define __NR_set_thread_area (__NR_SYSCALL_BASE+254) -#define __NR_get_thread_area (__NR_SYSCALL_BASE+255) + /* 254 for set_thread_area */ + /* 255 for get_thread_area */ #define __NR_set_tid_address (__NR_SYSCALL_BASE+256) +#define __NR_timer_create (__NR_SYSCALL_BASE+257) +#define __NR_timer_settime (__NR_SYSCALL_BASE+258) +#define __NR_timer_gettime (__NR_SYSCALL_BASE+259) +#define __NR_timer_getoverrun (__NR_SYSCALL_BASE+260) +#define __NR_timer_delete (__NR_SYSCALL_BASE+261) +#define __NR_clock_settime (__NR_SYSCALL_BASE+262) +#define __NR_clock_gettime (__NR_SYSCALL_BASE+263) +#define __NR_clock_getres (__NR_SYSCALL_BASE+264) +#define __NR_clock_nanosleep (__NR_SYSCALL_BASE+265) +#define __NR_statfs64 (__NR_SYSCALL_BASE+266) +#define __NR_fstatfs64 (__NR_SYSCALL_BASE+267) +#define __NR_tgkill (__NR_SYSCALL_BASE+268) +#define __NR_utimes (__NR_SYSCALL_BASE+269) +#define __NR_fadvise64 (__NR_SYSCALL_BASE+270) +#define __NR_pciconfig_iobase (__NR_SYSCALL_BASE+271) +#define __NR_pciconfig_read (__NR_SYSCALL_BASE+272) +#define __NR_pciconfig_write (__NR_SYSCALL_BASE+273) +#define __NR_mq_open (__NR_SYSCALL_BASE+274) +#define __NR_mq_unlink (__NR_SYSCALL_BASE+275) +#define __NR_mq_timedsend (__NR_SYSCALL_BASE+276) +#define __NR_mq_timedreceive (__NR_SYSCALL_BASE+277) +#define __NR_mq_notify (__NR_SYSCALL_BASE+278) +#define __NR_mq_getsetattr (__NR_SYSCALL_BASE+279) +#define __NR_waitid (__NR_SYSCALL_BASE+280) /* ok the next few values are for the optimization of the unified syscalls @@ -525,6 +548,32 @@ #define __ARGS_get_thread_area 0 #define __ARGS_set_tid_address 0 +#define __ARGS_timer_create 0 +#define __ARGS_timer_settime 0 +#define __ARGS_timer_gettime 0 +#define __ARGS_timer_getoverrun 0 +#define __ARGS_timer_delete 0 +#define __ARGS_clock_settime 0 +#define __ARGS_clock_gettime 0 +#define __ARGS_clock_getres 0 +#define __ARGS_clock_nanosleep 0 +#define __ARGS_statfs64 0 +#define __ARGS_fstatfs64 0 +#define __ARGS_tgkill 0 +#define __ARGS_utimes 0 + +#define __ARGS_fadvise64_64 0 +#define __ARGS_pciconfig_iobase 0 +#define __ARGS_pciconfig_read 1 +#define __ARGS_pciconfig_write 1 +#define __ARGS_mq_open 0 +#define __ARGS_mq_unlink 0 +#define __ARGS_mq_timedsend 0 +#define __ARGS_mq_timedreceive 1 +#define __ARGS_mq_notify 0 +#define __ARGS_mq_getsetattr 0 +#define __ARGS_waitid 0 + #ifdef __ASSEMBLER__ #define syscall_weak(name,wsym,sym) __syscall_weak $__NR_##name, wsym, sym, __ARGS_##name .macro __syscall_weak name wsym sym typ diff -uNr dietlibc-0.28/contrib/CVS/Entries dietlibc-0.29/contrib/CVS/Entries --- dietlibc-0.28/contrib/CVS/Entries 2005-01-31 09:53:07.000000000 -0800 +++ dietlibc-0.29/contrib/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,10 +0,0 @@ -/Makefile.dyn/1.1/Mon Sep 17 16:42:26 2001// -/bcd.c/1.1/Tue Aug 19 23:07:38 2003// -/debug-realloc.c/1.2/Tue Apr 23 22:04:58 2002// -/debug-realloc.txt/1.1/Tue Apr 23 22:02:27 2002// -/dietlibc.spec/1.1/Fri Mar 9 19:35:41 2001// -/dprof.c/1.1/Sun Apr 7 19:44:56 2002// -/elftrunc.c/1.9/Fri Oct 31 15:00:43 2003// -/memchr.c/1.1/Fri Mar 26 23:28:13 2004// -/static.pl/1.2/Mon Jun 18 20:53:34 2001// -D diff -uNr dietlibc-0.28/contrib/CVS/Repository dietlibc-0.29/contrib/CVS/Repository --- dietlibc-0.28/contrib/CVS/Repository 2005-01-31 09:53:07.000000000 -0800 +++ dietlibc-0.29/contrib/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/contrib diff -uNr dietlibc-0.28/contrib/CVS/Root dietlibc-0.29/contrib/CVS/Root --- dietlibc-0.28/contrib/CVS/Root 2005-01-31 09:53:07.000000000 -0800 +++ dietlibc-0.29/contrib/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/contrib/dnsd.c dietlibc-0.29/contrib/dnsd.c --- dietlibc-0.28/contrib/dnsd.c 1969-12-31 16:00:00.000000000 -0800 +++ dietlibc-0.29/contrib/dnsd.c 2005-05-13 09:30:20.000000000 -0700 @@ -0,0 +1,369 @@ +#define _BSD_SOURCE +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +char myhostname[100]; +int namelen; +struct sockaddr* peer; +socklen_t sl; +int s6,s4; +char ifname[10]; + +struct sockaddr_in mysa4; +struct sockaddr_in6 mysa6; + +static void handle(int s,char* buf,int len,int interface) { + int q; + char* obuf=buf; + char* after; + int olen=len; + if (len<8*2) return; /* too short */ + buf[len]=0; + if ((buf[2]&0xf8) != 0) return; /* not query */ + q=(((unsigned int)(buf[4])) << 8) | buf[5]; + if (q!=1) return; /* cannot handle more than 1 query */ + if (buf[6] || buf[7]) return; /* answer count must be 0 */ + if (buf[8] || buf[9]) return; /* name server count must be 0 */ + if (buf[10] || buf[11]) return; /* additional record count must be 0 */ + buf+=12; len-=12; + if (buf[0]==namelen && !strncasecmp(buf+1,myhostname,namelen)) { + unsigned int type; + int slen; + buf+=namelen+1; + if (!*buf) + ++buf; + else if (!strcmp(buf,"\x05local")) + buf+=7; + else + return; +// if (((unsigned long)buf)&1) ++buf; + if (buf[0] || buf[2]) return; /* all supported types and classes fit in 8 bit */ + if (buf[3]!=1) return; /* we only support IN queries */ + type=(unsigned char)buf[1]; + slen=buf-obuf+4; + obuf[2]|=0x80; /* it's answer; we don't support recursion */ + if (type==1 || type==255) { /* A or ANY, we can do that */ + struct ifreq ifr; + static int v4sock=-1; + ++obuf[7]; /* one answer */ + memcpy(obuf+slen,"\xc0\x0c" /* goofy compression */ + "\x00\x01" /* A */ + "\x00\x01" /* IN */ + "\x00\x00\x02\x30" /* ttl; 0x230, about 9.3 minutes */ + "\x00\x04" /* 4 bytes payload */ + ,12); + /* now put in our address */ + /* OK, so we know the interface. Time to find out our IP on that + * interface. That is done via + * ioctl(somesock,SIOCGIFADDR,struct ifreq) + * Unfortunately, we need to put the interface _name_ in that + * struct, not the index. So we must first call + * ioctl(somesock,SIOCGIFINDEX,struct ifreq) */ + if (v4sock==-1) v4sock=s4; + if (v4sock==-1) v4sock=socket(AF_INET,SOCK_DGRAM,0); + if (v4sock==-1) return; + ifr.ifr_ifindex=interface; + if (ioctl(v4sock,SIOCGIFNAME,&ifr)==-1) return; + ifr.ifr_addr.sa_family=AF_INET; + if (ioctl(v4sock,SIOCGIFADDR,&ifr)==-1) return; /* can't happen */ + memcpy(obuf+slen+12,&((struct sockaddr_in*)&ifr.ifr_addr)->sin_addr,4); + slen+=4+12; + } + if (type==28 || type==255) { /* AAAA or ANY */ + if (!IN6_IS_ADDR_UNSPECIFIED(mysa6.sin6_addr.s6_addr32)) { + memcpy(obuf+slen,"\xc0\x0c" /* goofy DNS compression */ + "\x00\x1c" /* AAAA */ + "\x00\x01" /* IN */ + "\x00\x00\x02\x30" /* ttl */ + "\x00\x10" /* 16 bytes payload */ + ,12); + memcpy(obuf+slen+12,&mysa6.sin6_addr,16); + slen+=28; + ++obuf[7]; + } + } + if (obuf[7]) + sendto(s,obuf,slen,0,peer,sl); + } +} + +struct sockaddr_in sa4; +struct sockaddr_in6 sa6; +struct pollfd pfd[2]; + +struct msghdr mh; +struct iovec iv; +char abuf[100]; +#define PKGSIZE 1500 +char buf[PKGSIZE+1]; + +static int scan_fromhex(unsigned char c) { + if (c>='0' && c<='9') + return c-'0'; + else if (c>='A' && c<='F') + return c-'A'+10; + else if (c>='a' && c<='f') + return c-'a'+10; + return -1; +} + +static void getip(int interface) { + int fd; + struct cmsghdr* x; + memset(&mysa4,0,sizeof(mysa4)); + memset(&mysa6,0,sizeof(mysa6)); + for (x=CMSG_FIRSTHDR(&mh); x; x=CMSG_NXTHDR(&mh,x)) + if (x->cmsg_level==SOL_IP && x->cmsg_type==IP_PKTINFO) + mysa4.sin_addr=((struct in_pktinfo*)(CMSG_DATA(x)))->ipi_spec_dst; + + fd=open("/proc/net/if_inet6",O_RDONLY); + if (fd!=-1) { + char buf[1024]; /* increase as necessary */ + int i,j,len; + len=read(fd,buf,sizeof buf); + if (len>0) { + int ok; + char* c=buf; + char* max=buf+len; + ok=0; + /* "fec000000000000102c09ffffe53fc52 01 40 40 00 eth0" */ + while (ccmsg_level==SOL_IP && x->cmsg_type==IP_PKTINFO) + return ((struct in_pktinfo*)(CMSG_DATA(x)))->ipi_ifindex; + return 0; +} + +static void recv4() { + int len; + int interface; + + mh.msg_name=&sa4; + mh.msg_namelen=sizeof(sa4); + if ((len=recvmsg(s4,&mh,0))==-1) { + perror("recvmsg"); + exit(3); + } + peer=(struct sockaddr*)&sa4; + sl=sizeof(sa4); + + interface=v4if(); + getip(interface); + + handle(s4,buf,len,interface); +} + +static void recv6() { + int len,interface; + + mh.msg_name=&sa6; + mh.msg_namelen=sizeof(sa6); + if ((len=recvmsg(s6,&mh,0))==-1) { + perror("recvmsg"); + exit(3); + } + peer=(struct sockaddr*)&sa6; + sl=sizeof(sa6); + + if (IN6_IS_ADDR_V4MAPPED(sa6.sin6_addr.s6_addr)) + interface=v4if(); + else + interface=sa6.sin6_scope_id; + + getip(interface); + + handle(s6,buf,len,interface); +} + +int main() { + mh.msg_name=&sa4; + mh.msg_namelen=sizeof(sa4); + mh.msg_iov=&iv; + mh.msg_iovlen=1; + iv.iov_base=buf; + iv.iov_len=PKGSIZE; + mh.msg_control=abuf; + mh.msg_controllen=sizeof(abuf); + + if (gethostname(myhostname,64)==-1) { + perror("gethostname"); + return 1; + } + namelen=strlen(myhostname); + s6=socket(PF_INET6,SOCK_DGRAM,IPPROTO_UDP); + s4=socket(PF_INET,SOCK_DGRAM,IPPROTO_UDP); + if (s4==-1 && s6==-1) { + perror("socket"); + return 2; + } + if (s6!=-1) { + memset(&sa6,0,sizeof(sa6)); + sa6.sin6_family=PF_INET6; + sa6.sin6_port=htons(5353); + if (bind(s6,(struct sockaddr*)&sa6,sizeof(struct sockaddr_in6))==-1) { + perror("bind IPv6"); + close(s6); + s6=-1; + } + } + if (s4!=-1) { + memset(&sa4,0,sizeof(sa4)); + sa4.sin_family=PF_INET; + sa4.sin_port=htons(5353); + if (bind(s4,(struct sockaddr*)&sa4,sizeof(struct sockaddr_in))==-1) { + if (errno!=EADDRINUSE || s6==-1) + perror("bind IPv4"); + close(s4); + s4=-1; + } + } + if (s4==-1 && s6==-1) return 2; + + { + int val=255; + int one=1; + if (s6!=-1) { + struct ipv6_mreq opt; + setsockopt(s6,IPPROTO_IPV6,IPV6_UNICAST_HOPS,&val,sizeof(val)); + setsockopt(s6,IPPROTO_IPV6,IPV6_MULTICAST_LOOP,&one,sizeof(one)); + memcpy(&opt.ipv6mr_multiaddr,"\xff\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfb",16); + opt.ipv6mr_interface=0; + setsockopt(s6,IPPROTO_IPV6,IPV6_ADD_MEMBERSHIP,&opt,sizeof opt); +// setsockopt(s6,IPPROTO_IPV6,IPV6_PKTINFO,&one,sizeof one); + } + { + struct ip_mreq opt; + int s=(s4==-1?s6:s4); + setsockopt(s,SOL_IP,IP_TTL,&val,sizeof(val)); + memcpy(&opt.imr_multiaddr.s_addr,"\xe0\x00\x00\xfb",4); + opt.imr_interface.s_addr=0; + setsockopt(s,IPPROTO_IP,IP_ADD_MEMBERSHIP,&opt,sizeof(opt)); + setsockopt(s,SOL_IP,IP_PKTINFO,&one,sizeof one); + } + } + + for (;;) { + /* 1500 is the MTU for UDP, I figure we won't longer packets */ + /* add 1 to be able to add \0 */ + int len; + int interface=0; + if (s4!=-1 && s6!=-1) { + if (s4!=-1) { + recv4(); +#if 0 + if ((len=recvmsg(s4,&mh,0))==-1) { + perror("recvmsg"); + return 3; + } + peer=(struct sockaddr*)&sa4; + sl=sizeof(sa4); + + for (x=CMSG_FIRSTHDR(&mh); x; x=CMSG_NXTHDR(&mh,x)) + if (x->cmsg_level==SOL_IP && x->cmsg_type==IP_PKTINFO) { + struct in_pktinfo* y=(struct in_pktinfo*)(CMSG_DATA(x)); + interface=y->ipi_ifindex; + break; + } + + handle(s4,buf,len,interface); +#endif + } else { + recv6(); +#if 0 + sl=sizeof(sa6); + if ((len=recvfrom(s6,buf,PKGSIZE,0,(struct sockaddr*)&sa6,&sl))==-1) { + perror("recvfrom"); + return 3; + } + peer=(struct sockaddr*)&sa6; + + handle(s6,buf,len,sa6.sin6_scope_id); +#endif + } + } else { + pfd[0].fd=s4; pfd[0].events=POLLIN; + pfd[1].fd=s6; pfd[1].events=POLLIN; + switch (poll(pfd,2,5*1000)) { + case -1: + if (errno==EINTR) continue; + perror("poll"); + return 1; + case 0: + continue; + } + if (pfd[0].revents & POLLIN) { + recv4(); +#if 0 + if ((len=recvmsg(s4,&mh,0))==-1) { + perror("recvmsg"); + return 3; + } + peer=(struct sockaddr*)&sa4; + sl=sizeof(sa4); + + for (x=CMSG_FIRSTHDR(&mh); x; x=CMSG_NXTHDR(&mh,x)) + if (x->cmsg_level==SOL_IP && x->cmsg_type==IP_PKTINFO) { + struct in_pktinfo* y=(struct in_pktinfo*)(CMSG_DATA(x)); + interface=y->ipi_ifindex; + break; + } + + handle(s4,buf,len,interface); +#endif + } + if (pfd[1].revents & POLLIN) { + recv6(); +#if 0 + sl=sizeof(sa6); + if ((len=recvfrom(s6,buf,sizeof(buf),0,(struct sockaddr*)&sa6,&sl))==-1) { + perror("recvfrom"); + return 3; + } + peer=(struct sockaddr*)&sa6; + handle(s6,buf,len,sa6.sin6_scope_id); +#endif + } + } + } + return 0; +} diff -uNr dietlibc-0.28/diet.c dietlibc-0.29/diet.c --- dietlibc-0.28/diet.c 2004-12-17 10:47:58.000000000 -0800 +++ dietlibc-0.29/diet.c 2005-05-18 07:38:55.000000000 -0700 @@ -26,8 +26,8 @@ static const char* Os[] = { "i386","-Os","-mpreferred-stack-boundary=2", - "-malign-functions=1","-malign-jumps=1", - "-malign-loops=1","-fomit-frame-pointer",0, + "-falign-functions=1","-falign-jumps=1", + "-falign-loops=1","-fomit-frame-pointer",0, "x86_64","-Os","-fno-omit-frame-pointer",0, "sparc","-Os","-mcpu=supersparc",0, "sparc64","-Os","-m64","-mhard-quad-float",0, @@ -81,7 +81,9 @@ char dashstatic[]="-static"; int i; int mangleopts=0; + int printpath=0; char manglebuf[1024]; + int m; if (!(diethome = getenv("DIETHOME"))) diethome=DIETHOME; @@ -108,12 +110,23 @@ if (!strcmp(argv[1],"-v")) { ++argv; --argc; verbose=1; - } else if (argv[1] && !strcmp(argv[1],"-Os")) { + } else if (!strcmp(argv[1],"-Os")) { ++argv; --argc; mangleopts=1; + } else if (!strcmp(argv[1],"-L")) { + ++argv; --argc; + printpath=1; } else break; } while (1); { + int i; + m=0; + for (i=1; i double __poly(double x, size_t n, const double* c); -double exp2(double x); -double log2(double x); diff -uNr dietlibc-0.28/dietstdio.h dietlibc-0.29/dietstdio.h --- dietlibc-0.28/dietstdio.h 2003-11-11 10:27:41.000000000 -0800 +++ dietlibc-0.29/dietstdio.h 2005-04-10 06:59:32.000000000 -0700 @@ -59,14 +59,14 @@ int (*putch)(int,void*); }; -int __v_scanf(struct arg_scanf* fn, const unsigned char *format, va_list arg_ptr); +int __v_scanf(struct arg_scanf* fn, const char *format, va_list arg_ptr); struct arg_printf { void *data; int (*put)(void*,size_t,void*); }; -int __v_printf(struct arg_printf* fn, const unsigned char *format, va_list arg_ptr); +int __v_printf(struct arg_printf* fn, const char *format, va_list arg_ptr); extern FILE *__stdio_root; diff -uNr dietlibc-0.28/dyn_start.c dietlibc-0.29/dyn_start.c --- dietlibc-0.28/dyn_start.c 2004-11-30 14:35:14.000000000 -0800 +++ dietlibc-0.29/dyn_start.c 2005-05-20 07:46:31.000000000 -0700 @@ -1,16 +1,32 @@ #include "dietfeatures.h" #ifdef WANT_DYNAMIC +#include #include +struct object { + void *detail[7]; /* see gcc sources unwind-dw2-fde.h */ +}; + +extern void __register_frame_info (const void *, struct object *) __attribute__((weak)); +extern void __deregister_frame_info (const void *) __attribute__((weak)); + + typedef void(*structor)(void); __attribute__((section(".ctors"))) +__attribute_used static structor __CTOR_LIST__[1]={((structor)-1)}; __attribute__((section(".dtors"))) +__attribute_used static structor __DTOR_LIST__[1]={((structor)-1)}; +__attribute__((section(".eh_frame"))) +__attribute_used +char __EH_FRAME_BEGIN__[] = { }; + + static void __do_global_dtors_aux(void) { structor *df=__CTOR_LIST__; /* ugly trick to prevent warning */ @@ -21,6 +37,8 @@ __attribute__((section(".fini"))) void _fini(void) { __do_global_dtors_aux(); + if (__deregister_frame_info) + __deregister_frame_info(__EH_FRAME_BEGIN__); } #ifdef WANT_STACKGAP @@ -29,15 +47,25 @@ #ifndef __DYN_LIB_SHARED /* pre main, post _start */ +extern __attribute__((section(".init"))) void _init(void); + int _dyn_start(int argc, char **argv, char **envp, structor dl_init); int _dyn_start(int argc, char **argv, char **envp, structor dl_init) { - static __attribute__((section(".init"))) void _init(void); int main(int argc, char **argv, char **envp); + void _dl_aux_init_from_envp(char **envp); + _dl_aux_init_from_envp(envp); + if (dl_init) atexit(dl_init); _init(); atexit(_fini); + + if (__register_frame_info) { + static struct object ob; + __register_frame_info(__EH_FRAME_BEGIN__, &ob); + } + #ifdef WANT_STACKGAP return stackgap(argc, argv, envp); #else diff -uNr dietlibc-0.28/dyn_stop.c dietlibc-0.29/dyn_stop.c --- dietlibc-0.28/dyn_stop.c 2003-08-23 09:12:47.000000000 -0700 +++ dietlibc-0.29/dyn_stop.c 2005-05-20 07:46:31.000000000 -0700 @@ -1,14 +1,27 @@ #include "dietfeatures.h" #ifdef WANT_DYNAMIC +#include +#include + typedef void(*structor)(void); __attribute__((section(".ctors"))) +__attribute_used static structor __CTOR_END__[1]={((structor)0)}; __attribute__((section(".dtors"))) +__attribute_used static structor __DTOR_END__[1]={((structor)0)}; +__attribute__((section(".eh_frame"))) +__attribute_used +#if __WORDSIZE == 32 +char __FRAME_END__[4] = { 0, 0, 0, 0 }; +#else +char __FRAME_END__[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; +#endif + static void __do_global_ctors_aux(void) { structor *cf=__DTOR_END__; /* ugly trick to prevent warning */ diff -uNr dietlibc-0.28/dynlinker/CVS/Entries dietlibc-0.29/dynlinker/CVS/Entries --- dietlibc-0.28/dynlinker/CVS/Entries 2005-01-31 09:53:07.000000000 -0800 +++ dietlibc-0.29/dynlinker/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,5 +0,0 @@ -/Makefile/1.7/Thu Apr 18 14:51:51 2002// -/README/1.6/Fri Sep 13 14:37:21 2002// -/ldso_start.S/1.2/Mon Jul 9 19:49:52 2001// -/ldso_test.c/1.13/Mon Sep 16 17:50:29 2002// -D diff -uNr dietlibc-0.28/dynlinker/CVS/Repository dietlibc-0.29/dynlinker/CVS/Repository --- dietlibc-0.28/dynlinker/CVS/Repository 2005-01-31 09:53:07.000000000 -0800 +++ dietlibc-0.29/dynlinker/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/dynlinker diff -uNr dietlibc-0.28/dynlinker/CVS/Root dietlibc-0.29/dynlinker/CVS/Root --- dietlibc-0.28/dynlinker/CVS/Root 2005-01-31 09:53:07.000000000 -0800 +++ dietlibc-0.29/dynlinker/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/examples/CVS/Entries dietlibc-0.29/examples/CVS/Entries --- dietlibc-0.28/examples/CVS/Entries 2005-01-31 09:53:07.000000000 -0800 +++ dietlibc-0.29/examples/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,3 +0,0 @@ -/Makefile/1.2/Fri May 11 11:57:10 2001// -/sln.c/1.1/Tue Jan 9 17:57:39 2001// -D diff -uNr dietlibc-0.28/examples/CVS/Repository dietlibc-0.29/examples/CVS/Repository --- dietlibc-0.28/examples/CVS/Repository 2005-01-31 09:53:07.000000000 -0800 +++ dietlibc-0.29/examples/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/examples diff -uNr dietlibc-0.28/examples/CVS/Root dietlibc-0.29/examples/CVS/Root --- dietlibc-0.28/examples/CVS/Root 2005-01-31 09:53:07.000000000 -0800 +++ dietlibc-0.29/examples/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/findcflags.sh dietlibc-0.29/findcflags.sh --- dietlibc-0.28/findcflags.sh 2003-05-21 04:40:02.000000000 -0700 +++ dietlibc-0.29/findcflags.sh 2005-04-23 04:47:18.000000000 -0700 @@ -3,6 +3,6 @@ case $version in 2.9*) echo -march=i386 -Os -fomit-frame-pointer -malign-functions=1 -malign-jumps=1 -malign-loops=1 -mpreferred-stack-boundary=2 ;; 3.0*) echo -march=i386 -Os -fomit-frame-pointer -malign-functions=1 -malign-jumps=1 -malign-loops=1 -mpreferred-stack-boundary=2 ;; - 3*) echo -Os -fomit-frame-pointer -falign-functions=1 -falign-jumps=1 -falign-loops=1 -mpreferred-stack-boundary=2;; + [34]*) echo -Os -fomit-frame-pointer -falign-functions=1 -falign-jumps=1 -falign-loops=1 -mpreferred-stack-boundary=2;; *) echo -O2 -pipe -fomit-frame-pointer ;; esac diff -uNr dietlibc-0.28/i386/CVS/Entries dietlibc-0.29/i386/CVS/Entries --- dietlibc-0.28/i386/CVS/Entries 2005-01-31 09:53:08.000000000 -0800 +++ dietlibc-0.29/i386/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,105 +0,0 @@ -/Makefile.add/1.29/Fri Dec 17 19:22:11 2004// -/PIC.h/1.4/Fri Jan 21 17:47:36 2005// -/__half.S/1.1/Fri Jul 27 14:39:18 2001// -/__longjmp.S/1.3/Mon Jul 2 16:06:48 2001// -/__restore_rt.S/1.1/Mon Dec 6 21:26:24 2004// -/__ten.S/1.2/Fri Jul 27 14:45:58 2001// -/__testandset.S/1.2/Mon Oct 29 15:09:33 2001// -/accept.S/1.1/Tue Aug 27 13:55:31 2002// -/acos.S/1.2/Fri Oct 4 20:39:42 2002// -/acosh.S/1.1/Tue Jul 31 22:13:35 2001// -/asin.S/1.2/Fri Oct 4 20:39:42 2002// -/asinh.S/1.1/Tue Jul 31 22:13:35 2001// -/atan.S/1.2/Fri Oct 4 20:39:42 2002// -/atan2.S/1.2/Sun Mar 30 19:19:52 2003// -/atanh.S/1.1/Tue Jul 31 22:13:35 2001// -/atol.S/1.6/Mon Jun 23 14:39:13 2003// -/atoll.S/1.1/Thu Jul 26 15:20:36 2001// -/bind.S/1.1/Tue Aug 27 13:55:31 2002// -/cbrt.S/1.1/Mon Aug 6 13:10:58 2001// -/ceil.S/1.5/Fri Dec 17 19:22:11 2004// -/clone.S/1.9/Thu Aug 8 16:59:07 2002// -/connect.S/1.1/Tue Aug 27 13:55:31 2002// -/copysign.S/1.3/Fri Jun 20 22:33:07 2003// -/cos.S/1.6/Thu Jan 2 14:04:42 2003// -/cosh.S/1.3/Fri Dec 17 19:22:11 2004// -/dyn_syscalls.S/1.36/Fri Jan 28 16:04:54 2005// -/exp.S/1.5/Fri Dec 17 19:22:11 2004// -/exp10.S/1.2/Mon Jul 30 13:52:55 2001// -/exp2.S/1.1/Wed Jul 18 00:20:09 2001// -/expm1.S/1.2/Thu Jul 19 16:07:10 2001// -/fabs.S/1.2/Sun Mar 30 19:19:53 2003// -/ffs.S/1.1/Wed Aug 20 00:44:40 2003// -/ffsl.S/1.1/Wed Aug 20 00:44:40 2003// -/ffsll.S/1.1/Wed Aug 20 00:44:40 2003// -/floor.S/1.5/Fri Dec 17 19:22:11 2004// -/fmod.S/1.3/Mon Sep 22 17:48:56 2003// -/getenv.S/1.4/Fri Sep 13 22:33:01 2002// -/getpeername.S/1.1/Tue Aug 27 13:55:31 2002// -/getsockname.S/1.1/Tue Aug 27 13:55:31 2002// -/getsockopt.S/1.1/Tue Aug 27 13:55:31 2002// -/htonl.S/1.1/Tue Jul 31 22:13:35 2001// -/htons.S/1.1/Tue Jul 31 22:13:35 2001// -/hypot.S/1.3/Sun Mar 30 19:19:53 2003// -/ilogb.S/1.1/Mon Jul 30 13:53:14 2001// -/ipow.S/1.1/Mon Jul 30 13:45:17 2001// -/isleap.S/1.2/Mon Jul 30 13:34:41 2001// -/ldexp.S/1.2/Sun Dec 15 19:49:56 2002// -/libm2.S/1.8/Fri Dec 17 19:22:11 2004// -/listen.S/1.1/Tue Aug 27 13:55:31 2002// -/log.S/1.3/Fri Oct 4 20:39:42 2002// -/log10.S/1.2/Sun Mar 30 19:19:53 2003// -/log1p.S/1.2/Sun Mar 30 19:19:53 2003// -/log2.S/1.1/Wed Jul 18 00:20:09 2001// -/ltostr.S/1.1/Sun Oct 27 16:23:35 2002// -/mcount.S/1.2/Fri Sep 13 22:33:01 2002// -/md5asm.S/1.6/Mon Oct 8 17:57:02 2001// -/memccpy.S/1.5/Wed Oct 15 15:32:09 2003// -/memchr.S/1.4/Tue Feb 18 20:57:26 2003// -/memcmp.S/1.3/Wed Oct 15 15:32:09 2003// -/memcpy.S/1.2/Thu Aug 23 14:11:42 2001// -/memset.S/1.1/Thu Aug 23 14:11:42 2001// -/mmap.S/1.5/Wed Nov 27 10:50:13 2002// -/mmap64.S/1.3/Wed Jan 8 16:03:03 2003// -/poly.S/1.1/Mon Jul 30 13:59:22 2001// -/pow.S/1.5/Fri Dec 17 19:22:11 2004// -/recv.S/1.1/Tue Aug 27 13:55:31 2002// -/recvfrom.S/1.1/Tue Aug 27 13:55:31 2002// -/recvmsg.S/1.1/Tue Aug 27 13:55:31 2002// -/rint.S/1.2/Fri Oct 4 20:39:42 2002// -/select.S/1.2/Tue Jan 30 14:46:53 2001// -/send.S/1.1/Tue Aug 27 13:55:31 2002// -/sendmsg.S/1.1/Tue Aug 27 13:55:31 2002// -/sendto.S/1.1/Tue Aug 27 13:55:31 2002// -/setjmp.S/1.6/Fri Nov 15 15:39:17 2002// -/setsockopt.S/1.1/Tue Aug 27 13:55:31 2002// -/shutdown.S/1.1/Tue Aug 27 13:55:31 2002// -/sigaction.c/1.1/Mon Dec 6 21:26:24 2004// -/sin.S/1.5/Thu Jan 2 14:04:42 2003// -/sincos.S/1.3/Fri Dec 17 19:22:11 2004// -/sinh.S/1.3/Fri Dec 17 19:22:11 2004// -/sleep.S/1.3/Mon Feb 25 16:00:50 2002// -/socket.S/1.1/Tue Aug 27 13:55:31 2002// -/socketcall.S/1.3/Fri Sep 13 22:33:01 2002// -/socketpair.S/1.1/Tue Aug 27 13:55:31 2002// -/sqrt.S/1.3/Fri Oct 4 20:39:42 2002// -/sqrtl.S/1.1/Mon Sep 3 13:09:29 2001// -/start.S/1.12/Sat Sep 11 12:37:57 2004// -/stpcpy.S/1.4/Mon Jun 23 14:39:13 2003// -/strcasecmp.S/1.3/Thu Apr 29 11:10:39 2004// -/strcat.S/1.3/Mon Jun 23 14:39:13 2003// -/strchr.S/1.5/Mon Oct 29 15:09:33 2001// -/strcmp.S/1.7/Mon Oct 29 15:09:33 2001// -/strcpy.S/1.2/Thu Aug 23 16:39:18 2001// -/strlen.S/1.2/Thu Feb 21 22:53:43 2002// -/strncmp.S/1.5/Wed Oct 15 15:32:09 2003// -/strncpy.S/1.6/Sat Sep 11 12:37:57 2004// -/strrchr.S/1.3/Mon Oct 13 14:39:23 2003// -/syscalls.h/1.11/Thu Apr 29 14:37:25 2004// -/tan.S/1.6/Fri Dec 17 19:22:11 2004// -/tanh.S/1.3/Fri Dec 17 19:22:11 2004// -/unified.S/1.19/Thu Jan 15 17:35:43 2004// -/usleep.S/1.4/Mon Feb 25 16:00:50 2002// -/vfork.S/1.2/Thu Apr 29 14:37:25 2004// -/write12.S/1.3/Mon Feb 25 16:00:50 2002// -D diff -uNr dietlibc-0.28/i386/CVS/Repository dietlibc-0.29/i386/CVS/Repository --- dietlibc-0.28/i386/CVS/Repository 2005-01-31 09:53:07.000000000 -0800 +++ dietlibc-0.29/i386/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/i386 diff -uNr dietlibc-0.28/i386/CVS/Root dietlibc-0.29/i386/CVS/Root --- dietlibc-0.28/i386/CVS/Root 2005-01-31 09:53:07.000000000 -0800 +++ dietlibc-0.29/i386/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/i386/syscalls.h dietlibc-0.29/i386/syscalls.h --- dietlibc-0.28/i386/syscalls.h 2004-04-29 07:37:25.000000000 -0700 +++ dietlibc-0.29/i386/syscalls.h 2005-03-23 11:05:25.000000000 -0800 @@ -272,6 +272,21 @@ #define __NR_utimes 271 #define __NR_fadvise64_64 272 #define __NR_vserver 273 +#define __NR_mbind 274 +#define __NR_get_mempolicy 275 +#define __NR_set_mempolicy 276 +#define __NR_mq_open 277 +#define __NR_mq_unlink (__NR_mq_open+1) +#define __NR_mq_timedsend (__NR_mq_open+2) +#define __NR_mq_timedreceive (__NR_mq_open+3) +#define __NR_mq_notify (__NR_mq_open+4) +#define __NR_mq_getsetattr (__NR_mq_open+5) +#define __NR_sys_kexec_load 283 +#define __NR_waitid 284 +/* #define __NR_sys_setaltroot 285 */ +#define __NR_add_key 286 +#define __NR_request_key 287 +#define __NR_keyctl 288 #define syscall_weak(name,wsym,sym) \ .text; \ diff -uNr dietlibc-0.28/ia64/CVS/Entries dietlibc-0.29/ia64/CVS/Entries --- dietlibc-0.28/ia64/CVS/Entries 2005-01-31 09:53:08.000000000 -0800 +++ dietlibc-0.29/ia64/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,45 +0,0 @@ -/Makefile.add/1.5/Wed Nov 27 13:13:37 2002// -/README/1.1/Mon May 13 15:55:50 2002// -/__alarm.c/1.1/Wed Nov 27 13:13:53 2002// -/__longjmp.S/1.1/Mon May 13 15:55:50 2002// -/__testandset.S/1.1/Mon May 13 15:55:50 2002// -/__time.c/1.1/Sat Nov 9 17:51:18 2002// -/__waitpid.c/1.1/Sat Nov 9 18:10:23 2002// -/accept.S/1.1/Wed Jul 3 20:33:37 2002// -/bind.S/1.1/Wed Jul 3 20:33:37 2002// -/clone.S/1.1/Mon May 13 15:55:50 2002// -/connect.S/1.1/Wed Jul 3 20:33:37 2002// -/fork.S/1.2/Fri Oct 10 13:37:34 2003// -/getpeername.S/1.1/Wed Jul 3 20:33:37 2002// -/getsockname.S/1.1/Wed Jul 3 20:33:37 2002// -/getsockopt.S/1.1/Wed Jul 3 20:33:37 2002// -/listen.S/1.1/Wed Jul 3 20:33:37 2002// -/msgctl.S/1.1/Sat Jan 4 22:21:47 2003// -/msgget.S/1.1/Sat Jan 4 22:21:47 2003// -/msgrcv.S/1.1/Sat Jan 4 22:21:47 2003// -/msgsnd.S/1.1/Sat Jan 4 22:21:47 2003// -/pipe.S/1.2/Tue Nov 4 12:20:44 2003// -/recv.S/1.1/Wed Jul 3 20:33:37 2002// -/recvfrom.S/1.1/Wed Jul 3 20:33:37 2002// -/recvmsg.S/1.1/Wed Jul 3 20:33:37 2002// -/semctl.S/1.1/Sat Jan 4 22:21:47 2003// -/semget.S/1.1/Sat Jan 4 22:21:47 2003// -/semop.S/1.1/Sat Jan 4 22:21:47 2003// -/send.S/1.1/Wed Jul 3 20:33:37 2002// -/sendmsg.S/1.1/Wed Jul 3 20:33:37 2002// -/sendto.S/1.1/Wed Jul 3 20:33:37 2002// -/setjmp.S/1.1/Mon May 13 15:55:50 2002// -/setsockopt.S/1.1/Wed Jul 3 20:33:37 2002// -/shmat.S/1.1/Sat Jan 4 22:21:47 2003// -/shmctl.S/1.1/Sat Jan 4 22:21:47 2003// -/shmdt.S/1.1/Sat Jan 4 22:21:47 2003// -/shmget.S/1.1/Sat Jan 4 22:21:47 2003// -/shutdown.S/1.1/Wed Jul 3 20:33:37 2002// -/socket.S/1.1/Wed Jul 3 20:33:37 2002// -/socketpair.S/1.1/Wed Jul 3 20:33:37 2002// -/start.S/1.6/Sat Sep 11 12:37:57 2004// -/syscalls.h/1.5/Fri Oct 10 13:37:34 2003// -/unified.S/1.2/Wed Jul 24 12:47:33 2002// -/utime.S/1.1/Sat Nov 9 17:44:47 2002// -/vfork.S/1.1/Sat Nov 9 17:44:47 2002// -D diff -uNr dietlibc-0.28/ia64/CVS/Repository dietlibc-0.29/ia64/CVS/Repository --- dietlibc-0.28/ia64/CVS/Repository 2005-01-31 09:53:08.000000000 -0800 +++ dietlibc-0.29/ia64/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/ia64 diff -uNr dietlibc-0.28/ia64/CVS/Root dietlibc-0.29/ia64/CVS/Root --- dietlibc-0.28/ia64/CVS/Root 2005-01-31 09:53:08.000000000 -0800 +++ dietlibc-0.29/ia64/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/ia64/__longjmp.S dietlibc-0.29/ia64/__longjmp.S --- dietlibc-0.28/ia64/__longjmp.S 2002-05-13 08:55:50.000000000 -0700 +++ dietlibc-0.29/ia64/__longjmp.S 2005-03-15 00:51:22.000000000 -0800 @@ -1 +1,166 @@ -/* No longjmp yet */ +/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. + Contributed by David Mosberger-Tang . + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Note that __sigsetjmp() did NOT flush the register stack. Instead, + we do it here since __longjmp() is usually much less frequently + invoked than __sigsetjmp(). The only difficulty is that __sigsetjmp() + didn't (and wouldn't be able to) save ar.rnat either. This is a problem + because if we're not careful, we could end up loading random NaT bits. + There are two cases: + + (i) ar.bsp < ia64_rse_rnat_addr(jmpbuf.ar_bsp) + ar.rnat contains the desired bits---preserve ar.rnat + across loadrs and write to ar.bspstore + + (ii) ar.bsp >= ia64_rse_rnat_addr(jmpbuf.ar_bsp) + The desired ar.rnat is stored in + ia64_rse_rnat_addr(jmpbuf.ar_bsp). Load those + bits into ar.rnat after setting ar.bspstore. */ + +#if 0 +#include +#include +#else +#define LEAF(x) .text; .align 32; .proc x; .globl x; x: +#define END(x) .endp x +#define ret br.ret.sptk.few b0 +#endif + +# define pPos p6 /* is rotate count positive? */ +# define pNeg p7 /* is rotate count negative? */ + + + /* __longjmp(__jmp_buf buf, int val) */ + +LEAF(__longjmp) + alloc r8=ar.pfs,2,1,0,0 + mov r27=ar.rsc + add r2=0x98,in0 // r2 <- &jmpbuf.orig_jmp_buf_addr + ;; + ld8 r8=[r2],-16 // r8 <- orig_jmp_buf_addr + mov r10=ar.bsp + and r11=~0x3,r27 // clear ar.rsc.mode + ;; + flushrs // flush dirty regs to backing store (must be first in insn grp) + ld8 r23=[r2],8 // r23 <- jmpbuf.ar_bsp + sub r8=r8,in0 // r8 <- &orig_jmpbuf - &jmpbuf + ;; + ld8 r25=[r2] // r25 <- jmpbuf.ar_unat + extr.u r8=r8,3,6 // r8 <- (&orig_jmpbuf - &jmpbuf)/8 & 0x3f + ;; + cmp.lt pNeg,pPos=r8,r0 + mov r2=in0 + ;; +(pPos) mov r16=r8 +(pNeg) add r16=64,r8 +(pPos) sub r17=64,r8 +(pNeg) sub r17=r0,r8 + ;; + mov ar.rsc=r11 // put RSE in enforced lazy mode + shr.u r8=r25,r16 + add r3=8,in0 // r3 <- &jmpbuf.r1 + shl r9=r25,r17 + ;; + or r25=r8,r9 + ;; + mov r26=ar.rnat + mov ar.unat=r25 // setup ar.unat (NaT bits for r1, r4-r7, and r12) + ;; + ld8.fill.nta sp=[r2],16 // r12 (sp) + ld8.fill.nta gp=[r3],16 // r1 (gp) + dep r11=-1,r23,3,6 // r11 <- ia64_rse_rnat_addr(jmpbuf.ar_bsp) + ;; + ld8.nta r16=[r2],16 // caller's unat + ld8.nta r17=[r3],16 // fpsr + ;; + ld8.fill.nta r4=[r2],16 // r4 + ld8.fill.nta r5=[r3],16 // r5 (gp) + cmp.geu p8,p0=r10,r11 // p8 <- (ar.bsp >= jmpbuf.ar_bsp) + ;; + ld8.fill.nta r6=[r2],16 // r6 + ld8.fill.nta r7=[r3],16 // r7 + ;; + mov ar.unat=r16 // restore caller's unat + mov ar.fpsr=r17 // restore fpsr + ;; + ld8.nta r16=[r2],16 // b0 + ld8.nta r17=[r3],16 // b1 + ;; +(p8) ld8 r26=[r11] // r26 <- *ia64_rse_rnat_addr(jmpbuf.ar_bsp) + mov ar.bspstore=r23 // restore ar.bspstore + ;; + ld8.nta r18=[r2],16 // b2 + ld8.nta r19=[r3],16 // b3 + ;; + ld8.nta r20=[r2],16 // b4 + ld8.nta r21=[r3],16 // b5 + ;; + ld8.nta r11=[r2],16 // ar.pfs + ld8.nta r22=[r3],56 // ar.lc + ;; + ld8.nta r24=[r2],32 // pr + mov b0=r16 + ;; + ldf.fill.nta f2=[r2],32 + ldf.fill.nta f3=[r3],32 + mov b1=r17 + ;; + ldf.fill.nta f4=[r2],32 + ldf.fill.nta f5=[r3],32 + mov b2=r18 + ;; + ldf.fill.nta f16=[r2],32 + ldf.fill.nta f17=[r3],32 + mov b3=r19 + ;; + ldf.fill.nta f18=[r2],32 + ldf.fill.nta f19=[r3],32 + mov b4=r20 + ;; + ldf.fill.nta f20=[r2],32 + ldf.fill.nta f21=[r3],32 + mov b5=r21 + ;; + ldf.fill.nta f22=[r2],32 + ldf.fill.nta f23=[r3],32 + mov ar.lc=r22 + ;; + ldf.fill.nta f24=[r2],32 + ldf.fill.nta f25=[r3],32 + cmp.eq p8,p9=0,in1 + ;; + ldf.fill.nta f26=[r2],32 + ldf.fill.nta f27=[r3],32 + mov ar.pfs=r11 + ;; + ldf.fill.nta f28=[r2],32 + ldf.fill.nta f29=[r3],32 + ;; + ldf.fill.nta f30=[r2] + ldf.fill.nta f31=[r3] +(p8) mov r8=1 + + mov ar.rnat=r26 // restore ar.rnat + ;; + mov ar.rsc=r27 // restore ar.rsc +(p9) mov r8=in1 + + invala // virt. -> phys. regnum mapping may change + mov pr=r24,-1 + ret +END(__longjmp) diff -uNr dietlibc-0.28/ia64/__waitpid.c dietlibc-0.29/ia64/__waitpid.c --- dietlibc-0.28/ia64/__waitpid.c 2002-11-09 10:10:23.000000000 -0800 +++ dietlibc-0.29/ia64/__waitpid.c 2005-05-13 11:39:32.000000000 -0700 @@ -1,5 +1,6 @@ #include +#include -pid_t waitpid(int pid, int * wait_stat, int flags) { +pid_t waitpid(pid_t pid, int * wait_stat, int flags) { return wait4(pid, wait_stat, flags, 0); } diff -uNr dietlibc-0.28/ia64/setjmp.S dietlibc-0.29/ia64/setjmp.S --- dietlibc-0.28/ia64/setjmp.S 2002-05-13 08:55:50.000000000 -0700 +++ dietlibc-0.29/ia64/setjmp.S 2005-03-15 00:51:22.000000000 -0800 @@ -1 +1,198 @@ -/* No, I am not going to save 128 registers */ +/* Copyright (C) 1999, 2000, 2001, 2002, 2004 Free Software Foundation, Inc. + Contributed by David Mosberger-Tang . + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + The layout of the jmp_buf is as follows. This is subject to change + and user-code should never depend on the particular layout of + jmp_buf! + + + offset: description: + ------- ------------ + 0x000 stack pointer (r12) ; unchangeable (see _JMPBUF_UNWINDS) + 0x008 r1 (gp) + 0x010 caller's unat + 0x018 fpsr + 0x020 r4 + 0x028 r5 + 0x030 r6 + 0x038 r7 + 0x040 rp (b0) + 0x048 b1 + 0x050 b2 + 0x058 b3 + 0x060 b4 + 0x068 b5 + 0x070 ar.pfs + 0x078 ar.lc + 0x080 pr + 0x088 ar.bsp ; unchangeable (see __longjmp.S) + 0x090 ar.unat + 0x098 &__jmp_buf ; address of the jmpbuf (needed to locate NaT bits in unat) + 0x0a0 f2 + 0x0b0 f3 + 0x0c0 f4 + 0x0d0 f5 + 0x0e0 f16 + 0x0f0 f17 + 0x100 f18 + 0x110 f19 + 0x120 f20 + 0x130 f21 + 0x130 f22 + 0x140 f23 + 0x150 f24 + 0x160 f25 + 0x170 f26 + 0x180 f27 + 0x190 f28 + 0x1a0 f29 + 0x1b0 f30 + 0x1c0 f31 */ + +#if 0 +#include +#include +#else +#define LEAF(x) .text; .align 32; .proc x; .globl x; x: +#define ENTRY(x) .text; .align 32; .proc x; .globl x; x: +#define END(x) .endp x +#define ret br.ret.sptk.few b0 +#define libc_hidden_def(x) +#define strong_alias(x,y) +#define weak_extern(x) .weak x +#define _GI___sigsetjmp __sigsetjmp +#endif + + /* The following two entry points are the traditional entry points: */ + +LEAF(setjmp) + alloc r8=ar.pfs,2,0,0,0 + mov in1=1 + br.cond.sptk.many _GI___sigsetjmp +END(setjmp) + +LEAF(_setjmp) + alloc r8=ar.pfs,2,0,0,0 + mov in1=0 + br.cond.sptk.many _GI___sigsetjmp +END(_setjmp) +libc_hidden_def (_setjmp) + + /* __sigsetjmp(__jmp_buf buf, int savemask) */ + +ENTRY(__sigsetjmp) +#if 0 + .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(2) +#else + .prologue 0x8|0x4, 32+2 +#endif + alloc loc1=ar.pfs,2,3,2,0 + .save ar.unat, loc2 + mov loc2=ar.unat + ;; + mov r17=ar.fpsr + mov r2=in0 + add r3=8,in0 + ;; +.mem.offset 8,0; st8.spill.nta [r2]=sp,16 // r12 (sp) +.mem.offset 0,0; st8.spill.nta [r3]=gp,16 // r1 (gp) + ;; + st8.nta [r2]=loc2,16 // save caller's unat + st8.nta [r3]=r17,16 // save fpsr + add r8=0xa0,in0 + ;; +.mem.offset 8,0; st8.spill.nta [r2]=r4,16 // r4 +.mem.offset 0,0; st8.spill.nta [r3]=r5,16 // r5 + add r9=0xb0,in0 + ;; + stf.spill.nta [r8]=f2,32 + stf.spill.nta [r9]=f3,32 + mov loc0=rp + .body + ;; + stf.spill.nta [r8]=f4,32 + stf.spill.nta [r9]=f5,32 + mov r17=b1 + ;; + stf.spill.nta [r8]=f16,32 + stf.spill.nta [r9]=f17,32 + mov r18=b2 + ;; + stf.spill.nta [r8]=f18,32 + stf.spill.nta [r9]=f19,32 + mov r19=b3 + ;; + stf.spill.nta [r8]=f20,32 + stf.spill.nta [r9]=f21,32 + mov r20=b4 + ;; + stf.spill.nta [r8]=f22,32 + stf.spill.nta [r9]=f23,32 + mov r21=b5 + ;; + stf.spill.nta [r8]=f24,32 + stf.spill.nta [r9]=f25,32 + mov r22=ar.lc + ;; + stf.spill.nta [r8]=f26,32 + stf.spill.nta [r9]=f27,32 + mov r24=pr + ;; + stf.spill.nta [r8]=f28,32 + stf.spill.nta [r9]=f29,32 + ;; + stf.spill.nta [r8]=f30 + stf.spill.nta [r9]=f31 + +.mem.offset 8,0; st8.spill.nta [r2]=r6,16 // r6 +.mem.offset 0,0; st8.spill.nta [r3]=r7,16 // r7 + ;; + mov r23=ar.bsp + mov r25=ar.unat + mov out0=in0 + + st8.nta [r2]=loc0,16 // b0 + st8.nta [r3]=r17,16 // b1 + mov out1=in1 + ;; + st8.nta [r2]=r18,16 // b2 + st8.nta [r3]=r19,16 // b3 + ;; + st8.nta [r2]=r20,16 // b4 + st8.nta [r3]=r21,16 // b5 + ;; + st8.nta [r2]=loc1,16 // ar.pfs + st8.nta [r3]=r22,16 // ar.lc + ;; + st8.nta [r2]=r24,16 // pr + st8.nta [r3]=r23,16 // ar.bsp + ;; + st8.nta [r2]=r25 // ar.unat + st8.nta [r3]=in0 // &__jmp_buf + br.call.dpnt.few rp=__sigjmp_save +.ret0: // force a new bundle ::q + mov.m ar.unat=loc2 // restore caller's unat + mov rp=loc0 + mov ar.pfs=loc1 + mov r8=0 + ret +END(__sigsetjmp) +strong_alias(__sigsetjmp, _GI___sigsetjmp) + +weak_extern(_setjmp) +weak_extern(setjmp) diff -uNr dietlibc-0.28/ia64/start.S dietlibc-0.29/ia64/start.S --- dietlibc-0.28/ia64/start.S 2004-09-11 05:37:57.000000000 -0700 +++ dietlibc-0.29/ia64/start.S 2005-05-13 11:39:32.000000000 -0700 @@ -11,6 +11,8 @@ Implemenation of the _start startup function */ +#include "dietfeatures.h" + .psr abi64 .psr lsb .lsb @@ -37,11 +39,17 @@ ld8 r14 = [r15] ;; st8 [r14] = out2 /* store envp in environ */ + +#ifdef WANT_DYNAMIC +/* FIXME: dl_init parameter ??? */ + br.call.sptk.few rp = _dyn_start +#else #ifdef WANT_STACKGAP br.call.sptk.few rp = stackgap #else br.call.sptk.few rp = main /* call main */ #endif +#endif ;; mov r32 = r8 /* store return code */ br exit /* branch to exit */ diff -uNr dietlibc-0.28/ia64/syscalls.h dietlibc-0.29/ia64/syscalls.h --- dietlibc-0.28/ia64/syscalls.h 2003-10-10 06:37:34.000000000 -0700 +++ dietlibc-0.29/ia64/syscalls.h 2005-03-23 11:05:25.000000000 -0800 @@ -94,15 +94,16 @@ #define __NR_shmat 1114 #define __NR_shmdt 1115 #define __NR_shmctl 1116 +/* also known as klogctl() in GNU libc: */ #define __NR_syslog 1117 #define __NR_setitimer 1118 #define __NR_getitimer 1119 -#define __NR_old_stat 1120 -#define __NR_old_lstat 1121 -#define __NR_old_fstat 1122 +/* 1120 was __NR_old_stat */ +/* 1121 was __NR_old_lstat */ +/* 1122 was __NR_old_fstat */ #define __NR_vhangup 1123 #define __NR_lchown 1124 -#define __NR_vm86 1125 +#define __NR_remap_file_pages 1125 #define __NR_wait4 1126 #define __NR_sysinfo 1127 #define __NR_clone 1128 @@ -209,9 +210,9 @@ #define __NR_futex 1230 #define __NR_sched_setaffinity 1231 #define __NR_sched_getaffinity 1232 -#define __NR_security 1233 -#define __NR_alloc_hugepages 1234 -#define __NR_free_hugepages 1235 +#define __NR_set_tid_address 1233 +#define __NR_fadvise64 1234 +#define __NR_tgkill 1235 #define __NR_exit_group 1236 #define __NR_lookup_dcookie 1237 #define __NR_io_setup 1238 @@ -224,15 +225,32 @@ #define __NR_epoll_wait 1245 #define __NR_restart_syscall 1246 #define __NR_semtimedop 1247 -#define __NR_sys_timer_create 1248 -#define __NR_sys_timer_settime 1249 -#define __NR_sys_timer_gettime 1250 -#define __NR_sys_timer_getoverrun 1251 -#define __NR_sys_timer_delete 1252 -#define __NR_sys_clock_settime 1253 -#define __NR_sys_clock_gettime 1254 -#define __NR_sys_clock_getres 1255 -#define __NR_sys_clock_nanosleep 1256 +#define __NR_timer_create 1248 +#define __NR_timer_settime 1249 +#define __NR_timer_gettime 1250 +#define __NR_timer_getoverrun 1251 +#define __NR_timer_delete 1252 +#define __NR_clock_settime 1253 +#define __NR_clock_gettime 1254 +#define __NR_clock_getres 1255 +#define __NR_clock_nanosleep 1256 +#define __NR_fstatfs64 1257 +#define __NR_statfs64 1258 +#define __NR_mbind 1259 +#define __NR_get_mempolicy 1260 +#define __NR_set_mempolicy 1261 +#define __NR_mq_open 1262 +#define __NR_mq_unlink 1263 +#define __NR_mq_timedsend 1264 +#define __NR_mq_timedreceive 1265 +#define __NR_mq_notify 1266 +#define __NR_mq_getsetattr 1267 +#define __NR_kexec_load 1268 +#define __NR_vserver 1269 +#define __NR_waitid 1270 +#define __NR_add_key 1271 +#define __NR_request_key 1272 +#define __NR_keyctl 1273 #define syscall(name, sym) \ .text; \ diff -uNr dietlibc-0.28/include/CVS/Entries dietlibc-0.29/include/CVS/Entries --- dietlibc-0.28/include/CVS/Entries 2005-01-31 09:53:08.000000000 -0800 +++ dietlibc-0.29/include/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,69 +0,0 @@ -/alloca.h/1.3/Tue Aug 19 16:58:17 2003// -/ar.h/1.1/Sun Nov 2 00:47:37 2003// -/assert.h/1.10/Tue Aug 19 16:58:17 2003// -/byteswap.h/1.1/Thu Nov 20 23:48:47 2003// -/cpio.h/1.1/Wed Jul 3 20:33:37 2002// -/ctype.h/1.8/Tue Aug 19 16:58:17 2003// -/daemon.h/1.2/Thu Feb 21 21:42:42 2002// -/dietref.h/1.6/Thu Nov 6 12:56:25 2003// -/dietrefdef.h/1.2/Sat Jan 3 02:11:30 2004// -/dirent.h/1.17/Mon Jul 5 21:50:21 2004// -/dlfcn.h/1.6/Fri Dec 17 19:14:49 2004// -/elf.h/1.11/Fri Oct 10 13:41:13 2003// -/endian.h/1.12/Fri Dec 17 18:47:58 2004// -/err.h/1.2/Tue Aug 19 16:58:17 2003// -/errno.h/1.20/Fri Nov 14 14:01:19 2003// -/fcntl.h/1.14/Sat Jan 3 02:10:02 2004// -/features.h/1.6/Wed Apr 3 21:17:02 2002// -/float.h/1.1/Tue Jul 17 23:15:34 2001// -/fnmatch.h/1.3/Tue Aug 19 16:58:17 2003// -/ftw.h/1.4/Thu Sep 23 21:25:58 2004// -/getopt.h/1.7/Sun Sep 14 23:29:03 2003// -/glob.h/1.3/Tue Aug 19 16:58:17 2003// -/grp.h/1.8/Wed Apr 14 13:13:29 2004// -/iconv.h/1.5/Mon Dec 1 17:42:12 2003// -/inttypes.h/1.10/Mon Jul 5 21:55:44 2004// -/langinfo.h/1.1/Mon Dec 15 20:43:56 2003// -/libgen.h/1.2/Tue Aug 19 16:58:17 2003// -/libintl.h/1.3/Tue Nov 4 18:26:52 2003// -/limits.h/1.11/Tue Sep 17 16:44:51 2002// -/locale.h/1.6/Tue Aug 24 10:10:48 2004// -/malloc.h/1.1/Tue Jan 9 17:57:39 2001// -/math.h/1.16/Tue Aug 3 22:28:46 2004// -/md5.h/1.4/Tue Aug 19 16:58:17 2003// -/memory.h/1.1/Fri Mar 9 19:35:41 2001// -/mntent.h/1.3/Tue May 8 22:51:05 2001// -/netdb.h/1.19/Tue Aug 19 16:58:17 2003// -/nl_types.h/1.1/Mon Dec 15 20:43:56 2003// -/paths.h/1.13/Fri Dec 19 16:25:07 2003// -/poll.h/1.1/Fri Mar 14 16:42:28 2003// -/pthread.h/1.26/Fri Nov 14 14:02:50 2003// -/pty.h/1.2/Tue Aug 19 16:58:17 2003// -/pwd.h/1.9/Tue Aug 19 16:58:17 2003// -/regex.h/1.8/Tue Aug 19 16:58:17 2003// -/resolv.h/1.7/Thu Jun 3 11:10:55 2004// -/sched.h/1.9/Tue Aug 19 16:58:17 2003// -/semaphore.h/1.1/Wed Sep 17 15:06:10 2003// -/setjmp.h/1.22/Fri Oct 10 13:37:34 2003// -/shadow.h/1.6/Tue Aug 19 16:58:17 2003// -/signal.h/1.48/Fri Dec 17 19:14:49 2004// -/stdarg-cruft.h/1.6/Fri Oct 10 13:37:34 2003// -/stdarg.h/1.11/Tue Aug 19 16:58:17 2003// -/stdbool.h/1.1/Mon Aug 25 21:32:10 2003// -/stddef.h/1.9/Tue Jan 27 17:00:17 2004// -/stdint.h/1.7/Fri Dec 17 19:14:49 2004// -/stdio.h/1.42/Mon Jul 12 12:04:43 2004// -/stdlib.h/1.40/Wed Apr 14 13:13:29 2004// -/string.h/1.50/Fri Sep 5 23:38:06 2003// -/strings.h/1.5/Tue Aug 19 16:58:17 2003// -/sysexits.h/1.1/Tue Sep 17 19:26:02 2002// -/syslog.h/1.1/Fri Mar 9 20:28:41 2001// -/tar.h/1.1/Wed Jul 3 20:33:37 2002// -/termio.h/1.1/Mon Nov 26 15:16:24 2001// -/termios.h/1.16/Tue Aug 3 22:28:46 2004// -/time.h/1.26/Fri Jun 25 10:02:09 2004// -/unistd.h/1.82/Fri Jul 2 14:47:06 2004// -/utime.h/1.2/Tue Aug 19 16:58:17 2003// -/utmp.h/1.13/Tue Aug 19 16:58:18 2003// -/write12.h/1.3/Tue Aug 19 16:58:18 2003// -D diff -uNr dietlibc-0.28/include/CVS/Entries.Log dietlibc-0.29/include/CVS/Entries.Log --- dietlibc-0.28/include/CVS/Entries.Log 2005-01-31 09:53:08.000000000 -0800 +++ dietlibc-0.29/include/CVS/Entries.Log 1969-12-31 16:00:00.000000000 -0800 @@ -1,9 +0,0 @@ -A D/arpa//// -A D/asm//// -A D/linux//// -A D/net//// -A D/netinet//// -A D/netpacket//// -A D/rpc//// -A D/scsi//// -A D/sys//// diff -uNr dietlibc-0.28/include/CVS/Repository dietlibc-0.29/include/CVS/Repository --- dietlibc-0.28/include/CVS/Repository 2005-01-31 09:53:08.000000000 -0800 +++ dietlibc-0.29/include/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/include diff -uNr dietlibc-0.28/include/CVS/Root dietlibc-0.29/include/CVS/Root --- dietlibc-0.28/include/CVS/Root 2005-01-31 09:53:08.000000000 -0800 +++ dietlibc-0.29/include/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/include/arpa/CVS/Entries dietlibc-0.29/include/arpa/CVS/Entries --- dietlibc-0.28/include/arpa/CVS/Entries 2005-01-31 09:53:08.000000000 -0800 +++ dietlibc-0.29/include/arpa/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,4 +0,0 @@ -/inet.h/1.5/Tue Aug 19 16:58:18 2003// -/nameser.h/1.4/Tue Aug 19 16:58:18 2003// -/tftp.h/1.1/Fri Jun 25 09:58:03 2004// -D diff -uNr dietlibc-0.28/include/arpa/CVS/Repository dietlibc-0.29/include/arpa/CVS/Repository --- dietlibc-0.28/include/arpa/CVS/Repository 2005-01-31 09:53:08.000000000 -0800 +++ dietlibc-0.29/include/arpa/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/include/arpa diff -uNr dietlibc-0.28/include/arpa/CVS/Root dietlibc-0.29/include/arpa/CVS/Root --- dietlibc-0.28/include/arpa/CVS/Root 2005-01-31 09:53:08.000000000 -0800 +++ dietlibc-0.29/include/arpa/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/include/asm/CVS/Entries dietlibc-0.29/include/asm/CVS/Entries --- dietlibc-0.28/include/asm/CVS/Entries 2005-01-31 09:53:08.000000000 -0800 +++ dietlibc-0.29/include/asm/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,14 +0,0 @@ -/alpha-sigcontext.h/1.1/Mon Feb 18 00:13:24 2002// -/arm-sigcontext.h/1.2/Thu May 9 01:05:10 2002// -/i386-sigcontext.h/1.2/Tue Apr 2 16:04:06 2002// -/ia64-sigcontext.h/1.2/Sat Jul 20 16:47:48 2002// -/mips-sigcontext.h/1.1/Mon Feb 18 00:13:24 2002// -/parisc-sigcontext.h/1.1/Mon Feb 18 00:13:24 2002// -/ppc-sigcontext.h/1.3/Thu Jun 10 10:40:20 2004// -/s390-sigcontext.h/1.1/Tue Aug 19 21:38:37 2003// -/sigcontext.h/1.9/Fri Oct 10 13:37:34 2003// -/sparc-sigcontext.h/1.1/Mon Feb 18 00:13:24 2002// -/statfs.h/1.1/Mon Aug 19 08:32:10 2002// -/types.h/1.9/Fri Jan 21 17:43:12 2005// -/x86_64-sigcontext.h/1.1/Tue Aug 19 21:27:49 2003// -D diff -uNr dietlibc-0.28/include/asm/CVS/Repository dietlibc-0.29/include/asm/CVS/Repository --- dietlibc-0.28/include/asm/CVS/Repository 2005-01-31 09:53:08.000000000 -0800 +++ dietlibc-0.29/include/asm/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/include/asm diff -uNr dietlibc-0.28/include/asm/CVS/Root dietlibc-0.29/include/asm/CVS/Root --- dietlibc-0.28/include/asm/CVS/Root 2005-01-31 09:53:08.000000000 -0800 +++ dietlibc-0.29/include/asm/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/include/asm/sigcontext.h dietlibc-0.29/include/asm/sigcontext.h --- dietlibc-0.28/include/asm/sigcontext.h 2003-10-10 06:37:34.000000000 -0700 +++ dietlibc-0.29/include/asm/sigcontext.h 2005-03-07 01:07:40.000000000 -0800 @@ -21,7 +21,7 @@ #include #endif -#if defined(powerpc) || defined(__powerpc64__) +#if defined(__powerpc__) || defined(__powerpc64__) #include #endif diff -uNr dietlibc-0.28/include/cstddef dietlibc-0.29/include/cstddef --- dietlibc-0.28/include/cstddef 1969-12-31 16:00:00.000000000 -0800 +++ dietlibc-0.29/include/cstddef 2005-03-23 11:58:57.000000000 -0800 @@ -0,0 +1,17 @@ +#ifndef __DIETLIBC_CSTDDEF_INCLUDED +#define __DIETLIBC_CSTDDEF_INCLUDED + +#include + +#if defined(__WINT_TYPE__) +typedef __WINT_TYPE__ wint_t; +#else +typedef unsigned int wint_t; +#endif + +namespace std { + using ::ptrdiff_t; + using ::size_t; +} + +#endif diff -uNr dietlibc-0.28/include/cstdlib dietlibc-0.29/include/cstdlib --- dietlibc-0.28/include/cstdlib 1969-12-31 16:00:00.000000000 -0800 +++ dietlibc-0.29/include/cstdlib 2005-03-23 11:58:57.000000000 -0800 @@ -0,0 +1,33 @@ +#ifndef __DIETLIBC_CSTDLIB_INCLUDED +#define __DIETLIBC_CSTDLIB_INCLUDED + +#include + +namespace std { + using ::div_t; + + using ::abort; + using ::abs; + using ::atexit; + using ::atof; + using ::atoi; + using ::atol; + using ::bsearch; + using ::calloc; + using ::div; + using ::exit; + using ::free; + using ::getenv; + using ::labs; + using ::malloc; + using ::qsort; + using ::rand; + using ::realloc; + using ::srand; + using ::strtod; + using ::strtol; + using ::strtoul; + using ::system; +} + +#endif diff -uNr dietlibc-0.28/include/cwchar dietlibc-0.29/include/cwchar --- dietlibc-0.28/include/cwchar 1969-12-31 16:00:00.000000000 -0800 +++ dietlibc-0.29/include/cwchar 2005-03-23 11:58:57.000000000 -0800 @@ -0,0 +1,44 @@ +#ifndef __DIETLIBC_CWCHAR_INCLUDED +#define __DIETLIBC_CWCHAR_INCLUDED + +#include + +#if !defined(WEOF) +# define WEOF (-1) +#endif + +extern "C" { + +// dummy type +typedef struct +{ + int __count; + union { + wint_t __wch; + char __wchb[4]; + } __value; +} mbstate_t; + +// dummy functions - not implemented +size_t wcslen(const wchar_t *); +wchar_t *wmemchr(const wchar_t *, wchar_t, size_t); +int wmemcmp(const wchar_t *, const wchar_t *, size_t); +wchar_t *wmemcpy(wchar_t *, const wchar_t *, size_t); +wchar_t *wmemmove(wchar_t *, const wchar_t *, size_t); +wchar_t *wmemset(wchar_t *, wchar_t, size_t); + +} + +namespace std { + using ::mbstate_t; + using ::wint_t; + + using ::wcslen; + using ::wmemchr; + using ::wmemcmp; + using ::wmemcpy; + using ::wmemmove; + using ::wmemset; +} + +#endif diff -uNr dietlibc-0.28/include/cwctype dietlibc-0.29/include/cwctype --- dietlibc-0.28/include/cwctype 1969-12-31 16:00:00.000000000 -0800 +++ dietlibc-0.29/include/cwctype 2005-03-23 11:58:57.000000000 -0800 @@ -0,0 +1,37 @@ +#ifndef __DIETLIBC_CWCTYPE_INCLUDED +#define __DIETLIBC_CWCTYPE_INCLUDED + +#include +#include +#include + +typedef unsigned long int wctype_t; + +#if __BYTE_ORDER == __BIG_ENDIAN +# define _ISbit(bit) (1 << (bit)) +#else +# define _ISbit(bit) ((bit) < 8 ? ((1 << (bit)) << 8) : ((1 << (bit)) >> 8)) +#endif + +enum +{ + _ISupper = _ISbit (0), /* UPPERCASE. */ + _ISlower = _ISbit (1), /* lowercase. */ + _ISalpha = _ISbit (2), /* Alphabetic. */ + _ISdigit = _ISbit (3), /* Numeric. */ + _ISxdigit = _ISbit (4), /* Hexadecimal numeric. */ + _ISspace = _ISbit (5), /* Whitespace. */ + _ISprint = _ISbit (6), /* Printing. */ + _ISgraph = _ISbit (7), /* Graphical. */ + _ISblank = _ISbit (8), /* Blank (usually SPC and TAB). */ + _IScntrl = _ISbit (9), /* Control character. */ + _ISpunct = _ISbit (10), /* Punctuation. */ + _ISalnum = _ISbit (11) /* Alphanumeric. */ +}; + +namespace std { + using ::wctype_t; + using ::wint_t; +} + +#endif diff -uNr dietlibc-0.28/include/elf.h dietlibc-0.29/include/elf.h --- dietlibc-0.28/include/elf.h 2003-10-10 06:41:13.000000000 -0700 +++ dietlibc-0.29/include/elf.h 2005-04-22 06:28:06.000000000 -0700 @@ -4,6 +4,7 @@ /* Standard ELF types. */ #include +#include __BEGIN_DECLS @@ -869,7 +870,7 @@ typedef struct { - int a_type; /* Entry type */ + int32_t a_type; /* Entry type */ union { long int a_val; /* Integer value */ @@ -2421,6 +2422,14 @@ #define R_X86_64_NUM 24 +#if defined(__alpha__) || defined(__s390__) +typedef uint64_t Elf_Symndx; +#else +typedef uint32_t Elf_Symndx; +#endif + +#define __ELF_NATIVE_CLASS __WORDSIZE + __END_DECLS #endif /* elf.h */ diff -uNr dietlibc-0.28/include/endian.h dietlibc-0.29/include/endian.h --- dietlibc-0.28/include/endian.h 2004-12-17 10:47:58.000000000 -0800 +++ dietlibc-0.29/include/endian.h 2005-03-07 01:07:40.000000000 -0800 @@ -4,37 +4,21 @@ #define __LITTLE_ENDIAN 1234 #define __BIG_ENDIAN 4321 -#if defined(__i386__) || defined(__x86_64__) || defined(__ia64__) +#if defined(__i386__) || defined(__x86_64__) || defined(__ia64__) || defined(__alpha__) #define __BYTE_ORDER __LITTLE_ENDIAN #define __FLOAT_WORD_ORDER __BYTE_ORDER #endif -#ifdef __sparc__ -#define __BYTE_ORDER __BIG_ENDIAN +#if (defined(__mips__) && !defined(__MIPSEB)) || (defined(__arm__) && !defined(__ARMEB__)) || ((defined(__powerpc__) || defined(__sparc__)) && defined(__LITTLE_ENDIAN__)) +#define __BYTE_ORDER __LITTLE_ENDIAN #define __FLOAT_WORD_ORDER __BYTE_ORDER #endif -#ifdef __hppa__ -/* I hope this is correct...? */ -#define __BYTE_ORDER __BIG_ENDIAN -#define __FLOAT_WORD_ORDER __BYTE_ORDER -#endif - -#ifdef __mips__ -#ifdef __MIPSEB__ -#define __BYTE_ORDER __BIG_ENDIAN -#define __FLOAT_WORD_ORDER __BYTE_ORDER -#endif -#endif +/* rest is big endian */ #ifndef __BYTE_ORDER -#ifdef __BIG_ENDIAN__ #define __BYTE_ORDER __BIG_ENDIAN #define __FLOAT_WORD_ORDER __BYTE_ORDER -#else -#define __BYTE_ORDER __LITTLE_ENDIAN -#define __FLOAT_WORD_ORDER __BYTE_ORDER -#endif #endif #define LITTLE_ENDIAN __LITTLE_ENDIAN @@ -47,7 +31,7 @@ # define __LONG_LONG_PAIR(HI, LO) HI, LO #endif -#if defined(__alpha__) || defined(__mips64) || defined(__sparc_v9__) || defined(__x86_64__) || defined(__ia64__) || defined(__powerpc64__) +#if defined(__alpha__) || defined(__mips64) || defined(__sparc_v9__) || defined(__x86_64__) || defined(__ia64__) || defined(__powerpc64__) || defined(__s390x__) #define __WORDSIZE 64 #endif diff -uNr dietlibc-0.28/include/err.h dietlibc-0.29/include/err.h --- dietlibc-0.28/include/err.h 2003-08-19 09:58:17.000000000 -0700 +++ dietlibc-0.29/include/err.h 2005-03-15 00:51:22.000000000 -0800 @@ -6,21 +6,21 @@ __BEGIN_DECLS -void err(int s, const char *f, ...) __attribute__((__deprecated__,noreturn,format(printf,2,3))); -void errc(int s, int e, const char *f, ...) __attribute__((__deprecated__,noreturn,format(printf,3,4))); -void errx(int s, const char *f, ...) __attribute__((__deprecated__,noreturn,format(printf,2,3))); - -void warn(const char *f, ...) __attribute__((__deprecated__,format(printf,1,2))); -void warnc(int e, const char *f, ...) __attribute__((__deprecated__,format(printf,2,3))); -void warnx(const char *f, ...) __attribute__((__deprecated__,format(printf,1,2))); - -void verr(int s, const char *f, va_list va) __attribute__((__deprecated__,noreturn,format(printf,2,0))); -void verrc(int s, int e, const char *f, va_list va) __attribute__((__deprecated__,noreturn,format(printf,3,0))); -void verrx(int s, const char *f, va_list va) __attribute__((__deprecated__,noreturn,format(printf,2,0))); - -void vwarn(const char *f, va_list va) __attribute__((__deprecated__,format(printf,1,0))); -void vwarnc(int e, const char *f, va_list va) __attribute__((__deprecated__,format(printf,2,0))); -void vwarnx(const char *f, va_list va) __attribute__((__deprecated__,format(printf,1,0))); +void err(int s, const char *f, ...) __attribute__((__deprecated__,__noreturn__,__format__(__printf__,2,3))); +void errc(int s, int e, const char *f, ...) __attribute__((__deprecated__,__noreturn__,__format__(__printf__,3,4))); +void errx(int s, const char *f, ...) __attribute__((__deprecated__,__noreturn__,__format__(__printf__,2,3))); + +void warn(const char *f, ...) __attribute__((__deprecated__,__format__(__printf__,1,2))); +void warnc(int e, const char *f, ...) __attribute__((__deprecated__,__format__(__printf__,2,3))); +void warnx(const char *f, ...) __attribute__((__deprecated__,__format__(__printf__,1,2))); + +void verr(int s, const char *f, va_list va) __attribute__((__deprecated__,__noreturn__,__format__(__printf__,2,0))); +void verrc(int s, int e, const char *f, va_list va) __attribute__((__deprecated__,__noreturn__,__format__(__printf__,3,0))); +void verrx(int s, const char *f, va_list va) __attribute__((__deprecated__,__noreturn__,__format__(__printf__,2,0))); + +void vwarn(const char *f, va_list va) __attribute__((__deprecated__,__format__(__printf__,1,0))); +void vwarnc(int e, const char *f, va_list va) __attribute__((__deprecated__,__format__(__printf__,2,0))); +void vwarnx(const char *f, va_list va) __attribute__((__deprecated__,__format__(__printf__,1,0))); __END_DECLS diff -uNr dietlibc-0.28/include/errno.h dietlibc-0.29/include/errno.h --- dietlibc-0.28/include/errno.h 2003-11-14 06:01:19.000000000 -0800 +++ dietlibc-0.29/include/errno.h 2005-05-14 16:35:39.000000000 -0700 @@ -129,6 +129,13 @@ #define ESTRPIPE 128 /* Streams pipe error */ #define ENOMEDIUM 129 /* No medium found */ #define EMEDIUMTYPE 130 /* Wrong medium type */ +#define ECANCELED 131 /* Operation Cancelled */ +#define ENOKEY 132 /* Required key not available */ +#define EKEYEXPIRED 133 /* Key has expired */ +#define EKEYREVOKED 134 /* Key has been revoked */ +#define EKEYREJECTED 135 /* Key was rejected by service */ + +#define __SYS_NERR ((EKEYREJECTED) + 1) #elif defined(__mips__) @@ -259,8 +266,14 @@ #define ECANCELED 158 /* AIO operation canceled */ #define ENOMEDIUM 159 /* No medium found */ #define EMEDIUMTYPE 160 /* Wrong medium type */ +#define ENOKEY 161 /* Required key not available */ +#define EKEYEXPIRED 162 /* Key has expired */ +#define EKEYREVOKED 163 /* Key has been revoked */ +#define EKEYREJECTED 164 /* Key was rejected by service */ #define EDQUOT 1133 /* Quota exceeded */ +#define __SYS_NERR ((EKEYREJECTED) + 1) + #elif defined(__sparc__) #define EPERM 1 /* Operation not permitted */ @@ -390,6 +403,13 @@ #define ELIBSCN 124 /* .lib section in a.out corrupted */ #define ENOMEDIUM 125 /* No medium found */ #define EMEDIUMTYPE 126 /* Wrong medium type */ +#define ECANCELED 127 /* Operation Cancelled */ +#define ENOKEY 128 /* Required key not available */ +#define EKEYEXPIRED 129 /* Key has expired */ +#define EKEYREVOKED 130 /* Key has been revoked */ +#define EKEYREJECTED 131 /* Key was rejected by service */ + +#define __SYS_NERR ((EKEYREJECTED) + 1) #elif defined(__hppa__) @@ -491,6 +511,10 @@ #define EREMOTEIO 181 /* Remote I/O error */ #define ENOMEDIUM 182 /* No medium found */ #define EMEDIUMTYPE 183 /* Wrong medium type */ +#define ENOKEY 184 /* Required key not available */ +#define EKEYEXPIRED 185 /* Key has expired */ +#define EKEYREVOKED 186 /* Key has been revoked */ +#define EKEYREJECTED 187 /* Key was rejected by service */ /* We now return you to your regularly scheduled HPUX. */ @@ -535,6 +559,7 @@ #define ENOTSUP 252 /* Function not implemented (POSIX.4 / HPUX) */ #define ECANCELLED 253 /* aio request was canceled before complete (POSIX.4 / HPUX) */ +#define __SYS_NERR ((ECANCELLED) + 1) #else @@ -665,10 +690,14 @@ #define EDQUOT 122 /* Quota exceeded */ #define ENOMEDIUM 123 /* No medium found */ #define EMEDIUMTYPE 124 /* Wrong medium type */ +#define ECANCELED 125 /* Operation Canceled */ +#define ENOKEY 126 /* Required key not available */ +#define EKEYEXPIRED 127 /* Key has expired */ +#define EKEYREVOKED 128 /* Key has been revoked */ +#define EKEYREJECTED 129 /* Key was rejected by service */ +#define __SYS_NERR ((EKEYREJECTED) + 1) #endif -#define __SYS_NERR ((EMEDIUMTYPE) + 1) - #ifndef __ASSEMBLER__ #include diff -uNr dietlibc-0.28/include/fcntl.h dietlibc-0.29/include/fcntl.h --- dietlibc-0.28/include/fcntl.h 2004-01-02 18:10:02.000000000 -0800 +++ dietlibc-0.29/include/fcntl.h 2005-03-23 11:05:25.000000000 -0800 @@ -31,6 +31,7 @@ #define O_LARGEFILE 0100000 #define O_DIRECTORY 0200000 /* must be a directory */ #define O_NOFOLLOW 0400000 /* don't follow links */ +#define O_NOATIME 01000000 #define F_DUPFD 0 /* dup */ #define F_GETFD 1 /* get close_on_exec */ @@ -109,10 +110,11 @@ #define O_NDELAY O_NONBLOCK #define O_SYNC 040000 #define FASYNC 020000 /* fcntl, for BSD compatibility */ -#define O_DIRECT 040000 /* direct disk access - should check with OSF/1 */ #define O_DIRECTORY 0100000 /* must be a directory */ #define O_NOFOLLOW 0200000 /* don't follow links */ #define O_LARGEFILE 0400000 /* will be set by the kernel on every open */ +#define O_DIRECT 02000000 /* direct disk access - should check with OSF/1 */ +#define O_NOATIME 04000000 #define F_DUPFD 0 /* dup */ #define F_GETFD 1 /* get close_on_exec */ @@ -181,6 +183,7 @@ #define O_DIRECT 0x8000 /* direct disk access hint - currently ignored */ #define O_DIRECTORY 0x10000 /* must be a directory */ #define O_NOFOLLOW 0x20000 /* don't follow links */ +#define O_NOATIME 0x40000 #define O_NDELAY O_NONBLOCK @@ -198,6 +201,12 @@ #define F_SETSIG 10 /* for sockets. */ #define F_GETSIG 11 /* for sockets. */ +#ifndef __mips64__ +#define F_GETLK64 33 /* using 'struct flock64' */ +#define F_SETLK64 34 +#define F_SETLKW64 35 +#endif + /* for F_[GET|SET]FL */ #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ @@ -255,6 +264,8 @@ #define O_DIRECTORY 0x10000 /* must be a directory */ #define O_NOFOLLOW 0x20000 /* don't follow links */ #define O_LARGEFILE 0x40000 +#define O_DIRECT 0x100000 /* direct disk access hint */ +#define O_NOATIME 0x200000 #define F_DUPFD 0 /* dup */ #define F_GETFD 1 /* get close_on_exec */ @@ -322,7 +333,7 @@ }; #endif -#elif defined(powerpc) || defined(__powerpc64__) +#elif defined(__powerpc__) || defined(__powerpc64__) /* open/fcntl - O_SYNC is only implemented on blocks devices and on files located on an ext2 file system */ @@ -343,6 +354,7 @@ #define O_NOFOLLOW 0100000 /* don't follow links */ #define O_LARGEFILE 0200000 #define O_DIRECT 0400000 /* direct disk access hint - currently ignored */ +#define O_NOATIME 01000000 #define F_DUPFD 0 /* dup */ #define F_GETFD 1 /* get close_on_exec */ @@ -426,6 +438,7 @@ #define O_NOFOLLOW 0100000 /* don't follow links */ #define O_DIRECT 0200000 /* direct disk access hint - currently ignored */ #define O_LARGEFILE 0400000 +#define O_NOATIME 01000000 #define F_DUPFD 0 /* dup */ #define F_GETFD 1 /* get close_on_exec */ @@ -501,13 +514,21 @@ #define O_CREAT 00000400 /* not fcntl */ #define O_TRUNC 00001000 /* not fcntl */ #define O_EXCL 00002000 /* not fcntl */ +#define O_LARGEFILE 00004000 #define O_ASYNC 00020000 #define O_SYNC 00100000 #define O_NONBLOCK 00200004 /* HPUX has separate NDELAY & NONBLOCK */ #define O_NDELAY O_NONBLOCK #define O_NOCTTY 00400000 /* not fcntl */ +#define O_DSYNC 01000000 /* HPUX only */ +#define O_RSYNC 02000000 /* HPUX only */ +#define O_NOATIME 04000000 #define O_DIRECTORY 00010000 +#define O_DIRECT 00040000 /* direct disk access hint - currently ignored */ +#define O_NOFOLLOW 00000200 /* don't follow links */ +#define O_INVISIBLE 04000000 /* invisible I/O, for DMAPI/XDSM */ + #define F_DUPFD 0 /* Duplicate file descriptor. */ #define F_GETFD 1 /* Get file descriptor flags. */ #define F_SETFD 2 /* Set file descriptor flags. */ @@ -521,6 +542,11 @@ #define F_SETLK64 9 /* Set record locking info (non-blocking). */ #define F_SETLKW64 10 /* Set record locking info (blocking). */ +#define F_GETOWN 11 /* for sockets. */ +#define F_SETOWN 12 /* for sockets. */ +#define F_SETSIG 13 /* for sockets. */ +#define F_GETSIG 14 /* for sockets. */ + #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ #define F_RDLCK 1 /* Read lock. */ @@ -530,6 +556,21 @@ #define F_EXLCK 4 /* or 3 */ #define F_SHLCK 8 /* or 4 */ +/* for leases */ +#define F_INPROGRESS 16 + +/* operations for bsd flock(), also used by the kernel implementation */ +#define LOCK_SH 1 /* shared lock */ +#define LOCK_EX 2 /* exclusive lock */ +#define LOCK_NB 4 /* or'd with one of the above to prevent blocking */ +#define LOCK_UN 8 /* remove lock */ + +#define LOCK_MAND 32 /* This is a mandatory flock */ +#define LOCK_READ 64 /* ... Which allows concurrent read operations */ +#define LOCK_WRITE 128 /* ... Which allows concurrent write operations */ +#define LOCK_RW 192 /* ... Which allows concurrent read & write ops */ + + struct flock { short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ @@ -556,6 +597,10 @@ #define O_ASYNC FASYNC #endif +#ifdef _GNU_SOURCE +ssize_t readahead(int fd, off64_t *offset, size_t count); +#endif + __END_DECLS #endif diff -uNr dietlibc-0.28/include/inttypes.h dietlibc-0.29/include/inttypes.h --- dietlibc-0.28/include/inttypes.h 2004-07-05 14:55:44.000000000 -0700 +++ dietlibc-0.29/include/inttypes.h 2005-03-15 00:51:22.000000000 -0800 @@ -229,17 +229,38 @@ # define SCNxPTR __PRIPTR_PREFIX "x" typedef signed char int8_t; +#if defined(__SHRT_MAX__) && (__SHRT_MAX__ + 0 != 32767) +typedef int int16_t __attribute__((__mode__(__HI__))); +#else typedef signed short int16_t; +#endif +#if defined(__INT_MAX__) && (__INT_MAX__ + 0 != 2147483647) +typedef int int32_t __attribute__((__mode__(__SI__))); +#else typedef signed int int32_t; +#endif typedef unsigned char uint8_t; +#if defined(__SHRT_MAX__) && (__SHRT_MAX__ + 0 != 32767) +typedef unsigned int uint16_t __attribute__((__mode__(__HI__))); +#else typedef unsigned short uint16_t; +#endif +#if defined(__INT_MAX__) && (__INT_MAX__ + 0 != 2147483647) +typedef unsigned int uint32_t __attribute__((__mode__(__SI__))); +#else typedef unsigned int uint32_t; +#endif typedef signed long int intptr_t; typedef unsigned long int uintptr_t; -#if !defined(__STRICT_ANSI__) || __STDC_VERSION__ + 0 >= 199900L +#if __WORDSIZE == 64 +typedef signed long int64_t; +typedef unsigned long uint64_t; +typedef signed long int intmax_t; +typedef unsigned long int uintmax_t; +#else __extension__ typedef signed long long int64_t; __extension__ typedef unsigned long long uint64_t; __extension__ typedef signed long long int intmax_t; diff -uNr dietlibc-0.28/include/limits.h dietlibc-0.29/include/limits.h --- dietlibc-0.28/include/limits.h 2002-09-17 09:44:51.000000000 -0700 +++ dietlibc-0.29/include/limits.h 2005-03-15 00:51:22.000000000 -0800 @@ -3,11 +3,28 @@ #include +#ifndef __SCHAR_MAX__ +#define __SCHAR_MAX__ 127 +#endif +#ifndef __SHRT_MAX__ +#define __SHRT_MAX__ 32767 +#endif +#ifndef __INT_MAX__ +#define __INT_MAX__ 2147483647 +#endif +#ifndef __LONG_MAX__ +#if __WORDSIZE == 64 +#define __LONG_MAX__ 9223372036854775807L +#else +#define __LONG_MAX__ 2147483647L +#endif +#endif + #define CHAR_BIT 8 -#define SCHAR_MIN (-128) -#define SCHAR_MAX 0x7f -#define UCHAR_MAX 0xff +#define SCHAR_MIN (-1 - SCHAR_MAX) +#define SCHAR_MAX (__SCHAR_MAX__) +#define UCHAR_MAX (SCHAR_MAX * 2 + 1) #ifdef __CHAR_UNSIGNED__ #undef CHAR_MIN @@ -21,22 +38,21 @@ #define CHAR_MAX SCHAR_MAX #endif -#define SHRT_MIN (-SHRT_MAX-1) -#define SHRT_MAX 0x7fff -#define USHRT_MAX 0xffff - -#define INT_MIN (-INT_MAX-1) -#define INT_MAX 0x7fffffff -#define UINT_MAX 0xffffffff - -#if __WORDSIZE == 64 -#define LONG_MAX 9223372036854775807L -#define ULONG_MAX 18446744073709551615UL +#define SHRT_MIN (-1 - SHRT_MAX) +#define SHRT_MAX (__SHRT_MAX__) +#if ((__INT_MAX__) == (__SHRT_MAX__)) +#define USHRT_MAX (SHRT_MAX * 2U + 1U) #else -#define LONG_MAX 2147483647L -#define ULONG_MAX 4294967295UL +#define USHRT_MAX (SHRT_MAX * 2 + 1) #endif -#define LONG_MIN (-LONG_MAX - 1L) + +#define INT_MIN (-1 - INT_MAX) +#define INT_MAX (__INT_MAX__) +#define UINT_MAX (INT_MAX * 2U + 1U) + +#define LONG_MIN (-1L - LONG_MAX) +#define LONG_MAX ((__LONG_MAX__) + 0L) +#define ULONG_MAX (LONG_MAX * 2UL + 1UL) #define LLONG_MAX 9223372036854775807LL #define LLONG_MIN (-LLONG_MAX - 1LL) diff -uNr dietlibc-0.28/include/link.h dietlibc-0.29/include/link.h --- dietlibc-0.28/include/link.h 1969-12-31 16:00:00.000000000 -0800 +++ dietlibc-0.29/include/link.h 2005-04-22 06:28:06.000000000 -0700 @@ -0,0 +1,31 @@ +#ifndef _LINK_H +#define _LINK_H + +#include + +__BEGIN_DECLS + +#define ElfW(type) _ElfW (Elf, __ELF_NATIVE_CLASS, type) +#define _ElfW(e,w,t) _ElfW_1 (e, w, _##t) +#define _ElfW_1(e,w,t) e##w##t + +#ifdef _GNU_SOURCE +struct dl_phdr_info + { + ElfW(Addr) dlpi_addr; + const char *dlpi_name; + const ElfW(Phdr) *dlpi_phdr; + ElfW(Half) dlpi_phnum; + + unsigned long long int dlpi_adds; + unsigned long long int dlpi_subs; + }; + +extern int dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info, + size_t size, void *data), + void *data); +#endif + +__END_DECLS + +#endif diff -uNr dietlibc-0.28/include/linux/CVS/Entries dietlibc-0.29/include/linux/CVS/Entries --- dietlibc-0.28/include/linux/CVS/Entries 2005-01-31 09:53:08.000000000 -0800 +++ dietlibc-0.29/include/linux/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,9 +0,0 @@ -/eventpoll.h/1.3/Tue Aug 19 16:58:18 2003// -/fd.h/1.1/Fri Jul 2 12:30:47 2004// -/if_ether.h/1.3/Fri Jul 2 21:22:33 2004// -/kd.h/1.2/Tue Aug 19 16:58:18 2003// -/loop.h/1.2/Tue Aug 19 16:58:18 2003// -/nfs.h/1.2/Tue Aug 19 16:58:18 2003// -/soundcard.h/1.2/Tue Aug 19 16:58:18 2003// -/types.h/1.1/Mon Jul 30 13:34:41 2001// -D diff -uNr dietlibc-0.28/include/linux/CVS/Repository dietlibc-0.29/include/linux/CVS/Repository --- dietlibc-0.28/include/linux/CVS/Repository 2005-01-31 09:53:08.000000000 -0800 +++ dietlibc-0.29/include/linux/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/include/linux diff -uNr dietlibc-0.28/include/linux/CVS/Root dietlibc-0.29/include/linux/CVS/Root --- dietlibc-0.28/include/linux/CVS/Root 2005-01-31 09:53:08.000000000 -0800 +++ dietlibc-0.29/include/linux/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/include/net/CVS/Entries dietlibc-0.29/include/net/CVS/Entries --- dietlibc-0.28/include/net/CVS/Entries 2005-01-31 09:53:08.000000000 -0800 +++ dietlibc-0.29/include/net/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,6 +0,0 @@ -/ethernet.h/1.2/Thu Dec 18 16:34:42 2003// -/if.h/1.6/Fri Dec 5 19:32:09 2003// -/if_arp.h/1.4/Tue Aug 19 16:58:18 2003// -/if_ether.h/1.2/Tue Aug 19 16:58:18 2003// -/route.h/1.4/Tue Aug 19 16:58:18 2003// -D diff -uNr dietlibc-0.28/include/net/CVS/Repository dietlibc-0.29/include/net/CVS/Repository --- dietlibc-0.28/include/net/CVS/Repository 2005-01-31 09:53:08.000000000 -0800 +++ dietlibc-0.29/include/net/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/include/net diff -uNr dietlibc-0.28/include/net/CVS/Root dietlibc-0.29/include/net/CVS/Root --- dietlibc-0.28/include/net/CVS/Root 2005-01-31 09:53:08.000000000 -0800 +++ dietlibc-0.29/include/net/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/include/net/if.h dietlibc-0.29/include/net/if.h --- dietlibc-0.28/include/net/if.h 2003-12-05 11:32:09.000000000 -0800 +++ dietlibc-0.29/include/net/if.h 2005-03-15 00:51:22.000000000 -0800 @@ -32,7 +32,7 @@ struct ifmap { unsigned long mem_start; unsigned long mem_end; - unsigned short base_addr; + uint16_t base_addr; unsigned char irq; unsigned char dma; unsigned char port; @@ -53,9 +53,9 @@ struct sockaddr ifru_broadaddr; struct sockaddr ifru_netmask; struct sockaddr ifru_hwaddr; - short ifru_flags; - int ifru_ivalue; - int ifru_mtu; + int16_t ifru_flags; + int32_t ifru_ivalue; + int32_t ifru_mtu; struct ifmap ifru_map; char ifru_slave[IF_NAMESIZE]; /* Just fits the size */ char ifru_newname[IF_NAMESIZE]; @@ -81,7 +81,7 @@ #define ifr_newname ifr_ifru.ifru_newname /* New name */ struct ifconf { - int ifc_len; /* size of buffer */ + int32_t ifc_len; /* size of buffer */ union { char * ifcu_buf; struct ifreq *ifcu_req; @@ -95,7 +95,7 @@ char *if_indextoname (unsigned int ifindex, char *ifname) __THROW; struct if_nameindex { - unsigned int if_index; + uint32_t if_index; char *if_name; }; diff -uNr dietlibc-0.28/include/netinet/CVS/Entries dietlibc-0.29/include/netinet/CVS/Entries --- dietlibc-0.28/include/netinet/CVS/Entries 2005-01-31 09:53:08.000000000 -0800 +++ dietlibc-0.29/include/netinet/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,9 +0,0 @@ -/ether.h/1.1/Tue Jun 15 16:25:51 2004// -/if_ether.h/1.1/Tue Jun 15 16:25:51 2004// -/in.h/1.19/Wed Apr 14 13:13:29 2004// -/in_systm.h/1.1/Tue Jan 9 17:57:40 2001// -/ip.h/1.8/Tue Aug 19 16:58:18 2003// -/ip_icmp.h/1.3/Tue Aug 19 16:58:18 2003// -/tcp.h/1.5/Tue Aug 19 16:58:18 2003// -/udp.h/1.4/Tue Aug 19 16:58:18 2003// -D diff -uNr dietlibc-0.28/include/netinet/CVS/Repository dietlibc-0.29/include/netinet/CVS/Repository --- dietlibc-0.28/include/netinet/CVS/Repository 2005-01-31 09:53:08.000000000 -0800 +++ dietlibc-0.29/include/netinet/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/include/netinet diff -uNr dietlibc-0.28/include/netinet/CVS/Root dietlibc-0.29/include/netinet/CVS/Root --- dietlibc-0.28/include/netinet/CVS/Root 2005-01-31 09:53:08.000000000 -0800 +++ dietlibc-0.29/include/netinet/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/include/netinet/in.h dietlibc-0.29/include/netinet/in.h --- dietlibc-0.28/include/netinet/in.h 2004-04-14 06:13:29.000000000 -0700 +++ dietlibc-0.29/include/netinet/in.h 2005-03-15 00:51:22.000000000 -0800 @@ -116,8 +116,8 @@ in_port_t sin_port; /* Port number */ struct in_addr sin_addr; /* Internet address */ /* Pad to size of `struct sockaddr'. */ - unsigned char sin_zero[__SOCK_SIZE__ - sizeof(short int) - - sizeof(unsigned short int) - sizeof(struct in_addr)]; + unsigned char sin_zero[__SOCK_SIZE__ - sizeof(int16_t) - + sizeof(uint16_t) - sizeof(struct in_addr)]; }; @@ -184,7 +184,7 @@ }; struct sockaddr_in6 { - unsigned short int sin6_family; /* AF_INET6 */ + uint16_t sin6_family; /* AF_INET6 */ uint16_t sin6_port; /* Transport layer port # */ uint32_t sin6_flowinfo; /* IPv6 flow information */ struct in6_addr sin6_addr; /* IPv6 address */ @@ -196,8 +196,8 @@ in_port_t sin_port; /* Port number */ struct in_addr sin_addr; /* Internet address */ /* Pad to size of `struct sockaddr_in6'. */ - unsigned char sin_zero[sizeof(struct sockaddr_in6) - sizeof(short int) - - sizeof(unsigned short int) - sizeof(struct in_addr)]; + unsigned char sin_zero[sizeof(struct sockaddr_in6) - sizeof(int16_t) - + sizeof(uint16_t) - sizeof(struct in_addr)]; }; struct ipv6_mreq { diff -uNr dietlibc-0.28/include/netpacket/CVS/Entries dietlibc-0.29/include/netpacket/CVS/Entries --- dietlibc-0.28/include/netpacket/CVS/Entries 2005-01-31 09:53:08.000000000 -0800 +++ dietlibc-0.29/include/netpacket/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,2 +0,0 @@ -/packet.h/1.2/Tue Aug 19 16:58:18 2003// -D diff -uNr dietlibc-0.28/include/netpacket/CVS/Repository dietlibc-0.29/include/netpacket/CVS/Repository --- dietlibc-0.28/include/netpacket/CVS/Repository 2005-01-31 09:53:08.000000000 -0800 +++ dietlibc-0.29/include/netpacket/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/include/netpacket diff -uNr dietlibc-0.28/include/netpacket/CVS/Root dietlibc-0.29/include/netpacket/CVS/Root --- dietlibc-0.28/include/netpacket/CVS/Root 2005-01-31 09:53:08.000000000 -0800 +++ dietlibc-0.29/include/netpacket/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/include/paths.h dietlibc-0.29/include/paths.h --- dietlibc-0.28/include/paths.h 2003-12-19 08:25:07.000000000 -0800 +++ dietlibc-0.29/include/paths.h 2005-04-26 10:47:18.000000000 -0700 @@ -24,4 +24,6 @@ #define _PATH_MOUNTED "/etc/mtab" #define _PATH_DEV "/dev/" +#define _PATH_TMP "/tmp/" + #endif diff -uNr dietlibc-0.28/include/pthread.h dietlibc-0.29/include/pthread.h --- dietlibc-0.28/include/pthread.h 2003-11-14 06:02:50.000000000 -0800 +++ dietlibc-0.29/include/pthread.h 2005-03-15 00:51:22.000000000 -0800 @@ -32,7 +32,7 @@ /* Fast locks */ #ifdef __hppa__ -struct _pthread_fastlock { int __spinlock; } __attribute__((aligned(16))); +struct _pthread_fastlock { int __spinlock; } __attribute__((__aligned__(16))); #define PTHREAD_SPIN_LOCKED 0 #define PTHREAD_SPIN_UNLOCKED 1 @@ -121,10 +121,10 @@ /* thread specific variables */ typedef unsigned int pthread_key_t; -int pthread_key_create(pthread_key_t*key,void(*destructor)(const void*)); +int pthread_key_create(pthread_key_t*key,void(*destructor)(void*)); int pthread_key_delete(pthread_key_t key); int pthread_setspecific(pthread_key_t key,const void*value); -const void*pthread_getspecific(pthread_key_t key); +void*pthread_getspecific(pthread_key_t key); /* Attributes for threads. */ @@ -232,7 +232,7 @@ /* FORK */ -pid_t pthread_atfork(void(*prepare)(void),void(*parent)(void), +int pthread_atfork(void(*prepare)(void),void(*parent)(void), void(*child)(void)); /* THREADS */ diff -uNr dietlibc-0.28/include/rpc/CVS/Entries dietlibc-0.29/include/rpc/CVS/Entries --- dietlibc-0.28/include/rpc/CVS/Entries 2005-01-31 09:53:08.000000000 -0800 +++ dietlibc-0.29/include/rpc/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,18 +0,0 @@ -/auth.h/1.3/Sat Jun 16 14:46:33 2001// -/auth_des.h/1.2/Fri Jun 15 16:14:49 2001// -/auth_unix.h/1.2/Fri Jun 15 16:14:49 2001// -/clnt.h/1.2/Fri Jun 15 16:14:49 2001// -/des_crypt.h/1.1/Wed May 2 20:56:50 2001// -/key_prot.h/1.2/Fri Jun 15 16:14:49 2001// -/netdb.h/1.2/Fri Jun 15 16:14:49 2001// -/pmap_clnt.h/1.2/Fri Jun 15 16:14:49 2001// -/pmap_prot.h/1.2/Fri Jun 15 16:14:49 2001// -/pmap_rmt.h/1.2/Fri Jun 15 16:14:49 2001// -/rpc.h/1.3/Sat Feb 23 23:08:20 2002// -/rpc_des.h/1.2/Tue Aug 19 16:58:18 2003// -/rpc_msg.h/1.2/Fri Jun 15 16:14:49 2001// -/svc.h/1.2/Fri Jun 15 16:14:49 2001// -/svc_auth.h/1.1/Wed May 2 20:56:50 2001// -/types.h/1.4/Tue Aug 19 16:58:18 2003// -/xdr.h/1.6/Fri Dec 17 19:22:11 2004// -D diff -uNr dietlibc-0.28/include/rpc/CVS/Repository dietlibc-0.29/include/rpc/CVS/Repository --- dietlibc-0.28/include/rpc/CVS/Repository 2005-01-31 09:53:08.000000000 -0800 +++ dietlibc-0.29/include/rpc/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/include/rpc diff -uNr dietlibc-0.28/include/rpc/CVS/Root dietlibc-0.29/include/rpc/CVS/Root --- dietlibc-0.28/include/rpc/CVS/Root 2005-01-31 09:53:08.000000000 -0800 +++ dietlibc-0.29/include/rpc/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/include/scsi/CVS/Entries dietlibc-0.29/include/scsi/CVS/Entries --- dietlibc-0.28/include/scsi/CVS/Entries 2005-01-31 09:53:08.000000000 -0800 +++ dietlibc-0.29/include/scsi/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,4 +0,0 @@ -/scsi.h/1.2/Tue Aug 19 16:58:18 2003// -/scsi_ioctl.h/1.1/Sun Apr 22 15:52:01 2001// -/sg.h/1.2/Tue Aug 19 16:58:18 2003// -D diff -uNr dietlibc-0.28/include/scsi/CVS/Repository dietlibc-0.29/include/scsi/CVS/Repository --- dietlibc-0.28/include/scsi/CVS/Repository 2005-01-31 09:53:08.000000000 -0800 +++ dietlibc-0.29/include/scsi/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/include/scsi diff -uNr dietlibc-0.28/include/scsi/CVS/Root dietlibc-0.29/include/scsi/CVS/Root --- dietlibc-0.28/include/scsi/CVS/Root 2005-01-31 09:53:08.000000000 -0800 +++ dietlibc-0.29/include/scsi/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/include/setjmp.h dietlibc-0.29/include/setjmp.h --- dietlibc-0.28/include/setjmp.h 2003-10-10 06:37:34.000000000 -0700 +++ dietlibc-0.29/include/setjmp.h 2005-03-15 00:51:22.000000000 -0800 @@ -170,7 +170,7 @@ #endif #endif -#if defined(powerpc) || defined(__powerpc64__) +#if defined(__powerpc__) || defined(__powerpc64__) # define JB_GPR1 0 /* Also known as the stack pointer */ # define JB_GPR2 1 # define JB_LR 2 /* The address we will return to */ @@ -191,7 +191,7 @@ #ifdef __ia64__ #ifndef __ASSEMBLER__ -typedef long __jmp_buf[70] __attribute__ ((aligned(16))); +typedef long __jmp_buf[70] __attribute__ ((__aligned__(16))); #endif #endif diff -uNr dietlibc-0.28/include/signal.h dietlibc-0.29/include/signal.h --- dietlibc-0.28/include/signal.h 2004-12-17 11:14:49.000000000 -0800 +++ dietlibc-0.29/include/signal.h 2005-03-15 00:51:22.000000000 -0800 @@ -8,6 +8,7 @@ #define __WANT_POSIX1B_SIGNALS__ #include +#include #define NSIG 32 @@ -31,7 +32,7 @@ #define SIGALRM 14 #define SIGTERM 15 #define SIGUNUSED 31 -#if defined(__i386__) || defined(__x86_64__) || defined(powerpc) || defined(__arm__) \ +#if defined(__i386__) || defined(__x86_64__) || defined(__powerpc__) || defined(__arm__) \ || defined(__s390__) || defined(__ia64__) || defined(__powerpc64__) #define SIGBUS 7 #define SIGUSR1 10 @@ -241,14 +242,24 @@ } sigval_t; #define SI_MAX_SIZE 128 -#define SI_PAD_SIZE ((SI_MAX_SIZE/sizeof(int)) - 3) +#if __WORDSIZE == 64 +#define SI_PAD_SIZE ((SI_MAX_SIZE/sizeof(int32_t)) - 4) +#else +#define SI_PAD_SIZE ((SI_MAX_SIZE/sizeof(int32_t)) - 3) +#endif + +#ifdef __sparc_v9__ +typedef int __band_t; +#else +typedef long __band_t; +#endif typedef struct siginfo { - int si_signo; - int si_errno; - int si_code; + int32_t si_signo; + int32_t si_errno; + int32_t si_code; union { - int _pad[SI_PAD_SIZE]; + int32_t _pad[SI_PAD_SIZE]; /* kill() */ struct { pid_t _pid; /* sender's pid */ @@ -279,7 +290,7 @@ } _sigfault; /* SIGPOLL */ struct { - int _band; /* POLL_IN, POLL_OUT, POLL_MSG */ + __band_t _band; /* POLL_IN, POLL_OUT, POLL_MSG */ int _fd; } _sigpoll; } _sifields; @@ -536,7 +547,7 @@ int sigqueueinfo(int pid, int sig, siginfo_t *info) __THROW; int siginterrupt(int sig, int flag) __THROW; -int killpg(int pgrp, int sig) __THROW; +int killpg(pid_t pgrp, int sig) __THROW; /* 0 is OK ! kernel puts in MAX_THREAD_TIMEOUT :) */ #define sigwaitinfo(m, i) sigtimedwait((m),(i),0) diff -uNr dietlibc-0.28/include/stdarg-cruft.h dietlibc-0.29/include/stdarg-cruft.h --- dietlibc-0.28/include/stdarg-cruft.h 2003-10-10 06:37:34.000000000 -0700 +++ dietlibc-0.29/include/stdarg-cruft.h 2005-03-07 01:07:40.000000000 -0800 @@ -109,7 +109,7 @@ #endif #endif -#elif defined(powerpc) +#elif defined(__powerpc__) typedef struct __va_list_tag { unsigned char gpr; /* index into the array of 8 GPRs stored in the @@ -275,7 +275,7 @@ == __real_type_class) && (__va).__offset <= (6 * 8)) \ ? (6 * 8) + 8 : __va_tsize (__type))))) -#else /* !__sparc__ && !powerpc && !__mips__ && !__alpha__*/ +#else /* !__sparc__ && !__powerpc__ && !__mips__ && !__alpha__*/ typedef char* va_list; diff -uNr dietlibc-0.28/include/stdint.h dietlibc-0.29/include/stdint.h --- dietlibc-0.28/include/stdint.h 2004-12-17 11:14:49.000000000 -0800 +++ dietlibc-0.29/include/stdint.h 2005-03-15 00:51:22.000000000 -0800 @@ -8,26 +8,45 @@ typedef int8_t int_least8_t; typedef int16_t int_least16_t; typedef int32_t int_least32_t; +typedef int64_t int_least64_t; + typedef uint8_t uint_least8_t; typedef uint16_t uint_least16_t; typedef uint32_t uint_least32_t; - -#if !defined(__STRICT_ANSI__) || __STDC_VERSION__ + 0 >= 199900L -typedef int64_t int_least64_t; typedef uint64_t uint_least64_t; -#endif typedef signed char int_fast8_t; typedef signed long int int_fast16_t; typedef signed long int int_fast32_t; -typedef signed long long int int_fast64_t; +typedef int64_t int_fast64_t; typedef unsigned char uint_fast8_t; typedef unsigned long int uint_fast16_t; typedef unsigned long int uint_fast32_t; -typedef unsigned long long int uint_fast64_t; +typedef uint64_t uint_fast64_t; + + + +/* The ISO C99 standard specifies that in C++ implementations these + should only be defined if explicitly requested. */ +#if !defined __cplusplus || defined __STDC_LIMIT_MACROS + +/* FIXME: missing are + INTx_MIN, INTx_MAX, UINTx_MAX + INT_LEASTx_MIN, INT_LEASTx_MAX, UINT_LEASTx_MAX + INT_FASTx_MIN, INT_FASTx_MAX, UINT_FASTx_MAX + INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX + INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX + PTRDIFF_MIN, PTRDIFF_MAX + SIG_ATOMIC_MIN, SIG_ATOMIC_MAX + SIZE_MAX + WCHAR_MIN, WCHAR_MAX + WINT_MIN, WINT_MAX +*/ + +#endif /* C++ && limit macros */ + -#include /* The ISO C99 standard specifies that in C++ implementations these should only be defined if explicitly requested. */ diff -uNr dietlibc-0.28/include/stdio.h dietlibc-0.29/include/stdio.h --- dietlibc-0.28/include/stdio.h 2004-07-12 05:04:43.000000000 -0700 +++ dietlibc-0.29/include/stdio.h 2005-03-15 00:51:22.000000000 -0800 @@ -4,38 +4,40 @@ #include #include #include +#include __BEGIN_DECLS +struct __stdio_file; typedef struct __stdio_file FILE; +extern FILE *stdin, *stdout, *stderr; + FILE *fopen (const char *path, const char *mode) __THROW; FILE *fdopen (int fildes, const char *mode) __THROW; FILE *freopen (const char *path, const char *mode, FILE *stream) __THROW; -int printf(const char *format, ...) __THROW __attribute__((format(printf,1,2))); -int fprintf(FILE *stream, const char *format, ...) __THROW __attribute__((format(printf,2,3))); -int sprintf(char *str, const char *format, ...) __THROW __attribute__((format(printf,2,3))); -int snprintf(char *str, size_t size, const char *format, ...) __THROW __attribute__((format(printf,3,4))); -int asprintf(char **ptr, const char* format, ...) __THROW __attribute_malloc__ __attribute__((format(printf,2,3))); - -int scanf(const char *format, ...) __THROW __attribute__((format(scanf,1,2))); -int fscanf(FILE *stream, const char *format, ...) __THROW __attribute__((format(scanf,2,3))); -int sscanf(const char *str, const char *format, ...) __THROW __attribute__((format(scanf,2,3))); - -#include - -int vprintf(const char *format, va_list ap) __THROW __attribute__((format(printf,1,0))); -int vfprintf(FILE *stream, const char *format, va_list ap) __THROW __attribute__((format(printf,2,0))); -int vsprintf(char *str, const char *format, va_list ap) __THROW __attribute__((format(printf,2,0))); -int vsnprintf(char *str, size_t size, const char *format, va_list ap) __THROW __attribute__((format(printf,3,0))); - -int fdprintf(int fd, const char *format, ...) __THROW __attribute__((format(printf,2,3))); -int vfdprintf(int fd, const char *format, va_list ap) __THROW __attribute__((format(printf,2,0))); - -int vscanf(const char *format, va_list ap) __THROW __attribute__((format(scanf,1,0))); -int vsscanf(const char *str, const char *format, va_list ap) __THROW __attribute__((format(scanf,2,0))); -int vfscanf(FILE *stream, const char *format, va_list ap) __THROW __attribute__((format(scanf,2,0))); +int printf(const char *format, ...) __THROW __attribute__((__format__(__printf__,1,2))); +int fprintf(FILE *stream, const char *format, ...) __THROW __attribute__((__format__(__printf__,2,3))); +int sprintf(char *str, const char *format, ...) __THROW __attribute__((__format__(__printf__,2,3))); +int snprintf(char *str, size_t size, const char *format, ...) __THROW __attribute__((__format__(__printf__,3,4))); +int asprintf(char **ptr, const char* format, ...) __THROW __attribute_malloc__ __attribute__((__format__(__printf__,2,3))); + +int scanf(const char *format, ...) __THROW __attribute__((__format__(__scanf__,1,2))); +int fscanf(FILE *stream, const char *format, ...) __THROW __attribute__((__format__(__scanf__,2,3))); +int sscanf(const char *str, const char *format, ...) __THROW __attribute__((__format__(__scanf__,2,3))); + +int vprintf(const char *format, va_list ap) __THROW __attribute__((__format__(__printf__,1,0))); +int vfprintf(FILE *stream, const char *format, va_list ap) __THROW __attribute__((__format__(__printf__,2,0))); +int vsprintf(char *str, const char *format, va_list ap) __THROW __attribute__((__format__(__printf__,2,0))); +int vsnprintf(char *str, size_t size, const char *format, va_list ap) __THROW __attribute__((__format__(__printf__,3,0))); + +int fdprintf(int fd, const char *format, ...) __THROW __attribute__((__format__(__printf__,2,3))); +int vfdprintf(int fd, const char *format, va_list ap) __THROW __attribute__((__format__(__printf__,2,0))); + +int vscanf(const char *format, va_list ap) __THROW __attribute__((__format__(__scanf__,1,0))); +int vsscanf(const char *str, const char *format, va_list ap) __THROW __attribute__((__format__(__scanf__,2,0))); +int vfscanf(FILE *stream, const char *format, va_list ap) __THROW __attribute__((__format__(__scanf__,2,0))); int fgetc(FILE *stream) __THROW; int fgetc_unlocked(FILE *stream) __THROW; @@ -56,15 +58,25 @@ int putchar(int c) __THROW; int putchar_unlocked(int c) __THROW; +#if !defined(__cplusplus) #define putc(c,stream) fputc(c,stream) #define putchar(c) fputc(c,stdout) #define putc_unlocked(c,stream) fputc_unlocked(c,stream) #define putchar_unlocked(c) fputc_unlocked(c,stdout) +#else +inline int putc(int c, FILE *stream) __THROW { return fputc(c,stream); } +inline int putc_unlocked(int c, FILE *stream) __THROW { return fputc_unlocked(c,stream); } +#endif +#if !defined(__cplusplus) #define getc(stream) fgetc(stream) #define getchar() fgetc(stdin) #define getc_unlocked(stream) fgetc_unlocked(stream) #define getchar_unlocked() fgetc_unlocked(stdin) +#else +inline int getc_unlocked(FILE *stream) __THROW { return fgetc_unlocked(stream); } +inline int getchar_unlocked(void) __THROW { return fgetc_unlocked(stdin); } +#endif int puts(const char *s) __THROW; @@ -117,11 +129,10 @@ void clearerr_unlocked(FILE *stream) __THROW; int remove(const char *pathname) __THROW; +int rename(const char *oldpath, const char *newpath) __THROW; void perror(const char *s) __THROW; -extern FILE *stdin, *stdout, *stderr; - #define EOF (-1) #define BUFSIZ 128 @@ -133,9 +144,18 @@ int setvbuf(FILE *stream, char *buf, int mode , size_t size) __THROW; int setvbuf_unlocked(FILE *stream, char *buf, int mode , size_t size) __THROW; +#if !defined(__cplusplus) #define setbuf(stream,buf) setvbuf(stream,buf,buf?_IOFBF:_IONBF,BUFSIZ) #define setbuffer(stream,buf,size) setvbuf(stream,buf,buf?_IOFBF:_IONBF,size) #define setlinebuf(stream) setvbuf(stream,0,_IOLBF,BUFSIZ) +#else +inline int setbuf(FILE *stream, char *buf) __THROW + { return setvbuf(stream,buf,buf?_IOFBF:_IONBF,BUFSIZ); } +inline int setbuffer(FILE *stream, char *buf, size_t size) __THROW + { return setvbuf(stream,buf,buf?_IOFBF:_IONBF,size); } +inline int setlinebuf(FILE *stream) __THROW + { return setvbuf(stream,0,_IOLBF,BUFSIZ); } +#endif FILE *popen(const char *command, const char *type) __THROW; int pclose(FILE *stream) __THROW; diff -uNr dietlibc-0.28/include/stdlib.h dietlibc-0.29/include/stdlib.h --- dietlibc-0.28/include/stdlib.h 2004-04-14 06:13:29.000000000 -0700 +++ dietlibc-0.29/include/stdlib.h 2005-03-15 00:51:22.000000000 -0800 @@ -42,7 +42,7 @@ double atof(const char *nptr) __THROW; __extension__ long long int atoll(const char *nptr); -void exit(int status) __THROW __attribute__((noreturn)); +void exit(int status) __THROW __attribute__((__noreturn__)); void abort(void) __THROW; extern int rand(void) __THROW; @@ -72,7 +72,7 @@ /* now this function is the greatest bullshit I have ever seen. * The ISO people must be out of their minds. */ typedef struct { int quot,rem; } div_t; -div_t div(int numer, int denom) __THROW __attribute__((const)); +div_t div(int numer, int denom) __THROW __attribute__((__const__)); char *realpath(const char *path, char *resolved_path) __THROW; @@ -81,9 +81,9 @@ char* mktemp(char *_template); -int abs(int i) __THROW __attribute__((const)); -long int labs(long int i) __THROW __attribute__((const)); -__extension__ long long int llabs(long long int i) __THROW __attribute__((const)); +int abs(int i) __THROW __attribute__((__const__)); +long int labs(long int i) __THROW __attribute__((__const__)); +__extension__ long long int llabs(long long int i) __THROW __attribute__((__const__)); #ifdef _XOPEN_SOURCE int grantpt (int fd) __THROW; diff -uNr dietlibc-0.28/include/sys/CVS/Entries dietlibc-0.29/include/sys/CVS/Entries --- dietlibc-0.28/include/sys/CVS/Entries 2005-01-31 09:53:08.000000000 -0800 +++ dietlibc-0.29/include/sys/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,55 +0,0 @@ -/alpha-ioctl.h/1.2/Mon Sep 3 16:06:28 2001// -/arm-ioctl.h/1.2/Mon Sep 3 16:06:28 2001// -/cdefs.h/1.28/Mon Dec 6 21:26:24 2004// -/epoll.h/1.8/Tue Feb 24 00:33:18 2004// -/file.h/1.3/Tue Aug 19 16:58:18 2003// -/fsuid.h/1.3/Tue Aug 19 16:58:18 2003// -/gmon.h/1.2/Tue Aug 19 16:58:18 2003// -/gmon_out.h/1.1/Wed Apr 3 13:15:27 2002// -/hppa-ioctl.h/1.1/Fri Jan 11 18:07:07 2002// -/i386-ioctl.h/1.2/Mon Sep 3 16:06:28 2001// -/io.h/1.6/Tue Aug 24 10:10:48 2004// -/ioctl.h/1.10/Fri Oct 10 13:37:34 2003// -/ipc.h/1.7/Tue Aug 19 16:58:18 2003// -/kd.h/1.3/Tue Aug 19 16:58:18 2003// -/klog.h/1.2/Tue Aug 19 16:58:18 2003// -/mips-ioctl.h/1.3/Wed Jun 18 15:20:00 2003// -/mman.h/1.20/Tue Nov 30 15:37:29 2004// -/mount.h/1.8/Wed May 12 15:55:24 2004// -/msg.h/1.3/Tue Aug 19 16:58:18 2003// -/mtio.h/1.6/Thu Dec 18 16:37:02 2003// -/param.h/1.7/Sun Mar 30 19:19:53 2003// -/poll.h/1.5/Tue Aug 19 16:58:18 2003// -/ppc-ioctl.h/1.2/Mon Sep 3 16:06:28 2001// -/prctl.h/1.2/Tue Aug 19 16:58:18 2003// -/ptrace.h/1.15/Thu Nov 18 16:44:39 2004// -/reboot.h/1.6/Tue Aug 19 16:58:18 2003// -/resource.h/1.8/Mon Nov 24 20:32:04 2003// -/s390-ioctl.h/1.1/Thu Nov 29 08:19:15 2001// -/select.h/1.6/Mon May 17 17:44:56 2004// -/sem.h/1.6/Tue Aug 19 16:58:18 2003// -/sendfile.h/1.5/Tue Aug 19 16:58:18 2003// -/shm.h/1.13/Fri Oct 10 13:37:34 2003// -/signal.h/1.1/Wed Mar 14 21:17:48 2001// -/socket.h/1.22/Tue Aug 19 16:58:18 2003// -/soundcard.h/1.3/Tue Aug 19 16:58:18 2003// -/sparc-ioctl.h/1.2/Mon Sep 3 16:06:28 2001// -/stat.h/1.28/Fri Mar 26 15:25:15 2004// -/swap.h/1.1/Fri Jan 21 18:21:07 2005// -/syscall.h/1.1/Fri Mar 9 19:35:41 2001// -/sysctl.h/1.2/Tue Aug 19 16:58:18 2003// -/sysinfo.h/1.3/Tue Aug 19 16:58:18 2003// -/syslog.h/1.6/Tue Aug 19 16:58:18 2003// -/sysmacros.h/1.1/Fri Jun 1 16:27:38 2001// -/time.h/1.12/Mon May 17 17:49:58 2004// -/timeb.h/1.2/Tue Aug 19 16:58:18 2003// -/times.h/1.5/Tue Aug 19 16:58:18 2003// -/timex.h/1.3/Tue Aug 19 16:58:18 2003// -/types.h/1.26/Wed Apr 14 13:33:41 2004// -/ucontext.h/1.6/Fri Oct 10 13:37:34 2003// -/uio.h/1.4/Tue Aug 19 16:58:18 2003// -/un.h/1.3/Tue Aug 19 16:58:18 2003// -/utsname.h/1.2/Tue Aug 19 16:58:18 2003// -/vfs.h/1.5/Tue Aug 19 16:58:18 2003// -/wait.h/1.10/Fri Dec 17 19:14:49 2004// -D diff -uNr dietlibc-0.28/include/sys/CVS/Repository dietlibc-0.29/include/sys/CVS/Repository --- dietlibc-0.28/include/sys/CVS/Repository 2005-01-31 09:53:08.000000000 -0800 +++ dietlibc-0.29/include/sys/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/include/sys diff -uNr dietlibc-0.28/include/sys/CVS/Root dietlibc-0.29/include/sys/CVS/Root --- dietlibc-0.28/include/sys/CVS/Root 2005-01-31 09:53:08.000000000 -0800 +++ dietlibc-0.29/include/sys/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/include/sys/cdefs.h dietlibc-0.29/include/sys/cdefs.h --- dietlibc-0.28/include/sys/cdefs.h 2004-12-06 13:26:24.000000000 -0800 +++ dietlibc-0.29/include/sys/cdefs.h 2005-05-13 11:39:32.000000000 -0700 @@ -53,7 +53,7 @@ #endif #ifndef __i386__ -#define regparm(x) +#define __regparm__(x) #endif #if (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 2)) @@ -63,10 +63,23 @@ #define __deprecated__ #endif -#if (__GNUC_ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) +#if (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) # define __nonnull(params) __attribute__ ((__nonnull__ params)) #else # define __nonnull(params) #endif +#if (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4)) +# define __attribute_used __attribute__ ((__used__)) +#else +# define __attribute_used +#endif + +#if (__GNUC__ >= 4) +#define __needsNULL__(x) __sentinel__(x) +#else +#define __needsNULL__(x) +#define __sentinel__ +#endif + #endif diff -uNr dietlibc-0.28/include/sys/epoll.h dietlibc-0.29/include/sys/epoll.h --- dietlibc-0.28/include/sys/epoll.h 2004-02-23 16:33:18.000000000 -0800 +++ dietlibc-0.29/include/sys/epoll.h 2005-03-15 00:51:22.000000000 -0800 @@ -57,7 +57,7 @@ epoll_data_t data; } #ifdef __x86_64__ -__attribute__((packed)) +__attribute__((__packed__)) #endif ; diff -uNr dietlibc-0.28/include/sys/ioctl.h dietlibc-0.29/include/sys/ioctl.h --- dietlibc-0.28/include/sys/ioctl.h 2003-10-10 06:37:34.000000000 -0700 +++ dietlibc-0.29/include/sys/ioctl.h 2005-03-07 01:07:40.000000000 -0800 @@ -15,7 +15,7 @@ #include #elif defined(__mips__) #include -#elif defined(powerpc) || defined(__powerpc64__) +#elif defined(__powerpc__) || defined(__powerpc64__) #include #elif defined(__s390__) #include diff -uNr dietlibc-0.28/include/sys/mman.h dietlibc-0.29/include/sys/mman.h --- dietlibc-0.28/include/sys/mman.h 2004-11-30 07:37:29.000000000 -0800 +++ dietlibc-0.29/include/sys/mman.h 2005-04-25 00:22:24.000000000 -0700 @@ -73,7 +73,7 @@ #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ #define MADV_WILLNEED 0x3 /* pre-fault pages */ #define MADV_DONTNEED 0x4 /* discard these pages */ -#elif defined(__sparc__) || defined (powerpc) || defined (__powerpc64__) +#elif defined(__sparc__) || defined (__powerpc__) || defined (__powerpc64__) #define MAP_FIXED 0x10 /* Interpret addr exactly */ #define MAP_ANONYMOUS 0x20 /* don't use a file */ #define MAP_RENAME MAP_ANONYMOUS /* In SunOS terminology */ @@ -132,6 +132,22 @@ #define MCL_CURRENT 1 /* lock all current mappings */ #define MCL_FUTURE 2 +#define MADV_NORMAL 0 /* no further special treatment */ +#define MADV_RANDOM 1 /* expect random page references */ +#define MADV_SEQUENTIAL 2 /* expect sequential page references */ +#define MADV_WILLNEED 3 /* will need these pages */ +#define MADV_DONTNEED 4 /* don't need these pages */ +#define MADV_SPACEAVAIL 5 /* insure that resources are reserved */ +#define MADV_VPS_PURGE 6 /* Purge pages from VM page cache */ +#define MADV_VPS_INHERIT 7 /* Inherit parents page size */ +#define MADV_4K_PAGES 12 /* Use 4K pages */ +#define MADV_16K_PAGES 14 /* Use 16K pages */ +#define MADV_64K_PAGES 16 /* Use 64K pages */ +#define MADV_256K_PAGES 18 /* Use 256K pages */ +#define MADV_1M_PAGES 20 /* Use 1 Megabyte pages */ +#define MADV_4M_PAGES 22 /* Use 4 Megabyte pages */ +#define MADV_16M_PAGES 24 /* Use 16 Megabyte pages */ +#define MADV_64M_PAGES 26 /* Use 64 Megabyte pages */ #elif defined(__ia64__) #define MAP_TYPE 0x0f /* Mask for type of mapping */ @@ -151,6 +167,11 @@ #define MS_INVALIDATE 2 /* invalidate the caches */ #define MS_SYNC 4 /* synchronous memory sync */ +#define MADV_NORMAL 0x0 /* default page-in behavior */ +#define MADV_RANDOM 0x1 /* page-in minimum required */ +#define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ +#define MADV_WILLNEED 0x3 /* pre-fault pages */ +#define MADV_DONTNEED 0x4 /* discard these pages */ #endif /* compatibility flags */ diff -uNr dietlibc-0.28/include/sys/ptrace.h dietlibc-0.29/include/sys/ptrace.h --- dietlibc-0.28/include/sys/ptrace.h 2004-11-18 08:44:39.000000000 -0800 +++ dietlibc-0.29/include/sys/ptrace.h 2005-03-15 00:51:22.000000000 -0800 @@ -190,7 +190,7 @@ typedef struct { uint32_t mask; uint32_t addr; -} psw_t __attribute__ ((aligned(8))); +} psw_t __attribute__ ((__aligned__(8))); typedef union { @@ -237,7 +237,7 @@ typedef struct { uint32_t cr[3]; -} per_cr_words __attribute__((packed)); +} per_cr_words __attribute__((__packed__)); #define PER_EM_MASK 0xE8000000 @@ -261,14 +261,14 @@ unsigned : 21; addr_t starting_addr; addr_t ending_addr; -} per_cr_bits __attribute__((packed)); +} per_cr_bits __attribute__((__packed__)); typedef struct { uint16_t perc_atmid; /* 0x096 */ uint32_t address; /* 0x098 */ uint8_t access_id; /* 0x0a1 */ -} per_lowcore_words __attribute__((packed)); +} per_lowcore_words __attribute__((__packed__)); typedef struct { @@ -287,14 +287,14 @@ addr_t address; /* 0x098 */ unsigned : 4; /* 0x0a1 */ unsigned access_id : 4; -} per_lowcore_bits __attribute__((packed)); +} per_lowcore_bits __attribute__((__packed__)); typedef struct { union { per_cr_words words; per_cr_bits bits; - } control_regs __attribute__((packed)); + } control_regs __attribute__((__packed__)); /* * Use these flags instead of setting em_instruction_fetch * directly they are used so that single stepping can be @@ -313,7 +313,7 @@ per_lowcore_words words; per_lowcore_bits bits; } lowcore; -} per_struct __attribute__((packed)); +} per_struct __attribute__((__packed__)); typedef struct { @@ -637,7 +637,7 @@ #define PTRACE_GETUCODE 29 /* stupid bsd-ism */ -#elif defined(powerpc) || defined (__powerpc64__) +#elif defined(__powerpc__) || defined (__powerpc64__) #include @@ -673,7 +673,7 @@ union { unsigned long bits[2]; } u; -} __attribute__ ((aligned (16))); +} __attribute__ ((__aligned__ (16))); struct pt_regs { unsigned long cr_ipsr; /* interrupted task's psr */ diff -uNr dietlibc-0.28/include/sys/shm.h dietlibc-0.29/include/sys/shm.h --- dietlibc-0.28/include/sys/shm.h 2003-10-10 06:37:34.000000000 -0700 +++ dietlibc-0.29/include/sys/shm.h 2005-03-07 01:07:40.000000000 -0800 @@ -60,7 +60,7 @@ unsigned long swap_successes; }; -#if defined(__i386__) || defined(__mips__) || defined(__arm__) || defined(powerpc) || defined (__powerpc64__) || defined(__s390__) || defined(__hppa__) || defined(__x86_64__) || defined(__ia64__) +#if defined(__i386__) || defined(__mips__) || defined(__arm__) || defined(__powerpc__) || defined (__powerpc64__) || defined(__s390__) || defined(__hppa__) || defined(__x86_64__) || defined(__ia64__) #define PAGE_SIZE 4096UL #define PAGE_SHIFT 12 #elif defined(__alpha__) || defined(__sparc__) diff -uNr dietlibc-0.28/include/sys/socket.h dietlibc-0.29/include/sys/socket.h --- dietlibc-0.28/include/sys/socket.h 2003-08-19 09:58:18.000000000 -0700 +++ dietlibc-0.29/include/sys/socket.h 2005-03-15 00:51:22.000000000 -0800 @@ -185,8 +185,8 @@ }; struct linger { - int l_onoff; - int l_linger; + int32_t l_onoff; + int32_t l_linger; }; struct iovec { @@ -196,18 +196,18 @@ struct msghdr { void* msg_name; /* Socket name */ - int msg_namelen; /* Length of name */ + socklen_t msg_namelen; /* Length of name */ struct iovec* msg_iov; /* Data blocks */ size_t msg_iovlen; /* Number of blocks */ void* msg_control; /* Per protocol magic (eg BSD file descriptor passing) */ size_t msg_controllen; /* Length of cmsg list */ - unsigned msg_flags; + uint32_t msg_flags; }; struct cmsghdr { size_t cmsg_len; /* data byte count, including hdr */ - int cmsg_level; /* originating protocol */ - int cmsg_type; /* protocol-specific type */ + int32_t cmsg_level; /* originating protocol */ + int32_t cmsg_type; /* protocol-specific type */ }; #define UIO_FASTIOV 8 @@ -220,9 +220,9 @@ #define SCM_CONNECT 0x03 /* rw: struct scm_connect */ struct ucred { - unsigned int pid; - unsigned int uid; - unsigned int gid; + pid_t pid; + uid_t uid; + gid_t gid; }; /* Supported address families. */ diff -uNr dietlibc-0.28/include/sys/stat.h dietlibc-0.29/include/sys/stat.h --- dietlibc-0.28/include/sys/stat.h 2004-03-26 07:25:15.000000000 -0800 +++ dietlibc-0.29/include/sys/stat.h 2005-03-15 00:51:22.000000000 -0800 @@ -248,8 +248,8 @@ unsigned long st_pad2; __extension__ long long st_blocks; }; -#elif defined(powerpc) || defined(__powerpc64__) -#if defined(powerpc) +#elif defined(__powerpc__) || defined(__powerpc64__) +#if defined(__powerpc__) && !defined(__powerpc64__) struct stat { dev_t st_dev; ino_t st_ino; @@ -275,9 +275,9 @@ unsigned long st_dev; ino_t st_ino; nlink_t st_nlink; - mode_t st_mode; - uid_t st_uid; - gid_t st_gid; + uint32_t st_mode; + uint32_t st_uid; + uint32_t st_gid; unsigned long st_rdev; off_t st_size; unsigned long st_blksize; @@ -299,12 +299,12 @@ struct stat64 { __extension__ unsigned long long st_dev; /* Device. */ __extension__ unsigned long long st_ino; /* File serial number. */ - unsigned int st_mode; /* File mode. */ - unsigned int st_nlink; /* Link count. */ - unsigned int st_uid; /* User ID of the file's owner. */ - unsigned int st_gid; /* Group ID of the file's group. */ + uint32_t st_mode; /* File mode. */ + uint32_t st_nlink; /* Link count. */ + uint32_t st_uid; /* User ID of the file's owner. */ + uint32_t st_gid; /* Group ID of the file's group. */ __extension__ unsigned long long st_rdev; /* Device number, if device. */ - unsigned short int __pad2; + uint16_t __pad2; __extension__ long long st_size; /* Size of file, in bytes. */ long st_blksize; /* Optimal block size for I/O. */ @@ -512,10 +512,10 @@ unsigned long st_dev; unsigned long st_ino; unsigned long st_nlink; - unsigned int st_mode; - unsigned int st_uid; - unsigned int st_gid; - unsigned int __pad0; + uint32_t st_mode; + uint32_t st_uid; + uint32_t st_gid; + uint32_t __pad0; unsigned long st_rdev; unsigned long st_size; unsigned long st_blksize; diff -uNr dietlibc-0.28/include/sys/syscall.h dietlibc-0.29/include/sys/syscall.h --- dietlibc-0.28/include/sys/syscall.h 2001-03-09 11:35:41.000000000 -0800 +++ dietlibc-0.29/include/sys/syscall.h 2005-05-01 13:21:09.000000000 -0700 @@ -3,4 +3,6 @@ #include +int syscall(int number, ...); + #endif diff -uNr dietlibc-0.28/include/sys/types.h dietlibc-0.29/include/sys/types.h --- dietlibc-0.28/include/sys/types.h 2004-04-14 06:33:41.000000000 -0700 +++ dietlibc-0.29/include/sys/types.h 2005-03-15 00:51:22.000000000 -0800 @@ -44,11 +44,11 @@ */ #if defined(__alpha__) || defined(__ia64__) || defined(__sparc64__) || defined(__s390x__) - typedef unsigned int dev_t; /* Used for device IDs. */ - typedef unsigned int gid_t; /* Used for group IDs. */ - typedef unsigned int mode_t; /* Used for some file attributes. */ - typedef unsigned int nlink_t; /* Used for link counts. */ - typedef unsigned int uid_t; /* Used for user IDs. */ + typedef uint32_t dev_t; /* Used for device IDs. */ + typedef uint32_t gid_t; /* Used for group IDs. */ + typedef uint32_t mode_t; /* Used for some file attributes. */ + typedef uint32_t nlink_t; /* Used for link counts. */ + typedef uint32_t uid_t; /* Used for user IDs. */ #elif defined(__arm__) || defined(__i386__) || defined(__sparc__) || defined(__s390__) /* make sure __s390x__ hits before __s390__ */ typedef unsigned short dev_t; typedef unsigned short gid_t; @@ -67,7 +67,7 @@ typedef unsigned int mode_t; typedef int nlink_t; typedef int uid_t; -#elif defined(powerpc) +#elif defined(__powerpc__) && !defined(__powerpc64__) typedef unsigned int dev_t; typedef unsigned int gid_t; typedef unsigned int mode_t; @@ -75,18 +75,18 @@ typedef unsigned int uid_t; #elif defined(__powerpc64__) || defined(__x86_64__) typedef unsigned long dev_t; - typedef unsigned int gid_t; - typedef unsigned int mode_t; + typedef uint32_t gid_t; + typedef uint32_t mode_t; typedef unsigned long nlink_t; - typedef unsigned int uid_t; + typedef uint32_t uid_t; #endif -typedef signed int id_t; /* Used as a general identifier; can be +typedef int32_t id_t; /* Used as a general identifier; can be used to contain at least a pid_t, uid_t or a gid_t. */ typedef unsigned long ino_t; /* Used for file serial numbers. */ -typedef signed int key_t; /* Used for interprocess communication. */ -typedef signed int pid_t; /* Used for process IDs and process group IDs. */ +typedef int32_t key_t; /* Used for interprocess communication. */ +typedef int32_t pid_t; /* Used for process IDs and process group IDs. */ typedef signed long ssize_t; /* Used for a count of bytes or an error indication. */ typedef signed long suseconds_t; /* Used for time in microseconds. */ typedef signed long time_t; /* Used for time in seconds. */ @@ -108,14 +108,14 @@ typedef uint32_t uid32_t; typedef uint32_t gid32_t; -typedef int clockid_t; -typedef int timer_t; +typedef int32_t clockid_t; +typedef int32_t timer_t; typedef long int fpos_t; #define __socklen_t_defined -typedef unsigned int socklen_t; -typedef unsigned short sa_family_t; +typedef uint32_t socklen_t; +typedef uint16_t sa_family_t; #ifdef _BSD_SOURCE diff -uNr dietlibc-0.28/include/sys/ucontext.h dietlibc-0.29/include/sys/ucontext.h --- dietlibc-0.28/include/sys/ucontext.h 2003-10-10 06:37:34.000000000 -0700 +++ dietlibc-0.29/include/sys/ucontext.h 2005-03-07 01:07:40.000000000 -0800 @@ -10,7 +10,7 @@ typedef struct sigcontext mcontext_t; #endif -#if defined(__i386__) || defined(__arm__) || defined(__mips__) || defined(__mips64__) || defined(powerpc) || defined(__powerpc64__) || defined(__hppa__) +#if defined(__i386__) || defined(__arm__) || defined(__mips__) || defined(__mips64__) || defined(__powerpc__) || defined(__powerpc64__) || defined(__hppa__) struct ucontext { unsigned long uc_flags; struct ucontext *uc_link; diff -uNr dietlibc-0.28/include/sys/vfs.h dietlibc-0.29/include/sys/vfs.h --- dietlibc-0.28/include/sys/vfs.h 2003-08-19 09:58:18.000000000 -0700 +++ dietlibc-0.29/include/sys/vfs.h 2005-03-15 00:51:22.000000000 -0800 @@ -7,7 +7,7 @@ __BEGIN_DECLS typedef struct { - int __val[2]; + int32_t __val[2]; } __kernel_fsid_t; struct statfs { diff -uNr dietlibc-0.28/include/termios.h dietlibc-0.29/include/termios.h --- dietlibc-0.28/include/termios.h 2004-08-03 15:28:46.000000000 -0700 +++ dietlibc-0.29/include/termios.h 2005-03-15 00:51:22.000000000 -0800 @@ -7,18 +7,18 @@ __BEGIN_DECLS struct winsize { - unsigned short ws_row; - unsigned short ws_col; - unsigned short ws_xpixel; - unsigned short ws_ypixel; + uint16_t ws_row; + uint16_t ws_col; + uint16_t ws_xpixel; + uint16_t ws_ypixel; }; #define NCC 8 struct termio { - unsigned short c_iflag; /* input mode flags */ - unsigned short c_oflag; /* output mode flags */ - unsigned short c_cflag; /* control mode flags */ - unsigned short c_lflag; /* local mode flags */ + uint16_t c_iflag; /* input mode flags */ + uint16_t c_oflag; /* output mode flags */ + uint16_t c_cflag; /* control mode flags */ + uint16_t c_lflag; /* local mode flags */ unsigned char c_line; /* line discipline */ unsigned char c_cc[NCC]; /* control characters */ }; @@ -75,8 +75,8 @@ #define N_HCI 15 /* Bluetooth HCI UART */ typedef unsigned char cc_t; -typedef unsigned int speed_t; -typedef unsigned int tcflag_t; +typedef uint32_t speed_t; +typedef uint32_t tcflag_t; #define _POSIX_VDISABLE '\0' @@ -103,7 +103,7 @@ cc_t c_line; /* line discipline */ cc_t c_cc[NCCS]; /* control characters */ }; -#elif defined(powerpc) || defined(__powerpc64__) || defined(__alpha__) +#elif defined(__powerpc__) || defined(__powerpc64__) || defined(__alpha__) #define NCCS 19 struct termios { tcflag_t c_iflag; /* input mode flags */ @@ -167,7 +167,7 @@ #define VLNEXT 15 #define VEOF 16 #define VEOL 17 -#elif defined(powerpc) || defined(__powerpc64__) +#elif defined(__powerpc__) || defined(__powerpc64__) #define VINTR 0 #define VQUIT 1 #define VERASE 2 diff -uNr dietlibc-0.28/include/time.h dietlibc-0.29/include/time.h --- dietlibc-0.28/include/time.h 2004-06-25 03:02:09.000000000 -0700 +++ dietlibc-0.29/include/time.h 2005-03-15 00:51:22.000000000 -0800 @@ -38,12 +38,12 @@ char *ctime(const time_t *timep) __THROW; -size_t strftime(char *s, size_t max, const char *format, const struct tm *tm) __THROW __attribute__((format(strftime,3,0))); +size_t strftime(char *s, size_t max, const char *format, const struct tm *tm) __THROW __attribute__((__format__(__strftime__,3,0))); time_t time(time_t *t) __THROW; int stime(time_t *t) __THROW; -double difftime(time_t time1, time_t time0) __THROW __attribute__((const)); +double difftime(time_t time1, time_t time0) __THROW __attribute__((__const__)); #define CLOCKS_PER_SEC 1000000l diff -uNr dietlibc-0.28/include/unistd.h dietlibc-0.29/include/unistd.h --- dietlibc-0.28/include/unistd.h 2004-07-02 07:47:06.000000000 -0700 +++ dietlibc-0.29/include/unistd.h 2005-03-15 00:51:22.000000000 -0800 @@ -118,7 +118,7 @@ int isatty(int desc) __THROW; -void _exit(int status) __THROW __attribute__((noreturn)); +void _exit(int status) __THROW __attribute__((__noreturn__)); int daemon(int nochdir,int noclose) __THROW; @@ -142,7 +142,6 @@ #define seteuid(euid) setreuid(-1,euid) #define setegid(egid) setregid(-1,egid) -int rename(const char *oldpath, const char *newpath) __THROW; int truncate(const char *path, off_t length) __THROW; int ftruncate(int fd, off_t length) __THROW; #ifndef __NO_STAT64 @@ -243,6 +242,7 @@ extern char **__environ; +#ifndef __NO_STAT64 #if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64 #define open open64 #define creat creat64 @@ -250,6 +250,7 @@ #define ftruncate ftruncate64 #define getdents getdents64 #endif +#endif #ifdef _LINUX_SOURCE int pivot_root(const char *new_root, const char *put_old) __THROW; diff -uNr dietlibc-0.28/include/write12.h dietlibc-0.29/include/write12.h --- dietlibc-0.28/include/write12.h 2003-08-19 09:58:18.000000000 -0700 +++ dietlibc-0.29/include/write12.h 2005-03-15 00:51:22.000000000 -0800 @@ -2,7 +2,7 @@ __BEGIN_DECLS -int __write1 ( const char* s ) __attribute__ (( regparm(1) )); -int __write2 ( const char* s ) __attribute__ (( regparm(1) )); +int __write1 ( const char* s ) __attribute__ (( __regparm__(1) )); +int __write2 ( const char* s ) __attribute__ (( __regparm__(1) )); __END_DECLS diff -uNr dietlibc-0.28/lib/CVS/Entries dietlibc-0.29/lib/CVS/Entries --- dietlibc-0.28/lib/CVS/Entries 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/lib/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,221 +0,0 @@ -/__dtostr.c/1.21/Fri Dec 5 18:52:26 2003// -/__finite.c/1.1/Mon Mar 24 02:04:46 2003// -/__fstat64.c/1.4/Thu May 31 16:12:27 2001// -/__ftruncate64.c/1.2/Mon Oct 21 13:02:06 2002// -/__getcwd.c/1.2/Tue Aug 14 16:56:49 2001// -/__isinf.c/1.3/Sun Sep 14 23:29:03 2003// -/__isnan.c/1.5/Sun Sep 14 23:29:03 2003// -/__lltostr.c/1.3/Tue Aug 14 16:56:49 2001// -/__lstat64.c/1.4/Thu May 31 16:12:27 2001// -/__ltostr.c/1.3/Tue Aug 14 16:56:49 2001// -/__nice.c/1.2/Fri Jan 21 18:25:10 2005// -/__ptrace.c/1.2/Tue Mar 2 21:24:33 2004// -/__sendfile64.c/1.1/Mon May 19 11:35:46 2003// -/__stat64.c/1.4/Thu May 31 16:12:27 2001// -/__stat64_cvt.c/1.4/Wed Mar 10 15:24:50 2004// -/__stime.c/1.2/Mon Nov 18 01:16:51 2002// -/__sysctl.c/1.1/Tue Aug 19 15:28:11 2003// -/__truncate64.c/1.4/Mon Oct 21 13:02:06 2002// -/__v_printf.c/1.27/Fri Dec 5 18:52:27 2003// -/__v_scanf.c/1.19/Wed Oct 15 15:32:09 2003// -/_brk.c/1.5/Sat Feb 23 21:08:27 2002// -/abort.c/1.7/Sat Aug 23 16:12:47 2003// -/abs.c/1.3/Mon Jul 23 17:25:49 2001// -/accept.c/1.6/Tue Aug 27 13:55:31 2002// -/adjtime.c/1.2/Sun Nov 4 19:03:31 2001// -/alloc.c/1.39/Mon Jul 12 12:04:43 2004// -/assert_fail.c/1.5/Thu Oct 17 19:51:17 2002// -/atexit.c/1.13/Mon Jun 23 10:48:08 2003// -/atof.c/1.2/Thu Feb 15 22:20:06 2001// -/atoi.c/1.6/Thu May 9 01:01:16 2002// -/atol.c/1.6/Sat Feb 23 22:18:41 2002// -/atoll.c/1.4/Sat Feb 23 22:18:42 2002// -/bind.c/1.5/Tue Aug 27 13:55:31 2002// -/binshstr.c/1.1/Mon Sep 10 13:17:48 2001// -/bsearch.c/1.8/Tue Aug 19 17:29:38 2003// -/cfgetospeed.c/1.4/Tue Jan 29 01:40:15 2002// -/cfmakeraw.c/1.2/Tue Aug 14 16:56:50 2001// -/cfsetispeed.c/1.3/Tue Aug 14 16:56:50 2001// -/cfsetospeed.c/1.3/Tue Aug 14 16:56:50 2001// -/closedir.c/1.4/Wed Jul 3 20:33:37 2002// -/connect.c/1.7/Tue Aug 27 13:55:31 2002// -/creat.c/1.3/Sat Feb 23 22:18:42 2002// -/creat64.c/1.2/Fri Feb 2 21:42:24 2001// -/errlistu.c/1.1/Thu Aug 16 17:12:25 2001// -/errno_location.c/1.3/Thu Jun 7 12:29:35 2001// -/exec_lib.c/1.3/Tue Aug 14 16:56:50 2001// -/exec_lib.h/1.1/Mon Mar 19 17:37:53 2001// -/execl.c/1.4/Wed Oct 29 16:49:57 2003// -/execle.c/1.1/Thu Oct 4 14:50:49 2001// -/execlp.c/1.5/Wed Oct 29 16:47:34 2003// -/execv.c/1.4/Thu May 31 17:03:41 2001// -/execvp.c/1.9/Sun Mar 7 21:44:51 2004// -/ffs.c/1.1/Tue Aug 19 23:47:56 2003// -/ftw.c/1.7/Fri Sep 6 19:20:43 2002// -/ftw64.c/1.1/Thu Sep 23 21:25:58 2004// -/getdomainname.c/1.3/Tue Aug 14 16:56:50 2001// -/getenv.c/1.2/Tue Aug 14 16:56:50 2001// -/gethostname.c/1.3/Tue Aug 14 16:56:50 2001// -/getopt.c/1.15/Mon Jun 23 10:48:08 2003// -/getpeername.c/1.5/Tue Aug 27 13:55:31 2002// -/getpgrp.c/1.1/Tue Feb 27 14:51:54 2001// -/getsockname.c/1.5/Tue Aug 27 13:55:31 2002// -/getsockopt.c/1.5/Tue Aug 27 13:55:31 2002// -/htonl.c/1.5/Tue Aug 19 16:32:23 2003// -/htons.c/1.7/Tue Aug 19 16:32:23 2003// -/if_indextoname.c/1.2/Fri Jun 15 16:14:50 2001// -/if_nameindex.c/1.1/Sun Nov 4 23:37:25 2001// -/if_nametoindex.c/1.2/Fri Jun 15 16:14:50 2001// -/ipv6constants.c/1.1/Mon Sep 3 13:09:30 2001// -/isalnum.c/1.5/Tue Aug 14 16:56:50 2001// -/isalpha.c/1.6/Tue Aug 14 16:56:50 2001// -/isascii.c/1.3/Tue Jul 17 17:58:25 2001// -/isatty.c/1.5/Tue Aug 14 16:56:50 2001// -/isblank.c/1.2/Tue Jul 17 17:58:25 2001// -/iscntrl.c/1.4/Tue Aug 14 16:56:50 2001// -/isdigit.c/1.4/Tue Aug 14 16:56:50 2001// -/isgraph.c/1.5/Tue Aug 14 16:56:50 2001// -/islower.c/1.4/Tue Aug 14 16:56:50 2001// -/isprint.c/1.4/Tue Aug 14 16:56:50 2001// -/ispunct.c/1.4/Tue Aug 14 16:56:50 2001// -/isspace.c/1.5/Tue Aug 14 16:56:50 2001// -/isupper.c/1.4/Tue Aug 14 16:56:50 2001// -/isxdigit.c/1.6/Tue Aug 14 16:56:50 2001// -/labs.c/1.3/Mon Jul 23 17:25:49 2001// -/listen.c/1.5/Tue Aug 27 13:55:31 2002// -/llabs.c/1.4/Tue Aug 14 16:56:50 2001// -/lockf.c/1.3/Thu May 31 17:03:41 2001// -/longjmp.c/1.6/Wed Mar 20 16:57:53 2002// -/lseek64.c/1.5/Mon Nov 12 14:47:00 2001// -/memccpy.c/1.2/Tue Aug 14 16:56:50 2001// -/memchr.c/1.5/Fri Mar 26 23:28:13 2004// -/memcmp.c/1.5/Wed Oct 15 15:32:09 2003// -/memcpy.c/1.4/Sun Dec 21 12:06:36 2003// -/memmem.c/1.1/Thu Aug 23 16:57:52 2001// -/memmove.c/1.2/Tue Aug 14 16:56:50 2001// -/memrchr.c/1.2/Wed Jun 5 00:42:40 2002// -/memset.c/1.2/Sat Feb 23 22:18:42 2002// -/mkfifo.c/1.4/Tue Aug 14 16:56:50 2001// -/mmap64.c/1.2/Mon Dec 13 10:21:31 2004// -/msgctl.c/1.3/Sat Jun 16 17:48:55 2001// -/msgget.c/1.3/Sat Jun 16 17:48:55 2001// -/msgrcv.c/1.3/Sat Jun 16 17:48:55 2001// -/msgsnd.c/1.4/Sat Jun 16 17:48:56 2001// -/open64.c/1.9/Tue Aug 14 16:56:50 2001// -/opendir.c/1.6/Wed Jul 3 20:33:38 2002// -/perror.c/1.14/Thu May 9 23:20:29 2002// -/pread.c/1.5/Mon May 10 21:05:07 2004// -/pselect.c/1.1/Mon May 17 17:44:56 2004// -/putenv.c/1.7/Wed Jul 3 20:33:38 2002// -/pwrite.c/1.4/Mon May 10 21:05:07 2004// -/qsort.c/1.8/Thu Jun 3 11:36:47 2004// -/raise.c/1.3/Sat Jun 16 17:48:56 2001// -/rand.c/1.3/Sun Oct 27 16:51:03 2002// -/rand48.c/1.3/Mon Oct 21 13:11:25 2002// -/rand_r.c/1.1/Sun Oct 27 16:51:03 2002// -/readdir.c/1.4/Wed Jul 3 20:33:38 2002// -/readdir64.c/1.6/Tue Mar 2 21:27:19 2004// -/reboot.c/1.3/Tue Aug 14 16:56:50 2001// -/recv.c/1.6/Tue Aug 27 13:55:31 2002// -/recvfrom.c/1.6/Tue Aug 27 13:55:31 2002// -/recvmsg.c/1.5/Tue Aug 27 13:55:31 2002// -/remove.c/1.5/Tue Aug 14 16:56:50 2001// -/rewind.c/1.1/Tue Jan 9 17:57:42 2001// -/rewinddir.c/1.3/Sat Feb 3 20:41:12 2001// -/sbrk.c/1.4/Sat Jan 12 02:38:32 2002// -/seekdir.c/1.3/Sat Feb 3 20:41:12 2001// -/semctl.c/1.5/Sat Feb 23 22:18:42 2002// -/semget.c/1.3/Fri Jun 15 16:14:50 2001// -/semop.c/1.3/Fri Jun 15 16:14:50 2001// -/send.c/1.6/Tue Aug 27 13:55:31 2002// -/sendmsg.c/1.5/Tue Aug 27 13:55:31 2002// -/sendto.c/1.6/Tue Aug 27 13:55:31 2002// -/setlinebuf.c/1.3/Sat Feb 23 22:18:42 2002// -/setpgrp.c/1.1/Tue Feb 27 14:51:55 2001// -/setsockopt.c/1.5/Tue Aug 27 13:55:31 2002// -/shmat.c/1.6/Fri Jun 15 16:14:50 2001// -/shmctl.c/1.3/Fri Jun 15 16:14:50 2001// -/shmdt.c/1.3/Fri Jun 15 16:14:50 2001// -/shmget.c/1.3/Fri Jun 15 16:14:50 2001// -/shutdown.c/1.5/Tue Aug 27 13:55:31 2002// -/sigaction.c/1.3/Mon Aug 19 17:08:56 2002// -/sigaddset.c/1.5/Tue May 14 07:35:38 2002// -/sigandset.c/1.1/Fri Dec 17 19:14:49 2004// -/sigdelset.c/1.5/Tue May 14 07:35:38 2002// -/sigemptyset.c/1.5/Thu Jul 26 13:14:34 2001// -/sigfillset.c/1.6/Thu Jul 26 13:14:34 2001// -/siginterrupt.c/1.1/Mon Jul 23 18:43:19 2001// -/sigisemptyset.c/1.1/Fri Dec 17 19:14:49 2004// -/sigismember.c/1.3/Tue May 14 07:35:38 2002// -/sigjmp.c/1.4/Wed Mar 20 16:57:53 2002// -/signal.c/1.5/Mon Dec 9 13:33:32 2002// -/sigorset.c/1.1/Fri Dec 17 19:14:49 2004// -/sigpending.c/1.2/Mon Jul 23 19:24:34 2001// -/sigprocmask.c/1.2/Mon Jul 23 19:24:34 2001// -/sigqueueinfo.c/1.2/Mon Jul 23 19:24:34 2001// -/sigsuspend.c/1.3/Tue Aug 14 16:56:50 2001// -/sigtimedwait.c/1.2/Mon Jul 23 19:24:34 2001// -/sigwait.c/1.1/Thu Oct 9 23:57:11 2003// -/sleep.c/1.3/Tue Aug 14 16:56:50 2001// -/snprintf.c/1.2/Tue Aug 14 16:56:50 2001// -/socket.c/1.5/Tue Aug 27 13:55:31 2002// -/socketpair.c/1.6/Tue Aug 27 13:55:31 2002// -/sprintf.c/1.5/Tue Aug 14 16:56:50 2001// -/sscanf.c/1.2/Tue Aug 14 16:56:50 2001// -/stack_smash_handler.c/1.1/Sat Sep 11 12:38:21 2004// -/stackgap.c/1.1/Sat Sep 11 12:38:21 2004// -/strcasecmp.c/1.5/Tue Aug 19 19:34:18 2003// -/strcat.c/1.1/Tue Jan 9 17:57:42 2001// -/strchr.c/1.4/Tue Aug 19 19:34:18 2003// -/strcmp.c/1.5/Sun Dec 21 12:06:36 2003// -/strcpy.c/1.4/Sun Dec 21 12:06:36 2003// -/strcspn.c/1.1/Tue Jan 9 17:57:43 2001// -/strdup.c/1.1/Tue Jan 9 17:57:43 2001// -/strerror.c/1.9/Mon Jan 13 15:16:28 2003// -/strlcat.c/1.1/Tue Jan 9 17:57:43 2001// -/strlcpy.3/1.1/Tue Jan 9 17:57:43 2001// -/strlcpy.c/1.1/Tue Jan 9 17:57:43 2001// -/strlen.c/1.3/Tue Aug 19 19:34:18 2003// -/strncasecmp.c/1.6/Tue Aug 19 19:34:18 2003// -/strncat.c/1.10/Sun Dec 12 17:08:36 2004// -/strncmp.c/1.4/Wed Oct 15 15:32:09 2003// -/strncpy.c/1.8/Sat Sep 11 12:37:57 2004// -/strpbrk.c/1.1/Tue Jan 9 17:57:43 2001// -/strrchr.c/1.3/Tue Aug 19 19:34:18 2003// -/strsep.c/1.4/Mon Jul 8 20:55:32 2002// -/strspn.c/1.1/Tue Jan 9 17:57:43 2001// -/strstr.c/1.5/Tue Aug 19 19:34:18 2003// -/strtod.c/1.6/Sat Feb 23 23:08:20 2002// -/strtof.c/1.1/Fri Sep 13 12:08:45 2002// -/strtok.c/1.4/Tue Aug 14 16:56:51 2001// -/strtok_r.c/1.2/Sat Oct 11 09:36:49 2003// -/strtol.c/1.7/Tue Aug 24 10:10:48 2004// -/strtold.c/1.1/Fri Sep 13 12:08:45 2002// -/strtoll.c/1.6/Mon Jul 5 21:55:44 2004// -/strtoul.c/1.19/Tue Jan 27 14:10:53 2004// -/strtoull.c/1.11/Mon Jul 5 21:55:44 2004// -/strxfrm.c/1.1/Tue May 7 10:03:07 2002// -/swab.c/1.1/Fri Sep 5 16:33:25 2003// -/sys_siglist.c/1.3/Sat Oct 18 15:53:35 2003// -/tcdrain.c/1.2/Tue Aug 14 16:56:51 2001// -/tcflow.c/1.2/Wed Aug 15 16:39:30 2001// -/tcflush.c/1.2/Tue Aug 14 16:56:51 2001// -/tcgetattr.c/1.1/Tue Jan 9 17:57:43 2001// -/tcgetpgrp.c/1.4/Thu May 9 01:01:16 2002// -/tcgetsid.c/1.1/Tue Aug 3 22:28:46 2004// -/tcsendbreak.c/1.1/Mon Aug 6 12:18:27 2001// -/tcsetattr.c/1.8/Fri Jan 11 18:06:53 2002// -/tcsetpgrp.c/1.3/Thu May 9 01:01:16 2002// -/telldir.c/1.3/Sat Feb 3 20:41:12 2001// -/tolower.c/1.2/Fri Jul 27 14:39:18 2001// -/toupper.c/1.2/Fri Jul 27 14:39:18 2001// -/ttyname.c/1.7/Sat Feb 23 22:18:42 2002// -/usleep.c/1.5/Sat Feb 23 20:33:51 2002// -/vfork.c/1.5/Fri May 17 12:35:34 2002// -/vsnprintf.c/1.28/Fri Mar 26 14:46:48 2004// -/vsprintf.c/1.6/Fri Dec 5 14:10:10 2003// -/vsscanf.c/1.13/Tue Aug 14 16:56:51 2001// -/wait.c/1.1/Tue Jan 9 17:57:43 2001// -/wait3.c/1.1/Tue Jan 9 17:57:43 2001// -/write12.c/1.4/Mon Jun 7 17:05:03 2004// -D diff -uNr dietlibc-0.28/lib/CVS/Repository dietlibc-0.29/lib/CVS/Repository --- dietlibc-0.28/lib/CVS/Repository 2005-01-31 09:53:08.000000000 -0800 +++ dietlibc-0.29/lib/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/lib diff -uNr dietlibc-0.28/lib/CVS/Root dietlibc-0.29/lib/CVS/Root --- dietlibc-0.28/lib/CVS/Root 2005-01-31 09:53:08.000000000 -0800 +++ dietlibc-0.29/lib/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/lib/__sendfile64.c dietlibc-0.29/lib/__sendfile64.c --- dietlibc-0.28/lib/__sendfile64.c 2003-05-19 04:35:46.000000000 -0700 +++ dietlibc-0.29/lib/__sendfile64.c 2005-03-15 00:51:22.000000000 -0800 @@ -9,7 +9,7 @@ ssize_t sendfile64 (int out_fd, int in_fd, loff_t* offset, size_t count) { static int havesendfile64=1; - ssize_t r; + ssize_t r = -1; if (havesendfile64) { r=__dietlibc_sendfile64(out_fd,in_fd,offset,count); if (r==-1 && errno==ENOSYS) diff -uNr dietlibc-0.28/lib/__v_printf.c dietlibc-0.29/lib/__v_printf.c --- dietlibc-0.28/lib/__v_printf.c 2003-12-05 10:52:27.000000000 -0800 +++ dietlibc-0.29/lib/__v_printf.c 2005-04-10 06:59:32.000000000 -0700 @@ -7,7 +7,7 @@ #include "dietstdio.h" #include "dietwarning.h" -static inline unsigned int skip_to(const unsigned char *format) { +static inline unsigned int skip_to(const char *format) { unsigned int nr; for (nr=0; format[nr] && (format[nr]!='%'); ++nr); return nr; @@ -27,7 +27,7 @@ return nr; } -int __v_printf(struct arg_printf* fn, const unsigned char *format, va_list arg_ptr) +int __v_printf(struct arg_printf* fn, const char *format, va_list arg_ptr) { int len=0; #ifdef WANT_ERROR_PRINTF diff -uNr dietlibc-0.28/lib/__v_scanf.c dietlibc-0.29/lib/__v_scanf.c --- dietlibc-0.28/lib/__v_scanf.c 2003-10-15 08:32:09.000000000 -0700 +++ dietlibc-0.29/lib/__v_scanf.c 2005-04-10 06:59:32.000000000 -0700 @@ -12,7 +12,7 @@ #define A_GETC(fn) (++consumed,(fn)->getch((fn)->data)) #define A_PUTC(c,fn) (--consumed,(fn)->putch((c),(fn)->data)) -int __v_scanf(struct arg_scanf* fn, const unsigned char *format, va_list arg_ptr) +int __v_scanf(struct arg_scanf* fn, const char *format, va_list arg_ptr) { unsigned int ch; /* format act. char */ int n=0; diff -uNr dietlibc-0.28/lib/abs.c dietlibc-0.29/lib/abs.c --- dietlibc-0.28/lib/abs.c 2001-07-23 10:25:49.000000000 -0700 +++ dietlibc-0.29/lib/abs.c 2005-03-15 00:51:22.000000000 -0800 @@ -1,4 +1,5 @@ #include +#include int abs(int i) { return i>=0?i:-i; } #if __WORDSIZE == 32 diff -uNr dietlibc-0.28/lib/accept.c dietlibc-0.29/lib/accept.c --- dietlibc-0.28/lib/accept.c 2002-08-27 06:55:31.000000000 -0700 +++ dietlibc-0.29/lib/accept.c 2005-05-20 07:46:32.000000000 -0700 @@ -5,7 +5,7 @@ int __libc_accept(int a, void * addr, void * addr2); int __libc_accept(int a, void * addr, void * addr2) { - unsigned long args[] = { a, (long) addr, (long) addr2 }; + long args[] = { a, (long) addr, (long) addr2 }; return socketcall(SYS_ACCEPT, args); } diff -uNr dietlibc-0.28/lib/alloc.c dietlibc-0.29/lib/alloc.c --- dietlibc-0.28/lib/alloc.c 2004-07-12 05:04:43.000000000 -0700 +++ dietlibc-0.29/lib/alloc.c 2005-03-15 00:51:22.000000000 -0800 @@ -172,9 +172,9 @@ } void* __libc_malloc(size_t size) __attribute__((alias("_alloc_libc_malloc"))); void* malloc(size_t size) __attribute__((weak,alias("_alloc_libc_malloc"))); -void* calloc(size_t nmemb, size_t _size) __attribute__((weak)); -void* calloc(size_t nmemb, size_t _size) { +void* __libc_calloc(size_t nmemb, size_t _size); +void* __libc_calloc(size_t nmemb, size_t _size) { register size_t size=_size*nmemb; if (nmemb && size/nmemb!=_size) { (*__errno_location())=ENOMEM; @@ -182,6 +182,7 @@ } return malloc(size); } +void* calloc(size_t nmemb, size_t _size) __attribute__((weak,alias("__libc_calloc"))); void* __libc_realloc(void* ptr, size_t _size); void* __libc_realloc(void* ptr, size_t _size) { diff -uNr dietlibc-0.28/lib/atexit.c dietlibc-0.29/lib/atexit.c --- dietlibc-0.28/lib/atexit.c 2003-06-23 03:48:08.000000000 -0700 +++ dietlibc-0.29/lib/atexit.c 2005-03-15 00:51:22.000000000 -0800 @@ -1,4 +1,5 @@ #include +#include typedef void (*function)(void); @@ -16,7 +17,6 @@ return -1; } -extern void _exit(int code) __attribute__((noreturn)); extern void __thread_doexit(int doexit); void __libc_exit(int code); diff -uNr dietlibc-0.28/lib/bind.c dietlibc-0.29/lib/bind.c --- dietlibc-0.28/lib/bind.c 2002-08-27 06:55:31.000000000 -0700 +++ dietlibc-0.29/lib/bind.c 2005-05-20 07:46:32.000000000 -0700 @@ -4,7 +4,7 @@ int __libc_bind(int a, void * b, int c); int __libc_bind(int a, void * b, int c) { - unsigned long args[] = { a, (long) b, c }; + long args[] = { a, (long) b, c }; return socketcall(SYS_BIND, args); } diff -uNr dietlibc-0.28/lib/connect.c dietlibc-0.29/lib/connect.c --- dietlibc-0.28/lib/connect.c 2002-08-27 06:55:31.000000000 -0700 +++ dietlibc-0.29/lib/connect.c 2005-05-20 07:46:32.000000000 -0700 @@ -4,7 +4,7 @@ int __libc_connect(int a, void * b, int c); int __libc_connect(int a, void * b, int c) { - unsigned long args[] = { a, (long) b, c }; + long args[] = { a, (long) b, c }; return socketcall(SYS_CONNECT, args); } diff -uNr dietlibc-0.28/lib/ftw.c dietlibc-0.29/lib/ftw.c --- dietlibc-0.28/lib/ftw.c 2002-09-06 12:20:43.000000000 -0700 +++ dietlibc-0.29/lib/ftw.c 2005-03-15 00:51:22.000000000 -0800 @@ -15,7 +15,7 @@ struct stat sb; int r; unsigned int oldlen=0; - char* filename; /* the warning gcc issues here is bogus */ + char* filename = NULL; if(chdir(dir))return-1; cd=alloca(PATH_MAX+1); if(!getcwd(cd,PATH_MAX))return-1; diff -uNr dietlibc-0.28/lib/ftw64.c dietlibc-0.29/lib/ftw64.c --- dietlibc-0.28/lib/ftw64.c 2004-09-23 14:25:58.000000000 -0700 +++ dietlibc-0.29/lib/ftw64.c 2005-03-15 00:51:22.000000000 -0800 @@ -8,6 +8,10 @@ #include #include "dietdirent.h" +#ifdef __NO_STAT64 +int ftw64(const char*dir,int(*f)(const char*file,const struct stat* sb,int flag),int dpth) __THROW; +#endif + int ftw64(const char*dir,int(*f)(const char*file,const struct stat* sb,int flag),int dpth){ char* cd; size_t cdl; @@ -16,7 +20,7 @@ struct stat sb; int r; unsigned int oldlen=0; - char* filename; /* the warning gcc issues here is bogus */ + char* filename = NULL; if(chdir(dir))return-1; cd=alloca(PATH_MAX+1); if(!getcwd(cd,PATH_MAX))return-1; diff -uNr dietlibc-0.28/lib/getpeername.c dietlibc-0.29/lib/getpeername.c --- dietlibc-0.28/lib/getpeername.c 2002-08-27 06:55:31.000000000 -0700 +++ dietlibc-0.29/lib/getpeername.c 2005-05-20 07:46:32.000000000 -0700 @@ -5,7 +5,7 @@ int __libc_getpeername(int a, void * b, int *c); int __libc_getpeername(int a, void * b, int *c) { - unsigned long args[] = { a, (long) b, (long) c }; + long args[] = { a, (long) b, (long) c }; return socketcall(SYS_GETPEERNAME, args); } diff -uNr dietlibc-0.28/lib/getpgrp.c dietlibc-0.29/lib/getpgrp.c --- dietlibc-0.28/lib/getpgrp.c 2001-02-27 06:51:54.000000000 -0800 +++ dietlibc-0.29/lib/getpgrp.c 2005-03-15 00:51:22.000000000 -0800 @@ -1,6 +1,6 @@ #include -int getpgrp() +pid_t getpgrp() { return getpgid(0); } diff -uNr dietlibc-0.28/lib/getsockname.c dietlibc-0.29/lib/getsockname.c --- dietlibc-0.28/lib/getsockname.c 2002-08-27 06:55:31.000000000 -0700 +++ dietlibc-0.29/lib/getsockname.c 2005-05-20 07:46:32.000000000 -0700 @@ -5,7 +5,7 @@ int __libc_getsockname(int a, void * b, int c); int __libc_getsockname(int a, void * b, int c) { - unsigned long args[] = { a, (long) b, c }; + long args[] = { a, (long) b, c }; return socketcall(SYS_GETSOCKNAME, args); } diff -uNr dietlibc-0.28/lib/getsockopt.c dietlibc-0.29/lib/getsockopt.c --- dietlibc-0.28/lib/getsockopt.c 2002-08-27 06:55:31.000000000 -0700 +++ dietlibc-0.29/lib/getsockopt.c 2005-05-20 07:46:32.000000000 -0700 @@ -5,7 +5,7 @@ int __libc_getsockopt(int a, int b, int c, void *d, int e); int __libc_getsockopt(int a, int b, int c, void *d, int e) { - unsigned long args[] = { a, b, c, (long)d, e }; + long args[] = { a, b, c, (long)d, e }; return socketcall(SYS_GETSOCKOPT, args); } diff -uNr dietlibc-0.28/lib/labs.c dietlibc-0.29/lib/labs.c --- dietlibc-0.28/lib/labs.c 2001-07-23 10:25:49.000000000 -0700 +++ dietlibc-0.29/lib/labs.c 2005-03-15 00:51:22.000000000 -0800 @@ -1,4 +1,5 @@ #include +#include #if __WORDSIZE == 64 long int labs(long int i) { return i>=0?i:-i; } diff -uNr dietlibc-0.28/lib/listen.c dietlibc-0.29/lib/listen.c --- dietlibc-0.28/lib/listen.c 2002-08-27 06:55:31.000000000 -0700 +++ dietlibc-0.29/lib/listen.c 2005-05-20 07:46:32.000000000 -0700 @@ -5,7 +5,7 @@ int __libc_listen(int a, int b); int __libc_listen(int a, int b) { - unsigned long args[] = { a, b, 0 }; + long args[] = { a, b, 0 }; return socketcall(SYS_LISTEN, args); } diff -uNr dietlibc-0.28/lib/memcmp.c dietlibc-0.29/lib/memcmp.c --- dietlibc-0.28/lib/memcmp.c 2003-10-15 08:32:09.000000000 -0700 +++ dietlibc-0.29/lib/memcmp.c 2005-03-15 00:51:22.000000000 -0800 @@ -1,4 +1,5 @@ #include +#include /* gcc is broken and has a non-SUSv2 compliant internal prototype. * This causes it to warn about a type mismatch here. Ignore it. */ diff -uNr dietlibc-0.28/lib/memset.c dietlibc-0.29/lib/memset.c --- dietlibc-0.28/lib/memset.c 2002-02-23 14:18:42.000000000 -0800 +++ dietlibc-0.29/lib/memset.c 2005-03-15 00:51:22.000000000 -0800 @@ -1,4 +1,5 @@ #include +#include /* gcc is broken and has a non-SUSv2 compliant internal prototype. * This causes it to warn about a type mismatch here. Ignore it. */ diff -uNr dietlibc-0.28/lib/perror.c dietlibc-0.29/lib/perror.c --- dietlibc-0.28/lib/perror.c 2002-05-09 16:20:29.000000000 -0700 +++ dietlibc-0.29/lib/perror.c 2005-03-15 00:51:22.000000000 -0800 @@ -4,6 +4,8 @@ #include #define _BSD_SOURCE +#undef __attribute_dontuse__ +#define __attribute_dontuse__ #include extern const char __sys_err_unknown []; diff -uNr dietlibc-0.28/lib/recv.c dietlibc-0.29/lib/recv.c --- dietlibc-0.28/lib/recv.c 2002-08-27 06:55:31.000000000 -0700 +++ dietlibc-0.29/lib/recv.c 2005-05-20 07:46:32.000000000 -0700 @@ -5,7 +5,7 @@ int __libc_recv(int a, const void * b, size_t c, int flags); int __libc_recv(int a, const void * b, size_t c, int flags) { - unsigned long args[] = { a, (long) b, c, flags }; + long args[] = { a, (long) b, c, flags }; return socketcall(SYS_RECV, args); } diff -uNr dietlibc-0.28/lib/recvfrom.c dietlibc-0.29/lib/recvfrom.c --- dietlibc-0.28/lib/recvfrom.c 2002-08-27 06:55:31.000000000 -0700 +++ dietlibc-0.29/lib/recvfrom.c 2005-05-20 07:46:32.000000000 -0700 @@ -5,7 +5,7 @@ int __libc_recvfrom(int a, const void * b, size_t c, int flags, void *to, void *tolen); int __libc_recvfrom(int a, const void * b, size_t c, int flags, void *to, void *tolen) { - unsigned long args[] = { a, (long) b, c, flags, (long) to, (long) tolen }; + long args[] = { a, (long) b, c, flags, (long) to, (long) tolen }; return socketcall(SYS_RECVFROM, args); } diff -uNr dietlibc-0.28/lib/recvmsg.c dietlibc-0.29/lib/recvmsg.c --- dietlibc-0.28/lib/recvmsg.c 2002-08-27 06:55:31.000000000 -0700 +++ dietlibc-0.29/lib/recvmsg.c 2005-05-20 07:46:32.000000000 -0700 @@ -5,7 +5,7 @@ int __libc_recvmsg(int a, struct msghdr* msg, int flags); int __libc_recvmsg(int a, struct msghdr* msg, int flags) { - unsigned long args[] = { a, (long) msg, flags }; + long args[] = { a, (long) msg, flags }; return socketcall(SYS_RECVMSG, args); } diff -uNr dietlibc-0.28/lib/send.c dietlibc-0.29/lib/send.c --- dietlibc-0.28/lib/send.c 2002-08-27 06:55:31.000000000 -0700 +++ dietlibc-0.29/lib/send.c 2005-05-20 07:46:32.000000000 -0700 @@ -5,7 +5,7 @@ int __libc_send(int a, const void * b, size_t c, int flags); int __libc_send(int a, const void * b, size_t c, int flags) { - unsigned long args[] = { a, (long) b, c, flags }; + long args[] = { a, (long) b, c, flags }; return socketcall(SYS_SEND, args); } diff -uNr dietlibc-0.28/lib/sendmsg.c dietlibc-0.29/lib/sendmsg.c --- dietlibc-0.28/lib/sendmsg.c 2002-08-27 06:55:31.000000000 -0700 +++ dietlibc-0.29/lib/sendmsg.c 2005-05-20 07:46:32.000000000 -0700 @@ -5,7 +5,7 @@ int __libc_sendmsg(int a, const struct msghdr* msg, int flags); int __libc_sendmsg(int a, const struct msghdr* msg, int flags) { - unsigned long args[] = { a, (long) msg, flags }; + long args[] = { a, (long) msg, flags }; return socketcall(SYS_SENDMSG, args); } diff -uNr dietlibc-0.28/lib/sendto.c dietlibc-0.29/lib/sendto.c --- dietlibc-0.28/lib/sendto.c 2002-08-27 06:55:31.000000000 -0700 +++ dietlibc-0.29/lib/sendto.c 2005-05-20 07:46:32.000000000 -0700 @@ -5,7 +5,7 @@ int __libc_sendto(int a, const void * b, size_t c, int flags, void *to, int tolen); int __libc_sendto(int a, const void * b, size_t c, int flags, void *to, int tolen) { - unsigned long args[] = { a, (long) b, c, flags, (long) to, tolen }; + long args[] = { a, (long) b, c, flags, (long) to, tolen }; return socketcall(SYS_SENDTO, args); } diff -uNr dietlibc-0.28/lib/setsockopt.c dietlibc-0.29/lib/setsockopt.c --- dietlibc-0.28/lib/setsockopt.c 2002-08-27 06:55:31.000000000 -0700 +++ dietlibc-0.29/lib/setsockopt.c 2005-05-20 07:46:32.000000000 -0700 @@ -5,7 +5,7 @@ int __libc_setsockopt(int a, int b, int c, void *d, void *e); int __libc_setsockopt(int a, int b, int c, void *d, void *e) { - unsigned long args[] = { a, b, c, (long)d, (long) e }; + long args[] = { a, b, c, (long)d, (long) e }; return socketcall(SYS_SETSOCKOPT, args); } diff -uNr dietlibc-0.28/lib/shutdown.c dietlibc-0.29/lib/shutdown.c --- dietlibc-0.28/lib/shutdown.c 2002-08-27 06:55:31.000000000 -0700 +++ dietlibc-0.29/lib/shutdown.c 2005-05-20 07:46:32.000000000 -0700 @@ -5,7 +5,7 @@ int __libc_shutdown(int s, int how); int __libc_shutdown(int s, int how) { - unsigned long args[] = { s, (long) how, 0 }; + long args[] = { s, (long) how, 0 }; return socketcall(SYS_SHUTDOWN, args); } diff -uNr dietlibc-0.28/lib/socket.c dietlibc-0.29/lib/socket.c --- dietlibc-0.28/lib/socket.c 2002-08-27 06:55:31.000000000 -0700 +++ dietlibc-0.29/lib/socket.c 2005-05-20 07:46:32.000000000 -0700 @@ -4,7 +4,7 @@ int __libc_socket(int a, int b, int c); int __libc_socket(int a, int b, int c) { - unsigned long args[] = { a, b, c }; + long args[] = { a, b, c }; return socketcall(SYS_SOCKET, args); } diff -uNr dietlibc-0.28/lib/socketpair.c dietlibc-0.29/lib/socketpair.c --- dietlibc-0.28/lib/socketpair.c 2002-08-27 06:55:31.000000000 -0700 +++ dietlibc-0.29/lib/socketpair.c 2005-05-20 07:46:32.000000000 -0700 @@ -4,7 +4,7 @@ int __libc_socketpair(int a, int type, int protocol, int sv[2]); int __libc_socketpair(int a, int type, int protocol, int sv[2]) { - unsigned long args[] = { a, type, protocol, (long)sv }; + long args[] = { a, type, protocol, (long)sv }; return socketcall(SYS_SOCKETPAIR, args); } diff -uNr dietlibc-0.28/lib/stack_smash_handler.c dietlibc-0.29/lib/stack_smash_handler.c --- dietlibc-0.28/lib/stack_smash_handler.c 2004-09-11 05:38:21.000000000 -0700 +++ dietlibc-0.29/lib/stack_smash_handler.c 2005-03-15 00:51:22.000000000 -0800 @@ -1,9 +1,11 @@ #include +#include +void __stack_smash_handler(char* func,unsigned int damaged); void __stack_smash_handler(char* func,unsigned int damaged) { char buf[sizeof(char*)*2+1]; int i; - for (i=0; i #define _BSD_SOURCE +#undef __attribute_dontuse__ +#define __attribute_dontuse__ #include extern const char __sys_err_unknown[]; diff -uNr dietlibc-0.28/lib/strncmp.c dietlibc-0.29/lib/strncmp.c --- dietlibc-0.28/lib/strncmp.c 2003-10-15 08:32:09.000000000 -0700 +++ dietlibc-0.29/lib/strncmp.c 2005-04-10 06:59:32.000000000 -0700 @@ -4,8 +4,8 @@ /* gcc is broken and has a non-SUSv2 compliant internal prototype. * This causes it to warn about a type mismatch here. Ignore it. */ int strncmp(const char *s1, const char *s2, size_t n) { - register const unsigned char* a=s1; - register const unsigned char* b=s2; + register const unsigned char* a=(const unsigned char*)s1; + register const unsigned char* b=(const unsigned char*)s2; register const unsigned char* fini=a+n; while (a #include -int tcgetpgrp(int fildes) +pid_t tcgetpgrp(int fildes) { - int foo; + int32_t foo = -1; if (ioctl(fildes, TIOCGPGRP, &foo)==-1) return -1; else diff -uNr dietlibc-0.28/lib/vsnprintf.c dietlibc-0.29/lib/vsnprintf.c --- dietlibc-0.28/lib/vsnprintf.c 2004-03-26 06:46:48.000000000 -0800 +++ dietlibc-0.29/lib/vsnprintf.c 2005-04-10 06:59:32.000000000 -0700 @@ -6,7 +6,7 @@ #include "dietstdio.h" struct str_data { - unsigned char* str; + char* str; size_t len; size_t size; }; @@ -26,7 +26,7 @@ } int vsnprintf(char* str, size_t size, const char *format, va_list arg_ptr) { - long n; + int n; struct str_data sd = { str, 0, size?size-1:0 }; struct arg_printf ap = { &sd, (int(*)(void*,size_t,void*)) swrite }; n=__v_printf(&ap,format,arg_ptr); diff -uNr dietlibc-0.28/lib/wait3.c dietlibc-0.29/lib/wait3.c --- dietlibc-0.28/lib/wait3.c 2001-01-09 09:57:43.000000000 -0800 +++ dietlibc-0.29/lib/wait3.c 2005-03-15 00:51:22.000000000 -0800 @@ -1,5 +1,5 @@ #include -int wait3(int* status,int opts,struct rusage* rusage) { +pid_t wait3(int* status,int opts,struct rusage* rusage) { return wait4(-1,status,opts,rusage); } diff -uNr dietlibc-0.28/libcompat/CVS/Entries dietlibc-0.29/libcompat/CVS/Entries --- dietlibc-0.28/libcompat/CVS/Entries 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/libcompat/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,22 +0,0 @@ -/ctermid.c/1.1/Sat Mar 15 02:36:42 2003// -/cuserid.c/1.2/Sat Mar 15 02:36:42 2003// -/daemon.c/1.1/Thu Feb 28 16:13:20 2002// -/err.c/1.1/Fri Jun 13 18:41:41 2003// -/errx.c/1.1/Fri Jun 13 18:41:41 2003// -/ffsl.c/1.2/Sat Aug 23 16:25:06 2003// -/ffsll.c/1.2/Sat Aug 23 16:25:06 2003// -/ftok.c/1.1/Sat Mar 15 02:36:42 2003// -/getdelim.c/1.2/Sat Aug 23 16:55:05 2003// -/getline.c/1.2/Sat Aug 23 16:50:54 2003// -/rcmd.c/1.1/Thu Nov 20 23:48:47 2003// -/re_bsd.c/1.2/Thu Apr 4 20:27:25 2002// -/stpcpy.c/1.1/Fri May 3 21:22:06 2002// -/syscall.S/1.5/Wed Dec 17 01:08:56 2003// -/utimes.c/1.2/Tue Aug 19 19:34:18 2003// -/verr.c/1.1/Fri Jun 13 18:41:41 2003// -/verrx.c/1.1/Fri Jun 13 18:41:41 2003// -/vwarn.c/1.2/Thu Jun 19 10:40:48 2003// -/vwarnx.c/1.1/Fri Jun 13 18:27:07 2003// -/warn.c/1.1/Fri Jun 13 18:41:41 2003// -/warnx.c/1.1/Fri Jun 13 18:27:07 2003// -D diff -uNr dietlibc-0.28/libcompat/CVS/Repository dietlibc-0.29/libcompat/CVS/Repository --- dietlibc-0.28/libcompat/CVS/Repository 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/libcompat/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/libcompat diff -uNr dietlibc-0.28/libcompat/CVS/Root dietlibc-0.29/libcompat/CVS/Root --- dietlibc-0.28/libcompat/CVS/Root 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/libcompat/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/libcompat/err.c dietlibc-0.29/libcompat/err.c --- dietlibc-0.28/libcompat/err.c 2003-06-13 11:41:41.000000000 -0700 +++ dietlibc-0.29/libcompat/err.c 2005-03-15 00:51:22.000000000 -0800 @@ -1,9 +1,11 @@ #define _GNU_SOURCE -#include #include #include #include #include +#undef __deprecated__ +#define __deprecated__ +#include void err(int e,const char* f, ...) { va_list ap; diff -uNr dietlibc-0.28/libcompat/errx.c dietlibc-0.29/libcompat/errx.c --- dietlibc-0.28/libcompat/errx.c 2003-06-13 11:41:41.000000000 -0700 +++ dietlibc-0.29/libcompat/errx.c 2005-03-15 00:51:22.000000000 -0800 @@ -1,9 +1,11 @@ #define _GNU_SOURCE -#include #include #include #include #include +#undef __deprecated__ +#define __deprecated__ +#include void errx(int e,const char* f, ...) { va_list ap; diff -uNr dietlibc-0.28/libcompat/ffsl.c dietlibc-0.29/libcompat/ffsl.c --- dietlibc-0.28/libcompat/ffsl.c 2003-08-23 09:25:06.000000000 -0700 +++ dietlibc-0.29/libcompat/ffsl.c 2005-03-15 00:51:22.000000000 -0800 @@ -5,11 +5,12 @@ int plus=0; /* return index of rightmost bit set */ /* ffs(1) == 1, ffs(2) == 2, ffs(256) == 9, ffs(257)=1 */ - if (sizeof(i)==8) /* fold 64-bit archs */ - if ((i&0xffffffff)==0) { - plus=32; - i>>=32; - } +#if __WORDSIZE == 64 + if ((i&0xffffffff)==0) { + plus=32; + i>>=32; + } +#endif if ((i&0xffff)==0) { plus+=16; i>>=16; diff -uNr dietlibc-0.28/libcompat/rcmd.c dietlibc-0.29/libcompat/rcmd.c --- dietlibc-0.28/libcompat/rcmd.c 2003-11-20 15:48:47.000000000 -0800 +++ dietlibc-0.29/libcompat/rcmd.c 2005-03-15 00:51:22.000000000 -0800 @@ -1,6 +1,8 @@ #include int rcmd(char **ahost, int inport, const char *locuser, + const char *remuser, const char *cmd, int *fd2p); +int rcmd(char **ahost, int inport, const char *locuser, const char *remuser, const char *cmd, int *fd2p) { __write2("for security reasons, rcmd is not supported by the diet libc.\n"); return -1; diff -uNr dietlibc-0.28/libcompat/syscall.S dietlibc-0.29/libcompat/syscall.S --- dietlibc-0.28/libcompat/syscall.S 2003-12-16 17:08:56.000000000 -0800 +++ dietlibc-0.29/libcompat/syscall.S 2005-05-20 07:46:32.000000000 -0700 @@ -2,8 +2,8 @@ #if defined(__i386__) && defined(__DYN_LIB) #include "i386/PIC.h" -#undef WANT_THREADSAFE -#define WANT_THREADSAFE +#undef WANT_THREAD_SAFE +#define WANT_THREAD_SAFE #endif .text @@ -32,7 +32,7 @@ cmpl $-255, %eax jbe .Lret negl %eax -#ifdef WANT_THREADSAFE +#ifdef WANT_THREAD_SAFE movl %eax, %edx #ifdef __DYN_LIB PIC_INIT @@ -77,5 +77,49 @@ cmp.eq p6,p0=-1,r10 (p6) br __error_unified_syscall br.ret.sptk.few rp + +#elif (defined(__x86_64__)) + mov %rdi, %rax + mov %rsi, %rdi + mov %rdx, %rsi + mov %rcx, %rdx + mov %r8, %r10 + mov %r9, %r8 + mov 0x8(%rsp), %r9 + syscall + cmpq $-128, %rax + jbe .Lnoerror + negl %eax + pushq %rax +#ifdef __DYN_LIB + call __errno_location@PLT +#else + call __errno_location +#endif + popq %rcx + movl %ecx,(%rax) + orq $-1, %rax +.Lnoerror: + retq +#elif defined(__sparc__) + mov %o0, %g1 + mov %o1, %o0 + mov %o2, %o1 + mov %o3, %o2 + mov %o4, %o3 + mov %o5, %o4 +#if defined(__arch64__) + ta 0x6d + bcs %xcc, __unified_syscall_error_handler +#else + ta 0x10 + bcs __unified_syscall_error_handler +#endif + nop + retl + nop + +#else + /* arch not implemented yet */ #endif .size syscall, . - syscall diff -uNr dietlibc-0.28/libcompat/verr.c dietlibc-0.29/libcompat/verr.c --- dietlibc-0.28/libcompat/verr.c 2003-06-13 11:41:41.000000000 -0700 +++ dietlibc-0.29/libcompat/verr.c 2005-03-15 00:51:23.000000000 -0800 @@ -1,9 +1,11 @@ #define _GNU_SOURCE -#include #include #include #include #include +#undef __deprecated__ +#define __deprecated__ +#include void verr(int e,const char* f,va_list ap) { vwarn(f,ap); diff -uNr dietlibc-0.28/libcompat/verrx.c dietlibc-0.29/libcompat/verrx.c --- dietlibc-0.28/libcompat/verrx.c 2003-06-13 11:41:41.000000000 -0700 +++ dietlibc-0.29/libcompat/verrx.c 2005-03-15 00:51:23.000000000 -0800 @@ -1,9 +1,11 @@ #define _GNU_SOURCE -#include #include #include #include #include +#undef __deprecated__ +#define __deprecated__ +#include void verrx(int e,const char* f,va_list ap) { vwarnx(f,ap); diff -uNr dietlibc-0.28/libcruft/CVS/Entries dietlibc-0.29/libcruft/CVS/Entries --- dietlibc-0.28/libcruft/CVS/Entries 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/libcruft/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,94 +0,0 @@ -/___div.c/1.1/Fri Mar 9 19:35:41 2001// -/__end_parse.c/1.2/Thu Jan 24 00:45:55 2002// -/__fprepare_parse.c/1.1/Tue Apr 8 16:41:27 2003// -/__parse.c/1.1/Tue Oct 23 01:44:39 2001// -/__parse_1.c/1.1/Tue Oct 23 01:44:39 2001// -/__parse_nws.c/1.2/Wed Oct 24 17:06:03 2001// -/__parse_ws.c/1.2/Wed Oct 24 17:06:03 2001// -/__prepare_parse.c/1.7/Tue Aug 19 17:13:46 2003// -/alphasort.c/1.2/Sat Feb 23 22:18:42 2002// -/alphasort64.c/1.1/Wed Feb 5 18:29:27 2003// -/bcopy.c/1.4/Sat Feb 23 22:18:42 2002// -/bindtextdomain.c/1.3/Fri Nov 14 15:16:51 2003// -/bzero.c/1.2/Sat Feb 23 22:18:42 2002// -/clock.c/1.8/Sat Feb 23 22:18:42 2002// -/confstr.c/1.1/Mon Aug 18 17:32:52 2003// -/dcgettext.c/1.1/Tue Nov 4 18:26:52 2003// -/dgettext.c/1.1/Tue Nov 4 18:26:52 2003// -/dn_expand.c/1.5/Wed Jul 10 22:20:34 2002// -/dnscruft.c/1.20/Fri Sep 19 23:25:58 2003// -/dnscruft2.c/1.27/Fri Feb 21 02:33:21 2003// -/dnscruft3.c/1.1/Sat Jun 2 00:59:41 2001// -/dnscruft4.c/1.2/Sat Feb 23 22:18:42 2002// -/fgetpwent.c/1.1/Tue Apr 8 16:41:27 2003// -/fgetpwent_r.c/1.1/Tue Apr 8 16:41:27 2003// -/getdtablesize.c/1.1/Wed May 2 23:19:55 2001// -/getgrent.c/1.3/Mon Oct 29 17:21:10 2001// -/getgrent_r.c/1.4/Sat Feb 23 22:18:42 2002// -/getgrgid.c/1.3/Mon Oct 29 17:21:10 2001// -/getgrgid_r.c/1.2/Mon Oct 29 17:21:10 2001// -/getgrnam.c/1.3/Mon Oct 29 17:21:10 2001// -/getgrnam_r.c/1.2/Mon Oct 29 17:21:10 2001// -/gethostbyaddr.c/1.5/Sat Feb 23 22:18:42 2002// -/gethostbyaddr2_r.c/1.2/Thu Jul 26 12:32:45 2001// -/gethostbyaddr_r.c/1.8/Thu Jun 3 16:05:54 2004// -/gethostbyname.c/1.6/Sat Oct 13 18:10:20 2001// -/gethostbyname2.c/1.6/Sat Feb 23 22:18:42 2002// -/gethostbyname2_r.c/1.12/Tue Aug 19 16:58:18 2003// -/gethostbyname_r.c/1.14/Sun Oct 27 16:51:03 2002// -/getlogin.c/1.3/Sat Feb 23 22:18:42 2002// -/getopt_data.c/1.2/Mon Sep 24 14:58:06 2001// -/getopt_long.c/1.7/Mon Jun 23 10:48:11 2003// -/getopt_long_only.c/1.5/Mon Jun 23 10:48:11 2003// -/getpagesize.c/1.4/Sat Feb 23 22:18:42 2002// -/getpass.c/1.4/Mon Jan 21 15:30:18 2002// -/getpwent.c/1.3/Mon Oct 29 17:21:10 2001// -/getpwent_r.c/1.4/Sat Feb 23 22:18:42 2002// -/getpwnam.c/1.6/Mon Oct 29 17:21:10 2001// -/getpwnam_r.c/1.2/Mon Oct 29 17:21:10 2001// -/getpwuid.c/1.4/Mon Oct 29 17:21:10 2001// -/getpwuid_r.c/1.2/Mon Oct 29 17:21:10 2001// -/getspent.c/1.3/Mon Oct 29 17:21:10 2001// -/getspent_r.c/1.4/Sat Feb 23 22:18:42 2002// -/getspnam.c/1.3/Mon Oct 29 17:21:10 2001// -/getspnam_r.c/1.2/Mon Oct 29 17:21:10 2001// -/gettext.c/1.1/Tue Nov 4 18:26:52 2003// -/getusershell.c/1.2/Sat Feb 23 22:18:42 2002// -/grbuf.c/1.1/Wed Oct 24 19:47:43 2001// -/h_errno.c/1.1/Fri Feb 23 13:22:35 2001// -/herrno_location.c/1.3/Sat Feb 23 22:18:42 2002// -/herror.c/1.3/Sat Feb 23 22:18:42 2002// -/hstrerror.c/1.5/Mon Oct 8 18:22:29 2001// -/inet_addr.c/1.1/Fri Feb 23 13:22:35 2001// -/inet_aton.c/1.3/Sat Feb 9 00:45:18 2002// -/inet_ntoa.c/1.5/Sat Feb 23 23:08:20 2002// -/inet_ntoa_r.c/1.1/Sat May 5 22:57:52 2001// -/inet_ntop.c/1.7/Thu Jan 15 18:44:59 2004// -/inet_pton.c/1.11/Tue Jul 2 23:05:47 2002// -/initgroups.c/1.6/Mon Jun 7 16:19:57 2004// -/killpg.c/1.1/Thu Jul 18 23:00:23 2002// -/localeconv.c/1.1/Wed Jan 16 13:21:43 2002// -/mkdtemp.c/1.8/Thu Aug 16 18:44:17 2001// -/mkstemp.c/1.12/Thu Aug 16 18:44:17 2001// -/mktemp.c/1.4/Thu Aug 16 18:44:17 2001// -/nl_langinfo.c/1.1/Mon Dec 15 20:43:56 2003// -/pwbuf.c/1.1/Wed Oct 24 17:27:12 2001// -/res_close.c/1.1/Thu Jun 3 11:10:55 2004// -/res_init.c/1.3/Wed Jun 13 15:54:11 2001// -/res_mkquery.c/1.7/Wed Nov 10 17:45:17 2004// -/res_query.c/1.18/Fri Jan 21 17:43:12 2005// -/res_search.c/1.4/Fri Jan 21 17:43:12 2005// -/scan_ulong.c/1.1/Tue Oct 23 01:44:39 2001// -/scandir.c/1.5/Mon Nov 3 14:19:21 2003// -/scandir64.c/1.2/Mon Nov 3 14:19:21 2003// -/setegid.c/1.2/Sat Feb 23 22:18:42 2002// -/seteuid.c/1.2/Sat Feb 23 22:18:42 2002// -/setlocale.c/1.3/Fri Aug 13 14:03:30 2004// -/spbuf.c/1.1/Wed Oct 24 19:47:43 2001// -/strerror_r.c/1.2/Fri Oct 24 15:21:50 2003// -/sysconf.c/1.6/Fri Dec 20 13:32:37 2002// -/sysconf_cpus.c/1.7/Fri Mar 26 14:52:46 2004// -/tempnam.c/1.5/Sat Feb 23 23:08:20 2002// -/textdomain.c/1.2/Fri Nov 14 14:52:16 2003// -/tmpnam.c/1.2/Sat Feb 23 22:18:42 2002// -D diff -uNr dietlibc-0.28/libcruft/CVS/Repository dietlibc-0.29/libcruft/CVS/Repository --- dietlibc-0.28/libcruft/CVS/Repository 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/libcruft/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/libcruft diff -uNr dietlibc-0.28/libcruft/CVS/Root dietlibc-0.29/libcruft/CVS/Root --- dietlibc-0.28/libcruft/CVS/Root 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/libcruft/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/libcruft/__fprepare_parse.c dietlibc-0.29/libcruft/__fprepare_parse.c --- dietlibc-0.28/libcruft/__fprepare_parse.c 2003-04-08 09:41:27.000000000 -0700 +++ dietlibc-0.29/libcruft/__fprepare_parse.c 2005-04-10 06:59:32.000000000 -0700 @@ -10,7 +10,7 @@ if (fd>=0) { s->buflen=lseek(fd,0,SEEK_END); s->buffirst=mmap(0,s->buflen,PROT_READ,MAP_PRIVATE,fd,0); - if (s->buffirst==(const unsigned char*)-1) + if (s->buffirst==(const char*)-1) s->buffirst=0; } } diff -uNr dietlibc-0.28/libcruft/__prepare_parse.c dietlibc-0.29/libcruft/__prepare_parse.c --- dietlibc-0.28/libcruft/__prepare_parse.c 2003-08-19 10:13:46.000000000 -0700 +++ dietlibc-0.29/libcruft/__prepare_parse.c 2005-04-10 06:59:32.000000000 -0700 @@ -12,7 +12,7 @@ if (fd>=0) { s->buflen=lseek(fd,0,SEEK_END); s->buffirst=mmap(0,s->buflen,PROT_READ,MAP_PRIVATE,fd,0); - if (s->buffirst==(const unsigned char*)-1) + if (s->buffirst==(const char*)-1) s->buffirst=0; close(fd); } else { diff -uNr dietlibc-0.28/libcruft/bcopy.c dietlibc-0.29/libcruft/bcopy.c --- dietlibc-0.28/libcruft/bcopy.c 2002-02-23 14:18:42.000000000 -0800 +++ dietlibc-0.29/libcruft/bcopy.c 2005-03-15 00:51:23.000000000 -0800 @@ -1,9 +1,9 @@ #include +#include +#include #include "dietwarning.h" -extern void memmove(char*,const char*,size_t); - -void bcopy(const void *src, void *dest, size_t n); +#undef bcopy void bcopy(const void *src, void *dest, size_t n) { memmove(dest,src,n); } diff -uNr dietlibc-0.28/libcruft/bzero.c dietlibc-0.29/libcruft/bzero.c --- dietlibc-0.28/libcruft/bzero.c 2002-02-23 14:18:42.000000000 -0800 +++ dietlibc-0.29/libcruft/bzero.c 2005-03-15 00:51:23.000000000 -0800 @@ -1,8 +1,9 @@ #include #include +#include #include "dietwarning.h" -void bzero(void *s, size_t n); +#undef bzero void bzero(void *s, size_t n) { memset(s,0,n); } diff -uNr dietlibc-0.28/libcruft/dl_iterate_phdr.c dietlibc-0.29/libcruft/dl_iterate_phdr.c --- dietlibc-0.28/libcruft/dl_iterate_phdr.c 1969-12-31 16:00:00.000000000 -0800 +++ dietlibc-0.29/libcruft/dl_iterate_phdr.c 2005-05-13 11:39:32.000000000 -0700 @@ -0,0 +1,57 @@ +/* support function when linking against libgcc_eh.a + * + * see gcc sources _Unwind_Find_FDE() in unwind-dw2-fde-glibc.c + * + * Copyright (C) 2005 Markus F.X.J. Oberhumer + * License: GNU GPL + */ + +#include +#include +#include +#include + +#if __WORDSIZE == 64 +# define ElfW(type) Elf64_##type +#else +# define ElfW(type) Elf32_##type +#endif + +struct dl_phdr_info +{ + ElfW(Addr) dlpi_addr; + const char *dlpi_name; + const ElfW(Phdr) *dlpi_phdr; + ElfW(Half) dlpi_phnum; +}; + + +/* dl_support.c defines these and initializes them early on. */ +extern ElfW(Phdr) *_dl_phdr; +extern size_t _dl_phnum; + + +int dl_iterate_phdr(int (*callback) (struct dl_phdr_info *info, size_t size, void *data), + void *data); +int dl_iterate_phdr(int (*callback) (struct dl_phdr_info *info, size_t size, void *data), + void *data) +{ + int ret; + struct dl_phdr_info info; + + if (_dl_phnum != 0) + { + /* This entry describes this statically-linked program itself. */ + info.dlpi_addr = 0; + info.dlpi_name = ""; + info.dlpi_phdr = _dl_phdr; + info.dlpi_phnum = _dl_phnum; + ret = (*callback) (&info, sizeof(info), data); + if (ret != 0) + return ret; + } + + return 0; +} + + diff -uNr dietlibc-0.28/libcruft/dl_support.c dietlibc-0.29/libcruft/dl_support.c --- dietlibc-0.28/libcruft/dl_support.c 1969-12-31 16:00:00.000000000 -0800 +++ dietlibc-0.29/libcruft/dl_support.c 2005-05-13 11:39:32.000000000 -0700 @@ -0,0 +1,59 @@ +/* support function when linking against libgcc_eh.a + * + * see gcc sources _Unwind_Find_FDE() in unwind-dw2-fde-glibc.c + * + * Copyright (C) 2005 Markus F.X.J. Oberhumer + * License: GNU GPL + */ + +#include "dietfeatures.h" +#include +#include +#include +#include +#include + +#if __WORDSIZE == 64 +# define ElfW(type) Elf64_##type +#else +# define ElfW(type) Elf32_##type +#endif + + +extern ElfW(Phdr) *_dl_phdr; +extern size_t _dl_phnum; + +ElfW(Phdr) *_dl_phdr = NULL; +size_t _dl_phnum = 0; + + +void _dl_aux_init(ElfW(auxv_t) *av); +void _dl_aux_init(ElfW(auxv_t) *av) +{ + for ( ; av->a_type != AT_NULL; ++av) + { + switch (av->a_type) + { + case AT_PHDR: + _dl_phdr = av->a_un.a_ptr; + break; + case AT_PHNUM: + _dl_phnum = av->a_un.a_val; + break; + } + } +} + + +void _dl_aux_init_from_envp(char **envp); +void _dl_aux_init_from_envp(char **envp) +{ + if (envp == NULL) + return; + while (*envp) + ++envp; + /* now envp points to the tailing NULL-pointer of the environment */ + _dl_aux_init((ElfW(auxv_t) *) (envp + 1)); +} + + diff -uNr dietlibc-0.28/libcruft/dnscruft2.c dietlibc-0.29/libcruft/dnscruft2.c --- dietlibc-0.28/libcruft/dnscruft2.c 2003-02-20 18:33:21.000000000 -0800 +++ dietlibc-0.29/libcruft/dnscruft2.c 2005-05-01 13:08:25.000000000 -0700 @@ -36,9 +36,9 @@ struct hostent **RESULT, int *h_errnop, int lookfor) { #endif int names,ips; - unsigned char *cur; - unsigned char *max; - unsigned char inpkg[1500]; + char *cur; + char *max; + char inpkg[1500]; char* tmp; int size; @@ -57,7 +57,7 @@ max=buf+buflen; names=ips=0; - if ((size=res_query(name,C_IN,lookfor,inpkg,512))<0) { + if ((size=res_query(name,C_IN,lookfor,(unsigned char*)inpkg,512))<0) { invalidpacket: *h_errnop=HOST_NOT_FOUND; return -1; @@ -65,7 +65,7 @@ { tmp=inpkg+12; { - char Name[257]; + unsigned char Name[257]; unsigned short q=((unsigned short)inpkg[4]<<8)+inpkg[5]; while (q>0) { if (tmp>(char*)inpkg+size) goto invalidpacket; @@ -73,11 +73,11 @@ tmp+=5; --q; } - if (tmp>(char*)inpkg+size) goto invalidpacket; + if (tmp>inpkg+size) goto invalidpacket; q=((unsigned short)inpkg[6]<<8)+inpkg[7]; if (q<1) goto nodata; while (q>0) { - int decofs=__dns_decodename(inpkg,(size_t)(tmp-(char*)inpkg),Name,256,inpkg+size); + int decofs=__dns_decodename((unsigned char*)inpkg,(size_t)(tmp-(char*)inpkg),Name,256,(unsigned char*)inpkg+size); if (decofs<0) break; tmp=inpkg+decofs; --q; @@ -85,7 +85,7 @@ tmp[2]!=0 || tmp[3]!=1) { /* CLASS != IN */ if (tmp[1]==5) { /* CNAME */ tmp+=10; - decofs=__dns_decodename(inpkg,(size_t)(tmp-(char*)inpkg),Name,256,inpkg+size); + decofs=__dns_decodename((unsigned char*)inpkg,(size_t)(tmp-(char*)inpkg),Name,256,(unsigned char*)inpkg+size); if (decofs<0) break; tmp=inpkg+decofs; } else @@ -96,16 +96,17 @@ { int slen; if (lookfor==1 || lookfor==28) /* A or AAAA*/ { - slen=strlen(Name); + slen=strlen((char*)Name); if (cur+slen+8+(lookfor==28?12:0)>=max) { *h_errnop=NO_RECOVERY; return -1; } - } else if (lookfor==12) /* PTR */ { - decofs=__dns_decodename(inpkg,(size_t)(tmp-(char*)inpkg),Name,256,inpkg+size); - if (decofs<0) break; - tmp=inpkg+decofs; - slen=strlen(Name); - } else - slen=strlen(Name); - strcpy(cur,Name); + } else { + if (lookfor==12) /* PTR */ { + decofs=__dns_decodename((unsigned char*)inpkg,(size_t)(tmp-(char*)inpkg),Name,256,(unsigned char*)inpkg+size); + if (decofs<0) break; + tmp=inpkg+decofs; + } + slen=strlen((char*)Name); + } + strcpy(cur,(char*)Name); if (names==0) result->h_name=cur; else @@ -116,15 +117,12 @@ cur+=(slen|3)+1; result->h_addr_list[ips++] = cur; if (lookfor==1) /* A */ { - *(int*)cur=*(int*)tmp; - cur+=4; + memcpy(cur,tmp,4); + cur+=4; tmp+=4; result->h_addr_list[ips]=0; } else if (lookfor==28) /* AAAA */ { - { - int k; - for (k=0; k<16; ++k) cur[k]=tmp[k]; - } - cur+=16; + memcpy(cur,tmp,16); + cur+=16; tmp+=16; result->h_addr_list[ips]=0; } } diff -uNr dietlibc-0.28/libcruft/gethostbyname_r.c dietlibc-0.29/libcruft/gethostbyname_r.c --- dietlibc-0.28/libcruft/gethostbyname_r.c 2002-10-27 08:51:03.000000000 -0800 +++ dietlibc-0.29/libcruft/gethostbyname_r.c 2005-05-01 13:06:29.000000000 -0700 @@ -19,12 +19,14 @@ char *buf, size_t buflen, struct hostent **RESULT, int *h_errnop) { size_t L=strlen(name); + unsigned int offset; result->h_name=buf; + L=(L+sizeof(char*))&-(sizeof(char*)); if (buflenh_addr_list=(char**)(buf+strlen(name)+1); - result->h_addr_list+=sizeof(unsigned long)-((unsigned long)(result->h_addr_list)&(sizeof(unsigned long)-1)); + offset = (strlen(name)+sizeof(char*))&-(sizeof(char*)); /* align */ + result->h_addr_list=(char**)(buf+offset); result->h_addr_list[0]=(char*)&result->h_addr_list[2]; if (inet_pton(AF_INET,name,result->h_addr_list[0])) { result->h_addrtype=AF_INET; diff -uNr dietlibc-0.28/libcruft/getusershell.c dietlibc-0.29/libcruft/getusershell.c --- dietlibc-0.28/libcruft/getusershell.c 2002-02-23 14:18:42.000000000 -0800 +++ dietlibc-0.29/libcruft/getusershell.c 2005-03-15 00:51:23.000000000 -0800 @@ -1,7 +1,9 @@ #define _BSD_SOURCE -#include #include #include +#undef __attribute_dontuse__ +#define __attribute_dontuse__ +#include #include "parselib.h" static struct state __ps; diff -uNr dietlibc-0.28/libcruft/res_query.c dietlibc-0.29/libcruft/res_query.c --- dietlibc-0.28/libcruft/res_query.c 2005-01-21 09:43:12.000000000 -0800 +++ dietlibc-0.29/libcruft/res_query.c 2005-05-18 07:26:33.000000000 -0700 @@ -22,51 +22,98 @@ extern void __dns_readstartfiles(void); +#ifdef WANT_PLUGPLAY_DNS +int __dns_plugplay_interface; +#endif + int res_query(const char *dname, int class, int type, unsigned char *answer, int anslen) { unsigned char packet[512]; int size; #ifndef WANT_IPV6_DNS __dns_make_fd(); #endif + struct pollfd duh[2]; __dns_readstartfiles(); - if ((size=res_mkquery(QUERY,dname,class,type,0,0,0,packet,512))<0) { h_errno=NO_RECOVERY; return -1; } + if ((size=res_mkquery(QUERY,dname,class,type,0,0,0,(char*)packet,512))<0) { h_errno=NO_RECOVERY; return -1; } { { int i; /* current server */ int j; /* timeout count down */ struct timeval last,now; -#ifdef WANT_IPV6_PLUGPLAY_DNS +#ifdef WANT_PLUGPLAY_DNS + struct timeval first; static int pnpfd=-1; - static struct sockaddr_in6 pnpsa; - struct pollfd duh[2]; - - if (pnpfd<0) { - pnpfd=socket(PF_INET6,SOCK_DGRAM,IPPROTO_UDP); - if (pnpfd>=0) fcntl(pnpfd,F_SETFD,FD_CLOEXEC); +#ifdef WANT_IPV6_DNS + static struct sockaddr_in6 pnpsa6; +#endif + static struct sockaddr_in pnpsa4; + static int v4pnp=0; + int islocal=0; + + gettimeofday(&first,0); + { + char* x=strchr(dname,'.'); + if (x) { + if (!memcmp(x,".local",6)) + if (x[6]==0 || (x[6]=='.' && x[7]==0)) + islocal=1; + } } - memset(&pnpsa,0,sizeof(pnpsa)); - pnpsa.sin6_family=AF_INET6; - if (pnpfd!=-1) bind(pnpfd,(struct sockaddr*)&pnpsa,sizeof(pnpsa)); - pnpsa.sin6_port=htons(53); - memmove(&pnpsa.sin6_addr,"\xff\x02\x00\x00\x00\x00\x00\x00\x00\x00dnspnp",16); - - duh[1].events=POLLIN; - duh[1].fd=pnpfd; + if (islocal) { + if (pnpfd<0) { + pnpfd=socket(PF_INET6,SOCK_DGRAM,IPPROTO_UDP); + if (pnpfd==-1 && errno==EAFNOSUPPORT) { + pnpfd=socket(PF_INET,SOCK_DGRAM,IPPROTO_UDP); + v4pnp=1; + } + if (pnpfd>=0) { + int one=1; + fcntl(pnpfd,F_SETFD,FD_CLOEXEC); + if (v4pnp) { + setsockopt(pnpfd,SOL_IP,IP_RECVTTL,&one,sizeof one); + setsockopt(pnpfd,SOL_IP,IP_PKTINFO,&one,sizeof one); + } else + setsockopt(pnpfd,IPPROTO_IPV6,IPV6_HOPLIMIT,&one,sizeof one); + } + } +#ifdef WANT_IPV6_DNS + if (!v4pnp) { + memset(&pnpsa6,0,sizeof(pnpsa6)); + pnpsa6.sin6_family=AF_INET6; + if (pnpfd!=-1) bind(pnpfd,(struct sockaddr*)&pnpsa6,sizeof(pnpsa6)); + pnpsa6.sin6_port=htons(5353); + memcpy(&pnpsa6.sin6_addr,"\xff\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfb",16); + } else { +#endif + memset(&pnpsa4,0,sizeof(pnpsa4)); + pnpsa4.sin_family=AF_INET; + if (pnpfd!=-1) bind(pnpfd,(struct sockaddr*)&pnpsa4,sizeof(pnpsa4)); + pnpsa4.sin_port=htons(5353); + memcpy(&pnpsa4.sin_addr,"\xe0\x00\x00\xfb",4); /* 224.0.0.251 */ +#ifdef WANT_IPV6_DNS + } +#endif - if (strchr(dname,'.')) { + duh[1].events=POLLIN; + duh[1].fd=pnpfd; + } else { duh[1].fd=-1; duh[1].revents=0; } -#else - struct pollfd duh[1]; + #endif i=0; duh[0].events=POLLIN; + duh[0].fd=0; last.tv_sec=0; -#ifdef WANT_IPV6_PLUGPLAY_DNS - if (duh[1].fd!=-1) - sendto(pnpfd,packet,size,0,(struct sockaddr*)(&pnpsa),sizeof(struct sockaddr_in6)); +#ifdef WANT_PLUGPLAY_DNS + if (duh[1].fd!=-1) { + if (v4pnp) + sendto(pnpfd,packet,size,0,(struct sockaddr*)(&pnpsa4),sizeof(pnpsa4)); + else + sendto(pnpfd,packet,size,0,(struct sockaddr*)(&pnpsa6),sizeof(pnpsa6)); + } /* if it doesn't work, we don't care */ #endif for (j=120; j>0; --j) { @@ -82,13 +129,13 @@ __dns_make_fd(); tmpfd=__dns_fd; } -#ifdef WANT_IPV6_PLUGPLAY_DNS +#ifdef WANT_PLUGPLAY_DNS if (duh[0].fd!=-1) { #endif duh[0].fd=tmpfd; if (sendto(tmpfd,packet,size,0,s,sizeof(struct sockaddr_in6))==0) gettimeofday(&last,0); -#ifdef WANT_IPV6_PLUGPLAY_DNS +#ifdef WANT_PLUGPLAY_DNS } #endif #else @@ -99,7 +146,8 @@ last=now; } if (++i >= _res.nscount) i=0; -#ifdef WANT_IPV6_PLUGPLAY_DNS +#ifdef WANT_PLUGPLAY_DNS + if (now.tv_sec>first.tv_sec) goto nxdomain; if (duh[0].fd==-1 && duh[1].fd==-1) goto nxdomain; duh[0].revents=0; if (poll(duh[0].fd==-1?duh+1:duh,duh[0].fd==-1?1:2,1000) > 0) { @@ -108,17 +156,48 @@ #endif /* read and parse answer */ unsigned char inpkg[1500]; -#ifdef WANT_IPV6_PLUGPLAY_DNS +#ifdef WANT_PLUGPLAY_DNS int len; - len=read(duh[0].revents&POLLIN?duh[0].fd:duh[1].fd,inpkg,1500); + struct msghdr mh; + struct iovec iv; + char abuf[100]; /* for ancillary data */ + struct cmsghdr* x; + int ttl=0; + int fd; + struct sockaddr_in6 tmpsa; + mh.msg_name=&tmpsa; + mh.msg_namelen=sizeof(tmpsa); + mh.msg_iov=&iv; + mh.msg_iovlen=1; + iv.iov_base=inpkg; + iv.iov_len=sizeof(inpkg); + mh.msg_control=abuf; + mh.msg_controllen=sizeof(abuf); + __dns_plugplay_interface=0; + len=recvmsg(fd=(duh[0].revents&POLLIN?duh[0].fd:duh[1].fd),&mh,MSG_DONTWAIT); + if (fd==duh[1].fd) { + if (tmpsa.sin6_family==AF_INET6) + __dns_plugplay_interface=tmpsa.sin6_scope_id; + for (x=CMSG_FIRSTHDR(&mh); x; x=CMSG_NXTHDR(&mh,x)) + if ((x->cmsg_level==SOL_IP && x->cmsg_type==IP_TTL) || + (x->cmsg_level==IPPROTO_IPV6 && x->cmsg_type==IPV6_HOPLIMIT)) { + ttl=*(int*)CMSG_DATA(x); + break; + } else if ((x->cmsg_level==SOL_IP && x->cmsg_type==IP_PKTINFO)) + __dns_plugplay_interface=((struct in_pktinfo*)(CMSG_DATA(x)))->ipi_ifindex; + if (ttl != 255) { + /* as per standard, discard packets with TTL!=255 */ + continue; + } + } #else - int len=read(duh[0].fd,inpkg,1500); + int len=read(duh[0].fd,inpkg,sizeof(inpkg)); #endif /* header, question, answer, authority, additional */ if (inpkg[0]!=packet[0] || inpkg[1]!=packet[1]) continue; /* wrong ID */ if ((inpkg[2]&0xf9) != (_res.options&RES_RECURSE?0x81:0x80)) continue; /* not answer */ if ((inpkg[3]&0x0f) != 0) { -#ifdef WANT_IPV6_PLUGPLAY_DNS +#ifdef WANT_PLUGPLAY_DNS /* if the normal DNS server says NXDOMAIN, still give the multicast method some time */ if (duh[0].revents&POLLIN) { duh[0].fd=-1; @@ -138,12 +217,16 @@ h_errno=NO_RECOVERY; return -1; } - memmove(answer,inpkg,len); + memcpy(answer,inpkg,len); return len; } /*kaputt:*/ } } +#ifdef WANT_PLUGPLAY_DNS + if (duh[1].fd==-1) + goto nxdomain; +#endif } h_errno=TRY_AGAIN; return -1; diff -uNr dietlibc-0.28/libcrypt/CVS/Entries dietlibc-0.29/libcrypt/CVS/Entries --- dietlibc-0.28/libcrypt/CVS/Entries 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/libcrypt/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,4 +0,0 @@ -/crypt.c/1.7/Sat Feb 23 21:08:27 2002// -/md5.c/1.15/Tue Feb 26 15:40:18 2002// -/md5crypt.c/1.2/Sat Feb 23 22:18:43 2002// -D diff -uNr dietlibc-0.28/libcrypt/CVS/Repository dietlibc-0.29/libcrypt/CVS/Repository --- dietlibc-0.28/libcrypt/CVS/Repository 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/libcrypt/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/libcrypt diff -uNr dietlibc-0.28/libcrypt/CVS/Root dietlibc-0.29/libcrypt/CVS/Root --- dietlibc-0.28/libcrypt/CVS/Root 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/libcrypt/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/libdl/CVS/Entries dietlibc-0.29/libdl/CVS/Entries --- dietlibc-0.28/libdl/CVS/Entries 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/libdl/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,20 +0,0 @@ -/Makefile/1.14/Fri Dec 17 20:37:28 2004// -/README/1.10/Fri Nov 15 15:39:17 2002// -/_dl_alloc.c/1.14/Mon Mar 11 19:21:11 2002// -/_dl_int.h/1.39/Sat Jan 29 02:29:16 2005// -/_dl_jump.S/1.11/Mon Mar 4 16:18:13 2002// -/_dl_load.c/1.23/Fri Aug 30 12:25:06 2002// -/_dl_main.c/1.28/Sat Jan 29 02:29:16 2005// -/_dl_open.c/1.19/Mon Mar 11 19:21:12 2002// -/_dl_queue.c/1.7/Wed Sep 10 13:10:16 2003// -/_dl_rel.c/1.7/Mon Mar 11 19:21:12 2002// -/_dl_rel.h/1.4/Sat Jan 29 02:34:22 2005// -/_dl_relocate.c/1.27/Sat Jan 29 02:29:16 2005// -/_dl_search.c/1.15/Mon Mar 11 19:21:12 2002// -/dladdr.c/1.1/Fri Dec 17 19:33:50 2004// -/dlclose.c/1.15/Fri Dec 17 19:14:49 2004// -/dlerror.c/1.7/Fri Sep 13 14:37:21 2002// -/dlopen.c/1.13/Fri Nov 8 09:10:35 2002// -/dlsym.c/1.22/Sat Jan 29 02:29:16 2005// -/elf_hash.h/1.3/Sat Jan 29 02:29:16 2005// -D diff -uNr dietlibc-0.28/libdl/CVS/Entries.Log dietlibc-0.29/libdl/CVS/Entries.Log --- dietlibc-0.28/libdl/CVS/Entries.Log 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/libdl/CVS/Entries.Log 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -A D/test//// diff -uNr dietlibc-0.28/libdl/CVS/Repository dietlibc-0.29/libdl/CVS/Repository --- dietlibc-0.28/libdl/CVS/Repository 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/libdl/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/libdl diff -uNr dietlibc-0.28/libdl/CVS/Root dietlibc-0.29/libdl/CVS/Root --- dietlibc-0.28/libdl/CVS/Root 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/libdl/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/libdl/_dl_alloc.c dietlibc-0.29/libdl/_dl_alloc.c --- dietlibc-0.28/libdl/_dl_alloc.c 2002-03-11 11:21:11.000000000 -0800 +++ dietlibc-0.29/libdl/_dl_alloc.c 2005-05-13 05:22:32.000000000 -0700 @@ -12,6 +12,7 @@ struct _dl_handle*_dl_root_handle=(struct _dl_handle*)0; struct _dl_handle*_dl_top_handle=(struct _dl_handle*)0; struct _dl_handle*_dl_free_list=(struct _dl_handle*)0; +#define _dl_lib_memset memset #endif #ifdef __DIET_LD_SO__ @@ -25,7 +26,7 @@ if (dh->prev) dh->prev->next=dh->next; if ((dh->flags&RTLD_NOSONAME) && dh->name) free(dh->name); - memset(dh,0,sizeof(struct _dl_handle)); + _dl_lib_memset(dh,0,sizeof(struct _dl_handle)); dh->next=_dl_free_list; _dl_free_list=dh; } @@ -73,7 +74,7 @@ struct _dl_handle*tmp; for (tmp=_dl_root_handle;tmp;tmp=tmp->next) { if (!tmp->name) continue; - if (!strcmp(tmp->name,name)) return tmp; + if (!_dl_lib_strcmp(tmp->name,name)) return tmp; } } } diff -uNr dietlibc-0.28/libdl/_dl_int.h dietlibc-0.29/libdl/_dl_int.h --- dietlibc-0.28/libdl/_dl_int.h 2005-01-28 18:29:16.000000000 -0800 +++ dietlibc-0.29/libdl/_dl_int.h 2005-04-29 11:53:19.000000000 -0700 @@ -101,9 +101,6 @@ } r_state; Elf_Addr r_ldbase; }; -#ifdef WANT_LD_SO_GDB_SUPPORT -extern struct r_debug _r_debug; -#endif #define HASH_BUCKET_LEN(p) (*((p))) #define HASH_BUCKET(p) ((p)+2) @@ -112,9 +109,11 @@ #define HASH_CHAIN(p) ((p)+2+HASH_BUCKET_LEN(p)) /* _dl_alloc.c */ +#if 0 extern struct _dl_handle* _dl_root_handle; extern struct _dl_handle* _dl_top_handle; extern struct _dl_handle* _dl_free_list; +#endif #ifndef __DIET_LD_SO__ void _dl_free_handle(struct _dl_handle* dh); struct _dl_handle* _dl_get_handle(); diff -uNr dietlibc-0.28/libdl/_dl_main.c dietlibc-0.29/libdl/_dl_main.c --- dietlibc-0.28/libdl/_dl_main.c 2005-01-28 18:29:16.000000000 -0800 +++ dietlibc-0.29/libdl/_dl_main.c 2005-05-13 05:22:32.000000000 -0700 @@ -37,15 +37,26 @@ static unsigned long at_pagesize; /* this are the "local syscalls" */ +__attribute__((noreturn,visibility("hidden"))) void _dl_sys_exit(int val); +__attribute__((visibility("hidden"))) int _dl_sys_read(int fd,char*buf,unsigned long len); +__attribute__((visibility("hidden"))) int _dl_sys_write(int fd,char*buf,unsigned long len); +__attribute__((visibility("hidden"))) int _dl_sys_open(const char*filename,int flags,int mode); +__attribute__((visibility("hidden"))) int _dl_sys_close(int fd); +__attribute__((visibility("hidden"))) void*_dl_sys_mmap(void*start,unsigned long length,int prot,int flags,int fd,unsigned long offset); +__attribute__((visibility("hidden"))) int _dl_sys_munmap(void*start,unsigned long length); +__attribute__((visibility("hidden"))) int _dl_sys_mprotect(const void*addr,unsigned long len,int prot); +__attribute__((visibility("hidden"))) int _dl_sys_fstat(int filedes, struct stat *buf); +__attribute__((visibility("hidden"))) +void _dl_jump(void); extern char*strdup(const char*s); extern void free(void*p); @@ -169,8 +180,6 @@ } static inline int work_on_pltgot(struct _dl_handle*dh) { - /* declare _dl_jump static otherwise we have a GOT access BEFOR we have the resolver */ - static void _dl_jump(void); if ((dh->plt_rel)&&(!(dh->flags&RTLD_NOW))) { unsigned long*tmp=dh->pltgot; /* GOT */ @@ -289,8 +298,6 @@ } static inline int work_on_pltgot(struct _dl_handle*dh) { - /* declare _dl_jump static otherwise we have a GOT access BEFOR we have the resolver */ - static void _dl_jump(void); if ((dh->plt_rel)&&(!(dh->flags&RTLD_NOW))) { unsigned long*tmp=dh->pltgot; /* GOT */ @@ -402,8 +409,6 @@ } static inline int work_on_pltgot(struct _dl_handle*dh) { - /* declare _dl_jump static otherwise we have a GOT access BEFOR we have the resolver */ - static void _dl_jump(void); if ((dh->plt_rel)&&(!(dh->flags&RTLD_NOW))) { unsigned long*tmp=dh->pltgot; /* GOT */ @@ -416,12 +421,14 @@ #elif defined(__sparc__) -#warning "sparc is not tested yet... AND HAS NO RESOLVER !!!" +#warning "sparc is not working !!! AND HAS NO RESOLVER !!!" /* ARG... sparc has EVERY variable (even static) only addressable through the GOT */ asm(".text \n" ".align 16 \n" +".global _start \n" +".hidden _start \n" ".type _start,@function \n" "_start: \n" /* save some later needed values */ @@ -450,7 +457,8 @@ " sub %o7, %o4, %o4 \n" /* get 'relocated' address of _DYNAMIC (%o3) // call the dynamic linker */ " ld [ %l7 ], %o3 \n" -" call _dl_main \n" +//" call _dl_main \n" +" call _pr_ping \n" " add %o4, %o3, %o3 \n" /* put entry point to the return register */ " mov %o0, %o7 \n" @@ -465,13 +473,14 @@ "_pr_ping: \n" " save \n" "1: call 1f \n" -" mov _pr_ping_str-1b, %o1 \n" -"1: add %o7, %o1, %o1 \n" +" mov _pr_ping_str-1b, %i1 \n" +"1: add %o7, %i1, %i1 \n" " restore \n" -" mov 2, %o0 \n" " mov 6, %o2 \n" -" b _dl_sys_call3 \n" -" mov 4, %g1 \n" +" call _dl_sys_write \n" +" mov 2, %o0 \n" +" call _dl_sys_exit \n" +" mov 0, %o0 \n" ".type _dl_sys_exit,@function \n" @@ -480,7 +489,8 @@ ".type _dl_sys_call3,@function \n" "_dl_sys_call3: \n" " ta 0x10 \n" -" ret \n" +" retl \n" +" nop \n" ".type _dl_sys_read,@function \n" "_dl_sys_read: \n" " b _dl_sys_call3 \n" @@ -525,8 +535,6 @@ } static inline int work_on_pltgot(struct _dl_handle*dh) { - /* declare _dl_jump static otherwise we have a GOT access BEFOR we have the resolver */ - static void _dl_jump(void); if ((dh->plt_rel)&&(!(dh->flags&RTLD_NOW))) { unsigned long*tmp=dh->pltgot; /* GOT */ @@ -545,7 +553,7 @@ /* here do the code includes */ /* strncpy */ -static char*strncpy(register char*s,register const char*t,register unsigned long n) { +static char*_dl_lib_strncpy(register char*s,register const char*t,register unsigned long n) { char *dest=s; for(;n;--n) { char ch=*t; @@ -557,7 +565,7 @@ } /* strlen.c */ -static unsigned long strlen(register const char*s) { +static unsigned long _dl_lib_strlen(register const char*s) { register unsigned long i; if (!s) return 0; for (i=0; *s; ++s) ++i; @@ -565,7 +573,7 @@ } /* strcmp.c */ -static int strcmp(register const unsigned char*s,register const unsigned char*t) { +static int _dl_lib_strcmp(register const unsigned char*s,register const unsigned char*t) { register char x; for (;;) { x = *s; if (x != *t) break; if (!x) break; ++s; ++t; @@ -574,9 +582,9 @@ } /* strcspn.c */ -static unsigned long strcspn(const char*s,const char*reject) { +static unsigned long _dl_lib_strcspn(const char*s,const char*reject) { unsigned long l=0; - int a=1,i,al=strlen(reject); + int a=1,i,al=_dl_lib_strlen(reject); while((a)&&(*s)) { for(i=0;(a)&&(ip_offset+ld[0]->p_filesz; - memset(m+l,0,length-l); + _dl_lib_memset(m+l,0,length-l); ret->mem_base=m; ret->mem_size=length; @@ -845,7 +854,7 @@ /* zero pad bss */ l=data_off+ld[1]->p_filesz; - memset(d+l,0,data_fsize-l); + _dl_lib_memset(d+l,0,data_fsize-l); /* more bss ? */ if (data_size>data_fsize) { l=data_size-data_fsize; @@ -902,7 +911,7 @@ /* BASIC DYNAMIC STUFF */ case DT_HASH: - dh->hash_tab = (unsigned long*)(dh->mem_base+_dynamic[i].d_un.d_ptr); + dh->hash_tab = (unsigned int*)(dh->mem_base+_dynamic[i].d_un.d_ptr); #ifdef DEBUG pf(__FUNCTION__); pf(": have hash @ "); ph((long)dh->hash_tab); pf("\n"); #endif @@ -1283,7 +1292,7 @@ return (unsigned long)_DIE_; } - memset(&my_dh,0,sizeof(my_dh)); + _dl_lib_memset(&my_dh,0,sizeof(my_dh)); my_dh.mem_base=(char*)loadaddr; my_dh.mem_size=0; my_dh.lnk_count=1024; @@ -1318,7 +1327,7 @@ mydh=_dl_get_handle(); { register struct _dl_handle*tmp=mydh->prev; - memcpy(mydh,&my_dh,sizeof(struct _dl_handle)); + _dl_lib_memcpy(mydh,&my_dh,sizeof(struct _dl_handle)); mydh->prev=tmp; } got[1]=(unsigned long)mydh; diff -uNr dietlibc-0.28/libdl/_dl_rel.c dietlibc-0.29/libdl/_dl_rel.c --- dietlibc-0.28/libdl/_dl_rel.c 2002-03-11 11:21:12.000000000 -0800 +++ dietlibc-0.29/libdl/_dl_rel.c 2005-05-13 06:47:52.000000000 -0700 @@ -6,7 +6,7 @@ #ifdef DEBUG pf(__func__": symbol not found\n"); #endif - _exit(213); + _exit(212); } unsigned long do_rel(struct _dl_handle * tmp_dl, unsigned long off) diff -uNr dietlibc-0.28/libdl/_dl_rel.h dietlibc-0.29/libdl/_dl_rel.h --- dietlibc-0.28/libdl/_dl_rel.h 2005-01-28 18:34:22.000000000 -0800 +++ dietlibc-0.29/libdl/_dl_rel.h 2005-03-07 01:07:40.000000000 -0800 @@ -9,7 +9,7 @@ #define _DL_REL_PLT(b,r) (*(unsigned long*)((b)+(r)->r_offset)+=(unsigned long)(b)) -#elif defined(__alpha__) || defined(__hppa__) || defined(__ppc__) || defined(__sparc__) || defined(__s390__) \ +#elif defined(__alpha__) || defined(__hppa__) || defined(__powerpc__) || defined(__sparc__) || defined(__s390__) \ || defined(__x86_64__) /* this are RELA only archs: alpha, chris, hppa, ia64, m68k, ppc, sparc, sparc64, sh, s390, x86_64 */ diff -uNr dietlibc-0.28/libdl/_dl_relocate.c dietlibc-0.29/libdl/_dl_relocate.c --- dietlibc-0.28/libdl/_dl_relocate.c 2005-01-28 18:29:16.000000000 -0800 +++ dietlibc-0.29/libdl/_dl_relocate.c 2005-05-13 05:14:06.000000000 -0700 @@ -53,7 +53,7 @@ #ifdef DEBUG pf(__FUNCTION__); pf(": R_386_COPY from "); ph((unsigned long)from); pf("\n"); #endif - memcpy(loc,from,len); + _dl_lib_memcpy(loc,from,len); } else if (typ==R_386_GLOB_DAT) { /* 6 */ *loc=(unsigned long)_dl_sym(dh,ELF_R_SYM(rel->r_info)); } else if (typ==R_386_JMP_SLOT) { /* 7 */ @@ -73,7 +73,7 @@ #ifdef DEBUG pf(__FUNCTION__); pf(": R_ARM_COPY from "); ph((unsigned long)from); pf("\n"); #endif - memcpy(loc,from,len); + _dl_lib_memcpy(loc,from,len); } else if (typ==R_ARM_GLOB_DAT) { /* 21 */ *loc=(unsigned long)_dl_sym(dh,ELF_R_SYM(rel->r_info)); } else if (typ==R_ARM_JUMP_SLOT) { /* 22 */ @@ -93,7 +93,7 @@ #ifdef DEBUG pf(__FUNCTION__); pf(": R_X86_64_COPY from "); ph((unsigned long)from); pf("\n"); #endif - memcpy(loc,from,len); + _dl_lib_memcpy(loc,from,len); } else if (typ==R_X86_64_GLOB_DAT) { /* 6 */ *loc=(unsigned long)_dl_sym(dh,ELF_R_SYM(rel->r_info)); } else if (typ==R_X86_64_JUMP_SLOT) { /* 7 */ diff -uNr dietlibc-0.28/libdl/_dl_search.c dietlibc-0.29/libdl/_dl_search.c --- dietlibc-0.28/libdl/_dl_search.c 2002-03-11 11:21:12.000000000 -0800 +++ dietlibc-0.29/libdl/_dl_search.c 2005-05-13 05:22:32.000000000 -0700 @@ -14,25 +14,26 @@ #include void _dl_set_rpath(const char *path) { _dl_search_rpath=path; } const char* _dl_get_rpath() { return _dl_search_rpath; } +#define _dl_lib_memcpy memcpy #endif /* search a colon (semicolon) seperated path for the libraray "filename" */ static int _dl_search_path(char*buf,int len,const char*path,const int pathlen,const char*filename) { - int fd,i=1,fl=strlen(filename),ml=len-fl; + int fd,i=1,fl=_dl_lib_strlen(filename),ml=len-fl; const char*c,*pe=path+pathlen; if (path) { for (c=path;cml) continue; /* if len(path-entry)+len(filename)+2 is greater than the buffer ? SKIP */ - memcpy(buf,c,i); + _dl_lib_memcpy(buf,c,i); buf[i]='/'; l-=++i; } - memcpy(buf+i,filename,fl); + _dl_lib_memcpy(buf+i,filename,fl); buf[i+fl]=0; #ifdef DEBUG // pf(__func__": "); pf(buf); pf("\n"); @@ -81,7 +82,7 @@ /* 1. search the LD_RUN_PATH (from the executable) */ if (_dl_search_rpath) { - if ((fd=_dl_search_path(buf,len,_dl_search_rpath,strlen(_dl_search_rpath),filename))!=-1) return fd; + if ((fd=_dl_search_path(buf,len,_dl_search_rpath,_dl_lib_strlen(_dl_search_rpath),filename))!=-1) return fd; } /* 2. IF we have a "secure" enviroment THEN search LD_LIBRARY_PATH */ @@ -92,7 +93,7 @@ #endif char *p=getenv("LD_LIBRARY_PATH"); if (p) - if ((fd=_dl_search_path(buf,len,p,strlen(p),filename))!=-1) return fd; + if ((fd=_dl_search_path(buf,len,p,_dl_lib_strlen(p),filename))!=-1) return fd; } /* 3. search all pathes in the the /etc/diet.ld.conf, a dietlibc extension :) */ @@ -106,6 +107,6 @@ /* default path search */ { const char def_path[]="/usr/lib:/lib"; - return _dl_search_path(buf,len,def_path,strlen(def_path),filename); + return _dl_search_path(buf,len,def_path,_dl_lib_strlen(def_path),filename); } } diff -uNr dietlibc-0.28/libdl/dlerror.c dietlibc-0.29/libdl/dlerror.c --- dietlibc-0.28/libdl/dlerror.c 2002-09-13 07:37:21.000000000 -0700 +++ dietlibc-0.29/libdl/dlerror.c 2005-05-13 05:22:32.000000000 -0700 @@ -39,13 +39,13 @@ return "HAE ?!?"; if (_dl_error_location) { - l=strlen(_dl_error_location); - strncpy(p,_dl_error_location,len); len-=l; p+=l; - strncpy(p,": ",len); len-=2; p+=2; + l=_dl_lib_strlen(_dl_error_location); + _dl_lib_strncpy(p,_dl_error_location,len); len-=l; p+=l; + _dl_lib_strncpy(p,": ",len); len-=2; p+=2; } l=_dl_error_msg[_dl_error].len; - strncpy(p,_dl_error_msg[_dl_error].msg,len); len-=l; p+=l; - strncpy(p,_dl_error_data,len); + _dl_lib_strncpy(p,_dl_error_msg[_dl_error].msg,len); len-=l; p+=l; + _dl_lib_strncpy(p,_dl_error_data,len); _dl_error_location=0; _dl_error_data=""; diff -uNr dietlibc-0.28/libdl/dlsym.c dietlibc-0.29/libdl/dlsym.c --- dietlibc-0.28/libdl/dlsym.c 2005-01-28 18:29:16.000000000 -0800 +++ dietlibc-0.29/libdl/dlsym.c 2005-05-13 05:22:32.000000000 -0700 @@ -29,7 +29,7 @@ #ifdef DEBUG // pf(__FUNCTION__); pf(": symbol(\""); pf(name+ptr); pf("\",\""); pf(symbol); pf("\")\n"); #endif - if (strcmp(name+ptr,symbol)==0 && dh->dyn_sym_tab[ind].st_value!=0) { + if (_dl_lib_strcmp(name+ptr,symbol)==0 && dh->dyn_sym_tab[ind].st_value!=0) { if (dh->dyn_sym_tab[ind].st_shndx!=SHN_UNDEF) { sym=(long*)(dh->mem_base+dh->dyn_sym_tab[ind].st_value); break; /* ok found ... */ diff -uNr dietlibc-0.28/libdl/test/CVS/Entries dietlibc-0.29/libdl/test/CVS/Entries --- dietlibc-0.28/libdl/test/CVS/Entries 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/libdl/test/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,3 +0,0 @@ -/test.c/1.1/Thu Jun 21 14:28:02 2001// -/test_so.c/1.1/Thu Jun 21 14:28:02 2001// -D diff -uNr dietlibc-0.28/libdl/test/CVS/Repository dietlibc-0.29/libdl/test/CVS/Repository --- dietlibc-0.28/libdl/test/CVS/Repository 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/libdl/test/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/libdl/test diff -uNr dietlibc-0.28/libdl/test/CVS/Root dietlibc-0.29/libdl/test/CVS/Root --- dietlibc-0.28/libdl/test/CVS/Root 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/libdl/test/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/liblatin1/CVS/Entries dietlibc-0.29/liblatin1/CVS/Entries --- dietlibc-0.28/liblatin1/CVS/Entries 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/liblatin1/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,6 +0,0 @@ -/latin1-iscntrl.c/1.2/Mon Jan 21 15:30:19 2002// -/latin1-isgraph.c/1.4/Sun Sep 14 23:29:03 2003// -/latin1-islower.c/1.3/Sun Sep 14 23:29:03 2003// -/latin1-isprint.c/1.4/Tue Aug 19 17:13:46 2003// -/latin1-isupper.c/1.2/Mon Jan 21 15:30:19 2002// -D diff -uNr dietlibc-0.28/liblatin1/CVS/Repository dietlibc-0.29/liblatin1/CVS/Repository --- dietlibc-0.28/liblatin1/CVS/Repository 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/liblatin1/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/liblatin1 diff -uNr dietlibc-0.28/liblatin1/CVS/Root dietlibc-0.29/liblatin1/CVS/Root --- dietlibc-0.28/liblatin1/CVS/Root 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/liblatin1/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/libm/CVS/Entries dietlibc-0.29/libm/CVS/Entries --- dietlibc-0.28/libm/CVS/Entries 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/libm/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,15 +0,0 @@ -/acosh.c/1.1/Fri Jul 27 20:30:34 2001// -/asinh.c/1.1/Fri Jul 27 20:30:34 2001// -/atanh.c/1.1/Fri Jul 27 20:30:34 2001// -/bessel.c/1.3/Mon Nov 18 01:16:51 2002// -/cosh.c/1.1/Fri Jul 27 20:30:34 2001// -/erf.c/1.2/Mon Nov 18 01:16:51 2002// -/gamma.c/1.2/Mon Nov 18 01:16:51 2002// -/ipow.c/1.2/Mon Mar 4 18:25:54 2002// -/modf.c/1.1/Sun Mar 30 19:19:53 2003// -/poly.c/1.2/Mon Nov 18 01:16:51 2002// -/pow.c/1.4/Fri Oct 10 13:37:34 2003// -/rint.c/1.2/Mon Jul 30 13:45:43 2001// -/sinh.c/1.1/Fri Jul 27 20:30:34 2001// -/tanh.c/1.1/Fri Jul 27 20:30:34 2001// -D diff -uNr dietlibc-0.28/libm/CVS/Repository dietlibc-0.29/libm/CVS/Repository --- dietlibc-0.28/libm/CVS/Repository 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/libm/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/libm diff -uNr dietlibc-0.28/libm/CVS/Root dietlibc-0.29/libm/CVS/Root --- dietlibc-0.28/libm/CVS/Root 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/libm/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/libm/bessel.c dietlibc-0.29/libm/bessel.c --- dietlibc-0.28/libm/bessel.c 2002-11-17 17:16:51.000000000 -0800 +++ dietlibc-0.29/libm/bessel.c 2005-03-15 00:51:23.000000000 -0800 @@ -29,9 +29,9 @@ #endif -#define EXPL(x) ((((short *)&x)[4] & 0x7FFF) >> 0) -#define EXPD(x) ((((short *)&x)[3] & 0x7FF0) >> 4) -#define EXPF(x) ((((short *)&x)[1] & 0x7F80) >> 7) +#define EXPL(x) ((((short *)(void *)&x)[4] & 0x7FFF) >> 0) +#define EXPD(x) ((((short *)(void *)&x)[3] & 0x7FF0) >> 4) +#define EXPF(x) ((((short *)(void *)&x)[1] & 0x7F80) >> 7) #define SQUARE(x) (long) (My - (x) * (x) ) diff -uNr dietlibc-0.28/libm/gamma.c dietlibc-0.29/libm/gamma.c --- dietlibc-0.28/libm/gamma.c 2002-11-17 17:16:51.000000000 -0800 +++ dietlibc-0.29/libm/gamma.c 2005-03-15 00:51:23.000000000 -0800 @@ -50,7 +50,7 @@ static const double coeff[] = { B0, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10 }; int signgam; -#define EXPL(x) (((short *)&x)[4] & 0x7FFF) +#define EXPL(x) (((short *)(void *)&x)[4] & 0x7FFF) static double logfact ( long double x ) { diff -uNr dietlibc-0.28/libpthread/CVS/Entries dietlibc-0.29/libpthread/CVS/Entries --- dietlibc-0.28/libpthread/CVS/Entries 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/libpthread/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,88 +0,0 @@ -/.cvsignore/1.1/Mon Aug 18 17:32:52 2003// -/CHANGES/1.10/Wed Sep 17 15:06:10 2003// -/Makefile/1.15/Mon Aug 18 17:32:52 2003// -/README/1.6/Mon Aug 18 17:32:52 2003// -/pthread_atfork.c/1.6/Mon Aug 18 17:32:52 2003// -/pthread_attr_getdetachstate.c/1.3/Mon Aug 18 17:32:52 2003// -/pthread_attr_getinheritsched.c/1.3/Mon Aug 18 17:32:52 2003// -/pthread_attr_getschedparam.c/1.3/Mon Aug 18 17:32:52 2003// -/pthread_attr_getschedpolicy.c/1.3/Mon Aug 18 17:32:52 2003// -/pthread_attr_getscope.c/1.3/Mon Aug 18 17:32:52 2003// -/pthread_attr_getstackaddr.c/1.3/Mon Aug 18 17:32:52 2003// -/pthread_attr_getstacksize.c/1.2/Mon Aug 18 17:32:52 2003// -/pthread_attr_setdetachstate.c/1.4/Mon Aug 18 17:32:52 2003// -/pthread_attr_setinheritsched.c/1.4/Mon Aug 18 17:32:52 2003// -/pthread_attr_setschedparam.c/1.5/Mon Aug 18 17:32:52 2003// -/pthread_attr_setschedpolicy.c/1.4/Mon Aug 18 17:32:52 2003// -/pthread_attr_setscope.c/1.4/Mon Aug 18 17:32:52 2003// -/pthread_attr_setstackaddr.c/1.3/Mon Aug 18 17:32:52 2003// -/pthread_attr_setstacksize.c/1.3/Mon Aug 18 17:32:52 2003// -/pthread_cleanup.c/1.1/Mon Aug 18 17:32:52 2003// -/pthread_cond_broadcast.c/1.3/Mon Aug 18 17:32:52 2003// -/pthread_cond_destroy.c/1.4/Mon Aug 18 17:32:52 2003// -/pthread_cond_init.c/1.3/Mon Aug 18 17:32:52 2003// -/pthread_cond_signal.c/1.4/Mon Sep 8 11:49:10 2003// -/pthread_cond_timedwait.c/1.5/Mon Aug 18 17:32:52 2003// -/pthread_cond_wait.c/1.3/Mon Aug 18 17:32:52 2003// -/pthread_condattr_getshared.c/1.1/Mon Aug 18 17:32:53 2003// -/pthread_condattr_setshared.c/1.1/Mon Aug 18 17:32:53 2003// -/pthread_create.c/1.12/Wed Sep 17 15:06:10 2003// -/pthread_detach.c/1.3/Mon Aug 18 17:32:53 2003// -/pthread_dns_cruft.c/1.1/Mon Aug 18 17:32:53 2003// -/pthread_equal.c/1.2/Mon Aug 18 17:32:53 2003// -/pthread_errno.c/1.1/Sat Jun 9 17:45:50 2001// -/pthread_fdglue2.c/1.6/Sun Sep 14 04:40:37 2003// -/pthread_fflush.c/1.1/Tue Nov 4 18:09:42 2003// -/pthread_fgetc.c/1.1/Thu May 10 16:22:53 2001// -/pthread_flockfile.c/1.2/Thu Jul 26 16:08:10 2001// -/pthread_fputc.c/1.2/Mon Jul 9 13:54:07 2001// -/pthread_ftrylockfile.c/1.1/Sat Jan 3 02:17:32 2004// -/pthread_funlockfile.c/1.3/Thu Jul 26 16:08:10 2001// -/pthread_internal.c/1.17/Mon Jun 7 17:05:03 2004// -/pthread_join.c/1.4/Mon Sep 29 14:00:59 2003// -/pthread_key.c/1.5/Mon Sep 29 14:00:59 2003// -/pthread_kill.c/1.1/Mon Aug 18 17:32:53 2003// -/pthread_mutex_destroy.c/1.5/Mon Aug 18 17:32:53 2003// -/pthread_mutex_init.c/1.5/Mon Aug 18 17:32:53 2003// -/pthread_mutex_lock.c/1.6/Tue Nov 11 18:27:41 2003// -/pthread_mutex_trylock.c/1.5/Mon Aug 18 17:32:53 2003// -/pthread_mutex_unlock.c/1.6/Tue Nov 11 18:27:41 2003// -/pthread_mutexattr_getkind_np.c/1.2/Mon Aug 18 17:32:53 2003// -/pthread_mutexattr_init.c/1.2/Mon Aug 18 17:32:53 2003// -/pthread_mutexattr_setkind_np.c/1.3/Mon Aug 18 17:32:53 2003// -/pthread_self.c/1.4/Mon Aug 18 17:32:53 2003// -/pthread_semaphore_destroy.c/1.1/Wed Sep 17 15:06:10 2003// -/pthread_semaphore_getvalue.c/1.1/Wed Sep 17 15:06:10 2003// -/pthread_semaphore_init.c/1.1/Wed Sep 17 15:06:10 2003// -/pthread_semaphore_misc.c/1.1/Wed Sep 17 15:06:10 2003// -/pthread_semaphore_post.c/1.1/Wed Sep 17 15:06:10 2003// -/pthread_semaphore_trywait.c/1.1/Wed Sep 17 15:06:10 2003// -/pthread_semaphore_wait.c/1.1/Wed Sep 17 15:06:10 2003// -/pthread_setcancelstate.c/1.4/Mon Aug 18 17:32:53 2003// -/pthread_setschedparam.c/1.4/Mon Aug 18 17:32:53 2003// -/pthread_sigaction.c/1.1/Mon Aug 18 17:32:53 2003// -/pthread_sigmask.c/1.3/Mon Aug 18 17:32:53 2003// -/pthread_spinlock.c/1.6/Mon Aug 18 17:32:53 2003// -/pthread_sys_alloc.c/1.9/Tue Nov 11 18:27:41 2003// -/pthread_sys_close.c/1.2/Mon Aug 18 17:32:53 2003// -/pthread_sys_create.c/1.2/Mon Aug 18 17:32:53 2003// -/pthread_sys_fcntl.c/1.3/Mon Aug 18 17:32:53 2003// -/pthread_sys_fdatasync.c/1.2/Mon Aug 18 17:32:53 2003// -/pthread_sys_fsync.c/1.2/Mon Aug 18 17:32:53 2003// -/pthread_sys_logging.c/1.4/Mon Aug 18 17:32:53 2003// -/pthread_sys_msync.c/1.1/Mon Aug 18 17:32:53 2003// -/pthread_sys_nanosleep.c/1.2/Mon Aug 18 17:32:53 2003// -/pthread_sys_open.c/1.4/Mon Aug 18 17:32:53 2003// -/pthread_sys_pause.c/1.2/Mon Aug 18 17:32:53 2003// -/pthread_sys_read.c/1.2/Mon Aug 18 17:32:53 2003// -/pthread_sys_sigsuspend.c/1.2/Mon Aug 18 17:32:53 2003// -/pthread_sys_sleep.c/1.1/Mon Aug 18 17:32:53 2003// -/pthread_sys_tcdrain.c/1.4/Mon Aug 18 17:32:53 2003// -/pthread_sys_waitpid.c/1.3/Mon Aug 18 17:32:53 2003// -/pthread_sys_write.c/1.2/Mon Aug 18 17:32:53 2003// -/test-basic.c/1.2/Mon Sep 29 14:00:59 2003// -/test-threads_busy.c/1.1/Mon Aug 18 17:32:53 2003// -/test-threads_busy_inc.c/1.1/Mon Aug 18 17:32:53 2003// -/test-threads_many.c/1.2/Mon Sep 29 14:00:59 2003// -/thread_internal.h/1.28/Tue Nov 11 18:27:41 2003// -D diff -uNr dietlibc-0.28/libpthread/CVS/Repository dietlibc-0.29/libpthread/CVS/Repository --- dietlibc-0.28/libpthread/CVS/Repository 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/libpthread/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/libpthread diff -uNr dietlibc-0.28/libpthread/CVS/Root dietlibc-0.29/libpthread/CVS/Root --- dietlibc-0.28/libpthread/CVS/Root 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/libpthread/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/libpthread/pthread_key.c dietlibc-0.29/libpthread/pthread_key.c --- dietlibc-0.28/libpthread/pthread_key.c 2003-09-29 07:00:59.000000000 -0700 +++ dietlibc-0.29/libpthread/pthread_key.c 2005-03-15 00:51:23.000000000 -0800 @@ -19,18 +19,18 @@ void __thread_exit__key(_pthread_descr th) { int i; - void (*dstr)(const void*); + void (*dstr)(void*); for (i=0;itkd[i]; + void*data=th->tkd[i]; if (data) dstr(data); } } } /* "create" a thread specific data key */ -int pthread_key_create(pthread_key_t*key,void(*destructor)(const void*)) { +int pthread_key_create(pthread_key_t*key,void(*destructor)(void*)) { _pthread_descr this=__thread_self(); int ret=EAGAIN,i; @@ -72,9 +72,9 @@ /* get thread specific data */ -const void*pthread_getspecific(pthread_key_t key) { +void*pthread_getspecific(pthread_key_t key) { _pthread_descr this=__thread_self(); - const void*ret=0; + void*ret=0; if ((keytkd[key]; @@ -87,7 +87,7 @@ _pthread_descr this=__thread_self(); if ((keytkd[key]=value; + this->tkd[key]=(void *)value; /* UNCONST */ return 0; } return EINVAL; diff -uNr dietlibc-0.28/libpthread/thread_internal.h dietlibc-0.29/libpthread/thread_internal.h --- dietlibc-0.28/libpthread/thread_internal.h 2003-11-11 10:27:41.000000000 -0800 +++ dietlibc-0.29/libpthread/thread_internal.h 2005-03-15 00:51:23.000000000 -0800 @@ -78,7 +78,7 @@ struct thread_cleanup_t*cleanup_stack; /* thread specific data */ - const void*tkd[PTHREAD_KEYS_MAX]; + void*tkd[PTHREAD_KEYS_MAX]; #ifdef PTHREAD_HANDLE_DNS_CORRECT /* DNS cruft */ @@ -92,7 +92,7 @@ /* thread keys */ struct _thread_key { int used; - void (*destructor)(const void*); + void (*destructor)(void*); }; /* internal stuff */ diff -uNr dietlibc-0.28/libregex/CVS/Entries dietlibc-0.29/libregex/CVS/Entries --- dietlibc-0.28/libregex/CVS/Entries 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/libregex/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,2 +0,0 @@ -/rx.c/1.26/Sat Sep 11 11:59:38 2004// -D diff -uNr dietlibc-0.28/libregex/CVS/Repository dietlibc-0.29/libregex/CVS/Repository --- dietlibc-0.28/libregex/CVS/Repository 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/libregex/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/libregex diff -uNr dietlibc-0.28/libregex/CVS/Root dietlibc-0.29/libregex/CVS/Root --- dietlibc-0.28/libregex/CVS/Root 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/libregex/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/libregex/rx.c dietlibc-0.29/libregex/rx.c --- dietlibc-0.28/libregex/rx.c 2004-09-11 04:59:38.000000000 -0700 +++ dietlibc-0.29/libregex/rx.c 2005-05-08 07:18:28.000000000 -0700 @@ -117,7 +117,7 @@ printf("matching atom REGEX against \"%s\"\n",s); printf("a->bnum is %d\n",a->bnum); #endif - if ((matchlen=a->u.r.m(&a->u.r,s,ofs,preg,0,eflags))>=0) { + if ((matchlen=a->u.r.m(&a->u.r,(const char*)s,ofs,preg,0,eflags))>=0) { assert(a->bnum>=0); preg->l[a->bnum].rm_so=ofs; preg->l[a->bnum].rm_eo=ofs+matchlen; @@ -180,7 +180,7 @@ return -1; match: if (a->next) - return ((struct atom*)(a->next))->m(a->next,s+matchlen,ofs+matchlen,preg,plus+matchlen,eflags); + return ((struct atom*)(a->next))->m(a->next,(const char*)s+matchlen,ofs+matchlen,preg,plus+matchlen,eflags); else return plus+matchlen; } @@ -197,10 +197,9 @@ return s+2; } a->type=REGEX; - if ((tmp=parseregex(&a->u.r,s+1,rx))!=s) { - if (*tmp==')') - return tmp+1; - } + tmp=parseregex(&a->u.r,s+1,rx); + if (*tmp==')') + return tmp+1; case 0: case '|': case ')': @@ -336,18 +335,16 @@ static const char* parsebranch(struct branch*__restrict__ b,const char*__restrict__ s,regex_t*__restrict__ rx,int*__restrict__ pieces) { struct piece p; - const char *tmp; /* the gcc warning here is bogus */ + const char *tmp = NULL; b->m=matchbranch; b->num=0; b->p=0; for (;;) { - if (*s=='|') { - if (b->num==0) { - tmp=s+1; - p.a.type=EMPTY; - p.a.m=matchempty; - p.min=p.max=1; - p.m=matchpiece; - } + if (*s=='|' && b->num==0) { + tmp=s+1; + p.a.type=EMPTY; + p.a.m=matchempty; + p.min=p.max=1; + p.m=matchpiece; } else { tmp=parsepiece(&p,s,rx); if (tmp==s) return s; @@ -362,7 +359,7 @@ // printf("%p (size %d)\n",b->p,b->num*sizeof(p)); b->p[b->num-1]=p; // printf("assigned piece %d in branch %p\n",b->num-1,b->p); - if (*tmp=='|') { break; } + if (*tmp=='|') break; s=tmp; } *pieces+=b->num; @@ -395,9 +392,14 @@ r->m=matchregex; r->num=0; r->b=0; r->pieces=0; p->brackets=0; + b.next=0; + if (*s==')' || !*s) { + r->m=matchempty; + return s; + } for (;;) { tmp=parsebranch(&b,s,p,&r->pieces); - if (tmp==s) return s; + if (tmp==s && *s!=')') return s; // printf("r->b from %p to ",r->b); { struct branch* tmp; @@ -407,6 +409,10 @@ } // printf("%p (size %d)\n",r->b,r->num*sizeof(b)); r->b[r->num-1]=b; + if (*s==')') { + r->b[r->num-1].m=matchempty; + return s; + } // printf("assigned branch %d at %p\n",r->num-1,r->b); s=tmp; if (*s=='|') ++s; } @@ -433,13 +439,15 @@ static void branch_putnext(struct branch*__restrict__ b,void*__restrict__ next) { int i; - for (i=0; inum-1; ++i) { - if (b->p[i+1].min==1 && b->p[i+1].max==1) - piece_putnext(&b->p[i],&b->p[i+1].a); - else - piece_putnext(&b->p[i],&b->p[i+1]); + if (b->m!=matchempty) { + for (i=0; inum-1; ++i) { + if (b->p[i+1].min==1 && b->p[i+1].max==1) + piece_putnext(&b->p[i],&b->p[i+1].a); + else + piece_putnext(&b->p[i],&b->p[i+1]); + } + piece_putnext(&b->p[i],0); } - piece_putnext(&b->p[i],0); b->next=next; } @@ -456,7 +464,7 @@ const char* t; preg->cflags=cflags; t=parseregex(&preg->r,regex,preg); - if (t==regex) return -1; + if (t==regex && *regex!=0) return -1; regex_putnext(&preg->r,0); return 0; } diff -uNr dietlibc-0.28/librpc/CVS/Entries dietlibc-0.29/librpc/CVS/Entries --- dietlibc-0.28/librpc/CVS/Entries 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/librpc/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,39 +0,0 @@ -/auth_none.c/1.6/Tue Aug 19 19:34:18 2003// -/auth_unix.c/1.6/Tue Aug 19 19:34:18 2003// -/authunix_prot.c/1.2/Fri Jun 15 16:14:51 2001// -/bindresvport.c/1.4/Mon Jun 25 15:39:09 2001// -/clnt_generic.c/1.4/Mon Jun 25 15:39:09 2001// -/clnt_perror.c/1.2/Tue Aug 19 19:34:18 2003// -/clnt_raw.c/1.5/Tue Aug 19 19:34:18 2003// -/clnt_simple.c/1.4/Tue Aug 19 19:34:18 2003// -/clnt_tcp.c/1.8/Fri Sep 12 23:14:45 2003// -/clnt_udp.c/1.8/Fri Sep 12 22:30:36 2003// -/get_myaddress.c/1.3/Tue Aug 19 19:34:18 2003// -/getrpcent.c/1.2/Tue Oct 9 18:02:11 2001// -/getrpcport.c/1.3/Tue Jun 26 15:19:11 2001// -/pmap_clnt.c/1.4/Sat Feb 23 22:18:43 2002// -/pmap_getmaps.c/1.3/Fri Oct 5 00:26:12 2001// -/pmap_getport.c/1.4/Tue Aug 19 16:32:24 2003// -/pmap_prot.c/1.1/Wed May 2 23:19:56 2001// -/pmap_prot2.c/1.2/Fri Jun 15 16:14:51 2001// -/pmap_rmt.c/1.6/Fri Sep 12 23:14:45 2003// -/rpc_callmsg.c/1.3/Tue Jun 26 15:19:11 2001// -/rpc_commondata.c/1.1/Wed May 2 23:19:56 2001// -/rpc_dtablesize.c/1.2/Tue Aug 19 19:34:18 2003// -/rpc_prot.c/1.4/Tue Aug 19 19:34:18 2003// -/svc.c/1.5/Tue Aug 19 19:34:18 2003// -/svc_auth.c/1.2/Tue Aug 19 19:34:18 2003// -/svc_auth_unix.c/1.4/Tue Aug 19 19:34:18 2003// -/svc_raw.c/1.5/Tue Aug 19 19:34:18 2003// -/svc_run.c/1.3/Thu May 31 17:03:41 2001// -/svc_simple.c/1.4/Tue Aug 19 19:34:18 2003// -/svc_tcp.c/1.7/Fri Sep 12 23:14:45 2003// -/svc_udp.c/1.7/Tue Aug 19 19:34:18 2003// -/xdr.c/1.4/Tue Aug 19 15:17:04 2003// -/xdr_array.c/1.4/Wed Jul 31 21:42:20 2002// -/xdr_float.c/1.1/Wed May 2 23:19:57 2001// -/xdr_mem.c/1.8/Tue Aug 19 19:34:18 2003// -/xdr_rec.c/1.10/Tue Aug 19 23:03:14 2003// -/xdr_reference.c/1.3/Mon Jun 25 15:39:09 2001// -/xdr_stdio.c/1.6/Tue Aug 19 19:34:18 2003// -D diff -uNr dietlibc-0.28/librpc/CVS/Repository dietlibc-0.29/librpc/CVS/Repository --- dietlibc-0.28/librpc/CVS/Repository 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/librpc/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/librpc diff -uNr dietlibc-0.28/librpc/CVS/Root dietlibc-0.29/librpc/CVS/Root --- dietlibc-0.28/librpc/CVS/Root 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/librpc/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/librpc/clnt_udp.c dietlibc-0.29/librpc/clnt_udp.c --- dietlibc-0.28/librpc/clnt_udp.c 2003-09-12 15:30:36.000000000 -0700 +++ dietlibc-0.29/librpc/clnt_udp.c 2005-03-15 00:51:23.000000000 -0800 @@ -225,7 +225,7 @@ register int outlen; register int inlen; struct timeval singlewait; - int fromlen; + socklen_t fromlen; #ifdef FD_SETSIZE fd_set readfds; diff -uNr dietlibc-0.28/librpc/getrpcent.c dietlibc-0.29/librpc/getrpcent.c --- dietlibc-0.28/librpc/getrpcent.c 2001-10-09 11:02:11.000000000 -0700 +++ dietlibc-0.29/librpc/getrpcent.c 2005-03-15 00:51:23.000000000 -0800 @@ -45,6 +45,7 @@ #include #include #include +#define index strchr /* * Internet version. @@ -63,12 +64,6 @@ static struct rpcent *interpret(const char* val, size_t len); -#ifndef __linux__ -static char *index(); -#else -char *index(); -#endif - static char RPCDB[] = "/etc/rpc"; static struct rpcdata *_rpcdata() diff -uNr dietlibc-0.28/librpc/pmap_rmt.c dietlibc-0.29/librpc/pmap_rmt.c --- dietlibc-0.28/librpc/pmap_rmt.c 2003-09-12 16:14:45.000000000 -0700 +++ dietlibc-0.29/librpc/pmap_rmt.c 2005-03-15 00:51:23.000000000 -0800 @@ -234,7 +234,8 @@ AUTH *unix_auth = authunix_create_default(); XDR xdr_stream; register XDR *xdrs = &xdr_stream; - int outlen, inlen, fromlen, nets; + int outlen, inlen, nets; + socklen_t fromlen; register int sock; int on = 1; diff -uNr dietlibc-0.28/librpc/svc_tcp.c dietlibc-0.29/librpc/svc_tcp.c --- dietlibc-0.28/librpc/svc_tcp.c 2003-09-12 16:14:45.000000000 -0700 +++ dietlibc-0.29/librpc/svc_tcp.c 2005-03-15 00:51:23.000000000 -0800 @@ -129,7 +129,7 @@ register SVCXPRT *xprt; register struct tcp_rendezvous *r; struct sockaddr_in addr; - int len = sizeof(struct sockaddr_in); + socklen_t len = sizeof(struct sockaddr_in); if (sock == RPC_ANYSOCK) { if ((sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) { @@ -227,7 +227,7 @@ int sock; struct tcp_rendezvous *r; struct sockaddr_in addr; - int len; + socklen_t len; r = (struct tcp_rendezvous *) xprt->xp_p1; again: diff -uNr dietlibc-0.28/librpc/svc_udp.c dietlibc-0.29/librpc/svc_udp.c --- dietlibc-0.28/librpc/svc_udp.c 2003-08-19 12:34:18.000000000 -0700 +++ dietlibc-0.29/librpc/svc_udp.c 2005-03-15 00:51:23.000000000 -0800 @@ -102,7 +102,7 @@ register SVCXPRT *xprt; register struct svcudp_data *su; struct sockaddr_in addr; - int len = sizeof(struct sockaddr_in); + socklen_t len = sizeof(struct sockaddr_in); if (sock == RPC_ANYSOCK) { if ((sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) { @@ -173,13 +173,15 @@ register int rlen; char *reply; unsigned long replylen; + socklen_t len; again: - xprt->xp_addrlen = sizeof(struct sockaddr_in); + len = sizeof(struct sockaddr_in); rlen = recvfrom(xprt->xp_sock, rpc_buffer(xprt), (int) su->su_iosz, 0, (struct sockaddr *) &(xprt->xp_raddr), - &(xprt->xp_addrlen)); + &len); + xprt->xp_addrlen = len; if (rlen == -1 && errno == EINTR) goto again; if (rlen < (int)(4 * sizeof(unsigned long))) diff -uNr dietlibc-0.28/librpc/xdr.c dietlibc-0.29/librpc/xdr.c --- dietlibc-0.28/librpc/xdr.c 2003-08-19 08:17:04.000000000 -0700 +++ dietlibc-0.29/librpc/xdr.c 2005-04-10 06:59:32.000000000 -0700 @@ -120,9 +120,9 @@ switch (xdrs->x_op) { case XDR_ENCODE: l = (unsigned long) *up; - return XDR_PUTLONG(xdrs, &l); + return XDR_PUTLONG(xdrs, (long*)&l); case XDR_DECODE: - if (!XDR_GETLONG(xdrs, &l)) + if (!XDR_GETLONG(xdrs, (long*)&l)) return FALSE; *up = (unsigned int) l; case XDR_FREE: @@ -221,10 +221,10 @@ case XDR_ENCODE: l = (unsigned long) * usp; - return (XDR_PUTLONG(xdrs, &l)); + return (XDR_PUTLONG(xdrs, (long*)&l)); case XDR_DECODE: - if (!XDR_GETLONG(xdrs, &l)) { + if (!XDR_GETLONG(xdrs, (long*)&l)) { return (FALSE); } *usp = (unsigned short) l; diff -uNr dietlibc-0.28/librpc/xdr_float.c dietlibc-0.29/librpc/xdr_float.c --- dietlibc-0.28/librpc/xdr_float.c 2001-05-02 16:19:57.000000000 -0700 +++ dietlibc-0.29/librpc/xdr_float.c 2005-03-15 00:51:23.000000000 -0800 @@ -53,7 +53,7 @@ * This routine works on Suns (Sky / 68000's) and Vaxen. */ -#ifdef __linux__ +#if defined(__linux__) && !defined(sparc) /* cheat big time */ #define sparc #endif diff -uNr dietlibc-0.28/libshell/CVS/Entries dietlibc-0.29/libshell/CVS/Entries --- dietlibc-0.28/libshell/CVS/Entries 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/libshell/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,6 +0,0 @@ -/basename.c/1.1/Tue Jul 17 17:39:08 2001// -/dirname.c/1.3/Tue Jan 27 13:31:05 2004// -/fnmatch.c/1.14/Tue Jan 27 21:43:55 2004// -/glob.c/1.8/Wed Feb 12 13:20:39 2003// -/realpath.c/1.10/Mon May 10 16:44:14 2004// -D diff -uNr dietlibc-0.28/libshell/CVS/Repository dietlibc-0.29/libshell/CVS/Repository --- dietlibc-0.28/libshell/CVS/Repository 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/libshell/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/libshell diff -uNr dietlibc-0.28/libshell/CVS/Root dietlibc-0.29/libshell/CVS/Root --- dietlibc-0.28/libshell/CVS/Root 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/libshell/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/libstdio/CVS/Entries dietlibc-0.29/libstdio/CVS/Entries --- dietlibc-0.28/libstdio/CVS/Entries 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/libstdio/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,44 +0,0 @@ -/clearerr.c/1.2/Tue Nov 4 18:09:42 2003// -/fclose.c/1.6/Tue Nov 11 18:39:51 2003// -/fdglue.c/1.12/Tue Mar 2 21:27:19 2004// -/fdglue2.c/1.15/Tue Mar 2 21:27:19 2004// -/fdopen.c/1.6/Tue Nov 4 18:09:42 2003// -/fdprintf.c/1.1/Tue Jul 31 17:19:55 2001// -/feof.c/1.4/Tue Nov 11 18:27:41 2003// -/ferror.c/1.2/Tue Nov 11 18:27:41 2003// -/fflush.c/1.18/Tue Nov 4 18:09:42 2003// -/fgetc_unlocked.c/1.8/Tue Nov 11 18:31:27 2003// -/fgetpos.c/1.1/Mon Oct 22 20:20:53 2001// -/fgets.c/1.5/Tue Nov 11 18:39:51 2003// -/fileno.c/1.2/Tue Nov 11 18:31:27 2003// -/fopen.c/1.8/Tue Nov 11 18:27:41 2003// -/fprintf.c/1.3/Wed Jul 18 01:26:10 2001// -/fputc_unlocked.c/1.14/Tue Nov 11 18:27:41 2003// -/fputs.c/1.2/Tue Nov 11 18:39:51 2003// -/fread.c/1.20/Fri Jun 4 17:37:47 2004// -/freopen.c/1.7/Tue Nov 11 18:27:41 2003// -/fscanf.c/1.2/Tue Aug 14 16:56:51 2001// -/fseek.c/1.7/Tue Nov 4 18:09:42 2003// -/fseeko.c/1.5/Tue Nov 4 18:09:42 2003// -/fseeko64.c/1.6/Tue Nov 4 18:09:42 2003// -/fsetpos.c/1.1/Mon Oct 22 20:20:53 2001// -/ftell.c/1.5/Fri Nov 14 14:52:16 2003// -/ftello.c/1.4/Fri Nov 14 14:52:16 2003// -/ftello64.c/1.6/Fri Nov 14 14:52:16 2003// -/fwrite.c/1.15/Wed Apr 14 13:13:29 2004// -/printf.c/1.4/Wed Jul 18 01:26:10 2001// -/putchar.c/1.3/Mon Jul 8 20:55:32 2002// -/puts.c/1.4/Tue Nov 11 18:31:27 2003// -/scanf.c/1.2/Tue Aug 14 16:56:51 2001// -/setvbuf.c/1.8/Tue Nov 4 18:09:42 2003// -/stderr.c/1.9/Sun Sep 14 04:40:37 2003// -/stdin.c/1.9/Wed Oct 29 17:26:43 2003// -/stdout.c/1.8/Sun Sep 14 04:40:37 2003// -/tmpfile.c/1.5/Tue Nov 4 18:09:42 2003// -/ungetc.c/1.5/Tue Nov 4 18:09:42 2003// -/vfdprintf.c/1.2/Mon Nov 18 01:16:51 2002// -/vfprintf.c/1.2/Thu Jul 26 11:31:45 2001// -/vfscanf.c/1.1/Wed Jul 11 22:29:08 2001// -/vprintf.c/1.8/Sat Feb 23 22:18:43 2002// -/vscanf.c/1.2/Tue Aug 7 21:04:07 2001// -D diff -uNr dietlibc-0.28/libstdio/CVS/Repository dietlibc-0.29/libstdio/CVS/Repository --- dietlibc-0.28/libstdio/CVS/Repository 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/libstdio/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/libstdio diff -uNr dietlibc-0.28/libstdio/CVS/Root dietlibc-0.29/libstdio/CVS/Root --- dietlibc-0.28/libstdio/CVS/Root 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/libstdio/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/libugly/CVS/Entries dietlibc-0.29/libugly/CVS/Entries --- dietlibc-0.28/libugly/CVS/Entries 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/libugly/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,66 +0,0 @@ -/addmntent.c/1.2/Fri Nov 14 15:16:55 2003// -/asctime.c/1.1/Thu Feb 1 22:14:06 2001// -/asctime_r.c/1.2/Fri Jul 20 13:10:07 2001// -/asprintf.c/1.5/Tue Jan 29 02:00:05 2002// -/ctime.c/1.3/Mon Jul 22 15:54:34 2002// -/difftime.c/1.5/Sat Feb 23 21:06:17 2002// -/dirfd.c/1.1/Tue Nov 13 16:19:36 2001// -/endmntent.c/1.2/Wed Jun 11 08:20:47 2003// -/facilitynames.c/1.1/Fri Mar 16 20:09:19 2001// -/freeaddrinfo.c/1.1/Fri May 18 19:15:01 2001// -/ftime.c/1.1/Fri May 11 20:08:59 2001// -/gai_strerror.c/1.3/Sat Oct 6 23:49:59 2001// -/getaddrinfo.c/1.11/Mon Oct 6 23:42:53 2003// -/gethostent.c/1.11/Mon Jun 23 10:48:13 2003// -/getmntent.c/1.4/Thu May 9 01:09:49 2002// -/getnameinfo.c/1.8/Fri Oct 31 01:34:37 2003// -/getprotobyname.c/1.1/Thu Oct 25 22:23:55 2001// -/getprotobyname_r.c/1.2/Mon Oct 29 17:21:10 2001// -/getprotobynumber.c/1.1/Thu Oct 25 22:23:55 2001// -/getprotobynumber_r.c/1.2/Mon Oct 29 17:21:10 2001// -/getprotoent.c/1.10/Mon Oct 29 17:21:10 2001// -/getprotoent_r.c/1.3/Thu May 9 01:01:17 2002// -/getservbyname.c/1.1/Wed Oct 24 17:06:04 2001// -/getservbyname_r.c/1.4/Sat Jun 1 17:11:27 2002// -/getservbyport.c/1.1/Wed Oct 24 17:06:04 2001// -/getservbyport_r.c/1.3/Mon Oct 29 17:21:10 2001// -/getservent.c/1.9/Mon Oct 29 17:21:10 2001// -/getservent_r.c/1.7/Thu May 9 01:01:17 2002// -/gmtime.c/1.1/Thu Feb 1 23:33:25 2001// -/gmtime_r.c/1.6/Tue Jan 1 22:00:43 2002// -/grantpt.c/1.1/Mon Feb 18 19:53:17 2002// -/hasmntopt.c/1.2/Sat Jan 26 22:36:46 2002// -/iconv.c/1.9/Mon Apr 5 16:58:48 2004// -/iconv_close.c/1.6/Sat Feb 23 22:18:44 2002// -/iconv_open.c/1.7/Mon Dec 1 17:42:12 2003// -/isleap.c/1.2/Sat Feb 23 22:18:44 2002// -/localtime.c/1.1/Thu Feb 1 23:39:08 2001// -/localtime_r.c/1.7/Sat Mar 27 00:47:00 2004// -/logging.c/1.16/Tue Nov 11 18:27:41 2003// -/mktime.c/1.10/Sat Mar 27 00:47:00 2004// -/netent.c/1.5/Tue Oct 9 18:02:11 2001// -/openpty.c/1.4/Sat Feb 23 22:18:44 2002// -/pclose.c/1.1/Mon Feb 12 19:01:37 2001// -/popen.c/1.6/Tue Jan 29 18:54:03 2002// -/prioritynames.c/1.1/Fri Mar 16 20:09:19 2001// -/protoent_buf.c/1.1/Thu Oct 25 22:23:55 2001// -/ptsname.c/1.2/Sat Feb 23 22:18:44 2002// -/putpwent.c/1.3/Sat Feb 9 00:45:19 2002// -/servent_buf.c/1.1/Wed Oct 24 17:06:04 2001// -/setenv.c/1.4/Thu Jan 24 00:43:11 2002// -/setmntent.c/1.1/Sun May 6 00:34:27 2001// -/strftime.c/1.8/Tue Feb 18 21:00:14 2003// -/strndup.c/1.3/Tue Aug 19 21:40:28 2003// -/strptime.c/1.1/Thu Nov 20 23:48:47 2003// -/strsignal.c/1.8/Wed Sep 25 15:03:19 2002// -/system.c/1.15/Sat Feb 23 21:06:17 2002// -/time_table_spd.c/1.4/Fri Jul 27 14:39:19 2001// -/timegm.c/1.3/Fri Jan 21 18:01:04 2005// -/timezone.c/1.2/Thu Nov 8 14:58:57 2001// -/tzfile.c/1.18/Fri Dec 17 18:47:58 2004// -/unlockpt.c/1.1/Mon Feb 18 19:53:17 2002// -/unsetenv.c/1.2/Wed Apr 14 13:13:29 2004// -/utent.c/1.8/Sat Feb 23 22:18:44 2002// -/vasprintf.c/1.3/Thu Oct 30 11:55:08 2003// -/wtent.c/1.5/Tue Apr 8 16:38:10 2003// -D diff -uNr dietlibc-0.28/libugly/CVS/Repository dietlibc-0.29/libugly/CVS/Repository --- dietlibc-0.28/libugly/CVS/Repository 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/libugly/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/libugly diff -uNr dietlibc-0.28/libugly/CVS/Root dietlibc-0.29/libugly/CVS/Root --- dietlibc-0.28/libugly/CVS/Root 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/libugly/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/libugly/getaddrinfo.c dietlibc-0.29/libugly/getaddrinfo.c --- dietlibc-0.28/libugly/getaddrinfo.c 2003-10-06 16:42:53.000000000 -0700 +++ dietlibc-0.29/libugly/getaddrinfo.c 2005-05-13 08:47:53.000000000 -0700 @@ -6,6 +6,11 @@ #include #include #include +#include "dietfeatures.h" + +#ifdef WANT_PLUGPLAY_DNS +extern int __dns_plugplay_interface; +#endif /* XXX TODO FIXME */ @@ -76,6 +81,10 @@ memmove(&foo->ip.ip4.sin_addr,h.h_addr_list[0],4); } foo->ip.ip6.sin6_family=foo->ai.ai_family=family; +#ifdef WANT_PLUGPLAY_DNS + if (family==AF_INET6) + foo->ip.ip6.sin6_scope_id=__dns_plugplay_interface; +#endif if (h.h_name) { foo->ai.ai_canonname=foo->name; memmove(foo->name,h.h_name,strlen(h.h_name)+1); @@ -115,7 +124,7 @@ struct servent* se; if ((se=getservbyname(service,"udp"))) { /* found a service. */ port=se->s_port; - blah2: +blah2: if (family==PF_INET6) foo->ip.ip6.sin6_port=port; else diff -uNr dietlibc-0.28/libugly/iconv.c dietlibc-0.29/libugly/iconv.c --- dietlibc-0.28/libugly/iconv.c 2004-04-05 09:58:48.000000000 -0700 +++ dietlibc-0.29/libugly/iconv.c 2005-04-10 06:59:32.000000000 -0700 @@ -11,8 +11,8 @@ enum charset from=ic_from(cd); enum charset to=ic_to(cd); if (!inbuf || !*inbuf) return 0; - in=(char*)(*inbuf); - out=(char*)(*outbuf); + in=(unsigned char*)(*inbuf); + out=(unsigned char*)(*outbuf); k=0; while (*inbytesleft) { unsigned int v; @@ -170,6 +170,6 @@ in+=i; *inbytesleft-=i; out+=j; *outbytesleft-=j; } - *inbuf=in; *outbuf=out; + *inbuf=(char*)in; *outbuf=(char*)out; return result; } diff -uNr dietlibc-0.28/libugly/mktime.c dietlibc-0.29/libugly/mktime.c --- dietlibc-0.28/libugly/mktime.c 2004-03-26 16:47:00.000000000 -0800 +++ dietlibc-0.29/libugly/mktime.c 2005-03-15 00:51:23.000000000 -0800 @@ -1,4 +1,7 @@ #define _GNU_SOURCE +#include +#undef __attribute_dontuse__ +#define __attribute_dontuse__ #include #include "dietfeatures.h" diff -uNr dietlibc-0.28/libugly/tzfile.c dietlibc-0.29/libugly/tzfile.c --- dietlibc-0.28/libugly/tzfile.c 2004-12-17 10:47:58.000000000 -0800 +++ dietlibc-0.29/libugly/tzfile.c 2005-04-10 06:59:32.000000000 -0700 @@ -14,7 +14,7 @@ char* tzname[2]={"GMT","GMT"}; #ifdef WANT_TZFILE_PARSER -static char *tzfile; +static unsigned char *tzfile; static int tzlen=-1; void __maplocaltime(void); @@ -48,7 +48,7 @@ time_t __tzfile_map(time_t t, int *isdst, int forward); time_t __tzfile_map(time_t t, int *isdst, int forward) { /* "TZif" plus 16 reserved bytes. */ - char *tmp; + unsigned char *tmp; int i; int tzh_ttisgmtcnt, tzh_ttisstdcnt, tzh_leapcnt, tzh_timecnt, tzh_typecnt, tzh_charcnt; *isdst=0; @@ -90,7 +90,7 @@ if (forward) { for (i=0; i= t) { - char* tz=tmp; + unsigned char* tz=tmp; /* printf("match at %d\n",i); */ tmp+=tzh_timecnt*4; i=tmp[i-1]; @@ -100,7 +100,7 @@ tmp+=i*6; /* printf("(%lu,%d,%d)\n",ntohl(*(int*)tmp),tmp[4],tmp[5]); */ *isdst=tmp[4]; - tzname[0]=tz+tmp[5]; + tzname[0]=(char*)(tz+tmp[5]); timezone=__myntohl(tmp); return t+timezone; } diff -uNr dietlibc-0.28/mips/CVS/Entries dietlibc-0.29/mips/CVS/Entries --- dietlibc-0.28/mips/CVS/Entries 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/mips/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,37 +0,0 @@ -/Makefile.add/1.14/Thu Aug 12 12:51:36 2004// -/__longjmp.S/1.3/Mon Apr 7 18:24:53 2003// -/__pread.S/1.1/Tue May 11 13:33:53 2004// -/__pwrite.S/1.1/Tue May 11 13:33:53 2004// -/__testandset.S/1.4/Wed Feb 19 12:10:12 2003// -/accept.S/1.1/Thu Sep 12 13:07:47 2002// -/bind.S/1.1/Thu Sep 12 13:11:22 2002// -/clone.S/1.6/Wed Mar 20 12:27:03 2002// -/connect.S/1.1/Thu Sep 12 13:07:47 2002// -/divdi3.c/1.1/Thu Aug 12 12:51:36 2004// -/errlist.S/1.1/Mon Jan 13 15:16:28 2003// -/getpeername.S/1.1/Thu Sep 12 13:07:47 2002// -/getsockname.S/1.1/Thu Sep 12 13:07:47 2002// -/getsockopt.S/1.1/Thu Sep 12 13:07:47 2002// -/listen.S/1.1/Thu Sep 12 13:07:47 2002// -/pipe.S/1.3/Mon Oct 21 11:29:25 2002// -/pread.c/1.2/Mon May 10 20:34:12 2004// -/pread64.c/1.2/Mon May 10 20:34:12 2004// -/pwrite.c/1.2/Mon May 10 20:34:12 2004// -/pwrite64.c/1.2/Mon May 10 20:34:12 2004// -/recv.S/1.1/Thu Sep 12 13:07:47 2002// -/recvfrom.S/1.1/Thu Sep 12 13:07:47 2002// -/recvmsg.S/1.1/Thu Sep 12 13:07:47 2002// -/select.S/1.2/Tue Jan 30 14:46:53 2001// -/send.S/1.1/Thu Sep 12 13:07:47 2002// -/sendmsg.S/1.1/Thu Sep 12 13:07:47 2002// -/sendto.S/1.1/Thu Sep 12 13:07:47 2002// -/setjmp.S/1.4/Thu Sep 12 10:33:48 2002// -/setsockopt.S/1.1/Thu Sep 12 13:07:47 2002// -/shutdown.S/1.1/Thu Sep 12 13:11:22 2002// -/socket.S/1.1/Thu Sep 12 13:07:47 2002// -/socketcall.S/1.1/Thu Sep 12 13:11:22 2002// -/socketpair.S/1.1/Thu Sep 12 13:07:47 2002// -/start.S/1.7/Sat Sep 11 12:37:57 2004// -/syscalls.h/1.5/Thu Nov 6 13:00:51 2003// -/unified.S/1.8/Wed Dec 11 19:31:04 2002// -D diff -uNr dietlibc-0.28/mips/CVS/Repository dietlibc-0.29/mips/CVS/Repository --- dietlibc-0.28/mips/CVS/Repository 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/mips/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/mips diff -uNr dietlibc-0.28/mips/CVS/Root dietlibc-0.29/mips/CVS/Root --- dietlibc-0.28/mips/CVS/Root 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/mips/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/mips/errlist.S dietlibc-0.29/mips/errlist.S --- dietlibc-0.28/mips/errlist.S 2003-01-13 07:16:28.000000000 -0800 +++ dietlibc-0.29/mips/errlist.S 2005-05-14 16:35:39.000000000 -0700 @@ -169,6 +169,10 @@ .long .LC158 .long .LC159 .long .LC160 + .long .LC161 + .long .LC162 + .long .LC163 + .long .LC164 .long 0 .size sys_errlist,.-sys_errlist @@ -325,6 +329,10 @@ .LC158: .string "AIO operation canceled" .LC159: .string "No medium found" .LC160: .string "Wrong medium type" +.LC161: .string "Required key not available" +.LC162: .string "Key has expired" +.LC163: .string "Key has been revoked" +.LC164: .string "Key was rejected by service" /* handled in strerror.c .LC1133: .string "Quota exceeded" */ diff -uNr dietlibc-0.28/mips/start.S dietlibc-0.29/mips/start.S --- dietlibc-0.28/mips/start.S 2004-09-11 05:37:57.000000000 -0700 +++ dietlibc-0.29/mips/start.S 2005-05-13 11:39:32.000000000 -0700 @@ -1,3 +1,5 @@ +#include "dietfeatures.h" + #define zero 0 #define ra 31 #define sp 29 @@ -37,11 +39,16 @@ addu $a2, $a0, 1 /* load envp */ sll $a2, $a2, 2 +#ifdef WANT_DYNAMIC +/* FIXME: dl_init parameter ??? */ + la $25, _dyn_start +#else #ifdef WANT_STACKGAP la $25, stackgap #else la $25, main #endif +#endif add $a2, $a2, $a1 sw $a2, environ jalr $25 diff -uNr dietlibc-0.28/mips/syscalls.h dietlibc-0.29/mips/syscalls.h --- dietlibc-0.28/mips/syscalls.h 2003-11-06 05:00:51.000000000 -0800 +++ dietlibc-0.29/mips/syscalls.h 2005-03-23 11:05:25.000000000 -0800 @@ -1,970 +1,6 @@ /* - * SVR4 syscalls are in the range from 1 to 999 - */ -#define __NR_SVR4 0 -#define __NR_SVR4_syscall (__NR_SVR4 + 0) -#define __NR_SVR4_exit (__NR_SVR4 + 1) -#define __NR_SVR4_fork (__NR_SVR4 + 2) -#define __NR_SVR4_read (__NR_SVR4 + 3) -#define __NR_SVR4_write (__NR_SVR4 + 4) -#define __NR_SVR4_open (__NR_SVR4 + 5) -#define __NR_SVR4_close (__NR_SVR4 + 6) -#define __NR_SVR4_wait (__NR_SVR4 + 7) -#define __NR_SVR4_creat (__NR_SVR4 + 8) -#define __NR_SVR4_link (__NR_SVR4 + 9) -#define __NR_SVR4_unlink (__NR_SVR4 + 10) -#define __NR_SVR4_exec (__NR_SVR4 + 11) -#define __NR_SVR4_chdir (__NR_SVR4 + 12) -#define __NR_SVR4_gtime (__NR_SVR4 + 13) -#define __NR_SVR4_mknod (__NR_SVR4 + 14) -#define __NR_SVR4_chmod (__NR_SVR4 + 15) -#define __NR_SVR4_chown (__NR_SVR4 + 16) -#define __NR_SVR4_sbreak (__NR_SVR4 + 17) -#define __NR_SVR4_stat (__NR_SVR4 + 18) -#define __NR_SVR4_lseek (__NR_SVR4 + 19) -#define __NR_SVR4_getpid (__NR_SVR4 + 20) -#define __NR_SVR4_mount (__NR_SVR4 + 21) -#define __NR_SVR4_umount (__NR_SVR4 + 22) -#define __NR_SVR4_setuid (__NR_SVR4 + 23) -#define __NR_SVR4_getuid (__NR_SVR4 + 24) -#define __NR_SVR4_stime (__NR_SVR4 + 25) -#define __NR_SVR4_ptrace (__NR_SVR4 + 26) -#define __NR_SVR4_alarm (__NR_SVR4 + 27) -#define __NR_SVR4_fstat (__NR_SVR4 + 28) -#define __NR_SVR4_pause (__NR_SVR4 + 29) -#define __NR_SVR4_utime (__NR_SVR4 + 30) -#define __NR_SVR4_stty (__NR_SVR4 + 31) -#define __NR_SVR4_gtty (__NR_SVR4 + 32) -#define __NR_SVR4_access (__NR_SVR4 + 33) -#define __NR_SVR4_nice (__NR_SVR4 + 34) -#define __NR_SVR4_statfs (__NR_SVR4 + 35) -#define __NR_SVR4_sync (__NR_SVR4 + 36) -#define __NR_SVR4_kill (__NR_SVR4 + 37) -#define __NR_SVR4_fstatfs (__NR_SVR4 + 38) -#define __NR_SVR4_setpgrp (__NR_SVR4 + 39) -#define __NR_SVR4_cxenix (__NR_SVR4 + 40) -#define __NR_SVR4_dup (__NR_SVR4 + 41) -#define __NR_SVR4_pipe (__NR_SVR4 + 42) -#define __NR_SVR4_times (__NR_SVR4 + 43) -#define __NR_SVR4_profil (__NR_SVR4 + 44) -#define __NR_SVR4_plock (__NR_SVR4 + 45) -#define __NR_SVR4_setgid (__NR_SVR4 + 46) -#define __NR_SVR4_getgid (__NR_SVR4 + 47) -#define __NR_SVR4_sig (__NR_SVR4 + 48) -#define __NR_SVR4_msgsys (__NR_SVR4 + 49) -#define __NR_SVR4_sysmips (__NR_SVR4 + 50) -#define __NR_SVR4_sysacct (__NR_SVR4 + 51) -#define __NR_SVR4_shmsys (__NR_SVR4 + 52) -#define __NR_SVR4_semsys (__NR_SVR4 + 53) -#define __NR_SVR4_ioctl (__NR_SVR4 + 54) -#define __NR_SVR4_uadmin (__NR_SVR4 + 55) -#define __NR_SVR4_exch (__NR_SVR4 + 56) -#define __NR_SVR4_utssys (__NR_SVR4 + 57) -#define __NR_SVR4_fsync (__NR_SVR4 + 58) -#define __NR_SVR4_exece (__NR_SVR4 + 59) -#define __NR_SVR4_umask (__NR_SVR4 + 60) -#define __NR_SVR4_chroot (__NR_SVR4 + 61) -#define __NR_SVR4_fcntl (__NR_SVR4 + 62) -#define __NR_SVR4_ulimit (__NR_SVR4 + 63) -#define __NR_SVR4_reserved1 (__NR_SVR4 + 64) -#define __NR_SVR4_reserved2 (__NR_SVR4 + 65) -#define __NR_SVR4_reserved3 (__NR_SVR4 + 66) -#define __NR_SVR4_reserved4 (__NR_SVR4 + 67) -#define __NR_SVR4_reserved5 (__NR_SVR4 + 68) -#define __NR_SVR4_reserved6 (__NR_SVR4 + 69) -#define __NR_SVR4_advfs (__NR_SVR4 + 70) -#define __NR_SVR4_unadvfs (__NR_SVR4 + 71) -#define __NR_SVR4_unused1 (__NR_SVR4 + 72) -#define __NR_SVR4_unused2 (__NR_SVR4 + 73) -#define __NR_SVR4_rfstart (__NR_SVR4 + 74) -#define __NR_SVR4_unused3 (__NR_SVR4 + 75) -#define __NR_SVR4_rdebug (__NR_SVR4 + 76) -#define __NR_SVR4_rfstop (__NR_SVR4 + 77) -#define __NR_SVR4_rfsys (__NR_SVR4 + 78) -#define __NR_SVR4_rmdir (__NR_SVR4 + 79) -#define __NR_SVR4_mkdir (__NR_SVR4 + 80) -#define __NR_SVR4_getdents (__NR_SVR4 + 81) -#define __NR_SVR4_libattach (__NR_SVR4 + 82) -#define __NR_SVR4_libdetach (__NR_SVR4 + 83) -#define __NR_SVR4_sysfs (__NR_SVR4 + 84) -#define __NR_SVR4_getmsg (__NR_SVR4 + 85) -#define __NR_SVR4_putmsg (__NR_SVR4 + 86) -#define __NR_SVR4_poll (__NR_SVR4 + 87) -#define __NR_SVR4_lstat (__NR_SVR4 + 88) -#define __NR_SVR4_symlink (__NR_SVR4 + 89) -#define __NR_SVR4_readlink (__NR_SVR4 + 90) -#define __NR_SVR4_setgroups (__NR_SVR4 + 91) -#define __NR_SVR4_getgroups (__NR_SVR4 + 92) -#define __NR_SVR4_fchmod (__NR_SVR4 + 93) -#define __NR_SVR4_fchown (__NR_SVR4 + 94) -#define __NR_SVR4_sigprocmask (__NR_SVR4 + 95) -#define __NR_SVR4_sigsuspend (__NR_SVR4 + 96) -#define __NR_SVR4_sigaltstack (__NR_SVR4 + 97) -#define __NR_SVR4_sigaction (__NR_SVR4 + 98) -#define __NR_SVR4_sigpending (__NR_SVR4 + 99) -#define __NR_SVR4_setcontext (__NR_SVR4 + 100) -#define __NR_SVR4_evsys (__NR_SVR4 + 101) -#define __NR_SVR4_evtrapret (__NR_SVR4 + 102) -#define __NR_SVR4_statvfs (__NR_SVR4 + 103) -#define __NR_SVR4_fstatvfs (__NR_SVR4 + 104) -#define __NR_SVR4_reserved7 (__NR_SVR4 + 105) -#define __NR_SVR4_nfssys (__NR_SVR4 + 106) -#define __NR_SVR4_waitid (__NR_SVR4 + 107) -#define __NR_SVR4_sigsendset (__NR_SVR4 + 108) -#define __NR_SVR4_hrtsys (__NR_SVR4 + 109) -#define __NR_SVR4_acancel (__NR_SVR4 + 110) -#define __NR_SVR4_async (__NR_SVR4 + 111) -#define __NR_SVR4_priocntlset (__NR_SVR4 + 112) -#define __NR_SVR4_pathconf (__NR_SVR4 + 113) -#define __NR_SVR4_mincore (__NR_SVR4 + 114) -#define __NR_SVR4_mmap (__NR_SVR4 + 115) -#define __NR_SVR4_mprotect (__NR_SVR4 + 116) -#define __NR_SVR4_munmap (__NR_SVR4 + 117) -#define __NR_SVR4_fpathconf (__NR_SVR4 + 118) -#define __NR_SVR4_vfork (__NR_SVR4 + 119) -#define __NR_SVR4_fchdir (__NR_SVR4 + 120) -#define __NR_SVR4_readv (__NR_SVR4 + 121) -#define __NR_SVR4_writev (__NR_SVR4 + 122) -#define __NR_SVR4_xstat (__NR_SVR4 + 123) -#define __NR_SVR4_lxstat (__NR_SVR4 + 124) -#define __NR_SVR4_fxstat (__NR_SVR4 + 125) -#define __NR_SVR4_xmknod (__NR_SVR4 + 126) -#define __NR_SVR4_clocal (__NR_SVR4 + 127) -#define __NR_SVR4_setrlimit (__NR_SVR4 + 128) -#define __NR_SVR4_getrlimit (__NR_SVR4 + 129) -#define __NR_SVR4_lchown (__NR_SVR4 + 130) -#define __NR_SVR4_memcntl (__NR_SVR4 + 131) -#define __NR_SVR4_getpmsg (__NR_SVR4 + 132) -#define __NR_SVR4_putpmsg (__NR_SVR4 + 133) -#define __NR_SVR4_rename (__NR_SVR4 + 134) -#define __NR_SVR4_nuname (__NR_SVR4 + 135) -#define __NR_SVR4_setegid (__NR_SVR4 + 136) -#define __NR_SVR4_sysconf (__NR_SVR4 + 137) -#define __NR_SVR4_adjtime (__NR_SVR4 + 138) -#define __NR_SVR4_sysinfo (__NR_SVR4 + 139) -#define __NR_SVR4_reserved8 (__NR_SVR4 + 140) -#define __NR_SVR4_seteuid (__NR_SVR4 + 141) -#define __NR_SVR4_PYRAMID_statis (__NR_SVR4 + 142) -#define __NR_SVR4_PYRAMID_tuning (__NR_SVR4 + 143) -#define __NR_SVR4_PYRAMID_forcerr (__NR_SVR4 + 144) -#define __NR_SVR4_PYRAMID_mpcntl (__NR_SVR4 + 145) -#define __NR_SVR4_reserved9 (__NR_SVR4 + 146) -#define __NR_SVR4_reserved10 (__NR_SVR4 + 147) -#define __NR_SVR4_reserved11 (__NR_SVR4 + 148) -#define __NR_SVR4_reserved12 (__NR_SVR4 + 149) -#define __NR_SVR4_reserved13 (__NR_SVR4 + 150) -#define __NR_SVR4_reserved14 (__NR_SVR4 + 151) -#define __NR_SVR4_reserved15 (__NR_SVR4 + 152) -#define __NR_SVR4_reserved16 (__NR_SVR4 + 153) -#define __NR_SVR4_reserved17 (__NR_SVR4 + 154) -#define __NR_SVR4_reserved18 (__NR_SVR4 + 155) -#define __NR_SVR4_reserved19 (__NR_SVR4 + 156) -#define __NR_SVR4_reserved20 (__NR_SVR4 + 157) -#define __NR_SVR4_reserved21 (__NR_SVR4 + 158) -#define __NR_SVR4_reserved22 (__NR_SVR4 + 159) -#define __NR_SVR4_reserved23 (__NR_SVR4 + 160) -#define __NR_SVR4_reserved24 (__NR_SVR4 + 161) -#define __NR_SVR4_reserved25 (__NR_SVR4 + 162) -#define __NR_SVR4_reserved26 (__NR_SVR4 + 163) -#define __NR_SVR4_reserved27 (__NR_SVR4 + 164) -#define __NR_SVR4_reserved28 (__NR_SVR4 + 165) -#define __NR_SVR4_reserved29 (__NR_SVR4 + 166) -#define __NR_SVR4_reserved30 (__NR_SVR4 + 167) -#define __NR_SVR4_reserved31 (__NR_SVR4 + 168) -#define __NR_SVR4_reserved32 (__NR_SVR4 + 169) -#define __NR_SVR4_reserved33 (__NR_SVR4 + 170) -#define __NR_SVR4_reserved34 (__NR_SVR4 + 171) -#define __NR_SVR4_reserved35 (__NR_SVR4 + 172) -#define __NR_SVR4_reserved36 (__NR_SVR4 + 173) -#define __NR_SVR4_reserved37 (__NR_SVR4 + 174) -#define __NR_SVR4_reserved38 (__NR_SVR4 + 175) -#define __NR_SVR4_reserved39 (__NR_SVR4 + 176) -#define __NR_SVR4_reserved40 (__NR_SVR4 + 177) -#define __NR_SVR4_reserved41 (__NR_SVR4 + 178) -#define __NR_SVR4_reserved42 (__NR_SVR4 + 179) -#define __NR_SVR4_reserved43 (__NR_SVR4 + 180) -#define __NR_SVR4_reserved44 (__NR_SVR4 + 181) -#define __NR_SVR4_reserved45 (__NR_SVR4 + 182) -#define __NR_SVR4_reserved46 (__NR_SVR4 + 183) -#define __NR_SVR4_reserved47 (__NR_SVR4 + 184) -#define __NR_SVR4_reserved48 (__NR_SVR4 + 185) -#define __NR_SVR4_reserved49 (__NR_SVR4 + 186) -#define __NR_SVR4_reserved50 (__NR_SVR4 + 187) -#define __NR_SVR4_reserved51 (__NR_SVR4 + 188) -#define __NR_SVR4_reserved52 (__NR_SVR4 + 189) -#define __NR_SVR4_reserved53 (__NR_SVR4 + 190) -#define __NR_SVR4_reserved54 (__NR_SVR4 + 191) -#define __NR_SVR4_reserved55 (__NR_SVR4 + 192) -#define __NR_SVR4_reserved56 (__NR_SVR4 + 193) -#define __NR_SVR4_reserved57 (__NR_SVR4 + 194) -#define __NR_SVR4_reserved58 (__NR_SVR4 + 195) -#define __NR_SVR4_reserved59 (__NR_SVR4 + 196) -#define __NR_SVR4_reserved60 (__NR_SVR4 + 197) -#define __NR_SVR4_reserved61 (__NR_SVR4 + 198) -#define __NR_SVR4_reserved62 (__NR_SVR4 + 199) -#define __NR_SVR4_reserved63 (__NR_SVR4 + 200) -#define __NR_SVR4_aread (__NR_SVR4 + 201) -#define __NR_SVR4_awrite (__NR_SVR4 + 202) -#define __NR_SVR4_listio (__NR_SVR4 + 203) -#define __NR_SVR4_mips_acancel (__NR_SVR4 + 204) -#define __NR_SVR4_astatus (__NR_SVR4 + 205) -#define __NR_SVR4_await (__NR_SVR4 + 206) -#define __NR_SVR4_areadv (__NR_SVR4 + 207) -#define __NR_SVR4_awritev (__NR_SVR4 + 208) -#define __NR_SVR4_MIPS_reserved1 (__NR_SVR4 + 209) -#define __NR_SVR4_MIPS_reserved2 (__NR_SVR4 + 210) -#define __NR_SVR4_MIPS_reserved3 (__NR_SVR4 + 211) -#define __NR_SVR4_MIPS_reserved4 (__NR_SVR4 + 212) -#define __NR_SVR4_MIPS_reserved5 (__NR_SVR4 + 213) -#define __NR_SVR4_MIPS_reserved6 (__NR_SVR4 + 214) -#define __NR_SVR4_MIPS_reserved7 (__NR_SVR4 + 215) -#define __NR_SVR4_MIPS_reserved8 (__NR_SVR4 + 216) -#define __NR_SVR4_MIPS_reserved9 (__NR_SVR4 + 217) -#define __NR_SVR4_MIPS_reserved10 (__NR_SVR4 + 218) -#define __NR_SVR4_MIPS_reserved11 (__NR_SVR4 + 219) -#define __NR_SVR4_MIPS_reserved12 (__NR_SVR4 + 220) -#define __NR_SVR4_CDC_reserved1 (__NR_SVR4 + 221) -#define __NR_SVR4_CDC_reserved2 (__NR_SVR4 + 222) -#define __NR_SVR4_CDC_reserved3 (__NR_SVR4 + 223) -#define __NR_SVR4_CDC_reserved4 (__NR_SVR4 + 224) -#define __NR_SVR4_CDC_reserved5 (__NR_SVR4 + 225) -#define __NR_SVR4_CDC_reserved6 (__NR_SVR4 + 226) -#define __NR_SVR4_CDC_reserved7 (__NR_SVR4 + 227) -#define __NR_SVR4_CDC_reserved8 (__NR_SVR4 + 228) -#define __NR_SVR4_CDC_reserved9 (__NR_SVR4 + 229) -#define __NR_SVR4_CDC_reserved10 (__NR_SVR4 + 230) -#define __NR_SVR4_CDC_reserved11 (__NR_SVR4 + 231) -#define __NR_SVR4_CDC_reserved12 (__NR_SVR4 + 232) -#define __NR_SVR4_CDC_reserved13 (__NR_SVR4 + 233) -#define __NR_SVR4_CDC_reserved14 (__NR_SVR4 + 234) -#define __NR_SVR4_CDC_reserved15 (__NR_SVR4 + 235) -#define __NR_SVR4_CDC_reserved16 (__NR_SVR4 + 236) -#define __NR_SVR4_CDC_reserved17 (__NR_SVR4 + 237) -#define __NR_SVR4_CDC_reserved18 (__NR_SVR4 + 238) -#define __NR_SVR4_CDC_reserved19 (__NR_SVR4 + 239) -#define __NR_SVR4_CDC_reserved20 (__NR_SVR4 + 240) - -/* - * SYS V syscalls are in the range from 1000 to 1999 - */ -#define __NR_SYSV 1000 -#define __NR_SYSV_syscall (__NR_SYSV + 0) -#define __NR_SYSV_exit (__NR_SYSV + 1) -#define __NR_SYSV_fork (__NR_SYSV + 2) -#define __NR_SYSV_read (__NR_SYSV + 3) -#define __NR_SYSV_write (__NR_SYSV + 4) -#define __NR_SYSV_open (__NR_SYSV + 5) -#define __NR_SYSV_close (__NR_SYSV + 6) -#define __NR_SYSV_wait (__NR_SYSV + 7) -#define __NR_SYSV_creat (__NR_SYSV + 8) -#define __NR_SYSV_link (__NR_SYSV + 9) -#define __NR_SYSV_unlink (__NR_SYSV + 10) -#define __NR_SYSV_execv (__NR_SYSV + 11) -#define __NR_SYSV_chdir (__NR_SYSV + 12) -#define __NR_SYSV_time (__NR_SYSV + 13) -#define __NR_SYSV_mknod (__NR_SYSV + 14) -#define __NR_SYSV_chmod (__NR_SYSV + 15) -#define __NR_SYSV_chown (__NR_SYSV + 16) -#define __NR_SYSV_brk (__NR_SYSV + 17) -#define __NR_SYSV_stat (__NR_SYSV + 18) -#define __NR_SYSV_lseek (__NR_SYSV + 19) -#define __NR_SYSV_getpid (__NR_SYSV + 20) -#define __NR_SYSV_mount (__NR_SYSV + 21) -#define __NR_SYSV_umount (__NR_SYSV + 22) -#define __NR_SYSV_setuid (__NR_SYSV + 23) -#define __NR_SYSV_getuid (__NR_SYSV + 24) -#define __NR_SYSV_stime (__NR_SYSV + 25) -#define __NR_SYSV_ptrace (__NR_SYSV + 26) -#define __NR_SYSV_alarm (__NR_SYSV + 27) -#define __NR_SYSV_fstat (__NR_SYSV + 28) -#define __NR_SYSV_pause (__NR_SYSV + 29) -#define __NR_SYSV_utime (__NR_SYSV + 30) -#define __NR_SYSV_stty (__NR_SYSV + 31) -#define __NR_SYSV_gtty (__NR_SYSV + 32) -#define __NR_SYSV_access (__NR_SYSV + 33) -#define __NR_SYSV_nice (__NR_SYSV + 34) -#define __NR_SYSV_statfs (__NR_SYSV + 35) -#define __NR_SYSV_sync (__NR_SYSV + 36) -#define __NR_SYSV_kill (__NR_SYSV + 37) -#define __NR_SYSV_fstatfs (__NR_SYSV + 38) -#define __NR_SYSV_setpgrp (__NR_SYSV + 39) -#define __NR_SYSV_syssgi (__NR_SYSV + 40) -#define __NR_SYSV_dup (__NR_SYSV + 41) -#define __NR_SYSV_pipe (__NR_SYSV + 42) -#define __NR_SYSV_times (__NR_SYSV + 43) -#define __NR_SYSV_profil (__NR_SYSV + 44) -#define __NR_SYSV_plock (__NR_SYSV + 45) -#define __NR_SYSV_setgid (__NR_SYSV + 46) -#define __NR_SYSV_getgid (__NR_SYSV + 47) -#define __NR_SYSV_sig (__NR_SYSV + 48) -#define __NR_SYSV_msgsys (__NR_SYSV + 49) -#define __NR_SYSV_sysmips (__NR_SYSV + 50) -#define __NR_SYSV_acct (__NR_SYSV + 51) -#define __NR_SYSV_shmsys (__NR_SYSV + 52) -#define __NR_SYSV_semsys (__NR_SYSV + 53) -#define __NR_SYSV_ioctl (__NR_SYSV + 54) -#define __NR_SYSV_uadmin (__NR_SYSV + 55) -#define __NR_SYSV_sysmp (__NR_SYSV + 56) -#define __NR_SYSV_utssys (__NR_SYSV + 57) -#define __NR_SYSV_USG_reserved1 (__NR_SYSV + 58) -#define __NR_SYSV_execve (__NR_SYSV + 59) -#define __NR_SYSV_umask (__NR_SYSV + 60) -#define __NR_SYSV_chroot (__NR_SYSV + 61) -#define __NR_SYSV_fcntl (__NR_SYSV + 62) -#define __NR_SYSV_ulimit (__NR_SYSV + 63) -#define __NR_SYSV_SAFARI4_reserved1 (__NR_SYSV + 64) -#define __NR_SYSV_SAFARI4_reserved2 (__NR_SYSV + 65) -#define __NR_SYSV_SAFARI4_reserved3 (__NR_SYSV + 66) -#define __NR_SYSV_SAFARI4_reserved4 (__NR_SYSV + 67) -#define __NR_SYSV_SAFARI4_reserved5 (__NR_SYSV + 68) -#define __NR_SYSV_SAFARI4_reserved6 (__NR_SYSV + 69) -#define __NR_SYSV_advfs (__NR_SYSV + 70) -#define __NR_SYSV_unadvfs (__NR_SYSV + 71) -#define __NR_SYSV_rmount (__NR_SYSV + 72) -#define __NR_SYSV_rumount (__NR_SYSV + 73) -#define __NR_SYSV_rfstart (__NR_SYSV + 74) -#define __NR_SYSV_getrlimit64 (__NR_SYSV + 75) -#define __NR_SYSV_setrlimit64 (__NR_SYSV + 76) -#define __NR_SYSV_nanosleep (__NR_SYSV + 77) -#define __NR_SYSV_lseek64 (__NR_SYSV + 78) -#define __NR_SYSV_rmdir (__NR_SYSV + 79) -#define __NR_SYSV_mkdir (__NR_SYSV + 80) -#define __NR_SYSV_getdents (__NR_SYSV + 81) -#define __NR_SYSV_sginap (__NR_SYSV + 82) -#define __NR_SYSV_sgikopt (__NR_SYSV + 83) -#define __NR_SYSV_sysfs (__NR_SYSV + 84) -#define __NR_SYSV_getmsg (__NR_SYSV + 85) -#define __NR_SYSV_putmsg (__NR_SYSV + 86) -#define __NR_SYSV_poll (__NR_SYSV + 87) -#define __NR_SYSV_sigreturn (__NR_SYSV + 88) -#define __NR_SYSV_accept (__NR_SYSV + 89) -#define __NR_SYSV_bind (__NR_SYSV + 90) -#define __NR_SYSV_connect (__NR_SYSV + 91) -#define __NR_SYSV_gethostid (__NR_SYSV + 92) -#define __NR_SYSV_getpeername (__NR_SYSV + 93) -#define __NR_SYSV_getsockname (__NR_SYSV + 94) -#define __NR_SYSV_getsockopt (__NR_SYSV + 95) -#define __NR_SYSV_listen (__NR_SYSV + 96) -#define __NR_SYSV_recv (__NR_SYSV + 97) -#define __NR_SYSV_recvfrom (__NR_SYSV + 98) -#define __NR_SYSV_recvmsg (__NR_SYSV + 99) -#define __NR_SYSV_select (__NR_SYSV + 100) -#define __NR_SYSV_send (__NR_SYSV + 101) -#define __NR_SYSV_sendmsg (__NR_SYSV + 102) -#define __NR_SYSV_sendto (__NR_SYSV + 103) -#define __NR_SYSV_sethostid (__NR_SYSV + 104) -#define __NR_SYSV_setsockopt (__NR_SYSV + 105) -#define __NR_SYSV_shutdown (__NR_SYSV + 106) -#define __NR_SYSV_socket (__NR_SYSV + 107) -#define __NR_SYSV_gethostname (__NR_SYSV + 108) -#define __NR_SYSV_sethostname (__NR_SYSV + 109) -#define __NR_SYSV_getdomainname (__NR_SYSV + 110) -#define __NR_SYSV_setdomainname (__NR_SYSV + 111) -#define __NR_SYSV_truncate (__NR_SYSV + 112) -#define __NR_SYSV_ftruncate (__NR_SYSV + 113) -#define __NR_SYSV_rename (__NR_SYSV + 114) -#define __NR_SYSV_symlink (__NR_SYSV + 115) -#define __NR_SYSV_readlink (__NR_SYSV + 116) -#define __NR_SYSV_lstat (__NR_SYSV + 117) -#define __NR_SYSV_nfsmount (__NR_SYSV + 118) -#define __NR_SYSV_nfssvc (__NR_SYSV + 119) -#define __NR_SYSV_getfh (__NR_SYSV + 120) -#define __NR_SYSV_async_daemon (__NR_SYSV + 121) -#define __NR_SYSV_exportfs (__NR_SYSV + 122) -#define __NR_SYSV_setregid (__NR_SYSV + 123) -#define __NR_SYSV_setreuid (__NR_SYSV + 124) -#define __NR_SYSV_getitimer (__NR_SYSV + 125) -#define __NR_SYSV_setitimer (__NR_SYSV + 126) -#define __NR_SYSV_adjtime (__NR_SYSV + 127) -#define __NR_SYSV_BSD_getime (__NR_SYSV + 128) -#define __NR_SYSV_sproc (__NR_SYSV + 129) -#define __NR_SYSV_prctl (__NR_SYSV + 130) -#define __NR_SYSV_procblk (__NR_SYSV + 131) -#define __NR_SYSV_sprocsp (__NR_SYSV + 132) -#define __NR_SYSV_sgigsc (__NR_SYSV + 133) -#define __NR_SYSV_mmap (__NR_SYSV + 134) -#define __NR_SYSV_munmap (__NR_SYSV + 135) -#define __NR_SYSV_mprotect (__NR_SYSV + 136) -#define __NR_SYSV_msync (__NR_SYSV + 137) -#define __NR_SYSV_madvise (__NR_SYSV + 138) -#define __NR_SYSV_pagelock (__NR_SYSV + 139) -#define __NR_SYSV_getpagesize (__NR_SYSV + 140) -#define __NR_SYSV_quotactl (__NR_SYSV + 141) -#define __NR_SYSV_libdetach (__NR_SYSV + 142) -#define __NR_SYSV_BSDgetpgrp (__NR_SYSV + 143) -#define __NR_SYSV_BSDsetpgrp (__NR_SYSV + 144) -#define __NR_SYSV_vhangup (__NR_SYSV + 145) -#define __NR_SYSV_fsync (__NR_SYSV + 146) -#define __NR_SYSV_fchdir (__NR_SYSV + 147) -#define __NR_SYSV_getrlimit (__NR_SYSV + 148) -#define __NR_SYSV_setrlimit (__NR_SYSV + 149) -#define __NR_SYSV_cacheflush (__NR_SYSV + 150) -#define __NR_SYSV_cachectl (__NR_SYSV + 151) -#define __NR_SYSV_fchown (__NR_SYSV + 152) -#define __NR_SYSV_fchmod (__NR_SYSV + 153) -#define __NR_SYSV_wait3 (__NR_SYSV + 154) -#define __NR_SYSV_socketpair (__NR_SYSV + 155) -#define __NR_SYSV_sysinfo (__NR_SYSV + 156) -#define __NR_SYSV_nuname (__NR_SYSV + 157) -#define __NR_SYSV_xstat (__NR_SYSV + 158) -#define __NR_SYSV_lxstat (__NR_SYSV + 159) -#define __NR_SYSV_fxstat (__NR_SYSV + 160) -#define __NR_SYSV_xmknod (__NR_SYSV + 161) -#define __NR_SYSV_ksigaction (__NR_SYSV + 162) -#define __NR_SYSV_sigpending (__NR_SYSV + 163) -#define __NR_SYSV_sigprocmask (__NR_SYSV + 164) -#define __NR_SYSV_sigsuspend (__NR_SYSV + 165) -#define __NR_SYSV_sigpoll (__NR_SYSV + 166) -#define __NR_SYSV_swapctl (__NR_SYSV + 167) -#define __NR_SYSV_getcontext (__NR_SYSV + 168) -#define __NR_SYSV_setcontext (__NR_SYSV + 169) -#define __NR_SYSV_waitsys (__NR_SYSV + 170) -#define __NR_SYSV_sigstack (__NR_SYSV + 171) -#define __NR_SYSV_sigaltstack (__NR_SYSV + 172) -#define __NR_SYSV_sigsendset (__NR_SYSV + 173) -#define __NR_SYSV_statvfs (__NR_SYSV + 174) -#define __NR_SYSV_fstatvfs (__NR_SYSV + 175) -#define __NR_SYSV_getpmsg (__NR_SYSV + 176) -#define __NR_SYSV_putpmsg (__NR_SYSV + 177) -#define __NR_SYSV_lchown (__NR_SYSV + 178) -#define __NR_SYSV_priocntl (__NR_SYSV + 179) -#define __NR_SYSV_ksigqueue (__NR_SYSV + 180) -#define __NR_SYSV_readv (__NR_SYSV + 181) -#define __NR_SYSV_writev (__NR_SYSV + 182) -#define __NR_SYSV_truncate64 (__NR_SYSV + 183) -#define __NR_SYSV_ftruncate64 (__NR_SYSV + 184) -#define __NR_SYSV_mmap64 (__NR_SYSV + 185) -#define __NR_SYSV_dmi (__NR_SYSV + 186) -#define __NR_SYSV_pread (__NR_SYSV + 187) -#define __NR_SYSV_pwrite (__NR_SYSV + 188) - -/* - * BSD 4.3 syscalls are in the range from 2000 to 2999 - */ -#define __NR_BSD43 2000 -#define __NR_BSD43_syscall (__NR_BSD43 + 0) -#define __NR_BSD43_exit (__NR_BSD43 + 1) -#define __NR_BSD43_fork (__NR_BSD43 + 2) -#define __NR_BSD43_read (__NR_BSD43 + 3) -#define __NR_BSD43_write (__NR_BSD43 + 4) -#define __NR_BSD43_open (__NR_BSD43 + 5) -#define __NR_BSD43_close (__NR_BSD43 + 6) -#define __NR_BSD43_wait (__NR_BSD43 + 7) -#define __NR_BSD43_creat (__NR_BSD43 + 8) -#define __NR_BSD43_link (__NR_BSD43 + 9) -#define __NR_BSD43_unlink (__NR_BSD43 + 10) -#define __NR_BSD43_exec (__NR_BSD43 + 11) -#define __NR_BSD43_chdir (__NR_BSD43 + 12) -#define __NR_BSD43_time (__NR_BSD43 + 13) -#define __NR_BSD43_mknod (__NR_BSD43 + 14) -#define __NR_BSD43_chmod (__NR_BSD43 + 15) -#define __NR_BSD43_chown (__NR_BSD43 + 16) -#define __NR_BSD43_sbreak (__NR_BSD43 + 17) -#define __NR_BSD43_oldstat (__NR_BSD43 + 18) -#define __NR_BSD43_lseek (__NR_BSD43 + 19) -#define __NR_BSD43_getpid (__NR_BSD43 + 20) -#define __NR_BSD43_oldmount (__NR_BSD43 + 21) -#define __NR_BSD43_umount (__NR_BSD43 + 22) -#define __NR_BSD43_setuid (__NR_BSD43 + 23) -#define __NR_BSD43_getuid (__NR_BSD43 + 24) -#define __NR_BSD43_stime (__NR_BSD43 + 25) -#define __NR_BSD43_ptrace (__NR_BSD43 + 26) -#define __NR_BSD43_alarm (__NR_BSD43 + 27) -#define __NR_BSD43_oldfstat (__NR_BSD43 + 28) -#define __NR_BSD43_pause (__NR_BSD43 + 29) -#define __NR_BSD43_utime (__NR_BSD43 + 30) -#define __NR_BSD43_stty (__NR_BSD43 + 31) -#define __NR_BSD43_gtty (__NR_BSD43 + 32) -#define __NR_BSD43_access (__NR_BSD43 + 33) -#define __NR_BSD43_nice (__NR_BSD43 + 34) -#define __NR_BSD43_ftime (__NR_BSD43 + 35) -#define __NR_BSD43_sync (__NR_BSD43 + 36) -#define __NR_BSD43_kill (__NR_BSD43 + 37) -#define __NR_BSD43_stat (__NR_BSD43 + 38) -#define __NR_BSD43_oldsetpgrp (__NR_BSD43 + 39) -#define __NR_BSD43_lstat (__NR_BSD43 + 40) -#define __NR_BSD43_dup (__NR_BSD43 + 41) -#define __NR_BSD43_pipe (__NR_BSD43 + 42) -#define __NR_BSD43_times (__NR_BSD43 + 43) -#define __NR_BSD43_profil (__NR_BSD43 + 44) -#define __NR_BSD43_msgsys (__NR_BSD43 + 45) -#define __NR_BSD43_setgid (__NR_BSD43 + 46) -#define __NR_BSD43_getgid (__NR_BSD43 + 47) -#define __NR_BSD43_ssig (__NR_BSD43 + 48) -#define __NR_BSD43_reserved1 (__NR_BSD43 + 49) -#define __NR_BSD43_reserved2 (__NR_BSD43 + 50) -#define __NR_BSD43_sysacct (__NR_BSD43 + 51) -#define __NR_BSD43_phys (__NR_BSD43 + 52) -#define __NR_BSD43_lock (__NR_BSD43 + 53) -#define __NR_BSD43_ioctl (__NR_BSD43 + 54) -#define __NR_BSD43_reboot (__NR_BSD43 + 55) -#define __NR_BSD43_mpxchan (__NR_BSD43 + 56) -#define __NR_BSD43_symlink (__NR_BSD43 + 57) -#define __NR_BSD43_readlink (__NR_BSD43 + 58) -#define __NR_BSD43_execve (__NR_BSD43 + 59) -#define __NR_BSD43_umask (__NR_BSD43 + 60) -#define __NR_BSD43_chroot (__NR_BSD43 + 61) -#define __NR_BSD43_fstat (__NR_BSD43 + 62) -#define __NR_BSD43_reserved3 (__NR_BSD43 + 63) -#define __NR_BSD43_getpagesize (__NR_BSD43 + 64) -#define __NR_BSD43_mremap (__NR_BSD43 + 65) -#define __NR_BSD43_vfork (__NR_BSD43 + 66) -#define __NR_BSD43_vread (__NR_BSD43 + 67) -#define __NR_BSD43_vwrite (__NR_BSD43 + 68) -#define __NR_BSD43_sbrk (__NR_BSD43 + 69) -#define __NR_BSD43_sstk (__NR_BSD43 + 70) -#define __NR_BSD43_mmap (__NR_BSD43 + 71) -#define __NR_BSD43_vadvise (__NR_BSD43 + 72) -#define __NR_BSD43_munmap (__NR_BSD43 + 73) -#define __NR_BSD43_mprotect (__NR_BSD43 + 74) -#define __NR_BSD43_madvise (__NR_BSD43 + 75) -#define __NR_BSD43_vhangup (__NR_BSD43 + 76) -#define __NR_BSD43_vlimit (__NR_BSD43 + 77) -#define __NR_BSD43_mincore (__NR_BSD43 + 78) -#define __NR_BSD43_getgroups (__NR_BSD43 + 79) -#define __NR_BSD43_setgroups (__NR_BSD43 + 80) -#define __NR_BSD43_getpgrp (__NR_BSD43 + 81) -#define __NR_BSD43_setpgrp (__NR_BSD43 + 82) -#define __NR_BSD43_setitimer (__NR_BSD43 + 83) -#define __NR_BSD43_wait3 (__NR_BSD43 + 84) -#define __NR_BSD43_swapon (__NR_BSD43 + 85) -#define __NR_BSD43_getitimer (__NR_BSD43 + 86) -#define __NR_BSD43_gethostname (__NR_BSD43 + 87) -#define __NR_BSD43_sethostname (__NR_BSD43 + 88) -#define __NR_BSD43_getdtablesize (__NR_BSD43 + 89) -#define __NR_BSD43_dup2 (__NR_BSD43 + 90) -#define __NR_BSD43_getdopt (__NR_BSD43 + 91) -#define __NR_BSD43_fcntl (__NR_BSD43 + 92) -#define __NR_BSD43_select (__NR_BSD43 + 93) -#define __NR_BSD43_setdopt (__NR_BSD43 + 94) -#define __NR_BSD43_fsync (__NR_BSD43 + 95) -#define __NR_BSD43_setpriority (__NR_BSD43 + 96) -#define __NR_BSD43_socket (__NR_BSD43 + 97) -#define __NR_BSD43_connect (__NR_BSD43 + 98) -#define __NR_BSD43_oldaccept (__NR_BSD43 + 99) -#define __NR_BSD43_getpriority (__NR_BSD43 + 100) -#define __NR_BSD43_send (__NR_BSD43 + 101) -#define __NR_BSD43_recv (__NR_BSD43 + 102) -#define __NR_BSD43_sigreturn (__NR_BSD43 + 103) -#define __NR_BSD43_bind (__NR_BSD43 + 104) -#define __NR_BSD43_setsockopt (__NR_BSD43 + 105) -#define __NR_BSD43_listen (__NR_BSD43 + 106) -#define __NR_BSD43_vtimes (__NR_BSD43 + 107) -#define __NR_BSD43_sigvec (__NR_BSD43 + 108) -#define __NR_BSD43_sigblock (__NR_BSD43 + 109) -#define __NR_BSD43_sigsetmask (__NR_BSD43 + 110) -#define __NR_BSD43_sigpause (__NR_BSD43 + 111) -#define __NR_BSD43_sigstack (__NR_BSD43 + 112) -#define __NR_BSD43_oldrecvmsg (__NR_BSD43 + 113) -#define __NR_BSD43_oldsendmsg (__NR_BSD43 + 114) -#define __NR_BSD43_vtrace (__NR_BSD43 + 115) -#define __NR_BSD43_gettimeofday (__NR_BSD43 + 116) -#define __NR_BSD43_getrusage (__NR_BSD43 + 117) -#define __NR_BSD43_getsockopt (__NR_BSD43 + 118) -#define __NR_BSD43_reserved4 (__NR_BSD43 + 119) -#define __NR_BSD43_readv (__NR_BSD43 + 120) -#define __NR_BSD43_writev (__NR_BSD43 + 121) -#define __NR_BSD43_settimeofday (__NR_BSD43 + 122) -#define __NR_BSD43_fchown (__NR_BSD43 + 123) -#define __NR_BSD43_fchmod (__NR_BSD43 + 124) -#define __NR_BSD43_oldrecvfrom (__NR_BSD43 + 125) -#define __NR_BSD43_setreuid (__NR_BSD43 + 126) -#define __NR_BSD43_setregid (__NR_BSD43 + 127) -#define __NR_BSD43_rename (__NR_BSD43 + 128) -#define __NR_BSD43_truncate (__NR_BSD43 + 129) -#define __NR_BSD43_ftruncate (__NR_BSD43 + 130) -#define __NR_BSD43_flock (__NR_BSD43 + 131) -#define __NR_BSD43_semsys (__NR_BSD43 + 132) -#define __NR_BSD43_sendto (__NR_BSD43 + 133) -#define __NR_BSD43_shutdown (__NR_BSD43 + 134) -#define __NR_BSD43_socketpair (__NR_BSD43 + 135) -#define __NR_BSD43_mkdir (__NR_BSD43 + 136) -#define __NR_BSD43_rmdir (__NR_BSD43 + 137) -#define __NR_BSD43_utimes (__NR_BSD43 + 138) -#define __NR_BSD43_sigcleanup (__NR_BSD43 + 139) -#define __NR_BSD43_adjtime (__NR_BSD43 + 140) -#define __NR_BSD43_oldgetpeername (__NR_BSD43 + 141) -#define __NR_BSD43_gethostid (__NR_BSD43 + 142) -#define __NR_BSD43_sethostid (__NR_BSD43 + 143) -#define __NR_BSD43_getrlimit (__NR_BSD43 + 144) -#define __NR_BSD43_setrlimit (__NR_BSD43 + 145) -#define __NR_BSD43_killpg (__NR_BSD43 + 146) -#define __NR_BSD43_shmsys (__NR_BSD43 + 147) -#define __NR_BSD43_quota (__NR_BSD43 + 148) -#define __NR_BSD43_qquota (__NR_BSD43 + 149) -#define __NR_BSD43_oldgetsockname (__NR_BSD43 + 150) -#define __NR_BSD43_sysmips (__NR_BSD43 + 151) -#define __NR_BSD43_cacheflush (__NR_BSD43 + 152) -#define __NR_BSD43_cachectl (__NR_BSD43 + 153) -#define __NR_BSD43_debug (__NR_BSD43 + 154) -#define __NR_BSD43_reserved5 (__NR_BSD43 + 155) -#define __NR_BSD43_reserved6 (__NR_BSD43 + 156) -#define __NR_BSD43_nfs_mount (__NR_BSD43 + 157) -#define __NR_BSD43_nfs_svc (__NR_BSD43 + 158) -#define __NR_BSD43_getdirentries (__NR_BSD43 + 159) -#define __NR_BSD43_statfs (__NR_BSD43 + 160) -#define __NR_BSD43_fstatfs (__NR_BSD43 + 161) -#define __NR_BSD43_unmount (__NR_BSD43 + 162) -#define __NR_BSD43_async_daemon (__NR_BSD43 + 163) -#define __NR_BSD43_nfs_getfh (__NR_BSD43 + 164) -#define __NR_BSD43_getdomainname (__NR_BSD43 + 165) -#define __NR_BSD43_setdomainname (__NR_BSD43 + 166) -#define __NR_BSD43_pcfs_mount (__NR_BSD43 + 167) -#define __NR_BSD43_quotactl (__NR_BSD43 + 168) -#define __NR_BSD43_oldexportfs (__NR_BSD43 + 169) -#define __NR_BSD43_smount (__NR_BSD43 + 170) -#define __NR_BSD43_mipshwconf (__NR_BSD43 + 171) -#define __NR_BSD43_exportfs (__NR_BSD43 + 172) -#define __NR_BSD43_nfsfh_open (__NR_BSD43 + 173) -#define __NR_BSD43_libattach (__NR_BSD43 + 174) -#define __NR_BSD43_libdetach (__NR_BSD43 + 175) -#define __NR_BSD43_accept (__NR_BSD43 + 176) -#define __NR_BSD43_reserved7 (__NR_BSD43 + 177) -#define __NR_BSD43_reserved8 (__NR_BSD43 + 178) -#define __NR_BSD43_recvmsg (__NR_BSD43 + 179) -#define __NR_BSD43_recvfrom (__NR_BSD43 + 180) -#define __NR_BSD43_sendmsg (__NR_BSD43 + 181) -#define __NR_BSD43_getpeername (__NR_BSD43 + 182) -#define __NR_BSD43_getsockname (__NR_BSD43 + 183) -#define __NR_BSD43_aread (__NR_BSD43 + 184) -#define __NR_BSD43_awrite (__NR_BSD43 + 185) -#define __NR_BSD43_listio (__NR_BSD43 + 186) -#define __NR_BSD43_acancel (__NR_BSD43 + 187) -#define __NR_BSD43_astatus (__NR_BSD43 + 188) -#define __NR_BSD43_await (__NR_BSD43 + 189) -#define __NR_BSD43_areadv (__NR_BSD43 + 190) -#define __NR_BSD43_awritev (__NR_BSD43 + 191) - -/* - * POSIX syscalls are in the range from 3000 to 3999 - */ -#define __NR_POSIX 3000 -#define __NR_POSIX_syscall (__NR_POSIX + 0) -#define __NR_POSIX_exit (__NR_POSIX + 1) -#define __NR_POSIX_fork (__NR_POSIX + 2) -#define __NR_POSIX_read (__NR_POSIX + 3) -#define __NR_POSIX_write (__NR_POSIX + 4) -#define __NR_POSIX_open (__NR_POSIX + 5) -#define __NR_POSIX_close (__NR_POSIX + 6) -#define __NR_POSIX_wait (__NR_POSIX + 7) -#define __NR_POSIX_creat (__NR_POSIX + 8) -#define __NR_POSIX_link (__NR_POSIX + 9) -#define __NR_POSIX_unlink (__NR_POSIX + 10) -#define __NR_POSIX_exec (__NR_POSIX + 11) -#define __NR_POSIX_chdir (__NR_POSIX + 12) -#define __NR_POSIX_gtime (__NR_POSIX + 13) -#define __NR_POSIX_mknod (__NR_POSIX + 14) -#define __NR_POSIX_chmod (__NR_POSIX + 15) -#define __NR_POSIX_chown (__NR_POSIX + 16) -#define __NR_POSIX_sbreak (__NR_POSIX + 17) -#define __NR_POSIX_stat (__NR_POSIX + 18) -#define __NR_POSIX_lseek (__NR_POSIX + 19) -#define __NR_POSIX_getpid (__NR_POSIX + 20) -#define __NR_POSIX_mount (__NR_POSIX + 21) -#define __NR_POSIX_umount (__NR_POSIX + 22) -#define __NR_POSIX_setuid (__NR_POSIX + 23) -#define __NR_POSIX_getuid (__NR_POSIX + 24) -#define __NR_POSIX_stime (__NR_POSIX + 25) -#define __NR_POSIX_ptrace (__NR_POSIX + 26) -#define __NR_POSIX_alarm (__NR_POSIX + 27) -#define __NR_POSIX_fstat (__NR_POSIX + 28) -#define __NR_POSIX_pause (__NR_POSIX + 29) -#define __NR_POSIX_utime (__NR_POSIX + 30) -#define __NR_POSIX_stty (__NR_POSIX + 31) -#define __NR_POSIX_gtty (__NR_POSIX + 32) -#define __NR_POSIX_access (__NR_POSIX + 33) -#define __NR_POSIX_nice (__NR_POSIX + 34) -#define __NR_POSIX_statfs (__NR_POSIX + 35) -#define __NR_POSIX_sync (__NR_POSIX + 36) -#define __NR_POSIX_kill (__NR_POSIX + 37) -#define __NR_POSIX_fstatfs (__NR_POSIX + 38) -#define __NR_POSIX_getpgrp (__NR_POSIX + 39) -#define __NR_POSIX_syssgi (__NR_POSIX + 40) -#define __NR_POSIX_dup (__NR_POSIX + 41) -#define __NR_POSIX_pipe (__NR_POSIX + 42) -#define __NR_POSIX_times (__NR_POSIX + 43) -#define __NR_POSIX_profil (__NR_POSIX + 44) -#define __NR_POSIX_lock (__NR_POSIX + 45) -#define __NR_POSIX_setgid (__NR_POSIX + 46) -#define __NR_POSIX_getgid (__NR_POSIX + 47) -#define __NR_POSIX_sig (__NR_POSIX + 48) -#define __NR_POSIX_msgsys (__NR_POSIX + 49) -#define __NR_POSIX_sysmips (__NR_POSIX + 50) -#define __NR_POSIX_sysacct (__NR_POSIX + 51) -#define __NR_POSIX_shmsys (__NR_POSIX + 52) -#define __NR_POSIX_semsys (__NR_POSIX + 53) -#define __NR_POSIX_ioctl (__NR_POSIX + 54) -#define __NR_POSIX_uadmin (__NR_POSIX + 55) -#define __NR_POSIX_exch (__NR_POSIX + 56) -#define __NR_POSIX_utssys (__NR_POSIX + 57) -#define __NR_POSIX_USG_reserved1 (__NR_POSIX + 58) -#define __NR_POSIX_exece (__NR_POSIX + 59) -#define __NR_POSIX_umask (__NR_POSIX + 60) -#define __NR_POSIX_chroot (__NR_POSIX + 61) -#define __NR_POSIX_fcntl (__NR_POSIX + 62) -#define __NR_POSIX_ulimit (__NR_POSIX + 63) -#define __NR_POSIX_SAFARI4_reserved1 (__NR_POSIX + 64) -#define __NR_POSIX_SAFARI4_reserved2 (__NR_POSIX + 65) -#define __NR_POSIX_SAFARI4_reserved3 (__NR_POSIX + 66) -#define __NR_POSIX_SAFARI4_reserved4 (__NR_POSIX + 67) -#define __NR_POSIX_SAFARI4_reserved5 (__NR_POSIX + 68) -#define __NR_POSIX_SAFARI4_reserved6 (__NR_POSIX + 69) -#define __NR_POSIX_advfs (__NR_POSIX + 70) -#define __NR_POSIX_unadvfs (__NR_POSIX + 71) -#define __NR_POSIX_rmount (__NR_POSIX + 72) -#define __NR_POSIX_rumount (__NR_POSIX + 73) -#define __NR_POSIX_rfstart (__NR_POSIX + 74) -#define __NR_POSIX_reserved1 (__NR_POSIX + 75) -#define __NR_POSIX_rdebug (__NR_POSIX + 76) -#define __NR_POSIX_rfstop (__NR_POSIX + 77) -#define __NR_POSIX_rfsys (__NR_POSIX + 78) -#define __NR_POSIX_rmdir (__NR_POSIX + 79) -#define __NR_POSIX_mkdir (__NR_POSIX + 80) -#define __NR_POSIX_getdents (__NR_POSIX + 81) -#define __NR_POSIX_sginap (__NR_POSIX + 82) -#define __NR_POSIX_sgikopt (__NR_POSIX + 83) -#define __NR_POSIX_sysfs (__NR_POSIX + 84) -#define __NR_POSIX_getmsg (__NR_POSIX + 85) -#define __NR_POSIX_putmsg (__NR_POSIX + 86) -#define __NR_POSIX_poll (__NR_POSIX + 87) -#define __NR_POSIX_sigreturn (__NR_POSIX + 88) -#define __NR_POSIX_accept (__NR_POSIX + 89) -#define __NR_POSIX_bind (__NR_POSIX + 90) -#define __NR_POSIX_connect (__NR_POSIX + 91) -#define __NR_POSIX_gethostid (__NR_POSIX + 92) -#define __NR_POSIX_getpeername (__NR_POSIX + 93) -#define __NR_POSIX_getsockname (__NR_POSIX + 94) -#define __NR_POSIX_getsockopt (__NR_POSIX + 95) -#define __NR_POSIX_listen (__NR_POSIX + 96) -#define __NR_POSIX_recv (__NR_POSIX + 97) -#define __NR_POSIX_recvfrom (__NR_POSIX + 98) -#define __NR_POSIX_recvmsg (__NR_POSIX + 99) -#define __NR_POSIX_select (__NR_POSIX + 100) -#define __NR_POSIX_send (__NR_POSIX + 101) -#define __NR_POSIX_sendmsg (__NR_POSIX + 102) -#define __NR_POSIX_sendto (__NR_POSIX + 103) -#define __NR_POSIX_sethostid (__NR_POSIX + 104) -#define __NR_POSIX_setsockopt (__NR_POSIX + 105) -#define __NR_POSIX_shutdown (__NR_POSIX + 106) -#define __NR_POSIX_socket (__NR_POSIX + 107) -#define __NR_POSIX_gethostname (__NR_POSIX + 108) -#define __NR_POSIX_sethostname (__NR_POSIX + 109) -#define __NR_POSIX_getdomainname (__NR_POSIX + 110) -#define __NR_POSIX_setdomainname (__NR_POSIX + 111) -#define __NR_POSIX_truncate (__NR_POSIX + 112) -#define __NR_POSIX_ftruncate (__NR_POSIX + 113) -#define __NR_POSIX_rename (__NR_POSIX + 114) -#define __NR_POSIX_symlink (__NR_POSIX + 115) -#define __NR_POSIX_readlink (__NR_POSIX + 116) -#define __NR_POSIX_lstat (__NR_POSIX + 117) -#define __NR_POSIX_nfs_mount (__NR_POSIX + 118) -#define __NR_POSIX_nfs_svc (__NR_POSIX + 119) -#define __NR_POSIX_nfs_getfh (__NR_POSIX + 120) -#define __NR_POSIX_async_daemon (__NR_POSIX + 121) -#define __NR_POSIX_exportfs (__NR_POSIX + 122) -#define __NR_POSIX_SGI_setregid (__NR_POSIX + 123) -#define __NR_POSIX_SGI_setreuid (__NR_POSIX + 124) -#define __NR_POSIX_getitimer (__NR_POSIX + 125) -#define __NR_POSIX_setitimer (__NR_POSIX + 126) -#define __NR_POSIX_adjtime (__NR_POSIX + 127) -#define __NR_POSIX_SGI_bsdgettime (__NR_POSIX + 128) -#define __NR_POSIX_SGI_sproc (__NR_POSIX + 129) -#define __NR_POSIX_SGI_prctl (__NR_POSIX + 130) -#define __NR_POSIX_SGI_blkproc (__NR_POSIX + 131) -#define __NR_POSIX_SGI_reserved1 (__NR_POSIX + 132) -#define __NR_POSIX_SGI_sgigsc (__NR_POSIX + 133) -#define __NR_POSIX_SGI_mmap (__NR_POSIX + 134) -#define __NR_POSIX_SGI_munmap (__NR_POSIX + 135) -#define __NR_POSIX_SGI_mprotect (__NR_POSIX + 136) -#define __NR_POSIX_SGI_msync (__NR_POSIX + 137) -#define __NR_POSIX_SGI_madvise (__NR_POSIX + 138) -#define __NR_POSIX_SGI_mpin (__NR_POSIX + 139) -#define __NR_POSIX_SGI_getpagesize (__NR_POSIX + 140) -#define __NR_POSIX_SGI_libattach (__NR_POSIX + 141) -#define __NR_POSIX_SGI_libdetach (__NR_POSIX + 142) -#define __NR_POSIX_SGI_getpgrp (__NR_POSIX + 143) -#define __NR_POSIX_SGI_setpgrp (__NR_POSIX + 144) -#define __NR_POSIX_SGI_reserved2 (__NR_POSIX + 145) -#define __NR_POSIX_SGI_reserved3 (__NR_POSIX + 146) -#define __NR_POSIX_SGI_reserved4 (__NR_POSIX + 147) -#define __NR_POSIX_SGI_reserved5 (__NR_POSIX + 148) -#define __NR_POSIX_SGI_reserved6 (__NR_POSIX + 149) -#define __NR_POSIX_cacheflush (__NR_POSIX + 150) -#define __NR_POSIX_cachectl (__NR_POSIX + 151) -#define __NR_POSIX_fchown (__NR_POSIX + 152) -#define __NR_POSIX_fchmod (__NR_POSIX + 153) -#define __NR_POSIX_wait3 (__NR_POSIX + 154) -#define __NR_POSIX_mmap (__NR_POSIX + 155) -#define __NR_POSIX_munmap (__NR_POSIX + 156) -#define __NR_POSIX_madvise (__NR_POSIX + 157) -#define __NR_POSIX_BSD_getpagesize (__NR_POSIX + 158) -#define __NR_POSIX_setreuid (__NR_POSIX + 159) -#define __NR_POSIX_setregid (__NR_POSIX + 160) -#define __NR_POSIX_setpgid (__NR_POSIX + 161) -#define __NR_POSIX_getgroups (__NR_POSIX + 162) -#define __NR_POSIX_setgroups (__NR_POSIX + 163) -#define __NR_POSIX_gettimeofday (__NR_POSIX + 164) -#define __NR_POSIX_getrusage (__NR_POSIX + 165) -#define __NR_POSIX_getrlimit (__NR_POSIX + 166) -#define __NR_POSIX_setrlimit (__NR_POSIX + 167) -#define __NR_POSIX_waitpid (__NR_POSIX + 168) -#define __NR_POSIX_dup2 (__NR_POSIX + 169) -#define __NR_POSIX_reserved2 (__NR_POSIX + 170) -#define __NR_POSIX_reserved3 (__NR_POSIX + 171) -#define __NR_POSIX_reserved4 (__NR_POSIX + 172) -#define __NR_POSIX_reserved5 (__NR_POSIX + 173) -#define __NR_POSIX_reserved6 (__NR_POSIX + 174) -#define __NR_POSIX_reserved7 (__NR_POSIX + 175) -#define __NR_POSIX_reserved8 (__NR_POSIX + 176) -#define __NR_POSIX_reserved9 (__NR_POSIX + 177) -#define __NR_POSIX_reserved10 (__NR_POSIX + 178) -#define __NR_POSIX_reserved11 (__NR_POSIX + 179) -#define __NR_POSIX_reserved12 (__NR_POSIX + 180) -#define __NR_POSIX_reserved13 (__NR_POSIX + 181) -#define __NR_POSIX_reserved14 (__NR_POSIX + 182) -#define __NR_POSIX_reserved15 (__NR_POSIX + 183) -#define __NR_POSIX_reserved16 (__NR_POSIX + 184) -#define __NR_POSIX_reserved17 (__NR_POSIX + 185) -#define __NR_POSIX_reserved18 (__NR_POSIX + 186) -#define __NR_POSIX_reserved19 (__NR_POSIX + 187) -#define __NR_POSIX_reserved20 (__NR_POSIX + 188) -#define __NR_POSIX_reserved21 (__NR_POSIX + 189) -#define __NR_POSIX_reserved22 (__NR_POSIX + 190) -#define __NR_POSIX_reserved23 (__NR_POSIX + 191) -#define __NR_POSIX_reserved24 (__NR_POSIX + 192) -#define __NR_POSIX_reserved25 (__NR_POSIX + 193) -#define __NR_POSIX_reserved26 (__NR_POSIX + 194) -#define __NR_POSIX_reserved27 (__NR_POSIX + 195) -#define __NR_POSIX_reserved28 (__NR_POSIX + 196) -#define __NR_POSIX_reserved29 (__NR_POSIX + 197) -#define __NR_POSIX_reserved30 (__NR_POSIX + 198) -#define __NR_POSIX_reserved31 (__NR_POSIX + 199) -#define __NR_POSIX_reserved32 (__NR_POSIX + 200) -#define __NR_POSIX_reserved33 (__NR_POSIX + 201) -#define __NR_POSIX_reserved34 (__NR_POSIX + 202) -#define __NR_POSIX_reserved35 (__NR_POSIX + 203) -#define __NR_POSIX_reserved36 (__NR_POSIX + 204) -#define __NR_POSIX_reserved37 (__NR_POSIX + 205) -#define __NR_POSIX_reserved38 (__NR_POSIX + 206) -#define __NR_POSIX_reserved39 (__NR_POSIX + 207) -#define __NR_POSIX_reserved40 (__NR_POSIX + 208) -#define __NR_POSIX_reserved41 (__NR_POSIX + 209) -#define __NR_POSIX_reserved42 (__NR_POSIX + 210) -#define __NR_POSIX_reserved43 (__NR_POSIX + 211) -#define __NR_POSIX_reserved44 (__NR_POSIX + 212) -#define __NR_POSIX_reserved45 (__NR_POSIX + 213) -#define __NR_POSIX_reserved46 (__NR_POSIX + 214) -#define __NR_POSIX_reserved47 (__NR_POSIX + 215) -#define __NR_POSIX_reserved48 (__NR_POSIX + 216) -#define __NR_POSIX_reserved49 (__NR_POSIX + 217) -#define __NR_POSIX_reserved50 (__NR_POSIX + 218) -#define __NR_POSIX_reserved51 (__NR_POSIX + 219) -#define __NR_POSIX_reserved52 (__NR_POSIX + 220) -#define __NR_POSIX_reserved53 (__NR_POSIX + 221) -#define __NR_POSIX_reserved54 (__NR_POSIX + 222) -#define __NR_POSIX_reserved55 (__NR_POSIX + 223) -#define __NR_POSIX_reserved56 (__NR_POSIX + 224) -#define __NR_POSIX_reserved57 (__NR_POSIX + 225) -#define __NR_POSIX_reserved58 (__NR_POSIX + 226) -#define __NR_POSIX_reserved59 (__NR_POSIX + 227) -#define __NR_POSIX_reserved60 (__NR_POSIX + 228) -#define __NR_POSIX_reserved61 (__NR_POSIX + 229) -#define __NR_POSIX_reserved62 (__NR_POSIX + 230) -#define __NR_POSIX_reserved63 (__NR_POSIX + 231) -#define __NR_POSIX_reserved64 (__NR_POSIX + 232) -#define __NR_POSIX_reserved65 (__NR_POSIX + 233) -#define __NR_POSIX_reserved66 (__NR_POSIX + 234) -#define __NR_POSIX_reserved67 (__NR_POSIX + 235) -#define __NR_POSIX_reserved68 (__NR_POSIX + 236) -#define __NR_POSIX_reserved69 (__NR_POSIX + 237) -#define __NR_POSIX_reserved70 (__NR_POSIX + 238) -#define __NR_POSIX_reserved71 (__NR_POSIX + 239) -#define __NR_POSIX_reserved72 (__NR_POSIX + 240) -#define __NR_POSIX_reserved73 (__NR_POSIX + 241) -#define __NR_POSIX_reserved74 (__NR_POSIX + 242) -#define __NR_POSIX_reserved75 (__NR_POSIX + 243) -#define __NR_POSIX_reserved76 (__NR_POSIX + 244) -#define __NR_POSIX_reserved77 (__NR_POSIX + 245) -#define __NR_POSIX_reserved78 (__NR_POSIX + 246) -#define __NR_POSIX_reserved79 (__NR_POSIX + 247) -#define __NR_POSIX_reserved80 (__NR_POSIX + 248) -#define __NR_POSIX_reserved81 (__NR_POSIX + 249) -#define __NR_POSIX_reserved82 (__NR_POSIX + 250) -#define __NR_POSIX_reserved83 (__NR_POSIX + 251) -#define __NR_POSIX_reserved84 (__NR_POSIX + 252) -#define __NR_POSIX_reserved85 (__NR_POSIX + 253) -#define __NR_POSIX_reserved86 (__NR_POSIX + 254) -#define __NR_POSIX_reserved87 (__NR_POSIX + 255) -#define __NR_POSIX_reserved88 (__NR_POSIX + 256) -#define __NR_POSIX_reserved89 (__NR_POSIX + 257) -#define __NR_POSIX_reserved90 (__NR_POSIX + 258) -#define __NR_POSIX_reserved91 (__NR_POSIX + 259) -#define __NR_POSIX_netboot (__NR_POSIX + 260) -#define __NR_POSIX_netunboot (__NR_POSIX + 261) -#define __NR_POSIX_rdump (__NR_POSIX + 262) -#define __NR_POSIX_setsid (__NR_POSIX + 263) -#define __NR_POSIX_getmaxsig (__NR_POSIX + 264) -#define __NR_POSIX_sigpending (__NR_POSIX + 265) -#define __NR_POSIX_sigprocmask (__NR_POSIX + 266) -#define __NR_POSIX_sigsuspend (__NR_POSIX + 267) -#define __NR_POSIX_sigaction (__NR_POSIX + 268) -#define __NR_POSIX_MIPS_reserved1 (__NR_POSIX + 269) -#define __NR_POSIX_MIPS_reserved2 (__NR_POSIX + 270) -#define __NR_POSIX_MIPS_reserved3 (__NR_POSIX + 271) -#define __NR_POSIX_MIPS_reserved4 (__NR_POSIX + 272) -#define __NR_POSIX_MIPS_reserved5 (__NR_POSIX + 273) -#define __NR_POSIX_MIPS_reserved6 (__NR_POSIX + 274) -#define __NR_POSIX_MIPS_reserved7 (__NR_POSIX + 275) -#define __NR_POSIX_MIPS_reserved8 (__NR_POSIX + 276) -#define __NR_POSIX_MIPS_reserved9 (__NR_POSIX + 277) -#define __NR_POSIX_MIPS_reserved10 (__NR_POSIX + 278) -#define __NR_POSIX_MIPS_reserved11 (__NR_POSIX + 279) -#define __NR_POSIX_TANDEM_reserved1 (__NR_POSIX + 280) -#define __NR_POSIX_TANDEM_reserved2 (__NR_POSIX + 281) -#define __NR_POSIX_TANDEM_reserved3 (__NR_POSIX + 282) -#define __NR_POSIX_TANDEM_reserved4 (__NR_POSIX + 283) -#define __NR_POSIX_TANDEM_reserved5 (__NR_POSIX + 284) -#define __NR_POSIX_TANDEM_reserved6 (__NR_POSIX + 285) -#define __NR_POSIX_TANDEM_reserved7 (__NR_POSIX + 286) -#define __NR_POSIX_TANDEM_reserved8 (__NR_POSIX + 287) -#define __NR_POSIX_TANDEM_reserved9 (__NR_POSIX + 288) -#define __NR_POSIX_TANDEM_reserved10 (__NR_POSIX + 289) -#define __NR_POSIX_TANDEM_reserved11 (__NR_POSIX + 290) -#define __NR_POSIX_TANDEM_reserved12 (__NR_POSIX + 291) -#define __NR_POSIX_TANDEM_reserved13 (__NR_POSIX + 292) -#define __NR_POSIX_TANDEM_reserved14 (__NR_POSIX + 293) -#define __NR_POSIX_TANDEM_reserved15 (__NR_POSIX + 294) -#define __NR_POSIX_TANDEM_reserved16 (__NR_POSIX + 295) -#define __NR_POSIX_TANDEM_reserved17 (__NR_POSIX + 296) -#define __NR_POSIX_TANDEM_reserved18 (__NR_POSIX + 297) -#define __NR_POSIX_TANDEM_reserved19 (__NR_POSIX + 298) -#define __NR_POSIX_TANDEM_reserved20 (__NR_POSIX + 299) -#define __NR_POSIX_SGI_reserved7 (__NR_POSIX + 300) -#define __NR_POSIX_SGI_reserved8 (__NR_POSIX + 301) -#define __NR_POSIX_SGI_reserved9 (__NR_POSIX + 302) -#define __NR_POSIX_SGI_reserved10 (__NR_POSIX + 303) -#define __NR_POSIX_SGI_reserved11 (__NR_POSIX + 304) -#define __NR_POSIX_SGI_reserved12 (__NR_POSIX + 305) -#define __NR_POSIX_SGI_reserved13 (__NR_POSIX + 306) -#define __NR_POSIX_SGI_reserved14 (__NR_POSIX + 307) -#define __NR_POSIX_SGI_reserved15 (__NR_POSIX + 308) -#define __NR_POSIX_SGI_reserved16 (__NR_POSIX + 309) -#define __NR_POSIX_SGI_reserved17 (__NR_POSIX + 310) -#define __NR_POSIX_SGI_reserved18 (__NR_POSIX + 311) -#define __NR_POSIX_SGI_reserved19 (__NR_POSIX + 312) -#define __NR_POSIX_SGI_reserved20 (__NR_POSIX + 313) -#define __NR_POSIX_SGI_reserved21 (__NR_POSIX + 314) -#define __NR_POSIX_SGI_reserved22 (__NR_POSIX + 315) -#define __NR_POSIX_SGI_reserved23 (__NR_POSIX + 316) -#define __NR_POSIX_SGI_reserved24 (__NR_POSIX + 317) -#define __NR_POSIX_SGI_reserved25 (__NR_POSIX + 318) -#define __NR_POSIX_SGI_reserved26 (__NR_POSIX + 319) - -/* - * Linux syscalls are in the range from 4000 to 4999 - * Hopefully these syscall numbers are unused ... If not everyone using - * statically linked binaries is pretty upsh*t. You've been warned. + * Linux o32 style syscalls are in the range from 4000 to 4999. */ #define __NR_Linux 4000 #define __NR_syscall (__NR_Linux + 0) @@ -985,7 +21,7 @@ #define __NR_chmod (__NR_Linux + 15) #define __NR_lchown (__NR_Linux + 16) #define __NR_break (__NR_Linux + 17) -#define __NR_oldstat (__NR_Linux + 18) +#define __NR_unused18 (__NR_Linux + 18) #define __NR_lseek (__NR_Linux + 19) #define __NR_getpid (__NR_Linux + 20) #define __NR_mount (__NR_Linux + 21) @@ -995,7 +31,7 @@ #define __NR_stime (__NR_Linux + 25) #define __NR_ptrace (__NR_Linux + 26) #define __NR_alarm (__NR_Linux + 27) -#define __NR_oldfstat (__NR_Linux + 28) +#define __NR_unused28 (__NR_Linux + 28) #define __NR_pause (__NR_Linux + 29) #define __NR_utime (__NR_Linux + 30) #define __NR_stty (__NR_Linux + 31) @@ -1026,7 +62,7 @@ #define __NR_mpx (__NR_Linux + 56) #define __NR_setpgid (__NR_Linux + 57) #define __NR_ulimit (__NR_Linux + 58) -#define __NR_oldolduname (__NR_Linux + 59) +#define __NR_unused59 (__NR_Linux + 59) #define __NR_umask (__NR_Linux + 60) #define __NR_chroot (__NR_Linux + 61) #define __NR_ustat (__NR_Linux + 62) @@ -1051,7 +87,7 @@ #define __NR_setgroups (__NR_Linux + 81) #define __NR_reserved82 (__NR_Linux + 82) #define __NR_symlink (__NR_Linux + 83) -#define __NR_oldlstat (__NR_Linux + 84) +#define __NR_unused84 (__NR_Linux + 84) #define __NR_readlink (__NR_Linux + 85) #define __NR_uselib (__NR_Linux + 86) #define __NR_swapon (__NR_Linux + 87) @@ -1076,7 +112,7 @@ #define __NR_stat (__NR_Linux + 106) #define __NR_lstat (__NR_Linux + 107) #define __NR_fstat (__NR_Linux + 108) -#define __NR_olduname (__NR_Linux + 109) +#define __NR_unused109 (__NR_Linux + 109) #define __NR_iopl (__NR_Linux + 110) #define __NR_vhangup (__NR_Linux + 111) #define __NR_idle (__NR_Linux + 112) @@ -1188,7 +224,7 @@ #define __NR_madvise (__NR_Linux + 218) #define __NR_getdents64 (__NR_Linux + 219) #define __NR_fcntl64 (__NR_Linux + 220) -#define __NR_security (__NR_Linux + 221) +#define __NR_reserved221 (__NR_Linux + 221) #define __NR_gettid (__NR_Linux + 222) #define __NR_readahead (__NR_Linux + 223) #define __NR_setxattr (__NR_Linux + 224) @@ -1208,6 +244,48 @@ #define __NR_futex (__NR_Linux + 238) #define __NR_sched_setaffinity (__NR_Linux + 239) #define __NR_sched_getaffinity (__NR_Linux + 240) +#define __NR_io_setup (__NR_Linux + 241) +#define __NR_io_destroy (__NR_Linux + 242) +#define __NR_io_getevents (__NR_Linux + 243) +#define __NR_io_submit (__NR_Linux + 244) +#define __NR_io_cancel (__NR_Linux + 245) +#define __NR_exit_group (__NR_Linux + 246) +#define __NR_lookup_dcookie (__NR_Linux + 247) +#define __NR_epoll_create (__NR_Linux + 248) +#define __NR_epoll_ctl (__NR_Linux + 249) +#define __NR_epoll_wait (__NR_Linux + 250) +#define __NR_remap_file_pages (__NR_Linux + 251) +#define __NR_set_tid_address (__NR_Linux + 252) +#define __NR_restart_syscall (__NR_Linux + 253) +#define __NR_fadvise64 (__NR_Linux + 254) +#define __NR_statfs64 (__NR_Linux + 255) +#define __NR_fstatfs64 (__NR_Linux + 256) +#define __NR_timer_create (__NR_Linux + 257) +#define __NR_timer_settime (__NR_Linux + 258) +#define __NR_timer_gettime (__NR_Linux + 259) +#define __NR_timer_getoverrun (__NR_Linux + 260) +#define __NR_timer_delete (__NR_Linux + 261) +#define __NR_clock_settime (__NR_Linux + 262) +#define __NR_clock_gettime (__NR_Linux + 263) +#define __NR_clock_getres (__NR_Linux + 264) +#define __NR_clock_nanosleep (__NR_Linux + 265) +#define __NR_tgkill (__NR_Linux + 266) +#define __NR_utimes (__NR_Linux + 267) +#define __NR_mbind (__NR_Linux + 268) +#define __NR_get_mempolicy (__NR_Linux + 269) +#define __NR_set_mempolicy (__NR_Linux + 270) +#define __NR_mq_open (__NR_Linux + 271) +#define __NR_mq_unlink (__NR_Linux + 272) +#define __NR_mq_timedsend (__NR_Linux + 273) +#define __NR_mq_timedreceive (__NR_Linux + 274) +#define __NR_mq_notify (__NR_Linux + 275) +#define __NR_mq_getsetattr (__NR_Linux + 276) +#define __NR_vserver (__NR_Linux + 277) +#define __NR_waitid (__NR_Linux + 278) +/* #define __NR_sys_setaltroot (__NR_Linux + 279) */ +#define __NR_add_key (__NR_Linux + 280) +#define __NR_request_key (__NR_Linux + 281) +#define __NR_keyctl (__NR_Linux + 282) #define syscall_weak(name,wsym,sym) \ .text; \ diff -uNr dietlibc-0.28/mipsel/CVS/Entries dietlibc-0.29/mipsel/CVS/Entries --- dietlibc-0.28/mipsel/CVS/Entries 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/mipsel/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,3 +0,0 @@ -/Makefile.add/1.3/Fri Aug 13 14:03:30 2004// -/syscalls.h/1.1/Fri Jan 9 17:41:05 2004// -D diff -uNr dietlibc-0.28/mipsel/CVS/Repository dietlibc-0.29/mipsel/CVS/Repository --- dietlibc-0.28/mipsel/CVS/Repository 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/mipsel/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/mipsel diff -uNr dietlibc-0.28/mipsel/CVS/Root dietlibc-0.29/mipsel/CVS/Root --- dietlibc-0.28/mipsel/CVS/Root 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/mipsel/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/parisc/CVS/Entries dietlibc-0.29/parisc/CVS/Entries --- dietlibc-0.28/parisc/CVS/Entries 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/parisc/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,38 +0,0 @@ -/Makefile.add/1.1/Fri Jan 11 18:06:53 2002// -/__longjmp.S/1.1/Fri Jan 11 18:06:53 2002// -/__testandset.S/1.2/Mon Jan 28 17:09:41 2002// -/accept.S/1.1/Wed Jul 3 20:33:38 2002// -/bind.S/1.1/Wed Jul 3 20:33:38 2002// -/clone.S/1.4/Tue Jun 11 10:59:44 2002// -/connect.S/1.1/Wed Jul 3 20:33:38 2002// -/getpeername.S/1.1/Wed Jul 3 20:33:38 2002// -/getsockname.S/1.1/Wed Jul 3 20:33:38 2002// -/getsockopt.S/1.1/Wed Jul 3 20:33:38 2002// -/listen.S/1.1/Wed Jul 3 20:33:38 2002// -/mmap.S/1.1/Fri Jan 11 18:06:53 2002// -/recv.S/1.1/Wed Jul 3 20:33:38 2002// -/recvfrom.S/1.1/Wed Jul 3 20:33:38 2002// -/recvmsg.S/1.1/Wed Jul 3 20:33:38 2002// -/send.S/1.1/Wed Jul 3 20:33:38 2002// -/sendmsg.S/1.1/Wed Jul 3 20:33:38 2002// -/sendto.S/1.1/Wed Jul 3 20:33:38 2002// -/setjmp.S/1.2/Sun Sep 21 13:03:49 2003// -/setsockopt.S/1.1/Wed Jul 3 20:33:38 2002// -/shutdown.S/1.1/Wed Jul 3 20:33:38 2002// -/socket.S/1.1/Wed Jul 3 20:33:38 2002// -/socketpair.S/1.1/Wed Jul 3 20:33:38 2002// -/start.S/1.3/Sat Sep 11 12:37:57 2004// -/strcasecmp.S/1.1/Thu Sep 4 01:50:50 2003// -/strchr.S/1.2/Sat Sep 20 12:18:44 2003// -/strcmp.S/1.1/Thu Sep 4 01:50:50 2003// -/strlen.S/1.3/Sun Sep 21 13:03:49 2003// -/strncasecmp.S/1.1/Thu Sep 4 01:50:50 2003// -/strncmp.S/1.1/Thu Sep 4 01:50:50 2003// -/strncpy.S/1.1/Thu Sep 4 01:50:50 2003// -/strpbrk.S/1.1/Thu Sep 4 01:50:50 2003// -/strrchr.S/1.1/Thu Sep 4 01:50:50 2003// -/strstr.S/1.2/Tue Sep 16 14:27:33 2003// -/syscalls.h/1.4/Sat Apr 12 15:21:46 2003// -/umount.S/1.1/Tue Sep 16 14:25:07 2003// -/unified.S/1.5/Thu Jan 31 12:53:45 2002// -D diff -uNr dietlibc-0.28/parisc/CVS/Repository dietlibc-0.29/parisc/CVS/Repository --- dietlibc-0.28/parisc/CVS/Repository 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/parisc/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/parisc diff -uNr dietlibc-0.28/parisc/CVS/Root dietlibc-0.29/parisc/CVS/Root --- dietlibc-0.28/parisc/CVS/Root 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/parisc/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/parisc/start.S dietlibc-0.29/parisc/start.S --- dietlibc-0.28/parisc/start.S 2004-09-11 05:37:57.000000000 -0700 +++ dietlibc-0.29/parisc/start.S 2005-05-13 11:39:32.000000000 -0700 @@ -11,6 +11,8 @@ Implemenation of the _start startup function */ +#include "dietfeatures.h" + .level 1.1 .text @@ -37,11 +39,16 @@ stw %r24, 0(%sr0, %r19) ldil L%$global$, %dp +#ifdef WANT_DYNAMIC +/* FIXME: dl_init parameter ??? */ + bl _dyn_start, %rp +#else #ifdef WANT_STACKGAP bl stackgap, %rp #else bl main, %rp #endif +#endif ldo R%$global$(%dp), %dp b _exit or %r28, %r28, %r26 diff -uNr dietlibc-0.28/parisc/syscalls.h dietlibc-0.29/parisc/syscalls.h --- dietlibc-0.28/parisc/syscalls.h 2003-04-12 08:21:46.000000000 -0700 +++ dietlibc-0.29/parisc/syscalls.h 2005-03-23 11:05:25.000000000 -0800 @@ -114,8 +114,8 @@ #define __NR_recv (__NR_Linux + 98) #define __NR_statfs (__NR_Linux + 99) #define __NR_fstatfs (__NR_Linux + 100) -#define __NR_stat64 (__NR_Linux + 101) -#define __NR_socketcall (__NR_Linux + 102) +#define __NR_stat64 (__NR_Linux + 101) +/* #define __NR_socketcall (__NR_Linux + 102) */ #define __NR_syslog (__NR_Linux + 103) #define __NR_setitimer (__NR_Linux + 104) #define __NR_getitimer (__NR_Linux + 105) @@ -150,7 +150,7 @@ #define __NR_bdflush (__NR_Linux + 134) #define __NR_sysfs (__NR_Linux + 135) #define __NR_personality (__NR_Linux + 136) -#define __NR_afs_syscall (__NR_Linux + 137) +#define __NR_afs_syscall (__NR_Linux + 137) /* Syscall for Andrew File System */ #define __NR_setfsuid (__NR_Linux + 138) #define __NR_setfsgid (__NR_Linux + 139) #define __NR__llseek (__NR_Linux + 140) @@ -222,28 +222,63 @@ #define __NR_acl_set (__NR_Linux + 205) #define __NR_gettid (__NR_Linux + 206) #define __NR_readahead (__NR_Linux + 207) -#define __NR_tkill (__NR_Linux + 208) -#define __NR_sendfile64 (__NR_Linux + 209) -#define __NR_futex (__NR_Linux + 210) -#define __NR_sched_setaffinity (__NR_Linux + 211) -#define __NR_sched_getaffinity (__NR_Linux + 212) -#define __NR_set_thread_area (__NR_Linux + 213) -#define __NR_get_thread_area (__NR_Linux + 214) -#define __NR_io_setup (__NR_Linux + 215) -#define __NR_io_destroy (__NR_Linux + 216) -#define __NR_io_getevents (__NR_Linux + 217) -#define __NR_io_submit (__NR_Linux + 218) -#define __NR_io_cancel (__NR_Linux + 219) -#define __NR_alloc_hugepages (__NR_Linux + 220) -#define __NR_free_hugepages (__NR_Linux + 221) -#define __NR_exit_group (__NR_Linux + 222) -#define __NR_lookup_dcookie (__NR_Linux + 223) -#define __NR_epoll_create (__NR_Linux + 224) -#define __NR_epoll_ctl (__NR_Linux + 225) -#define __NR_epoll_wait (__NR_Linux + 226) -#define __NR_remap_file_pages (__NR_Linux + 227) +#define __NR_tkill (__NR_Linux + 208) +#define __NR_sendfile64 (__NR_Linux + 209) +#define __NR_futex (__NR_Linux + 210) +#define __NR_sched_setaffinity (__NR_Linux + 211) +#define __NR_sched_getaffinity (__NR_Linux + 212) +#define __NR_set_thread_area (__NR_Linux + 213) +#define __NR_get_thread_area (__NR_Linux + 214) +#define __NR_io_setup (__NR_Linux + 215) +#define __NR_io_destroy (__NR_Linux + 216) +#define __NR_io_getevents (__NR_Linux + 217) +#define __NR_io_submit (__NR_Linux + 218) +#define __NR_io_cancel (__NR_Linux + 219) +#define __NR_alloc_hugepages (__NR_Linux + 220) +#define __NR_free_hugepages (__NR_Linux + 221) +#define __NR_exit_group (__NR_Linux + 222) +#define __NR_lookup_dcookie (__NR_Linux + 223) +#define __NR_epoll_create (__NR_Linux + 224) +#define __NR_epoll_ctl (__NR_Linux + 225) +#define __NR_epoll_wait (__NR_Linux + 226) +#define __NR_remap_file_pages (__NR_Linux + 227) +#define __NR_semtimedop (__NR_Linux + 228) +#define __NR_mq_open (__NR_Linux + 229) +#define __NR_mq_unlink (__NR_Linux + 230) +#define __NR_mq_timedsend (__NR_Linux + 231) +#define __NR_mq_timedreceive (__NR_Linux + 232) +#define __NR_mq_notify (__NR_Linux + 233) +#define __NR_mq_getsetattr (__NR_Linux + 234) +#define __NR_waitid (__NR_Linux + 235) +#define __NR_fadvise64_64 (__NR_Linux + 236) +#define __NR_set_tid_address (__NR_Linux + 237) +#define __NR_setxattr (__NR_Linux + 238) +#define __NR_lsetxattr (__NR_Linux + 239) +#define __NR_fsetxattr (__NR_Linux + 240) +#define __NR_getxattr (__NR_Linux + 241) +#define __NR_lgetxattr (__NR_Linux + 242) +#define __NR_fgetxattr (__NR_Linux + 243) +#define __NR_listxattr (__NR_Linux + 244) +#define __NR_llistxattr (__NR_Linux + 245) +#define __NR_flistxattr (__NR_Linux + 246) +#define __NR_removexattr (__NR_Linux + 247) +#define __NR_lremovexattr (__NR_Linux + 248) +#define __NR_fremovexattr (__NR_Linux + 249) +#define __NR_timer_create (__NR_Linux + 250) +#define __NR_timer_settime (__NR_Linux + 251) +#define __NR_timer_gettime (__NR_Linux + 252) +#define __NR_timer_getoverrun (__NR_Linux + 253) +#define __NR_timer_delete (__NR_Linux + 254) +#define __NR_clock_settime (__NR_Linux + 255) +#define __NR_clock_gettime (__NR_Linux + 256) +#define __NR_clock_getres (__NR_Linux + 257) +#define __NR_clock_nanosleep (__NR_Linux + 258) +#define __NR_tgkill (__NR_Linux + 259) +#define __NR_mbind (__NR_Linux + 260) +#define __NR_get_mempolicy (__NR_Linux + 261) +#define __NR_set_mempolicy (__NR_Linux + 262) -#define __NR_Linux_syscalls 228 +#define __NR_Linux_syscalls 263 #define LINUX_GATEWAY_ADDR 0x100 diff -uNr dietlibc-0.28/parselib.h dietlibc-0.29/parselib.h --- dietlibc-0.28/parselib.h 2003-04-08 09:41:27.000000000 -0700 +++ dietlibc-0.29/parselib.h 2005-04-10 06:59:32.000000000 -0700 @@ -2,7 +2,7 @@ /* a memory buffer. */ struct state { - const unsigned char* buffirst;/* pointer to the buffer */ + const char* buffirst;/* pointer to the buffer */ size_t buflen; /* length of the buffer */ size_t cur; /* already parsed bytes */ }; diff -uNr dietlibc-0.28/ppc/CVS/Entries dietlibc-0.29/ppc/CVS/Entries --- dietlibc-0.28/ppc/CVS/Entries 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/ppc/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,10 +0,0 @@ -/Makefile.add/1.3/Tue Jan 30 15:01:20 2001// -/__longjmp.S/1.2/Thu Jan 25 17:23:36 2001// -/__testandset.S/1.4/Mon Sep 16 11:17:01 2002// -/clone.S/1.2/Thu Dec 13 16:05:03 2001// -/mmap.c/1.3/Mon Jun 18 21:08:07 2001// -/setjmp.S/1.1/Tue Jan 9 17:57:44 2001// -/start.S/1.6/Sat Sep 11 12:37:57 2004// -/syscalls.h/1.4/Fri Nov 7 14:24:39 2003// -/unified.S/1.8/Mon Jan 21 15:55:19 2002// -D diff -uNr dietlibc-0.28/ppc/CVS/Repository dietlibc-0.29/ppc/CVS/Repository --- dietlibc-0.28/ppc/CVS/Repository 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/ppc/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/ppc diff -uNr dietlibc-0.28/ppc/CVS/Root dietlibc-0.29/ppc/CVS/Root --- dietlibc-0.28/ppc/CVS/Root 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/ppc/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/ppc/start.S dietlibc-0.29/ppc/start.S --- dietlibc-0.28/ppc/start.S 2004-09-11 05:37:57.000000000 -0700 +++ dietlibc-0.29/ppc/start.S 2005-05-13 11:39:32.000000000 -0700 @@ -1,3 +1,5 @@ +#include "dietfeatures.h" + .text .global _start .type _start,@function @@ -16,6 +18,9 @@ argv = (r9+4) envp = argv+(argc+1)*4 */ + lis 14,__libc_stack_end@ha + stw 9,__libc_stack_end@l(14) + lwzu 3,0(9) /* argc */ addi 4,9,4 /* argv */ add 5,0,3 /* argc... */ @@ -44,3 +49,8 @@ .section ".data" __data_start: +/* this is needed for libgcc_eh.a - see gcc-3.4/gcc/config/rs6000/linux-unwind.h */ + .weak __libc_stack_end + .lcomm __libc_stack_end,4,4 + .type __libc_stack_end,@object + diff -uNr dietlibc-0.28/ppc/syscalls.h dietlibc-0.29/ppc/syscalls.h --- dietlibc-0.28/ppc/syscalls.h 2003-11-07 06:24:39.000000000 -0800 +++ dietlibc-0.29/ppc/syscalls.h 2005-03-23 11:05:25.000000000 -0800 @@ -189,6 +189,7 @@ #define __NR_putpmsg 188 /* some people actually want streams */ #define __NR_vfork 189 #define __NR_ugetrlimit 190 /* SuS compliant getrlimit */ +#define __NR_readahead 191 #define __NR_mmap2 192 #define __NR_truncate64 193 #define __NR_ftruncate64 194 @@ -252,6 +253,23 @@ #define __NR_statfs64 252 #define __NR_fstatfs64 253 #define __NR_fadvise64_64 254 +#define __NR_rtas 255 +#define __NR_sys_debug_setcontext 256 +/* Number 257 is reserved for vserver */ +/* Number 258 is reserved for new sys_remap_file_pages */ +/* Number 259 is reserved for new sys_mbind */ +/* Number 260 is reserved for new sys_get_mempolicy */ +/* Number 261 is reserved for new sys_set_mempolicy */ +#define __NR_mq_open 262 +#define __NR_mq_unlink 263 +#define __NR_mq_timedsend 264 +#define __NR_mq_timedreceive 265 +#define __NR_mq_notify 266 +#define __NR_mq_getsetattr 267 +#define __NR_kexec_load 268 +#define __NR_add_key 269 +#define __NR_request_key 270 +#define __NR_keyctl 271 #define syscall_weak(name,wsym,sym) \ .text; \ diff -uNr dietlibc-0.28/ppc64/CVS/Entries dietlibc-0.29/ppc64/CVS/Entries --- dietlibc-0.28/ppc64/CVS/Entries 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/ppc64/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,10 +0,0 @@ -/Makefile.add/1.1/Fri Oct 10 13:37:34 2003// -/__longjmp.S/1.2/Fri Dec 17 18:47:58 2004// -/__testandset.S/1.1/Fri Oct 10 13:37:34 2003// -/clone.S/1.1/Fri Oct 10 13:37:34 2003// -/setjmp.S/1.2/Fri Dec 17 18:47:59 2004// -/start.S/1.2/Sat Sep 11 12:37:57 2004// -/syscalls.h/1.2/Fri Nov 7 14:24:39 2003// -/umount.S/1.1/Fri Dec 17 18:47:59 2004// -/unified.S/1.1/Fri Oct 10 13:37:34 2003// -D diff -uNr dietlibc-0.28/ppc64/CVS/Repository dietlibc-0.29/ppc64/CVS/Repository --- dietlibc-0.28/ppc64/CVS/Repository 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/ppc64/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/ppc64 diff -uNr dietlibc-0.28/ppc64/CVS/Root dietlibc-0.29/ppc64/CVS/Root --- dietlibc-0.28/ppc64/CVS/Root 2005-01-31 09:53:09.000000000 -0800 +++ dietlibc-0.29/ppc64/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/ppc64/__longjmp.S dietlibc-0.29/ppc64/__longjmp.S --- dietlibc-0.28/ppc64/__longjmp.S 2004-12-17 10:47:58.000000000 -0800 +++ dietlibc-0.29/ppc64/__longjmp.S 2005-03-23 11:57:53.000000000 -0800 @@ -1,7 +1,7 @@ #include .quad .__longjmp,.TOC.@tocbase,0 - .previous + .text .size __longjmp,24 .type .__longjmp,@function .globl .__longjmp diff -uNr dietlibc-0.28/ppc64/clone.S dietlibc-0.29/ppc64/clone.S --- dietlibc-0.28/ppc64/clone.S 2003-10-10 06:37:34.000000000 -0700 +++ dietlibc-0.29/ppc64/clone.S 2005-05-13 11:39:32.000000000 -0700 @@ -12,8 +12,10 @@ cror eq,4*cr1+eq,eq /* now if eq is set one is or both are zero */ beq .Lclone_error - stwu 1,-32(1) /* alloc some space on the stack */ - stmw 29, 16(1) /* save r29,r30,r31 on stack */ + stdu 1,-64(1) /* alloc some space on the stack */ + std 29, 16(1) /* save r29,r30,r31 on stack */ + std 30, 24(1) + std 31, 32(1) rlwinm 4,4,0,0,27 /* mask out lower 4 bits */ @@ -38,8 +40,10 @@ b _exit /* exit thread */ .Lclone_parent: - lmw 29,16(1) /* restore saved registers */ - addi 1, 1,32 /* free stack */ + ld 29,16(1) /* restore saved registers */ + ld 30,24(1) + ld 31,32(1) + addi 1, 1,64 /* free stack */ bnslr+ /* had cloned a thread so return to parent */ b error_unified_syscall diff -uNr dietlibc-0.28/ppc64/setjmp.S dietlibc-0.29/ppc64/setjmp.S --- dietlibc-0.28/ppc64/setjmp.S 2004-12-17 10:47:59.000000000 -0800 +++ dietlibc-0.29/ppc64/setjmp.S 2005-03-23 11:57:53.000000000 -0800 @@ -7,7 +7,7 @@ #endif .quad .__sigsetjmp,.TOC.@tocbase,0 - .previous + .text .size __sigsetjmp,24 .type .__sigsetjmp,@function .globl .__sigsetjmp diff -uNr dietlibc-0.28/ppc64/start.S dietlibc-0.29/ppc64/start.S --- dietlibc-0.28/ppc64/start.S 2004-09-11 05:37:57.000000000 -0700 +++ dietlibc-0.29/ppc64/start.S 2005-05-13 11:39:32.000000000 -0700 @@ -1,3 +1,5 @@ +#include "dietfeatures.h" + .section ".text" .align 2 .globl ._start @@ -37,22 +39,31 @@ argv = (r9+4) envp = argv+(argc+1)*4 */ + lis 14,__libc_stack_end@highesta + ori 14,14,__libc_stack_end@highera + sldi 14,14,32 + oris 14,14,__libc_stack_end@ha + std 9,__libc_stack_end@l(14) + ldu 3,0(9) /* argc */ addi 4,9,8 /* argv */ add 5,0,3 /* argc... */ addi 5,5,1 /* argc+1...*/ - slwi 5,5,3 /* (argc+1)*4 */ - add 5,5,4 /* argv+(argc+1)*4 */ + slwi 5,5,3 /* (argc+1)*8 */ + add 5,5,4 /* argv+(argc+1)*8 */ - lis 14,environ@ha + lis 14,environ@highesta + ori 14,14,environ@highera + sldi 14,14,32 + oris 14,14,environ@ha std 5,environ@l(14) #ifdef WANT_DYNAMIC -#warning dynamic +/* #warning dynamic */ mr 6,7 bl ._dyn_start #else -#warning static +/* #warning static */ #ifdef WANT_STACKGAP bl .stackgap #else @@ -76,3 +87,8 @@ .section ".data" __data_start: +/* this is needed for libgcc_eh.a - see gcc-3.4/gcc/config/rs6000/linux-unwind.h */ + .weak __libc_stack_end + .lcomm __libc_stack_end,8,8 + .type __libc_stack_end,@object + diff -uNr dietlibc-0.28/ppc64/syscalls.h dietlibc-0.29/ppc64/syscalls.h --- dietlibc-0.28/ppc64/syscalls.h 2003-11-07 06:24:39.000000000 -0800 +++ dietlibc-0.29/ppc64/syscalls.h 2005-03-23 11:05:25.000000000 -0800 @@ -189,19 +189,20 @@ #define __NR_putpmsg 188 /* some people actually want streams */ #define __NR_vfork 189 #define __NR_ugetrlimit 190 /* SuS compliant getrlimit */ -#define __NR_mmap2 192 -//#define __NR_truncate64 193 -//#define __NR_ftruncate64 194 -//#define __NR_stat64 195 -//#define __NR_lstat64 196 -//#define __NR_fstat64 197 +#define __NR_readahead 191 +/* #define __NR_mmap2 192 32bit only */ +/* #define __NR_truncate64 193 32bit only */ +/* #define __NR_ftruncate64 194 32bit only */ +/* #define __NR_stat64 195 32bit only */ +/* #define __NR_lstat64 196 32bit only */ +/* #define __NR_fstat64 197 32bit only */ #define __NR_pciconfig_read 198 #define __NR_pciconfig_write 199 #define __NR_pciconfig_iobase 200 #define __NR_multiplexer 201 -//#define __NR_getdents64 202 +#define __NR_getdents64 202 #define __NR_pivot_root 203 -//#define __NR_fcntl64 204 +/* #define __NR_fcntl64 204 32bit only */ #define __NR_madvise 205 #define __NR_mincore 206 #define __NR_gettid 207 @@ -223,7 +224,7 @@ #define __NR_sched_getaffinity 223 /* 224 currently unused */ #define __NR_tuxcall 225 -//#define __NR_sendfile64 226 +/* #define __NR_sendfile64 226 32bit only */ #define __NR_io_setup 227 #define __NR_io_destroy 228 #define __NR_io_getevents 229 @@ -233,9 +234,9 @@ #define __NR_fadvise64 233 #define __NR_exit_group 234 #define __NR_lookup_dcookie 235 -#define __NR_sys_epoll_create 236 -#define __NR_sys_epoll_ctl 237 -#define __NR_sys_epoll_wait 238 +#define __NR_epoll_create 236 +#define __NR_epoll_ctl 237 +#define __NR_epoll_wait 238 #define __NR_remap_file_pages 239 #define __NR_timer_create 240 #define __NR_timer_settime 241 @@ -251,6 +252,24 @@ #define __NR_utimes 251 #define __NR_statfs64 252 #define __NR_fstatfs64 253 +/* #define __NR_fadvise64_64 254 32bit only */ +#define __NR_rtas 255 +/* Number 256 is reserved for sys_debug_setcontext */ +/* Number 257 is reserved for vserver */ +/* Number 258 is reserved for new sys_remap_file_pages */ +#define __NR_mbind 259 +#define __NR_get_mempolicy 260 +#define __NR_set_mempolicy 261 +#define __NR_mq_open 262 +#define __NR_mq_unlink 263 +#define __NR_mq_timedsend 264 +#define __NR_mq_timedreceive 265 +#define __NR_mq_notify 266 +#define __NR_mq_getsetattr 267 +#define __NR_kexec_load 268 +#define __NR_add_key 269 +#define __NR_request_key 270 +#define __NR_keyctl 271 #define diet_proto_weak(wsym) \ diff -uNr dietlibc-0.28/ppc64/unified.S dietlibc-0.29/ppc64/unified.S --- dietlibc-0.28/ppc64/unified.S 2003-10-10 06:37:34.000000000 -0700 +++ dietlibc-0.29/ppc64/unified.S 2005-05-13 11:39:32.000000000 -0700 @@ -26,7 +26,10 @@ mtlr 0 addi 1,1,128 #else - lis 9,errno@ha + lis 9,errno@highesta + ori 9,9,errno@highera + sldi 9,9,32 + oris 9,9,errno@ha stw 3,errno@l(9) #endif li 3,-1 diff -uNr dietlibc-0.28/profiling/CVS/Entries dietlibc-0.29/profiling/CVS/Entries --- dietlibc-0.28/profiling/CVS/Entries 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/profiling/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,6 +0,0 @@ -/PORTING/1.1/Tue Apr 2 16:04:06 2002// -/README/1.1/Tue Apr 2 16:04:06 2002// -/__mcount.c/1.3/Sun Apr 7 22:13:52 2002// -/monitor.c/1.5/Sun Apr 7 22:13:52 2002// -/profil.c/1.2/Sun Apr 7 22:13:53 2002// -D diff -uNr dietlibc-0.28/profiling/CVS/Repository dietlibc-0.29/profiling/CVS/Repository --- dietlibc-0.28/profiling/CVS/Repository 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/profiling/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/profiling diff -uNr dietlibc-0.28/profiling/CVS/Root dietlibc-0.29/profiling/CVS/Root --- dietlibc-0.28/profiling/CVS/Root 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/profiling/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/s390/CVS/Entries dietlibc-0.29/s390/CVS/Entries --- dietlibc-0.28/s390/CVS/Entries 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/s390/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,11 +0,0 @@ -/Makefile.add/1.2/Sat Nov 9 18:10:23 2002// -/__longjmp.S/1.1/Mon Nov 26 14:50:08 2001// -/__testandset.S/1.1/Thu Nov 29 16:53:32 2001// -/__waitpid.c/1.1/Sat Nov 9 18:10:23 2002// -/clone.S/1.4/Mon Sep 16 11:17:01 2002// -/mmap.S/1.3/Fri Oct 10 13:37:34 2003// -/setjmp.S/1.1/Mon Nov 26 14:50:08 2001// -/start.S/1.4/Sat Sep 11 12:37:57 2004// -/syscalls.h/1.3/Sat Apr 12 15:21:46 2003// -/unified.S/1.4/Fri Oct 10 13:37:34 2003// -D diff -uNr dietlibc-0.28/s390/CVS/Repository dietlibc-0.29/s390/CVS/Repository --- dietlibc-0.28/s390/CVS/Repository 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/s390/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/s390 diff -uNr dietlibc-0.28/s390/CVS/Root dietlibc-0.29/s390/CVS/Root --- dietlibc-0.28/s390/CVS/Root 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/s390/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/s390/__waitpid.c dietlibc-0.29/s390/__waitpid.c --- dietlibc-0.28/s390/__waitpid.c 2002-11-09 10:10:23.000000000 -0800 +++ dietlibc-0.29/s390/__waitpid.c 2005-05-13 11:39:32.000000000 -0700 @@ -1,5 +1,6 @@ #include +#include -pid_t waitpid(int pid, int * wait_stat, int flags) { +pid_t waitpid(pid_t pid, int * wait_stat, int flags) { return wait4(pid, wait_stat, flags, 0); } diff -uNr dietlibc-0.28/s390/select.S dietlibc-0.29/s390/select.S --- dietlibc-0.28/s390/select.S 1969-12-31 16:00:00.000000000 -0800 +++ dietlibc-0.29/s390/select.S 2005-03-23 11:57:53.000000000 -0800 @@ -0,0 +1,3 @@ +#include "syscalls.h" + +syscall(_newselect,select) diff -uNr dietlibc-0.28/s390/syscalls.h dietlibc-0.29/s390/syscalls.h --- dietlibc-0.28/s390/syscalls.h 2003-04-12 08:21:46.000000000 -0700 +++ dietlibc-0.29/s390/syscalls.h 2005-03-23 11:57:53.000000000 -0800 @@ -1,4 +1,8 @@ + + + + #define __NR_exit 1 #define __NR_fork 2 #define __NR_read 3 @@ -15,8 +19,6 @@ #define __NR_mknod 14 #define __NR_chmod 15 #define __NR_lchown 16 -//#define __NR_break 17 -//#define __NR_oldstat 18 #define __NR_lseek 19 #define __NR_getpid 20 #define __NR_mount 21 @@ -26,14 +28,10 @@ #define __NR_stime 25 #define __NR_ptrace 26 #define __NR_alarm 27 -//#define __NR_oldfstat 28 #define __NR_pause 29 #define __NR_utime 30 -//#define __NR_stty 31 -//#define __NR_gtty 32 #define __NR_access 33 #define __NR_nice 34 -//#define __NR_ftime 35 #define __NR_sync 36 #define __NR_kill 37 #define __NR_rename 38 @@ -42,7 +40,6 @@ #define __NR_dup 41 #define __NR_pipe 42 #define __NR_times 43 -//#define __NR_prof 44 #define __NR_brk 45 #define __NR_setgid 46 #define __NR_getgid 47 @@ -51,13 +48,9 @@ #define __NR_getegid 50 #define __NR_acct 51 #define __NR_umount2 52 -//#define __NR_lock 53 #define __NR_ioctl 54 #define __NR_fcntl 55 -//#define __NR_mpx 56 #define __NR_setpgid 57 -//#define __NR_ulimit 58 -//#define __NR_oldolduname 59 #define __NR_umask 60 #define __NR_chroot 61 #define __NR_ustat 62 @@ -66,23 +59,19 @@ #define __NR_getpgrp 65 #define __NR_setsid 66 #define __NR_sigaction 67 -//#define __NR_sgetmask 68 -//#define __NR_ssetmask 69 #define __NR_setreuid 70 #define __NR_setregid 71 #define __NR_sigsuspend 72 #define __NR_sigpending 73 #define __NR_sethostname 74 #define __NR_setrlimit 75 -#define __NR_getrlimit 76 /* Back compatible 2Gig limited rlimit */ +#define __NR_getrlimit 76 #define __NR_getrusage 77 #define __NR_gettimeofday 78 #define __NR_settimeofday 79 #define __NR_getgroups 80 #define __NR_setgroups 81 -//#define __NR_select 82 #define __NR_symlink 83 -//#define __NR_oldlstat 84 #define __NR_readlink 85 #define __NR_uselib 86 #define __NR_swapon 87 @@ -96,7 +85,6 @@ #define __NR_fchown 95 #define __NR_getpriority 96 #define __NR_setpriority 97 -//#define __NR_profil 98 #define __NR_statfs 99 #define __NR_fstatfs 100 #define __NR_ioperm 101 @@ -107,11 +95,9 @@ #define __NR_stat 106 #define __NR_lstat 107 #define __NR_fstat 108 -//#define __NR_olduname 109 -//#define __NR_iopl 110 +#define __NR_lookup_dcookie 110 #define __NR_vhangup 111 #define __NR_idle 112 -//#define __NR_vm86old 113 #define __NR_wait4 114 #define __NR_swapoff 115 #define __NR_sysinfo 116 @@ -121,7 +107,6 @@ #define __NR_clone 120 #define __NR_setdomainname 121 #define __NR_uname 122 -//#define __NR_modify_ldt 123 #define __NR_adjtimex 124 #define __NR_mprotect 125 #define __NR_sigprocmask 126 @@ -164,7 +149,6 @@ #define __NR_mremap 163 #define __NR_setresuid 164 #define __NR_getresuid 165 -//#define __NR_vm86 166 #define __NR_query_module 167 #define __NR_poll 168 #define __NR_nfsservctl 169 @@ -186,8 +170,8 @@ #define __NR_capset 185 #define __NR_sigaltstack 186 #define __NR_sendfile 187 -#define __NR_getpmsg 188 /* some people actually want streams */ -#define __NR_putpmsg 189 /* some people actually want streams */ +#define __NR_getpmsg 188 +#define __NR_putpmsg 189 #define __NR_vfork 190 #define __NR_ugetrlimit 191 /* SuS compliant getrlimit */ #define __NR_mmap2 192 @@ -218,7 +202,6 @@ #define __NR_pivot_root 217 #define __NR_mincore 218 #define __NR_madvise 219 -#define __NR_madvise1 219 /* delete when C lib stub is removed */ #define __NR_getdents64 220 #define __NR_fcntl64 221 #define __NR_readahead 222 @@ -240,7 +223,7 @@ #define __NR_futex 238 #define __NR_sched_setaffinity 239 #define __NR_sched_getaffinity 240 -#define __NR_security 241 /* syscall for security modules */ +#define __NR_tgkill 241 /* * Number 242 is reserved for tux */ @@ -255,6 +238,30 @@ #define __NR_epoll_wait 251 #define __NR_set_tid_address 252 #define __NR_fadvise64 253 +#define __NR_timer_create 254 +#define __NR_timer_settime (__NR_timer_create+1) +#define __NR_timer_gettime (__NR_timer_create+2) +#define __NR_timer_getoverrun (__NR_timer_create+3) +#define __NR_timer_delete (__NR_timer_create+4) +#define __NR_clock_settime (__NR_timer_create+5) +#define __NR_clock_gettime (__NR_timer_create+6) +#define __NR_clock_getres (__NR_timer_create+7) +#define __NR_clock_nanosleep (__NR_timer_create+8) +/* Number 263 is reserved for vserver */ +#define __NR_fadvise64_64 264 +#define __NR_statfs64 265 +#define __NR_fstatfs64 266 +/* Number 267 is reserved for new sys_remap_file_pages */ +/* Number 268 is reserved for new sys_mbind */ +/* Number 269 is reserved for new sys_get_mempolicy */ +/* Number 270 is reserved for new sys_set_mempolicy */ +#define __NR_mq_open 271 +#define __NR_mq_unlink 272 +#define __NR_mq_timedsend 273 +#define __NR_mq_timedreceive 274 +#define __NR_mq_notify 275 +#define __NR_mq_getsetattr 276 +/* Number 277 is reserved for new sys_kexec_load */ #define syscall_weak(name,wsym,sym) \ .text; \ @@ -264,7 +271,12 @@ .type sym,@function; \ .global sym; \ sym: \ + .if __NR_##name < 256 ; \ svc __NR_##name ; \ + .else ; \ + la %r1,__NR_##name ; \ + svc 0 ; \ + .endif ; \ j __unified_syscall #define syscall(name,sym) \ @@ -272,6 +284,11 @@ .type sym,@function; \ .global sym; \ sym: \ + .if __NR_##name < 256 ; \ svc __NR_##name ; \ + .else ; \ + la %r1,__NR_##name ; \ + svc 0 ; \ + .endif ; \ j __unified_syscall diff -uNr dietlibc-0.28/s390x/CVS/Entries dietlibc-0.29/s390x/CVS/Entries --- dietlibc-0.28/s390x/CVS/Entries 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/s390x/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,11 +0,0 @@ -/Makefile.add/1.1/Fri Oct 10 13:37:34 2003// -/__longjmp.S/1.1/Fri Oct 10 13:37:34 2003// -/__testandset.S/1.1/Fri Oct 10 13:37:34 2003// -/__waitpid.c/1.1/Fri Oct 10 13:37:34 2003// -/clone.S/1.1/Fri Oct 10 13:37:34 2003// -/mmap.S/1.1/Fri Oct 10 13:37:34 2003// -/setjmp.S/1.1/Fri Oct 10 13:37:34 2003// -/start.S/1.2/Sat Sep 11 12:37:57 2004// -/syscalls.h/1.1/Fri Oct 10 13:37:34 2003// -/unified.S/1.1/Fri Oct 10 13:37:34 2003// -D diff -uNr dietlibc-0.28/s390x/CVS/Repository dietlibc-0.29/s390x/CVS/Repository --- dietlibc-0.28/s390x/CVS/Repository 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/s390x/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/s390x diff -uNr dietlibc-0.28/s390x/CVS/Root dietlibc-0.29/s390x/CVS/Root --- dietlibc-0.28/s390x/CVS/Root 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/s390x/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/s390x/Makefile.add dietlibc-0.29/s390x/Makefile.add --- dietlibc-0.28/s390x/Makefile.add 2003-10-10 06:37:34.000000000 -0700 +++ dietlibc-0.29/s390x/Makefile.add 2005-05-13 11:39:32.000000000 -0700 @@ -1,4 +1,4 @@ CFLAGS+=-Os # -fomit-frame-pointer -fstrict-aliasing VPATH:=s390x:syscalls.s:$(VPATH) -LIBOBJ+=$(OBJDIR)/__waitpid.o +LIBOBJ+=$(OBJDIR)/__waitpid.o $(OBJDIR)/__time.o diff -uNr dietlibc-0.28/s390x/__time.c dietlibc-0.29/s390x/__time.c --- dietlibc-0.28/s390x/__time.c 1969-12-31 16:00:00.000000000 -0800 +++ dietlibc-0.29/s390x/__time.c 2005-05-13 11:39:32.000000000 -0700 @@ -0,0 +1,10 @@ +#include +#include + +time_t time(time_t *t) { + struct timeval tv; + if (gettimeofday(&tv, 0) == -1) + tv.tv_sec=-1; + if (t) *t=tv.tv_sec; + return tv.tv_sec; +} diff -uNr dietlibc-0.28/s390x/__waitpid.c dietlibc-0.29/s390x/__waitpid.c --- dietlibc-0.28/s390x/__waitpid.c 2003-10-10 06:37:34.000000000 -0700 +++ dietlibc-0.29/s390x/__waitpid.c 2005-05-13 11:39:32.000000000 -0700 @@ -1,5 +1,6 @@ #include +#include -pid_t waitpid(int pid, int * wait_stat, int flags) { +pid_t waitpid(pid_t pid, int * wait_stat, int flags) { return wait4(pid, wait_stat, flags, 0); } diff -uNr dietlibc-0.28/s390x/select.S dietlibc-0.29/s390x/select.S --- dietlibc-0.28/s390x/select.S 1969-12-31 16:00:00.000000000 -0800 +++ dietlibc-0.29/s390x/select.S 2005-03-23 11:57:53.000000000 -0800 @@ -0,0 +1 @@ +#include "s390/select.S" diff -uNr dietlibc-0.28/s390x/syscalls.h dietlibc-0.29/s390x/syscalls.h --- dietlibc-0.28/s390x/syscalls.h 2003-10-10 06:37:34.000000000 -0700 +++ dietlibc-0.29/s390x/syscalls.h 2005-03-23 11:57:53.000000000 -0800 @@ -1,4 +1,8 @@ + + + + #define __NR_exit 1 #define __NR_fork 2 #define __NR_read 3 @@ -15,8 +19,6 @@ #define __NR_mknod 14 #define __NR_chmod 15 #define __NR_lchown 16 -//#define __NR_break 17 -//#define __NR_oldstat 18 #define __NR_lseek 19 #define __NR_getpid 20 #define __NR_mount 21 @@ -26,14 +28,10 @@ #define __NR_stime 25 #define __NR_ptrace 26 #define __NR_alarm 27 -//#define __NR_oldfstat 28 #define __NR_pause 29 #define __NR_utime 30 -//#define __NR_stty 31 -//#define __NR_gtty 32 #define __NR_access 33 #define __NR_nice 34 -//#define __NR_ftime 35 #define __NR_sync 36 #define __NR_kill 37 #define __NR_rename 38 @@ -42,7 +40,6 @@ #define __NR_dup 41 #define __NR_pipe 42 #define __NR_times 43 -//#define __NR_prof 44 #define __NR_brk 45 #define __NR_setgid 46 #define __NR_getgid 47 @@ -51,13 +48,9 @@ #define __NR_getegid 50 #define __NR_acct 51 #define __NR_umount2 52 -//#define __NR_lock 53 #define __NR_ioctl 54 #define __NR_fcntl 55 -//#define __NR_mpx 56 #define __NR_setpgid 57 -//#define __NR_ulimit 58 -//#define __NR_oldolduname 59 #define __NR_umask 60 #define __NR_chroot 61 #define __NR_ustat 62 @@ -66,23 +59,19 @@ #define __NR_getpgrp 65 #define __NR_setsid 66 #define __NR_sigaction 67 -//#define __NR_sgetmask 68 -//#define __NR_ssetmask 69 #define __NR_setreuid 70 #define __NR_setregid 71 #define __NR_sigsuspend 72 #define __NR_sigpending 73 #define __NR_sethostname 74 #define __NR_setrlimit 75 -#define __NR_getrlimit 76 /* Back compatible 2Gig limited rlimit */ +#define __NR_getrlimit 76 #define __NR_getrusage 77 #define __NR_gettimeofday 78 #define __NR_settimeofday 79 #define __NR_getgroups 80 #define __NR_setgroups 81 -//#define __NR_select 82 #define __NR_symlink 83 -//#define __NR_oldlstat 84 #define __NR_readlink 85 #define __NR_uselib 86 #define __NR_swapon 87 @@ -96,7 +85,6 @@ #define __NR_fchown 95 #define __NR_getpriority 96 #define __NR_setpriority 97 -//#define __NR_profil 98 #define __NR_statfs 99 #define __NR_fstatfs 100 #define __NR_ioperm 101 @@ -107,11 +95,9 @@ #define __NR_stat 106 #define __NR_lstat 107 #define __NR_fstat 108 -//#define __NR_olduname 109 -//#define __NR_iopl 110 +#define __NR_lookup_dcookie 110 #define __NR_vhangup 111 #define __NR_idle 112 -//#define __NR_vm86old 113 #define __NR_wait4 114 #define __NR_swapoff 115 #define __NR_sysinfo 116 @@ -121,7 +107,6 @@ #define __NR_clone 120 #define __NR_setdomainname 121 #define __NR_uname 122 -//#define __NR_modify_ldt 123 #define __NR_adjtimex 124 #define __NR_mprotect 125 #define __NR_sigprocmask 126 @@ -164,7 +149,6 @@ #define __NR_mremap 163 #define __NR_setresuid 164 #define __NR_getresuid 165 -//#define __NR_vm86 166 #define __NR_query_module 167 #define __NR_poll 168 #define __NR_nfsservctl 169 @@ -186,8 +170,8 @@ #define __NR_capset 185 #define __NR_sigaltstack 186 #define __NR_sendfile 187 -#define __NR_getpmsg 188 /* some people actually want streams */ -#define __NR_putpmsg 189 /* some people actually want streams */ +#define __NR_getpmsg 188 +#define __NR_putpmsg 189 #define __NR_vfork 190 #define __NR_ugetrlimit 191 /* SuS compliant getrlimit */ #define __NR_mmap2 192 @@ -218,7 +202,6 @@ #define __NR_pivot_root 217 #define __NR_mincore 218 #define __NR_madvise 219 -#define __NR_madvise1 219 /* delete when C lib stub is removed */ #define __NR_getdents64 220 #define __NR_fcntl64 221 #define __NR_readahead 222 @@ -240,7 +223,7 @@ #define __NR_futex 238 #define __NR_sched_setaffinity 239 #define __NR_sched_getaffinity 240 -#define __NR_security 241 /* syscall for security modules */ +#define __NR_tgkill 241 /* * Number 242 is reserved for tux */ @@ -255,6 +238,117 @@ #define __NR_epoll_wait 251 #define __NR_set_tid_address 252 #define __NR_fadvise64 253 +#define __NR_timer_create 254 +#define __NR_timer_settime (__NR_timer_create+1) +#define __NR_timer_gettime (__NR_timer_create+2) +#define __NR_timer_getoverrun (__NR_timer_create+3) +#define __NR_timer_delete (__NR_timer_create+4) +#define __NR_clock_settime (__NR_timer_create+5) +#define __NR_clock_gettime (__NR_timer_create+6) +#define __NR_clock_getres (__NR_timer_create+7) +#define __NR_clock_nanosleep (__NR_timer_create+8) +/* Number 263 is reserved for vserver */ +#define __NR_fadvise64_64 264 +#define __NR_statfs64 265 +#define __NR_fstatfs64 266 +/* Number 267 is reserved for new sys_remap_file_pages */ +/* Number 268 is reserved for new sys_mbind */ +/* Number 269 is reserved for new sys_get_mempolicy */ +/* Number 270 is reserved for new sys_set_mempolicy */ +#define __NR_mq_open 271 +#define __NR_mq_unlink 272 +#define __NR_mq_timedsend 273 +#define __NR_mq_timedreceive 274 +#define __NR_mq_notify 275 +#define __NR_mq_getsetattr 276 +/* Number 277 is reserved for new sys_kexec_load */ + + +/* + * There are some system calls that are not present on 64 bit, some + * have a different name although they do the same (e.g. __NR_chown32 + * is __NR_chown on 64 bit). + */ +#ifdef __s390x__ +#undef __NR_time +#undef __NR_lchown +#undef __NR_setuid +#undef __NR_getuid +#undef __NR_stime +#undef __NR_setgid +#undef __NR_getgid +#undef __NR_geteuid +#undef __NR_getegid +#undef __NR_setreuid +#undef __NR_setregid +#undef __NR_getrlimit +#undef __NR_getgroups +#undef __NR_setgroups +#undef __NR_fchown +#undef __NR_ioperm +#undef __NR_setfsuid +#undef __NR_setfsgid +#undef __NR__llseek +#undef __NR__newselect +#undef __NR_setresuid +#undef __NR_getresuid +#undef __NR_setresgid +#undef __NR_getresgid +#undef __NR_chown +#undef __NR_ugetrlimit +#undef __NR_mmap2 +#undef __NR_truncate64 +#undef __NR_ftruncate64 +#undef __NR_stat64 +#undef __NR_lstat64 +#undef __NR_fstat64 +#undef __NR_lchown32 +#undef __NR_getuid32 +#undef __NR_getgid32 +#undef __NR_geteuid32 +#undef __NR_getegid32 +#undef __NR_setreuid32 +#undef __NR_setregid32 +#undef __NR_getgroups32 +#undef __NR_setgroups32 +#undef __NR_fchown32 +#undef __NR_setresuid32 +#undef __NR_getresuid32 +#undef __NR_setresgid32 +#undef __NR_getresgid32 +#undef __NR_chown32 +#undef __NR_setuid32 +#undef __NR_setgid32 +#undef __NR_setfsuid32 +#undef __NR_setfsgid32 +#undef __NR_getdents64 +#undef __NR_fcntl64 +#undef __NR_sendfile64 +#undef __NR_fadvise64_64 + +#define __NR_select 142 +#define __NR_getrlimit 191 /* SuS compliant getrlimit */ +#define __NR_lchown 198 +#define __NR_getuid 199 +#define __NR_getgid 200 +#define __NR_geteuid 201 +#define __NR_getegid 202 +#define __NR_setreuid 203 +#define __NR_setregid 204 +#define __NR_getgroups 205 +#define __NR_setgroups 206 +#define __NR_fchown 207 +#define __NR_setresuid 208 +#define __NR_getresuid 209 +#define __NR_setresgid 210 +#define __NR_getresgid 211 +#define __NR_chown 212 +#define __NR_setuid 213 +#define __NR_setgid 214 +#define __NR_setfsuid 215 +#define __NR_setfsgid 216 + +#endif #define syscall_weak(name,wsym,sym) \ .text; \ @@ -264,7 +358,12 @@ .type sym,@function; \ .global sym; \ sym: \ + .if __NR_##name < 256 ; \ svc __NR_##name ; \ + .else ; \ + la %r1,__NR_##name ; \ + svc 0 ; \ + .endif ; \ j __unified_syscall #define syscall(name,sym) \ @@ -272,6 +371,11 @@ .type sym,@function; \ .global sym; \ sym: \ + .if __NR_##name < 256 ; \ svc __NR_##name ; \ + .else ; \ + la %r1,__NR_##name ; \ + svc 0 ; \ + .endif ; \ j __unified_syscall diff -uNr dietlibc-0.28/sparc/CVS/Entries dietlibc-0.29/sparc/CVS/Entries --- dietlibc-0.28/sparc/CVS/Entries 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/sparc/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,32 +0,0 @@ -/Makefile.add/1.4/Tue Feb 18 21:11:48 2003// -/__longjmp.S/1.4/Mon Jul 2 16:06:49 2001// -/__testandset.S/1.2/Fri Mar 23 18:53:28 2001// -/atol.S/1.1/Thu Sep 4 01:50:50 2003// -/clone.S/1.6/Thu May 15 15:17:10 2003// -/errlist.S/1.1/Mon Jan 13 15:16:28 2003// -/fork.S/1.5/Thu May 15 15:17:10 2003// -/memccpy.S/1.3/Wed Oct 15 16:19:53 2003// -/memchr.S/1.1/Thu Sep 4 01:50:50 2003// -/memcmp.S/1.1/Thu Sep 4 01:50:50 2003// -/memcpy.S/1.1/Thu Sep 4 01:50:50 2003// -/memmove.S/1.1/Thu Sep 4 01:50:50 2003// -/memset.S/1.1/Thu Sep 4 01:50:50 2003// -/pipe.S/1.4/Thu May 15 15:17:10 2003// -/setjmp.S/1.4/Mon Jul 2 16:06:49 2001// -/shmat.c/1.6/Sat Jun 16 17:48:57 2001// -/sigaction.c/1.3/Wed Jun 4 16:16:49 2003// -/start.S/1.9/Sat Sep 11 12:37:57 2004// -/strcat.S/1.1/Thu Sep 4 01:50:50 2003// -/strchr.S/1.1/Thu Sep 4 01:50:50 2003// -/strcmp.S/1.1/Thu Sep 4 01:50:50 2003// -/strcpy.S/1.1/Thu Sep 4 01:50:50 2003// -/strlen.S/1.1/Fri Jul 26 18:44:33 2002// -/strncmp.S/1.1/Thu Sep 4 01:50:50 2003// -/strncpy.S/1.1/Thu Sep 4 01:50:50 2003// -/strstr.S/1.1/Thu Sep 4 01:50:50 2003// -/syscalls.h/1.6/Fri Nov 7 14:24:39 2003// -/udiv.S/1.3/Tue Feb 18 21:11:48 2003// -/umul.S/1.2/Tue Feb 18 21:11:48 2003// -/unified.S/1.6/Wed Aug 20 14:13:41 2003// -/urem.S/1.3/Tue Feb 18 21:11:48 2003// -D diff -uNr dietlibc-0.28/sparc/CVS/Repository dietlibc-0.29/sparc/CVS/Repository --- dietlibc-0.28/sparc/CVS/Repository 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/sparc/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/sparc diff -uNr dietlibc-0.28/sparc/CVS/Root dietlibc-0.29/sparc/CVS/Root --- dietlibc-0.28/sparc/CVS/Root 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/sparc/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/sparc/Makefile.add dietlibc-0.29/sparc/Makefile.add --- dietlibc-0.28/sparc/Makefile.add 2003-02-18 13:11:48.000000000 -0800 +++ dietlibc-0.29/sparc/Makefile.add 2005-02-10 06:50:21.000000000 -0800 @@ -2,3 +2,4 @@ CFLAGS+=-mcpu=supersparc -Os VPATH:=sparc:syscalls.s:$(VPATH) LIBOBJ+=$(OBJDIR)/udiv.o $(OBJDIR)/umul.o $(OBJDIR)/urem.o +LIBOBJ+=$(OBJDIR)/rem.o $(OBJDIR)/sdiv.o diff -uNr dietlibc-0.28/sparc/errlist.S dietlibc-0.29/sparc/errlist.S --- dietlibc-0.28/sparc/errlist.S 2003-01-13 07:16:28.000000000 -0800 +++ dietlibc-0.29/sparc/errlist.S 2005-05-14 16:35:39.000000000 -0700 @@ -135,6 +135,11 @@ .long .LC124 .long .LC125 .long .LC126 + .long .LC127 + .long .LC128 + .long .LC129 + .long .LC130 + .long .LC131 .long 0 .size sys_errlist,.-sys_errlist @@ -276,5 +281,10 @@ .LC124: .string ".lib section in a.out corrupted" .LC125: .string "No medium found" .LC126: .string "Wrong medium type" +.LC127: .string "Operation Cancelled" +.LC128: .string "Required key not available" +.LC129: .string "Key has expired" +.LC130: .string "Key has been revoked" +.LC131: .string "Key was rejected by service" diff -uNr dietlibc-0.28/sparc/rem.S dietlibc-0.29/sparc/rem.S --- dietlibc-0.28/sparc/rem.S 1969-12-31 16:00:00.000000000 -0800 +++ dietlibc-0.29/sparc/rem.S 2005-02-10 06:50:21.000000000 -0800 @@ -0,0 +1,366 @@ +#ifdef __sparc__ + /* This file is generated from divrem.m4; DO NOT EDIT! */ +/* + * Division and remainder, from Appendix E of the Sparc Version 8 + * Architecture Manual, with fixes from Gordon Irlam. + */ + +/* + * Input: dividend and divisor in %o0 and %o1 respectively. + * + * m4 parameters: + * .rem name of function to generate + * rem rem=div => %o0 / %o1; rem=rem => %o0 % %o1 + * true true=true => signed; true=false => unsigned + * + * Algorithm parameters: + * N how many bits per iteration we try to get (4) + * WORDSIZE total number of bits (32) + * + * Derived constants: + * TOPBITS number of bits in the top decade of a number + * + * Important variables: + * Q the partial quotient under development (initially 0) + * R the remainder so far, initially the dividend + * ITER number of main division loop iterations required; + * equal to ceil(log2(quotient) / N). Note that this + * is the log base (2^N) of the quotient. + * V the current comparand, initially divisor*2^(ITER*N-1) + * + * Cost: + * Current estimate for non-large dividend is + * ceil(log2(quotient) / N) * (10 + 7N/2) + C + * A large dividend is one greater than 2^(31-TOPBITS) and takes a + * different path, as the upper bits of the quotient must be developed + * one bit at a time. + */ + + + +.global .rem; +.align 4; +.type .rem ,@function; + +.rem: + ! compute sign of result; if neither is negative, no problem + orcc %o1, %o0, %g0 ! either negative? + bge 2f ! no, go do the divide + mov %o0, %g3 ! sign of remainder matches %o0 + tst %o1 + bge 1f + tst %o0 + ! %o1 is definitely negative; %o0 might also be negative + bge 2f ! if %o0 not negative... + sub %g0, %o1, %o1 ! in any case, make %o1 nonneg +1: ! %o0 is negative, %o1 is nonnegative + sub %g0, %o0, %o0 ! make %o0 nonnegative +2: + + ! Ready to divide. Compute size of quotient; scale comparand. + orcc %o1, %g0, %o5 + bne 1f + mov %o0, %o3 + + ! Divide by zero trap. If it returns, return 0 (about as + ! wrong as possible, but that is what SunOS does...). + ta 0x02 + retl + clr %o0 + +1: + cmp %o3, %o5 ! if %o1 exceeds %o0, done + blu .Lgot_result ! (and algorithm fails otherwise) + clr %o2 + sethi %hi(1 << (32 - 4 - 1)), %g1 + cmp %o3, %g1 + blu .Lnot_really_big + clr %o4 + + ! Here the dividend is >= 2**(31-N) or so. We must be careful here, + ! as our usual N-at-a-shot divide step will cause overflow and havoc. + ! The number of bits in the result here is N*ITER+SC, where SC <= N. + ! Compute ITER in an unorthodox manner: know we need to shift V into + ! the top decade: so do not even bother to compare to R. + 1: + cmp %o5, %g1 + bgeu 3f + mov 1, %g2 + sll %o5, 4, %o5 + b 1b + add %o4, 1, %o4 + + ! Now compute %g2. + 2: addcc %o5, %o5, %o5 + bcc .Lnot_too_big + add %g2, 1, %g2 + + ! We get here if the %o1 overflowed while shifting. + ! This means that %o3 has the high-order bit set. + ! Restore %o5 and subtract from %o3. + sll %g1, 4, %g1 ! high order bit + srl %o5, 1, %o5 ! rest of %o5 + add %o5, %g1, %o5 + b .Ldo_single_div + sub %g2, 1, %g2 + + .Lnot_too_big: + 3: cmp %o5, %o3 + blu 2b + nop + be .Ldo_single_div + nop + /* NB: these are commented out in the V8-Sparc manual as well */ + /* (I do not understand this) */ + ! %o5 > %o3: went too far: back up 1 step + ! srl %o5, 1, %o5 + ! dec %g2 + ! do single-bit divide steps + ! + ! We have to be careful here. We know that %o3 >= %o5, so we can do the + ! first divide step without thinking. BUT, the others are conditional, + ! and are only done if %o3 >= 0. Because both %o3 and %o5 may have the high- + ! order bit set in the first step, just falling into the regular + ! division loop will mess up the first time around. + ! So we unroll slightly... + .Ldo_single_div: + subcc %g2, 1, %g2 + bl .Lend_regular_divide + nop + sub %o3, %o5, %o3 + mov 1, %o2 + b .Lend_single_divloop + nop + .Lsingle_divloop: + sll %o2, 1, %o2 + bl 1f + srl %o5, 1, %o5 + ! %o3 >= 0 + sub %o3, %o5, %o3 + b 2f + add %o2, 1, %o2 + 1: ! %o3 < 0 + add %o3, %o5, %o3 + sub %o2, 1, %o2 + 2: + .Lend_single_divloop: + subcc %g2, 1, %g2 + bge .Lsingle_divloop + tst %o3 + b,a .Lend_regular_divide + +.Lnot_really_big: +1: + sll %o5, 4, %o5 + cmp %o5, %o3 + bleu 1b + addcc %o4, 1, %o4 + be .Lgot_result + sub %o4, 1, %o4 + + tst %o3 ! set up for initial iteration +.Ldivloop: + sll %o2, 4, %o2 + ! depth 1, accumulated bits 0 + bl .L1.16 + srl %o5,1,%o5 + ! remainder is positive + subcc %o3,%o5,%o3 + ! depth 2, accumulated bits 1 + bl .L2.17 + srl %o5,1,%o5 + ! remainder is positive + subcc %o3,%o5,%o3 + ! depth 3, accumulated bits 3 + bl .L3.19 + srl %o5,1,%o5 + ! remainder is positive + subcc %o3,%o5,%o3 + ! depth 4, accumulated bits 7 + bl .L4.23 + srl %o5,1,%o5 + ! remainder is positive + subcc %o3,%o5,%o3 + b 9f + add %o2, (7*2+1), %o2 + +.L4.23: + ! remainder is negative + addcc %o3,%o5,%o3 + b 9f + add %o2, (7*2-1), %o2 + + +.L3.19: + ! remainder is negative + addcc %o3,%o5,%o3 + ! depth 4, accumulated bits 5 + bl .L4.21 + srl %o5,1,%o5 + ! remainder is positive + subcc %o3,%o5,%o3 + b 9f + add %o2, (5*2+1), %o2 + +.L4.21: + ! remainder is negative + addcc %o3,%o5,%o3 + b 9f + add %o2, (5*2-1), %o2 + + + +.L2.17: + ! remainder is negative + addcc %o3,%o5,%o3 + ! depth 3, accumulated bits 1 + bl .L3.17 + srl %o5,1,%o5 + ! remainder is positive + subcc %o3,%o5,%o3 + ! depth 4, accumulated bits 3 + bl .L4.19 + srl %o5,1,%o5 + ! remainder is positive + subcc %o3,%o5,%o3 + b 9f + add %o2, (3*2+1), %o2 + +.L4.19: + ! remainder is negative + addcc %o3,%o5,%o3 + b 9f + add %o2, (3*2-1), %o2 + + +.L3.17: + ! remainder is negative + addcc %o3,%o5,%o3 + ! depth 4, accumulated bits 1 + bl .L4.17 + srl %o5,1,%o5 + ! remainder is positive + subcc %o3,%o5,%o3 + b 9f + add %o2, (1*2+1), %o2 + +.L4.17: + ! remainder is negative + addcc %o3,%o5,%o3 + b 9f + add %o2, (1*2-1), %o2 + + + + +.L1.16: + ! remainder is negative + addcc %o3,%o5,%o3 + ! depth 2, accumulated bits -1 + bl .L2.15 + srl %o5,1,%o5 + ! remainder is positive + subcc %o3,%o5,%o3 + ! depth 3, accumulated bits -1 + bl .L3.15 + srl %o5,1,%o5 + ! remainder is positive + subcc %o3,%o5,%o3 + ! depth 4, accumulated bits -1 + bl .L4.15 + srl %o5,1,%o5 + ! remainder is positive + subcc %o3,%o5,%o3 + b 9f + add %o2, (-1*2+1), %o2 + +.L4.15: + ! remainder is negative + addcc %o3,%o5,%o3 + b 9f + add %o2, (-1*2-1), %o2 + + +.L3.15: + ! remainder is negative + addcc %o3,%o5,%o3 + ! depth 4, accumulated bits -3 + bl .L4.13 + srl %o5,1,%o5 + ! remainder is positive + subcc %o3,%o5,%o3 + b 9f + add %o2, (-3*2+1), %o2 + +.L4.13: + ! remainder is negative + addcc %o3,%o5,%o3 + b 9f + add %o2, (-3*2-1), %o2 + + + +.L2.15: + ! remainder is negative + addcc %o3,%o5,%o3 + ! depth 3, accumulated bits -3 + bl .L3.13 + srl %o5,1,%o5 + ! remainder is positive + subcc %o3,%o5,%o3 + ! depth 4, accumulated bits -5 + bl .L4.11 + srl %o5,1,%o5 + ! remainder is positive + subcc %o3,%o5,%o3 + b 9f + add %o2, (-5*2+1), %o2 + +.L4.11: + ! remainder is negative + addcc %o3,%o5,%o3 + b 9f + add %o2, (-5*2-1), %o2 + + +.L3.13: + ! remainder is negative + addcc %o3,%o5,%o3 + ! depth 4, accumulated bits -7 + bl .L4.9 + srl %o5,1,%o5 + ! remainder is positive + subcc %o3,%o5,%o3 + b 9f + add %o2, (-7*2+1), %o2 + +.L4.9: + ! remainder is negative + addcc %o3,%o5,%o3 + b 9f + add %o2, (-7*2-1), %o2 + + + + + 9: +.Lend_regular_divide: + subcc %o4, 1, %o4 + bge .Ldivloop + tst %o3 + bl,a .Lgot_result + ! non-restoring fixup here (one instruction only!) + add %o3, %o1, %o3 + + +.Lgot_result: + ! check to see if answer should be < 0 + tst %g3 + bl,a 1f + sub %g0, %o3, %o3 +1: + retl + mov %o3, %o0 + +.size .rem,.-.rem; +#endif diff -uNr dietlibc-0.28/sparc/sdiv.S dietlibc-0.29/sparc/sdiv.S --- dietlibc-0.28/sparc/sdiv.S 1969-12-31 16:00:00.000000000 -0800 +++ dietlibc-0.29/sparc/sdiv.S 2005-02-10 06:50:21.000000000 -0800 @@ -0,0 +1,366 @@ +#ifdef __sparc__ + /* This file is generated from divrem.m4; DO NOT EDIT! */ +/* + * Division and remainder, from Appendix E of the Sparc Version 8 + * Architecture Manual, with fixes from Gordon Irlam. + */ + +/* + * Input: dividend and divisor in %o0 and %o1 respectively. + * + * m4 parameters: + * .div name of function to generate + * div div=div => %o0 / %o1; div=rem => %o0 % %o1 + * true true=true => signed; true=false => unsigned + * + * Algorithm parameters: + * N how many bits per iteration we try to get (4) + * WORDSIZE total number of bits (32) + * + * Derived constants: + * TOPBITS number of bits in the top decade of a number + * + * Important variables: + * Q the partial quotient under development (initially 0) + * R the remainder so far, initially the dividend + * ITER number of main division loop iterations required; + * equal to ceil(log2(quotient) / N). Note that this + * is the log base (2^N) of the quotient. + * V the current comparand, initially divisor*2^(ITER*N-1) + * + * Cost: + * Current estimate for non-large dividend is + * ceil(log2(quotient) / N) * (10 + 7N/2) + C + * A large dividend is one greater than 2^(31-TOPBITS) and takes a + * different path, as the upper bits of the quotient must be developed + * one bit at a time. + */ + + + +.global .div; +.align 4; +.type .div ,@function; + +.div: + ! compute sign of result; if neither is negative, no problem + orcc %o1, %o0, %g0 ! either negative? + bge 2f ! no, go do the divide + xor %o1, %o0, %g3 ! compute sign in any case + tst %o1 + bge 1f + tst %o0 + ! %o1 is definitely negative; %o0 might also be negative + bge 2f ! if %o0 not negative... + sub %g0, %o1, %o1 ! in any case, make %o1 nonneg +1: ! %o0 is negative, %o1 is nonnegative + sub %g0, %o0, %o0 ! make %o0 nonnegative +2: + + ! Ready to divide. Compute size of quotient; scale comparand. + orcc %o1, %g0, %o5 + bne 1f + mov %o0, %o3 + + ! Divide by zero trap. If it returns, return 0 (about as + ! wrong as possible, but that is what SunOS does...). + ta 0x02 + retl + clr %o0 + +1: + cmp %o3, %o5 ! if %o1 exceeds %o0, done + blu .Lgot_result ! (and algorithm fails otherwise) + clr %o2 + sethi %hi(1 << (32 - 4 - 1)), %g1 + cmp %o3, %g1 + blu .Lnot_really_big + clr %o4 + + ! Here the dividend is >= 2**(31-N) or so. We must be careful here, + ! as our usual N-at-a-shot divide step will cause overflow and havoc. + ! The number of bits in the result here is N*ITER+SC, where SC <= N. + ! Compute ITER in an unorthodox manner: know we need to shift V into + ! the top decade: so do not even bother to compare to R. + 1: + cmp %o5, %g1 + bgeu 3f + mov 1, %g2 + sll %o5, 4, %o5 + b 1b + add %o4, 1, %o4 + + ! Now compute %g2. + 2: addcc %o5, %o5, %o5 + bcc .Lnot_too_big + add %g2, 1, %g2 + + ! We get here if the %o1 overflowed while shifting. + ! This means that %o3 has the high-order bit set. + ! Restore %o5 and subtract from %o3. + sll %g1, 4, %g1 ! high order bit + srl %o5, 1, %o5 ! rest of %o5 + add %o5, %g1, %o5 + b .Ldo_single_div + sub %g2, 1, %g2 + + .Lnot_too_big: + 3: cmp %o5, %o3 + blu 2b + nop + be .Ldo_single_div + nop + /* NB: these are commented out in the V8-Sparc manual as well */ + /* (I do not understand this) */ + ! %o5 > %o3: went too far: back up 1 step + ! srl %o5, 1, %o5 + ! dec %g2 + ! do single-bit divide steps + ! + ! We have to be careful here. We know that %o3 >= %o5, so we can do the + ! first divide step without thinking. BUT, the others are conditional, + ! and are only done if %o3 >= 0. Because both %o3 and %o5 may have the high- + ! order bit set in the first step, just falling into the regular + ! division loop will mess up the first time around. + ! So we unroll slightly... + .Ldo_single_div: + subcc %g2, 1, %g2 + bl .Lend_regular_divide + nop + sub %o3, %o5, %o3 + mov 1, %o2 + b .Lend_single_divloop + nop + .Lsingle_divloop: + sll %o2, 1, %o2 + bl 1f + srl %o5, 1, %o5 + ! %o3 >= 0 + sub %o3, %o5, %o3 + b 2f + add %o2, 1, %o2 + 1: ! %o3 < 0 + add %o3, %o5, %o3 + sub %o2, 1, %o2 + 2: + .Lend_single_divloop: + subcc %g2, 1, %g2 + bge .Lsingle_divloop + tst %o3 + b,a .Lend_regular_divide + +.Lnot_really_big: +1: + sll %o5, 4, %o5 + cmp %o5, %o3 + bleu 1b + addcc %o4, 1, %o4 + be .Lgot_result + sub %o4, 1, %o4 + + tst %o3 ! set up for initial iteration +.Ldivloop: + sll %o2, 4, %o2 + ! depth 1, accumulated bits 0 + bl .L1.16 + srl %o5,1,%o5 + ! remainder is positive + subcc %o3,%o5,%o3 + ! depth 2, accumulated bits 1 + bl .L2.17 + srl %o5,1,%o5 + ! remainder is positive + subcc %o3,%o5,%o3 + ! depth 3, accumulated bits 3 + bl .L3.19 + srl %o5,1,%o5 + ! remainder is positive + subcc %o3,%o5,%o3 + ! depth 4, accumulated bits 7 + bl .L4.23 + srl %o5,1,%o5 + ! remainder is positive + subcc %o3,%o5,%o3 + b 9f + add %o2, (7*2+1), %o2 + +.L4.23: + ! remainder is negative + addcc %o3,%o5,%o3 + b 9f + add %o2, (7*2-1), %o2 + + +.L3.19: + ! remainder is negative + addcc %o3,%o5,%o3 + ! depth 4, accumulated bits 5 + bl .L4.21 + srl %o5,1,%o5 + ! remainder is positive + subcc %o3,%o5,%o3 + b 9f + add %o2, (5*2+1), %o2 + +.L4.21: + ! remainder is negative + addcc %o3,%o5,%o3 + b 9f + add %o2, (5*2-1), %o2 + + + +.L2.17: + ! remainder is negative + addcc %o3,%o5,%o3 + ! depth 3, accumulated bits 1 + bl .L3.17 + srl %o5,1,%o5 + ! remainder is positive + subcc %o3,%o5,%o3 + ! depth 4, accumulated bits 3 + bl .L4.19 + srl %o5,1,%o5 + ! remainder is positive + subcc %o3,%o5,%o3 + b 9f + add %o2, (3*2+1), %o2 + +.L4.19: + ! remainder is negative + addcc %o3,%o5,%o3 + b 9f + add %o2, (3*2-1), %o2 + + +.L3.17: + ! remainder is negative + addcc %o3,%o5,%o3 + ! depth 4, accumulated bits 1 + bl .L4.17 + srl %o5,1,%o5 + ! remainder is positive + subcc %o3,%o5,%o3 + b 9f + add %o2, (1*2+1), %o2 + +.L4.17: + ! remainder is negative + addcc %o3,%o5,%o3 + b 9f + add %o2, (1*2-1), %o2 + + + + +.L1.16: + ! remainder is negative + addcc %o3,%o5,%o3 + ! depth 2, accumulated bits -1 + bl .L2.15 + srl %o5,1,%o5 + ! remainder is positive + subcc %o3,%o5,%o3 + ! depth 3, accumulated bits -1 + bl .L3.15 + srl %o5,1,%o5 + ! remainder is positive + subcc %o3,%o5,%o3 + ! depth 4, accumulated bits -1 + bl .L4.15 + srl %o5,1,%o5 + ! remainder is positive + subcc %o3,%o5,%o3 + b 9f + add %o2, (-1*2+1), %o2 + +.L4.15: + ! remainder is negative + addcc %o3,%o5,%o3 + b 9f + add %o2, (-1*2-1), %o2 + + +.L3.15: + ! remainder is negative + addcc %o3,%o5,%o3 + ! depth 4, accumulated bits -3 + bl .L4.13 + srl %o5,1,%o5 + ! remainder is positive + subcc %o3,%o5,%o3 + b 9f + add %o2, (-3*2+1), %o2 + +.L4.13: + ! remainder is negative + addcc %o3,%o5,%o3 + b 9f + add %o2, (-3*2-1), %o2 + + + +.L2.15: + ! remainder is negative + addcc %o3,%o5,%o3 + ! depth 3, accumulated bits -3 + bl .L3.13 + srl %o5,1,%o5 + ! remainder is positive + subcc %o3,%o5,%o3 + ! depth 4, accumulated bits -5 + bl .L4.11 + srl %o5,1,%o5 + ! remainder is positive + subcc %o3,%o5,%o3 + b 9f + add %o2, (-5*2+1), %o2 + +.L4.11: + ! remainder is negative + addcc %o3,%o5,%o3 + b 9f + add %o2, (-5*2-1), %o2 + + +.L3.13: + ! remainder is negative + addcc %o3,%o5,%o3 + ! depth 4, accumulated bits -7 + bl .L4.9 + srl %o5,1,%o5 + ! remainder is positive + subcc %o3,%o5,%o3 + b 9f + add %o2, (-7*2+1), %o2 + +.L4.9: + ! remainder is negative + addcc %o3,%o5,%o3 + b 9f + add %o2, (-7*2-1), %o2 + + + + + 9: +.Lend_regular_divide: + subcc %o4, 1, %o4 + bge .Ldivloop + tst %o3 + bl,a .Lgot_result + ! non-restoring fixup here (one instruction only!) + sub %o2, 1, %o2 + + +.Lgot_result: + ! check to see if answer should be < 0 + tst %g3 + bl,a 1f + sub %g0, %o2, %o2 +1: + retl + mov %o2, %o0 + +.size .div,.-.div; +#endif diff -uNr dietlibc-0.28/sparc/start.S dietlibc-0.29/sparc/start.S --- dietlibc-0.28/sparc/start.S 2004-09-11 05:37:57.000000000 -0700 +++ dietlibc-0.29/sparc/start.S 2005-05-13 11:39:32.000000000 -0700 @@ -1,3 +1,5 @@ +#include "dietfeatures.h" + .section ".text" .align 4 .global _start @@ -30,7 +32,7 @@ /* Let libc do the rest of the initialization, and call main. */ #ifdef WANT_DYNAMIC - call dyn_start + call _dyn_start #else #ifdef WANT_STACKGAP call stackgap diff -uNr dietlibc-0.28/sparc/syscalls.h dietlibc-0.29/sparc/syscalls.h --- dietlibc-0.28/sparc/syscalls.h 2003-11-07 06:24:39.000000000 -0800 +++ dietlibc-0.29/sparc/syscalls.h 2005-03-23 11:05:25.000000000 -0800 @@ -154,7 +154,7 @@ #define __NR_poll 153 /* Common */ #define __NR_getdents64 154 /* Linux specific */ #define __NR_fcntl64 155 /* Linux sparc32 Specific */ -/* #define __NR_getdirentries 156 SunOS Specific */ +/* #define __NR_getdirentires 156 SunOS Specific */ #define __NR_statfs 157 /* Common */ #define __NR_fstatfs 158 /* Common */ #define __NR_umount 159 /* Common */ @@ -265,6 +265,23 @@ #define __NR_timer_getoverrun 264 #define __NR_timer_delete 265 #define __NR_timer_create 266 +/* #define __NR_vserver 267 Reserved for VSERVER */ +#define __NR_io_setup 268 +#define __NR_io_destroy 269 +#define __NR_io_submit 270 +#define __NR_io_cancel 271 +#define __NR_io_getevents 272 +#define __NR_mq_open 273 +#define __NR_mq_unlink 274 +#define __NR_mq_timedsend 275 +#define __NR_mq_timedreceive 276 +#define __NR_mq_notify 277 +#define __NR_mq_getsetattr 278 +#define __NR_waitid 279 +#define __NR_sys_setaltroot 280 +#define __NR_add_key 281 +#define __NR_request_key 282 +#define __NR_keyctl 283 #define syscall_weak(name,wsym,sym) \ .text; \ diff -uNr dietlibc-0.28/sparc64/CVS/Entries dietlibc-0.29/sparc64/CVS/Entries --- dietlibc-0.28/sparc64/CVS/Entries 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/sparc64/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,16 +0,0 @@ -/Makefile.add/1.3/Thu Mar 25 21:11:00 2004// -/README/1.1/Tue Mar 26 13:07:38 2002// -/__longjmp.S/1.1/Tue Mar 26 13:07:38 2002// -/__testandset.S/1.1/Thu Mar 21 16:06:58 2002// -/__time.c/1.1/Thu Mar 25 21:11:00 2004// -/clone.S/1.1/Thu Mar 21 16:06:58 2002// -/errlist.S/1.1/Mon Jan 13 15:16:28 2003// -/fork.S/1.2/Thu May 15 15:17:10 2003// -/longjmp.S/1.2/Mon Sep 16 11:17:02 2002// -/pipe.S/1.2/Thu May 15 15:17:10 2003// -/setjmp.S/1.1/Tue Mar 26 13:07:38 2002// -/sigjmp.S/1.1/Tue Mar 26 13:07:38 2002// -/start.S/1.4/Sat Sep 11 12:37:57 2004// -/syscalls.h/1.1/Thu Mar 21 16:06:58 2002// -/unified.S/1.3/Wed Aug 20 14:13:41 2003// -D diff -uNr dietlibc-0.28/sparc64/CVS/Repository dietlibc-0.29/sparc64/CVS/Repository --- dietlibc-0.28/sparc64/CVS/Repository 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/sparc64/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/sparc64 diff -uNr dietlibc-0.28/sparc64/CVS/Root dietlibc-0.29/sparc64/CVS/Root --- dietlibc-0.28/sparc64/CVS/Root 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/sparc64/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/sparc64/errlist.S dietlibc-0.29/sparc64/errlist.S --- dietlibc-0.28/sparc64/errlist.S 2003-01-13 07:16:28.000000000 -0800 +++ dietlibc-0.29/sparc64/errlist.S 2005-05-20 05:18:04.000000000 -0700 @@ -4,7 +4,7 @@ .section .rodata #endif -.align 4 +.align 8 .global sys_errlist .type sys_errlist,@object sys_errlist: diff -uNr dietlibc-0.28/sparc64/start.S dietlibc-0.29/sparc64/start.S --- dietlibc-0.28/sparc64/start.S 2004-09-11 05:37:57.000000000 -0700 +++ dietlibc-0.29/sparc64/start.S 2005-05-13 11:39:32.000000000 -0700 @@ -1,3 +1,5 @@ +#include "dietfeatures.h" + .section ".text" .align 4 .global _start @@ -30,7 +32,7 @@ /* Let libc do the rest of the initialization, and call main. */ #ifdef WANT_DYNAMIC - call dyn_start + call _dyn_start #else #ifdef WANT_STACKGAP call stackgap diff -uNr dietlibc-0.28/sparc64/syscalls.h dietlibc-0.29/sparc64/syscalls.h --- dietlibc-0.28/sparc64/syscalls.h 2002-03-21 08:06:58.000000000 -0800 +++ dietlibc-0.29/sparc64/syscalls.h 2005-03-23 11:05:25.000000000 -0800 @@ -29,11 +29,11 @@ #define __NR_sigaltstack 28 /* Common */ #define __NR_pause 29 /* Is sigblock(0)->sigpause() in SunOS */ #define __NR_utime 30 /* Implemented via utimes() under SunOS */ -/*#define __NR_lchown32 31 Linux sparc32 specific */ -/*#define __NR_fchown32 32 Linux sparc32 specific */ +/* #define __NR_lchown32 31 Linux sparc32 specific */ +/* #define __NR_fchown32 32 Linux sparc32 specific */ #define __NR_access 33 /* Common */ #define __NR_nice 34 /* Implemented via get/setpriority() in SunOS */ -/*#define __NR_chown32 35 Linux sparc32 specific */ +/* #define __NR_chown32 35 Linux sparc32 specific */ #define __NR_sync 36 /* Common */ #define __NR_kill 37 /* Common */ #define __NR_stat 38 /* Common */ @@ -42,7 +42,7 @@ #define __NR_dup 41 /* Common */ #define __NR_pipe 42 /* Common */ #define __NR_times 43 /* Implemented via getrusage() in SunOS */ -/*#define __NR_getuid32 44 Linux sparc32 specific */ +/* #define __NR_getuid32 44 Linux sparc32 specific */ #define __NR_umount2 45 /* Linux Specific */ #define __NR_setgid 46 /* Implemented via setregid() in SunOS */ #define __NR_getgid 47 /* Common */ @@ -50,49 +50,49 @@ #define __NR_geteuid 49 /* SunOS calls getuid() */ #define __NR_getegid 50 /* SunOS calls getgid() */ #define __NR_acct 51 /* Common */ -/* #define __NR_memory_ordering 52 Linux sparc64 specific */ -/*#define __NR_getgid32 53 Linux sparc32 specific */ +#define __NR_memory_ordering 52 /* Linux Specific */ +/* #define __NR_getgid32 53 Linux sparc32 specific */ #define __NR_ioctl 54 /* Common */ #define __NR_reboot 55 /* Common */ -/*#define __NR_mmap2 56 Linux sparc32 Specific */ +/* #define __NR_mmap2 56 Linux sparc32 Specific */ #define __NR_symlink 57 /* Common */ #define __NR_readlink 58 /* Common */ #define __NR_execve 59 /* Common */ #define __NR_umask 60 /* Common */ #define __NR_chroot 61 /* Common */ #define __NR_fstat 62 /* Common */ -/*#define __NR_fstat64 63 Linux sparc32 Specific */ +/* #define __NR_fstat64 63 Linux sparc32 Specific */ #define __NR_getpagesize 64 /* Common */ #define __NR_msync 65 /* Common in newer 1.3.x revs... */ #define __NR_vfork 66 /* Common */ #define __NR_pread 67 /* Linux Specific */ #define __NR_pwrite 68 /* Linux Specific */ -/*#define __NR_geteuid32 69 Linux sparc32, sbrk under SunOS */ -/*#define __NR_getegid32 70 Linux sparc32, sstk under SunOS */ +/* #define __NR_geteuid32 69 Linux sparc32, sbrk under SunOS */ +/* #define __NR_getegid32 70 Linux sparc32, sstk under SunOS */ #define __NR_mmap 71 /* Common */ -/*#define __NR_setreuid32 72 Linux sparc32, vadvise under SunOS */ +/* #define __NR_setreuid32 72 Linux sparc32, vadvise under SunOS */ #define __NR_munmap 73 /* Common */ #define __NR_mprotect 74 /* Common */ #define __NR_madvise 75 /* Common */ #define __NR_vhangup 76 /* Common */ -/*#define __NR_truncate64 77 Linux sparc32 Specific */ +/* #define __NR_truncate64 77 Linux sparc32 Specific */ #define __NR_mincore 78 /* Common */ #define __NR_getgroups 79 /* Common */ #define __NR_setgroups 80 /* Common */ #define __NR_getpgrp 81 /* Common */ -/*#define __NR_setgroups32 82 Linux sparc32, setpgrp under SunOS */ +/* #define __NR_setgroups32 82 Linux sparc32, setpgrp under SunOS */ #define __NR_setitimer 83 /* Common */ -/*#define __NR_ftruncate64 84 Linux sparc32 Specific */ +/* #define __NR_ftruncate64 84 Linux sparc32 Specific */ #define __NR_swapon 85 /* Common */ #define __NR_getitimer 86 /* Common */ -/*#define __NR_setuid32 87 Linux sparc32, gethostname under SunOS */ +/* #define __NR_setuid32 87 Linux sparc32, gethostname under SunOS */ #define __NR_sethostname 88 /* Common */ -/*#define __NR_setgid32 89 Linux sparc32, getdtablesize under SunOS */ +/* #define __NR_setgid32 89 Linux sparc32, getdtablesize under SunOS */ #define __NR_dup2 90 /* Common */ -/*#define __NR_setfsuid32 91 Linux sparc32, getdopt under SunOS */ +/* #define __NR_setfsuid32 91 Linux sparc32, getdopt under SunOS */ #define __NR_fcntl 92 /* Common */ #define __NR_select 93 /* Common */ -/*#define __NR_setfsgid32 94 Linux sparc32, setdopt under SunOS */ +/* #define __NR_setfsgid32 94 Linux sparc32, setdopt under SunOS */ #define __NR_fsync 95 /* Common */ #define __NR_setpriority 96 /* Common */ #define __NR_socket 97 /* Common */ @@ -106,14 +106,14 @@ #define __NR_rt_sigtimedwait 105 /* Linux Specific */ #define __NR_rt_sigqueueinfo 106 /* Linux Specific */ #define __NR_rt_sigsuspend 107 /* Linux Specific */ -#define __NR_setresuid32 108 /* Linux Specific, sigvec under SunOS */ -#define __NR_getresuid32 109 /* Linux Specific, sigblock under SunOS */ -#define __NR_setresgid32 110 /* Linux Specific, sigsetmask under SunOS */ -#define __NR_getresgid32 111 /* Linux Specific, sigpause under SunOS */ -/*#define __NR_setregid32 112 Linux sparc32, sigstack under SunOS */ +#define __NR_setresuid 108 /* Linux Specific, sigvec under SunOS */ +#define __NR_getresuid 109 /* Linux Specific, sigblock under SunOS */ +#define __NR_setresgid 110 /* Linux Specific, sigsetmask under SunOS */ +#define __NR_getresgid 111 /* Linux Specific, sigpause under SunOS */ +/* #define __NR_setregid32 75 Linux sparc32, sigstack under SunOS */ #define __NR_recvmsg 113 /* Common */ #define __NR_sendmsg 114 /* Common */ -/*#define __NR_getgroups32 115 Linux sparc32, vtrace under SunOS */ +/* #define __NR_getgroups32 115 Linux sparc32, vtrace under SunOS */ #define __NR_gettimeofday 116 /* Common */ #define __NR_getrusage 117 /* Common */ #define __NR_getsockopt 118 /* Common */ @@ -130,19 +130,19 @@ #define __NR_truncate 129 /* Common */ #define __NR_ftruncate 130 /* Common */ #define __NR_flock 131 /* Common */ -/*#define __NR_lstat64 132 Linux sparc32 Specific */ +/* #define __NR_lstat64 132 Linux sparc32 Specific */ #define __NR_sendto 133 /* Common */ #define __NR_shutdown 134 /* Common */ #define __NR_socketpair 135 /* Common */ #define __NR_mkdir 136 /* Common */ #define __NR_rmdir 137 /* Common */ #define __NR_utimes 138 /* SunOS Specific */ -/*#define __NR_stat64 139 Linux sparc32 Specific */ -/* #define __NR_adjtime 140 SunOS Specific */ +/* #define __NR_stat64 139 Linux sparc32 Specific */ +#define __NR_sendfile64 140 /* adjtime under SunOS */ #define __NR_getpeername 141 /* Common */ -/* #define __NR_gethostid 142 SunOS Specific */ -/* #define __NR_ni_syscall 143 ENOSYS under SunOS */ -#define __NR_getrlimit 144 /* Common */ +#define __NR_futex 142 /* gethostid under SunOS */ +#define __NR_gettid 143 /* ENOSYS under SunOS */ +#define __NR_getrlimit 144 /* Common */ #define __NR_setrlimit 145 /* Common */ #define __NR_pivot_root 146 /* Linux Specific, killpg under SunOS */ #define __NR_prctl 147 /* ENOSYS under SunOS */ @@ -153,47 +153,47 @@ /* #define __NR_putmsg 152 SunOS Specific */ #define __NR_poll 153 /* Common */ #define __NR_getdents64 154 /* Linux specific */ -/*#define __NR_fcntl64 155 Linux sparc32 Specific */ +/* #define __NR_fcntl64 155 Linux sparc32 Specific */ /* #define __NR_getdirentries 156 SunOS Specific */ #define __NR_statfs 157 /* Common */ #define __NR_fstatfs 158 /* Common */ #define __NR_umount 159 /* Common */ -/* #define __NR_async_daemon 160 SunOS Specific */ -/* #define __NR_getfh 161 SunOS Specific */ +#define __NR_sched_set_affinity 160 /* Linux specific, async_daemon under SunOS */ +#define __NR_sched_get_affinity 161 /* Linux specific, getfh under SunOS */ #define __NR_getdomainname 162 /* SunOS Specific */ #define __NR_setdomainname 163 /* Common */ -#define __NR_utrap_install 164 /* SYSV ABI/v9 required */ +#define __NR_utrap_install 164 /* SYSV ABI/v9 required */ #define __NR_quotactl 165 /* Common */ -/* #define __NR_exportfs 166 SunOS Specific */ +#define __NR_set_tid_address 166 /* Linux specific, exportfs under SunOS */ #define __NR_mount 167 /* Common */ #define __NR_ustat 168 /* Common */ -/* #define __NR_semsys 169 SunOS Specific */ -/* #define __NR_msgsys 170 SunOS Specific */ -/* #define __NR_shmsys 171 SunOS Specific */ -/* #define __NR_auditsys 172 SunOS Specific */ -/* #define __NR_rfssys 173 SunOS Specific */ +#define __NR_setxattr 169 /* SunOS: semsys */ +#define __NR_lsetxattr 170 /* SunOS: msgsys */ +#define __NR_fsetxattr 171 /* SunOS: shmsys */ +#define __NR_getxattr 172 /* SunOS: auditsys */ +#define __NR_lgetxattr 173 /* SunOS: rfssys */ #define __NR_getdents 174 /* Common */ #define __NR_setsid 175 /* Common */ #define __NR_fchdir 176 /* Common */ -/* #define __NR_fchroot 177 SunOS Specific */ -/* #define __NR_vpixsys 178 SunOS Specific */ -/* #define __NR_aioread 179 SunOS Specific */ -/* #define __NR_aiowrite 180 SunOS Specific */ -/* #define __NR_aiowait 181 SunOS Specific */ -/* #define __NR_aiocancel 182 SunOS Specific */ +#define __NR_fgetxattr 177 /* SunOS: fchroot */ +#define __NR_listxattr 178 /* SunOS: vpixsys */ +#define __NR_llistxattr 179 /* SunOS: aioread */ +#define __NR_flistxattr 180 /* SunOS: aiowrite */ +#define __NR_removexattr 181 /* SunOS: aiowait */ +#define __NR_lremovexattr 182 /* SunOS: aiocancel */ #define __NR_sigpending 183 /* Common */ #define __NR_query_module 184 /* Linux Specific */ #define __NR_setpgid 185 /* Common */ -/* #define __NR_pathconf 186 SunOS Specific */ -/* #define __NR_fpathconf 187 SunOS Specific */ -/* #define __NR_sysconf 188 SunOS Specific */ +#define __NR_fremovexattr 186 /* SunOS: pathconf */ +#define __NR_tkill 187 /* SunOS: fpathconf */ +#define __NR_exit_group 188 /* Linux specific, sysconf undef SunOS */ #define __NR_uname 189 /* Linux Specific */ #define __NR_init_module 190 /* Linux Specific */ #define __NR_personality 191 /* Linux Specific */ -/* #define __NR_prof 192 Linux Specific */ -/* #define __NR_break 193 Linux Specific */ -/* #define __NR_lock 194 Linux Specific */ -/* #define __NR_mpx 195 Linux Specific */ +#define __NR_remap_file_pages 192 /* Linux Specific */ +#define __NR_epoll_create 193 /* Linux Specific */ +#define __NR_epoll_ctl 194 /* Linux Specific */ +#define __NR_epoll_wait 195 /* Linux Specific */ /* #define __NR_ulimit 196 Linux Specific */ #define __NR_getppid 197 /* Linux Specific */ #define __NR_sigaction 198 /* Linux Specific */ @@ -203,13 +203,13 @@ #define __NR_oldlstat 202 /* Linux Specific */ #define __NR_uselib 203 /* Linux Specific */ #define __NR_readdir 204 /* Linux Specific */ -/* #define __NR_ioperm 205 Linux Specific - i386 specific, unused */ +#define __NR_readahead 205 /* Linux Specific */ #define __NR_socketcall 206 /* Linux Specific */ #define __NR_syslog 207 /* Linux Specific */ -/* #define __NR_olduname 208 Linux Specific */ -/* #define __NR_iopl 209 Linux Specific - i386 specific, unused */ -/* #define __NR_idle 210 Linux Specific - was sys_idle, now unused */ -/* #define __NR_vm86 211 Linux Specific - i386 specific, unused */ +#define __NR_lookup_dcookie 208 /* Linux Specific */ +#define __NR_fadvise64 209 /* Linux Specific */ +#define __NR_fadvise64_64 210 /* Linux Specific */ +#define __NR_tgkill 211 /* Linux Specific */ #define __NR_waitpid 212 /* Linux Specific */ #define __NR_swapoff 213 /* Linux Specific */ #define __NR_sysinfo 214 /* Linux Specific */ @@ -229,11 +229,10 @@ #define __NR_setfsuid 228 /* Linux Specific */ #define __NR_setfsgid 229 /* Linux Specific */ #define __NR__newselect 230 /* Linux Specific */ -/*#define __NR_time 231 Linux sparc32 */ /* #define __NR_oldstat 232 Linux Specific */ #define __NR_stime 233 /* Linux Specific */ -/* #define __NR_oldfstat 234 Linux Specific */ -/* #define __NR_phys 235 Linux Specific */ +#define __NR_statfs64 234 /* Linux Specific */ +#define __NR_fstatfs64 235 /* Linux Specific */ #define __NR__llseek 236 /* Linux Specific */ #define __NR_mlock 237 #define __NR_munlock 238 @@ -254,6 +253,34 @@ #define __NR_fdatasync 253 #define __NR_nfsservctl 254 #define __NR_aplib 255 +#define __NR_clock_settime 256 +#define __NR_clock_gettime 257 +#define __NR_clock_getres 258 +#define __NR_clock_nanosleep 259 +#define __NR_sched_getaffinity 260 +#define __NR_sched_setaffinity 261 +#define __NR_timer_settime 262 +#define __NR_timer_gettime 263 +#define __NR_timer_getoverrun 264 +#define __NR_timer_delete 265 +#define __NR_timer_create 266 +/* #define __NR_vserver 267 Reserved for VSERVER */ +#define __NR_io_setup 268 +#define __NR_io_destroy 269 +#define __NR_io_submit 270 +#define __NR_io_cancel 271 +#define __NR_io_getevents 272 +#define __NR_mq_open 273 +#define __NR_mq_unlink 274 +#define __NR_mq_timedsend 275 +#define __NR_mq_timedreceive 276 +#define __NR_mq_notify 277 +#define __NR_mq_getsetattr 278 +#define __NR_waitid 279 +/*#define __NR_sys_setaltroot 280 available (was setaltroot) */ +#define __NR_add_key 281 +#define __NR_request_key 282 +#define __NR_keyctl 283 #define syscall_weak(name,wsym,sym) \ .text; \ diff -uNr dietlibc-0.28/syscalls.h dietlibc-0.29/syscalls.h --- dietlibc-0.28/syscalls.h 2003-10-10 06:37:34.000000000 -0700 +++ dietlibc-0.29/syscalls.h 2005-03-15 00:51:22.000000000 -0800 @@ -11,12 +11,12 @@ #include "sparc/syscalls.h" #endif -#elif defined(powerpc) -#include "ppc/syscalls.h" - #elif defined(__powerpc64__) #include "ppc64/syscalls.h" +#elif defined(__powerpc__) +#include "ppc/syscalls.h" + #elif defined(__mips__) #include "mips/syscalls.h" diff -uNr dietlibc-0.28/syscalls.s/CVS/Entries dietlibc-0.29/syscalls.s/CVS/Entries --- dietlibc-0.28/syscalls.s/CVS/Entries 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/syscalls.s/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,193 +0,0 @@ -/__getpagesize.S/1.1/Thu Apr 19 17:46:38 2001// -/__pread.S/1.4/Mon May 10 21:05:07 2004// -/__pwrite.S/1.2/Mon May 10 21:05:07 2004// -/__reboot.S/1.1/Mon Feb 5 17:49:41 2001// -/_llseek.S/1.3/Thu Apr 29 14:37:25 2004// -/access.S/1.1/Tue Jan 9 17:57:48 2001// -/adjtimex.S/1.1/Sat Aug 25 18:54:37 2001// -/alarm.S/1.3/Fri Oct 10 13:37:34 2003// -/bdflush.S/1.1/Mon Nov 11 16:51:46 2002// -/brk.S/1.1/Tue Jan 9 17:57:48 2001// -/capget.S/1.1/Tue Oct 7 14:39:44 2003// -/capset.S/1.1/Tue Oct 7 14:39:44 2003// -/chdir.S/1.1/Tue Jan 9 17:57:48 2001// -/chmod.S/1.1/Tue Jan 9 17:57:48 2001// -/chown.S/1.1/Tue Jan 9 17:57:48 2001// -/chown32.S/1.1/Mon Sep 3 23:35:15 2001// -/chroot.S/1.1/Tue Jan 9 17:57:48 2001// -/clock_getres.S/1.1/Wed Apr 14 13:13:29 2004// -/clock_gettime.S/1.1/Wed Apr 14 13:13:29 2004// -/clock_settime.S/1.1/Wed Apr 14 13:13:29 2004// -/close.S/1.2/Tue Jan 30 14:46:53 2001// -/create_module.S/1.1/Fri Sep 28 19:44:22 2001// -/delete_module.S/1.1/Fri Sep 28 19:44:22 2001// -/dup.S/1.1/Tue Jan 9 17:57:48 2001// -/dup2.S/1.1/Tue Jan 9 17:57:48 2001// -/environ.S/1.10/Tue Sep 28 00:01:30 2004// -/epoll_create.S/1.2/Sat Apr 12 15:19:01 2003// -/epoll_ctl.S/1.2/Sat Apr 12 15:19:01 2003// -/epoll_wait.S/1.2/Sat Apr 12 15:19:01 2003// -/errlist.S/1.6/Wed Aug 20 13:32:05 2003// -/errno.S/1.4/Fri Nov 15 15:39:17 2002// -/execve.S/1.1/Tue Jan 9 17:57:48 2001// -/fchdir.S/1.1/Tue Jan 9 17:57:48 2001// -/fchmod.S/1.1/Tue Jan 9 17:57:48 2001// -/fchown.S/1.1/Tue Jan 9 17:57:48 2001// -/fchown32.S/1.1/Mon Sep 3 23:35:15 2001// -/fcntl.S/1.2/Tue Jan 30 14:46:53 2001// -/fdatasync.S/1.1/Thu Feb 21 00:33:37 2002// -/flock.S/1.1/Tue Jan 9 17:57:48 2001// -/fork.S/1.2/Tue Jan 30 14:46:53 2001// -/fstat.S/1.1/Sat Feb 3 00:37:00 2001// -/fstat64.S/1.3/Sat Jan 4 22:21:48 2003// -/fstatfs.S/1.1/Tue Jan 9 17:57:48 2001// -/fsync.S/1.2/Tue Jan 30 15:33:27 2001// -/ftruncate.S/1.1/Tue Jan 9 17:57:48 2001// -/ftruncate64.S/1.1/Sun May 5 21:44:08 2002// -/getcwd.S/1.2/Wed May 9 01:16:05 2001// -/getdents.S/1.1/Tue Jan 9 17:57:48 2001// -/getdents64.S/1.3/Fri Nov 8 17:07:09 2002// -/getegid.S/1.1/Tue Jan 9 17:57:48 2001// -/getegid32.S/1.1/Mon Sep 3 23:35:15 2001// -/geteuid.S/1.1/Tue Jan 9 17:57:48 2001// -/geteuid32.S/1.1/Mon Sep 3 23:35:15 2001// -/getgid.S/1.1/Tue Jan 9 17:57:48 2001// -/getgid32.S/1.1/Mon Sep 3 23:35:15 2001// -/getgroups.S/1.1/Tue Jan 9 17:57:48 2001// -/getgroups32.S/1.1/Mon Sep 3 23:35:15 2001// -/getitimer.S/1.1/Wed Mar 14 15:22:21 2001// -/getpgid.S/1.1/Tue Jan 9 17:57:48 2001// -/getpid.S/1.1/Tue Jan 9 17:57:48 2001// -/getppid.S/1.1/Tue Jan 9 17:57:48 2001// -/getpriority.S/1.1/Thu Jan 25 12:48:03 2001// -/getresgid.S/1.1/Tue Jan 9 17:57:48 2001// -/getresgid32.S/1.1/Mon Sep 3 23:35:15 2001// -/getresuid.S/1.2/Thu May 31 19:35:04 2001// -/getrlimit.S/1.1/Tue Jan 9 17:57:48 2001// -/getrusage.S/1.1/Tue Jan 9 17:57:48 2001// -/getsid.S/1.1/Tue Jan 9 17:57:48 2001// -/gettimeofday.S/1.1/Tue Jan 9 17:57:48 2001// -/getuid.S/1.1/Tue Jan 9 17:57:49 2001// -/getuid32.S/1.1/Mon Sep 3 23:35:15 2001// -/init_module.S/1.1/Fri Sep 28 19:44:22 2001// -/ioctl.S/1.1/Tue Jan 9 17:57:49 2001// -/ioperm.S/1.1/Tue May 15 23:56:35 2001// -/iopl.S/1.2/Thu Apr 26 10:30:30 2001// -/ipc.S/1.2/Sat Jan 4 22:21:48 2003// -/kill.S/1.1/Tue Jan 9 17:57:49 2001// -/lchown.S/1.1/Tue Jan 9 17:57:49 2001// -/lchown32.S/1.1/Mon Sep 3 23:35:15 2001// -/link.S/1.1/Tue Jan 9 17:57:49 2001// -/lseek.S/1.2/Tue Jan 30 15:33:27 2001// -/lstat.S/1.1/Sat Feb 3 00:37:00 2001// -/lstat64.S/1.3/Sat Jan 4 22:21:48 2003// -/madvise.S/1.1/Mon Oct 22 20:20:53 2001// -/mkdir.S/1.1/Tue Jan 9 17:57:49 2001// -/mknod.S/1.1/Tue Jan 9 17:57:49 2001// -/mlock.S/1.1/Thu May 31 17:13:09 2001// -/mlockall.S/1.1/Wed May 2 21:06:24 2001// -/mmap.S/1.1/Thu May 15 15:17:10 2003// -/mmap2.S/1.1/Tue Nov 26 00:41:46 2002// -/mount.S/1.1/Tue Jan 9 17:57:49 2001// -/mprotect.S/1.1/Tue Jan 9 17:57:49 2001// -/mremap.S/1.1/Tue Jan 9 17:57:49 2001// -/msync.S/1.3/Wed Feb 12 15:56:06 2003// -/munlock.S/1.1/Wed Aug 14 13:52:20 2002// -/munlockall.S/1.1/Wed May 2 21:06:24 2001// -/munmap.S/1.1/Tue Jan 9 17:57:49 2001// -/n_sigaction.S/1.2/Sat Jan 4 22:21:48 2003// -/n_sigpending.S/1.2/Sat Jan 4 22:21:48 2003// -/n_sigprocmask.S/1.2/Sat Jan 4 22:21:48 2003// -/n_sigsuspend.S/1.2/Sat Jan 4 22:21:48 2003// -/nanosleep.S/1.2/Tue Jan 30 15:33:27 2001// -/nice.S/1.2/Sat Nov 9 18:23:19 2002// -/open.S/1.2/Tue Jan 30 15:33:27 2001// -/pause.S/1.3/Sat Jan 4 22:21:48 2003// -/personality.S/1.1/Sun Apr 22 14:30:13 2001// -/pipe.S/1.1/Tue Jan 9 17:57:49 2001// -/pivot_root.S/1.1/Thu Aug 23 18:33:44 2001// -/poll.S/1.1/Tue Jan 9 17:57:49 2001// -/prctl.S/1.1/Tue Nov 13 16:19:36 2001// -/ptrace.S/1.2/Sat Feb 23 15:57:31 2002// -/query_module.S/1.1/Sun May 6 00:34:27 2001// -/read.S/1.2/Tue Jan 30 14:46:53 2001// -/readlink.S/1.1/Tue Jan 9 17:57:49 2001// -/readv.S/1.1/Thu Jan 11 15:58:42 2001// -/rename.S/1.1/Tue Jan 9 17:57:49 2001// -/rmdir.S/1.1/Tue Jan 9 17:57:49 2001// -/rt_sigaction.S/1.1/Thu Jul 19 20:33:23 2001// -/rt_sigpending.S/1.1/Thu Jul 19 20:33:23 2001// -/rt_sigprocmask.S/1.1/Thu Jul 19 20:33:23 2001// -/rt_sigqueueinfo.S/1.1/Thu Jul 19 20:33:23 2001// -/rt_sigsuspend.S/1.1/Thu Jul 19 20:33:23 2001// -/rt_sigtimedwait.S/1.1/Thu Jul 19 20:33:23 2001// -/sched_get_priority_max.S/1.1/Thu Jan 25 18:13:44 2001// -/sched_get_priority_min.S/1.1/Thu Jan 25 18:13:44 2001// -/sched_getparam.S/1.1/Thu Jan 25 18:13:44 2001// -/sched_getscheduler.S/1.1/Thu Jan 25 18:13:44 2001// -/sched_rr_get_interval.S/1.1/Thu Jan 25 18:13:44 2001// -/sched_setparam.S/1.1/Thu Jan 25 18:13:44 2001// -/sched_setscheduler.S/1.1/Thu Jan 25 18:13:44 2001// -/sched_yield.S/1.1/Thu Jan 25 18:13:44 2001// -/select.S/1.2/Tue Jan 30 14:46:53 2001// -/sendfile.S/1.4/Mon Nov 25 23:37:19 2002// -/sendfile64.S/1.2/Mon May 19 11:35:46 2003// -/setdomainname.S/1.1/Tue Jan 9 17:57:49 2001// -/setfsgid.S/1.1/Fri May 18 14:19:22 2001// -/setfsgid32.S/1.1/Mon Sep 3 23:35:16 2001// -/setfsuid.S/1.1/Fri May 18 14:19:22 2001// -/setfsuid32.S/1.1/Mon Sep 3 23:35:16 2001// -/setgid.S/1.1/Tue Jan 9 17:57:49 2001// -/setgid32.S/1.1/Mon Sep 3 23:35:16 2001// -/setgroups.S/1.1/Tue Jan 9 17:57:49 2001// -/sethostname.S/1.1/Tue Jan 9 17:57:49 2001// -/setitimer.S/1.1/Tue Jan 9 17:57:49 2001// -/setpgid.S/1.1/Tue Jan 9 17:57:49 2001// -/setpriority.S/1.1/Thu Jan 25 12:48:03 2001// -/setregid.S/1.1/Tue Jan 9 17:57:49 2001// -/setregid32.S/1.1/Mon Sep 3 23:35:16 2001// -/setresgid.S/1.3/Thu May 31 19:32:50 2001// -/setresgid32.S/1.1/Mon Sep 3 23:35:16 2001// -/setresuid.S/1.3/Thu May 31 19:32:50 2001// -/setreuid.S/1.1/Tue Jan 9 17:57:49 2001// -/setreuid32.S/1.1/Mon Sep 3 23:35:16 2001// -/setrlimit.S/1.1/Tue Jan 9 17:57:49 2001// -/setsid.S/1.1/Tue Jan 9 17:57:49 2001// -/settimeofday.S/1.1/Wed Aug 1 21:34:34 2001// -/setuid.S/1.1/Tue Jan 9 17:57:49 2001// -/setuid32.S/1.1/Mon Sep 3 23:35:16 2001// -/sigaltstack.S/1.2/Tue Jan 30 14:46:53 2001// -/socketcall.S/1.2/Sat Jan 4 22:21:48 2003// -/stat.S/1.1/Sat Feb 3 00:37:00 2001// -/stat64.S/1.3/Sat Jan 4 22:21:48 2003// -/statfs.S/1.1/Tue Jan 9 17:57:49 2001// -/stime.S/1.2/Thu Aug 8 16:30:13 2002// -/swapoff.S/1.1/Tue Jan 9 17:57:49 2001// -/swapon.S/1.1/Tue Jan 9 17:57:49 2001// -/symlink.S/1.1/Tue Jan 9 17:57:49 2001// -/sync.S/1.1/Tue Jan 9 17:57:49 2001// -/sysctl.S/1.3/Tue Aug 19 15:28:11 2003// -/sysfs.S/1.1/Mon Sep 1 17:18:44 2003// -/sysinfo.S/1.1/Sun May 6 00:07:29 2001// -/syslog.S/1.2/Thu Aug 23 18:33:44 2001// -/time.S/1.2/Thu Mar 21 16:05:18 2002// -/timer_create.S/1.1/Wed Apr 14 13:13:29 2004// -/timer_delete.S/1.1/Wed Apr 14 13:13:29 2004// -/timer_getoverrun.S/1.1/Wed Apr 14 13:13:29 2004// -/timer_gettime.S/1.1/Wed Apr 14 13:13:29 2004// -/timer_settime.S/1.1/Wed Apr 14 13:13:29 2004// -/times.S/1.1/Sun Feb 11 21:54:32 2001// -/truncate.S/1.1/Tue Jan 9 17:57:49 2001// -/truncate64.S/1.2/Sun May 5 21:49:30 2002// -/umask.S/1.1/Tue Jan 9 17:57:49 2001// -/umount.S/1.1/Tue Jan 9 17:57:49 2001// -/umount2.S/1.2/Sat Jan 4 22:21:48 2003// -/uname.S/1.1/Tue Jan 9 17:57:49 2001// -/unlink.S/1.1/Tue Jan 9 17:57:49 2001// -/utime.S/1.1/Tue Jan 9 17:57:49 2001// -/vhangup.S/1.1/Tue Jan 9 17:57:49 2001// -/wait4.S/1.1/Tue Jan 9 17:57:49 2001// -/waitpid.S/1.3/Sat Nov 9 18:08:59 2002// -/write.S/1.2/Tue Jan 30 14:46:53 2001// -/writev.S/1.1/Thu Jan 11 15:58:42 2001// -D diff -uNr dietlibc-0.28/syscalls.s/CVS/Repository dietlibc-0.29/syscalls.s/CVS/Repository --- dietlibc-0.28/syscalls.s/CVS/Repository 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/syscalls.s/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/syscalls.s diff -uNr dietlibc-0.28/syscalls.s/CVS/Root dietlibc-0.29/syscalls.s/CVS/Root --- dietlibc-0.28/syscalls.s/CVS/Root 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/syscalls.s/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/syscalls.s/errlist.S dietlibc-0.29/syscalls.s/errlist.S --- dietlibc-0.28/syscalls.s/errlist.S 2003-08-20 06:32:05.000000000 -0700 +++ dietlibc-0.29/syscalls.s/errlist.S 2005-05-14 16:35:39.000000000 -0700 @@ -152,6 +152,11 @@ deflong .LC122 deflong .LC123 deflong .LC124 + deflong .LC125 + deflong .LC126 + deflong .LC127 + deflong .LC128 + deflong .LC129 deflong 0 .size sys_errlist,.-sys_errlist @@ -291,3 +296,8 @@ .LC122: .asciz "Quota exceeded" .LC123: .asciz "No medium found" .LC124: .asciz "Wrong medium type" +.LC125: .asciz "Operation Canceled" +.LC126: .asciz "Required key not available" +.LC127: .asciz "Key has expired" +.LC128: .asciz "Key has been revoked" +.LC129: .asciz "Key was rejected by service" diff -uNr dietlibc-0.28/syscalls.s/select.S dietlibc-0.29/syscalls.s/select.S --- dietlibc-0.28/syscalls.s/select.S 2001-01-30 06:46:53.000000000 -0800 +++ dietlibc-0.29/syscalls.s/select.S 2005-03-23 11:57:53.000000000 -0800 @@ -1,3 +1,5 @@ #include "syscalls.h" +#ifdef __NR_select syscall(select,select) +#endif diff -uNr dietlibc-0.28/test/CVS/Entries dietlibc-0.29/test/CVS/Entries --- dietlibc-0.28/test/CVS/Entries 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/test/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,92 +0,0 @@ -/Makefile/1.1/Mon Dec 15 13:07:42 2003// -/adjtime.c/1.2/Mon Aug 5 18:08:24 2002// -/argv.c/1.3/Mon Dec 15 13:07:42 2003// -/asprintf.c/1.2/Mon Dec 15 13:07:42 2003// -/atexit.c/1.2/Thu Feb 20 15:57:12 2003// -/bsearch.c/1.4/Mon Dec 15 13:07:42 2003// -/byteswap.c/1.2/Mon Dec 15 13:07:42 2003// -/calloc.c/1.2/Thu Feb 20 15:57:12 2003// -/confstr.c/1.1/Mon Aug 18 17:32:53 2003// -/crypt.c/1.1/Fri Dec 17 20:29:56 2004// -/cycles.c/1.5/Tue Aug 24 10:10:48 2004// -/dirname.c/1.1/Mon Jan 19 15:31:16 2004// -/empty.c/1.1/Tue Oct 23 01:44:40 2001// -/ffs.c/1.2/Mon Dec 15 13:07:42 2003// -/flush.c/1.2/Thu Feb 20 15:57:12 2003// -/fnmatch.c/1.3/Thu Feb 20 15:57:12 2003// -/fputc.c/1.1/Sun Sep 14 04:40:37 2003// -/fstab/1.2/Mon Dec 15 13:07:42 2003// -/ftw.c/1.2/Mon Dec 15 13:07:42 2003// -/fwrite.c/1.2/Thu Feb 20 15:57:12 2003// -/getaddrinfo.c/1.2/Thu Feb 20 15:57:12 2003// -/getdelim.c/1.1/Fri Mar 1 23:37:07 2002// -/getenv.c/1.2/Thu Feb 20 15:57:12 2003// -/getgrnam.c/1.2/Thu Feb 20 15:57:12 2003// -/gethostbyaddr.c/1.3/Fri Feb 21 02:33:21 2003// -/gethostbyname.c/1.4/Mon Dec 15 13:07:42 2003// -/gethostbyname_r.c/1.2/Mon Dec 15 13:07:42 2003// -/getmntent.c/1.4/Mon Dec 15 13:07:42 2003// -/getopt.c/1.1/Tue Jul 31 14:24:34 2001// -/getpass.c/1.1/Sun Nov 4 22:41:38 2001// -/getpwnam.c/1.3/Mon Dec 15 13:07:42 2003// -/getservbyname.c/1.5/Mon Dec 15 13:07:42 2003// -/getservbyport.c/1.3/Mon Dec 15 13:07:42 2003// -/getusershell.c/1.3/Mon Dec 15 13:07:42 2003// -/glob.c/1.2/Mon Dec 15 13:07:42 2003// -/grent.c/1.2/Thu Feb 20 15:57:12 2003// -/hasmntopt.c/1.2/Thu Feb 20 15:57:12 2003// -/hello.c/1.2/Mon Dec 15 13:07:42 2003// -/iconv.c/1.2/Mon Dec 15 13:07:42 2003// -/if_nameindex.c/1.2/Thu Feb 20 15:57:12 2003// -/ltostr.c/1.3/Mon Dec 15 13:07:42 2003// -/malloc-debugger.c/1.2/Thu Feb 20 15:57:13 2003// -/md5_testharness.c/1.6/Tue Aug 24 10:10:48 2004// -/memccpy.c/1.1/Tue Apr 2 14:57:42 2002// -/memchr.c/1.4/Fri Mar 26 23:28:13 2004// -/memcmp.c/1.2/Thu Feb 20 15:57:13 2003// -/memcpy.c/1.3/Thu Feb 20 15:57:13 2003// -/memrchr.c/1.1/Sat Jun 1 17:04:59 2002// -/memusage.c/1.2/Thu Feb 20 15:57:13 2003// -/mktime.c/1.3/Sat Mar 27 00:47:00 2004// -/mmap_test.c/1.1/Mon Feb 18 00:37:31 2002// -/pipe.c/1.1/Mon May 13 15:56:48 2002// -/printf.c/1.5/Wed Jan 7 15:06:48 2004// -/printftest.c/1.2/Mon Dec 15 13:07:42 2003// -/printftest.exp/1.1/Fri Oct 17 14:36:38 2003// -/protoent.c/1.3/Mon Dec 15 13:07:42 2003// -/prototypes.c/1.3/Sun Apr 6 02:39:29 2003// -/putenv.c/1.2/Thu Feb 20 15:57:13 2003// -/pwent.c/1.2/Thu Feb 20 15:57:13 2003// -/rand48.c/1.1/Wed May 29 13:20:40 2002// -/read1.c/1.2/Thu Feb 20 15:57:13 2003// -/readdir.c/1.3/Thu Feb 20 15:57:13 2003// -/realpath.c/1.1/Tue Jan 27 21:50:42 2004// -/regex.c/1.10/Tue Jun 3 12:05:40 2003// -/runtests.sh/1.1/Mon Dec 15 13:07:42 2003// -/select.c/1.2/Thu Feb 20 15:57:13 2003// -/sendfile.c/1.2/Mon Dec 15 13:07:42 2003// -/servent.c/1.4/Mon Dec 15 13:07:42 2003// -/siglist.c/1.2/Mon Dec 15 13:07:42 2003// -/speed.c/1.2/Mon Dec 15 13:07:42 2003// -/spent.c/1.3/Mon Dec 15 13:07:42 2003// -/sprintf.c/1.7/Wed Dec 3 20:51:24 2003// -/sscanf.c/1.4/Thu Feb 20 15:57:13 2003// -/stdarg.c/1.1/Sun Jun 24 16:37:20 2001// -/stdio.c/1.3/Thu Feb 20 15:57:13 2003// -/strcasecmp.c/1.4/Mon Dec 15 13:07:42 2003// -/strcmp.c/1.4/Sun Dec 21 12:06:36 2003// -/strlen.c/1.2/Thu Feb 20 15:57:13 2003// -/strncat.c/1.3/Thu Feb 20 15:57:13 2003// -/strncpy.c/1.2/Thu Feb 20 15:57:13 2003// -/strptime.c/1.2/Mon Dec 15 13:07:42 2003// -/strrchr.c/1.2/Thu Feb 20 15:57:13 2003// -/strstr.c/1.2/Thu Feb 20 15:57:13 2003// -/strtol.c/1.4/Tue Aug 24 10:10:48 2004// -/syscall.c/1.2/Thu Feb 20 15:57:13 2003// -/sysenter.c/1.2/Mon Dec 15 13:07:42 2003// -/test-getlongopt.c/1.1/Mon Sep 24 14:58:33 2001// -/test-newfnmatch.c/1.1/Mon Jan 19 16:09:22 2004// -/testandset.c/1.2/Thu Feb 20 15:57:13 2003// -/ungetc.c/1.2/Mon Dec 15 13:07:42 2003// -/waitpid.c/1.2/Mon Dec 15 13:07:42 2003// -D diff -uNr dietlibc-0.28/test/CVS/Entries.Log dietlibc-0.29/test/CVS/Entries.Log --- dietlibc-0.28/test/CVS/Entries.Log 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/test/CVS/Entries.Log 1969-12-31 16:00:00.000000000 -0800 @@ -1,6 +0,0 @@ -A D/dirent//// -A D/inet//// -A D/stdio//// -A D/stdlib//// -A D/string//// -A D/time//// diff -uNr dietlibc-0.28/test/CVS/Repository dietlibc-0.29/test/CVS/Repository --- dietlibc-0.28/test/CVS/Repository 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/test/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/test diff -uNr dietlibc-0.28/test/CVS/Root dietlibc-0.29/test/CVS/Root --- dietlibc-0.28/test/CVS/Root 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/test/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/test/crypt.c dietlibc-0.29/test/crypt.c --- dietlibc-0.28/test/crypt.c 2004-12-17 12:29:56.000000000 -0800 +++ dietlibc-0.29/test/crypt.c 2005-05-20 08:01:57.000000000 -0700 @@ -1,12 +1,18 @@ #include #include #include +#include +#include int main(int argc,char* argv[]) { char salt[2]; char charset[100]; unsigned int l,i; int fd; + salt[0]='a'; + salt[1]='b'; + assert(!strcmp(crypt("fnord",salt),"ab3MSJErI/bdM")); + for (l=i=0; i<'z'-'a'; ++i) { charset[l]=i+'a'; ++l; } for (i=0; i<'Z'-'A'; ++i) { charset[l]=i+'A'; ++l; } for (i=0; i<'9'-'0'; ++i) { charset[l]=i+'0'; ++l; } diff -uNr dietlibc-0.28/test/dirent/CVS/Entries dietlibc-0.29/test/dirent/CVS/Entries --- dietlibc-0.28/test/dirent/CVS/Entries 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/test/dirent/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,5 +0,0 @@ -/Makefile/1.1/Mon Dec 15 13:07:42 2003// -/opendir-tst1.c/1.1/Mon Dec 15 13:07:42 2003// -/runtests.sh/1.1/Mon Dec 15 13:07:42 2003// -/tst-seekdir.c/1.1/Mon Dec 15 13:07:42 2003// -D diff -uNr dietlibc-0.28/test/dirent/CVS/Repository dietlibc-0.29/test/dirent/CVS/Repository --- dietlibc-0.28/test/dirent/CVS/Repository 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/test/dirent/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/test/dirent diff -uNr dietlibc-0.28/test/dirent/CVS/Root dietlibc-0.29/test/dirent/CVS/Root --- dietlibc-0.28/test/dirent/CVS/Root 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/test/dirent/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/test/gettimeofday.c dietlibc-0.29/test/gettimeofday.c --- dietlibc-0.28/test/gettimeofday.c 1969-12-31 16:00:00.000000000 -0800 +++ dietlibc-0.29/test/gettimeofday.c 2005-05-07 16:07:33.000000000 -0700 @@ -0,0 +1,9 @@ +#include +#include +#include + +main() { + struct timeval t; + printf("%d\n",gettimeofday(&t,0)); + printf("%lu %lu\n",t.tv_sec,t.tv_usec); +} diff -uNr dietlibc-0.28/test/inet/CVS/Entries dietlibc-0.29/test/inet/CVS/Entries --- dietlibc-0.28/test/inet/CVS/Entries 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/test/inet/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,7 +0,0 @@ -/Makefile/1.1/Mon Dec 15 13:07:42 2003// -/runtests.sh/1.1/Mon Dec 15 13:07:42 2003// -/test_ifindex.c/1.1/Mon Dec 15 13:07:42 2003// -/tst-gethnm.c/1.1/Mon Dec 15 13:07:42 2003// -/tst-network.c/1.1/Mon Dec 15 13:07:42 2003// -/tst-ntoa.c/1.1/Mon Dec 15 13:07:42 2003// -D diff -uNr dietlibc-0.28/test/inet/CVS/Repository dietlibc-0.29/test/inet/CVS/Repository --- dietlibc-0.28/test/inet/CVS/Repository 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/test/inet/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/test/inet diff -uNr dietlibc-0.28/test/inet/CVS/Root dietlibc-0.29/test/inet/CVS/Root --- dietlibc-0.28/test/inet/CVS/Root 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/test/inet/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/test/regex.c dietlibc-0.29/test/regex.c --- dietlibc-0.28/test/regex.c 2003-06-03 05:05:40.000000000 -0700 +++ dietlibc-0.29/test/regex.c 2005-05-08 07:18:28.000000000 -0700 @@ -93,6 +93,11 @@ assert(matches[0].rm_so==1 && matches[0].rm_eo==3); regfree(&r); + assert(regcomp(&r,"(gilda|oskar|leitner(-[^@]+|))@home.fefe.de",REG_EXTENDED)==0); + assert(regexec(&r,"leitner@home.fefe.de",10,matches,0)==0); + regfree(&r); + + #if 0 printf("regcomp %d\n",regcomp(&r,"\\.( ? ? ?\\.)*\\.",REG_EXTENDED|REG_NOSUB)); printf("regexec %d\n",regexec(&r,buf,1,0,0)); diff -uNr dietlibc-0.28/test/stdio/CVS/Entries dietlibc-0.29/test/stdio/CVS/Entries --- dietlibc-0.28/test/stdio/CVS/Entries 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/test/stdio/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,18 +0,0 @@ -/Makefile/1.1/Mon Dec 15 13:07:42 2003// -/runtests.sh/1.1/Mon Dec 15 13:07:42 2003// -/tst-fdopen.c/1.1/Mon Dec 15 13:07:42 2003// -/tst-ferror.c/1.1/Mon Dec 15 13:07:42 2003// -/tst-fileno.c/1.1/Mon Dec 15 13:07:42 2003// -/tst-fphex.c/1.1/Mon Dec 15 13:07:42 2003// -/tst-fseek.c/1.1/Mon Dec 15 13:07:42 2003// -/tst-printf.c/1.1/Mon Dec 15 13:07:42 2003// -/tst-printfsz.c/1.1/Mon Dec 15 13:07:42 2003// -/tst-sprintf.c/1.1/Mon Dec 15 13:07:42 2003// -/tst-sscanf.c/1.1/Mon Dec 15 13:07:42 2003// -/tst-tmpnam.c/1.1/Mon Dec 15 13:07:42 2003// -/tst-unbputc.c/1.1/Mon Dec 15 13:07:42 2003// -/tst-ungetc.c/1.1/Mon Dec 15 13:07:42 2003// -/tstdiomisc.c/1.1/Mon Dec 15 13:07:42 2003// -/tstgetln.c/1.1/Mon Dec 15 13:07:42 2003// -/tstscanf.c/1.1/Mon Dec 15 13:07:42 2003// -D diff -uNr dietlibc-0.28/test/stdio/CVS/Repository dietlibc-0.29/test/stdio/CVS/Repository --- dietlibc-0.28/test/stdio/CVS/Repository 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/test/stdio/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/test/stdio diff -uNr dietlibc-0.28/test/stdio/CVS/Root dietlibc-0.29/test/stdio/CVS/Root --- dietlibc-0.28/test/stdio/CVS/Root 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/test/stdio/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/test/stdlib/CVS/Entries dietlibc-0.29/test/stdlib/CVS/Entries --- dietlibc-0.28/test/stdlib/CVS/Entries 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/test/stdlib/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,16 +0,0 @@ -/Makefile/1.1/Mon Dec 15 13:07:42 2003// -/runtests.sh/1.1/Mon Dec 15 13:07:42 2003// -/test-canon.c/1.1/Mon Dec 15 13:07:42 2003// -/testdiv.c/1.1/Mon Dec 15 13:07:42 2003// -/testrand.c/1.1/Mon Dec 15 13:07:42 2003// -/testsort.c/1.1/Mon Dec 15 13:07:42 2003// -/tst-calloc.c/1.1/Mon Dec 15 13:07:42 2003// -/tst-environ.c/1.1/Mon Dec 15 13:07:42 2003// -/tst-limits.c/1.1/Mon Dec 15 13:07:42 2003// -/tst-malloc.c/1.1/Mon Dec 15 13:07:42 2003// -/tst-rand48.c/1.1/Mon Dec 15 13:07:42 2003// -/tst-strtod.c/1.1/Mon Dec 15 13:07:42 2003// -/tst-strtol.c/1.1/Mon Dec 15 13:07:42 2003// -/tst-strtoll.c/1.1/Mon Dec 15 13:07:42 2003// -/tst-system.c/1.1/Mon Dec 15 13:07:42 2003// -D diff -uNr dietlibc-0.28/test/stdlib/CVS/Repository dietlibc-0.29/test/stdlib/CVS/Repository --- dietlibc-0.28/test/stdlib/CVS/Repository 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/test/stdlib/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/test/stdlib diff -uNr dietlibc-0.28/test/stdlib/CVS/Root dietlibc-0.29/test/stdlib/CVS/Root --- dietlibc-0.28/test/stdlib/CVS/Root 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/test/stdlib/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/test/string/CVS/Entries dietlibc-0.29/test/string/CVS/Entries --- dietlibc-0.28/test/string/CVS/Entries 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/test/string/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,15 +0,0 @@ -/Makefile/1.1/Mon Dec 15 13:07:42 2003// -/memccpy.c/1.1/Mon Dec 15 13:07:42 2003// -/memchr.c/1.1/Mon Dec 15 13:07:42 2003// -/memcmp.c/1.1/Mon Dec 15 13:07:42 2003// -/memcpy.c/1.1/Mon Dec 15 13:07:42 2003// -/memrchr.c/1.1/Mon Dec 15 13:07:42 2003// -/runtests.sh/1.1/Mon Dec 15 13:07:42 2003// -/strcasecmp.c/1.1/Mon Dec 15 13:07:42 2003// -/strcmp.c/1.1/Mon Dec 15 13:07:42 2003// -/strlen.c/1.1/Mon Dec 15 13:07:42 2003// -/strncat.c/1.1/Mon Dec 15 13:07:42 2003// -/strncpy.c/1.1/Mon Dec 15 13:07:42 2003// -/strrchr.c/1.1/Mon Dec 15 13:07:42 2003// -/strstr.c/1.1/Mon Dec 15 13:07:42 2003// -D diff -uNr dietlibc-0.28/test/string/CVS/Repository dietlibc-0.29/test/string/CVS/Repository --- dietlibc-0.28/test/string/CVS/Repository 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/test/string/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/test/string diff -uNr dietlibc-0.28/test/string/CVS/Root dietlibc-0.29/test/string/CVS/Root --- dietlibc-0.28/test/string/CVS/Root 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/test/string/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/test/syscall.c dietlibc-0.29/test/syscall.c --- dietlibc-0.28/test/syscall.c 2003-02-20 07:57:13.000000000 -0800 +++ dietlibc-0.29/test/syscall.c 2005-05-20 07:46:32.000000000 -0700 @@ -1,6 +1,14 @@ #include +#include +#include +#include int main() { + int a,b; syscall(__NR_write,1,"foo\n",4); + a=syscall(__NR_write,23,"bar\n",4); + b=errno; + assert(a==-1); + assert(b==EBADF); return 0; } diff -uNr dietlibc-0.28/test/time/CVS/Entries dietlibc-0.29/test/time/CVS/Entries --- dietlibc-0.28/test/time/CVS/Entries 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/test/time/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,7 +0,0 @@ -/Makefile/1.1/Mon Dec 15 13:07:42 2003// -/runtests.sh/1.1/Mon Dec 15 13:07:42 2003// -/tst-mktime.c/1.1/Mon Dec 15 13:07:42 2003// -/tst-posixtz.c/1.1/Mon Dec 15 13:07:42 2003// -/tst-strftime.c/1.1/Mon Dec 15 13:07:42 2003// -/tst-strptime.c/1.1/Mon Dec 15 13:07:42 2003// -D diff -uNr dietlibc-0.28/test/time/CVS/Repository dietlibc-0.29/test/time/CVS/Repository --- dietlibc-0.28/test/time/CVS/Repository 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/test/time/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/test/time diff -uNr dietlibc-0.28/test/time/CVS/Root dietlibc-0.29/test/time/CVS/Root --- dietlibc-0.28/test/time/CVS/Root 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/test/time/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/x86_64/CVS/Entries dietlibc-0.29/x86_64/CVS/Entries --- dietlibc-0.28/x86_64/CVS/Entries 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/x86_64/CVS/Entries 1969-12-31 16:00:00.000000000 -0800 @@ -1,41 +0,0 @@ -/Makefile.add/1.2/Wed Aug 7 01:21:51 2002// -/__longjmp.S/1.1/Fri Aug 30 16:40:22 2002// -/__testandset.S/1.2/Mon Sep 16 11:17:02 2002// -/accept.S/1.1/Mon Aug 5 18:08:41 2002// -/bind.S/1.1/Mon Aug 5 18:08:41 2002// -/clone.S/1.3/Fri Jan 28 16:04:54 2005// -/connect.S/1.1/Mon Aug 5 18:08:41 2002// -/dyn_syscalls.S/1.1/Fri Jan 28 16:04:54 2005// -/getpeername.S/1.1/Mon Aug 5 18:08:41 2002// -/getsockname.S/1.1/Mon Aug 5 18:08:41 2002// -/getsockopt.S/1.1/Mon Aug 5 18:08:41 2002// -/listen.S/1.1/Mon Aug 5 18:08:41 2002// -/msgctl.S/1.1/Sat Jan 4 22:21:48 2003// -/msgget.S/1.1/Sat Jan 4 22:21:48 2003// -/msgrcv.S/1.1/Sat Jan 4 22:21:48 2003// -/msgsnd.S/1.1/Sat Jan 4 22:21:48 2003// -/recv.c/1.2/Mon Nov 18 01:16:51 2002// -/recvfrom.S/1.1/Mon Aug 5 18:08:41 2002// -/recvmsg.S/1.1/Mon Aug 5 18:08:41 2002// -/semctl.S/1.1/Sat Jan 4 22:21:48 2003// -/semget.S/1.1/Sat Jan 4 22:21:48 2003// -/semop.S/1.1/Sat Jan 4 22:21:48 2003// -/send.c/1.2/Mon Nov 18 01:16:51 2002// -/sendmsg.S/1.1/Mon Aug 5 18:08:41 2002// -/sendto.S/1.1/Mon Aug 5 18:08:41 2002// -/setjmp.S/1.3/Fri Jan 28 16:04:54 2005// -/setsockopt.S/1.1/Mon Aug 5 18:08:41 2002// -/shmat.S/1.1/Sat Jan 4 22:21:48 2003// -/shmctl.S/1.1/Sat Jan 4 22:21:48 2003// -/shmdt.S/1.1/Sat Jan 4 22:21:48 2003// -/shmget.S/1.1/Sat Jan 4 22:21:48 2003// -/shutdown.S/1.1/Mon Aug 5 18:08:41 2002// -/sigaction.c/1.1/Fri Feb 21 02:34:59 2003// -/socket.S/1.1/Mon Aug 5 18:08:41 2002// -/socketpair.S/1.1/Mon Aug 5 18:08:41 2002// -/start.S/1.5/Sat Sep 11 12:37:57 2004// -/syscalls.h/1.6/Fri Jan 28 22:28:53 2005// -/umount.S/1.2/Mon Sep 2 15:49:28 2002// -/unified.S/1.11/Fri Jan 28 22:28:53 2005// -/waitpid.S/1.4/Fri Jan 28 16:04:54 2005// -D diff -uNr dietlibc-0.28/x86_64/CVS/Repository dietlibc-0.29/x86_64/CVS/Repository --- dietlibc-0.28/x86_64/CVS/Repository 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/x86_64/CVS/Repository 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -dietlibc/x86_64 diff -uNr dietlibc-0.28/x86_64/CVS/Root dietlibc-0.29/x86_64/CVS/Root --- dietlibc-0.28/x86_64/CVS/Root 2005-01-31 09:53:10.000000000 -0800 +++ dietlibc-0.29/x86_64/CVS/Root 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.28/x86_64/gettimeofday.S dietlibc-0.29/x86_64/gettimeofday.S --- dietlibc-0.28/x86_64/gettimeofday.S 1969-12-31 16:00:00.000000000 -0800 +++ dietlibc-0.29/x86_64/gettimeofday.S 2005-05-07 16:07:33.000000000 -0700 @@ -0,0 +1,18 @@ +.text +.global gettimeofday +.type gettimeofday,@function +gettimeofday: + mov $0xffffffffff600000,%rax + callq *%rax + cmpq $-128, %rax + jbe .Lnoerror + negl %eax + pushq %rax + call __errno_location + popq %rcx + movl %ecx,(%rax) + orq $-1, %rax +.Lnoerror: + ret +.Lhere: + .size gettimeofday,.Lhere-gettimeofday diff -uNr dietlibc-0.28/x86_64/syscalls.h dietlibc-0.29/x86_64/syscalls.h --- dietlibc-0.28/x86_64/syscalls.h 2005-01-28 14:28:53.000000000 -0800 +++ dietlibc-0.29/x86_64/syscalls.h 2005-03-23 11:05:25.000000000 -0800 @@ -220,19 +220,18 @@ #define __NR_nfsservctl 180 -#define __NR_getpmsg 181 -#define __NR_putpmsg 182 +#define __NR_getpmsg 181 /* reserved for LiS/STREAMS */ +#define __NR_putpmsg 182 /* reserved for LiS/STREAMS */ -#define __NR_afs_syscall 183 +#define __NR_afs_syscall 183 /* reserved for AFS */ #define __NR_tuxcall 184 /* reserved for tux */ -#define __NR_security 185 /* reserved for security */ +#define __NR_security 185 #define __NR_gettid 186 #define __NR_readahead 187 - #define __NR_setxattr 188 #define __NR_lsetxattr 189 #define __NR_fsetxattr 190 @@ -245,9 +244,9 @@ #define __NR_removexattr 197 #define __NR_lremovexattr 198 #define __NR_fremovexattr 199 -#define __NR_tkill 200 /* 2.5 only */ -#define __NR_time 201 -#define __NR_futex 202 /* 2.5 only */ +#define __NR_tkill 200 +#define __NR_time 201 +#define __NR_futex 202 #define __NR_sched_setaffinity 203 #define __NR_sched_getaffinity 204 #define __NR_set_thread_area 205 @@ -259,8 +258,8 @@ #define __NR_get_thread_area 211 #define __NR_lookup_dcookie 212 #define __NR_epoll_create 213 -#define __NR_epoll_ctl 233 -#define __NR_epoll_wait 232 +#define __NR_epoll_ctl_old 214 +#define __NR_epoll_wait_old 215 #define __NR_remap_file_pages 216 #define __NR_getdents64 217 #define __NR_set_tid_address 218 @@ -277,6 +276,26 @@ #define __NR_clock_getres 229 #define __NR_clock_nanosleep 230 #define __NR_exit_group 231 +#define __NR_epoll_wait 232 +#define __NR_epoll_ctl 233 +#define __NR_tgkill 234 +#define __NR_utimes 235 +#define __NR_vserver 236 +#define __NR_vserver 236 +#define __NR_mbind 237 +#define __NR_set_mempolicy 238 +#define __NR_get_mempolicy 239 +#define __NR_mq_open 240 +#define __NR_mq_unlink 241 +#define __NR_mq_timedsend 242 +#define __NR_mq_timedreceive 243 +#define __NR_mq_notify 244 +#define __NR_mq_getsetattr 245 +#define __NR_kexec_load 246 +#define __NR_waitid 247 +#define __NR_add_key 248 +#define __NR_request_key 249 +#define __NR_keyctl 250 #define __NR_syscall_max __NR_exit_group diff -uNr dietlibc-0.28/x86_64/unified.S dietlibc-0.29/x86_64/unified.S --- dietlibc-0.28/x86_64/unified.S 2005-01-28 14:28:53.000000000 -0800 +++ dietlibc-0.29/x86_64/unified.S 2005-05-07 16:07:33.000000000 -0700 @@ -28,3 +28,5 @@ #include "dietuglyweaks.h" ret +.Lhere: + .size __unified_syscall,.Lhere-__unified_syscall