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
Christopher Faylor
c98b577d40
* include/io.h: Add access declaration.
2001-09-17 21:29:19 +00:00
Christopher Faylor
8238a68bb2
* syscalls.cc (rmdir): Set cwd to some other location if attempting to rmdir
...
current working directory.
2001-09-17 18:10:02 +00:00
Earnie Boyd
3e985c99c0
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-17 16:15:54 +00:00
Earnie Boyd
f244c34bae
* Makefile.in: Increment version.
...
* include/_mingw.h: Ditto.
2001-09-17 12:38:45 +00:00
Christopher Faylor
60136eb0b2
* dtable.h (not_open): Assure inline.
...
* fhandler.h (operator []): Make const.
* sync.cc (muto::~muto): Fix typo which stopped muto event handle from ever
being closed.
2001-09-17 03:05:05 +00:00
Egor Duda
0aca521ab8
* path.cc (symlink): Check arguments for validity.
...
(getcwd): Ditto.
* syscalls.cc (ftruncate): Ditto.
* times.cc (times): Ditto.
* uname.cc (uname): Ditto.
2001-09-16 14:26:11 +00:00
Christopher Faylor
d595839939
* net.cc (dup_servent_ptr): Detect old Windows 95 misaligned structure and
...
realign appropriately.
2001-09-16 02:56:58 +00:00
Christopher Faylor
1d1c6baa7b
minor typo fixes.
2001-09-16 02:56:48 +00:00
Egor Duda
615643cb12
* 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.
2001-09-15 19:54:04 +00:00
Christopher Faylor
74509af276
* 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.
2001-09-15 04:36:43 +00:00
Christopher Faylor
d409c077df
*** empty log message ***
2001-09-15 00:50:28 +00:00
Christopher Faylor
9661a0c8b7
* 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.
2001-09-15 00:47:44 +00:00
Egor Duda
696a88a431
Hints and tips on debugging cygwin
2001-09-14 17:43:17 +00:00
Christopher Faylor
772944d3a5
add copyrights.
2001-09-14 16:57:32 +00:00
Christopher Faylor
64a2f70b43
more words
2001-09-14 16:13:00 +00:00
Egor Duda
d353d5d6f8
* dumper.cc (dumper::dumper): Print error code in case of error.
...
(dumper::add_thread): Ditto.
(dumper::collect_memory_sections): Ditto.
(dumper::dump_memory_region): Ditto.
(dumper::collect_process_information): Ditto.
(print_section_name): Fix formatting.
2001-09-14 15:07:31 +00:00
Corinna Vinschen
4856e91471
* dcrt0.cc (_dll_crt0()): Don't call wincap.init() here.
2001-09-14 08:23:46 +00:00
Christopher Faylor
5654f240f1
*** empty log message ***
2001-09-14 04:39:56 +00:00
Christopher Faylor
25e40ae6aa
* fork.cc (vfork): Avoid recursive vforks.
2001-09-14 04:37:57 +00:00
Christopher Faylor
02a9889121
* 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.
2001-09-14 04:22:05 +00:00
Christopher Faylor
cd6ed3f9f5
* 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.
2001-09-14 03:01:47 +00:00
Christopher Faylor
e2e078278c
* 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.
2001-09-14 00:49:00 +00:00
Christopher Faylor
3e2d8af0b9
* cygheap.cc (ccalloc): Pass correct length to creturn so that cygheap_max is
...
correctly calculated.
2001-09-13 21:15:34 +00:00
Egor Duda
3900c377d8
* 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.
2001-09-13 19:00:48 +00:00
Earnie Boyd
e9f2bf3049
2001-09-13 Earnie Boyd <earnie@SF.net>
...
* lib/Makefile.in (inst_includedir): Change to always use w32api
subdirectory for target == cygwin.
(inst_libdir): Ditto.
2001-09-13 17:45:55 +00:00
Egor Duda
50ab44e0a7
* libltp/lib/tst_sig.c: Pass SIGSEGV to application to consider
...
whether it's expected or not.
* winsup.api/known_bugs.tcl: lseek10 is known to fail because mknod
is not implemented.
* winsup.api/ltp/rename02.c: Fix formatting.
* libltp/lib/libtestsuite.c: New file.
* winsup.api/signal-into-win32-api.c: New test.
* winsup.api/ltp/access04.c: Ditto.
* winsup.api/ltp/access05.c: Ditto.
* winsup.api/ltp/alarm07.c: Ditto.
* winsup.api/ltp/chdir04.c: Ditto.
* winsup.api/ltp/chmod01.c: Ditto.
* winsup.api/ltp/close01.c: Ditto.
* winsup.api/ltp/close02.c: Ditto.
* winsup.api/ltp/creat01.c: Ditto.
* winsup.api/ltp/creat03.c: Ditto.
* winsup.api/ltp/exit01.c: Ditto.
* winsup.api/ltp/exit02.c: Ditto.
* winsup.api/ltp/fchdir01.c: Ditto.
* winsup.api/ltp/fchdir02.c: Ditto.
* winsup.api/ltp/fork02.c: Ditto.
* winsup.api/ltp/fork03.c: Ditto.
* winsup.api/ltp/fork06.c: Ditto.
* winsup.api/ltp/fork07.c: Ditto.
* winsup.api/ltp/fork09.c: Ditto.
* winsup.api/ltp/fork10.c: Ditto.
* winsup.api/ltp/fork11.c: Ditto.
* winsup.api/ltp/fstat02.c: Ditto.
* winsup.api/ltp/fstat03.c: Ditto.
* winsup.api/ltp/fstat04.c: Ditto.
* winsup.api/ltp/ftruncate01.c: Ditto.
* winsup.api/ltp/ftruncate02.c: Ditto.
* winsup.api/ltp/ftruncate03.c: Ditto.
* winsup.api/ltp/getgid02.c: Ditto.
* winsup.api/ltp/getgid03.c: Ditto.
* winsup.api/ltp/getpgid01.c: Ditto.
* winsup.api/ltp/getpgid02.c: Ditto.
* winsup.api/ltp/getpid02.c: Ditto.
* winsup.api/ltp/getppid02.c: Ditto.
* winsup.api/ltp/getuid02.c: Ditto.
* winsup.api/ltp/getuid03.c: Ditto.
* winsup.api/ltp/kill01.c: Ditto.
* winsup.api/ltp/kill02.c: Ditto.
* winsup.api/ltp/kill03.c: Ditto.
* winsup.api/ltp/kill04.c: Ditto.
* winsup.api/ltp/lseek06.c: Ditto.
* winsup.api/ltp/lseek07.c: Ditto.
* winsup.api/ltp/lseek08.c: Ditto.
* winsup.api/ltp/lseek09.c: Ditto.
* winsup.api/ltp/lseek10.c: Ditto.
* winsup.api/ltp/mmap02.c: Ditto.
* winsup.api/ltp/mmap03.c: Ditto.
* winsup.api/ltp/mmap04.c: Ditto.
* winsup.api/ltp/mmap05.c: Ditto.
* winsup.api/ltp/mmap06.c: Ditto.
* winsup.api/ltp/mmap07.c: Ditto.
* winsup.api/ltp/mmap08.c: Ditto.
* winsup.api/ltp/munmap01.c: Ditto.
* winsup.api/ltp/munmap02.c: Ditto.
* winsup.api/ltp/open02.c: Ditto.
* winsup.api/ltp/pipe01.c: Ditto.
* winsup.api/ltp/pipe08.c: Ditto.
* winsup.api/ltp/pipe09.c: Ditto.
* winsup.api/ltp/pipe10.c: Ditto.
* winsup.api/ltp/pipe11.c: Ditto.
* winsup.api/ltp/poll01.c: Ditto.
* winsup.api/ltp/read04.c: Ditto.
* winsup.api/ltp/readlink01.c: Ditto.
* winsup.api/ltp/readlink03.c: Ditto.
* winsup.api/ltp/rename01.c: Ditto.
* winsup.api/ltp/rename08.c: Ditto.
* winsup.api/ltp/rename10.c: Ditto.
* winsup.api/ltp/rmdir01.c: Ditto.
* winsup.api/ltp/stat01.c: Ditto.
* winsup.api/ltp/stat02.c: Ditto.
* winsup.api/ltp/stat03.c: Ditto.
* winsup.api/ltp/symlink03.c: Ditto.
* winsup.api/ltp/symlink04.c: Ditto.
* winsup.api/ltp/symlink05.c: Ditto.
* winsup.api/ltp/sync02.c: Ditto.
* winsup.api/ltp/time02.c: Ditto.
* winsup.api/ltp/times02.c: Ditto.
* winsup.api/ltp/times03.c: Ditto.
* winsup.api/ltp/truncate01.c: Ditto.
* winsup.api/ltp/truncate02.c: Ditto.
* winsup.api/ltp/umask02.c: Ditto.
* winsup.api/ltp/umask03.c: Ditto.
* winsup.api/ltp/wait401.c: Ditto.
* winsup.api/ltp/wait402.c: Ditto.
* winsup.api/ltp/write02.c: Ditto.
* winsup.api/ltp/write03.c: Ditto.
2001-09-13 17:30:23 +00:00
Egor Duda
4e8b5fc387
* dumper.cc (main): Properly recognize negative pids (used by w9x).
2001-09-13 15:06:25 +00:00
Earnie Boyd
36d19bdddb
2001-09-13 Earnie Boyd <earnie@SF.net>
...
* 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.
2001-09-13 12:06:28 +00:00
Christopher Faylor
dc02f343bf
* sync.cc (muto::acquire): Fix while/if typo.
2001-09-13 01:07:25 +00:00
Corinna Vinschen
4b081513cc
* wincap.cc (wincapc::init): Simplify W2K/XP case.
2001-09-12 21:07:13 +00:00
Corinna Vinschen
09dcaf6922
* wincap.cc (wincapc::init): Set os name to "NT" on XP, too.
2001-09-12 21:03:53 +00:00
Earnie Boyd
1176fb61c9
2001-09-12 Earnie Boyd <earnie@SF.net>
...
* Makefile.in (TARFLAGS): New variable.
(TARFILEEXT): Ditto.
2001-09-12 20:24:06 +00:00
Corinna Vinschen
ba94682838
* Makefile.in: Build wincap.o.
...
* wincap.cc: New file.
* wincap.h: Ditto.
* autoload.cc: Add dynamic load statement for `CreateHardLinkA'.
* dcrt0.cc (os_being_run): Eliminated.
(osname): Ditto.
(iswinnt): Ditto.
(set_os_type): Ditto.
(dll_crt0_1): Call wincap.init() instead of set_os_type().
(_dll_crt0): Ditto.
* environ.cc (set_chunksize): New function.
(parse_thing): `forkchunk' setting now invokes function `set_chunksize'.
* fork.cc (chunksize): Eliminated. Moved to be member of wincap.
* host_dependent.h: Removed.
* syscalls.cc (_link): Try using `CreateHardLinkA' first, if available.
* cygheap.cc, dcrt0.cc, delqueue.cc, dir.cc,
environ.cc, fhandler.cc, fhandler.h, fhandler_console.cc,
fhandler_mem.cc, fork.cc, mmap.cc, net.cc, pinfo.cc, pinfo.h,
security.cc, syscalls.cc, sysconf.cc, syslog.cc, thread.cc,
times.cc, tty.cc, uinfo.cc, uname.cc, winsup.h: Use new wincap
capability check throughout.
* winsup.h: Include wincap.h. Eliminate extern declarations of
`os_being_run' and `iswinnt'. Eliminate `os_type" definition.
* include/cygwin/version.h: Bump version to 1.3.4.
2001-09-12 17:46:37 +00:00
Earnie Boyd
c88bb51c3c
2001-09-12 Earnie Boyd <earnie@SF.net>
...
* Makefile.in: Increment version.
* include/w32api.h: Ditto.
* lib/Makefile.in: Add usr/ to install directory special for cygwin.
2001-09-12 14:48:07 +00:00
Earnie Boyd
e078566ced
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.
2001-09-12 14:08:53 +00:00
Christopher Faylor
aed6988a36
* 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.
2001-09-12 05:09:24 +00:00
Christopher Faylor
ff6e295ebf
minor cleanups
2001-09-12 04:47:47 +00:00
Robert Collins
8e4d969260
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.
2001-09-12 03:18:05 +00:00
Christopher Faylor
101f820da2
* 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.
2001-09-12 01:56:32 +00:00
Christopher Faylor
e3c25c4a47
Update copyrights.
2001-09-11 20:01:02 +00:00
Christopher Faylor
824b5c453d
fix some typos.
2001-09-11 19:40:14 +00:00
Christopher Faylor
dc3543aa46
change copyright.
2001-09-11 17:02:23 +00:00
Christopher Faylor
dbc82a87a3
* cygwin.din: Remove cygwin_getshared.
...
* shared.cc: Ditto.
* include/cygwin/version.h: Bump API minor number.
* dtable.cc (dtable::build_fhandler): Fix incorrect test for socket.
2001-09-11 15:25:08 +00:00
Robert Collins
24a930fa23
Tue Sep 11 21:22:00 2001 Robert Collins <rbtcollins@hotmail.com>
...
* thread.cc (pthread_cond::~pthread_cond): Bugfix: Incorrect use of InterlockExchangePointer.
(pthread_mutex::~pthread_mutex): Ditto.
(semaphore::~semaphore): Ditto.
2001-09-11 11:23:41 +00:00
Robert Collins
f9229ef74b
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.
2001-09-11 08:15:39 +00:00
Earnie Boyd
bb36822663
2001-09-05 Danny Smith <dannysmith@users.sourceforge.net>
...
* include/wininet.h (InternetAutodial): Add prototype.
(InternetAutodialHangup): Ditto.
(InternetDial): Ditto.
(InternetGetConnectedState): Ditto.
(InternetGoOnline): Ditto.
(InternetHangUp): Ditto.
(InternetSetDialState): Ditto.
Add associated INTERNET_* auto dial flags.
Guard typedefs and prototypes with #ifndef RC_INVOKED.
2001-09-10 16:50:06 +00:00
Earnie Boyd
34ed8fcee6
2001-09-10 Earnie Boyd <earnie@SF.net>
...
* dossh: Remove inadvertantly imported file.
2001-09-10 Danny Smith <dannysmith@users.sourceforge.net>
* dirent.c (opendir): Use GetFileAttributes rather than stat
to determine if input arg is dir.
2001-09-10 15:41:46 +00:00
Christopher Faylor
f3acbe3e3f
* dtable.cc (dtable::fixup_after_fork): Use SetStdHandle appropriately on
...
inherited fds.
2001-09-10 02:11:59 +00:00
Christopher Faylor
6409b03b1a
* sigproc.cc (NZOMBIES): Reduce substantially to minimize memory use.
2001-09-10 00:19:06 +00:00
Robert Collins
ac9841a070
Mon Sep 10 08:28:00 2001 Robert Collins <rbtcollins@hotmail.com>
...
* thread.h (MT_Interface): Remove pshared mutex array.
Add a threadsafe list for mutex tracking (for fixupafter fork).
* thread.cc (MTInterface::Init): Remove pshared mutex array.
(pthread_mutex::pthread_mutex): Remove pshared mutex functionality.
Fail with EINVAL on attempts to use pshared functionality.
(__pthread_mutex_getpshared): Remove.
(__pthread_cond_timedwait): Remove pshared mutex functionality.
(__pthread_cond_wait): 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_setpshared): Ditto.
2001-09-09 22:39:35 +00:00
Corinna Vinschen
e3a4f8ef6f
* pwdgrp.h (pwdgrp_check::set_last_modified): Call GetFileTime()
...
instead of GetFileInformationByHandle().
2001-09-09 21:57:44 +00:00
Christopher Faylor
3800a9e7d7
* heap.h (inheap): Rewrite macro to accomodate removal of brk macros below.
2001-09-09 20:00:29 +00:00
Christopher Faylor
de05a524ca
* cygheap.cc (cygheap_fixup_in_child): Clear cygheap->base so that heap is not
...
forced to start at the same place in execed process.
* heap.cc: Remove brk* macros for clarity throughout.
* heap.h: Ditto.
* shared.cc (shared_info::initialize): Move heap_chunk test into
heap_chunk_size().
(heap_chunk_size): Check for chunk size here. Don't go to registry if
heap_chunk_in_mb is already set.
* smallprint.c (console_printf): Add Windows 95 concessions.
2001-09-09 19:06:50 +00:00
Christopher Faylor
c386775867
* child_info.h (PROC_MAGIC): Bump magic number.
2001-09-09 17:01:47 +00:00
Corinna Vinschen
49eef6d5f7
* cygheap.cc (init_cygheap::etc_changed): New method to signal
...
a change in /etc.
* cygheap.h (struct init_cygheap): Add member `etc_changed_h'
and method `etc_changed'.
* grp.cc (enum grp_state): Eliminate.
(class grp_check): Ditto.
(group_state): Define as `class pwdgrp_check'.
(parse_grp): Remeber path and modification time of /etc/group file.
* passwd.cc (enum_pwd_state): Eliminate.
(class pwd_check): Ditto.
(passwd_state): Define as `class pwdgrp_check'.
(read_etc_passwd): Remember path and modification time of /etc/passwd
file.
* pwdgrp.h: New file.
(enum pwdgrp_state): Substitutes `pwd_state' and `grp_state'.
(class pwdgrp_check): Substitutes `pwd_check' and `grp_check'.
2001-09-09 16:52:37 +00:00
Egor Duda
d961def403
* winsup.api/ltp/dup03.c: New test.
...
* winsup.api/ltp/lseek03.c: Ditto.
* winsup.api/ltp/mmap001.c: Ditto.
* winsup.api/ltp/read01.c: Ditto.
* winsup.api/ltp/readdir01.c: Ditto.
* winsup.api/ltp/rmdir05.c: Ditto.
* winsup.api/ltp/sbrk01.c: Ditto.
* winsup.api/ltp/select02.c: Ditto.
* winsup.api/ltp/select03.c: Ditto.
* winsup.api/ltp/signal03.c: Ditto.
* winsup.api/ltp/stat06.c: Ditto.
* winsup.api/ltp/unlink08.c: Ditto.
* winsup.api/known_bugs.tcl: Update to reflect new test's known
failures.
* winsup.api/winsup.exp: Don't delete executable in case of
unexpected pass, as well as in case of unexpected failure.
* README: Update paragraph about expected failures.
2001-09-09 13:38:17 +00:00
Egor Duda
92ef5188af
* dumper.cc (main): Change command-line arguments format to be
...
similar to gdb. Allow adding error_start=x:\path\to\dumper.exe to
CYGWIN environment variable to perform core dumping in case of
program crash.
(usage): Ditto.
2001-09-09 13:18:51 +00:00
Corinna Vinschen
d969111291
* include/cygwin/version.h: Bump API minor version to 45 according
...
to adding the gamm*_r functions.
2001-09-09 12:32:54 +00:00
Christopher Faylor
e2ea684e4e
* fork.cc (fork_parent): Stop malloc activity while fork is in control of the
...
heap.
* sigproc.cc (NZOMBIES): Rename from ZOMBIEMAX for clarity.
(zombies): Revert to original behavior. Allocating zombie array resulted in
performance hit.
* winsup.h: Declare malloc lock routines.
2001-09-09 03:34:36 +00:00
Christopher Faylor
c12a96d12f
* cygwin.din: Add gamm*_r function exports.
2001-09-08 01:35:55 +00:00
Christopher Faylor
1ff9f4b937
* cygheap.h (init_cygheap): Move heap pointers here.
...
* include/sys/cygwin.h (perprocess): Remove heap pointers.
* dcrt0.cc (__cygwin_user_data): Reflect obsolete perprocess stuff.
(_dll_crt0): Don't initialize heap pointers.
(cygwin_dll_init): Ditto.
(release_upto): Use heap pointers from cygheap.
* heap.h: Ditto.
* fork.cc (fork_parent): Ditto. Don't set heap pointers in ch.
(fork_child): Remove obsolete sigproc_fixup_after_fork.
* shared.cc (memory_init): Reorganize so that cygheap initialization is called
prior to regular heap since regular heap uses cygheap now.
* sigproc.cc (proc_subproc): Eliminate zombies allocation.
(sigproc_init): Move zombies alloation here. Don't free up array on fork, just
reuse it.
(sigproc_fixup_after_fork): Eliminate.
* sigproc.h: Ditto.
* include/cygwin/version.h: Reflect change to perprocess structure.
2001-09-07 21:32:07 +00:00
Corinna Vinschen
e3f30e9c24
Fri Sep 7 10:53:34 2001 Jason Tishler <jason@tishler.net>
...
* poll.cc (poll): Change implementation to only call select() when no
invalid file descriptors are specified.
2001-09-07 17:17:54 +00:00
Christopher Faylor
c4857613ca
* how-resources.texinfo: Add some additional words about where to find
...
documentation.
2001-09-07 16:48:23 +00:00
Corinna Vinschen
b0cce7e127
* include/limits.h: Define PIPE_BUF.
...
* syscalls.cc (fpathconf): Use PIPE_BUF instead of numerical constant.
(pathconf): Ditto.
2001-09-07 08:31:16 +00:00
Christopher Faylor
ddeaa23fbb
experiment.
2001-09-07 01:13:47 +00:00
Christopher Faylor
04da0bbe2f
* fhandler_socket.cc (fhandler_socket::fhandler_socket): Ensure that
...
prot_info_ptr is zeroed for later use.
2001-09-07 00:07:49 +00:00
Christopher Faylor
b2bfade325
* cygheap.cc (cygheap_fixup_in_child): Don't consider a NULL bucket as a
...
candidate for deletion. It is actually the end of a linked list chain.
* exceptions.cc (open_stackdumpfile): Default to "unknown" program name if
myself->progname hasn't been filled out yet.
2001-09-06 18:06:27 +00:00
Christopher Faylor
128f2650a5
Another in the how-it-works series.
2001-09-06 16:53:48 +00:00
Christopher Faylor
57c89867f5
Move appropriate variables to NO_COPY segment, throughout.
2001-09-06 05:17:22 +00:00
Christopher Faylor
08b78edf5a
Remove initialization of static or global values to zero, throughout. This
...
just needlessly grows the size of the DLL.
* tty.cc (tty::alive): Make inuse handle non-inheriting on open, just for
thread safety.
2001-09-06 04:41:59 +00:00
Christopher Faylor
4ce15a4980
* cygheap.h (init_cygheap): Move bucket array here from cygheap.cc.
...
* cygheap.cc: Throughout use bucket array from cygheap.
* sigproc.cc (proc_subproc): Dynamically allocate zombie buffer to save DLL
space.
(sigproc_fixup_after_fork): Free zombie array after a fork.
* sigproc.h (sigproc_fixup_after_fork): Declare.
* dir.cc (mkdir): Expand buffer for security descriptor to 4K to avoid stack
corruption.
* fhandler.cc (fhandler_base::open): Ditto.
* path.cc (symlink): Ditto.
2001-09-06 03:39:18 +00:00
Christopher Faylor
0fb61528c9
* Makefile.in (dumper): Change logic for libbfd and libintl so that they will
...
be found either in the build tree or the installed directory.
* mkpasswd.c (enum_users): Add a comment as a password for NT.
2001-09-06 02:38:22 +00:00
Christopher Faylor
94ce0c04c1
Revert inadvertently checked in files.
2001-09-06 00:45:51 +00:00
Christopher Faylor
08547e6403
* Makefile.in: Install libstdc++.a if it does not exist.
2001-09-05 23:26:38 +00:00
Christopher Faylor
b6077b89be
minor wording changes
2001-09-05 20:12:38 +00:00
Christopher Faylor
6da0fb340e
top level overview of vfork.
2001-09-05 19:43:52 +00:00
Corinna Vinschen
5bcf2f939e
* winver.rc: Change copyright to include 2001.
2001-09-05 19:36:49 +00:00
Corinna Vinschen
37c23731c7
* fhandler_floppy.cc (fhandler_floppy::lseek): Remove iswinnt check.
2001-09-05 10:14:15 +00:00
Corinna Vinschen
669153e144
* fhandler_socket.cc (fhandler_socket::close): Change 2MSL value
...
according to MSDN.
2001-09-05 09:35:08 +00:00
Corinna Vinschen
47497e6243
* net.cc (cygwin_connect): Add WSAEALREADY and WSAEINVAL handling
...
for non-blocking sockets.
2001-09-05 08:16:51 +00:00
Christopher Faylor
d72a655937
* exceptions.cc (ctrl_c_handler): Only send SIGINT when we have a controlling
...
terminal and we are the head of the process group.
2001-09-05 02:42:49 +00:00
Earnie Boyd
615a70a882
2001-09-04 Earnie Boyd <earnie@SF.Net>
...
* lib/Makefile.in: Move the setting of variable libdir to after the
setting of exec_prefix since the value of libdir is dependant on it.
2001-09-04 20:56:23 +00:00
Christopher Faylor
c729f22799
* thread.cc (InterlockedExchangePointer): Don't define if it already exists.
2001-09-04 20:48:45 +00:00
Corinna Vinschen
37f75da24d
* uname.cc (uname): Eliminate os specific retrieving of x86
...
processor type.
2001-09-04 20:16:33 +00:00
Christopher Faylor
fb7369b515
* winbase.h: Add missing closing parentheses to InterlockedExchangePointer
...
declaration.
2001-09-04 18:19:33 +00:00
Earnie Boyd
2d54484a72
2001-09-01 Danny Smith <dannysmith@users.sourceforge.net>
...
* include/shlobj.h (CFSTR_* ): Add new defines.
Thanks to: "Ron" <ron@debian.org> .
Unicode them.
2001-09-04 14:57:51 +00:00
Corinna Vinschen
29ebba7050
2001-09-04 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
...
* fhandler_console.cc (fhandler_console::char_command): Save the cursor
position relative to the top of the window.
* fhandler_cc (fhandler_console::write): Ditto.
2001-09-04 10:45:54 +00:00
Christopher Faylor
f90e39b55e
* mount.cc (mount_commands): Don't write /cygdrive/u mount points.
2001-09-04 01:09:39 +00:00
Christopher Faylor
bee722a5e7
* mount.cc (longopts): Add mount-commands to options list.
...
(usage): Add mount-commands option.
(mount_commands): New function. Write commands to recreate current mounts.
2001-09-03 22:02:54 +00:00
Christopher Faylor
7170a41bc8
*** empty log message ***
2001-09-03 20:36:52 +00:00
Corinna Vinschen
2321ebb2aa
* dir.cc (opendir): Write version information to __d_dirent->d_version.
2001-09-03 19:06:58 +00:00
Corinna Vinschen
a71aee46c4
* cygwin.din: Add `dirfd'.
...
* dir.cc (dirfd): New function.
(opendir): Open a directory file descriptor and save it in
__d_dirent->d_fd.
(closedir): Close directory file descriptor.
* include/cygwin/version.h: Bump API minor version to 44.
2001-09-03 16:36:54 +00:00
Christopher Faylor
9867ecfdb3
* child_info.h: Modify magic number.
...
* dcrt0.cc (_cygwin_testing): Define.
(_dll_crt0): Set _cygwin_testing if CYGWIN_TESTING environment variable exists.
Don't issue "conflicting versions" error if _cygwin_testing is true.
* shared.cc (shared_name): Use _cygwin_testing global rather than testing the
environment.
* syscalls.cc (_write): Remove debugging info.
2001-09-03 02:13:05 +00:00
Christopher Faylor
db8b09c306
* mount.cc (main): Eliminate excess arguments in printf.
2001-09-01 19:58:40 +00:00
Christopher Faylor
2bcd6fb89d
* include/winnt.h: Use defined(_ANONYMOUS_STRUCT) to determine if anonymous
...
structs are available rather than just testing preprocessor variable directly.
2001-09-01 14:42:57 +00:00
Christopher Faylor
2496a3637f
* tty.cc (tty::create_inuse): Eliminate unneeded argument.
...
* tty.h: Reflect above change.
* fhandler_tty.cc: Reflect argument reduction in tty::create_inuse, throughout.
Always make inuse inheritable.
2001-09-01 05:38:46 +00:00
Christopher Faylor
e62ac9e869
* debug.cc (mark_closed): Rename from debug_mark_closed and make static.
...
(setclexec_pid): New function for marking saved handle as close-on-exec.
(delete_handle): New function.
(debug_fixup_after_fork): New function.
* debug.h: Declare new functions, remove obsolete ones.
* fork.cc (debug_fixup_after_fork): Call to cleanup close-on-exec handles.
* fhandler.cc (fhandler_disk_file::close): Minor reorg.
(fhandler_base::set_inheritance): Set flag appropriately for debugging when
close-on-exec so forked process can delete closed handles.
* tty.h (open_output_mutex): Eliminate unneeded argument.
(open_input_mutex): Ditto.
* fhandler_tty.cc (fhandler_tty_slave::open): reflect open_*_mutex argument
changes.
* fhandler.h (fhandler_socket): Make saw_shutdown_* functions type bool.
* tty.cc (tty::get_event): Eliminate unneeded argument.
(tty::common_init): Reflect change to get_event. Events should always be
inherited.
2001-09-01 05:17:34 +00:00
Corinna Vinschen
dc8c4c68b7
* security.cc (create_token): Change initialization of `exp' to comply
...
with new LARGE_INTEGER definition in winnt.h.
2001-08-31 19:48:34 +00:00
Corinna Vinschen
75f259bfe3
* include/winnt.h: Change definition of `SYSTEM_LUID' to comply
...
with new `LARGE_INTEGER' definition.
2001-08-31 19:48:04 +00:00
Christopher Faylor
5ac73dfead
* cygwin.sc: Revert to previous NO_COPY behavior.
...
* winsup.h: Ditto.
* sigproc.cc: Ditto.
* autoload.cc: Ditto.
2001-08-31 18:16:16 +00:00
Christopher Faylor
5e2ccd4bc2
minor wording change.
2001-08-31 05:24:36 +00:00
Christopher Faylor
fcc46b19d3
space reduction.
2001-08-31 05:23:04 +00:00
Christopher Faylor
fff42f4172
space reduction.
2001-08-31 05:17:47 +00:00
Christopher Faylor
5835f2cf8d
* cygwin.sc: New file -- linker script for building cygwin DLL.
...
* Makefile.in: Use linker script to control location of cygheap.
* cygheap.cc (buckets): Make static.
(init_cheap): Remove special iswinnt handling. Allocate cygheap at a fixed
location. Display more info when allocation fails.
(cygheap_fixup_in_child): Try harder to move cygheap to correct location.
Display more info when allocation fails.
* fhandler.h (fhandler_socket): Add macros for tracking socket shutdown state.
* net.cc (cygwin_shutdown): Set appropriate shutdown value for future use.
* select.cc (select_stuff::cleanup): New method.
(cygwin_select): Call cleanup explicitly to avoid a race.
(select_stuff:~select_stuff): Call cleanup chain via cleanup method.
(fhandler_socket::select_read): Set *_ready when shutdown has been called on
the socket.
(fhandler_socket::select_write): Ditto.
(fhandler_socket::select_except): Ditto.
* winsup.h: Move NO_COPY to "COMMON" section.
* autoload.cc (wsock_started): Avoid initializing NO_COPY value.
* sigproc.cc: Remove initialization from NO_COPY variables.
(sigproc_init): Initialize sig_loop_wait here, rather than via initialization.
(subproc_init): Initialize proc_loop_wait here, rather than via initialization.
2001-08-31 05:06:14 +00:00
Egor Duda
33bc82476e
* dumper.h: Update copyright notice.
...
* dumper.cc: Ditto.
* dumper.cc: (dumper::print_core_section_list): New function.
* dumper.h: (dumper::print_core_section_list): Declare it.
* dumper.cc (print_section_name): New function.
(dumper::collect_process_information): Augment debugging output.
Stop debugee processing if it posts double exception.
(usage): Fix typo in option name.
2001-08-30 16:47:51 +00:00
Christopher Faylor
4208d592f3
* include/winsock2.h: Remove "extra token" after #endif.
2001-08-30 13:37:23 +00:00
Corinna Vinschen
f0b4b3865d
* select.cc (select_read): Add setting read_ready flag.
...
(select_write): Add setting write_ready flag.
2001-08-30 08:21:09 +00:00
Earnie Boyd
bca00ab4b6
* config.guess: Remove the \r from the end of line.
...
* config.sub: Ditto.
* include/winnt.h: Allow anonymous struct in [U]LARGE_INTEGER
if __cplusplus as well as if _ANONYMOUS_STRUCT.
* config.guess: Add the MSYS system.
* config.sub: Ditto.
* include/winsock.h: Add the __INSIDE_MSYS__ protections.
* incldue/winsock2.h: Ditto.
2001-08-30 04:29:49 +00:00
Earnie Boyd
d1b093d567
* include\winnt.h: Allow anonymous (Xxx.LowPart) or
...
non-anonymous (Xxx.u.LowPart) access to HighPart and
LowPart of a LARGE_INTEGER or ULARGE_INTEGER.
* include/wingdi.h (HANGUL_CHARSET): Add define.
2001-08-29 13:45:46 +00:00
Earnie Boyd
375dab8418
* include/stdarg.h (va_list): Typedef as __builtin_va_list if
...
__GNUC__ >= 3.
* include/varargs.h (va_list): Ditto.
* include/stdio.h (va_list): Ditto.
2001-08-29 13:43:59 +00:00
Christopher Faylor
41d53c9845
* path.cc (path_conv::check): Avoid splitting off leading '/' in path component
...
when building a symlink.
2001-08-29 04:43:19 +00:00
Corinna Vinschen
e4a17c6d11
* resource.cc (getrlimit): Return actual values on RLIMIT_STACK.
2001-08-28 22:48:23 +00:00
Christopher Faylor
955dfa520a
oops
2001-08-28 20:39:22 +00:00
Christopher Faylor
ffe94510f5
* dir.cc (rmdir): Report ENOENT when file doesn't exist rather than ENOTDIR.
2001-08-28 20:38:07 +00:00
Christopher Faylor
34971f0f8c
* mount.cc (main): Issue correct warning for 'not enough arguments'.
2001-08-28 18:48:38 +00:00
Christopher Faylor
8d661d3658
* select.cc (cygwin_select): Ensure that arguments are zeroed on timeout.
...
(select_stuff::wait): Ditto.
2001-08-27 15:59:26 +00:00
Christopher Faylor
e32b4e81cb
* syscalls.cc (check_tty_fds): New function. Check whether there is a fd
...
referring to pty slave.
(setsid): Don't detach console if the process has a pty slave.
2001-08-25 17:27:31 +00:00
Corinna Vinschen
5d0fe6351a
* net.cc (free_addr_list): Add define for symmetry.
...
(free_hostent_ptr): Use free_addr_list to free h_addr_list element.
(dup_addr_list): New static function.
(dup_hostent_ptr): Use dup_addr_list instead of dup_char_list in order
to handle embedded null characters.
2001-08-24 06:57:53 +00:00
Christopher Faylor
ecaff08ccd
* dtable.cc (dtable::dup2): Allow extension of fd table by dup2.
...
* syscalls.cc: Minor code cleanup.
(fpathconf): Check for bad fd before doing anything else.
* termios.cc (tcsetattr): Don't convert to new termios if bad fd.
(tcgetattr): Minor debugging tweak.
2001-08-23 02:27:01 +00:00
Corinna Vinschen
cb19ccf4b5
* net.cc (cygwin_inet_ntoa): Rearrange previous patch to use
...
thread local buffer space when compiled thread safe.
(cygwin_getprotobyname): Ditto.
(cygwin_getprotobynumber): Ditto.
(cygwin_getservbyname): Ditto.
(cygwin_getservbyport): Ditto.
(cygwin_gethostbyname): Ditto.
(cygwin_gethostbyaddr): Ditto. Move near to cygwin_gethostbyname.
* thread.h (struct _winsup_t): Add pointers for above used buffer space.
* passwd.cc (getpwduid): Remove initializing passwd.
(setpwent): Ditto.
(endpwent): Ditto.
(setpassent): Ditto.
2001-08-22 21:51:48 +00:00
Christopher Faylor
0a047e8f32
* smallprint.c (console_printf): New function.
...
* dcrt0.cc (dll_crt0_1): Use console_printf for debugging output.
* debug.cc (debug_mark_closed): New function.
(close_handle): Use debug_mark_closed.
* debug.h: Declare new functions.
* dtable.cc (dtable::build_fhandler): Remove unneeded extern.
* spawn.cc: Cosmetic changes.
* winsup.h: Define NO_COPY for C files, too. Declare a global.
2001-08-22 17:50:22 +00:00
Corinna Vinschen
1fdc8df95d
* net.cc (free_char_list): New static function.
...
(dup_char_list): Ditto.
(free_protoent_ptr): Ditto.
(dup_protoent_ptr): Ditto.
(free_servent_ptr): Ditto.
(dup_servent_ptr): Ditto.
(free_hostent_ptr): Ditto.
(dup_hostent_ptr): Ditto.
(cygwin_inet_ntoa): Use local static buffer to allow propagating of
the result to child processes.
(cygwin_getprotobyname): Ditto.
(cygwin_getprotobynumber): Ditto.
(cygwin_getservbyname): Ditto.
(cygwin_getservbyport): Ditto.
(cygwin_gethostbyname): Ditto.
(cygwin_gethostbyaddr): Ditto.
2001-08-22 15:31:59 +00:00
Christopher Faylor
d4d65813a7
fix typo.
2001-08-22 02:40:22 +00:00
Earnie Boyd
de8e9cfb39
* include/setupapi.h : New file.
...
* lib/setupapi.def:New file.
* lib/test.c: Include setupapi.h.
* include/winioctl.h (_DISK_PERFORMANCE): Correct typo.
* include/richedit.h (ENLINK): Add structure definition.
(EM_AUTOURLDETECT, EN_LINK, ENM_LINK): Add defines.
* include/shlobj.h (CMIC_*): Remove duplicate defines.
(CMDSTR_*): Remove duplicates; UNICODE string constants.
(GCS_*): Make UNICODE.
(CSIDL_*): Add more defines.
* include/winioctl.h (_MEDIA_TYPE): Add pointer typedef.
(_DISK_GEOMETRY): Ditto.
(_DISK_PERFORMANCE): Ditto.
* include/winbase.h (HasOverlappedIoCompleted): Add macro.
* include/winnt.h: Move CHAR, SHORT and LONG typedefs outside
of block protected by #ifndef VOID.
(This reverts 1998-12-01 Anders Norlander change.)
* include/odbcinst.h: End file with newline.
* include/raserror.h: Ditto.
* include/winsock2.h (#include <wtypes.h): Don't.
(_BLOB): Define instead, if not already done.
(__BLOB_T_DEFINED: New define for guarding _BLOB.
* include/wtypes.h (_BLOB): Guard against prior definition.
* include/oaidl.h (tagVARIANT): Mark anonymous structs and unions
as __extension__.
(tagTYPEDESC): Ditto.
(_wireBRECORD): Add structure definition.
(_wireSAFEARR_BRECORD): Ditto.
(_wireSAFEARR_HAVEIID): Ditto.
(_wireSAFEARRAY_UNION.u): Add fields SAFEARR_BRECORD RecordStr,
SAFEARR_HAVEIID HaveIidStr.
(tagVariant): Add fields _VARIANT_BOOL bool,*pbool.
(_wireVARIANT): Change field parray to type wirePSAFEARRAY,
pparray to wirePSAFEARRAY*.
(_wireVARIANT): Add field wireBRECORD brecVal.
(wireVARIANT): Change typedef to struct _wireVariant*.
(IRecordInfo): Add interface definition.
(LPRECORDINFO): Add typedef for IRecordInfo*.
(IID_IRecordInfo): Add forward decalaration.
* include/lmcons.h: Guard CNLEN and UNCLEN against prior definition.
* include/nddeapi.h: Likewise.
* ChangeLog: Formatting and typo fixes.
2001-08-21 13:58:52 +00:00
Christopher Faylor
d9b68c2c7d
debug
2001-08-20 16:03:54 +00:00
Christopher Faylor
b1d0b9073c
* cygheap.cc (init_cheap): Allocate cygheap in shared memory for Windows NT.
2001-08-20 15:58:16 +00:00
Egor Duda
933cbf6213
* fhandler_socket.cc (fhandler_socket::create_secret_event): Relax
...
security of secret_event so AF_UNIX socket clients can connect to
servers even if running under a different user account.
(fhandler_socket::check_peer_secret_event): Ditto.
2001-08-16 14:34:27 +00:00
Corinna Vinschen
1457739a63
* resource.cc (getrlimit): Return getdtablesize () as current limit
...
on RLIMIT_NOFILE.
* syscalls.cc (getdtablesize): Return OPEN_MAX if current dtable size
is less than OPEN_MAX, the current dtable size otherwise.
* sysconf.cc (sysconf): Return getdtablesize () on _SC_OPEN_MAX.
2001-08-16 14:29:21 +00:00
Corinna Vinschen
3171175e90
* resource.cc (getrlimit): Return OPEN_MAX as current limit
...
on RLIMIT_NOFILE.
* syscalls.cc (getdtablesize): Return OPEN_MAX.
* sysconf.cc (sysconf): Return OPEN_MAX on _SC_OPEN_MAX.
* include/limits.h (OPEN_MAX): Define as 256.
2001-08-16 14:20:09 +00:00
Corinna Vinschen
91a1423a87
* times.cc (utimes): Revert previous change. Just open the
...
file using FILE_WRITE_ATTRIBUTES instead of GENERIC_WRITE
on NT/W2K.
2001-08-15 10:48:43 +00:00
Corinna Vinschen
2a9366ff49
* security.cc (set_nt_attribute): Return always -1 in case of
...
a failure.
* times.cc (utimes): On NTFS with ntsec ON, change the file's
security descriptor temporarily to acquire write access if
opening the file failed.
2001-08-15 10:21:39 +00:00
Corinna Vinschen
5fd12fb0cc
* fhandler.cc (fhandler_base::is_nonblocking): New method.
...
(fhandler_base::set_nonblocking): Ditto.
* fhandler.h (fhandler_base): Declare new methods `is_nonblocking' and
`set_nonblocking'.
* fhandler_socket.cc (fhandler_socket::ioctl): Use `set_nonblocking'.
* fhandler_tty.cc (fhandler_pty_master::process_slave_output):
Use `is_nonblocking'.
(fhandler_tty_slave::read): Ditto.
(fhandler_tty_slave::ioctl): Use `set_nonblocking'.
(fhandler_pty_master::ioctl): Ditto.
* net.cc (cygwin_sendto): Fallback to winsock 1 functionality
in case of nonblocking IO.
(cygwin_recvfrom): Ditto.
(cygwin_recv): Ditto.
(cygwin_send): Ditto.
* syscalls.cc (_read): Use `is_nonblocking'.
2001-08-15 07:49:15 +00:00
Christopher Faylor
da3ea61edd
* cygpath.cc (main): Support -w for Windows (System) directories and return
...
physical correct orthography for the Windows System dir.
2001-08-15 03:24:18 +00:00
Christopher Faylor
3ca6bcc4d0
* include/cygwin/version.h: Bump API version.
2001-08-14 15:05:43 +00:00
Egor Duda
7da232abd7
* spawn.cc (spawn_guts): Enable appropriate privilege before
...
loading user's registry hive.
2001-08-14 14:57:44 +00:00
Corinna Vinschen
6a574f1ad6
* fhandler.cc (fhandler_base::fcntl): Use new O_NONBLOCK_MASK define.
...
* fhandler.h: Move definitions of O_NOSYMLINK, O_DIROPEN and
OLD_O_NDELAY from winsup.h to here. Add O_NONBLOCK_MASK define.
* fhandler_socket.cc (fhandler_socket::close): Add hack to allow
a graceful shutdown even if shutdown() hasn't been called by the
application. Add debug output.
(fhandler_socket::ioctl): Set fhandler's NONBLOCK flag according
to FIONBIO setting.
(fhandler_socket::fcntl): Use new O_NONBLOCK_MASK define. Actually
set `request' before using it.
* fhandler_tty.cc: Use new O_NONBLOCK_MASK define throughout.
(fhandler_tty_slave::ioctl): Set fhandler's NONBLOCK flag according
to FIONBIO setting.
(fhandler_pty_master::ioctl): Ditto.
* net.cc (wsock_event::prepare): Compare WSACreateEvent return code
with `WSA_INVALID_EVENT' according to MSDN.
* syscalls.cc (_read): Use new O_NONBLOCK_MASK define.
2001-08-14 07:41:45 +00:00
Christopher Faylor
29a075260a
Oops. Forgot to check in include/wchar.h???
2001-08-11 01:56:53 +00:00
Earnie Boyd
6286806473
* lib/kernels.c: New file.
2001-08-10 11:52:35 +00:00
Earnie Boyd
5b9d54bf97
* lib/test.c (Win32_Winsock): Replace with __USE_W32_SOCKETS.
...
Add more includes of w32api headers.
* include/winnt.h (GetCurrentFiber): Change __inline to __inline__.
Swap asm code with that of GetFiberData.
(GetFiberData): Ditto.
* lib/kernels.c: New file, containing library versions of
GetCurrentFiber and GetFiberData.
* lib/makefile.in: Add kernel32.o as static object to libkernal32.a.
2001-08-10 11:51:03 +00:00
Christopher Faylor
f11db2f4fa
* include/wchar.h: Define __need_wint_t.
2001-08-08 19:26:24 +00:00
Earnie Boyd
89500585f7
* include/winuser.h (GET_WHEEL_DELTA_WPARAM): Add macro.
...
* lib/oleaut32.def: Regenerate.
2001-08-08 17:25:23 +00:00
Corinna Vinschen
8c62297ac5
* security.cc (alloc_sd): Revert to setting inheritance attribute for
...
permissions given to directories. Never set inheritance on NULL ACE.
2001-08-08 10:00:35 +00:00
Corinna Vinschen
c0ae23dc47
* security.cc (alloc_sd): Don't set FILE_DELETE_CHILD for group
...
if S_ISVTX attribute is given.
* dir.cc (mkdir): Allow immediate setting of S_ISUID, S_ISGID and
S_ISVTX attribute.
* syscalls.cc (_open): Ditto.
2001-08-07 16:14:59 +00:00
Corinna Vinschen
86fb039324
* dir.cc (mkdir): Set security attributes correctly for
...
CreateDirectoryA () call if ntsec is on. Don't call
set_file_attributes () then.
* fhandler.cc (fhandler_base::open): Ditto for CreateFileA () call.
* path.cc (symlink): Ditto.
* security.cc (set_security_attribute): New function.
* security.h: Add declaration for `allow_ntea' and
`set_security_attribute'.
2001-08-07 15:09:54 +00:00
Corinna Vinschen
f5e8e2be4a
* grp.cc (class grp_check): New class. Make `group_state'
...
a member of class grp_check.
(read_etc_group): Free former allocated memory on reread.
* passwd.cc (class pwd_check): New class Make `passwd_state'
a member of class pwd_check.
(read_etc_passwd): Free former allocated memory on reread.
2001-08-07 08:56:22 +00:00
Christopher Faylor
300624d4f3
* fhandler_console.cc (get_tty_stuff): Don't initialize shared memory console
...
area if it is already initialized.
* fhandler_termios.cc (fhandler_termios::tcsetpgrp): Augment debugging info.
2001-08-07 05:15:59 +00:00
Christopher Faylor
96a3f4ae68
* cygheap.cc (cygheap_root::set): Avoid treating '/' specially.
...
* fhandler.cc (fhandler_base::fcntl): Only set specific O_NDELAY style flag
passed in from application.
* fhandler_socket.cc (fhandler_socket::fcntl): Ditto.
* fhandler.h: Set constant for future use.
* winsup.h: Define OLD_O_NDELAY only for old programs.
* include/cygwin/version.h: Define CYGWIN_VERSION_CHECK_FOR_OLD_O_NONBLOCK.
2001-08-07 00:01:42 +00:00
Earnie Boyd
386abb05d9
* include/stdlib.h (_wpgmptr): Don't declare ifndef __MSVCRT__.
...
* include/stdio.h (_IORW): Change constant to 0x0080.
(TMP_MAX): Add new define.
(_P_tmpdir): Ditto.
(_wP_tmpdir): Ditto.
(L_tmpnam): Change constant to 16.
* include/malloc.h: Fix non-ANSI comment after #endif.
* profile/Makefile.in (mkinstalldirs): Correct relative path.
2001-08-05 12:52:43 +00:00
Earnie Boyd
54580e6a88
* include/wtypes.h: (DECIMAL_SETZERO): Correct typo.
...
* include/oleidl.h (ISupportErrorInfo, ICreateInfo): Move from here
* include/oaidl.h: ... to here.
* include/oaidl.h ICreateErrorInfo): Add interface definition.
(IErrorInfo::GetGUID): Change arg to GUID.
(LPSUPPORTERRORINFO): Add typedef.
(IID_ISupportErrorInfo): Change forward decl. of type to IID.
* include/winsock2.h (WSAGET* and WSAMAKE*): Remove duplicate
defines.
* include/commctrl.h (TreeView_SetIndent): Correct typo.
* include/commctrl.h (TBSTYPE_FLAT): Remove define.
* include/commctrl.h (TBBUTTONINFO[AW]): Add struct definitions,
and UNICODE mappings, if _WIN32_IE >= 0x400.
(TBIF_* and TB_SETBUTTONINFO): Add defines, if _WIN32_IE >= 0x400.
(CDIS_*,CDDS_*,CDRF_*) : Add defines.
(tagNMCUSTOMDRAWINFO): Add struct definition and typedefs.
(tagNMLVCUSTOMDRAW): Likewise.
(tagNMTVCUSTOMDRAW): Likewise.
(tagNMLVCACHEHINT): Likewise.
* include/basetsd.h (#include <_mingw.h>): Remove.
(__int64): Define.
* include/wingdi.h (AC_SRC_OVER): Add define.
(struct _BLENDFUNCTION): Add.
* include/shlobj.h: Add BIF_* defines.
* include/winerror.h (E_PENDING): Add error code define.
* include/basetsd.h (#include <_mingw.h>): Add directive.
* include/winbase.h(InterlockedCompareExchange): Change args
and return value from PVOID to LONG.
(InterlockedExchange): Change first arg to LPLONG.
(InterlockedCompareExchangePointer): New macro.
(InterlockedExchangePointer): New macro.
2001-08-05 12:47:53 +00:00
Christopher Faylor
e5ba4c060e
Throughout, change check for running under Windows NT to 'iswinnt'.
...
* dcrt0.cc (set_os_type): Set 'iswinnt' appropriately.
* cygheap.cc (init_cheap): Revert to using VirtualAlloc for allocating cygheap.
(cygheap_setup_for_child_cleanup): New function. Standard function to call
after calling CreateProcess to cleanup cygheap info passed to child.
(cygheap_fixup_in_child): Copy cygheap from shared memory into allocated space
under Windows 9x or if can't relocate shared space under NT.
* cygheap.h: Declare new function.
* spawn.cc (spawn_guts): Use cygheap_fixup_in_child.
* fork.cc (fork_parent): Ditto.
* winsup.h: Declare iswinnt.
2001-08-04 21:10:52 +00:00
Egor Duda
17195d08bc
* dtable.cc (dtable::release): Avoid messing with console when
...
closing socket.
2001-08-04 18:53:53 +00:00
Corinna Vinschen
7eb971a561
* net.cc (cygwin_accept): Allow NULL peer and len parameters.
...
* include/cygwin/socket.h: Define socklen_t as int.
2001-08-03 12:06:29 +00:00
Corinna Vinschen
dce6f56397
* path.cc (fchdir): Set the fhandler's path to absolute value to
...
ensure changing to the correct directory even if the fhandler originally
points to a relative path.
2001-08-03 11:14:09 +00:00
Corinna Vinschen
842c741f98
* security.cc (set_file_attribute): Clean up. Don't call
...
`set_nt_attribute' when ntsec isn't set.
2001-08-02 16:01:47 +00:00
Christopher Faylor
e13ea3343d
* dcrt0.cc (alloc_stack_hard_way): Make half-hearted attempt to deal with
...
growing stack under Windows 95.
* Makefile.in: Add install-lib and install-headers.
2001-07-29 02:33:30 +00:00
Christopher Faylor
8e4e3874c4
* cygwin.din: Export sys_errlist, sys_nerr.
...
* include/cygwin/version.h: Bump minor version number.
2001-07-27 16:33:20 +00:00
Corinna Vinschen
8b43d2722b
* security.cc (get_user_primary_group): Fix compiler warning.
...
(alloc_sd): Add DELETE permission for user when S_IWUSR is given.
2001-07-27 09:17:57 +00:00
Christopher Faylor
f9f2c11985
* thread.cc (__pthread_equal): Invert return value so that true is returned
...
when threads are equal.
2001-07-26 20:47:05 +00:00