Commit Graph

8317 Commits

Author SHA1 Message Date
Christopher Faylor d58ca0b320 * fhandler_console.cc (beep): Use MB_OK which is documented as using the
default bell rather than -1 which seems to behave differently on different
versions of Windows.
2006-01-04 04:47:19 +00:00
Christopher Faylor 4c15746236 * fhandler_process.cc (fhandler_process::readdir): Add missing argument to
syscall_printf.
* fhandler_console.cc (fhandler_console::need_invisible): Use made-up name for
windows station rather than asking Windows to create one for us.
* spawn.cc (spawn_guts): Don't mess with console if we're detaching.
2006-01-04 03:43:55 +00:00
Christopher Faylor a4b5f2b383 * include/winuser.h (CreateWindowStation): Correctly identify first argument as
constant.
(CreateWindowStation@): Ditto.
2006-01-04 03:42:18 +00:00
Christopher Faylor adcff8d159 * dir.cc (readdir_worker): Minor code cleanup.
* fhandler_console.cc (beep): Use a more Windows-generic wav file if the beep
is missing.  Use a more foolproof way to find out whether we should be
recreating the missing key.
* registry.h (reg_key::_disposition): New field.
(reg_key::created): New function.
* registry.cc (reg_key::reg_key): Set _disposition to zero by default.
(reg_key::build_key): Fill in _disposition field.
2006-01-03 17:44:26 +00:00
Christopher Faylor 825d0b9385 * dir.cc (readdir_worker): Ensure that saw_dot flags are updated when not
handling inodes.
2006-01-03 15:42:56 +00:00
Dimitri Papadopoulos 5d09b46dc3 * include/uxtheme.h [_WIN32_WINNT >= 0x0501]
(TMT_*, BT_*): Add constants.
2006-01-03 09:04:07 +00:00
Christopher Faylor e76625eadb * fhandler_console.cc (beep): New function. Restores missing "Default Beep",
if necessary.
(fhandler_console::write_normal): Use beep().
2006-01-03 01:15:29 +00:00
Paolo Bonzini 1529831639 2006-02-01 Paolo Bonzini <bonzini@gnu.org>
PR target/25259
        * stdint.m4: New.
2006-01-02 18:55:51 +00:00
Christopher Faylor 29b35f7a84 * dcrt0.cc (_dll_crt0): Move more leftover debugging stuff.
(cygwin_dll_init): Remove unneeded initializations.  Call _dll_crt0 rather than
dll_crt0_1.
* dcrt0.cc (_dll_crt0): Move more leftover debugging stuff.
(cygwin_dll_init): Remove unneeded initializations.  Call _dll_crt0 rather than
dll_crt0_1.
2006-01-02 15:48:29 +00:00
Corinna Vinschen 8584a9df5f * syslog.cc: Include sys/un.h instead of sys/socket.h.
(syslogd_inited): Convert to enum type noting the exact result of
	trying to connect to syslog daemon.  Use this way throughout.
	(connect_syslogd): New static function taking over the task to
	connect to syslog socket.  Use correct struct sockaddr_un instead of
	struct sockaddr.
	(try_connect_syslogd): Call connect_syslogd.  If write fails on
	connection oriented socket, try to reconnect to syslog socket and
	try to write again.
2006-01-02 13:05:57 +00:00
Corinna Vinschen d05c10aecd Bump copyright dates. 2006-01-02 13:01:42 +00:00
Christopher Faylor 7f9832e774 * cygload/README: Delete.
* cygload/cygload.cc: Move to winsup.api.  Add comments from README.
* cygload/cygload.h: Move to winsup.api.
* cygload/cygload.exp: Move to winsup.api.
* Makefile.in: Remove cygload.
* winsup.api/winsup.exp: If a .exp file is detected, run it rather than using
standard compile.
* winsup.api/resethand.c (main): Use printf to print status or expect thinks
something is wrong.
2006-01-02 06:15:58 +00:00
Christopher Faylor b0b9ccf618 * winsup.api/resethand.c (main): Remove core dump flag from exit status. 2006-01-02 04:01:22 +00:00
Christopher Faylor 590129475b * winsup.api/resethand.c (main): Coerce argument to pointer to stop gcc
complaint.
2006-01-02 03:45:32 +00:00
Christopher Faylor 3bfd1c5e8c * pinfo.cc (pinfo::exit): Swap signal and normal exit value when not started
from a cygwin process - just like the good-old-days of B20.
2006-01-02 03:14:56 +00:00
Christopher Faylor 68f62c98f9 add copyright 2006-01-02 02:57:54 +00:00
Christopher Faylor d0d1b89700 add missing ChangeLog entry 2006-01-02 02:55:50 +00:00
Christopher Faylor 7a32aefe79 * cygtls.cc (_cygtls::remove): Remove left over debugging cruft which caused
this function to always return prematurely.
2006-01-02 02:55:14 +00:00
Christopher Faylor 74c29a5e9a * winsup.api/resethand.c: Use SIGSEGV for the signal to test. 2006-01-01 18:02:54 +00:00
Christopher Faylor 031d1aa40f * winsup.api/resethand.c: New file. 2006-01-01 17:26:52 +00:00
Christopher Faylor 4eab146fc7 * exceptions.cc (sigpacket::process): Pass actual reference to signal's
sigaction structure to setup_handler.
2006-01-01 17:15:01 +00:00
Christopher Faylor a14d65557a * exceptions.cc (_cygtls::interrupt_setup): Implement SA_RESETHAND.
* include/cygwin/signal.h: Define SA_ONESHOT and SA_NOMASK.
* dcrt0.cc (get_cygwin_startup_info): Remove commented out code.
2006-01-01 16:51:29 +00:00
Corinna Vinschen a89b700926 * syslog.cc (vklog): Never log kernel messages using the vsyslog
interface.
2006-01-01 16:17:55 +00:00
Corinna Vinschen cceba5593d * syslog.cc (vsyslog): Decrement len if trailing \n has been removed.
Add \n when writing to stderr if LOG_PERROR option is set.
2005-12-31 14:16:49 +00:00
Corinna Vinschen 1b68dd91cf * include/cygwin/in.h: Drop including stdint.h. Move definition
of in_port_t and in_addr_t to top of file and use throughout. Use
	sa_family_t type where appropriate.
	(struct in6_addr): Change `unsigned char' to `uint8_t'.
	(struct sockaddr_in6): Add sin6_scope_id member. Add comments.
	* include/cygwin/socket.h: Include stdint.h.  Move definition of
	socklen_t to top of file.  Define sa_family_t.  Define struct
	sockaddr_storage as per SUSv3.
	* include/sys/un.h: Include cygwin/socket.h.  Use sa_family_t type.
2005-12-31 13:07:43 +00:00
Corinna Vinschen cf2af34b70 * include/winsock2.h: Don't define struct sockaddr_storage when
building Cygwin.
2005-12-31 13:07:22 +00:00
Bob Wilson c63bbc11d6 include:
* xtensa-config.h (XCHAL_HAVE_WIDE_BRANCHES): New.
gas:
	* config/tc-xtensa.c (op_placement_info_struct): Delete single,
	single_size, widest, and widest_size fields.  Add narrowest_slot.
	(xg_emit_insn_to_buf): Remove fmt parameter and compute it here.
	Use xg_get_single_slot to find the slot.
	(finish_vinsn): Use emit_single_op instead of bundle_single_op.
	(bundle_single_op): Rename this to....
	(bundle_tinsn): ...this function, which builds a vliw_insn but does
	not call finish_vinsn.
	(emit_single_op): Use bundle_tinsn instead of bundle_single_op.
	(relax_frag_immed): Get num_slots from cur_vinsn.
	(convert_frag_narrow): Update call to xg_emit_insn_to_buf.
	(convert_frag_immed): Likewise.  Also, get num_slots from cur_vinsn.
	(init_op_placement_info_table): Set narrowest_slot field.  Remove
	code for deleted fields.
	(xg_get_single_size): Return narrowest_size field, not single_size.
	(xg_get_single_format): Return narrowest field, not single.
	(xg_get_single_slot): New.
	(tinsn_to_insnbuf): Rewrite to use tinsn_to_slotbuf.
	* config/xtensa-relax.c (widen_spec_list): Add wide branch relaxations.
	(transition_applies): Check wide branch option availability.
2005-12-30 23:34:00 +00:00
Christopher Faylor b88d641c62 * relnotes.texinfo: Remove entry about hyperthreaded processor. 2005-12-30 19:28:26 +00:00
Christopher Faylor 2e99d150d4 * faq-problems.html: Remove entry about hyperthreaded processor. 2005-12-30 19:26:07 +00:00
Christopher Faylor b0cc168954 * fhandler_tty.cc (fhandler_tty_common::__acquire_output_mutex): Use strace
method rather than accessing field directly.
(fhandler_tty_common::__release_output_mutex): Ditto.
2005-12-29 21:10:50 +00:00
Christopher Faylor 5d97040501 *** cygwin DLL Changes:
* child_info.h (CURR_CHILD_INFO_MAGIC): Reset.
(child_info::dwProcessId): Delete.
(child_info::straced): New variable.
(child_info::handle_fork): New member function.
* dcrt0.cc (in_forkee): New global variable.
(__cygwin_user_data::forkee): Mark as obsolete.
(do_global_ctors): Use in_forkee rather than user_data->forkee.
(get_cygwin_startup_info): Ditto.  Deal with new straced field to allow strace
to deal with children of attached processes.
(initial_env): Accommodate changes to strace::hello.
(child_info_fork::handle_fork): Rename from plain old 'handle_fork'.  Move
alloc_stack() call elsewhere.
(dll_crt0_0): Fill out more of user_data.  Reference handle_fork via fork_info.
Add some debugging output.
(_dll_crt0): Don't wait for sync thread if sync_startup is invalid.  Zero
sync_startup here.  Call alloc_stack() here, if appropriate.
(dll_crt0_1): Use in_forkee rather than user_data->forkee.
(dll_crt0): Ditto.
* malloc_wrapper.cc (malloc_init): Ditto.
* dll_init.cc (in_forkee): Remove local static version of this variable.
(dll_list::load_after_fork): Don't set in_forkee here.
* external.cc (cygwin_internal): Use strace method rather than accessing field
directly.
* fhandler.cc (fhandler_base::read): Ditto.
* fhandler_tty.cc (fhandler_tty_common::__acquire_output_mutex): Ditto.
* fork.cc (frok::parent): Invoke strace write_childpid to communicate with
potential strace.
(child_copy): Add more detail to debugging output.
* init.cc (calibration_id): New static variable.
(prime_threads): Set sync_startup to invalid handle if we already know about
thread_func_ix.  Use static calibration_id to hold calibration thread id.
* munge_threadfunc (munge_threadfunc): Don't try to debug if we don't find
threadfunc_ix.
(dll_entry): Avoid calling munge_threadfunc and _cygtls::remove on non-cygwin
threads invoked during process startup.
* pinfo.cc (set_myself): Always call strace.hello here regardless of DEBUGGING.
* sigproc.cc (child_info::child_info): Remove spurious handling of dwProcessId.
Set straced as appropriate.
* spawn.cc (spawn_guts): Rename ciresrv to ch.  Invoke strace write_childpid to
communicate with potential strace.
* strace.cc: Include child_info.h.
(strace::hello): Remove inited test.  Use active() method to test if strace has
been activated.  Handle case where we are started before
(mypid): New function.
(strace::vsprntf): Try to deal more intelligently with case where progname may
not be filled out.  Put pid in parentheses if it is a windows pid rather than a
cygwin pid.  myself has been filled out.
(strace::write_childpid): New function for notifying strace about the creation
of children.
(strace::vprntf): Use strace method rather than accessing field directly.
(strace_printf): Ditto.
(strace::wm): Ditto.
* winsup.h (in_forkee): Declare.
* include/sys/strace.h (strace::write_childpid): Declare new function.
(strace::attached): Define new function.
(strace::active): Ditto.
(strace::active_val): Ditto.
(_STRACE_ON): Delete.
(_STRACE_OFF): Ditto.
(define_strace0): Use strace method rather than accessing field directly.
(strace_printf_wrap): Ditto.
(strace_printf_wrap1): Ditto.

*** cygwin utils changes:
* strace.cc (nprocesses): Make static global.
(quiet): New variable.
(strace_active): Ditto.
(add_child): Increment nprocesses here.  Don't add a child if it is already
added (windows bug?).  Report on child if not quiet.
(get_child): Just return NULL if child not found.
(remove_child): Report on child if not quiet.
(attach_process): Don't complain if given a windows process.  Use windows pid
in error.
(handle_output_debug_string): Issue error if trying to manipulate a process
that we don't know about.  Handle _STRACE_CHILD_PID - attach to reported child
when we get this.
(proc_child): Move nprocesses to file scope.  Report on exceptions.
(longopts): Implement "--quiet".
(opts): Implement "-q".
(main): Manipulate quiet flag.
* utils.sgml (strace): Add words describing '-q'.
2005-12-29 20:46:34 +00:00
Christopher Faylor 10e4168d84 * cygcheck.cc (common_apps): Add crontab, vi, vim. 2005-12-29 19:23:46 +00:00
Christopher Faylor 77ae8757f7 * environ.cc (win_env::add_cache): Don't add variables to the environment
during initialization.
2005-12-29 03:46:56 +00:00
Corinna Vinschen 20e84812d2 * exceptions.cc (_cygtls::handle_exceptions): Drop redundant `break'. 2005-12-27 20:47:49 +00:00
Corinna Vinschen de6c4c6a5f * ChangeLog: Add linebreaks. 2005-12-27 20:23:48 +00:00
Corinna Vinschen a5912e6dbc * exceptions.cc (inside_kernel): Rename from interruptible.
Accommodate change throughout file.
2005-12-27 20:20:09 +00:00
Corinna Vinschen 4f12275501 * exceptions.cc (interruptible): New function, code stripped from
_cygtls::interrupt_now.
	(_cygtls::handle_exceptions): Handle STATUS_DATATYPE_MISALIGNMENT as
	SIGBUS error.  Differ between unmapped memory (SEGV_MAPERR) and access
	violation (SEGV_ACCERR) in case of STATUS_ACCESS_VIOLATION.  Write
	kernel log message in case of uncatched STATUS_ACCESS_VIOLATION.
	(_cygtls::interrupt_now): Just call interruptible now instead of
	evaluating interruptibility here.
2005-12-27 20:07:59 +00:00
Corinna Vinschen 19556072f6 Add missing ChangeLog entry. 2005-12-27 20:01:29 +00:00
Corinna Vinschen 9e68bb7b50 * path.cc (path_conv::check): Rework loop removing trailing dots
and spaces.

	* syslog.cc (vklog): Set facility to LOG_KERN if not set.
2005-12-27 18:10:49 +00:00
Nick Clifton 22d7108ee5 Add support for RDOS targets. 2005-12-27 17:42:44 +00:00
Nick Clifton 018330f0a4 PR binutils/1990
* libtool.m4: Synchronize with version in GCC sources.
2005-12-27 16:37:57 +00:00
Christopher Faylor 192af6e283 white space 2005-12-26 21:23:05 +00:00
Christopher Faylor a16b738dd5 * dcrt0.cc (__api_fatal): Simplify to just use strace mechamisms.
(do_exit): Move minimal_printf...
* pinfo.cc (pinfo::exit): ...into here.
* strace.cc (strace::vprntf): Guarantee output to the console when
system_printf/api_fatal.
* heap.cc (heap_init): Wait a second before issuing an error when
ERROR_INVALID_ADDRESS since this is probably due to a CTRL-C handler sneaking
in, using the memory that we want to use for the heap, and, eventually exiting.
2005-12-26 19:34:59 +00:00
Christopher Faylor c675040a06 typo 2005-12-25 18:15:02 +00:00
Christopher Faylor dcd0465b2b * cygtls.cc (_cygtls::handle_threadlist_exception): Make an error fatal.
* cygtls.h (sockaddr_in): Use header rather than defining our own structure.
* exceptions.cc (_cygtls::interrupt_setup): Use exact contents of sa_mask
rather than assuming tht current sig should be masked, too.
(_cygtls::call_signal_handler): Use more aggressive locking.
* gendef (_sigbe): Wait until later before releasing incyg.
(_sigreturn): Remove more arguments to accommodate quasi-sa_sigaction support.
(_sigdelayed): Push arguments for sa_sigaction.  More work needed here.
* signal.cc (sigaction): Implement SA_NODEFER.
* tlsoffsets.h: Regenerate.

* sigproc.cc (wait_sig): Use default buffer size of Windows 9x complains.
* pinfo.cc (_onreturn::dummy_handle): Remove.
(_onreturn::h): Make this a pointer.
(_onreturn::~_onreturn): Detect whether pointer is NULL rather than value is
NULL.
(_onreturn::_onreturn): Set h to NULL initially.
(_onreturn::no_close_p_handle): Set h to NULL.
(winpids::add): Initialize onreturn with value from p.hProcess immediately.
2005-12-23 22:50:20 +00:00
Christopher Faylor ede284de5f * fork.cc (fork): Honor error return from sig_send. Don't continue with fork
if we couldn't suspend signals.
* sigproc.cc (sig_send): Set sigCONT event when we see __SIGNOHOLD.
(wait_sig): Remove holding_signals.  Create pipe with a buffer which will
theoretically cause blocking if there is nothing reading on the pipe.  Wait for
sigCONT at end of loop when we have a __SIGHOLD.
2005-12-23 01:24:14 +00:00
Corinna Vinschen 52792a770d * fhandler.h (fhandler_base::issymlink): New method.
* syscalls.cc (open): Handle O_NOFOLLOW flag.
	* include/fcntl.h (_FNOFOLLOW): New define.
	(O_NOFOLLOW): Ditto.
	* include/cygwin/version.h: Bump API minor number.
2005-12-22 16:45:15 +00:00
Danny Smith db55f91dc0 * lib/ws2_32.c: New file, defining IPv6 constants.
* Makefile.in (SOURCES): Add ws2_32.c
	(EXTRA_OBJS): Add ws2_32.o.
2005-12-22 07:47:10 +00:00
Christopher Faylor de935f6d9f whitespace cleanup to force snapshot. 2005-12-22 05:57:54 +00:00
Christopher Faylor 718dee922f * pinfo.cc (winpids::add): Increment nelem when winpid is true since we don't
care if it's a cygwin process in that case.
2005-12-22 05:26:14 +00:00