DJ Delorie [Thu, 17 Apr 2003 21:30:52 +0000 (21:30 +0000)]
* Makefile.tpl (GCC_STRAP_TARGETS): New variable containing all the
previous bootstrap targets, plus bubblestrap, quickstrap, cleanstrap,
and restrap.
* Makefile.in: Regenerate.
* configure.in (arm-*-netbsdelf*): Enable building java libraries.
* configure: Regenerated.
Thomas Pfaff [Thu, 17 Apr 2003 19:57:01 +0000 (19:57 +0000)]
* thread.h (pthread::equal): New static method.
* thread.cc: Rename pthread_equal to pthread::equal throughout.
(pthread_equal): Use pthread::equal to compare threads ids.
* termios.cc (setspeed): New function.
(cfsetospeed): Use setspeed to set speed.
(cfsetispeed): Use setspeed to set speed.
* autoload.cc: Add load statement for UuidCreate, and UuidCreateSequential.
* cpuid.h: New file.
* cygwin.din: Export gethostid.
* fhandler_proc.cc (cpuid): Move to cpuid.h.
(can_set_flag): Move to cpuid.h.
* syscalls.cc (gethostid): New function.
* version.h: Bump DLL minor version number to 83.
Thomas Pfaff [Tue, 15 Apr 2003 20:14:12 +0000 (20:14 +0000)]
Fix a race in pthread_rwlock caused by simultanoues unlock and cancelation.
* thread.h (pthread_rwlock::release): New method.
* thread.cc (pthread_rwlock::unlock): Use release to signal
waiting threads.
(pthread_rwlock::rdlock_cleanup): Signal waiting threads after a
cancelation.
(pthread_rwlock::wrlock_cleanup): Ditto.
* security.cc (get_info_from_sd): New function.
(get_nt_attribute): Only call read_sd and get_info_from_sd.
Return void.
(get_file_attribute): Move sd error handling to get_info_from_sd.
and symlink handling to fhandler_disk_file::fstat_helper.
(get_nt_object_attribute): Only call read_sd and get_info_from_sd.
Return void.
(get_object_attribute): Remove symlink handling and simply return -1
when ntsec is off.
* fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): For
symlinks set the attribute, call get_file_attribute to get the ids
and return. In the normal case call get_file_attribute with the
addresses of the buffer ids and do not recheck if the file is a socket.
* cygthread.cc (cygthread::stub): Initialize stack pointer earlier.
(cygthread::simplestub): Initialize stack pointer.
(cygthread::terminate_thread): Account for possibility that stack pointer has
not been set. Issue warnings for unusual conditions.
* cygthread.h: Change 'avail' cygthread element to 'inuse' throughout.
* cygthread.cc: Ditto.
(cygthread::stub): Don't initialize already initialized events.
(cygthread::freerange): Don't create thread here.
(cygthread::cygthread): Create thread here. Die if thread not created.
(cygthread::operator new): Simplify. Just grab a thread structure from the
pool. Don't try to start the thread.
(cygthread::terminate_thread): Don't close event handles. Just reuse them.
Call MEM_RELEASE rather than MEM_DECOMMIT (from Joe Buehler).
Pierre Humblet [Thu, 10 Apr 2003 01:14:18 +0000 (01:14 +0000)]
2003-04-10 Pierre Humblet <pierre.humblet@ieee.org>
* mkpasswd.c (current_user): print uid and gid as unsigned.
(enum_users): Ditto. Do not free servername.
(usage): Update to allow several domains and improve -p.
(main): On Win9x limit uids to 1000. Only print specials
when -l is specified. Add a loop to allow several domains
and free servername in the loop.
* mkgroup.c (enum_groups): Do not free servername.
(usage): Update to allow several domains. Change uid to gid.
(main): Only print specials when -l is specified. Add a
loop to allow several domains and free servername in the loop.
* fhandler_console.cc (fhandler_console::read) Handle certain key up events, to
allow pasting accented characters and typing them using the "alt + numerics"
sequences.
* include/limits.h (IOV_MAX): Set to a number which is small enough to use in
an array.
* cygthread.h (cygthread::avail): Make LONG for easier use with Interlocked*
functions.
* cygthread.cc (cygthread::init): Eliminate unneeded muto.
(cygthread::operator new): Don't lock. Instead change use of avail variable
into tri-state: available (1), not available (-1), uninitialized (0).
(cygthread::terminate_thread): Set avail to uninitialized.
(cygthread::detach): Eliminate local 'avail'. Always set avail to 1 unless
signalled.
* cygthread.cc (cygthread::operator new): Be more defensive when messing with
* external.cc (check_ntsec): New function.
(cygwin_internal): Add CW_CHECK_NTSEC handling to call check_ntsec()
from applications.
* include/cygwin/version.h: Bump API minor number.
* include/sys/cygwin.h (cygwin_getinfo_types): Add CW_CHECK_NTSEC.
* fhandler.cc (fhandler_base::fstat): Set the uid and gid fields
from the current effective ids.
* fhandler_socket.cc (fhandler_socket::fstat): Keep the uid and gid set
by fhandler_base::fstat.
* security.cc (get_nt_attribute): Do not test wincap.has_security ().
(get_nt_object_attribute): Ditto.
(get_file_attribute): Add test for wincap.has_security ().
(get_object_attribute): Ditto.
* libc/stdio/sscanf.c: Update flags description.
* libc/stdio/vfscanf.c: Add CHAR flag value to denote 8 bit target
type.
(__svfscanf_r): Add 'hh' and 'll' handling.
Corinna Vinschen [Sat, 29 Mar 2003 12:44:01 +0000 (12:44 +0000)]
* syscalls.cc: Slightly cleanup all utmp functions.
(login): Use mutex to secure against concurrent access to wtmp file.
(logout): Rewrite using POSIX calls.
(utmp_fd): Initialized to -1 now. Any value < 0 is treated as closed
in subsequent functions.
(utmp_readonly): New variable, indicating utmp file open for reading
only.
(internal_setutent): New function implementing setutent().
(setutent): Call internal_setutent now.
(endutent): Reset utmp_readonly.
(getutent): Return immediately if utmp file can't be opened.
(getutid): Ditto.
(getutline): Ditto.
(pututline): Ditto. Use mutex to secure against concurrent access to
utmp file.
Thomas Pfaff [Thu, 27 Mar 2003 19:52:20 +0000 (19:52 +0000)]
* thread.h: Change class names, methods, members and local vars
according to the GNU coding style.
* thread.cc: Ditto.
* dcrt0.cc (dll_crt0_1): Rename pthread::initMainThread call to
pthread::init_mainthread.
* pthread.cc (pthead_getsequence_np): Rename pthread::isGoodObject
call to pthread::is_good_object.
Joe Buehler <jhpb@draco.hekimian.com>
* fork.cc (fork_parent): Don't copy signals from parent to child here.
* sigproc.cc (proc_subproc): Copy signals from parent to child pinfo here.
Thomas Pfaff [Sun, 23 Mar 2003 10:52:02 +0000 (10:52 +0000)]
* thread.h (class List): Move inline code inside class
declaration.
(List::forEach): Change callback parameter to template class
member functionpointer.
(pthread_keys::fixup_before_fork): Change to inline. Use
List::forEach to fixup keys.
(pthread_keys::fixup_after_fork): Ditto.
(pthread_keys::runAllDestructors): Ditto.
(pthread_key::saveAKey): Remove.
(pthread_key::restoreAKey): Ditto.
(pthread_key::destroyAKey): Ditto.
(pthread_key::run_destructor): Rename to runDestructor.
(pthread_mutex::fixup_after_fork): Change to inline. Use
List::forEach to fixup mutexes after a fork.
(pthread_mutex::FixupAfterFork): New method.
(pthread_mutex::mutexes): New member.
(pthread_cond::fixup_after_fork): Change to inline. Use
List::forEach to fixup conds after a fork.
(pthread_cond::FixupAfterFork): New method.
(pthread_cond::conds): New member.
(pthread_rwlock::fixup_after_fork): Change to inline. Use
List::forEach to fixup rwlocks after a fork.
(pthread_rwlock::FixupAfterFork): New method.
(pthread_rwlock::rwlocks): New member.
(semaphore::fixup_after_fork): Change to inline. Use
List::forEach to fixup mutexes after a fork.
(semaphore::FixupAfterFork): New method.
(semaphore::semaphores): New member.
(MTinterface::mutexs): Remove.
(MTinterface::conds): Ditto.
(MTinterface::rwlocks): Ditto.
(MTinterface::semaphores): Ditto.
(pthread_equal): Add extern "C".
(pthread_mutex_lock): Ditto.
* thread.cc (MTinterface::fixup_after_fork): Change
fixup_after_fork calls for pthread objects.
(semaphore::conds): Instantiate.
(pthread_cond::pthread_cond): Use List::Insert rather than
custom list code.
(pthread_cond::~pthread_cond): Use List::Remove rather than
custom list code.
(pthread_cond::fixup_after_fork): Rename to FixupAfterFork.
(pthread_rwlock::rwlocks): Instantiate.
(pthread_rwlock::pthread_crwlock): Use List::Insert rather than
custom list code.
(pthread_rwlock::~pthread_rwlock): Use List::Remove rather than
custom list code.
(pthread_rwlock::fixup_after_fork): Rename to FixupAfterFork.
(pthread_key::saveAKey): Remove.
(pthread_key::fixup_before_fork): Ditto.
(pthread_key::restoreAKey): Ditto.
(pthread_key::fixup_after_fork): Ditto.
(pthread_key::destroyAKey): Ditto.
(pthread_key::runAllDestructors): Ditto.
(pthread_key::run_destructor): Rename to runDestructor.
(pthread_mutex::mutexes): Instantiate.
(pthread_mutex::pthread_mutex): Use List::Insert rather than
custom list code.
(pthread_mutex::~pthread_mutex): Use List::Remove rather than
custom list code.
(pthread_mutex::fixup_after_fork): Rename to FixupAfterFork.
(semaphore::conds): Instantiate.
(semaphore::semaphore): Use List::Insert rather than custom list
code.
(semaphores::~semaphore): Use List::Remove rather than custom
list code.
(semaphore::fixup_after_fork): Rename to FixupAfterFork.
Jeff Johnston [Thu, 20 Mar 2003 17:23:57 +0000 (17:23 +0000)]
2003-03-20 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdio/vfscanf.c (__svfscanf_r): For floating point conversion,
count all characters used to create number against maximum width.
* libc/machine/powerpc/vfscanf.c (__svfscanf_r): Ditto.