Christopher Faylor
47af76d8c8
* cygwin.din: export strtoll and strtoull
2001-10-01 19:47:37 +00:00
Christopher Faylor
47063f00e4
Add "path.h" include throughout, where needed. Use new path_conv methods and
...
operators to simplify testing for directory and attributes, throughout.
* path.h (path_conv::exists): New method.
(path_conv::has_attribute): Ditto.
(path_conv::isdir): Ditto.
(path_conv::DWORD &): New operator.
(path_conv::int &): Ditto.
* dir.cc (rmdir): Eliminate a goto.
* dtable.cc (dtable::build_fhandler): Accept opt and suffix info for
path_conv.check. Return fh == NULL on path_conv error. Pass unit to set_name
as appropriate.
(dtable::reset_unix_path_name): New method.
* dtable.h (dtable): Declare new method. Reflect arg changes to
build_fhandler.
* fhandler.cc (fhandler_disk_dummy_name): Eliminate.
(fhandler_base::set_name): Expect paths to be NULL. Build unix_path_name from
win32_path_name when it is a device.
(fhandler_base::reset_unix_path_name): New method.
(fhandler_base::raw_read): Report EISDIR when ERROR_INVALID_FUNCTION or
ERROR_INVALID_PARAMETER and reading a directory.
(fhandler_disk_file::fstat): Don't call stat_dev since we should now never be
calling fhandler_disk_file methods with devices.
(fhandler_base::fhandler_base): Clear {unix,win32}_path_name.
(fhandler_base::~fhandler_base): Always free {unix,win32}_path_name.
(fhandler_disk_file::fhandler_disk_file): Remove set_no_free_names kludge.
(fhandler_disk_file::open): Ditto.
* fhandler.h (fhandler_base::no_free_names): Eliminate.
(fhandler_base::set_no_free_names): Ditto.
* fhandler_tty.cc (fhandler_tty_slave::fhandler_tty_slave): Don't set
unix_path_name here.
* path.cc (fchdir): Lock fd table throughout. Use new
dtable::reset_unix_path_name method to reset path.
* syscalls.cc (stat_worker): Reorganize to always call fstat method. Pass
path_conv method to fhandler_*::open.
(chroot): Elminate a goto.
2001-10-01 04:10:07 +00:00
Christopher Faylor
c25c4c5ffc
* environ.cc (winenv): Allocate exact amount of space needed for forced windows
...
environment variable rather than just using MAX_PATH.
2001-09-30 21:37:53 +00:00
Christopher Faylor
bb6c3d5832
* Makefile.in: Depend on stamp to ensure rebuilding. Remove stamp file when
...
we've just built the DLL.
2001-09-30 21:10:38 +00:00
Robert Collins
38102913c8
Mon Oct 1 00:34:00 2001 Robert Collins <rbtcollins@hotmail.com>
...
* thread.cc (pthread_cond_dowait): Hopefully eliminate a race on multiple thread
wakeups.
2001-09-30 14:39:55 +00:00
Robert Collins
86336f4fea
Sat Sep 29 18:26:00 2001 Robert Collins <rbtcollins@hotmail.com>
...
* pthread.cc (pthread_cond_timedwait): Deleted - exported from thread.cc.
(pthread_cond_wait): Deleted - exported from thread.cc.
* thread.cc (pthread_cond::BroadCast): Update to use the new syntax for
verifyable_object_isvalid ().
(pthread_cond::Signal): Ditto. Also attempt to fix the lost signal race
with pthread_cond::TimedWait().
(check_valid_pointer): Change definiton to void const *.
(verifyable_object_isvalid): Add new parameter to allow identification of
static initializers, and return a enum rather than magic numbers.
(__pthread_create): Ditto.
(__pthread_cleanup): Ditto.
(__pthread_attr_init): Ditto.
(__pthread_attr_getinheritsched): Ditto.
(__pthread_attr_getschedparam): Ditto.
(__pthread_attr_getschedpolicy): Ditto.
(__pthread_attr_getscope): Ditto.
(__pthread_attr_setdetachstate): Ditto.
(__pthread_attr_getdetachstate): Ditto.
(__pthread_attr_setinheritsched): Ditto.
(__pthread_attr_setschedparam): Ditto.
(__pthread_attr_setschedpolicy): Ditto.
(__pthread_attr_setscope): Ditto.
(__pthread_attr_setstacksize): Ditto.
(__pthread_attr_getstacksize): Ditto.
(__pthread_attr_destroy): Ditto.
(__pthread_join): Ditto.
(__pthread_detach): Ditto.
(__pthread_suspend): Ditto.
(__pthread_continue): Ditto.
(__pthread_getschedparam): Ditto.
(__pthread_getsequence_np): Ditto.
(__pthread_key_create): Ditto.
(__pthread_key_delete): Ditto.
(__pthread_setschedparam): Ditto.
(__pthread_setspecific): Ditto.
(__pthread_getspecific): Ditto.
(__pthread_cond_destroy): Ditto.
(__pthread_cond_init): Ditto.
(__pthread_cond_broadcast): Ditto.
(__pthread_cond_signal): Ditto.
(__pthread_condattr_init): Ditto.
(__pthread_condattr_getpshared): Ditto.
(__pthread_condattr_setpshared): Ditto.
(__pthread_condattr_destroy): Ditto.
(__pthread_kill): Ditto.
(__pthread_mutex_init): Ditto.
(__pthread_mutex_getprioceiling): Ditto.
(__pthread_mutex_lock): Ditto.
(__pthread_mutex_trylock): Ditto.
(__pthread_mutex_unlock): Ditto.
(__pthread_mutex_destroy): Ditto.
(__pthread_mutex_setprioceiling): Ditto.
(__pthread_mutexattr_getprotocol): Ditto.
(__pthread_mutexattr_getpshared): Ditto.
(__pthread_mutexattr_gettype): Ditto.
(__pthread_mutexattr_init): Ditto.
(__pthread_mutexattr_destroy): Ditto.
(__pthread_mutexattr_setprotocol): Ditto.
(__pthread_mutexattr_setprioceiling): Ditto.
(__pthread_mutexattr_getprioceiling): Ditto.
(__pthread_mutexattr_setpshared): Ditto.
(__pthread_mutexattr_settype): Ditto.
(__sem_init): Ditto.
(__sem_destroy): Ditto.
(__sem_wait): Ditto.
(__sem_trywait): Ditto.
(__sem_post): Ditto.
(__pthread_cond_dowait): New function, contains core logic from
__pthread_cond_wait and __pthread_cond_timedwait. Decrement (*cond)->waiting
before reentering the cond access mutex to allow detection of lost signals.
(__pthread_cond_timedwait): Rename to pthread_cond_timedwait, and call
__pthread_cond_dowait after calculating the wait length.
(__pthread_cond_wait): Rename to pthread_cond_wait, and call
__pthread_cond_dowait.
* thread.h: New enum for use with verifyable_object_isvalid.
Remove the extern exporting of __pthread_cond_timedwait and __pthread_cond_wait.
2001-09-29 09:01:01 +00:00
Christopher Faylor
a1dc0932f4
* pipe.cc (fhandler_pipe::fixup_after_fork): New method.
...
* fhandler.h (fhandler_pipe::fixup_after_fork): Declare new method.
2001-09-29 01:23:06 +00:00
Christopher Faylor
1795c53d86
* passwd.cc (read_etc_passwd): Bother with unlocking when not in cygwin
...
initialization.
* grp.cc (read_etc_group): Ditto.
2001-09-28 07:23:18 +00:00
Christopher Faylor
8b51edbfa6
* passwd.cc (read_etc_passwd): Don't bother with locking when
...
in cygwin initialization since there is only one thread.
* grp.cc (read_etc_group): Ditto.
2001-09-28 07:01:22 +00:00
Christopher Faylor
9c61aed684
* pipe.cc (fhandler_pipe::hit_eof): Return correct value when there is no EOF
...
event available.
2001-09-28 06:06:45 +00:00
Corinna Vinschen
f4f30cf140
* mmap.cc (mmap): Move setting the access after evaluating fd.
...
Remove useless comment. Explain copy-on-write problem of 9x
more detailed. Don't set access to FILE_MAP_COPY on 9x only
when anonymous mapping is requested.
(fhandler_disk_file::mmap): Remove useless device check.
Add debug output.
2001-09-27 22:39:50 +00:00
Robert Collins
c814d12f04
Thu Sep 27 22:00:00 2001 Robert Collins rbtcollins@itdomain.com.au
...
* Makefile.in: Only stamp winver_stamp on success.
2001-09-27 21:35:16 +00:00
Christopher Faylor
5fe74396e9
* select.cc (peek_pipe): REALLY only grab mutex when we actually got something
...
from the pipe.
2001-09-26 22:24:09 +00:00
Robert Collins
c918cf9421
Tue Sep 25 21:25:00 2001 Robert Collins <rbtcollins@hotmail.com>
...
* thread.cc (pthread_cond::BroadCast): Use address with verifyable_object_isvalid().
(pthread_cond::Signal): Ditto.
(__pthread_create): Ditto.
(__pthread_cleanup): Ditto.
(__pthread_attr_init): Ditto.
(__pthread_attr_getinheritsched): Ditto.
(__pthread_attr_getschedparam): Ditto.
(__pthread_attr_getschedpolicy): Ditto.
(__pthread_attr_getscope): Ditto.
(__pthread_attr_setdetachstate): Ditto.
(__pthread_attr_getdetachstate): Ditto.
(__pthread_attr_setinheritsched): Ditto.
(__pthread_attr_setschedparam): Ditto.
(__pthread_attr_setschedpolicy): Ditto.
(__pthread_attr_setscope): Ditto.
(__pthread_attr_setstacksize): Ditto.
(__pthread_attr_getstacksize): Ditto.
(__pthread_attr_destroy): Ditto.
(__pthread_join): Ditto.
(__pthread_detach): Ditto.
(__pthread_suspend): Ditto.
(__pthread_continue): Ditto.
(__pthread_getschedparam): Ditto.
(__pthread_getsequence_np): Ditto.
(__pthread_key_create): Ditto.
(__pthread_key_delete): Ditto.
(__pthread_setschedparam): Ditto.
(__pthread_setspecific): Ditto.
(__pthread_getspecific): Ditto.
(__pthread_cond_destroy): Ditto.
(__pthread_cond_init): Ditto.
(__pthread_cond_broadcast): Ditto.
(__pthread_cond_signal): Ditto.
(__pthread_cond_timedwait): Ditto.
(__pthread_cond_wait): Ditto.
(__pthread_condattr_init): Ditto.
(__pthread_condattr_getpshared): Ditto.
(__pthread_condattr_setpshared): Ditto.
(__pthread_condattr_destroy): Ditto.
(__pthread_kill): Ditto.
(__pthread_mutex_init): Ditto.
(__pthread_mutex_getprioceiling): Ditto.
(__pthread_mutex_lock): Ditto.
(__pthread_mutex_trylock): Ditto.
(__pthread_mutex_unlock): Ditto.
(__pthread_mutex_destroy): Ditto.
(__pthread_mutex_setprioceiling): Ditto.
(__pthread_mutexattr_getprotocol): Ditto.
(__pthread_mutexattr_getpshared): Ditto.
(__pthread_mutexattr_gettype): Ditto.
(__pthread_mutexattr_init): Ditto.
(__pthread_mutexattr_destroy): Ditto.
(__pthread_mutexattr_setprotocol): Ditto.
(__pthread_mutexattr_setprioceiling): Ditto.
(__pthread_mutexattr_getprioceiling): Ditto.
(__pthread_mutexattr_setpshared): Ditto.
(__pthread_mutexattr_settype): Ditto.
(__sem_init): Ditto.
(__sem_destroy): Ditto.
(__sem_wait): Ditto.
(__sem_trywait): Ditto.
(__sem_post): Ditto.
(verifyable_object_isvalid): Recieve a pointer to a pointer for verification.
(__pthread_mutexattr_getprotocol): Fix typo in magic number.
(__pthread_mutexattr_getpshared): Ditto.
(__pthread_mutexattr_gettype): Ditto.
* thread.h (verifyable_object_isvalid): Change prototype to recieve a pointer to a
pointer for verification.
* include/pthread.h: Fix typo for __cleanup_routine_type typedef. (Contrib from Net).
2001-09-25 11:45:26 +00:00
Christopher Faylor
79776fc2cc
* select.cc (fhandler_tty_common::ready_for_read): Rewrite to correctly
...
call peek_pipe.
2001-09-25 06:19:10 +00:00
Christopher Faylor
3263838430
* select.cc (peek_pipe): Only grab mutex when we actually got something from
...
the pipe.
2001-09-24 22:49:12 +00:00
Christopher Faylor
35f879a6d0
* fhandler.h (fhandler_pipe::hit_eof): New method.
...
(writepipe_exists): New class element.
(orig_pid): Ditto.
(id): Ditto.
(is_slow): Eliminate.
* pipe.cc (fhandler_pipe::set_close_on_exec): Set inheritance on
writepipe_exists, if it exists.
(fhandler_pipe::hit_eof): New method, modelled after tty.
(fhandler_pipe::dup): Duplicate writepipe_exists, if it exists.
(make_pipe): Set up a dummy event for pipes on windows 9x. The nonexistence
of this event means that the write side of the pipe has closed.
(_dup): Move to syscalls.cc
(_dup2): Ditto.
* dtable.cc (dtable::build_fhandler): Fill out set_names here, if appropriate.
* syscalls.cc (_open): Call set_names in build_fhandler.
2001-09-24 21:50:44 +00:00
Corinna Vinschen
4367ec036f
* syscalls.cc (_open): Set name in fhandler object after successful
...
creation.
(stat_dev): Set device type to block device in FH_FLOPPY case.
2001-09-23 15:35:02 +00:00
Corinna Vinschen
e3fbb5f5ce
* dtable.cc (dtable::build_fhandler): Initialize unit when using
...
optional path_conv argument.
2001-09-23 14:39:16 +00:00
David Starks-Browning
991f7832e6
expand entry "How can I get bash filename completion to be case insensitive?"
2001-09-23 11:19:13 +00:00
David Starks-Browning
b66101cda7
new entry "What versions of Windows are supported?"
2001-09-23 11:13:08 +00:00
David Starks-Browning
45b9eb3144
1.1.x -> 1.3.x in "recent history"
2001-09-23 10:06:32 +00:00
Christopher Faylor
9854ada754
* 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.
2001-09-22 21:44:07 +00:00
David Starks-Browning
880230dc7c
new entry "How much disk space does Cygwin require?"
2001-09-22 19:47:17 +00:00
David Starks-Browning
ca60dce821
again revise license terms
2001-09-22 19:32:47 +00:00
Christopher Faylor
5e733918c0
* 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.
2001-09-22 16:55:02 +00:00
David Starks-Browning
142920f65a
revise license explanation
2001-09-22 08:45:27 +00:00
Christopher Faylor
99426172cc
Add recent developments.
2001-09-22 01:37:47 +00:00
Christopher Faylor
e0197c5ea5
typo, words.
2001-09-22 01:29:07 +00:00
Christopher Faylor
53df7e2aaf
* Makefile.in (mingw_getopt.o): Ensure that newlib include directories are not
...
searched.
2001-09-22 00:40:37 +00:00
David Starks-Browning
a997e6ea10
fix error
2001-09-21 20:42:47 +00:00
David Starks-Browning
38300b88f1
Update contents.
...
Expanded anti-virus information.
How to uninstall a package.
2001-09-21 20:40:50 +00:00
David Starks-Browning
99059a8c38
new entry "Can I build a Cygwin program that does not require cygwin1.dll at runtime?"
2001-09-21 18:20:21 +00:00
Christopher Faylor
7700f3718e
* Makefile.in (MINGW_INCLUDES): Still need cygwin/include directory.
2001-09-21 01:01:27 +00:00
David Starks-Browning
24f19d84e0
New entry "Why doesn't //c (for C:) work anymore?"
2001-09-20 21:23:17 +00:00
Christopher Faylor
c50d56bc43
* 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.
2001-09-20 20:58:29 +00:00
Egor Duda
b1711a1f96
* 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.
2001-09-20 15:44:41 +00:00
Corinna Vinschen
a2db3c9288
* fhandler_socket.cc (fhandler_socket::fixup_after_exec): Close
...
socket only when not using Winsock2.
2001-09-20 11:35:49 +00:00
Corinna Vinschen
8e54fb88f3
* 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().
2001-09-20 11:29:48 +00:00
Corinna Vinschen
f4e6b76a05
* 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-20 08:02:01 +00:00
Earnie Boyd
7141383a86
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.
2001-09-19 23:56:12 +00:00
Christopher Faylor
2f02f21831
Add -t option.
2001-09-19 22:06:33 +00:00
Christopher Faylor
9e5ad282f0
* lib/getopt.c (__progname): Don't declare if not compiling for cygwin.
2001-09-19 16:24:10 +00:00
Christopher Faylor
de6305a0e4
* Makefile.in: Filter newlib includes from mingw compilation.
2001-09-19 16:22:47 +00:00
Corinna Vinschen
09376842d4
* lib/getopt.c (getopt_long): Avoid compiler warning.
2001-09-19 16:08:33 +00:00
Christopher Faylor
596f3269b0
* lib/getopt.c: Use __progname==__argv[0] when not compiling for cygwin.
...
* scandir.cc (scandir): Use correct default when compar == NULL.
2001-09-19 15:54:12 +00:00
Corinna Vinschen
487fb5f1c4
* fhandler_socket.cc (fhandler_socket::fhandler_socket): Revert
...
memory allocation to use cmalloc again.
2001-09-19 15:50:54 +00:00
Earnie Boyd
18508302f9
2001-09-19 Earnie Boyd <earnie@SF.net>
...
* Makefile.in: Remove the /usr from the install target.
(VERSION): Increment.
include/_mingw.h: Ditto.
2001-09-19 15:37:19 +00:00
Christopher Faylor
5733509e25
* cygwin.din (__argv): Export.
...
(__argc): Ditto.
(__progname): Ditto.
* include/getopt.h (getopt_long): constify arguments.
* lib/getopt.c: Import new file from NetBSD.
2001-09-19 01:07:11 +00:00
Corinna Vinschen
7cffc34564
* mmap.cc (mmap): Don't reuse anonymous memory in MAP_FIXED case.
2001-09-18 17:10:09 +00:00