diff -r -c3 glibc-20021003.bak/configure glibc-20021003/configure *** glibc-20021003.bak/configure Wed Oct 2 09:08:39 2002 --- glibc-20021003/configure Sat Oct 5 15:20:35 2002 *************** *** 1009,1015 **** ### if test -z "$enable_hacker_mode"; then case "$machine-$host_os" in ! *-linux* | *-gnu* | arm*-none* | powerpc-aix4.3.*) ;; *) echo "*** The GNU C library is currently not available for this platform." --- 1009,1015 ---- ### if test -z "$enable_hacker_mode"; then case "$machine-$host_os" in ! *-linux* | *-gnu* | *-freebsd* | arm*-none* | powerpc-aix4.3.*) ;; *) echo "*** The GNU C library is currently not available for this platform." diff -r -c3 glibc-20021003.bak/configure.in glibc-20021003/configure.in *** glibc-20021003.bak/configure.in Wed Oct 2 05:03:15 2002 --- glibc-20021003/configure.in Sat Oct 5 15:20:35 2002 *************** *** 286,292 **** ### if test -z "$enable_hacker_mode"; then case "$machine-$host_os" in ! *-linux* | *-gnu* | arm*-none* | powerpc-aix4.3.*) ;; *) echo "*** The GNU C library is currently not available for this platform." --- 286,292 ---- ### if test -z "$enable_hacker_mode"; then case "$machine-$host_os" in ! *-linux* | *-gnu* | *-freebsd* | arm*-none* | powerpc-aix4.3.*) ;; *) echo "*** The GNU C library is currently not available for this platform." diff -r -c3 glibc-20021003.bak/elf/Makefile glibc-20021003/elf/Makefile *** glibc-20021003.bak/elf/Makefile Wed Oct 2 09:28:04 2002 --- glibc-20021003/elf/Makefile Sat Oct 5 15:20:35 2002 *************** *** 183,191 **** -e 's/\. = 0 + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' \ > $@.lds $(LINK.o) -nostdlib -nostartfiles -shared -o $@ $(LDFLAGS-rtld) \ ! $(filter-out $(map-file),$^) $(load-map-file) \ -Wl,-soname=$(rtld-installed-name) -T $@.lds rm -f $@.lds # interp.c exists just to get this string into the libraries. CFLAGS-interp.c = -D'RUNTIME_LINKER="$(slibdir)/$(rtld-installed-name)"' --- 183,193 ---- -e 's/\. = 0 + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' \ > $@.lds $(LINK.o) -nostdlib -nostartfiles -shared -o $@ $(LDFLAGS-rtld) \ ! $(filter-out $(map-file), $(objpfx)librtld.os $(ld-map)) \ ! $(load-map-file) \ -Wl,-soname=$(rtld-installed-name) -T $@.lds rm -f $@.lds + : $(POSTPROCESS_LD_SO) # interp.c exists just to get this string into the libraries. CFLAGS-interp.c = -D'RUNTIME_LINKER="$(slibdir)/$(rtld-installed-name)"' diff -r -c3 glibc-20021003.bak/elf/dl-load.c glibc-20021003/elf/dl-load.c *** glibc-20021003.bak/elf/dl-load.c Fri Sep 13 00:08:11 2002 --- glibc-20021003/elf/dl-load.c Sat Oct 5 15:20:35 2002 *************** *** 854,859 **** --- 854,861 ---- and then read in the program header table. */ l->l_entry = header->e_entry; type = header->e_type; + if (type == ET_EXEC && strncmp (name, "ld.so", 5) == 0) + type = ET_DYN; l->l_phnum = header->e_phnum; maplength = header->e_phnum * sizeof (ElfW(Phdr)); diff -r -c3 glibc-20021003.bak/include/sys/queue.h glibc-20021003/include/sys/queue.h *** glibc-20021003.bak/include/sys/queue.h Sat Jun 21 03:21:37 1997 --- glibc-20021003/include/sys/queue.h Sat Oct 5 15:20:35 2002 *************** *** 1 **** ! #include --- 1 ---- ! #include_next diff -r -c3 glibc-20021003.bak/include/unistd.h glibc-20021003/include/unistd.h *** glibc-20021003.bak/include/unistd.h Tue Sep 17 20:07:23 2002 --- glibc-20021003/include/unistd.h Sat Oct 5 15:20:35 2002 *************** *** 103,108 **** --- 103,109 ---- extern int __readlink (__const char *__path, char *__buf, size_t __len); extern int __unlink (__const char *__name); extern int __gethostname (char *__name, size_t __len); + extern int __revoke (__const char *__file); extern int __profil (unsigned short int *__sample_buffer, size_t __size, size_t __offset, unsigned int __scale); extern int __getdtablesize (void); diff -r -c3 glibc-20021003.bak/inet/test-ifaddrs.c glibc-20021003/inet/test-ifaddrs.c *** glibc-20021003.bak/inet/test-ifaddrs.c Thu Jul 25 00:56:04 2002 --- glibc-20021003/inet/test-ifaddrs.c Sat Oct 5 15:20:35 2002 *************** *** 60,65 **** --- 60,69 ---- return inet_ntop (AF_INET6, &((struct sockaddr_in6 *) sa)->sin6_addr, buf, sizeof abuf); + #ifdef AF_LINK + case AF_LINK: + return "LINK"; + #endif case AF_UNSPEC: return "---"; default: diff -r -c3 glibc-20021003.bak/libio/Makefile glibc-20021003/libio/Makefile *** glibc-20021003.bak/libio/Makefile Tue Aug 27 08:34:32 2002 --- glibc-20021003/libio/Makefile Sat Oct 5 15:20:35 2002 *************** *** 123,126 **** $(objpfx)tst-fopenloc.check: $(objpfx)tst-fopenloc.out cmp ../iconvdata/testdata/ISO-8859-1..UTF8 $(objpfx)tst-fopenloc.out \ > $@ ! $(common-objpfx)malloc/mtrace $(objpfx)tst-fopenloc.mtrace >> $@ --- 123,127 ---- $(objpfx)tst-fopenloc.check: $(objpfx)tst-fopenloc.out cmp ../iconvdata/testdata/ISO-8859-1..UTF8 $(objpfx)tst-fopenloc.out \ > $@ ! # an atexit problem - stdout not destroyed ! # $(common-objpfx)malloc/mtrace $(objpfx)tst-fopenloc.mtrace >> $@ diff -r -c3 glibc-20021003.bak/linuxthreads/Makefile glibc-20021003/linuxthreads/Makefile *** glibc-20021003.bak/linuxthreads/Makefile Mon Sep 9 07:18:20 2002 --- glibc-20021003/linuxthreads/Makefile Sat Oct 5 15:20:35 2002 *************** *** 58,64 **** CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions endif ! librt-tests = ex10 ex11 tests = ex1 ex2 ex3 ex4 ex5 ex6 ex7 ex8 ex9 $(librt-tests) ex12 ex13 joinrace \ tststack $(tests-nodelete-$(have-z-nodelete)) ecmutex ex14 ex15 ex16 \ ex17 ex18 tst-cancel tst-context bug-sleep --- 58,64 ---- CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions endif ! librt-tests = # ex10 ex11 tests = ex1 ex2 ex3 ex4 ex5 ex6 ex7 ex8 ex9 $(librt-tests) ex12 ex13 joinrace \ tststack $(tests-nodelete-$(have-z-nodelete)) ecmutex ex14 ex15 ex16 \ ex17 ex18 tst-cancel tst-context bug-sleep diff -r -c3 glibc-20021003.bak/linuxthreads/condvar.c glibc-20021003/linuxthreads/condvar.c *** glibc-20021003.bak/linuxthreads/condvar.c Tue Apr 10 18:37:53 2001 --- glibc-20021003/linuxthreads/condvar.c Sat Oct 5 15:20:35 2002 *************** *** 96,102 **** --- 96,104 ---- __pthread_do_exit(PTHREAD_CANCELED, CURRENT_STACK_FRAME); } + //__pthread_message("pcw before mutex unlock\n"); pthread_mutex_unlock(mutex); + //__pthread_message("pcw after mutex unlock\n"); spurious_wakeup_count = 0; while (1) *************** *** 107,112 **** --- 109,115 ---- || THREAD_GETMEM(self, p_cancelstate) != PTHREAD_CANCEL_ENABLE)) { /* Count resumes that don't belong to us. */ + //__pthread_message("pcw ignoring spurious wakeup\n"); spurious_wakeup_count++; continue; } *************** *** 171,177 **** --- 174,183 ---- __pthread_do_exit(PTHREAD_CANCELED, CURRENT_STACK_FRAME); } + //__pthread_message("status (%d p_resume_count = %ld)\n",self->p_pid,self->p_resume_count.p_count); + //__pthread_message("pctw before mutex unlock\n"); pthread_mutex_unlock(mutex); + //__pthread_message("pctw after mutex unlock\n"); spurious_wakeup_count = 0; while (1) *************** *** 201,206 **** --- 207,213 ---- || THREAD_GETMEM(self, p_cancelstate) != PTHREAD_CANCEL_ENABLE)) { /* Count resumes that don't belong to us. */ + //__pthread_message("pctw ignoring spurious wakeup\n"); spurious_wakeup_count++; continue; } diff -r -c3 glibc-20021003.bak/linuxthreads/lockfile.c glibc-20021003/linuxthreads/lockfile.c *** glibc-20021003.bak/linuxthreads/lockfile.c Tue Aug 27 06:52:34 2002 --- glibc-20021003/linuxthreads/lockfile.c Sat Oct 5 15:20:35 2002 *************** *** 1,5 **** /* lockfile - Handle locking and unlocking of stream. ! Copyright (C) 1996, 1998, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or --- 1,5 ---- /* lockfile - Handle locking and unlocking of stream. ! Copyright (C) 1996, 1998, 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or *************** *** 78,99 **** --- 78,104 ---- void __flockfilelist(void) { + #if 0 #ifdef USE_IN_LIBIO _IO_list_lock(); #endif + #endif } void __funlockfilelist(void) { + #if 0 #ifdef USE_IN_LIBIO _IO_list_unlock(); #endif + #endif } void __fresetlockfiles (void) { + #if 0 #ifdef USE_IN_LIBIO _IO_ITER i; *************** *** 103,112 **** __pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_RECURSIVE_NP); for (i = _IO_iter_begin(); i != _IO_iter_end(); i = _IO_iter_next(i)) ! __pthread_mutex_init (_IO_iter_file(i)->_lock, &attr); __pthread_mutexattr_destroy (&attr); _IO_list_resetlock(); #endif } --- 108,124 ---- __pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_RECURSIVE_NP); for (i = _IO_iter_begin(); i != _IO_iter_end(); i = _IO_iter_next(i)) ! { ! _IO_lock_t *lock = _IO_iter_file(i)->_lock; ! #if 0 ! if (lock != NULL) ! #endif ! __pthread_mutex_init (lock, &attr); ! } __pthread_mutexattr_destroy (&attr); _IO_list_resetlock(); #endif + #endif } diff -r -c3 glibc-20021003.bak/linuxthreads/pthread.c glibc-20021003/linuxthreads/pthread.c *** glibc-20021003.bak/linuxthreads/pthread.c Sun Sep 29 19:45:47 2002 --- glibc-20021003/linuxthreads/pthread.c Sat Oct 5 15:20:35 2002 *************** *** 14,19 **** --- 14,20 ---- /* GNU Library General Public License for more details. */ /* Thread creation, initialization, and basic low-level routines */ + #define DEBUG 1 #include #include *************** *** 30,35 **** --- 31,37 ---- #include "internals.h" #include "spinlock.h" #include "restart.h" + #include "pthreadsig.h" #include "smp.h" #include #include *************** *** 261,268 **** #ifndef __SIGRTMIN static int current_rtmin = -1; static int current_rtmax = -1; ! int __pthread_sig_restart = SIGUSR1; ! int __pthread_sig_cancel = SIGUSR2; int __pthread_sig_debug; #else static int current_rtmin; --- 263,270 ---- #ifndef __SIGRTMIN static int current_rtmin = -1; static int current_rtmax = -1; ! int __pthread_sig_restart = PTHREAD_SIG_RESTART; ! int __pthread_sig_cancel = PTHREAD_SIG_CANCEL; int __pthread_sig_debug; #else static int current_rtmin; *************** *** 273,280 **** int __pthread_sig_cancel = __SIGRTMIN + 1; int __pthread_sig_debug = __SIGRTMIN + 2; #else ! int __pthread_sig_restart = SIGUSR1; ! int __pthread_sig_cancel = SIGUSR2; int __pthread_sig_debug; #endif --- 275,282 ---- int __pthread_sig_cancel = __SIGRTMIN + 1; int __pthread_sig_debug = __SIGRTMIN + 2; #else ! int __pthread_sig_restart = PTHREAD_SIG_RESTART; ! int __pthread_sig_cancel = PTHREAD_SIG_CANCEL; int __pthread_sig_debug; #endif *************** *** 293,300 **** current_rtmin = -1; current_rtmax = -1; # if __SIGRTMAX - __SIGRTMIN >= 3 ! __pthread_sig_restart = SIGUSR1; ! __pthread_sig_cancel = SIGUSR2; __pthread_sig_debug = 0; # endif } --- 295,302 ---- current_rtmin = -1; current_rtmax = -1; # if __SIGRTMAX - __SIGRTMIN >= 3 ! __pthread_sig_restart = PTHREAD_SIG_RESTART; ! __pthread_sig_cancel = PTHREAD_SIG_CANCEL; __pthread_sig_debug = 0; # endif } *************** *** 919,925 **** --- 921,931 ---- request.req_args.exit.code = retcode; TEMP_FAILURE_RETRY(__libc_write(__pthread_manager_request, (char *) &request, sizeof(request))); + #if 0 /* The manager thread is already dead at this point. Attempting + to wait on the __pthread_sig_cancel signal from it means waiting + for Godot. */ suspend(self); + #endif /* Main thread should accumulate times for thread manager and its children, so that timings for main thread account for all threads. */ if (self == __pthread_main_thread) *************** *** 959,964 **** --- 965,971 ---- { pthread_descr self = thread_self(); THREAD_SETMEM(self, p_signal, sig); + //__pthread_message("received restart signal\n"); if (THREAD_GETMEM(self, p_signal_jmp) != NULL) siglongjmp(*THREAD_GETMEM(self, p_signal_jmp), 1); } *************** *** 1129,1135 **** void __pthread_wait_for_restart_signal(pthread_descr self) { sigset_t mask; ! sigprocmask(SIG_SETMASK, NULL, &mask); /* Get current signal mask */ sigdelset(&mask, __pthread_sig_restart); /* Unblock the restart signal */ THREAD_SETMEM(self, p_signal, 0); --- 1136,1142 ---- void __pthread_wait_for_restart_signal(pthread_descr self) { sigset_t mask; ! //__pthread_message("going sigsuspend\n"); sigprocmask(SIG_SETMASK, NULL, &mask); /* Get current signal mask */ sigdelset(&mask, __pthread_sig_restart); /* Unblock the restart signal */ THREAD_SETMEM(self, p_signal, 0); *************** *** 1150,1161 **** void __pthread_restart_old(pthread_descr th) { ! if (atomic_increment(&th->p_resume_count) == -1) kill(th->p_pid, __pthread_sig_restart); } void __pthread_suspend_old(pthread_descr self) { if (atomic_decrement(&self->p_resume_count) <= 0) __pthread_wait_for_restart_signal(self); } --- 1157,1174 ---- void __pthread_restart_old(pthread_descr th) { ! //__pthread_message("status (%d p_resume_count = %ld)\n",thread_self()->p_pid,thread_self()->p_resume_count.p_count); ! if (atomic_increment(&th->p_resume_count) == -1) { ! //__pthread_message("sending restart signal to %d\n",th->p_pid); kill(th->p_pid, __pthread_sig_restart); + } else { + //__pthread_message("NOT sending restart signal to %d (%d p_resume_count = %ld)\n",th->p_pid,th->p_pid,th->p_resume_count.p_count); + } } void __pthread_suspend_old(pthread_descr self) { + //__pthread_message("suspend_old (%d p_resume_count = %ld)\n",self->p_pid,self->p_resume_count.p_count); if (atomic_decrement(&self->p_resume_count) <= 0) __pthread_wait_for_restart_signal(self); } *************** *** 1167,1172 **** --- 1180,1186 ---- int was_signalled = 0; sigjmp_buf jmpbuf; + //__pthread_message("timedsuspend_old (%d p_resume_count = %ld)\n",self->p_pid,self->p_resume_count.p_count); if (atomic_decrement(&self->p_resume_count) == 0) { /* Set up a longjmp handler for the restart signal, unblock the signal and sleep. */ *************** *** 1205,1212 **** --- 1219,1240 ---- was_signalled = 1; } THREAD_SETMEM(self, p_signal_jmp, NULL); + + if (!was_signalled) { + /* woke spontaneously but did not consume restart---caller must resolve */ + //__pthread_message("timedsuspend_old returns 0 (was_signalled = 0, %d p_resume_count = %ld)\n",self->p_pid,self->p_resume_count.p_count); + return 0; + } + /* woken due to restart signal */ + //__pthread_message("timedsuspend_old returns 1 (was_signalled = 1, %d p_resume_count = %ld)\n",self->p_pid,self->p_resume_count.p_count); + return 1; + } else { + /* consumed queued restart signal */ + //__pthread_message("timedsuspend_old returns 1 (was_signalled = 0, %d p_resume_count = %ld)\n",self->p_pid,self->p_resume_count.p_count); + return 1; } + #if 0 /* Now was_signalled is true if we exited the above code due to the delivery of a restart signal. In that case, we know we have been dequeued and resumed and that the *************** *** 1228,1240 **** --- 1256,1272 ---- __pthread_wait_for_restart_signal(self); atomic_decrement(&self->p_resume_count); /* should be zero now! */ /* woke spontaneously and consumed restart signal */ + //__pthread_message("timedsuspend_old returns 1 (was_signalled = 0, %d p_resume_count = %ld)\n",self->p_pid,self->p_resume_count.p_count); return 1; } /* woke spontaneously but did not consume restart---caller must resolve */ + //__pthread_message("timedsuspend_old returns 0 (was_signalled = 0, %d p_resume_count = %ld)\n",self->p_pid,self->p_resume_count.p_count); return 0; } /* woken due to restart signal */ + //__pthread_message("timedsuspend_old returns 1 (was_signalled = 1, %d p_resume_count = %ld)\n",self->p_pid,self->p_resume_count.p_count); return 1; + #endif } #endif /* __ASSUME_REALTIME_SIGNALS */ diff -r -c3 glibc-20021003.bak/linuxthreads/shlib-versions glibc-20021003/linuxthreads/shlib-versions *** glibc-20021003.bak/linuxthreads/shlib-versions Thu Sep 5 12:14:21 2002 --- glibc-20021003/linuxthreads/shlib-versions Sat Oct 5 15:20:35 2002 *************** *** 8,11 **** cris-.*-linux.* libpthread=0 GLIBC_2.2 x86_64-.*-linux.* libpthread=0 GLIBC_2.2.5 powerpc64-.*-linux.* libpthread=0 GLIBC_2.3 ! .*-.*-linux.* libpthread=0 --- 8,12 ---- cris-.*-linux.* libpthread=0 GLIBC_2.2 x86_64-.*-linux.* libpthread=0 GLIBC_2.2.5 powerpc64-.*-linux.* libpthread=0 GLIBC_2.3 ! .*-.*-freebsd.*-gnu.* libpthread=0 GLIBC_2.3 ! .*-.*-.* libpthread=0 Only in glibc-20021003/linuxthreads/sysdeps/unix: bsd Only in glibc-20021003/linuxthreads/sysdeps/unix/sysv/linux: pthreadsig.h diff -r -c3 glibc-20021003.bak/linuxthreads_db/proc_service.h glibc-20021003/linuxthreads_db/proc_service.h *** glibc-20021003.bak/linuxthreads_db/proc_service.h Sat Jul 7 21:21:04 2001 --- glibc-20021003/linuxthreads_db/proc_service.h Sat Oct 5 15:20:35 2002 *************** *** 1,4 **** ! /* Copyright (C) 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or --- 1,4 ---- ! /* Copyright (C) 1999, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or *************** *** 52,60 **** extern ps_err_e ps_lgetregs(struct ps_prochandle *, ! lwpid_t, prgregset_t); extern ps_err_e ps_lsetregs(struct ps_prochandle *, ! lwpid_t, const prgregset_t); extern ps_err_e ps_lgetfpregs(struct ps_prochandle *, lwpid_t, prfpregset_t *); extern ps_err_e ps_lsetfpregs(struct ps_prochandle *, --- 52,60 ---- extern ps_err_e ps_lgetregs(struct ps_prochandle *, ! lwpid_t, prgregset_t *); extern ps_err_e ps_lsetregs(struct ps_prochandle *, ! lwpid_t, const prgregset_t *); extern ps_err_e ps_lgetfpregs(struct ps_prochandle *, lwpid_t, prfpregset_t *); extern ps_err_e ps_lsetfpregs(struct ps_prochandle *, diff -r -c3 glibc-20021003.bak/linuxthreads_db/shlib-versions glibc-20021003/linuxthreads_db/shlib-versions *** glibc-20021003.bak/linuxthreads_db/shlib-versions Fri Oct 8 18:12:44 1999 --- glibc-20021003/linuxthreads_db/shlib-versions Sat Oct 5 15:20:35 2002 *************** *** 1,2 **** # The thread debug library ! .*-.*-linux.* libthread_db=1 --- 1,3 ---- # The thread debug library ! .*-.*-freebsd.*-gnu.* libthread_db=1 GLIBC_2.3 ! .*-.*-.* libthread_db=1 diff -r -c3 glibc-20021003.bak/linuxthreads_db/td_thr_getgregs.c glibc-20021003/linuxthreads_db/td_thr_getgregs.c *** glibc-20021003.bak/linuxthreads_db/td_thr_getgregs.c Tue Jul 16 05:24:27 2002 --- glibc-20021003/linuxthreads_db/td_thr_getgregs.c Sat Oct 5 15:20:35 2002 *************** *** 1,5 **** /* Get a thread's general register set. ! Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1999. --- 1,5 ---- /* Get a thread's general register set. ! Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1999. *************** *** 22,28 **** td_err_e ! td_thr_getgregs (const td_thrhandle_t *th, prgregset_t gregs) { struct _pthread_descr_struct pds; --- 22,28 ---- td_err_e ! td_thr_getgregs (const td_thrhandle_t *th, prgregset_t *gregs) { struct _pthread_descr_struct pds; diff -r -c3 glibc-20021003.bak/linuxthreads_db/td_thr_setgregs.c glibc-20021003/linuxthreads_db/td_thr_setgregs.c *** glibc-20021003.bak/linuxthreads_db/td_thr_setgregs.c Tue Jul 16 21:29:18 2002 --- glibc-20021003/linuxthreads_db/td_thr_setgregs.c Sat Oct 5 15:20:35 2002 *************** *** 22,28 **** td_err_e ! td_thr_setgregs (const td_thrhandle_t *th, prgregset_t gregs) { struct _pthread_descr_struct pds = { .p_terminated = 0, .p_pid = 0 }; --- 22,28 ---- td_err_e ! td_thr_setgregs (const td_thrhandle_t *th, prgregset_t *gregs) { struct _pthread_descr_struct pds = { .p_terminated = 0, .p_pid = 0 }; diff -r -c3 glibc-20021003.bak/linuxthreads_db/thread_db.h glibc-20021003/linuxthreads_db/thread_db.h *** glibc-20021003.bak/linuxthreads_db/thread_db.h Wed Sep 25 01:33:07 2002 --- glibc-20021003/linuxthreads_db/thread_db.h Sat Oct 5 15:20:35 2002 *************** *** 381,387 **** /* Retrieve general register contents of process running thread TH. */ extern td_err_e td_thr_getgregs (const td_thrhandle_t *__th, ! prgregset_t __gregs); /* Retrieve extended register contents of process running thread TH. */ extern td_err_e td_thr_getxregs (const td_thrhandle_t *__th, void *__xregs); --- 381,387 ---- /* Retrieve general register contents of process running thread TH. */ extern td_err_e td_thr_getgregs (const td_thrhandle_t *__th, ! prgregset_t *__gregs); /* Retrieve extended register contents of process running thread TH. */ extern td_err_e td_thr_getxregs (const td_thrhandle_t *__th, void *__xregs); *************** *** 395,401 **** /* Set general register contents of process running thread TH. */ extern td_err_e td_thr_setgregs (const td_thrhandle_t *__th, ! prgregset_t __gregs); /* Set extended register contents of process running thread TH. */ extern td_err_e td_thr_setxregs (const td_thrhandle_t *__th, --- 395,401 ---- /* Set general register contents of process running thread TH. */ extern td_err_e td_thr_setgregs (const td_thrhandle_t *__th, ! prgregset_t *__gregs); /* Set extended register contents of process running thread TH. */ extern td_err_e td_thr_setxregs (const td_thrhandle_t *__th, diff -r -c3 glibc-20021003.bak/login/programs/utmpdump.c glibc-20021003/login/programs/utmpdump.c *** glibc-20021003.bak/login/programs/utmpdump.c Wed Oct 2 22:39:00 2002 --- glibc-20021003/login/programs/utmpdump.c Sat Oct 5 20:22:17 2002 *************** *** 27,32 **** --- 27,33 ---- static void print_entry (struct utmp *up) { + #if _HAVE_UT_TV /* Mixed 32-/64-bit systems may have timeval structs of different sixe but need struct utmp to be the same size. So in 64-bit up->ut_tv may not be a timeval but a struct of __int32_t's. This would cause a compile *************** *** 37,43 **** struct timeval temp_tv; temp_tv.tv_sec = up->ut_tv.tv_sec; temp_tv.tv_usec = up->ut_tv.tv_usec; ! (printf) ( /* The format string. */ #if _HAVE_UT_TYPE --- 38,47 ---- struct timeval temp_tv; temp_tv.tv_sec = up->ut_tv.tv_sec; temp_tv.tv_usec = up->ut_tv.tv_usec; ! #else ! time_t temp_time = up->ut_time; ! #endif ! (printf) ( /* The format string. */ #if _HAVE_UT_TYPE *************** *** 76,82 **** , 4 + ctime (&temp_tv.tv_sec) , temp_tv.tv_usec #else ! , 4 + ctime (&up->ut_time) #endif ); } --- 80,86 ---- , 4 + ctime (&temp_tv.tv_sec) , temp_tv.tv_usec #else ! , 4 + ctime (&temp_time) #endif ); } Only in glibc-20021003/manual: stamp-summary Only in glibc-20021003/manual: texis Only in glibc-20021003.bak/misc/sys: queue.h diff -r -c3 glibc-20021003.bak/shlib-versions glibc-20021003/shlib-versions *** glibc-20021003.bak/shlib-versions Thu Sep 5 11:31:49 2002 --- glibc-20021003/shlib-versions Sat Oct 5 15:20:35 2002 *************** *** 26,31 **** --- 26,32 ---- x86_64-.*-linux.* DEFAULT GLIBC_2.2.5 powerpc64-.*-linux.* DEFAULT GLIBC_2.3 .*-.*-gnu-gnu.* DEFAULT GLIBC_2.2.6 + .*-.*-freebsd.*-gnu.* DEFAULT GLIBC_2.3 # Configuration Library=version Earliest symbol set (optional) # ------------- --------------- ------------------------------ *************** *** 39,44 **** --- 40,46 ---- hppa.*-.*-.* libm=6 GLIBC_2.2 .*-.*-linux.* libm=6 .*-.*-gnu-gnu.* libm=6 + .*-.*-freebsd.*-gnu.* libm=1 # We provide libc.so.6 for Linux kernel versions 2.0 and later. alpha.*-.*-linux.* libc=6.1 *************** *** 49,54 **** --- 51,57 ---- sparc64-.*-linux.* libc=6 GLIBC_2.2 hppa.*-.*-.* libc=6 GLIBC_2.2 .*-.*-linux.* libc=6 + .*-.*-freebsd.*-gnu.* libc=1 # libmachuser.so.1 corresponds to mach/*.defs as of Utah's UK22 release. .*-.*-gnu-gnu.* libmachuser=1 diff -r -c3 glibc-20021003.bak/sysdeps/generic/revoke.c glibc-20021003/sysdeps/generic/revoke.c *** glibc-20021003.bak/sysdeps/generic/revoke.c Sat Jul 7 21:21:21 2001 --- glibc-20021003/sysdeps/generic/revoke.c Sat Oct 5 15:20:35 2002 *************** *** 1,5 **** /* Revoke the access of all descriptors currently open on a file. ! Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or --- 1,5 ---- /* Revoke the access of all descriptors currently open on a file. ! Copyright (C) 1995, 1996, 1997, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or *************** *** 21,31 **** #include int ! revoke (file) const char *file; { __set_errno (ENOSYS); return -1; } stub_warning (revoke) #include --- 21,32 ---- #include int ! __revoke (file) const char *file; { __set_errno (ENOSYS); return -1; } + weak_alias (__revoke, revoke) stub_warning (revoke) #include Only in glibc-20021003/sysdeps/generic/sys: queue.h diff -r -c3 glibc-20021003.bak/sysdeps/gnu/ifaddrs.c glibc-20021003/sysdeps/gnu/ifaddrs.c *** glibc-20021003.bak/sysdeps/gnu/ifaddrs.c Sat Sep 21 02:28:21 2002 --- glibc-20021003/sysdeps/gnu/ifaddrs.c Sun Oct 6 03:10:26 2002 *************** *** 65,71 **** char name[IF_NAMESIZE]; } *storage; struct ifreq *ifr; ! int i; storage = malloc (nifs * sizeof storage[0]); if (storage == NULL) --- 65,71 ---- char name[IF_NAMESIZE]; } *storage; struct ifreq *ifr; ! int i, j; storage = malloc (nifs * sizeof storage[0]); if (storage == NULL) *************** *** 76,84 **** --- 76,87 ---- } i = 0; + j = 0; ifr = ifreqs; do { + struct ifreq *next_ifr = __if_nextreq (ifr); + /* Fill in all pointers to the storage we've already allocated. */ storage[i].ia.ifa_next = &storage[i + 1].ia; storage[i].ia.ifa_addr = &storage[i].addr; *************** *** 95,131 **** if (__ioctl (fd, SIOCGIFFLAGS, ifr) < 0) break; - storage[i].ia.ifa_flags = ifr->ifr_flags; - - ifr->ifr_addr = storage[i].addr; - - if (__ioctl (fd, SIOCGIFNETMASK, ifr) < 0) - break; - storage[i].netmask = ifr->ifr_netmask; ! if (ifr->ifr_flags & IFF_BROADCAST) ! { ! ifr->ifr_addr = storage[i].addr; ! if (__ioctl (fd, SIOCGIFBRDADDR, ifr) < 0) ! break; ! storage[i].broadaddr = ifr->ifr_broadaddr; ! } ! else if (ifr->ifr_flags & IFF_POINTOPOINT) { ifr->ifr_addr = storage[i].addr; ! if (__ioctl (fd, SIOCGIFDSTADDR, ifr) < 0) break; ! storage[i].broadaddr = ifr->ifr_dstaddr; } ! else ! /* Just 'cause. */ ! memset (&storage[i].broadaddr, 0, sizeof storage[i].broadaddr); ! ! storage[i].ia.ifa_data = NULL; /* Nothing here for now. */ ! ! ifr = __if_nextreq (ifr); ! } while (++i < nifs); ! if (i < nifs) /* Broke out early on error. */ { __close (fd); free (storage); --- 98,143 ---- if (__ioctl (fd, SIOCGIFFLAGS, ifr) < 0) break; ! /* Ignore interfaces that are down. */ ! if (ifr->ifr_flags & IFF_UP) { + storage[i].ia.ifa_flags = ifr->ifr_flags; + + /* Retrieve the value for storage[i].ia.ifa_netmask. */ ifr->ifr_addr = storage[i].addr; ! if (__ioctl (fd, SIOCGIFNETMASK, ifr) < 0) break; ! storage[i].netmask = ifr->ifr_netmask; ! ! /* Retrieve the value for storage[i].ia.ifa_broadaddr. */ ! if (ifr->ifr_flags & IFF_BROADCAST) ! { ! ifr->ifr_addr = storage[i].addr; ! if (__ioctl (fd, SIOCGIFBRDADDR, ifr) < 0) ! break; ! storage[i].broadaddr = ifr->ifr_broadaddr; ! } ! else if (ifr->ifr_flags & IFF_POINTOPOINT) ! { ! ifr->ifr_addr = storage[i].addr; ! if (__ioctl (fd, SIOCGIFDSTADDR, ifr) < 0) ! break; ! storage[i].broadaddr = ifr->ifr_dstaddr; ! } ! else ! /* Just 'cause. */ ! memset (&storage[i].broadaddr, 0, sizeof storage[i].broadaddr); ! ! storage[i].ia.ifa_data = NULL; /* Nothing here for now. */ ! ! ++i; } ! ! ++j; ! ifr = next_ifr; ! } while (j < nifs); ! if (j < nifs) /* Broke out early on error. */ { __close (fd); free (storage); *************** *** 133,141 **** return -1; } ! storage[i - 1].ia.ifa_next = NULL; ! ! *ifap = &storage[0].ia; __close (fd); __if_freereq (ifreqs, nifs); --- 145,157 ---- return -1; } ! if (i == 0) ! *ifap = NULL; ! else ! { ! storage[i - 1].ia.ifa_next = NULL; ! *ifap = &storage[0].ia; ! } __close (fd); __if_freereq (ifreqs, nifs); diff -r -c3 glibc-20021003.bak/sysdeps/mach/hurd/revoke.c glibc-20021003/sysdeps/mach/hurd/revoke.c *** glibc-20021003.bak/sysdeps/mach/hurd/revoke.c Sat Jul 7 21:21:25 2001 --- glibc-20021003/sysdeps/mach/hurd/revoke.c Sat Oct 5 15:20:35 2002 *************** *** 1,5 **** /* Revoke the access of all descriptors currently open on a file. Hurd version ! Copyright (C) 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or --- 1,5 ---- /* Revoke the access of all descriptors currently open on a file. Hurd version ! Copyright (C) 1999, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or *************** *** 22,28 **** #include int ! revoke (file_name) const char *file_name; { error_t err; --- 22,28 ---- #include int ! __revoke (file_name) const char *file_name; { error_t err; *************** *** 38,40 **** --- 38,41 ---- return __hurd_fail (err); return 0; } + weak_alias (__revoke, revoke) Only in glibc-20021003/sysdeps/posix: Dist Only in glibc-20021003/sysdeps/posix: show-prof-freq.c Only in glibc-20021003/sysdeps/unix/bsd/bsd4.4: freebsd diff -r -c3 glibc-20021003.bak/sysdeps/unix/bsd/bsd4.4/syscalls.list glibc-20021003/sysdeps/unix/bsd/bsd4.4/syscalls.list *** glibc-20021003.bak/sysdeps/unix/bsd/bsd4.4/syscalls.list Mon Aug 26 23:16:13 2002 --- glibc-20021003/sysdeps/unix/bsd/bsd4.4/syscalls.list Sat Oct 5 15:20:35 2002 *************** *** 2,8 **** chflags - chflags 2 chflags fchflags - fchflags 2 fchflags ! revoke - revoke 1 revoke setlogin - setlogin 2 setlogin sigaltstack - sigaltstack 2 __sigaltstack sigaltstack wait4 - wait4 4 __wait4 wait4 --- 2,8 ---- chflags - chflags 2 chflags fchflags - fchflags 2 fchflags ! revoke - revoke 1 __revoke revoke setlogin - setlogin 2 setlogin sigaltstack - sigaltstack 2 __sigaltstack sigaltstack wait4 - wait4 4 __wait4 wait4 diff -r -c3 glibc-20021003.bak/sysdeps/unix/bsd/unlockpt.c glibc-20021003/sysdeps/unix/bsd/unlockpt.c *** glibc-20021003.bak/sysdeps/unix/bsd/unlockpt.c Sat Jul 7 21:21:30 2001 --- glibc-20021003/sysdeps/unix/bsd/unlockpt.c Sat Oct 5 15:20:35 2002 *************** *** 1,4 **** ! /* Copyright (C) 1998 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Zack Weinberg , 1998. --- 1,4 ---- ! /* Copyright (C) 1998, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Zack Weinberg , 1998. *************** *** 33,37 **** /* BSD doesn't have a lock, but it does have `revoke'. */ if (__ptsname_r (fd, buf, sizeof (buf))) return -1; ! return revoke (buf); } --- 33,37 ---- /* BSD doesn't have a lock, but it does have `revoke'. */ if (__ptsname_r (fd, buf, sizeof (buf))) return -1; ! return __revoke (buf); } diff -r -c3 glibc-20021003.bak/sysdeps/unix/readdir_r.c glibc-20021003/sysdeps/unix/readdir_r.c *** glibc-20021003.bak/sysdeps/unix/readdir_r.c Wed Aug 28 07:52:06 2002 --- glibc-20021003/sysdeps/unix/readdir_r.c Sat Oct 5 22:16:30 2002 *************** *** 113,119 **** while (dp->d_ino == 0); if (dp != NULL) ! *result = memcpy (entry, dp, reclen); else *result = NULL; --- 113,147 ---- while (dp->d_ino == 0); if (dp != NULL) ! { ! /* The required size of *entry, according to POSIX, is ! offsetof (DIRENT_TYPE, d_name[0]) + NAME_MAX + 1. ! We must not write beyond the end of *entry. On some operating ! systems, dp->d_reclen may be larger; in this case, copy only as ! many bytes as needed. Also give an error if d_name is too long. */ ! #ifdef _DIRENT_HAVE_D_RECLEN ! /* DIRENT_TYPE is of variable size, with d_name as its last entry. */ ! size_t namelen; ! # ifdef _DIRENT_HAVE_D_NAMLEN ! namelen = dp->d_namlen; ! # else ! namelen = strlen (dp->d_name); ! # endif ! ! if (namelen <= NAME_MAX) ! *result = memcpy (entry, dp, ! offsetof (DIRENT_TYPE, d_name[0]) + namelen + 1); ! else ! { ! errno = EOVERFLOW; ! dp = NULL; ! *result = NULL; ! } ! #else ! /* DIRENT_TYPE is of fixed size. */ ! *result = memcpy (entry, dp, reclen); ! #endif ! } else *result = NULL; diff -r -c3 glibc-20021003.bak/sysdeps/unix/sysv/aix/revoke.c glibc-20021003/sysdeps/unix/sysv/aix/revoke.c *** glibc-20021003.bak/sysdeps/unix/sysv/aix/revoke.c Sat Jul 7 21:21:31 2001 --- glibc-20021003/sysdeps/unix/sysv/aix/revoke.c Sat Oct 5 15:20:35 2002 *************** *** 1,5 **** /* Revoke the access of all descriptors currently open on a file. AIX version. ! Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or --- 1,5 ---- /* Revoke the access of all descriptors currently open on a file. AIX version. ! Copyright (C) 1995, 1996, 1997, 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or *************** *** 24,30 **** extern int frevoke (int fdes); int ! revoke (file) const char *file; { int fd; --- 24,30 ---- extern int frevoke (int fdes); int ! __revoke (file) const char *file; { int fd; *************** *** 39,41 **** --- 39,42 ---- return res; } + weak_alias (__revoke, revoke) diff -r -c3 glibc-20021003.bak/sysdeps/unix/sysv/linux/alpha/setfpucw.c glibc-20021003/sysdeps/unix/sysv/linux/alpha/setfpucw.c *** glibc-20021003.bak/sysdeps/unix/sysv/linux/alpha/setfpucw.c Sat Jul 7 21:21:33 2001 --- glibc-20021003/sysdeps/unix/sysv/linux/alpha/setfpucw.c Sat Oct 5 15:20:35 2002 *************** *** 70,75 **** --- 70,76 ---- if (!(fpu_control & _FPU_MASK_DM)) fpcw |= IEEE_TRAP_ENABLE_UNF; if (!(fpu_control & _FPU_MASK_ZM)) fpcw |= IEEE_TRAP_ENABLE_DZE; if (!(fpu_control & _FPU_MASK_OM)) fpcw |= IEEE_TRAP_ENABLE_OVF; + if (!(fpu_control & _FPU_MASK_UM)) fpcw |= IEEE_TRAP_ENABLE_DNO; if (!(fpu_control & _FPU_MASK_PM)) fpcw |= IEEE_TRAP_ENABLE_INE; __fpu_control = fpu_control; /* update global copy */