Jason Merrill [Sat, 14 Dec 2002 08:35:49 +0000 (08:35 +0000)]
* Makefile.tpl (check-gcc-c++): Renamed from check-c++. Don't run
library tests.
(check-c++): Just depend on it and check-target-libstdc++-v3.
* Makefile.in: Regenerate.
Throughout, change fhandler_*::read and fhandler_*::raw_read to void functions
whose second arguments are both the lenght and the return value.
* fhandler.cc (fhandler_base::read): Rework slightly to use second argument as
input/output. Tweak CRLF stuff.
(fhandler_base::readv): Accommodate fhandler_*::read changes.
* cygthread.h (cygthread::detach): Declare as taking optional handle argument.
(cygthread::detach): When given a handle argument, wait for the handle to be
signalled before waiting for thread to detach. Return true when signal
detected.
Jeff Johnston [Fri, 13 Dec 2002 00:36:42 +0000 (00:36 +0000)]
2002-12-12 Jeff Johnston <jjohnstn@redhat.com>
* COPYING.NEWLIB: Update list of alternate Regent of California
licenses and discuss official revoking of advertising clause.
* COPYING.LIBGLOSS: Ditto.
Corinna Vinschen [Thu, 12 Dec 2002 10:34:12 +0000 (10:34 +0000)]
* Makefile.common: Define MINGW_LDFLAGS.
* configure.in: Reorder SUBDIRS to have mingw before cygwin.
* configure: Regenerate from configure.in.
* cygwin/Makefile.in: Add MINGW_LDFLAGS when linking cygrun.exe.
* cygthread.h (cygthread::stack_ptr): New element.
(cygthread::detach): Accept a "wait_for_signal" argument.
(cygthread::terminate_thread): New function.
* cygthread.cc (cygthread::stub): Set stack pointer argument.
(cygthread::terminate_thread): New function. Forcibly terminate thread.
(cygthread::detach): Optionally wait for signals and kill thread when signal
arrives.
* exceptions.cc (signal_exit): Set signal_arrived prior to exiting to wake up
anything blocking on signals.
* fhandler.h (fhandler_base::set_r_no_interrupt): Change to accept bool
argument.
(fhandler_pipe::ready_for_read): Declare.
* pipe.cc (pipeargs): New structure.
(read_pipe): New thread stub wrapper for normal pipe read.
(fhandler_pipe::read): Modify to call reader in a cygthread, terminating on
signal, as appropriate.
* select.cc (fhandler_pipe::ready_for_read): Define new function.
Corinna Vinschen [Tue, 10 Dec 2002 12:43:49 +0000 (12:43 +0000)]
2002-12-10 Pierre Humblet <pierre.humblet@ieee.org>
* pwdgrp.h (pwdgrp_check::pwdgrp_state): Replace by
pwdgrp_check::isinitializing ().
(pwdgrp_check::isinitializing): Create.
* passwd.cc (grab_int): Change type to unsigned, use strtoul and
set the pointer content to 0 if the field is invalid.
(parse_pwd): Move validity test after getting pw_gid.
(read_etc_passwd): Replace "passwd_state <= " by
passwd_state::isinitializing ().
(internal_getpwuid): Ditto.
(internal_getpwnam): Ditto.
(getpwent): Ditto.
(getpass): Ditto.
* grp.cc (parse_grp): Use strtoul for gr_gid and verify the validity.
(read_etc_group): Replace "group_state <= " by
group_state::isinitializing ().
(internal_getgrgid): Ditto.
(getgrent32): Ditto.
(internal_getgrent): Ditto.
2002-12-10 Pierre Humblet <pierre.humblet@ieee.org>
* security.h: Move declarations of internal_getgrent,
internal_getpwsid and internal_getgrsid to pwdgrp.h.
* pwdgrp.h: Declare internal_getpwsid, internal_getpwnam,
internal_getpwuid, internal_getgrsid, internal_getgrgid,
internal_getgrnam, internal_getgrent and internal_getgroups.
Delete "emulated" from enum pwdgrp_state.
(pwdgrp_check::isuninitialized): Create.
(pwdgrp_check::pwdgrp_state): Change state to initializing
rather than to uninitialized.
(pwdgrp_read::gets): Remove trailing CRs.
* passwd.cc (grab_string): Don't look for NLs.
(grab_int): Ditto.
(parse_pwd): Don't look for CRs. Return 0 if entry is too short.
(search_for): Delete.
(read_etc_passwd): Simplify tests to actually read the file.
Set state to loaded before making internal_getpwXX calls.
Replace search_for calls by equivalent internal_pwgetXX calls.
(internal_getpwsid): Use passwd_state.isuninitialized to decide
to call read_etc_passwd.
(internal_getpwuid): Create.
(internal_getpwnam): Create.
(getpwuid32): Simply call internal_getpwuid.
(getpwuid_r32): Call internal_getpwuid.
(getpwnam): Simply call internal_getpwnam.
(getpwnam_r): Call internal_getpwnam.
* grp.cc (parse_grp): Don't look for CRs. Adjust blank space.
(add_grp_line): Adjust blank space.
(class group_lock): Ditto.
(read_etc_group): Simplify tests to actually read the file.
Set state to loaded before making internal_getgrXX calls.
Replace getgrXX calls by equivalent internal calls.
(internal_getgrsid): Use group_state.isuninitialized to decide
to call read_etc_group.
(internal_getgrgid): Create.
(internal_getgrnam): Create.
(getgroups32): Simply call internal_getgrgid.
(getgrnam32): Simply call internal_getgrnam.
(internal_getgrent): Call group_state.isuninitialized.
(internal_getgroups): Create from the former getgroups32, using
two of the four arguments. Set gid to myself->gid and username
to cygheap->user.name ().
(getgroups32): Simply call internal_getgroup.
(getgroups): Call internal_getgroup instead of getgroups32.
(setgroups32): Call internal versions of get{pw,gr}XX.
* sec_helper.cc: Include pwdgrp.h.
(is_grp_member): Call internal versions of get{pw,gr}XX.
* security.cc: Include pwdgrp.h.
(alloc_sd): Call internal versions of get{pw,gr}XX.
* syscalls.cc: Include pwdgrp.h.
(seteuid32): Call internal versions of get{pw,gr}XX.
(setegid32): Ditto.
* uinfo.cc: Include pwdgrp.h.
(internal_getlogin): Call internal versions of get{pw,gr}XX.
(cygheap_user::ontherange): Ditto.
* sec_acl.cc: Include pwdgrp.h.
(setacl): Call internal versions of get{pw,gr}XX.
(acl_access): Ditto and simplify logic.
(aclfromtext): Ditto.
Jeff Johnston [Fri, 6 Dec 2002 18:58:51 +0000 (18:58 +0000)]
2002-12-06 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/stdlib.h (strtof): New prototype (from C99).
(strtodf): Changed from prototype to macro which redefines
to strtof.
* libc/stdlib/atof.c: Change documentation to refer to strtof
instead of strtodf.
* libc/stdlib/atoff.c (atoff): Change to call strtof instead of
strtodf.
* libc/stdlib/strtod.c (strtodf): Renamed to strtof.
(strtof): New function.
* libm/test/convert.c (test_strtodf): Renamed to test_strtof which
calls strtof.
* Makefile.tpl: Change dependency for */multilib.out so that
it works when gcc isn't in the tree.
* configure.in: Substitute more.
* configure: Run subconfigures from the Makefile.
* Makefile.tpl: Run subconfigures from the Makefile; add a few
convenience targets. Make sure gcc isn't rebuilt after bootstrap.
* fhandler.h (fhandler_termios::line_edit): Change return from an int to an
enum to allow the function to return an error.
* fhandler_console.cc (fhandler_console::read): Update the line_edit call to
use the new enum.
* fhandler_termios.cc (fhandler_termios::line_edit): Change return from an int
to an enum to allow the function to return an error. Put put_readahead call
before doecho for future patch.
* fhandler_tty.cc (fhandler_pty_master::write): Change to call line_edit one
character at a time, and stop if an error occurs.
* netdb.cc: New file.
* Makeile.in (DLL_OFILES): Add reference to the new netdb.cc file.
* cygwin.din : Add new aliased exports for service and protocol enumerations in
netdb.cc.
* cxx.cc: New file. Implement new, new[], delete and delete[]
operators and __cxa_pure_virtual if compiled by gcc >=3.
* Makefile.in (DLL_OFILES): Add cxx.o.
Remove libstdc++.a from cygwin1.dll link step.
* configure.in: Separate subconfigure options added by this file from
options given by the user. Add machinery to put args for host
subconfigures into the Makefile.
* configure.in: Introduce RAW_CXX_FOR_TARGET and simplify embedded
shell code in CXX_FOR_TARGET
* Makefile.def: Introduce raw_cxx.
* Makefile.tpl: Use raw_cxx to select between CXX_FOR_TARGET and
RAW_CXX_FOR_TARGET.
* Makefile.in: Regenerate.
Nathanael Nerode [Sat, 30 Nov 2002 01:59:39 +0000 (01:59 +0000)]
2002-11-30 Nathanael Nerode <neroden@gcc.gnu.org>
(Continuing slow-motion replay)
* configure: More autoconf-style substitutions.
* Makefile.tpl: More autoconf-style substitutions.
* Makefile.in: Regenerate.
2002-11-30 Nathanael Nerode <neroden@gcc.gnu.org>
(Continuing slow-motion replay)
* configure: Substitute more variables in a more autoconf-friendly
way. Simplify slightly.
* Makefile.tpl: Make more variables substitutable in an
autoconf-friendly way.
* Makefile.in: Regenerate.
Nathanael Nerode [Fri, 29 Nov 2002 21:38:33 +0000 (21:38 +0000)]
2002-11-29 Nathanael Nerode <neroden@gcc.gnu.org>
(Continuing slow-motion replay)
* configure.in (v810*): Remove special setting of tools.
* configure: Add support for extra required flags for ar or nm.
* configure.in (aix4.3+): Use above support for target-specific
issues, rather than using config/mt-aix43.
Nathanael Nerode [Fri, 29 Nov 2002 21:33:11 +0000 (21:33 +0000)]
2002-11-29 Nathanael Nerode <neroden@gcc.gnu.org>
(Starting slow-motion replay merge from gcc 3.4 b-i-b branch)
* configure: Remove 'removing', which doesn't work. Replace $subdir
with . everywhere. Replace $subdirs with ''. Replace $makesrcdir
with $srcdir. Reformat indentation. Substitute some variables
formerly hard-coded in the Makefile for build=host.
* Makefile.tpl: Autogenerate more; make more autoconf-friendly.
* Makefile.def: Autogenerate more.
* Makefile.in: Regenerate.
* pinfo.h (winpids::set): Renamed from init.
(winpids::init): New declaration.
(winpids::cs): Ditto.
(winpids::winpids): Use set rather than init.
* external.cc (fillout_pinfo): Ditto.
* dcrt0.cc (dll_crt0_1): Call winpids::init.
* pinfo.cc (winpids::set): Renamed from init. Wrap calls in critical section.
(winpids::init): New function.
(winpids::cs): Define.
* fhandler_tty.cc (fhandler_pty_master::accept_input): Just use a normal Sleep
or suffer amazing pauses when other tty apps are running.
(fhandler_pty_master::process_slave_output): Ditto.
Corinna Vinschen [Mon, 25 Nov 2002 15:11:39 +0000 (15:11 +0000)]
* passwd.cc (read_etc_passwd): Never add an entry when starting
on Win95/98/ME if a default entry is present.
* uinfo.cc (internal_getlogin): Look for the default uid if needed.
Always call user.set_name ().
Corinna Vinschen [Sun, 24 Nov 2002 18:58:47 +0000 (18:58 +0000)]
2002-11-24 Corinna Vinschen <corinna@vinschen.de>
* sec_acl.cc: Fix some formatting. Only set and check `other' bits in
a_perm throughout. Use ILLEGAL_GID id for all entries having no id.
(setacl): Fix inheritance condition.
(getacl): Set all permission bits in CLASS_OBJ and DEF_CLASS_OBJ
entries. Remove DENY bits before returning to calling function.
(acltomode): Fix usage of searchace(). If available, use CLASS_OBJ
to mask GROUP_OBJ permissions.
(aclfrommode): Fix usage of searchace(). If available, set CLASS_OBJ
permissions to same value as GROUP_OBJ permissions.
2002-11-24 Pierre Humblet <pierre.humblet@ieee.org>
* sec_acl.cc (getace): Fix the behavior when allow and
deny entries are present in arbitrary order.
(getacl): Report the actual number of entries when
aclbufp is NULL, even if nentries is zero. Fix the mask
reporting, handle the case where the owner and group sids
are equal and streamline the code.
(acl_worker): Take allow_ntsec into account.
Robert Collins [Sun, 24 Nov 2002 13:54:14 +0000 (13:54 +0000)]
2002-11-05 Thomas Pfaff <tpfaff@gmx.net>
* dcrt0.cc (dll_crt0_1): Add call to pthread::initMainThread to
initialize mainthread when it is safe to call new.
* init.cc (dll_entry): Change call to store reents in tls key.
* thread.cc (_reent_clib) : Change call to get reents from tls
key.
(_reent_winsup): Ditto.
(MTinterface::Init): Key handling changed. Remove initialization
of member variables.
(MTinterface::fixup_after_fork): Reinitialize mainthread object
after fork. Reset threadount to 1.
(pthread::initMainThread): Create mainthread object dynamically.
and initialize with valid handles.
(pthread::self): Remove calls to create thread objects.
(pthread::setTlsSelfPointer): Change call to store thread self
handle in tls key.
(pthread::getTlsSelfPointer): New static method.
(pthread::exit): Remove setTlsSelfPointer call.
(pthread::initCurrentThread): New method.
(pthread::thread_init_wrapper): Change call to store thread self
handle in tls key.
(pthread::join): Check for a valid joiner.
(pthreadNull::pthreadNull): Mark Null object as detached.
(pthreadNull::exit): Terminate thread via ExitThread.
* thread.h (pthread::initMainThread): Change parameter in function
call.
(pthread::getTlsSelfPointer): New static method.
(pthread::initCurrentThread): New method.
(MTinterface::reent_key): Remove.
(MTinterface::thread_self_dwTlsIndex): Ditto..
(MTinterface::indexallocated): Ditto.
(MTinterface::mainthread): Ditto.
(MTinterface::reent_key): New member.
(MTinterface::thread_self_key): Ditto.
(MTinterface::MTinterface): Initialize all members.
Robert Collins [Sun, 24 Nov 2002 13:41:36 +0000 (13:41 +0000)]
2002-11-25 Robert Collins <rbtcollins@hotmail.com>
* readme: Document running portions of the test suite (Thanks Egor!).
* winsup.api/pthread/mainthreadexits.c: New file, derived from
Thomas Pfaff's test cases.
* winsup.api/pthread/threadidafterfork.c: Ditto.
* exceptions.cc (handle_sigsuspend): Force pending signal delivery before
waiting for signals to happen.
* signal.cc (sleep): Force pending signal delivery before sleeping.
(usleep): Ditto.
(signal): Force pending signal delivery before manipulating signal stuff.
(sigprocmask): Ditto.
(kill_worker): Ditto.
(abort): Ditto.
(sigaction): Ditto.
* syscalls.cc (readv): Force pending signal delivery before I/O.
(writev): Ditto.
(open): Ditto.
* net.cc: Ditto, throughout.
* sigproc.cc (sig_dispatch_pending): Deliver any pending signals prior to
returning.
* tty.cc (tty::make_pipes): Increase pipe buffer size.
Jeff Johnston [Fri, 22 Nov 2002 19:54:22 +0000 (19:54 +0000)]
2002-11-22 Joe Buehler <jbuehler@hekimian.com>
* configure.in: Change check for libc/include in ${CC} to
use an intermediate value so as to work with different shells.
* configure: Regenerated.
* Makefile.in: Ditto.