Stephane Carrez [Tue, 13 Aug 2002 13:02:25 +0000 (13:02 +0000)]
* m68hc11.h (E_M68HC12_BANKS, E_M68HC11_I32, E_M68HC11_F64,
EF_M68HC11_ABI): Define for ABI specification.
(STO_M68HC12_FAR, STO_M68HC12_INTERRUPT): Symbol flags for
linker and debugger.
(R_M68HC11_24, R_M68HC11_LO16, R_M68HC11_PAGE): New relocs.
(R_M68HC11_RL_JUMP, R_M68HC11_RL_GROUP): New reloc for linker
relaxation.
Jeff Johnston [Tue, 13 Aug 2002 00:11:51 +0000 (00:11 +0000)]
2002-08-12 Jeff Johnston <jjohnstn@redhat.com>
* libc/sys/linux/machine/i386/crt0.c (__bss_start,_end):
Declare as extern chars and use the address operator to
properly use values set in linker script.
* assert.cc (__assert): Call debugger on assertion failure if debugging.
* dcrt0.cc (dll_crt0_1): Just wait for signal thread to go live rather than
going through the overhead of invoking it.
* fork.cc (fork_child): Ditto.
* exceptions.cc (signal_fixup_after_fork): Call sigproc_init here.
* sigproc.cc (proc_can_be_signalled): Assume that the signal thread is live.
(sig_dispatch): Ditto.
(sig_send): Ditto.
(wait_for_sigthread): Renamed from "wait_for_me". Assume that wait_sig_inited
has been set and that this function is only called from the main thread.
* winsup.h (wait_for_sigthread): Declare new function.
Jeff Johnston [Fri, 9 Aug 2002 21:33:29 +0000 (21:33 +0000)]
2002-08-09 Jason Tishler <jason@tishler.net>
* libc/stdlib/mallocr.c: Include <limits.h>.
(request2size): Change macro to do
unsigned long comparisons and avoid signed overflow.
(mALLOc): Add overflow check for the number of bytes to allocate.
(rEALLOc): Ditto.
Jeff Johnston [Fri, 9 Aug 2002 21:12:09 +0000 (21:12 +0000)]
2002-08-09 Jeff Johnston <jjohnstn@redhat.com>
* configure.host: Add check for --enable-newlib-io-pos-args
and define WANT_IO_POS_ARGS flag if enabled. Define
the flag by default for x86-linux configurations.
* configure.in: Add support for --enable-newlib-io-pos-args.
* libc/configure.in: Ditto.
* configure: Regenerated.
* libc/configure: Ditto.
* libc/stdio/Makefile.am: Specify -fshort-enums for compiling
vfprintf.c and vfiprintf.c.
* libc/stdio/Makefile.in: Regenerated.
* libc/stdio/vfprintf.c: Add positional argument support that
is enabled by compiling with -DWANT_IO_POS_ARGS.
* libc/include/machine/setjmp.h: For mips, define _JBLEN based
based on __mips_soft_float rather than __mips64.
* libc/machine/mips/setjmp.S: Provide hard and soft float versions
of both 32-bit and 64-bit code.
Conrad Scott <conrad.scott@dsl.pipex.com
* cygheap.cc (_csbrk): Allocate some slop initially. Don't erroneously add
sbrk amount to returned value in initial case.
* cygthread.cc (cygthread::stub): Accept flag to pass info structure to thread
function.
(cygthread::operator new): Add defense debugging output.
(cygthread::cygthread): Add debugging output. Set name after thread has been
awakened to avoid a race.
(cygthread::exit_thread): Use handle operator rather than using ev directly.
(cygthread::exit_thread): Reorganize to provide debugging. Set __name to NULL.
* cygthread.h (cygself): Define.
* fhandler_tty.cc (fhandler_tty_master::init): Use cygself as argument so that
invoked thread can access its own info.
(process_output): Derive cygthread info of thread from thread argument.
* sigproc.cc (sigproc_init): Use cygself as argument so that invoked thread can
access its own info.
(wait_sig): Derive cygthread info of thread from thread argument.
* cygthread.cc (cygthread::stub): Change event creation to manual reset. Set
__name after calling SetEvent to prevent races.
(cygthread::detach): Always reset event here to prevent races.
* mkgroup.c (main): Don't print an entry for "Everyone".
* mkpasswd.c (print_special): Set pw_gid to 544 for SYSTEM user.
(main): Don't print an entry for "Everyone".
* security.cc (verify_token): Do not reject a token just because
the supplementary group list is missing Everyone or a groupsid
equal to usersid, or because the primary group is not in the token,
as long as it is equal to the usersid.
* syscalls.cc (seteuid32): Use common code for all successful returns.
* grp.cc (getgroups32): Never includes Everyone in the output.
* cygthread.cc (cygthread::exit_thread): Define new method.
* cygthread.h (cygthread::exit_thread): Declare new method.
* fhandler.h (fhandler_tty_master::hThread): Delete.
(fhandler_tty_master::output_thread): Define.
* fhandler_tty.cc (fhandler_tty_master::fhandler_tty_master): Adjust
constructor.
(fhandler_tty_master::init): Use cygthread rather than handle.
(process_output): Use cygthread method to exit.
(fhandler_tty_master::fixup_after_fork): Set output_thread to NULL after fork.
(fhandler_tty_master::fixup_after_exec): Set output_thread to NULL after
spawn/exec.
* tty.cc (tty_list::terminate): Detach from output_thread using cygthread
method.
DJ Delorie [Tue, 30 Jul 2002 23:15:26 +0000 (23:15 +0000)]
* configure.in: Move generic linux case to end. Copy generic
linux noconfigdirs to mips*-*-linux* entry and new
powerpc64*-*-linux* entry. Add target-libffi for the latter.
* fhandler_disk_file.cc (fhandler_cygdrive::set_drives): Incorporate . and ..
processing here.
(fhandler_cygdrive::readdir): Assume . and .. are already in pdrive.
(fhandler_cygdrive::seekdir): Ditto.
* dcrt0.cc (dll_crt0_1): Move debug_fixup_after_fork_exec.
* cygheap.cc (cygheap_fixup_in_child): Call debug_fixup_after_fork_exec
immediately after cygheap has ben set up.
* security.cc: Change some formatting.
* include/cygwin/version.h: Bump API minor version.
* cygheap.h (class cygheap_user): Add member groups.
* security.h (class cygsidlist): Add members type and maxcount,
methods position, addfromgr, alloc_sids and free_sids and
operator+= (const PSID psid). Modify contains () to call
position () and optimize add () to use maxcount.
(class user_groups): Create.
Update declarations of verify_token and create_token.
* security.cc (cygsidlist::alloc_sids): New.
(cygsidlist::free_sids): New.
(get_token_group_sidlist): Create from get_group_sidlist.
(get_initgroups_sidlist): Create from get_group_sidlist.
(get_group_sidlist): Suppress.
(get_setgroups_sidlist): Create.
(verify_token): Modify arguments. Add setgroups case.
(create_token): Modify arguments. Call get_initgroups_sidlist and
get_setgroups_sidlist as needed. Set SE_GROUP_LOGON_ID from auth_pos
outside of the loop. Rename the various group sid lists consistently.
* syscalls.cc (seteuid32): Modify to use cygheap->user.groups.
(setegid32): Call cygheap->user.groups.update_pgrp.
* grp.cc (setgroups): Create.
(setgroups32): Create.
* uinfo.cc (internal_getlogin): Initialize and update user.groups.pgsid.
* cygwin.din: Add setgroups and setgroups32.
* fhandler_console.cc (fhandler_console::read): Use appropriate kill_pgrp
method.
* select.cc (peek_console): Ditto.
* fhandler_termios.cc (fhandler_termios::bg_check): Send "stopped" signal to
entire process group as dictated by SUSv3.
* termios.cc (tcsetattr): Detect when stopped signal sent and force a stop
before setting anything.
* fhandler_registry.cc (fhandler_registry::close): Return any error result to
the caller.
* syscalls.cc (_close): Return result of fhandler::close to the caller.
Jeff Johnston [Wed, 24 Jul 2002 18:18:07 +0000 (18:18 +0000)]
2002-07-24 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/signal.h (SIG_IGN, SIG_DFL, SIG_ERR): Change
to use _sig_func_ptr type casted constants.
(_sig_func_ptr): Typedef moved to sys/signal.h.
* libc/include/sys/signal.h (_sig_func_ptr): Typedef added.
For __rtems, use POSIX definition, otherwise default to ANSI.
* libc/sys/linux/sys/signal.h (_sig_func_ptr): Typedef added.