Commit Graph

3591 Commits

Author SHA1 Message Date
Christopher Faylor 6f1d48621e * environ.cc (env_win32_to_posix_path_list): Declare.
(conv_envvars): Use env_win32_to_posix_path_list rather than
cygwin_win32_to_posix_path_list.
(posify): Translate back to win32 path if errno is EIDRM.
* environ.h: Update copyright.  Define ENV_CVT.
* path.cc (conv_path_list): If converting for the environment and removed an
element set errno to ENV_CVT.
(env_win32_to_posix_path_list): New function.
2006-08-02 15:11:48 +00:00
Christopher Faylor 01bbb24d15 * environ.cc (dos_file_warning): Declare.
(parse_thing): Add "dosfilewarning".  Alphabetize.
* path.cc (normalize_posix_path): Return -1 when MS-DOS path detected.
(warn_msdos): New function.
(path_conv::check): Call if !PC_NOWARN and MS-DOS path detected.
(cygwin_conv_to_win32_path): Set PC_NOWARN when calling path_conv.
(cygwin_conv_to_full_win32_path): Ditto.
* path.h (pathconv_arg::PC_NOWARN): Define.
* shared_info.h (user_info::warned_msdos): New field.
(CURR_USER_MAGIC): Reset.
2006-08-01 18:00:44 +00:00
Corinna Vinschen b23bc8c33c * fhandler_socket.cc (fhandler_socket::recv_internal): Fix a problem
with poll(2) after shutdown(SHUT_RD) has been called on the local side.
	* poll.cc (poll): Use POSIX type nfds_t for second parameter.  Drop
	special socket handling for POLLIN.  Add comment to explain why.
	* include/sys/poll.h: Declare nfds_t.  Use as type for second parameter
	in poll(2) declaration.
2006-07-31 14:27:56 +00:00
Corinna Vinschen 1f7dbb011a * fhandler_socket.cc (fhandler_socket::evaluate_events): Circumvent
potential race condition.
	(fhandler_socket::recv_internal): Fix MSG_PEEK bug on blocking sockets
	and simplify recv loop.
	(fhandler_socket::send_internal): Only lock when changing wsock_events.
2006-07-31 12:55:20 +00:00
Corinna Vinschen a947b6879f * autoload.cc: Drop LoadDLLprime for wsock32 since no wsock32 function
is used anymore.  Drop all unused ws2_32.dll functions.
2006-07-31 08:59:56 +00:00
Corinna Vinschen 8f713b6b08 * fhandler.h (struct wsa_event): Define here.
(class fhandler_socket): Make wsock_evt private again.
	(fhandler_socket::wsock_event): New read accessor for wsock_evt.
	(fhandler_socket::serial_number): New read accessor to get the
	socket's serial number.
	(fhandler_socket::ready_for_read): Just return true.
	* fhandler_socket.cc (struct wsa_event): Move definition to fhandler.h.
	* select.cc (struct socketinf): Add serial number vector.
	(start_thread_socket): Identify duplicate sockets by their serial
	number, not (wrongly) by their wsock_evt.
2006-07-28 08:50:46 +00:00
Corinna Vinschen fd5879c110 * fhandler_socket.cc: Revert misguided attempt to handle FD_CLOSE error
conditions in evaluate_events.
	(search_wsa_event_slot): Move wrongly placed memset in
	fhandler_socket::init_events here.
	(fhandler_socket::init_events): Initially set FD_WRITE event for
	connectionless sockets.
	* poll.cc (poll): Don't add sockets always to except_fds since select
	is now supposed to do it right.
	* select.cc (set_bits): Set connection state correctly for failed
	af_local_connect on local sockets.  Remove socket special handling
	for except_selected descriptors.
	(peek_socket): Try to set the read/write/exception bits actually
	correctly.
2006-07-27 13:58:54 +00:00
Corinna Vinschen 883861544a * fhandler_socket.cc (fhandler_socket::recvmsg): Remove unused tot
argument.  All callers changed.
	(fhandler_socket::sendmsg): Likewise.
	* net.cc (cygwin_recvmsg): Likewise.
	(cygwin_sendmsg): Likewise, and prevent calling sendmsg whith an
	invalid iovec.
	* fhandler.h (fhandler_socket::recvmsg): Adjust prototype.
	(fhandler_socket::sendmsg): Likewise.
2006-07-27 09:18:28 +00:00
Corinna Vinschen 9869e006f3 * fhandler.h (class fhandler_socket): Remove prot_info_ptr.
(fhandler_socket::fixup_before_fork_exec): Remove.
	(fhandler_socket::fixup_after_exec): Remove.
	(fhandler_socket::need_fixup_before): Remove.
	* fhandler_socket.cc (fhandler_socket::fhandler_socket): Drop
	initializing prot_info_ptr.  Remove unused code.
	(fhandler_socket::~fhandler_socket): Drop free'ing prot_info_ptr.
	(struct wsa_event): Rename connect_errorcode to errorcode.
	(fhandler_socket::evaluate_events): Handle FD_CLOSE error condition
	as FD_CONNECT error condition, except, never reset an FD_CLOSE error
	condition.  Always set FD_WRITE after successfully recorded FD_CONNECT.
	(fhandler_socket::fixup_before_fork_exec): Remove.
	(fhandler_socket::fixup_after_fork): Revert to using handle duplication.
	(fhandler_socket::fixup_after_exec): Remove.
	(fhandler_socket::dup): Revert to using handle duplication.
	(fhandler_socket::send_internal): Only call wait_for_events in case
	of WSAEWOULDBLOCK condition.
	(fhandler_socket::set_close_on_exec): Call
	fhandler_base::set_close_on_exec.
	* net.cc (fdsock): Just set socket to inheritable on non-NT.  Don't
	call inc_need_fixup_before.
	* select.cc (peek_socket): Don't set except_ready on every FD_CLOSE,
	just on error.
2006-07-27 09:11:38 +00:00
Christopher Faylor 5ecd1ea663 * fhandler.cc (fhandler_base::read): Call get_readahead_into_buffer instead of
duplicating it.
2006-07-27 03:32:51 +00:00
Corinna Vinschen a0bb355ffe * shared.cc (offsets): Define as offsets relative to cygwin_hmodule
instead of addresses.
	(off_addr): New macro.
	(open_shared): Use offsets array accordingly.  Remove unused code.
	* shared_info.h (cygwin_shared_address): Remove.
2006-07-26 21:02:01 +00:00
Corinna Vinschen 5faa48850f * cygheap.h (struct init_cygheap): Remove shared_h and mt_h members.
* fhandler_tape.cc (mt): Define as DLL shared area in
	.cygwin_dll_common instead of as dynamically allocated area.
	Change referencing throughout.
	* mtinfo.h (mt_h): Remove entirely.
	(mt): Remove extern declaration.
	* shared.cc (cygwin_shared_area): New global cygwin_shared
	variable located in .cygwin_dll_common.
	(offsets): Define shared region addresses descending from
	cygwin_shared_address.
	(open_shared): Replace usage of SH_CYGWIN_SHARED by SH_USER_SHARED.
	(memory_init): Set cygwin_shared just by pointing to cygwin_shared_area.
	* shared_info.h (shared_locations): Remove SH_CYGWIN_SHARED and
	SH_MTINFO.
	(cygwin_shared_address): Define as DLL start address.
	* tty.h (tty_min::tty_min): Remove constructor.
2006-07-26 15:59:39 +00:00
Corinna Vinschen 020a7b4711 * include/cygwin/in6.h: Guard in_port_t typedef more restrictive to
avoid compiler warning.
2006-07-25 20:01:38 +00:00
Christopher Faylor 724c4ed146 * security.cc (get_logon_server): Remove nret and use dret for everything to
avoid a g++ warning.
2006-07-25 19:44:17 +00:00
Corinna Vinschen 70e476d27b 2006-07-25 Corinna Vinschen <corinna@vinschen.de>
* include/cygwin/version.h: Bump DLL version to 1.7.0.

2006-07-25  Corinna Vinschen  <corinna@vinschen.de>

	* select.h: Remove.
	* fhandler_socket.cc: Don't include select.h.
	* select.cc: Ditto.

2006-07-25  Corinna Vinschen  <corinna@vinschen.de>

	* cygtls.h: Drop socket related includes.
	(struct _local_storage): Remove exitsock and exitsock_sin. Add
	select_sockevt.
	* cygtls.cc: Accomodate above change throughout.
	* fhandler.h (class fhandler_socket): Make wsock_evt public.
	* fhandler_socket.cc (fhandler_socket::fhandler_socket): Accomodate
	reordering members.
	(fhandler_socket::evaluate_events): Drop FD_CONNECT event as soon as
	it gets read once.  Never remove FD_WRITE event here.
	(fhandler_socket::wait_for_events): Wait 50 ms instead of INFINITE for
	socket events.
	(fhandler_socket::accept): Fix conditional.  Set wsock_events members
	of accepted socket to useful start values.
	(fhandler_socket::recv_internal): Always drop FD_READ/FD_OOB events from
	wsock_events after the call to WSARecvFrom.
	(fhandler_socket::send_internal): Drop FD_WRITE event from wsock_events
	if the call to WSASendTo fails with WSAEWOULDBLOCK.  Fix return value
	condition.
	* select.cc (struct socketinf): Change to accomodate using socket event
	handling.
	(peek_socket): Use event handling for peeking socket.
	(thread_socket): Ditto.
	(start_thread_socket): Ditto.
	(socket_cleanup): Same here.
	* tlsoffsets.h: Regenerate.

2006-07-20  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler.h (class fhandler_socket): Rearrange slightly to keep
	event handling methods and members together.  Drop owner status flag.
	Split wait method.  Rename event handling methods for readability.
	* fhandler_socket.cc (struct wsa_event): Add owner field.
	(LOCK_EVENTS): New macro.
	(UNLOCK_EVENTS): Ditto.
	(fhandler_socket::init_events): rename from prepare.
	(fhandler_socket::evaluate_events): First half of former wait method.
	Do everything but wait.  Allow specifiying whether or not events from
	event_mask should be erased from wsock_events->events.  Simplify
	OOB handling.  Allow sending SIGURG to any process (group).
	(fhandler_socket::wait_for_events): Second half of former wait method.
	Call evaluate_events and wait in a loop if socket is blocking.
	(fhandler_socket::release_events): Rename from release.
	(fhandler_socket::connect): Accomodate above name changes.
	(fhandler_socket::accept): Ditto.
	(fhandler_socket::recv_internal): Ditto.
	(fhandler_socket::send_internal): Ditto.
	(fhandler_socket::close): Ditto.
	(fhandler_socket::fcntl): Always set owner to given input value on
	F_SETOWN.  Handle F_GETOWN.
	* net.cc (fdsock): Accomodate above name changes.

2006-07-20  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_socket.cc (fhandler_socket::wait): Set Winsock errno to
	WSAEWOULDBLOCK instead of WSAEINPROGRESS.

2006-07-18  Brian Ford  <Brian.Ford@FlightSafety.com>
	    Corinna Vinschen  <corinna@vinschen.de>

	* winsup.h (mmap_region_status): New enum.
	(mmap_is_attached_or_noreserve_page): Adjust prototype and rename
	as below.
	* mmap.cc (mmap_is_attached_or_noreserve_page):  Rename
	mmap_is_attached_or_noreserve.  Add region length parameter.
	Return enum above.
	* exceptions.cc (_cygtls::handle_exceptions): Accomodate above.
	* fhandler.cc (fhandler_base::raw_read): Call above for NOACCESS
	errors and retry on success to allow reads into untouched
	MAP_NORESERVE buffers.

2006-07-18  Corinna Vinschen  <corinna@vinschen.de>

	* cygwin.din (posix_openpt): Export.
	* tty.cc (posix_openpt): New function.
	* include/cygwin/stdlib.h (posix_openpt): Declare.
	* include/cygwin/version.h: Bump API minor number.

2006-07-14  Corinna Vinschen  <corinna@vinschen.de>

	* security.cc (get_token_group_sidlist): Always add the interactive
	group to the token.  Add comment.  Create logon_id group SID by
	copying it from incoming group list.
	(create_token): Add subauth_token parameter.  Use information in
	subauth_token if present.  Tweak SourceIdentifier if subauth_token
	is present for debugging purposes.
	* security.h (create_token): Add subauth_token parameter in declaration.
	* syscalls.cc (seteuid32): Call subauth first.  Call create_token
	regardless.  Use subauth token in call to create_token if subauth
	succeeded.

2006-07-13  Corinna Vinschen  <corinna@vinschen.de>

	* include/netinet/in.h: Update copyright.

2006-07-13  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_socket.cc (fhandler_socket::wait): Rework function so that
	WaitForMultipleObjects is really only called when necessary.

2006-07-12  Corinna Vinschen  <corinna@vinschen.de>

	* include/netdb.h: Declare rcmd, rcmd_af, rexec, rresvport,
	rresvport_af, iruserok, iruserok_sa, ruserok.

2006-07-12  Corinna Vinschen  <corinna@vinschen.de>

	* Makefile.in (DLL_OFILES): Drop iruserok.o.  Add rcmd.o.
	* autoload.cc (rcmd): Drop definition.
	* cygwin.din: Export bindresvport, bindresvport_sa, iruserok_sa,
	rcmd_af, rresvport_af.
	* net.cc (cygwin_rcmd): Remove.
	(last_used_bindresvport): Rename from last_used_rrecvport.
	(cygwin_bindresvport_sa): New function implementing bindresvport_sa.
	(cygwin_bindresvport): New function implementing bindresvport.
	(cygwin_rresvport): Remove.
	* include/cygwin/version.h: Bump API minor number.
	* include/netinet/in.h: Declare bindresvport and bindresvport_sa.
	* libc/iruserok.c: Remove file.
	* libc/rcmd.cc: New file implementing rcmd, rcmd_af, rresvport,
	rresvport_af, iruserok_sa, iruserok and ruserok.

2006-07-12  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_socket.cc (fhandler_socket::getsockname): Return valid
	result for unbound sockets.

2006-07-11  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_socket.cc (fhandler_socket::fixup_after_fork): Handle
	wsock_mtx and wsock_evt on fork, thus handling close_on_exec correctly.
	(fhandler_socket::fixup_after_exec): Drop misguided attempt to handle
	close_on_exec here.
	(fhandler_socket::dup): Call fixup_after_fork with NULL parent.
	Add comment.
	(fhandler_socket::set_close_on_exec): Handle wsock_mtx and wsock_evt.

2006-07-10  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler.h (class fhandler_socket): Add wsock_mtx, wsock_evt
	and wsock_events members.  Remove closed status flag, add listener
	status flag.  Accomodate new implementation of socket event handling
	methods.  Declare recv* and send* functions ssize_t as the POSIX
	equivalents.
	(fhandler_socket::recv_internal): Declare.
	(fhandler_socket::send_internal): Ditto.
	* fhandler_socket.cc (EVENT_MASK): Define mask of selected events.
	(fhandler_socket::fhandler_socket): Initialize new members.
	(fhandler_socket::af_local_setblocking): Don't actually set the
	socket to blocking mode.  Keep sane event selection.
	(fhandler_socket::af_local_unsetblocking): Don't actually set the
	socket to previous blocking setting, just remember it.
	(struct wsa_event): New structure to keep event data per shared
	socket.
	(NUM_SOCKS): Define number of shared sockets concurrently handled by
	all active Cygwin processes.
	(wsa_events): New shared datastructure keeping all wsa_event records.
	(socket_serial_number): New shared variable to identify shared sockets.
	(wsa_slot_mtx): Global mutex to serialize wsa_events access.
	(search_wsa_event_slot): New static function to select a new wsa_event
	slot for a new socket.
	(fhandler_socket::prepare): Rewrite.  Prepare event selection
	per new socket.
	(fhandler_socket::wait): Rewrite.  Wait for socket events in thread
	safe and multiple process safe.
	(fhandler_socket::release): Rewrite.  Close per-socket descriptor
	mutex handle and event handle.
	(fhandler_socket::dup): Duplicate wsock_mtx and wsock_evt.  Fix
	copy-paste error in debug output.
	(fhandler_socket::connect): Accomodate new event handling.
	(fhandler_socket::listen): Set listener flag on successful listen.
	(fhandler_socket::accept): Accomodate new event handling.
	(fhandler_socket::recv_internal): New inline method centralizing
	common recv code.
	(fhandler_socket::recvfrom): Call recv_internal now.
	(fhandler_socket::recvmsg): Ditto.  Streamline copying from iovec
	to WSABUF.
	(fhandler_socket::send_internal): New inline method centralizing
	common send code.
	(fhandler_socket::sendto): Call send_internal now.
	(fhandler_socket::sendmsg): Ditto.  Streamline copying from iovec
	to WSABUF.
	(fhandler_socket::close): Call release now.
	(fhandler_socket::ioctl): Never actually switch to blocking mode.
	Just keep track of the setting.
	* net.cc (fdsock): Call prepare now.
	(cygwin_connect): Revert again to event driven technique.
	(cygwin_accept): Ditto.
	* poll.cc (poll): Don't call recvfrom on a listening socket.
	Remove special case for failing recvfrom.
	* include/sys/socket.h: Declare recv* and send* functions ssize_t as
	requested by POSIX.

2006-07-07  Corinna Vinschen  <corinna@vinschen.de>

	* net.cc (cygwin_inet_ntop): Fix data type of forth parameter.

2006-07-06  Corinna Vinschen  <corinna@vinschen.de>

	* include/cygwin/in6.h (struct in6_addr): Fix typo.

2006-07-06  Corinna Vinschen  <corinna@vinschen.de>

	* cygwin.din: Export in6addr_any, in6addr_loopback, freeaddrinfo,
	gai_strerror, getaddrinfo, getnameinfo.
	* fhandler_socket.cc: Include cygwin/in6.h.
	(get_inet_addr): Accomodate AF_INET6 usage.
	(fhandler_socket::connect): Ditto.
	(fhandler_socket::listen): Ditto.
	(fhandler_socket::sendto): Ditto.
	* net.cc: Include cygwin/in6.h.
	(in6addr_any): Define.
	(in6addr_loopback): Define.
	(cygwin_socket): Accomodate AF_INET6 usage.
	(socketpair): Bind socketpairs only to loopback for security.
	(inet_pton4): New static function.
	(inet_pton6): Ditto.
	(cygwin_inet_pton): New AF_INET6 aware inet_pton implementation.
	(inet_ntop4): New static function.
	(inet_ntop6): Ditto.
	(cygwin_inet_ntop): New AF_INET6 aware inet_ntop implementation.
	(ga_aistruct): New static function.
	(ga_clone): Ditto.
	(ga_echeck): Ditto.
	(ga_nsearch): Ditto.
	(ga_port): Ditto.
	(ga_serv): Ditto.
	(ga_unix): Ditto.
	(gn_ipv46): Ditto.
	(ipv4_freeaddrinfo): Ditto.
	(ipv4_getaddrinfo): Ditto.
	(ipv4_getnameinfo): Ditto.
	(gai_errmap_t): New structure holding error code - error string mapping.
	(cygwin_gai_strerror): New function implementing gai_strerror.
	(w32_to_gai_err): New static function.
	(get_ipv6_funcs): Ditto.
	(load_ipv6_funcs): Ditto.
	(cygwin_freeaddrinfo): New function implementing freeaddrinfo.
	(cygwin_getaddrinfo): New function implementing getaddrinfo.
	(cygwin_getnameinfo): New function implementing getnameinfo.
	* include/netdb.h: Include stdint.h and cygwin/socket.h.  Define
	data types and macros used by getaddrinfo and friends.  Declare
	freeaddrinfo, gai_strerror, getaddrinfo and getnameinfo.
	* include/cygwin/in.h: Add IPv6 related IPPROTOs. Remove definition
	of struct sockaddr_in6.  Include cygwin/in6.h instead.
	* include/cygwin/in6.h: New header file defining IPv6 releated
	data types and macros.
	* include/cygwin/socket.h: Enable AF_INET6 and PF_INET6.  Add
	IPv6 related socket options.
	* include/cygwin/version.h: Bump API minor number.

2006-07-06  Corinna Vinschen  <corinna@vinschen.de>

	* autoload.cc (DsGetDcNameA): Define.
	(NetGetAnyDCName): Define.
	* security.cc: Include dsgetdc.h.
	(DsGetDcNameA): Declare.
	(DS_FORCE_REDISCOVERY): Define.
	(get_logon_server): Add bool parameter to control rediscovery of DC.
	Use DsGetDcNameA function if supported, NetGetDCName/NetGetAnyDCName
	otherwise.
	(get_server_groups): Rediscover DC if get_user_groups fails and
	try again.
	(get_reg_security): Use correct error code macro when testing
	RegGetKeySecurity return value.
	* security.h (get_logon_server): Remove default vaue from wserver
	parameter.  Add rediscovery parameter.
	* uinfo.cc (cygheap_user::env_logsrv): Accomodate rediscovery parameter
	in call to get_logon_server.
2006-07-25 19:23:23 +00:00
Christopher Faylor e7a8c11c0f * include/cygwin/version.h: Bump DLL minor version number to 22. 2006-07-24 01:28:29 +00:00
Corinna Vinschen 9d272b3c31 * pinfo.cc (commune_process): Don't add extra \0 to cmdline.
(_pinfo::cmdline): Ditto process internal.
2006-07-19 16:00:28 +00:00
Corinna Vinschen add2f65f37 * mmap.cc (msync): Disable rounding up len. Fix bug in access check
loop.
2006-07-19 08:58:09 +00:00
Corinna Vinschen ef4954b62d * path.cc (symlink_worker): Return EEXIST if newpath exists. 2006-07-19 08:20:26 +00:00
Christopher Faylor 8432b8b206 * tty.cc (tty_list::terminate): Don't enter the busy loop if we don't own the
master.
2006-07-18 15:09:11 +00:00
Corinna Vinschen 62e9d4b96f * sec_acl.cc (acltotext32): Add missing handling of default ACL entry
types.
2006-07-18 14:11:38 +00:00
Corinna Vinschen 295912e873 * fhandler_floppy.cc (fhandler_dev_floppy::ioctl): Fix typo in lint
directive.
2006-07-18 12:56:37 +00:00
Christopher Faylor f62412f235 GCC 4.1 fixes.
* cygheap.h (cygheap_user): Remove unneeded class names from function
declaration.
* fhandler.h (fhandler_base): Ditto.
(fhandler_dev_floppy): Ditto.
(fhandler_console): Ditto.
* wininfo.h (wininfo): Ditto.
* exceptions.cc (sigpacket::process): Avoid compiler errors about gotos and
initialization.
* fhandler_fifo.cc (fhandler_fifo::open): Ditto.
* fhandler_floppy.cc (fhandler_dev_floppy::ioctl): Ditto.
* fhandler_tty.cc (fhandler_tty_slave::ioctl): Ditto.
* mmap.cc (mmap64): Ditto.
* pipe.cc (fhandler_pipe::open): Ditto.
* spawn.cc (spawn_guts): Ditto.
* sec_helper.cc: Fix some comments.
(get_null_sd): Move file-scope static to only function where it is used.
2006-07-17 19:30:30 +00:00
Christopher Faylor fbadc634cb * fork.cc (fork): Lock the process before forking to prevent things like new
fds from being opened, etc.
* sync.h (lock_process::dont_bother): New function.
2006-07-14 22:15:12 +00:00
Christopher Faylor d9ceecd2d2 * include/cygwin/types.h: Update copyright. 2006-07-14 21:45:00 +00:00
Christopher Faylor ebc223f182 * cygwin.sc: Make sure there's something in the cygheap.
* dllfixdbg: Accommodate newer binutils which put the gnu_debuglink at the end
rather than at the beginning.
2006-07-14 19:33:55 +00:00
Christopher Faylor 6b838263ea * sigproc.cc (waitq_head): Don't initialize to zero.
* sigproc.h: Update copyright, fix whitespace.
2006-07-14 00:50:55 +00:00
Christopher Faylor e8bf232949 * fhandler.cc (fhandler_base::raw_read): Only return EISDIR when we're really
trying to read a directory.
* sigproc.cc: Use "Static" where appropriate.
2006-07-13 20:56:24 +00:00
Corinna Vinschen 94fe03664f * fhandler_socket.cc: Update copyright.
* include/pthread.h: Ditto.
2006-07-13 12:59:53 +00:00
Corinna Vinschen 2e19497afc * mmap.cc (mmap64): Drop MAP_NORESERVE flag for non-anonymous,
non-private mappings.
	(mmap_record::unmap_pages): Only check noreserve flag which now implies
	anonymous and private.
	(mprotect): Ditto.
	(fixup_mmaps_after_fork): Ditto.
2006-07-13 10:29:21 +00:00
Corinna Vinschen f6105f89d5 * exceptions.cc (_cygtls::handle_exceptions): Call new
mmap_is_attached_or_noreserve_page function in case of access violation
	and allow application to retry access on noreserve pages.
	* mmap.cc (mmap_is_attached_or_noreserve_page): Changed from
	mmap_is_attached_page.  Handle also noreserve pages now.  Change
	comment accordingly.
	* winsup.h (mmap_is_attached_or_noreserve_page): Declare instead of
	mmap_is_attached_page.
2006-07-13 08:33:34 +00:00
Corinna Vinschen d44b979536 * mmap.cc (mmap_record::alloc_page_map): Don't call VirtualProtect
on maps created with MAP_NORESERVE.
2006-07-12 20:15:00 +00:00
Corinna Vinschen 2633942858 * include/pthread.h: Define PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT and
PTHREAD_PRIO_PROTECT only if _POSIX_THREAD_PRIO_INHERIT is defined.
2006-07-12 09:55:47 +00:00
Corinna Vinschen 2c1394b495 * libc/inet_addr.c: Define __INSIDE_CYGWIN_NET__.
* libc/inet_network.c: Ditto.
2006-07-10 08:15:54 +00:00
Corinna Vinschen e7b77aaecd * fhandler_socket.cc (fhandler_socket::wait): Disable SA_RESTART
handling for now.
2006-07-07 15:44:19 +00:00
Corinna Vinschen 722031140a * Makefile.in (DLL_OFILES): Add inet_addr.o and inet_network.o.
* autoload.cc (inet_addr): Drop definition.
	(inet_ntoa): Ditto.
	* net.cc: Forward declare cygwin_inet_aton and cygwin_inet_ntop.
	(cygwin_inet_ntoa): Call cygwin_inet_ntop instead of Winsock inet_ntoa.
	(cygwin_inet_addr): Remove here.
	(cygwin_inet_aton): Ditto.
	(cygwin_inet_network): Ditto.
	* libc/inet_addr.c: New file implementing cygwin_inet_aton and
	cygwin_inet_addr.
	* libc/inet_network.c: New file implementing cygwin_inet_network.
2006-07-07 09:14:15 +00:00
Christopher Faylor b4054e7706 * hookapi.cc: Add comment header
(putmem): Make static.
(get_export): Ditto.
(rvadelta): Ditto.  Don't assume that a section which ends where the import_rva
begins is the import list.
* child_info.h: Update copyright.
* fork.cc: Ditto.
2006-07-06 17:16:37 +00:00
Christopher Faylor 8307a41117 * sortdin: Ignore all leading underscores when deriving a sort key.
* cygwin.din: Resort.
2006-07-05 16:06:50 +00:00
Christopher Faylor 03ac0afe48 * sortdin: New program.
* cygwin.din: Sort.
2006-07-05 15:59:39 +00:00
Corinna Vinschen a25d71a899 * fhandler.h (fhandler_socket::wait): Reset default timeout to 10ms. 2006-07-05 15:39:08 +00:00
Corinna Vinschen 7bfe2409a0 * path.cc (path_conv::check): Ignore has_ea setting, it's always unset
at this point anyway.
	(get_symlink_ea): Remove.
	(set_symlink_ea): Remove.
	(symlink_worker): Drop writing symlink into NTFS extended attributes.
	(symlink_info::check): Drop reading symlinks from NTFS extended
	attributes.
2006-07-05 08:35:51 +00:00
Christopher Faylor 49bd27c47c * libc/rexec.cc (cygwin_rexec): Obvious (?) fix to correct a gcc warning - set
port to zero first thing in the function.
2006-07-05 00:14:42 +00:00
Christopher Faylor a16597363f * signal.cc (signal): Set sa_mask to sig. 2006-07-04 23:57:43 +00:00
Corinna Vinschen fa48cf5325 * Makefile.in (DLL_OFILES): Add rexec.o.
* autoload.cc (inet_network): Drop definition.
	(rexec): Ditto.
	* net.cc (rexec): Drop extern declaration.
	(inet_network): Ditto.
	(cygwin_inet_network): Implement using inet_addr.
	(cygwin_rexec): Remove.
	* libc/rexec.cc: New file.
2006-07-04 20:24:27 +00:00
Corinna Vinschen c2ab308c81 * fhandler_socket.cc (fhandler_socket::listen): Allow listening on
unbound INET socket.
2006-07-04 20:10:43 +00:00
Corinna Vinschen 6dbfd8f9ba * fhandler.h (fhandler_socket::wait): Set default timeout to INFINITE. 2006-07-04 09:26:49 +00:00
Corinna Vinschen 4635b6ebd8 * autoload.cc (NtQueryEaFile): Define.
(NtSetEaFile): Define.
	* fhandler.cc (fhandler_base::open): Use appropriate open flags
	in query case when allow_ntea is set.
	* ntdll.h (struct _FILE_GET_EA_INFORMATION): Define.
	(struct _FILE_FULL_EA_INFORMATION): Define.
	(NtQueryEaFile): Declare.
	(NtSetEaFile): Declare.
	* ntea.cc (read_ea): Rename from NTReadEA and rewrite using
	NtQueryEaFile.
	(write_ea): Rename from NTWriteEA and rewrite using NtSetEaFile.
	* path.cc (get_symlink_ea): Make static.  Add handle parameter to
	accomodate new read_ea call.
	(set_symlink_ea): Make static.  Add handle parameter to accomodate new
	write_ea call.
	(symlink_worker): Call set_symlink_ea while file is still open.
	(symlink_info::check): Call get_symlink_ea after file has been opened.
	* security.cc (get_file_attribute): Accomodate new read_ea call.
	(set_file_attribute): Accomodate new write_ea call.
	* security.h (read_ea): Change declaration accordingly.
	(write_ea): Ditto.
2006-07-03 18:30:08 +00:00
Corinna Vinschen 6258d96af8 * fhandler.h (class dev_console): Add `metabit' indicating the
current meta key mode.
	* fhandler_console.cc (fhandler_console::read): Set the top bit of
	the character if metabit is true.
	* fhandler_console.cc (fhandler_console::ioctl): Implement
	KDGKBMETA and KDSKBMETA commands.
	* fhandler_tty.cc (process_ioctl): Support KDSKBMETA.
	(fhandler_tty_slave::ioctl): Send KDGKBMETA and KDSKBMETA to the
	master.
	* include/cygwin/kd.h: New file for the meta key mode.
	* include/sys/kd.h: New file.
2006-07-03 15:29:10 +00:00
Corinna Vinschen 61aea27d90 * include/stdint.h (UINT8_C, UINT16_C): Unsigned types smaller
than int promote to signed int.
2006-07-03 12:30:04 +00:00
Corinna Vinschen 78db7dff2c * net.cc (cygwin_sendto): Define appropriate parameters using
socklen_t type according to SUSv3.
	(cygwin_recvfrom): Ditto.
	(cygwin_setsockopt): Ditto.
	(cygwin_getsockopt): Ditto.
	(cygwin_connect): Ditto.
	(cygwin_accept): Ditto.
	(cygwin_bind): Ditto.
	(cygwin_getsockname): Ditto.
	(cygwin_getpeername): Ditto.
	(cygwin_recv): Ditto.
	(cygwin_send): Ditto.
	* include/cygwin/socket.h (socklen_t): Typedef and define.
	* include/sys/socket.h: Declare socket functions using socklen_t type.
2006-07-03 11:31:56 +00:00