Commit Graph

3029 Commits

Author SHA1 Message Date
Corinna Vinschen f2abf3173b * fhandler.cc (fhandler_base::readv): Use malloc/free instead of alloca.
(fhandler_base::writev): Ditto.
2005-06-30 17:00:10 +00:00
Christopher Faylor 5b3e1f7358 * cygerrno.h: Make multi-inclusion safe.
* fhandler_termios.cc (fhandler_termios::tcsetpgrp): Deal with EINTR.
* dcrt0.cc (dll_crt0_0): Accommodate init_console_handler argument change.
* winsup.h: Ditto.
* fhandler_tty.cc (fhandler_tty_slave::open): Ditto.
* exceptions.cc (init_console_handler): Ditto.  Ignore console events if we're
not attached to a terminal.
* fhandler_tty.cc (fhandler_tty_slave::open): Ditto.
* wincap.cc: Implement has_null_console_handler_routine throughout.
* wincap.h: Ditto.
2005-06-30 02:52:14 +00:00
Christopher Faylor 87e8bd37a0 * autoload.cc (LoadDLLprime): Use a more descriptive name for autoload text
sections.
* cygwin.sc: Ditto.
2005-06-29 23:05:41 +00:00
Corinna Vinschen f1fb564952 * fhandler_disk_file.cc (fhandler_disk_file::facl): Add missing break. 2005-06-27 14:18:13 +00:00
Corinna Vinschen 677ded600c * path.cc (path_conv::check): Don't strip trailing dots and spaces
at the start of the path.
2005-06-24 09:15:05 +00:00
Corinna Vinschen 3b12a57cb6 * fhandler.cc (rootdir): Don't set errno.
* syscalls.cc (statvfs): Set errno to ENOTDIR if rootdir() failed.
2005-06-24 09:12:15 +00:00
Corinna Vinschen d9c1b93d19 * fhandler.h (class fhandler_dev_tape): Add declaration for
fixup_after_fork and set_close_on_exec.
	* fhandler_tape.cc (fhandler_dev_tape::open): Create mt_mtx mutex
	inheritable.
	(fhandler_dev_tape::close): Close mt_mtx.
	(fhandler_dev_tape::dup): Duplicate mt_mtx and mt_evt as necessary.
	(fhandler_dev_tape::fixup_after_fork): New method.
	(fhandler_dev_tape::set_close_on_exec): New method.
2005-06-22 19:59:19 +00:00
Corinna Vinschen 2a770b2a6f * security.cc (get_initgroups_sidlist): Drop special_pgrp parameter.
(get_setgroups_sidlist): Avoid duplicate groups in group list.
	(create_token): Remove special_pgrp local variable.  Accomodate
	change to get_initgroups_sidlist call.
2005-06-21 20:38:05 +00:00
Corinna Vinschen 4adc3db74e * uinfo.cc (uinfo_init): Call reimpersonate to set the main thread's
impersonation token.
2005-06-21 20:09:31 +00:00
Corinna Vinschen 74041a3a74 * fhandler_proc.cc (format_proc_partitions): Only list recognized
partitions.  Use partition number given by PartitionNumber member.
2005-06-20 19:58:26 +00:00
Corinna Vinschen fa2d9fc528 * glob.c: (glob0): New local variable `limit`. Use in calls to glob1
and globextend.
	(glob1): Add `limit' parameter.
	(glob2): Ditto.
	(glob3): Ditto.
	(globextend): Ditto. Implement GLOB_LIMIT handling.
	* include/glob.h (GLOB_LIMIT): New define.
	* include/cygwin/version.h: Bump API minor number.
2005-06-18 19:04:25 +00:00
Christopher Faylor 91717fb806 * wincap.h (wincaps::detect_win16_exe): Declare.
(wincapc::detect_win16_exe): Implement.
* wincap.cc: Populate detect_win16_exe where appropriate.
* spawn.cc (spawn_guts): Only go out of the way to detect 16-bit apps on
systems which are flummoxed by them.
2005-06-18 01:36:18 +00:00
Christopher Faylor 2bc6be1eda * spawn.cc (spawn_guts): Detect when executing a 16-bit application and avoid
setting the process pipe since this causes conniptions in Windows 9x.
2005-06-18 01:27:06 +00:00
Corinna Vinschen b3ba5059da * cygwin.din (inet_pton): Export.
(inet_ntop): Export.
	* net.cc (cygwin_inet_pton): Implement inet_pton for AF_INET for now.
	(cygwin_inet_ntop): Implement inet_ntop for AF_INET for now.
	* include/arpa/inet.h (inet_pton): Declare.
	(inet_ntop): Declare.
	* include/cygwin/version.h: Bump API minor number.
2005-06-17 20:01:59 +00:00
Corinna Vinschen 29b111ce59 * fhandler.h (fhandler_union): Add missing members corresponding to
fhandler_fifo and fhandler_netdrive.
2005-06-17 11:44:45 +00:00
Corinna Vinschen ec3b136a64 * syscalls.cc (statvfs): Handle the case when GetDiskFreeSpaceEx
succeeds but GetDiskFreeSpace fails by faking bytes-per-sector and
	sectors-per-cluster values.
2005-06-16 15:46:40 +00:00
Christopher Faylor 7a9b2d82ec add missing entry 2005-06-15 22:51:05 +00:00
Christopher Faylor a9c461626e * cygthread.cc (cygthread::detach): Fix debugging output.
* dcrt0.cc (dll_crt0_1): Create signal_arrived early -- before any filename
manipulation.
* sigproc.cc (sigproc_init): Don't create signal_arrived here.
* fork.cc (fork_child): Ditto.
2005-06-15 22:50:31 +00:00
Christopher Faylor 0fc9cf11f8 * path.cc (path_conv::check): Always reset to FH_FS when component != 0 and
FH_NETDRIVE to fix problems with strict case checking.
2005-06-14 23:52:53 +00:00
Corinna Vinschen 3925b4afc4 * fhandler_socket.cc (fhandler_socket::recvmsg): Avoid SEGV in OpenSSH
when trying to pass file descriptor by setting msg->msg_accrightslen
	to 0.
2005-06-12 12:01:09 +00:00
Christopher Faylor 88cbbd450e * Makefile.in: Avoid initial heap allocation since cygwin has its own heap. 2005-06-11 21:00:23 +00:00
Christopher Faylor b945228cb6 * fhandler_console.cc (fhandler_console::read): Fix a compiler warning. 2005-06-11 05:09:25 +00:00
Christopher Faylor 8556456790 * include/pthread.h: Change PTHREAD_MUTEX_DEFAULT to PTHREAD_MUTEX_NORMAL.
Revert PTHREAD_MUTEX_INITIALIZER to PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
since that is actually closer to what linux does.
* thread.h (cw_cancel_action): New enum.
(cancelable_wait): Use cw_cancel_action as third argument.
* thread.cc (cancelable_wait): Ditto.  Don't wait for cancel if cancel_action
== cw_no_cancel.
(pthread::create): Don't wait for cancel event since that is racy.
(pthread_mutex::pthread_mutex): Set default to PTHREAD_MUTEX_ERRORCHECK.
(pthread_mutexattr::pthread_mutexattr): Ditto.
(pthread_mutex::_lock): Tell cancelable_wait not to wait for cancellation
event.
(semaphore::_timedwait): Accommodate change in cancelable_wait args.
(pthread::join): Ditto.
2005-06-11 04:56:36 +00:00
Corinna Vinschen b4177338e1 * fhandler_socket.cc (fhandler_socket::sendto): Always initialize
ret to 0.
	(fhandler_socket::sendmsg): Ditto.
2005-06-10 21:47:24 +00:00
Corinna Vinschen 5680109cf6 * cygwin.din (imaxabs): Export.
(imaxdiv): Export.
	(llabs): Export.
	(lldiv): Export.
	(strtoimax): Export.
	(strtoumax): Export.
	* include/inttypes.h (imaxabs): Activate declaration.
	(imaxdiv): Ditto.
	(strtoimax): Ditto.
	(strtoumax): Ditto.
	* include/cygwin/version.h: Bump API minor.
2005-06-10 12:11:35 +00:00
Christopher Faylor 1b96f7da45 * cygthread.cc (cygthread::detach): Improve diagnostics for what should be an
impossible failure condition.
2005-06-09 23:48:08 +00:00
Christopher Faylor 9a91777205 * cygtls.h (_local_storage::setmode_file): New element.
(_local_storage::setmode_mode): New element.
* tlsoffsets.h: Regenerate.
* cygwin.din (setmode): Define as cygwin_getmode.
* syscalls.cc (setmode_helper): Use setmode_* variables from tls rather than
using unthreadsafe static.
(setmode): Break out fwalk stuff.
(cygwin_setmode): New function.  Put fwalk stdio stuff here.
2005-06-09 22:33:57 +00:00
Christopher Faylor fa0dcd0d65 * thread.cc (pthread_mutex::_lock): Use cancelable_wait rather than
WaitForSingleObject.
2005-06-09 20:59:59 +00:00
Christopher Faylor 85cd5c3d57 * cygwin.sc: Place .cygwin_dll_common in a more sensible spot. 2005-06-09 20:46:00 +00:00
Christopher Faylor 0acb042081 * cygwin.sc: Place .cygwin_dll_common.
* init.cc (threadfunc_ix): Use a more common name for the section name.
2005-06-09 19:29:27 +00:00
Christopher Faylor 8891625cbf * include/pthread.h (PTHREAD_MUEXT_INITIALIZER): Change to
PTHREAD_NORMAL_MUTEX_INITIALIZER_NP to be closer to linux default.
2005-06-09 15:30:44 +00:00
Christopher Faylor abf60784be * thread.cc (cancelable_wait): No-op change to make sure that res is always a
valid WFMO return.
2005-06-09 05:14:02 +00:00
Christopher Faylor ed364fa9fb Change pthread::cancelable_wait to just cancelable_wait, throughout.
* thread.h (cw_sig_wait): New enum.
(fast_mutex::lock): Use cancelable_wait with resumable signal.
(cancelable_wait): Change fourth argument to cw_sig_wait enum.
* thread.cc (cancelable_wait): Ditto.  Loop on signal detection if fourth
argument == cw_sig_resume.
2005-06-09 05:11:51 +00:00
Christopher Faylor a63c42932e * cygwin.sc: Apparently nonloading sections need to go last. 2005-06-08 20:56:34 +00:00
Christopher Faylor ad96f0997b * cygwin.sc: Restore resource and reloc sections and use more modern syntax for
stabs sections.
2005-06-08 20:18:23 +00:00
Christopher Faylor 7273344558 * environ.cc (spenvs): Remove cut/paste error which associated CYGWIN_DEBUG
with HOME.
2005-06-08 15:42:58 +00:00
Corinna Vinschen ce132d0ffd * security.cc (cygwin_logon_user): Run LogonUser in the primary
process token context.  Fix potential handle leak.
2005-06-08 10:06:17 +00:00
Corinna Vinschen 7311cc1f0c * pinfo.cc (pinfo::init): Define sa_buf as PSECURITY_ATTRIBUTES and
allocate dynamically.
	(pinfo::set_acl): Replace sa_buf by dynamically allocated acl_buf.
	* sec_acl.cc (setacl): Allocate acl dynamically.
	* sec_helper.cc (sec_acl): Add test for alignment of acl when
	DEBUGGING is defined.
	(__sec_user): Same for sa_buf.
	* security.cc (verify_token): Define sd_buf as PSECURITY_DESCRIPTOR
	and allocate dynamically.
	(alloc_sd): Allocate acl dynamically.
	security.h (sec_user_nih): Change first parameter to
	SECURITY_ATTRIBUTES *.
	(sec_user): Ditto.
	* sigproc.cc (wait_sig): Define sa_buf as PSECURITY_ATTRIBUTES and
	allocate dynamically.
	* syscalls.cc (seteuid32): Define dacl_buf as PACL and allocate
	dynamically.
	* uinfo.cc (cygheap_user::init): Define sa_buf as PSECURITY_ATTRIBUTES
	and allocate dynamically.
	* winbase.h (ilockincr): Mark first argument of inline assembly as
	earlyclobber.
	(ilockdecr): Ditto.
2005-06-07 19:31:42 +00:00
Christopher Faylor b739751db9 * cygthread.cc (cygthread::detach): Make error message a little more detailed.
* fhandler.cc (fhandler_base::raw_read): Ditto for debug message.
* dcrt0.cc (do_exit): Add some more synchronization tests.
* fhandler_fifo.cc (fhandler_fifo::dup): Don't duplicate a nonexistent handle.
Use derived return value rather than always retuning 0.
* fhandler_netdrive.cc (fhandler_netdrive::exists): Wnet -> WNet.
* winsup.h (exit_states): Add a couple of new exit states.
2005-06-07 18:41:31 +00:00
Christopher Faylor 405e757cf9 reformat ChangeLog entry slightly. 2005-06-06 21:12:00 +00:00
Corinna Vinschen 7a70dda0b8 * path.cc (symlink_info::check): If GetFileAttributes returns
with ERROR_SHARING_VIOLATION, the file exists.
2005-06-06 16:58:39 +00:00
Corinna Vinschen 34667bbd39 * uname.cc (uname): Change "amd64" to "x86_64" as on Linux. 2005-06-06 16:17:10 +00:00
Corinna Vinschen 15a95a8ca6 * uname.cc (uname): Add missing break. 2005-06-06 15:58:08 +00:00
Christopher Faylor 6eb501439a * Makefile.in: Build sync.o with -fomit-frame-pointer and -O3. 2005-06-05 04:15:16 +00:00
Christopher Faylor 61496ed680 * sync.cc (muto::acquire): Remove unneeded brackets and fix whitespace. 2005-06-05 04:07:46 +00:00
Christopher Faylor c1e1d36141 * malloc.cc: Update to Doug Lea's malloc v2.8.0. 2005-06-05 03:47:36 +00:00
Christopher Faylor 6e780c8bf5 * dcrt0.cc (cygwin_dll_init): Now initializes main_environ and cygtls. Comment
to explain the caveats of this method.
* how-cygtls-works.txt: New file.
2005-06-04 02:11:50 +00:00
Christopher Faylor d8a68f645a * dlfcn.cc (get_full_path_of_dll): Use a relative path when converting so that
the standard Windows rules for finding a library will be used if no path is
given.  Stop explicitly searching /usr/bin since that is now in effect.
2005-06-03 01:07:40 +00:00
Christopher Faylor f9fb1149d5 Revert 2005-05-30 close_all_files changes.
* spawn.cc (spawn_guts): When execing, close all files after the child has
synced with us.
2005-06-02 02:36:50 +00:00
Christopher Faylor 5ac6edefaf * fhandler_disk_file.cc (fhandler_disk_file::fchown): Make sure that disk open
is called in case we're passed in a non-existent device.
2005-06-02 01:50:23 +00:00
Christopher Faylor 31d0f220ad * include/machine/stdlib.h: New file. 2005-06-01 18:24:31 +00:00
Christopher Faylor 19adafdc21 * thread.h (List_remove): Revert most of 2005-05-30 change. 2005-06-01 14:55:45 +00:00
Christopher Faylor 8d05cca34b * cygwin.sc: Don't output .reloc or .rsrc sections. Clean up stuff around
.cygheap and use a workaround to get things working with newer
(broken?) binutils.
2005-06-01 04:42:44 +00:00
Christopher Faylor 5d4a672193 * cygheap.cc (cygheap_end): Remove bogus section attribute.
* cygwin.sc: Make __cygheap_mid absolute.  Remove unused _cygheap_foo.
2005-06-01 04:00:40 +00:00
Christopher Faylor ce95c6407e * child_info.h (child_info::cygheap_h): Delete.
(child_info::dwProcessId): New field.
* cygheap.cc (init_cheap): Delete.
(dup_now): Ditto.
(cygheap_setup_for_child): Ditto.
(cygheap_setup_for_child_cleanup): Ditto.
(cygheap_fixup_in_child): Simplify.  Use new "child_copy" function to copy heap
from parent.
(_csbrk): Don't attempt allocation if within cygheap section.  Fix so that more
than one allocation will succeed.
(cygheap_init): Reset possibly-nonzero region to zero.
* cygheap.h (cygheap_setup_for_child): Delete declaration.
(cygheap_setup_for_child_cleanup): Ditto.
(cygheap_start): Define as an array.
* cygwin.sc: Modernize.  Remove unneeded sections.  Define cygheap here.
* dcrt0.cc (do_exit): Reflect argument change to close_all_files.
* dtable.cc (dtable::vfork_parent_restore): Ditto.
* dtable.h: Ditto.
* fhandler.h: Ditto.
* fork.cc (fork_copy): Call ReadProcessMemory if there is no thread
(indicating that we're execing).
(fork_child): Don't mess with hParent.
(fork_parent): Remove hParent stuff.  It happens earlier now.  Remove call to
cygheap_setup_for_child* stuff.
(fork): Put child_info_stuff in grouped structure.  Issue error if parent
handle is not set.
(child_copy): New function.
* sigproc.cc (child_info::child_info): Put cygheap settings here.  Set parent
handle.
(child_info::~child_info): Close parent handle if it exists.
* spawn.cc (spawn_guts): Reorganize so that ciresrv is allocated at only the
last minute so that cygheap changes are reflected.  Delete cygheap_setup*
calls.
* syscalls.cc (close_all_files): Add an argument to flag when the fd entry
should be released.
* winsup.h (close_all_files): Add an argument to close_all_files declaration.
Declare child_copy.
2005-06-01 03:46:56 +00:00
Christopher Faylor 9885498829 * thread.h (List_remove): Make node parameter const. Use simple comparison and
assignment rather than InterlockedCompareExchangePointer since access is
already synchronized.
2005-05-30 18:37:41 +00:00
Christopher Faylor ac5e21b028 * dlfcn.cc (set_dl_error): Use UNIX error rather than Windows error. 2005-05-30 18:20:28 +00:00
Christopher Faylor 44055eca0b * cygmagic: Remove debugging cruft missed on 2005-05-21. 2005-05-30 00:54:01 +00:00
Corinna Vinschen 7897d3fd88 * path.cc (path_conv::check): Move component to function scope. Set
PATH_RO only on *real* FH_NETDRIVEs or on non-FH_NETDRIVE virtual
	paths. Allow non-retrievable shares to be handled as files.
2005-05-29 11:04:02 +00:00
Corinna Vinschen f330e7b8e8 * include/limits.h (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Always define. 2005-05-29 10:05:56 +00:00
Christopher Faylor 65a7ca7b7b * thread.h (pthread_key::set): Inline.
(pthread_key::get): Ditto.
* thread.cc (pthread::set): Delete.
(pthread::get): Ditto.
2005-05-29 02:42:36 +00:00
Christopher Faylor 37b01058e7 * cygwin.din: Remove signal front end from pthread_[gs]etspecific. 2005-05-29 02:26:29 +00:00
Christopher Faylor 5c0a13d486 * fhandler_tty.cc (fhandler_tty_slave:tcflush): Use signed comparison. 2005-05-29 00:05:49 +00:00
Christopher Faylor 03bb8acaa7 * times.cc (time_ms::usecs): Coerce comparison to signed or whole test is a
no-op.
2005-05-28 21:31:17 +00:00
Christopher Faylor 1bbf1ac6a5 * cygheap.h: Reference _cygheap_start via .cygheap section.
* environ.cc: Fix force_into_environment typo throughout.
(spenvs): Export CYGWIN_DEBUG if DEBUGGING.
2005-05-27 18:26:19 +00:00
Christopher Faylor 720c77ee72 * include/cygwin/version.h: Bump DLL minor number to 18. 2005-05-26 18:19:26 +00:00
Corinna Vinschen 181c20f1ac * ChangeLog: Remove accidentally checked in entry. 2005-05-25 08:41:28 +00:00
Christopher Faylor 125b724dd8 * fhandler.h (fhandler_base::mkdir): New virtual method.
(fhandler_base::rmdir): Ditto.
(fhandler_disk_file:mkdir): New method.
(fhandler_disk_file:rmdir): Ditto.
* dir.cc (mkdir): Implement with fhandlers.
(rmdir): Ditto.
* fhandler.cc (fhandler_base::mkdir): New virtual method.
(fhandler_base::rmdir): Ditto.
(fhandler_disk_file::mkdir): New method.
(fhandler_disk_file::rmdir): Ditto.

fhandler_random.cc: white space.
2005-05-25 04:32:59 +00:00
Christopher Faylor 2a41ee9e0c * include/cygwin/version.h: Bump API minor number to 129. 2005-05-25 03:46:10 +00:00
Christopher Faylor cb3f5f0862 * cygwin.din: Export mkdtemp.
* mktemp.cc: New file.
* Makefile.in (DLL_OFILES): Add mktemp.o
2005-05-25 03:40:07 +00:00
Corinna Vinschen e0242a025a * include/stdint.h (INTMAX_C, UINTMAX_C): Fix definition. 2005-05-23 13:13:00 +00:00
Christopher Faylor f82ca06eda * spawn.cc (find_exec): Accept a PATH-like string in place of an environment
variable.
* dlfcn.cc (get_full_path_of_dll): Search /usr/bin (for windows compatibility)
and /usr/lib (for UNIX compatibility) when looking for shared libraries.
* environ.cc (conv_envvars): Put back LD_LIBRARY_PATH since it is used by
get_full_path_of_dll().
* errno.cc (errmap): Map MOD_NOT_FOUND to ENOENT.
* cygmagic: Remove debugging cruft.
2005-05-22 03:54:29 +00:00
Corinna Vinschen 89e5f7f81e * include/cygwin/in.h: Add comment. 2005-05-19 21:22:37 +00:00
Corinna Vinschen 58065cb805 * include/cygwin/in.h: Define IPPROTO_xxx values as macros to
accomodate SUSv3.
2005-05-19 21:18:17 +00:00
Christopher Faylor 776b73dd33 * include/limits.h: Include features.h, as on linux. 2005-05-19 19:45:28 +00:00
Christopher Faylor 071f64d934 * include/endian.h: New file. 2005-05-19 19:44:31 +00:00
Corinna Vinschen 424946e8ab * cygwin.sc: Add Dwarf-2 debug sections. 2005-05-19 17:04:28 +00:00
Corinna Vinschen 989ea1c99e * mmap.cc (mmap64): Make granularity an automatic variable. 2005-05-19 08:43:17 +00:00
Christopher Faylor 969d6089ce * fhandler.h (fhandler_cygdrive::seekdir): Delete declaration.
(fhandler_cygdrive::seekdir): Delete.
* fhandler.h (fhandler_cygdrive::iscygdrive_root): Delete method.
(fhandler_cygdrive::telldir): Delete declaration.
* fhandler_disk_file.cc: Remove all uses of fhandler_cygdrive::iscygdrive_root.
(fhandler_disk_file::mkdir): New method.
(fhandler_disk_file::rmdir): Ditto.
(fhandler_cygdrive::telldir): Delete.
2005-05-19 05:43:55 +00:00
Christopher Faylor ac437c3e0c * external.cc: Move pids declaration to file scope and use less enthusiastic
constructor.
* pinfo.h (winpids::winpids): Remove default setting.
* fhandler_fifo.cc (fhandler_fifo::open_not_mine): Accommodate removal of
default setting.
* fhandler_proc.cc (fhandler_proc::readdir): Ditto.
2005-05-19 01:25:20 +00:00
Christopher Faylor 24515d6563 * cygtls.h (_local_storage::unknown_thread_name): New buffer.
* tlsoffsets.h: Regenerate.
* cygthread.cc (cygthread::name): Use new thread-local buffer.
* exceptions.cc (handle_exceptions): Avoid unnecessary initialization of static
variables to zero.
* fork.cc (slow_pid_reuse) Ditto.
2005-05-18 23:30:02 +00:00
Corinna Vinschen 692fccabfb * mmap.cc (mmap64): Avoid compiler warning.
* ntea.cc (NTReadEA): Ditto.
	* hires.h (hires_base): Remove useless usecs function.
2005-05-18 17:23:17 +00:00
Corinna Vinschen 49cc728adc * fhandler_netdrive.cc (fhandler_netdrive::telldir): Remove since it's
equivalent to fhandler_virtual::telldir now anyway.
	* fhandler.h (class fhandler_netdrive): Remove telldir.
2005-05-18 10:32:37 +00:00
Corinna Vinschen bffaf54d76 * fhandler_netdrive.cc (fhandler_netdrive::telldir): Implement.
(fhandler_netdrive::seekdir): Implement.
	(fhandler_netdrive::closedir): Call rewinddir to have only one point
	of calling WNetCloseEnum.
2005-05-18 10:23:40 +00:00
Corinna Vinschen 5b59a2cc0d * fhandler.h (class fhandler_netdrive): Add method rewinddir.
* fhandler_netdrive.cc (struct netdriveinf): New structure to
	store thread arguments.
	(thread_netdrive): Thread handling all potentially blocking
	WNet... calls.
	(create_thread_and_wait): Start and wait for above thread.
	(fhandler_netdrive::exists): Change to call create_thread_and_wait
	instead of calling WNet... function.
	(fhandler_netdrive::readdir): Ditto.  Fix error handling.
	(fhandler_netdrive::rewinddir): New method.
2005-05-17 20:34:15 +00:00
Corinna Vinschen 0d5ba26ccd * external.cc (cygwin_internal): Avoid compiler warning. 2005-05-17 08:46:41 +00:00
Christopher Faylor 4f7544bc97 * dcrt0.cc (dll_crt0_0): Don't do fixup_after_exec if dynamically loaded since
the state of fds is unknown at this point.
2005-05-17 01:27:31 +00:00
Christopher Faylor 5c8e6fbd8c * include/sys/cygwin.h (enum cygwin_getinfo_types): Add CW_DEBUG_SELF.
* external.cc (cygwin_internal): Implement CW_DEBUG_SELF.
* init.cc (dll_entry): Minor rearrangement of code.
2005-05-17 01:21:06 +00:00
Christopher Faylor b55ba2f3da * path.cc (path_conv::check): Remove embedded dots before slashes. 2005-05-17 01:08:58 +00:00
Corinna Vinschen 451c738bef * environ.cc (conv_envvars): Remove LD_LIBRARY_PATH entirely.
It doesn't belong here.
2005-05-16 15:48:36 +00:00
Corinna Vinschen 1f7b9e8bc6 * environ.cc (conv_envvars): Treat LD_LIBRARY_PATH as path list. 2005-05-15 12:04:13 +00:00
Corinna Vinschen dad546a5eb * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Check
return code from GetFileSize and set file size to 0 if necessary.
	* fhandler_netdrive.cc (fhandler_netdrive::fstat): Set permissions
	to read/execute for all.
2005-05-14 21:12:10 +00:00
Christopher Faylor 84778b9d8c really fix typo. 2005-05-13 22:40:19 +00:00
Christopher Faylor 9156326733 fix typo 2005-05-13 22:09:32 +00:00
Christopher Faylor 17e5c6a8f0 * path.cc (normalize_posix_path): Do normalization on . and .. after a '//'. 2005-05-13 21:05:46 +00:00
Corinna Vinschen 50361e07d1 * fhandler.h (fhandler_netdrive::readdir): Remove useless comment. 2005-05-13 20:29:31 +00:00
Corinna Vinschen e01eac68ed * autoload.cc (WNetGetResourceParentA): Import.
(WNetOpenEnumA): Import.
	(WNetEnumResourceA): Import.
	(WNetCloseEnum): Import.
	* fhandler.h (fhandler_netdrive::telldir): Add declaration.
	(fhandler_netdrive::seekdir): Ditto.
	(fhandler_netdrive::closedir): Ditto.
	* fhandler_netdrive.cc: Drop explicit including windows.h.  Include
	winnetwk.h instead of shlwapi.h.  Include dirent.h.
	(fhandler_netdrive::readdir): Implement.
	(fhandler_netdrive::telldir): New method.
	(fhandler_netdrive::seekdir): New method.
	(fhandler_netdrive::closedir): Ditto.
2005-05-13 20:20:02 +00:00
Christopher Faylor 063f1df2aa Remove PC_FULL from path_conv usage throughout.
* path.h (enum pathconv_arg): Change PC_FULL to PC_NOUILL.
* path.cc (path_conv::check): Test for PC_NOFULL rather than !PC_FULL.
(cygwin_conv_to_win32_path): Use PC_NOFULL to force non-absolute path.
2005-05-13 15:46:07 +00:00
Christopher Faylor eb6cd95fec * fhandler_netdrive.cc (fhandler_netdrive::exists): Assert that "//" exists. 2005-05-13 13:23:38 +00:00
Christopher Faylor 66582dd6e7 * cygtls.cc (_cygtls::remove): Eliminate compiler warning.
* dir.cc (mkdir): Check path for writability.
(rmdir): Ditto.  Remove check for special directories.
* path.cc (path_conv::check): Set PATH_RO for virtual devices.  Set error if
read-only and asked for writability.
* path.h (pathconv_arg): Add PC_WRITABLE.
(path_types): Add PATH_RO.
(path_conv::isro): Add (currently unused) check for read-only filesystem.
Return "ENOSHARE" when we know a share doesn't exist.
* include/sys/mount.h: Add MOUNT_RO flag.
* autoload.cc (WNetGetResourceInformationA): Import.
* fhandler_netdrive.cc (fhandler_netdrive::exists): Detect actual existence of
remote system rather than always assuming that it exists.
2005-05-13 03:21:39 +00:00