* dtable.cc (dtable::build_fhandler): Accept an optional path_conv argument.
If available, use this to calculate path name and device number.
* dtable.h (dtable): Reflect above change.
* fhandler.h (fhandler_base): Declare virtual method which accepts path_conv
rather than path string as first argument.
* fhandler.cc (fhandler_base::open): Define above new method.
* syscalls.cc (_open): Set aside a path_conv variable for use in build_fhandler
and subsequent call to open.
* exceptions.cc (setup_handler): Always relinquish lock after we've
interrupted.
* fhandler.cc: Move pipe methods to pipe.cc.
* fhandler.h (fhandler_pipe): Add new methods.
* fork.cc (sync_with_parent): Make error messages more informative.
* pipe.cc (fhandler_pipe::fhandler_pipe): Move here from fhandler.cc.
(fhandler_pipe::lseek): Ditto.
(fhandler_pipe::set_close_on_exec): New method.
(fhandler_pipe::read): Ditto.
(fhandler_pipe::close): Ditto.
(fhandler_pipe::dup): Ditto.
(make_pipe): Create the guard mutex on the read side of the pipe.
* select.cc (peek_pipe): Use guard_mutex to discover if we have the right to
read on this pipe.
(fhandler_pipe::readh_for_read): Pass the read pipe guard mutex to peek_pipe.
* syscalls.cc (_read): Always detect signal catchers, for now.
* debug.cc (makethread): Eliminate hack to make thread inheritable.
* sigproc.cc (subproc_init): Don't use hack to make thread inheritable.
* Makefile.in (AS_FOR_TARGET, LD_FOR_TARGET,
DLLTOOL_FOR_TARGET, WINDRES_FOR_TARGET, AR_FOR_TARGET,
RANLIB_FOR_TARGET, NM_FOR_TARGET): Don't use double quotes to
avoid quotes nesting problems.
(NATIVE_CHECK_MODULES): Ditto, just for consistency.
(DO_X): Export only variables that are set.
* fhandler.cc (fhandler_base::set_inheritance): Just use DUPLICATE_CLOSE_SOURCE
to change inheritance. Eliminate all other logic dealing with closed handles.
* fhandler.h (fhandler_base::set_inheritance): Reflect above change.
* fhandler_tty.cc (fhandler_tty_common::set_close_on_exec): Ditto.
* libltp/lib/get_high_address.c (get_high_address): Get inaccessible
address more robustly.
* winsup.api/ltp/stat06.c (high_address_setup): Use generic function
from ltp library to obtain inaccessible address.
* fhandler.h (fhandler_socket::fixup_after_exec): Remove inline
implementation.
(fhandler_dev_raw::fixup_after_exec): Ditto.
* fhandler_raw.cc (fhandler_dev_raw::fixup_after_fork): Don't
duplicate buffer on fork to avoid memory leak.
(fhandler_dev_raw::fixup_after_exec): New implementation equal to
former fixup_after_fork() implementation.
* fhandler_socket.cc (fhandler_socket::fixup_after_fork): Do
nothing when not using Winsock2.
(fhandler_socket::fixup_after_exec): New implementation.
(fhandler_socket::set_close_on_exec): Never call set_inheritance().
* fhandler.cc (fhandler_base::set_inheritance): If available,
use SetHandleInformation() to set inheritance.
* wincap.cc: Set flag has_set_handle_information_on_console_handles
appropriately.
* wincap.h: Add flag has_set_handle_information_on_console_handles.
2001-09-18 Danny Smith <dannysmith@users.sourceforge.net>
* include/winnt.h (_[U]LARGE_INTEGER): Mark nameless structure
field as _ANONYMOUS_STRUCT.
* include/setupapi.h (SP_DEVINSTALL_PARAMS): Add missing typedef
for UNICODE.
* include/ipexport.h (icmp_echo_reply): Remove extra ';'.
* lib/makefile.in: Add -pedantic switch to TEST_OPTIONS for header
test.
2001-09-17 Mattia Barbon <mbarbon@dsi.unive.it>
* include/commctrl.h: Add some ListView constants.
2001-09-17 Earnie Boyd <earnie@sf.net>
* lib/Makefile.in (inst_includedir): Add FIXME and remove the usr/
portion of the directory from the install.
(inst_libdir): Ditto.
* Makefile.in (VERSION): Increment.
* include/w32api.h: Increment version.
Ben Elliston [Wed, 19 Sep 2001 06:07:36 +0000 (06:07 +0000)]
2001-09-19 Ben Elliston <bje@redhat.com>
* configure.in (sparc-sun-solaris2*): Don't use /usr/bin/which on
Solaris when testing for the /usr/ucb/cc compiler; it has incorrect
semantics. Use the shell built-in "type" command instead.
Alan Modra [Tue, 18 Sep 2001 10:01:08 +0000 (10:01 +0000)]
* external.h (GET_LINENO_LNNO): Use H_GET_32/16.
(PUT_LINENO_LNNO): Use H_PUT_32/16.
* m88k.h (GET_LNSZ_SIZE, GET_LNSZ_LNNO, GET_SCN_NRELOC,
GET_SCN_NLINNO): Use H_GET_32.
(PUT_LNSZ_LNNO, PUT_LNSZ_SIZE, PUT_SCN_NRELOC, PUT_SCN_NLINNO):
Use H_PUT_32.
* ti.h: Formatting fixes. Make use of H_GET_* and H_PUT_* throughout.
* xcoff.h: White space changes.
* lib/Makefile.in (inst_includedir): Add FIXME and remove the usr/
portion of the directory from the install.
(inst_libdir): Ditto.
* Makefile.in (VERSION): Increment.
* include/w32api.h: Increment version.
* winsup.api/ltp/sbrk01.c (main): Force output at startup to
make sure that stdio file buffer get allocated.
* winsup.api/ltp/stat06.c (high_address_setup): On cygwin, area
after sbrk(0) may be available, use 0xffff0000 as "high address".
* winsup.api/ltp/symlink01.c: Perform all tests. Mark those tests that
don't work on cygwin with '-1'. Close open files so that temporary
directory can be deleted on exit.
* winsup.api/ltp/vfork01.c: New test.
* Makefile.in: Generate libcygwin.a during the link pass rather than as a
separate dlltool step.
* dcrt0.cc (_dll_crt0): pppid_handle could be NULL. Don't close it if so.
* dcrt0.cc (dll_crt0_1): Create vfork main storage here so that it can be
queried in waitsig later.
* sigproc.cc (wait_sig): Don't deliver a signal if in a vfork.
* fork.cc (vfork): Deliver all signals on parent return from vfork.
* fhandler.h (fhandler_pipe::is_slow): Return true only if pipes are reliable
(i.e., not Win9x).
* wincap.cc: Make statics NO_COPY to avoid fork overhead.
* grp.cc (read_etc_group): Just reuse group_buf storage for subsequent reread
of /etc/group.
* passwd.cc (read_etc_passwd): Just reuse passwd_buf storage for subsequent
reread of /etc/passwd.
* cygheap.cc (dup_now): New function.
(cygheap_setup_for_child): Accept new argument controlling whether to delay
copying of cygheap to shared memory region.
(cygheap_setup_for_child_cleanup): Accept new arguments controlling whether to
copy cygheap at this point.
* cygheap.h: Reflect above changes.
* fork.cc (fork_parent): Break copying of cygheap into two parts when
fork_fixup is required so that the child can see the parent's changes.
(vfork): Do stack cleanup prior to forcing a fork error.
* spawn.cc (spawn_guts): Ditto.
Jeff Johnston [Thu, 13 Sep 2001 21:12:33 +0000 (21:12 +0000)]
2001-09-13 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdlib/Makefile.am: Add support to build strtoll_r.c
and strtoull_r.c.
* libc/stdlib/Makefile.in: Regenerated.
* libc/stdlib/strtoll_r.c: New file.
* libc/stdlib/strtoull_r.c: New file.
* libc/stdio/local.h: Add prototypes for long long string
conversion routines.
* libc/stdio/vfscanf.c (__svfscanf_r): Add optional long long support
tied to %L integer conversion specifier.
* winsup.api/winsup.exp: Run only selected test if environment
variable CYGWIN_TESTSUITE_TESTS is set. Use its value as regular
expression to filter test names.
* winsup.api/ltp/symlink01.c (creat_path_max): Provide explicit
buffer to getcwd to conform to standards and avoid memory leak.
(do_chdir): Ditto.
* lib/Makefile.in (config_prefix): New variable.
(inst_includedir): Manipulate special value only if target == cygwin
and build == target and prefix != config_prefix.
(inst_libdir): Ditto.
* common.h (EM_AVR_OLD): Renamed from...
(EM_AVR): this, redefined as in the current ELF standard.
(EM_PJ_OLD): Renamed from...
(EM_PJ): this, redefined as in the current ELF standard.
(EM_R30, EM_D10V, EM_D30V, EM_V850, EM_M32R, EM_MN10300,
EM_MN10200, EM_OPENRISC, EM_ARC_A5, EM_XTENSA): Defined as in
the current ELF standard.
(EM_CYGNUS_ARC): Removed, unused for a long time.
2001-09-11 Danny Smith <dannysmith@users.sourceforge.net>
* include/winnt.h (_[U]LARGE_INTEGER): Protect nameless struct with
!defined(NONAMELESSUNION), rather than defined(_ANONYMOUS_STRUCT).
(_REPARSE_DATA_BUFFER): Name union field DUMMYUNIONNAME.
* exceptions.cc (call_signal_handler_now): Add additional guard against
inappropriately calling signal handler.
* syscalls.cc (_read): Reset errno if not exiting due to signal.
Robert Collins [Wed, 12 Sep 2001 03:18:05 +0000 (03:18 +0000)]
Wed Sep 12 13:03:00 2001 Robert Collins <rbtcollins@hotmail.com>
* autoload.cc (LoadDLLfuncEx): Auto load TryEnterCriticalSection - its a
n NT only call.
* thread.cc (pthread_cond::TimedWait): Use critical sections for NT.
(pthread_cond::fixup_after_fork): Don't detect bad apps.
(pthread_mutex::pthread_mutex): Use critical sections for NT.
(pthread_mutex::~pthread_mutex): Ditto.
(pthread_mutex::Lock): Ditto.
(pthread_mutex::TryLock): Ditto.
(pthread_mutex::UnLock): Ditto.
(pthread_mutex::fixup_after_fork): Ditto. Also do not detect bad apps.
(__pthread_mutex_trylock): Move WIN32 specific test into the class metho
d.
(__pthread_mutex_destroy): Prevent dereferencing passed pointer without
valid address.
* thread.h (pthread_mutex): Use critical sections for NT.
* sigproc.h (sigframe::unregister): Return true/false whether this frame is
capable of responding to signals.
* exceptions.cc (sigframe::call_signal_handler): Don't call signal handler if
it is not armed for this thread.
Robert Collins [Tue, 11 Sep 2001 08:15:39 +0000 (08:15 +0000)]
Tue Sep 11 18:15:00 2001 Robert Collins <rbtcollins@hotmail.com>
* dcrt0.cc (cygwin_finished_initializing): Copy _mtinterf on fork;
* fork.cc (fork_child): fixup thread-related structures after fork;
* thread.cc (MTinterface::Init): Initialise the new mutex, condition and semaphore lists.
(MTinterface::fixup_after_fork): Iterate through each list and fixup the objects.
(pthread_cond::pthread_cond): Add this to the condition list.
(pthread_cond::~pthread_cond): Remove this from the condition list.
(pthread_cond::fixup_after_fork): Recreate as best we can the pre-fork state.
(pthread_mutex::pthread_mutex): Add this to the mutex list.
(pthread_mutex::~pthread_mutex): Remove this from the mutex list.
(pthread_mutex::fixup_after_fork): Recreate as best we can the pre-fork state.
(semaphore::semaphore): Store the initial value, and add this to the semaphore list.
(semaphore::~semaphore): Remove this from the semaphore list.
(semaphore::Post): Increment the current semaphore value.
(semaphore::TryWait): Decrement the current semaphore value.
(semaphore::Wait): Ditto.
(semaphote::fixup_after_fork): Recreate the pre-fork state as best we can.
* thread.h (pthread_mutex): New members to allow fixup_after_fork.
(pthread_cond): Ditto.
(semaphore): Ditto.
(MTinterface): New list heads for tracking conds and semaphores.
Jim Blandy [Mon, 10 Sep 2001 23:47:42 +0000 (23:47 +0000)]
Add support for GDB monitor-style I/O.
* m68k/idp-outbyte.c (raw_outbyte): Renamed from outbyte; made
static.
(outbyte): Call raw_outbyte; if GDB_MONITOR_OUTPUT is #defined,
precede the byte with a ^O character.
* m68k/idpgdb.ld: New linker script.
* m68k/Makefile.in (IDPGDB_LDFLAGS, IDPGDB_BSP, IDPGDB_OBJS): New
variables.
(all): Add ${IDPGDB_BSP} to the list of things to build.
(${IDPGDB_BSP}, idp-gdb-outbyte.o, idpgdb-test.x,
idpgdb-test.srec, idpgdb-test.dis, idpgdb-test): New rules.
(install): Install the IDPGDB stuff, too.