newlib/winsup/cygwin/ChangeLog-2000

4151 lines
157 KiB
Plaintext

Tue Dec 27 1:08:00 2000 Corinna Vinschen <corinna@vinschen.de>
* cygwin.din: Add symbols for `getrlimit' and `setrlimit'.
* exceptions.cc (stackdump): Avoid creating stackdump when
`rlim_core' is 0.
* resource.cc: New global variable `rlim_core'.
(getrlimit): New function.
(setrlimit): Ditto.
include/cygwin/version.h: Bump minor API version to 32 due to
adding `getrlimit' and `setrlimit'.
include/sys/resource.h: Add defines, types and prototypes for
`getrlimit' and `setrlimit'.
Mon Dec 25 22:18:42 2000 Christopher Faylor <cgf@cygnus.com>
* autoload.h: Make DLL initializers global to avoid inlining.
* exceptions.cc (interrupt_setup): Reorganize arguments to allow use of
regparm.
(interrupt_now): Ditto.
(interrupt_on_return): Ditto.
(call_handler): Ditto.
Mon Dec 25 13:36:44 2000 Christopher Faylor <cgf@cygnus.com>
* include/cygwin/version.h: Bump DLL minor version number to 8.
Wed Dec 20 13:37:00 2000 Corinna Vinschen <corinna@vinschen.de>
* autoload.cc: Add load statement for SetSecurityDescriptorControl.
* security.cc (alloc_sd): Always set SE_DACL_PROTECTED flag on
Win2K and higher.
Wed Dec 20 01:02:13 2000 Christopher Faylor <cgf@cygnus.com>
* exceptions.cc (reset_signal_arrived): Make global to avoid inlining.
Wed Dec 20 00:57:10 2000 Christopher Faylor <cgf@cygnus.com>
* fhandler_serial.cc (fhandler_serial::raw_read): Always find number of
bytes ready to be read whether overlapped_armed or not.
Tue Dec 19 21:39:00 2000 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (remove): New function, overriding the newlib
implementation.
Tue Dec 19 16:26:00 2000 Corinna Vinschen <corinna@vinschen.de>
* environ.cc (struct parse_thing): Add entry for new CYGWIN option
`smbntsec'.
* path.cc (path_conv::check): Check path for being a remote path.
If so and `allow_smbntsec' is set to FALSE, set has_acls to FALSE.
* security.cc: Add global definition for `allow_smbntsec'.
* security.h: Add extern declaration for `allow_smbntsec'.
* fhandler.cc (fhandler_disk_file::open): Eliminate extern declaration
of `allow_ntsec'.
* syscalls.cc: Ditto.
Fri Dec 15 18:54:42 2000 Bradley A. Town <townba@pobox.com>
* fhandler_console.cc (read): Add support for xterm-style mouse event
reporting.
(fhandler_console::char_command): Honor mouse events.
(fhandler_console::open): Enable mouse input events.
(fhandler_console::input_tcsetattr): Ditto.
* select.cc (peek_console): Add check for mouse events.
Fri Dec 15 17:23:17 2000 Christopher Faylor <cgf@cygnus.com>
* path.cc (normalize_posix_path): Calculate path name length overruns
more dynamically.
(normalize_win32_path): Ditto.
* Makefile.in: Avoid scanning the directory twice for *.d files.
Thu Dec 14 23:37:51 2000 Christopher Faylor <cgf@cygnus.com>
* fhandler.h (fhandler_console): Add additional argument to
char_command method.
* fhandler_console.cc (fhandler_console::read): Revert previously
misapplied patch.
(fhandler_console::char_command): Add a second argument.
(fhandler_console::write): Recognize when a '?' is found after a
<esc>[.
Tue Dec 5 17:06:00 2000 Corinna Vinschen <corinna@vinschen.de>
* net.cc (cygwin_rexec): Eliminate superfluous call to
`set_socket_inheritance'.
* include/sys/socket.h: Add SUS defines for option values to `shutdown'.
Sun Dec 10 17:19:04 2000 Christopher Faylor <cgf@cygnus.com>
* include/sysexits: New file.
2000-12-09 Egor Duda <deo@logos-m.ru>
* autoload.cc: Autoload CharToOemA.
* dcrt0.cc (dll_crt0_1): Translate command line to OEM if current
codepage is OEM.
* environ.cc: Add new option 'codepage' to CYGWIN environment variable.
* fhandler_clipboard.cc (fhandler_clipboard::read): Read clipboard in
OEM mode if current codepage is OEM.
* fhandler_console.cc (fhandler_console::read): Only translate console
input if current codepage is ANSI.
* fhandler_console.cc (fhandler_console::write_normal): Translate
output data if current codepage is ANSI.
* pinfo.cc (codepage_init): New function. Setup current codepage from
CYGWIN environment variable and set codepage for file APIs.
* security.cc (read_sd): Translate file name to it if current codepage
is OEM.
* winsup.h: (sys_wcstombs,sys_mbstowcs): Use current codepage for
translations between multibyte and widechar string and vice versa.
Sat Dec 9 16:29:45 2000 Christopher Faylor <cgf@cygnus.com>
* path.cc (normalize_win32_path): Check for explicit use of two slashes
at the beginning of a path. These should be treated specially
regardless of whether they are UNC paths or old-style //a paths. Avoid
adding cwd to a path if the path already begins with '/'.
Fri Dec 8 22:21:01 2000 Christopher Faylor <cgf@cygnus.com>
* path.cc (normalize_win32_path): Reorganize logic to accommodate
chroot. Always check for MAX_PATH overrun. Avoid adding one too many
backslashes when src path begins with a slash. From Corinna Vinschen.
* winsup.h: Force demangling for dll_crt0 for newer compilers.
Thu Dec 7 12:10:00 2000 Edward M. Lee <tailbert@yahoo.com>
* cygwin.din: Declare strtok_r for the import lib. Already in the DLL.
Wed Dec 6 15:39:18 2000 Earnie Boyd <earnie_boyd@yahoo.com>
* include/sys/uio.h (readv): Correct prototype.
(writev): Ditto.
Tue Dec 5 17:06:00 2000 Corinna Vinschen <corinna@vinschen.de>
* include/sys/uio.h: Include <sys/cdefs.h>. Use __BEGIN_DECL and
__END_DECL.
Add declarations for `readv' and `writev'.
Mon Dec 4 20:49:00 2000 Corinna Vinschen <corinna@vinschen.de>
* Makefile.in: Change `-nostartfiles' to `-nostdlib' to avoid
automatic linking with default libraries when linking new-cygwin1.dll.
Link with libgcc.a and libstdc++.a explicitly.
Sun Dec 3 01:20:25 2000 Christopher Faylor <cgf@cygnus.com>
* path.cc (normalize_win32_path): Handle UNC paths better.
(slash_unc_prefix_p): Allow backslash UNC paths.
Sun Dec 3 00:20:25 2000 Christopher Faylor <cgf@cygnus.com>
* Makefile.in: Remove some extra cruft.
Sun Dec 3 00:13:26 2000 Christopher Faylor <cgf@cygnus.com>
* Makefile.in: Use CXX to build the DLL.
* configure.in: Find correct c++ compiler.
* configure: Regenerate.
* path.cc (normalize_posix_path): Put correct drive at beginning of \foo style paths.
(chdir): Don't send non-posix path to cygcwd.set.
Sat Dec 2 22:26:00 2000 Corinna Vinschen <corinna@vinschen.de>
* net.cc (get_inet_addr ): Close AF_UNIX socket file after reading.
Wed Nov 29 18:25:53 2000 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
* cygheap.cc (chgheap_root::operator =): Check root dir properly.
Thu Nov 29 18:11:00 2000 Corinna Vinschen <corinna@vinschen.de>
* net.cc (cygwin_inet_aton): Return nonzero if the address
is valid, zero if not according to Linux man page.
Mon Nov 27 21:09:50 2000 Kelley Cook <kelley.cook@home.com>
* mmap.cc (munmap): Check that mmap and munmap length match.
Tue Nov 28 18:08:00 2000 Corinna Vinschen <corinna@vinschen.de>
* fhandler.cc (fhandler_disk_file::open): Check for buggy CreateFile
condition.
* path.cc (path_conv::check): Get file system type in call to
GetVolumeInformation to check for file systems with buggy CreateFile.
* path.h (enum path_types): Add PATH_HASBUGGYOPEN.
(class path_conv): Add methods `has_buggy_open' and
`set_has_buggy_open'.
Sun Nov 26 16:26:14 2000 Christopher Faylor <cgf@cygnus.com>
* fhandler.cc (is_at_eof): New function.
(fhandler_base::raw_read): Detect special case where last error ==
ERROR_NOACCESS but the file is at EOF. Most UNIXes do not consider
this to be an error.
Sun Nov 26 14:37:29 2000 Christopher Faylor <cgf@cygnus.com>
* include/cygwin/version.h: Bump DLL minor version number to 7.
Sat Nov 25 11:27:00 2000 Corinna Vinschen <corinna@vinschen.de>
* include/cygwin/version.h: Bump minor API version due to adding
inet_aton.
Sat Nov 25 11:07:00 2000 Corinna Vinschen <corinna@vinschen.de>
* net.cc (cygwin_inet_aton): New function.
* cygwin.din: Export cygwin_inet_aton as inet_aton.
Sat Nov 25 01:57:42 2000 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
* path.cc (mount_info::read_cygdrive_info_from_registry): Read system
cygdrive prefix with KEY_READ.
(mount_info::get_cygdrive_info): Ditto.
Wed Nov 22 11:18:02 2000 Christopher Faylor <cgf@cygnus.com>
* Makefile.in: new-temp.a -> new-templib.a
Mon Nov 20 17:04:43 2000 Christopher Faylor <cgf@cygnus.com>
* spawn.cc (spawn_guts): Quoting was still wrong. Keep trying to
fix it.
Mon Nov 20 14:26:38 2000 Christopher Faylor <cgf@cygnus.com>
* spawn.cc (spawn_guts): YA tweak for dealing with arcane rules of
quoting in "normal" Microsoft programs.
* child_info.h: Bump fork magic number.
* include/sys/mount.h: Add an entry for mixed mode.
Fri Nov 17 12:28:00 2000 Corinna Vinschen <corinna@vinschen.de>
* path.cc (normalize_posix_path): Special care for root directory
in case of files beginning with a dot.
Fri Nov 17 12:28:00 2000 Corinna Vinschen <corinna@vinschen.de>
* syslog.cc (syslog): Add users SID to NT syslog entry.
Thu Nov 16 15:59:58 2000 Bradley A. Town <townba@pobox.com>
* fhandler_console.cc: New member variable `dwBufferSize' for `info'.
(fillin_info): Set `dwBufferSize' to the size of the console buffer.
(clear_screen): Use width of console buffer to calculate how many
spaces to clear.
Thu Nov 16 15:24:45 2000 Christopher Faylor <cgf@cygnus.com>
* Makefile.in: Make import library creation 'make -j2' friendly.
Thu Nov 16 10:28:00 2000 Corinna Vinschen <corinna@vinschen.de>
* uinfo.cc (uinfo_init): Call `cygwin_set_impersonation_token' to
reset `cygheap->user.token' to INVALID_HANDLE_VALUE.
Thu Nov 16 00:18:15 2000 Christopher Faylor <cgf@cygnus.com>
* exceptions.cc (interrupt_setup): Don't set signal mask here or races
occur with main thread. Set it in sigdelayed instead.
(sigreturn): Reflect change in stack order of ebp and flags.
(sigdelayed): Set stack frame correctly. Call set_process_mask here
with flags for last trapped signal.
(signal_dispatch): Add newmask.
* sigproc.cc (wait_sig): Eliminate ill-considered attempt to halt
looping signal processors.
* perthread.h (signal_dispatch): Add newmask field.
Wed Nov 15 22:08:00 2000 Corinna Vinschen <corinna@vinschen.de>
* uinfo.cc (internal_getlogin): Change parameter list to reflect
that `token' is member of cygheap_user now.
(uinfo_init): Use modified internal_getlogin.
* syscalls.cc (seteuid): Ditto.
Wed Nov 15 21:56:00 2000 Corinna Vinschen <corinna@vinschen.de>
* cygheap.h: Move `token' and `impersonated' from class _pinfo
to class cygheap_user.
* pinfo.h: Ditto.
* fork.cc (fork_child): Change usage of `token' and `impersonated'
accordingly.
(fork_parent): Ditto.
* security.cc (cygwin_set_impersonation_token): Ditto.
* sigproc.cc (proc_subproc): Ditto.
* spawn.cc (spawn_guts): Ditto.
* syscalls.cc (seteuid): Ditto.
* uinfo.cc (uinfo_init): Ditto.
Wed Nov 15 9:59:00 2000 Corinna Vinschen <corinna@vinschen.de>
* spawn.cc (spawn_guts): Revert patch to ignore chroot settings
on creating native Win32 environment.
Wed Nov 15 01:44:37 2000 Christopher Faylor <cgf@cygnus.com>
* fork.cc (slow_pid_reuse): Off-by-one.
Wed Nov 15 01:20:24 2000 Christopher Faylor <cgf@cygnus.com>
Throughout use myself->ppid_handle rather than parent_alive.
* child_info.h (child_info): Eliminate parent_alive.
* dcrt0.cc (dll_crt0_1): Call fork_init for debugging pid creation.
* fork.cc (fork_child): Reflect change to fixup_mmaps_after_fork
arguments.
(slow_pid_reuse): New function to grab last 'n' pids to prevent pid
reuse.
(fork_parent): Move last_fork_proc into slow_pid_reuse.
fork_pids debugging. Eliminate unnecessary call to set_child_mmap_ptr.
(fork_init): New debugging function.
* mmap.cc (fixup_mmaps_after_fork): Renamed from
recreate_mmaps_after_fork. Rely on copied data after a fork.
(set_child_mmap_ptr): Eliminate.
* pinfo.h (_pinfo): Eliminate parent_alive, mmap_ptr and reflect above
changes.
* spawn.cc (spawn_guts): Eliminate vestiges of "old way" of sending new
hProc to parent process.
Wed Nov 15 0:51:00 2000 Corinna Vinschen <corinna@vinschen.de>
* cygheap.cc (cygheap_root::cygheap_root): New function.
(cygheap_root::~cygheap_root): Ditto.
(cygheap_root::operator=): Ditto.
(cygheap_user::~cygheap_user): Ditto.
(cygheap_user::set_name): Ditto.
(cygheap_user::set_logsrv): Ditto.
(cygheap_user::set_domain): Ditto.
(cygheap_user::set_sid): Ditto.
* cygheap.h (cygheap_root): New class.
(cygheap_user): Ditto.
(init_cygheap): Change type of `root' member to cygheap_root.
Add `user' member.
* dir.cc (opendir): Use new `cygheap_root' class.
* dcrt0.cc (dll_crt0_1): Use new `cygheap_user' class.
* fork.cc (fork_parent): Ditto.
* grp.cc (getgroups): Ditto.
* passwd.cc (search_for): Ditto.
* path.cc: Use new `cygheap_root' class throughout.
* pinfo.h (_pinfo): Remove `use_psid'. Move `username', `psid',
`logsrv', `domain', `orig_{uid,gid}' and `real_{uid,gid}' to
cygheap_user class.
* security.cc: Use new `cygheap_user' class throughout.
* shared.cc (sec_user): Ditto.
* sigproc.cc (proc_subproc): Remove copy statements for user
related information moved to `cygheap_user' class.
* spawn.cc (spawn_guts): Invalidate current chroot settings
when creating Windows environment. Use new `cygheap_user' class.
* syscalls.cc: Use new `cygheap_user' class throughout.
* uinfo.cc: Ditto.
(internal_getlogin): Change parameters to reflect the
move of user information to cygheap.
Tue Nov 14 17:05:00 2000 Eric Fifer <efifer@dircon.co.uk>
* dir.cc (rewinddir): Always set __d_position = 0, so next
call to readdir() will restart the directory scan.
Tue Nov 14 00:51:28 2000 Christopher Faylor <cgf@cygnus.com>
* cygheap.h (init_cygheap): New struct holding values that live in the
Cygwin heap.
* child_info.h (child_info): Change pointer type of cygheap to
init_cygheap.
* cygheap.cc (init_cheap): Point cygheap_max after contents of cygheap.
Move some stuff into cygheap.h.
* dir.cc (opendir): Change to use root and rootlen in cygheap rather
than in myself.
(mkdir): Change to use umask in cygheap rather than in myself.
* path.cc: Ditto, throughout.
* syscalls.cc (_open): Ditto. Change to use umask in cygheap rather
than in myself.
(chroot): Change to allocate root dir on the cygwin heap.
(umask): Change to use umask in cygheap rather than in myself.
(cygwin_bind): Ditto.
* sigproc.cc (proc_subproc): Don't copy umask or root stuff as this
happens automatically now.
* pinfo.h (_pinfo): Migrate stuff out of here and into init_cheap.
* dcrt0.cc (dll_crt0_1): Call cygheap_init later in startup for first
cygwin process.
Sun Nov 12 23:01:35 2000 Christopher Faylor <cgf@cygnus.com>
* path.cc (get_device_number): Allow /dev/ttySn to designate a com
port.
Sat Nov 11 23:55:19 2000 Christopher Faylor <cgf@cygnus.com>
* path.h: Add __attribute__ ((regparm(x))) to commonly used functions.
* pinfo.h: Ditto.
* sigproc.h: Ditto.
* sync.h: Ditto.
Fri Nov 10 13:48:44 2000 Bradley A. Town <townba@pobox.com>
* dcrt0.cc: New global variable `ignore_case_with_glob'.
(dll_crt0_1): Disable case-insensitive globbing before calling `main'.
* environ.cc (glob_init): New static function to set or clear
`ignore_case_with_glob'.
(known): Changed "glob" entry to call `glob_init'.
* glob.c (match): Use case-insensitive globbing if needed.
Thu Nov 9 14:30:00 2000 Corinna Vinschen <corinna@vinschen.de>
* dir.cc (readdir): Avoid reading from the beginning when
readdir is called after a previous call has returned NULL.
Wed Nov 8 21:00:31 2000 Christopher Faylor <cgf@cygnus.com>
* select.cc (peek_pipe): Deal with pending newline in pty_master.
Wed Nov 8 15:35:32 2000 Christopher Faylor <cgf@cygnus.com>
* environ.cc (_addenv): malloc space for setenv if cygwin1.dll is used
in conjunction with older binaries.
(environ_init): Ditto.
Wed Nov 8 08:49:27 2000 Jason Tishler <jt@dothill.com>
* external.cc (get_cygdrive_info): New function.
* external.cc (get_cygdrive_prefixes): Change to use get_cygdrive_info
but toss the user and system flags.
* external.cc (cygwin_internal): Add new CW_GET_CYGDRIVE_INFO case.
* path.cc (mount_info::get_cygdrive_prefixes): Remove method.
* path.cc (mount_info::get_cygdrive_info): New method. Actually,
get_cygdrive_info is really an enhanced version of
get_cygdrive_prefixes renamed to get_cygdrive_info that also gets the
user and system flags.
* shared_info.h (get_cygdrive_prefixes): Remove method.
* shared_info.h (get_cygdrive_info): New method.
* include/cygwin/version.h: Bump minor API version due to adding
CW_GET_CYGDRIVE_INFO to cygwin_internal.
* include/sys/cygwin.h (cygwin_getinfo_types): Add
CW_GET_CYGDRIVE_INFO.
Tue Nov 7 20:58:00 2000 Corinna Vinschen <corinna@vinschen.de>
* autoload.cc: Add autoload statement for `WSASetLastError'.
* net.cc (cygwin_connect): Change error code to WSAEINPROGRESS
when connect returns WSAEWOULDBLOCK.
Mon Nov 6 15:11:57 2000 Christopher Faylor <cgf@cygnus.com>
* dcrt0.cc (sigthread::init): Reinstitute sigthread lock as a critical
section.
(dll_crt0_1): Move sigthread lock initialization to earlier in startup.
* exceptions.cc (interrupt_on_return): Remove previous kludgy attempt
to detect an invalid frame.
(call_handler): Eliminate inner for loop. Grab signal critical section
lock where appropriate.
* sigproc.cc (proc_subproc): Restore uid setting.
* sigproc.h (sigthread): Reinstitute sigthread lock as a critical
section.
(sigframe): Grab the sigthread lock before clearing frame to avoid
having the signal thread use an invalid frame.
Mon Nov 6 11:11:42 2000 Jason Tishler <jt@dothill.com>
* path.cc (mount_info::read_cygdrive_info_from_registry): Use
CYGWIN_INFO_CYGDRIVE_PREFIX, CYGWIN_INFO_CYGDRIVE_DEFAULT_PREFIX, and
CYGWIN_INFO_CYGDRIVE_FLAGS.
* path.cc (mount_info::write_cygdrive_info_to_registry): Use
CYGWIN_INFO_CYGDRIVE_PREFIX and CYGWIN_INFO_CYGDRIVE_FLAGS.
* path.cc (mount_info::remove_cygdrive_info_from_registry): Ditto.
* path.cc (mount_info::get_cygdrive_prefixes): Use
CYGWIN_INFO_CYGDRIVE_PREFIX.
* include/cygwin/version.h: Add CYGWIN_INFO_CYGDRIVE_FLAGS,
CYGWIN_INFO_CYGDRIVE_PREFIX, and CYGWIN_INFO_CYGDRIVE_DEFAULT_PREFIX.
Mon Nov 6 11:10:44 2000 Jason Tishler <jt@dothill.com>
* errno.cc (strerror): Change EAGAIN case to return "Resource
temporarily unavailable" instead of "No more processes".
Mon Nov 6 01:04:35 2000 Christopher Faylor <cgf@cygnus.com>
* child_info.h (child_info): Add pppid_handle for closing the parent's
parent handle.
* dcrt0.cc (_dll_crt0): Close parent's parent handle when spawned or
forked.
* debug.cc (add_handle): Correct erroneous reference to handle
structure when printing warning.
* exceptions.cc (interrupt_now): Always return 1.
(interrupt_on_return): Accept a sigthread argument. Check to see if
this argument has been trashed prior to setting up the stack return.
(call_handler): Add a loop around attempts to dispatch signals to
detect case where interrupt_on_return fails.
(_sigdelayed): Set up a temporary frame pointer prior to calling stuff
that could trigger an interrupt or the stack walking code will be very
confused.
* fork.cc (fork_parent): Move a lot of the setup of the child process
into proc_subproc.
* spawn.cc (spawn_guts): Ditto. Use ppid_handle to contact logical
parent when reparenting execed process.
* pinfo.h (_pinfo): Remember the logical handle of the parent process.
* sigproc.cc (proc_subproc): Record most stuff necessary for the _pinfo
structure that is inferrable from myself when adding children.
(wait_sig): Always set 'pending_signals' flag when about to kick off
the signal scanning loop. Reset it only if there are no pending
signals.
Sun Nov 5 13:46:23 2000 Christopher Faylor <cgf@cygnus.com>
* pinfo (wait_subproc): Son of neverending debug tweaking.
Sun Nov 5 11:45:15 2000 Christopher Faylor <cgf@cygnus.com>
* pinfo (wait_subproc): Neverending debug tweaking.
Sun Nov 5 01:34:51 2000 Christopher Faylor <cgf@cygnus.com>
* pinfo.cc (winpids:add): New method.
(winpids::enumNT): New method renamed from EnumProcessesNT.
Use add method to add elements to the lists.
(winpids::enum9x): New method renamed from EnumProcesses9x.
Use add method to add elements to the lists.
(winpids::enum_init): Accept 'winpid' parameter to control whether
to add all windows pids to the list.
(winpids::release): New method.
* pinfo.h (winpids): Reflect above changes.
* signal.cc (kill_pgrp): Ditto.
* external.cc (fillout_pinfo): Ditto.
Sat Nov 4 22:07:03 2000 Christopher Faylor <cgf@cygnus.com>
* exceptions.cc (handle_sigsuspend): Record frame here for signalling.
(set_process_mask): Ditto.
Sat Nov 4 14:24:10 2000 Christopher Faylor <cgf@cygnus.com>
* sigproc.cc (wait_subproc): Still more debugging cleanup.
Sat Nov 4 00:51:38 2000 Christopher Faylor <cgf@cygnus.com>
* pinfo.cc (EnumProcessesNT): Avoid 0 pids.
(EnumProcesses9x): Ditto.
* sigproc.cc (remove_child): Eliminate.
(proc_subproc): Move remove_child stuff here.
(wait_subproc): Synchronize with proc_subproc when error occurs. Add
more debugging info.
* sigproc.h (procstuff): Add an entry.
* spawn.cc (spawn_guts): Add sigframe here.
Fri Nov 3 20:07:14 2000 Christopher Faylor <cgf@cygnus.com>
* sigproc.cc (wait_subproc): Refine debug output.
Thu Nov 2 23:01:20 2000 Christopher Faylor <cgf@cygnus.com>
* pinfo.cc (pinfo::init): Reverse order of setting status and pid info
in an execed process to avoid a race.
* sigproc.cc (wait_subproc): Print more info when a WFSO error occurs.
* automode.c: New file.
* syscalls.cc (close_all_files): Streamline slightly.
* cygheap.cc (ccalloc): Clear *entire* allocated array.
Thu Nov 2 01:58:03 2000 Christopher Faylor <cgf@cygnus.com>
* ntdll.h: Remove IO_COUNTERS definition since it is now in winnt.h.
Thu Nov 2 00:10:23 2000 Christopher Faylor <cgf@cygnus.com>
* pinfo.cc (EnumProcessesNT): New function. Eliminates dependence on
psapi.h.
(EnumProcesses9x): Rename from EnumProcessesW95. Change arguments to
be more useful for cygwin.
(winpids::init): Accommodate argument changes.
(enum_init): Ditto.
* pinfo.h (winpids): Make pidlist dynamically extendable by storing it
as a pointer and remembering the size.
* ntdll.h: Add extra definitions needed for EnumProcessesNT. Reformat
via 'indent'.
Wed Nov 1 21:08:23 2000 Christopher Faylor <cgf@cygnus.com>
* exceptions.cc (interruptible): Remove obsolete tests.
(sigreturn): Construct pseudo-frame-pointer so that signal handler can
figure out where to put return address when signals are coming in
quickly.
* path.cc (cwdstuff::get): Allow length 0 buffer length when buffer
when NULL.
Tue Oct 31 18:12:56 2000 Christopher Faylor <cgf@cygnus.com>
* path.h (has_exec_chars): Standard function for checking for
executable magic numbers.
* path.cc (symlink_info::check): Use the above function.
* fhandler.cc (fhandler_disk_file::open): Ditto.
Tue Oct 31 17:57:52 2000 Christopher Faylor <cgf@cygnus.com>
* path.cc (_readlink): Return ENOENT when file does not exist.
Tue Oct 31 23:35:00 2000 Corinna Vinschen <corinna@vinschen.de>
* fhandler.h (fhandler_dev_raw): Add method `fixup_after_exec'.
Tue Oct 31 22:39:00 2000 Corinna Vinschen <corinna@vinschen.de>
* fhandler.h (fhandler_dev_raw): Add definition for method
`fixup_after_fork'.
* fhandler_raw.cc (fhandler_dev_raw::fhandler_dev_raw): Add
`set_need_fixup_after_fork' call.
(fhandler_dev_raw::~fhandler_dev_raw): Revert to user space
allocation.
(fhandler_dev_raw::open): Ditto.
(fhandler_dev_raw::dup): Ditto. Reset buffer pointer.
(fhandler_dev_raw::fixup_after_fork): New function.
* fhandler_tape.cc (fhandler_dev_tape::open): Revert to user space
memory allocation.
(fhandler_dev_tape::ioctl): Ditto. Change behaviour on MTSETBLK when
new size is 1.
Tue Oct 31 20:56:00 2000 Corinna Vinschen <corinna@vinschen.de>
* fhandler_tape.cc (fhandler_dev_tape::open): Fix memory allocation.
Use Cygwin heap instead of user heap.
(fhandler_dev_tape::ioctl): Ditto.
Tue Oct 31 12:00:06 2000 Christopher Faylor <cgf@cygnus.com>
* pinfo.cc (enum_init): Don't suffer silently if we can't load the
process enumerators.
Mon Oct 30 16:54:26 2000 Christopher Faylor <cgf@cygnus.com>
* signal.cc (kill_pgrp): Revert 25-Oct change.
(kill_worker): Ditto.
Sun Oct 29 20:52:31 2000 Christopher Faylor <cgf@cygnus.com>
* include/cygwin/version.h: Bump DLL minor version number to 6.
Sat Oct 28 01:39:53 2000 Christopher Faylor <cgf@cygnus.com>
* configure.in: Eliminate subdir stuff.
* configure: Regenerate.
* include/getopt.h (option): Make name field 'const'.
Fri Oct 27 20:51:00 2000 Corinna Vinschen <corinna@vinschen.de>
* autoload.cc: New file keeping all autoload stuff.
* Makefile.in: Add autoload.o to dependencies.
* dcrt0.cc: Move all autoload stuff to autoload.cc.
* fhandler_mem.cc: Ditto.
* net.cc: Ditto.
* uinfo.cc: Ditto.
Fri Oct 27 11:37:20 2000 Christopher Faylor <cgf@cygnus.com>
* sigproc.cc (wait_sig): Add braces to avoid confusion.
Fri Oct 27 11:48:00 2000 Corinna Vinschen <corinna@vinschen.de>
* fhandler_socket.cc: New file.
* Makefile.in: Add fhandler_socket.o to dependencies.
* fhandler.h: Change comment.
* net.cc Move all fhandler_socket methods to fhandler_socket.cc.
* winsup.h: Add declaration for `ws2_32_handle'.
Thu Oct 26 11:51:59 2000 Corinna Vinschen <corinna@vinschen.de>
* dtable.cc (dtable::release): Check for socket. Change
cnt_need_fixup_before accordingly.
(dtable::dup2): Ditto.
(dtable::fixup_before_fork): New method.
(dtable::fixup_before_exec): Ditto.
* dtable.h (class dtable): Add member `cnt_need_fixup_before'. Add
definition for methods `dec_need_fixup_before', `inc_need_fixup_before',
`need_fixup_before', `fixup_before_exec' and `fixup_before_fork'.
* fhandler.h (class fhandler_base): Slight rearrangements. Add
definitions for methods `fixup_before_fork_exec'.
(class fhandler_socket): Eliminate superfluous constructor.
Add member `prot_info_ptr'. Add destructor. Add definitions for
methods `dup', `fixup_before_fork_exec', `fixup_after_fork' and
`fixup_after_exec'.
* fork.cc (fork_parent): Care for file types which need a fixup
before fork. Start child in suspended state then.
* net.cc: New global variable `ws2_32_handle' and `wsadata'.
(fdsock): Check for Winsock version. Call `set_socket_inheritance'
only if Winsock version < 2.0. Care for `need_fixup' count in fdtab.
(cygwin_socket): Eliminate call to `set_socket_inheritance'.
(cygwin_accept): Ditto.
(cygwin_rcmd): Ditto.
(cygwin_rresvport): Ditto.
(cygwin_rexec): Ditto.
(socketpair): Ditto.
(fhandler_socket::fhandler_socket): Set `need_fork_fixup'. Allocate
space for the WSAPROTOCOL_INFOA struct used in fixup.
(fhandler_socket::~fhandler_socket): New destructor.
(fhandler_socket::fixup_before_fork_exec): New method.
(fhandler_socket::fixup_after_fork): Ditto.
(fhandler_socket::dup): Ditto.
(wsock_init): New static function.
(LoadDLLinitfunc (wsock32)): Rearranged.
(LoadDLLinitfunc (ws2_32)): New function.
(dummy_autoload): Add autoload statemants for `WSADuplicateSocketA'
and `WSASocketA'.
* spawn.cc (spawn_guts): Care for file types which need a fixup
before exec. Start child in suspended state then.
Wed Oct 25 20:49:59 2000 Christopher Faylor <cgf@cygnus.com>
* signal.cc (kill_pgrp): Don't limit sending of signals to stopped
processes when sig < 0.
(kill_worker): Only send SIGCONT to stopped processes when sendSIGCONT.
Wed Oct 25 13:56:39 2000 Christopher Faylor <cgf@cygnus.com>
* exceptions.cc (sig_handle): Just make sure that wait_sig loops when
receiving a SIGCONT. Don't block waiting for completion that will
never occur.
Wed Oct 25 09:59:14 2000 Christopher Faylor <cgf@cygnus.com>
* dtable.cc (dtable::fixup_after_exec): Use variable rather than
constantly indexing into fds array.
(dtable::fixup_after_fork): Ditto.
Wed Oct 25 10:43:00 2000 Corinna Vinschen <corinna@vinschen.de>
* fhandler.cc (fhandler_base::fcntl): Treat O_NONBLOCK and OLD_O_NDELAY
as exactly the same. If one is set, both are set.
* net.cc (fhandler_socket::fcntl): Ditto.
Tue Oct 24 23:58:35 2000 Christopher Faylor <cgf@cygnus.com>
* dcrt0.cc (do_exit): Remove debugging statement.
Tue Oct 24 23:45:09 2000 Christopher Faylor <cgf@cygnus.com>
* dcrt0.cc (do_exit): Don't bother looking for pgrp children to send
SIGHUP if process has never created any children.
* fork.cc (fork): Set flag indicating that there is another process
with our process group.
* spawn.cc (spawn_guts): Ditto.
* pinfo.h (set_has_pgid_children): New methods for setting when process
has children in its process group.
* syscalls.cc (setpgid): Clear has_gid_children if pgid changes.
Tue Oct 24 20:38:00 2000 Corinna Vinschen <corinna@vinschen.de>
* ntdll.h: New file.
* fhandler_mem.cc: Move ntdll.dll specific definitions and
declarations to ntdll.h.
* sysconf.cc (sysconf): Add support for _SC_NPROCESSORS_CONF,
_SC_NPROCESSORS_ONLN, _SC_PHYS_PAGES and _SC_AVPHYS_PAGES.
Tue Oct 24 20:00:00 2000 Corinna Vinschen <corinna@vinschen.de>
* fhandler.cc (fhandler_base::fcntl): Behave properly when passed
previous version of O_NDELAY.
* syscalls.cc: Move OLD_O_NDELAY to winsup.h.
* winsup.h: Define OLD_O_NDELAY now.
Mon Oct 23 21:47:55 2000 Christopher Faylor <cgf@cygnus.com>
* exceptions.cc (signal_exit): Kill any executing child process if
we're dying.
* path.h: Remove unneeded extern.
* spawn.cc (std_suffixes): Make static. Don't set dwProcessId here
since it makes the process unsignalable. Set strace flag that this is
an execed process stub.
* strace.cc (strace::vsprntf): Use strace flag to indicate when to
visually flag that this is an exec stub.
* include/sys/strace.h (strace): Add 'execing' flag.
Mon Oct 23 16:43:33 2000 Christopher Faylor <cgf@cygnus.com>
* sigproc.cc (proc_subproc): Don't send a false positive if WNOHANG and
no processes are available for waiting.
Mon Oct 23 22:27:00 2000 Corinna Vinschen <corinna@vinschen.de>
* fhandler.cc (fhandler_base::fcntl): Setting flags in F_SETFL
branch according to Linux documentation.
Mon Oct 23 21:43:00 2000 Corinna Vinschen <corinna@vinschen.de>
* fcntl.cc (_fcntl): Rearrange as wrapper function. Move all
functionality except F_DUPFD to fhandler classes.
* fhandler.cc (fhandler_base::fcntl): New method.
* net.cc (fhandler_socket::fcntl): Ditto.
* fhandler.h (class fhandler_base): Add method prototype for fcntl().
(class fhandler_socket): Ditto.
Mon Oct 23 12:44:35 2000 Christopher Faylor <cgf@cygnus.com>
* sigproc.cc (proc_subproc): Correctly handle flags for WNOHANG case.
Mon Oct 23 10:00:00 2000 Corinna Vinschen <corinna@vinschen.de>
* security.cc: Eliminate C++ comments throughout.
Sun Oct 22 23:33:00 2000 Christopher Faylor <cgf@cygnus.com>
* fork.cc (fork): Set sigframe here, since it can pause for a
considerable amount of time.
* environ.cc (_addenv): Add debugging.
* fhandler.cc: Eliminate unneeded include.
* smallprint.c: Ditto.
Sun Oct 22 12:07:00 2000 Corinna Vinschen <corinna@vinschen.de>
* pinfo.cc (pinfo_init): Eliminate call to `set_process_privileges'.
* security.cc (write_sd): Call `set_process_privileges' on the first
call to `write_sd'.
(set_process_privileges): Eliminate adjusting SE_BACKUP_NAME privilege.
Sat Oct 21 16:57:23 2000 Christopher Faylor <cgf@cygnus.com>
* pinfo.cc (pinfo::init): Make PID_EXECED signal creation as well as
PID_IN_USE.
Sat Oct 21 01:52:54 2000 Christopher Faylor <cgf@cygnus.com>
* spawn.cc (spawn_guts): Don't do the reparenting step if we notice
that the child has exited prior to sending the subprocess_ready signal
(?).
Sat Oct 21 00:46:36 2000 Christopher Faylor <cgf@cygnus.com>
* fhandler.h (fhandler_console): Remove tcsetpgrp.
* fhandler_console.cc (fhandler_console::tcsetpgrp): Eliminate.
* fork.cc (fork_parent): Avoid returning same pid twice in a row
regardless of OS.
* pinfo.cc (pinfo::init): Rename create argument to flags and treat it
as such.
* signal.cc (set_sigcatchers): New function.
(signal): Use set_sigcatchers to increment or decrement sigcatcher
tracker.
(sigaction): Ditto. Add debugging output.
* spawn.cc (spawn_guts): Always quote first argv[0] argument when it's
a COMSPEC shell.
2000-10-20 DJ Delorie <dj@redhat.com>
* times.cc (to_time_t): pass zero time as epoch
* fhandler.cc (fstat): copy atime/ctime from mtime if they're zero
Thu Oct 19 23:31:41 2000 Christopher Faylor <cgf@cygnus.com>
* external.cc (fillout_pinfo): Pass PID_NOREDIR flag to pinfo init to
avoid finding execed processes twice.
* signal.cc (kill_pgrp): Ditto.
* spawn.cc (spawn_guts): Avoid passing first argument to CreateProcess
when running a windows shell so that CreateProcess will locate the
shell. Reorganize so that correct error is returned when CreateProcess
fails.
Thu Oct 19 13:55:31 2000 Christopher Faylor <cgf@cygnus.com>
* dcrt0.cc (sigthread::init): Correct overzealous ifdef.
* exceptions.cc (call_handler): Avoid calling sigthread acquire lock.
* sigproc.h (sigthread): Comment out lock for now.
* sync.cc (muto::acquire): Add a minor optimization.
2000-10-18 DJ Delorie <dj@redhat.com>
* Makefile.in: add miscfuncs.cc
* miscfuncs.cc: new, miscellaneous functions
* winsup.h: define table-driven tolower/toupper
* environ.cc: use them
* fhandler_console.cc: ditto
* fhandler_termios: ditto
* path.cc: ditto
(strncasematch, strcasematch, strcasestr): move to miscfuncs.cc
Wed Oct 18 20:50:27 2000 Christopher Faylor <cgf@cygnus.com>
* sigproc.h (sigthread): Eliminate locking for now since per thread
signalling is not available.
* dcrt0.cc (sigthread::init): Ditto.
(dll_crt0_1): Move set_process_privileges call (temporarily?) to
pinfo_init.
(pinfo_init): Only call set_process_privileges when allow_ntsec.
2000-10-18 DJ Delorie <dj@redhat.com>
* dcrt0.cc (dll_crt0_1): init cygcwd before forkee branch
* environ.cc (conv_start_chars): Cache a table of "first
characters" for environment variables needing conversion.
(getwinenv): Use it.
(environ_init): Create it, also check first chars for TERM and
CYGWIN.
* path.cc: Use lookup table for case insensitive comparisons.
Wed Oct 18 00:48:49 2000 Christopher Faylor <cgf@cygnus.com>
* exceptions.cc (call_handler): Make signal pending if sigsave.sig is
still active.
* syscalls.cc (_read): Don't clear errno.
* sigproc.cc (wait_sig): Don't scan the waiting process list after a
SIGCHLD if there are no zombies to reap.
* winsup.h: Use __builtin_strcmp.
* environ.cc (posify): Don't initialize len unless it is required
(from DJ Delorie <dj@redhat.com>).
Tue Oct 17 14:50:31 2000 Christopher Faylor <cgf@cygnus.com>
* sigproc.cc (proc_subproc): Remove unneeded test for correct process
in PROC_ADDCHILD. Return 0 when terminated child has just been
reparented.
(wait_subproc): Only send SIGCHLD when proc_subproc returns != 0.
* strace.cc (strace::vsprntf): Only strip .exe extension from program
name.
2000-10-16 Charles Wilson <cwilson@ece.gatech.edu>
* fhandler_clipboard.cc: new file
* Makefile.in: include fhandler_clipboard.o in DLL_OFILES list.
* fhandler.h: add FH_CLIPBOARD to the devices enum.
(fhandler_dev_clipboard): new
* path.cc (windows_device_names): add "\\dev\\clipboard"
(get_device_number): check for "clipboard"
* dcrt0.cc: declare a few more functions from winuser.h
* dtable.cc (dtable::build_fhandler): check for FH_CLIPBOARD in
switch().
Mon Oct 16 21:36:57 2000 Christopher Faylor <cgf@cygnus.com>
* debug.cc (add_handle): Issue warning on attempts to add the same
handle more than once.
* fhandler_tty.cc (fhandler_tty_slave::open): Protect some handles.
(fhandler_tty_common::close): Use proper name when closing handles.
(fhandler_pty_master::close): Don't close to_slave or from_slave since
they've already been closed earlier in the function.
* sigproc.cc (proc_subproc): Don't protect vchild->hProcess. Expect
that the caller will do this, instead.
* tty.cc (tty_list::terminate): Use proper name when closing handles.
(tty::make_pipes): Protect some handles.
Mon Oct 16 18:37:22 2000 Christopher Faylor <cgf@cygnus.com>
* Makefile.in: Remove some obsolete stuff.
* dcrt0.cc (dll_crt0_1): Call signal_fixup_after_exec where appropriate.
Set myself->uid from parent version.
Just use ThreadItem Init method. Close or store hexec_proc as appropriate.
(_dll_crt0): Store user_data->forkee here so that proper tests can be made
subsequently.
(do_exit): Remove hExeced stuff.
* environ.cc (environ_init): Accept environ count as well as environ pointer.
* environ.h: Reflect above change.
* pinfo.cc (pinfo_init): Ditto. Accept environ count.
(fixup_in_spawned_child): Remove.
* spawn.cc (spawn_guts): Move signal code to dll_crt0_1. Don't suspend
execing process since it is no longer necessary. Store envc.
* exceptions.cc (signal_fixup_after_exec): New function.
(call_handler): Remove hExeced test.
* child_info.h (cygheap_exec_info): Store envc as well as envp.
(child_info_spawn): Store hexec_proc so that it can be closed in child.
* path.cc (normalize_posix_path): Avoid intermediate use of temporary cwd buf.
(normalize_win32_path): Ditto.
(cwdstuff::get_initial): Always set lock.
* sigproc.h: Remove hExeced.
* strace.cc (strace::vsprntf): Modify to accommodate for lack of hExeced.
* thread.cc (MTinterface::Init): Merge Init1 and ClearReent into this method.
(MTinterface::Init1): Eliminate.
(MTinterface::ClearReent): Eliminate.
* thread.h: Reflect above changes.
* include/sys/strace.h (strace): Make microseconds() public.
Sun Oct 15 21:54:52 2000 Christopher Faylor <cgf@cygnus.com>
Make various functions 'regparm', throughout.
* pinfo.h (_pinfo): Inline simple signal manipulation functions.
Requires inclusion of thread.h which was removed from .cc files, where
appropriate. throughout.
* pinfo.cc: Eliminate signal manipulation functions.
(_pinfo::exit): Calculate total rusage for exiting process here.
* cygheap.cc (size2bucket): Eliminate.
(init_buckets): Ditto.
(_cmalloc): Calculate size and bits in a loop rather than going through
a function call.
(_crealloc): Use stored array index to calculate allocated size.
* spawn.cc (spawn_guts): Use _pinfo exit method to exit, calculating
cpu usage.
Sat Oct 14 21:24:16 2000 Christopher Faylor <cgf@cygnus.com>
* exceptions.cc (set_console_handler): Don't allocate
console_handler_thread_waiter. It is obsolete.
(ctrl_c_handler): Don't use console_handler_thread_waiter.
* path.cc (hash_path_name): Fix handling of relative names. Make case
insensitive.
* path.h (suffix_info): Use initializers.
* pinfo.h (_pinfo): Avoid initializers for null case.
* resource.cc (fill_rusage): Zero rest of rusage structure.
* security.cc (set_process_privileges): Don't reopen parent process.
Just use hMainProc.
* signal.cc (signal): Track when a signal handler has been used.
(sigaction): Ditto.
* sigproc.cc (pchildren): Use default initializer.
(zombies): Ditto.
(sigproc_terminate): Avoid closing handles that will be closed on exit
anyway.
(wait_sig): Send signal to "parent" on EXECing, not FORKing.
(wait_subproc): Send SIGCHLD here rather than in proc_wait to avoid
potential muto conflicts.
* sigproc.h (sigthread): Don't initialize to zero. It's the default.
* spawn.cc (spawn_guts): Fill in resources from exec parent prior to
termination.
* sync.h (muto): Don't initialize to zero.
* syscalls.cc (close_all_files): Use one lock around entire loop and
call fhandler close/release stuff directly.
(_read): Don't use ready_for_read if there are not signal handlers
active.
Sat Oct 14 12:24:24 2000 Christopher Faylor <cgf@cygnus.com>
* dcrt0.cc (dll_crt0_1): Fix display of "title".
(do_exit): Use pinfo exit method to exit.
(__api_fatal): Ditto.
* exceptions.cc (signal_exit): Ditto.
* fork.cc (fork_child): Remove debugging stuff. Use pinfo_fixup_after
fork in place of exec_fixup_after_fork.
* pinfo.cc (pinfo_fixup_after_fork): New method.
(pinfo_fixup_in_spawned_child): Ditto.
(_pinfo::exit): New method.
(_pinfo::init): Remove recursion. Detect pathological case where pinfo
structure already exists for new pid.
* pinfo.h (_pinfo): Reorganize slightly. Add new method and new
function declarations.
* sigproc.cc (proc_exists): Previous simplification was a little to
simple. Try harder to detect if a process exists.
(proc_terminate): Use PID_EXITED setting to determine if process is
still around.
(WFSO): Remove debugging statement.
(WFMO): Ditto.
* spawn.cc (exec_fixup_after_fork): Eliminate.
(spawn_guts): Always set old_title to NULL. Is it really needed? Move
hexec_proc to pinfo.cc. Call pinfo_fixup_in_spawned_child to eliminate
handle link after a spawn.
* include/sys/cygwin.h: Remove PID_NOT_IN_USE. Add PID_EXITED.
Sat Oct 14 10:54:00 2000 Corinna Vinschen <corinna@vinschen.de>
* cygwin.din: Add symbol hstrerror.
* net.cc: Change meaning of member `s' of struct host_errmap.
(set_host_errno): Fix error in loop condition.
(hstrerror): Ditto.
(herror): Add appropriate functionality.
* include/netdb.h: Add declaration of hstrerror.
* include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 29.
Sat Oct 14 01:45:25 2000 Christopher Faylor <cgf@cygnus.com>
* cygheap.cc (cygheap_fixup_in_child): Don't page round cygheap copied
from parent.
* dcrt0.cc (do_exit): Don't cleanup pinfo on exit. That happens
automatically now.
* exceptions.cc (signal_exit): Ditto.
* fork.cc (fork_parent): Use stack_here value passed in from fork().
(fork): Figure out top of stack here and pass it to fork_parent.
* pinfo.cc (_pinfo::record_death): Eliminate.
* pinfo.h (_pinfo): Ditto.
* sigproc.cc (proc_exists): Simplify.
(proc_terminate): Ditto.
(remove_zombie): Don't cleanup pinfo stuff.
(wait_sig): Send subproc_ready signal whether execed or spawned.
* spawn.cc (spawn_guts): Always create subproc_ready event. Use it for
both exec and spawn.
(_spawnve): Send proper mode to spawn_guts when mode != _P_OVERLAY.
Thu Oct 12 23:11:05 2000 Christopher Faylor <cgf@cygnus.com>
* dtable.cc (dtable::fixup_after_fork): Revert thinko below.
* pinfo.cc (set_myself): Show pid in initial strace line.
Thu Oct 12 17:58:03 2000 Christopher Faylor <cgf@cygnus.com>
* child_info: Bump child_info "version".
(child_info): Move some fields from child_info_spawn to here.
* cygheap.cc: Make cygheap pointers NOCOPY.
* dcrt0.cc (dll_crt0_1): Copy cygwin heap here regardless of whether
we've been forked or execed.
* dtable.cc (dtable::fixup_after_fork): Just release close-on-exec fds.
* exceptions.cc (stackdump): Respond to C warning.
* fork.cc: Reorganize to minimize stack copying.
(fork_child): New function.
(fork_parent): Ditto.
(sync_with_child): Don't suspend the forkee.
(sync_with_parent): Ditto. Make into a function.
* heap.cc (heap_init): Add some debugging output.
* path.cc (path_conv::check): Add an assertion.
(has_suffix): Ditto.
* security.cc (get_pw_sid): Defend against NULL.
* sigproc.cc (proc_subproc): Fix debugging output.
(wait_sig): Ditto.
* strace.cc: Make statics NO_COPY throughout.
(strace::vsprntf): Defend against NULL.
Thu Oct 12 00:25:29 2000 Christopher Faylor <cgf@cygnus.com>
* errno.cc (seterrno_from_win_error): Fix debugging output.
* fhandler.cc (fhandler_base::fstat): Move to inline method in
fhandler.h.
(fhandler_base::set_io_handle): Ditto.
* fhandler.h (fhandler_base): Make some methods inline.
* fhandler_console.cc (fhandler_console::write_normal): Make buffer
larger.
* sigproc.h (sigframe::sigframe): Actually use set ebp parameter
correctly.
* spawn.cc (spawn_guts): Set dwProcessId when exec'ing. Just exit
immediately after reparenting.
* syscalls.cc: Sprinkle sigframe stuff throughout.
* wait.cc (wait4): Set signal frame here.
Tue Oct 10 19:54:06 2000 Christopher Faylor <cgf@cygnus.com>
* dcrt0.cc (__api_fatal): Don't rely on small_printf to display errors.
Always display problems to the console, if possible.
Tue Oct 10 15:21:10 2000 Christopher Faylor <cgf@cygnus.com>
* path.cc (cwdstuff::get): Set EINVAL when length is zero.
Mon Oct 9 14:07:04 2000 Christopher Faylor <cgf@cygnus.com>
* path.cc (mount_info::cygdrive_posix_path): Handle e:foo construction
correctly.
Mon Oct 9 16:44:00 2000 Corinna Vinschen <corinna@vinschen.de>
* fhandler_mem.cc (fhandler_dev_mem::fhandler_dev_mem):
Fix debug output.
Mon Oct 9 15:58:00 2000 Corinna Vinschen <corinna@vinschen.de>
* fhandler_mem.cc: Eliminate unused include statements.
(fhandler_dev_mem::fhandler_dev_mem): Check for 9X/ME.
Mon Oct 9 15:11:00 2000 Corinna Vinschen <corinna@vinschen.de>
* fhandler.h (fhandler_dev_mem): Erase member `init_phase' and
member function `init'.
* fhandler_mem.cc: Add typedefs for NT internal data types
`SYSTEM_INFORMATION_CLASS' and `SYSTEM_BASIC_INFORMATION'.
Add prototype for `NtQuerySystemInformation' function.
(fhandler_dev_mem::fhandler_dev_mem): Takes over initialization task
from `init'. Use `NtQuerySystemInformation' function to evaluate the
size of physical memory instead of interval search.
(fhandler_dev_mem::init): Eliminated.
(fhandler_dev_mem::open): Don't call `init'.
(fhandler_dev_mem::read): Eliminate check for `init_phase'.
(dummy_autoload): Add load statement for `NtQuerySystemInformation'.
Sun Oct 8 22:38:40 2000 Christopher Faylor <cgf@cygnus.com>
* dtable.cc (set_std_handle): Use std_consts array to control
SetStdHandle settings.
(dtable::fixup_after_fork): Ditto.
* exceptions.cc (set_sig_errno): Remove some debugging output.
* path.cc (path_conv::check): Don't OR need_directory with flags sent
to symlink_info::check.
(symlink_info::check): Use PATH_ALL_EXEC to determine when a file is
executable.
* path.h (path_types): Add PATH_ALL_EXEC.
(isexec): Use PATH_ALL_EXEC so that cygexec types will be considered
executable.
* pinfo.h (_pinfo): Add a process handle that is kept open throughout
the life of a cygwin pid.
* sigproc.cc (proc_exists): Remove hopefully obsolete stuff.
(proc_subproc): Set up process handle that is kept open throughout the
life of a cygwin pid. Reorganize PROC_WAIT stuff to use common code.
(proc_terminate): Close pid lifetime process handle.
(checkstate): Cleanup.
(stopped_or_terminated): Move zombie cleanup.
(remove_zombie): To here.
* spawn.cc (spawn_guts): Reorganize reparenting code for 1247th time.
Sat Oct 7 13:59:15 2000 Christopher Faylor <cgf@cygnus.com>
* fhandler.h (fhandler_base): Remove obsolete _rpos and _rsize
elements.
* fhandler.cc (fhandler_base::open): Ditto.
* fhandler.cc (fhandler_base::fhandler_base): Ditto.
(fhandler_base::read): Ditto. Add more debugging output. Don't issue
a \r when \r\n detected.
* pipe.cc (make_pipe): Streamline slightly. Make debug output more
interesting.
* strace.cc (strace::vsprintf): Use __progname where appropriate to
distinguish strace output when exec'ing.
Sat Oct 7 19:25:00 2000 Corinna Vinschen <corinna@vinschen.de>
* fhandler.h (fhandler_dev_mem): Add methods mmap, munmap and msync.
Add `unit' member.
* fhandler_mem.cc (fhandler_dev_mem): Initialize `unit' as well.
(init): Care for differences between /dev/mem, /dev/kmem (not
implemented yet) and /dev/port.
(open): Change debug message to reflect the device.
(mmap): New function.
(munmap): Ditto.
(msync): Ditto.
(fstat): Use unit when setting st_dev in stat structure.
* mmap.cc (mmap): Handle MAP_ANONYMOUS flag.
Change error handling slightly.
* path.cc (get_device_number): Handle /dev/port.
Fri Oct 6 23:21:29 2000 Christopher Faylor <cgf@cygnus.com>
* syscalls.cc (_read): Behave properly when passed previous version of
O_NDELAY. Fix up debugging output.
Thu Oct 5 20:34:48 2000 Christopher Faylor <cgf@cygnus.com>
* net.cc (set_socket_inheritance): Rename from duplicate_socket. Use
NT specific call when appropriate.
(__set_winsock_errno): Rename from set_winsock_errno. Accept function
and line as arguments.
* path.cc (path_conv::check): Continue the neverending battle to make
cygwin properly understand that path specs ending in a slash require
that the path refer to a directory. Windows does not do this by
default.
(symlink_info::check): Remove ENOTDIR test. Move it to
path_conv::check.
* path.h: Remove obsolete constant.
* winsup.h (set_winsock_errno): New macro.
Thu Oct 5 14:58:00 2000 Corinna Vinschen <corinna@vinschen.de>
* fhandler.h: Add mmap(), munmap() and msync() to fhandler_base
and fhandler_disk_file.
* mmem.cc (mmap): Eliminated device dependent implementation details.
These are moved to the appropriate fhandler class.
(munmap): Ditto.
(msync): Ditto.
(fhandler_base::mmap): New method.
(fhandler_base::munmap): Ditto.
(fhandler_base::msync): Ditto.
(fhandler_disk_file::mmap): Ditto.
(fhandler_disk_file::munmap): Ditto.
(fhandler_disk_file::msync): Ditto.
Thu Oct 5 01:52:43 2000 Christopher Faylor <cgf@cygnus.com>
* net.cc: General cleanup.
(fdsock): Return pointer to created fhandler_socket.
(cygwin_socket): Use pointer returned by fdsock. Return correct errno
when fd < 0.
Thu Oct 5 00:48:40 2000 Christopher Faylor <cgf@cygnus.com>
* exceptions.cc (interruptible): Add extra debugging.
* sigproc.h (wait_sig): Fill in frame pointer, by default, prior to
calling or suffer confusion due to September 7 change below.
Wed Oct 4 23:10:27 2000 Christopher Faylor <cgf@cygnus.com>
* include/netinet/tcp.h: Remove winsock.h include.
* include/sys/cygwin.h: Move windows specific reference within
conditional.
Thu Oct 5 1:13:00 2000 Corinna Vinschen <corinna@vinschen.de>
* include/sys/mman.h: Add missing MAP_FAILED macro.
Wed Oct 4 18:48:00 2000 Corinna Vinschen <corinna@vinschen.de>
* fhandler.h (fhandler_dev_mem): Add method `init'. Add members
`mem_size' and `init_phase'.
* fhandler_mem.cc (init): New function to figure out the size of
the physical memory.
(open): Add checking for illegal flags. Change usage of access mode.
(write): Add intended functionality.
(read): Add parameter checking. Eliminate page size constant. Use
getpagesize() instead. Don't touch errno and don't create debug output
while init() is running.
(lseek): Add bounds checking. Fix SEEK_END.
(fstat): Eliminate page size constant. Use getpagesize() instead.
(dup): Add intended functionality.
Mon Oct 2 22:15:00 2000 Corinna Vinschen <corinna@vinschen.de>
* dcrt0.cc: Add LoadDLLFunc statement for RegEnumValueA().
* net.cc: Change comments related to get_ifconf.
(get_2k_ifconf): Eliminate `type' variable. Eliminate `sa' parameter.
(get_nt_ifconf): Ditto.
(get_9x_ifconf): Ditto. Rewritten.
(get_ifconf): Change calls to OS specific functions.
Mon Oct 2 15:15:01 2000 Christopher Faylor <cgf@cygnus.com>
* signal.cc (sigaction): Allow new action == oldaction.
Mon Oct 2 11:05:00 2000 Corinna Vinschen <corinna@vinschen.de>
* fhandler_mem.cc: Load ntdll functions via autoload method.
(load_ntdll_funcs): Eliminated.
Sun Oct 1 16:36:00 2000 Corinna Vinschen <corinna@vinschen.de>
* fhandler_mem.cc (load_ntdll_funcs): Add missing __stdcall qualifiers.
Sun Oct 1 22:20:39 2000 Christopher Faylor <cgf@cygnus.com>
* cygheap.cc (cygheap_init): Born again function.
(_cmalloc): Reorganize to accommodate muto locking.
(_cfree): Use muto lock to avoid multi-thread problems.
* cygheap.h (incygheap): Just use cygheap_max to find upper cygwin heap
bounds.
* dcrt0.cc (dll_crt0_1): Reinstitute cygheap_init call.
* path.cc (getcwd): Just return cwdstuff::get result, allowing correct
handling of negative length.
(cwdstuff::get): Malloc a buffer if one is not available.
Sun Oct 1 2:56:00 2000 Corinna Vinschen <corinna@vinschen.de>
* Makefile.in: Add fhandler_mem.o to the dependencies.
* dtable.cc (dtable::build_fhandler): Add case for FH_MEM.
* fhandler.h: Add FH_MEM device type. Add class fhandler_dev_mem.
* fhandler_mem.cc: New file. Implementation of class fhandler_dev_mem.
* path.cc: Add /dev/mem to windows_device_names.
(get_device_number): Add FH_MEM type.
Sat Sep 30 00:43:42 2000 Christopher Faylor <cgf@cygnus.com>
* cygheap.cc (init_cheap): Set aside space for heap walk pointer.
(_csbrk): Make logic for detecting when to alloc cognizant of
initialization condition.
(_cmalloc): Use a structure to hold bucket size and heap chain pointer.
Store pointer to next freed block in bucket size location so that it
will be easy to see if a block is allocated.
(_cfree): Store pointer to next freed block in bucket size location.
(_crealloc): Use macro to retrieve bucket size.
(cygheap_init): Eliminate.
(cygheap_fixup_in_child): Add second argument to determine if we were
execed or not. In execed case, walk the heap, cleaning up any orphaned
blocks.
* cygheap.h: Add a "MAX" value to cygheap_types. Remove cygheap_init
declaration. Accommodate new argument to cygheap_fixup_in child.
* fork.cc (fork): Accommodate extra argument to cygheap_fixup_in_child.
* dcrt0.cc (dll_crt0_1): Ditto. Remove call to cygheap_init.
Fri Sep 29 21:49:27 2000 Christopher Faylor <cgf@cygnus.com>
* path.cc (symlink_info::check): Set executable bit for a file if the
first two characters are 'MZ' to mirror spawn_guts check.
Sat Sep 30 03:34:00 2000 Corinna Vinschen <corinna@vinschen.de>
* winsup.h: Add `winME' to os_type symbols.
* dcrt0.cc (set_os_type): Identify Windows ME systems.
* (host_dependent_constants::init): Care for winME.
* uname.cc (uname): Ditto.
Thu Sep 28 01:46:00 2000 Corinna Vinschen <corinna@vinschen.de>
* net.cc (get_ifconf): Code cleanup. Split. Call os dependent
subfunctions instead.
(get_9x_ifconf): New function for 9X systems, called by get_ifconf.
(get_nt_ifconf): New function for NT systems, called by get_ifconf.
(get_2k_ifconf): New function for W2K systems, called by get_ifconf.
Wed Sep 27 01:10:07 2000 Christopher Faylor <cgf@cygnus.com>
* spawn.cc (spawn_guts): Attempt to accommodate archaic windows quoting
mechanism when dealing with '\' and '"'.
Mon Sep 25 20:47:04 2000 Christopher Faylor <cgf@cygnus.com>
* dcrt0.cc (quoted): Fix problem where ' quoted strings were skipped.
* fhandler.h (fhandler_socket::~fhandler_socket): Delete declaration.
* net.cc: Remove unnecessary "number_of_sockets" usage.
(fhandler_socket::fhandler_socket): Ditto.
(fhandler_socket::~fhandler_socket): Delete definition.
* spawn.cc (spawn_guts): Force first argument passed to CreateProcess
as a command line to be windows style.
2000-09-25 Christopher Faylor <cgf@cygnus.com>
* spawn.cc (av::dup_maybe): Make function void rather than void *.
* environ.cc (environ_init): Remember to reparse CYGWIN if envp is
supplied.
* heap.cc (_sbrk): Remember frame for signal handling.
* syscalls.cc (read_handler): Eliminate.
(_read): Move read_handler code here. Reorganize for one path through
'ready_for_read'.
Tue Sep 19 09:46:36 2000 Christopher Faylor <cgf@cygnus.com>
* spawn.cc (spawn_guts): Use actual program argument passed in for
argv[0] as originally suggested by Kazuhiro Fujieda
<fujieda@jaist.ac.jp>.
Mon Sep 18 23:17:19 2000 Christopher Faylor <cgf@cygnus.com>
* path.h: Create new input path flag PATH_NEEDDIR.
* path.cc (path::check): Detect trailing slash before converting to
windows path. Tell symlink_info::check to check for directory if one is
found.
(symlink_info::check): Set errno when path is not a directory if
pflags & PATH_NEEDDIR.
Mon Sep 18 19:44:08 2000 Christopher Faylor <cgf@cygnus.com>
* fhandler_tty.cc (fhandler_tty_slave::write): Correct typo which
caused resetting of windows error to ERROR_IO_DEVICE to be ignored.
Mon Sep 18 17:15:37 2000 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
* path.cc (mount_info::read_mounts): Don't delete mount entries of
which mount points have the cygdrive prefix.
* (mount_info::add_reg_mount): Properly catch errors on registry
operations.
* (mount_info::write_cygdrive_info_to_registry): Ditto.
* (mount_info::del_reg_mount): Cosmetic changes to be consistent
with other methods.
* (mount_info::add_item): Check arguments more precisely.
Increment nmounts only when registry operations succeed.
Sun Sep 17 22:18:39 2000 Christopher Faylor <cgf@cygnus.com>
* exceptions.cc (interruptible): Return 0 if given an address in
uncommitted memory.
2000-09-16 Egor Duda <deo@logos-m.ru>
* signal.cc (sleep): If interrupted by signal, return the
requested time minus the time actually slept.
Fri Sep 15 22:30:40 2000 Christopher Faylor <cgf@cygnus.com>
* exceptions.cc (handle_exceptions): Just "core dump" if SIGSEGV in
signal thread.
* external.cc (fillout_pinfo): Fix compiler warning.
* sigproc.h: Eliminate special asm naming for sig_dispatch_pending.
* sigproc.cc (sig_send): Remove debugging statements.
Wed Sep 13 14:56:47 2000 Christopher Faylor <cgf@cygnus.com>
* spawn.cc (av): Hide 'calloced' field and limit cstrduping to class
methods only.
(spawn_guts): Use methods for manipulating most newargv stuff.
2000-09-13 Egor Duda <deo@logos-m.ru>
* child_info.h (child_info_spawn::~child_info_spawn): Avoid
memory leaks in cygheap.
* spawn.cc (spawn_guts): Ditto.
Wed Sep 13 14:28:03 2000 Christopher Faylor <cgf@cygnus.com>
* dcrt0.cc (quoted): Return next character after a quoted string when
not doing special quote processing. Also ensure that non-NULL is
returned in all circumstances.
Wed Sep 13 10:26:16 2000 Christopher Faylor <cgf@cygnus.com>
* spawn.cc (spawn_guts): Ensure that argv[0] is correctly set to the
full path when a script is detected. Suggested by Kazuhiro Fujieda
<fujieda@jaist.ac.jp>.
Tue Sep 12 22:33:30 2000 Christopher Faylor <cgf@cygnus.com>
* external.cc (fillout_pinfo): Handle explicit pids correctly.
Tue Sep 12 14:37:32 2000 Christopher Faylor <cgf@cygnus.com>
* path.cc (normalize_posix_path): Fix more slashdot madness.
Tue Sep 12 12:29:29 2000 Christopher Faylor <cgf@cygnus.com>
* Makefile.in: Make clean target remove *.d.
Mon Sep 11 13:19:15 2000 Christopher Faylor <cgf@cygnus.com>
* path.cc (normalize_posix_path): Correctly deal with a "." parameter.
Sun Sep 10 20:23:35 2000 Christopher Faylor <cgf@cygnus.com>
* cygheap.cc (init_cheap): Just use any old address for the cygwin
heap.
* exceptions.cc (signal_exit): Don't terminate the main thread. Just
try to exit in this thread really quickly.
* signal.cc (kill_pgrp): Fix typo which caused pinfo structure to be
assigned incorrectly.
Sun Sep 10 12:40:49 2000 Christopher Faylor <cgf@cygnus.com>
* dcrt0.cc (dll_crt0_1): Initialize thread and debug stuff before
handling exec/fork.
* dtable.cc (dtable::fixup_after_exec): Always clear out the read ahead
buffer whether closing or adjusting.
* path.cc (chdir): Avoid a compiler warning.
Sat Sep 9 23:29:17 2000 Christopher Faylor <cgf@cygnus.com>
* path.cc (chdir): Use the full path for cwd_win32. Consider attempts
to chdir to strings of dots > 2 to be an error. Pass 'dir' argument to
cygcwd.set.
(cwdstuff::set): Need to treat arguments from chdir differently.
* path.h (cwdstuff): Add an argument to set.
Fri Sep 8 11:50:09 2000 Christopher Faylor <cgf@cygnus.com>
* lib/_cygwin_crt0_common.cc: Add missing header files.
Thu Sep 7 23:07:21 2000 Christopher Faylor <cgf@cygnus.com>
* sigproc.h (sigframe::set): Eliminate second argument. Default bp to
current frame pointer rather than using this within the function, which
is unstable when this method is not inlined.
* net.cc: Eliminate use of second argument to sigframe.set throughout.
* select.cc (cygwin_select): Ditto.
* sigproc.cc (sig_send): Ditto.
Thu Sep 7 22:45:16 2000 Christopher Faylor <cgf@cygnus.com>
Break out more header info into separate files. Use appropriate
header files throughout.
* shared.h: Remove.
* cygwin_version.h: New file.
* delqueue.h: New file.
* environ.h: New file.
* host_dependent.h: New file.
* perprocess.h: New file.
* registry.h: New file.
* security.h: New file.
Thu Sep 7 12:14:43 2000 Christopher Faylor <cgf@cygnus.com>
Split out tty and shared_info stuff into their own headers and use
throughout. Include sys/termios.h for files which need it.
* tty.h: New file.
* shared_info.h: New file.
* fhandler.h: Move inline methods that rely on tty stuff to
fhandler_console.cc.
* fhandler_tty.cc (fhandler_pty_master::process_slave_output): Set
output_done_event immediately after reading data to speed up tty output
processing.
(process_output): Set write_error to errno or zero.
(fhandler_tty_slave::write): Check previous write error prior to
writing to slave end of pipe. This allows tty output to be slightly
less synchronous.
* fhandler_console.cc (fhandler_console::tcsetpgrp): Moved here from
fhandler.h.
(fhandler_console::set_input_state): Ditto.
Wed Sep 6 21:11:13 2000 Christopher Faylor <cgf@cygnus.com>
* exceptions.cc (signal_exit): Reset all mutos owned by the main
thread.
* fhandler.h: Define *_output_mutex macros for serializing tty output.
(fhandler_termios): Remove restart_output_event. Define dummy output
mutex methods.
(fhandler_pty_master): Remove unneeded fixup_after_fork method.
* fhandler_termios.cc (fhandler_termios::line_edit): Acquire
output_mutex when CTRL-S is hit. Release it on CTRL-Q.
* fhandler_tty.cc (fhandler_pty_master::process_slave_output): Remove
inappropriate OutputStopped test here. Just use the output mutex.
(fhandler_pty_master::fhandler_pty_master): Remove obsolete reference
to restart_output_event.
(fhandler_tty_common::close): Ditto.
(fhandler_pty_master::set_close_on_exec): Ditto.
(fhandler_pty_master::fixup_after_fork): Delete.
* tty.cc (tty::common_init): Ditto.
* sync.cc (muto::reset): New method.
* sync.h: Declare above method.
Wed Sep 6 16:56:38 2000 Christopher Faylor <cgf@cygnus.com>
* sigproc.cc: Add include file for proper definitions.
* spawn.cc: Ditto.
* winsup.h: Define cfree to avoid newlib pollution.
Wed Sep 6 14:11:51 2000 Christopher Faylor <cgf@cygnus.com>
* Makefile.in (CFLAGS): Ensure that -MD is always added even when
CFLAGS is overwritten.
Wed Sep 6 02:40:12 2000 Christopher Faylor <cgf@cygnus.com>
* path.cc (cwdstuff::get_initial): Keep caching alive.
(mount_info::conv_to_win32_path): Fill out relative path in failing
case.
Tue Sep 5 21:36:15 2000 Christopher Faylor <cgf@cygnus.com>
* path.cc (normalize_posix_path): Deal with error return from cygcwd.get.
(normalize_win32_path): Ditto.
(mount_info::conv_to_win32_path): Ditto.
(cwdstuff::get): Set buf to NULL on error.
Tue Sep 5 17:49:34 2000 Christopher Faylor <cgf@cygnus.com>
* path.cc (readlink): 'max' should be a 'min' or we'll suffer
buffer overflow.
Mon Sep 4 22:53:58 2000 Christopher Faylor <cgf@cygnus.com>
* path.cc (cwd_win32): Eliminate.
(cwd_posix): Eliminate.
(cwd_hash): Eliminate.
(cwdstuff::init): Rename from cwd_init.
(cwdstuff::fixup_after_exec): Rename from cwd_fixup_after_exec.
(cwdstuff::get): Rename from get_cwd_inner.
(normalize_posix_path): Eliminate cwd argument. Just calculate when
necessary.
(normalize_win32_path): Ditto.
(mount_info::conv_to_win32_path): Eliminate cwd retrieval here.
(mount_info::conv_to_posix_path): Ditto.
(hash_path_name): Accommodate additional methods in cwdstuff.
(get_cwd_win32): Eliminate.
(getcwd): Use cwdstuff methods. Properly handle case where buf == NULL
and len < 0.
(cwdstuff::get_hash): New method.
(cwdstuff::get_initial): New method.
(cwdstuff::set): New method.
(cwdstuff::get): New method.
(cwdstuff::copy): New method.
* path.h: Move cwdstuff struct here. Add a bunch of stuff to cwdstuff.
Make cygcwd an extern.
* spawn.cc (spawn_guts): Use copy method to get copies of cwd info to
pass to execed process.
* dcrt0.cc (dll_crt0_1): Use cygcwd methods for cwd initialization.
2000-09-03 Egor Duda <deo@logos-m.ru>
* path.cc (readlink): Check if buffer length is positive.
Truncate output to buffer length. Don't terminate buffer
with '\0'.
Sun Sep 3 00:38:40 2000 Christopher Faylor <cgf@cygnus.com>
* environ.cc (environ_init): Don't free the new environment table after
we've just copied stuff to it.
Sun Sep 3 00:07:32 2000 Christopher Faylor <cgf@cygnus.com>
* Makefile.in: Add cygheap.o.
* child_info.h: Add specific exec class.
* cygheap.h: New file. Contains declarations for cygwin heap.
* cygheap.cc: New file. Implements cygwin heap functions.
* dcrt0.cc (quoted): Simplify due to new method for passing arguments
between cygwin programs.
(alloc_stack_hard_way): Attempt to handle overlapped stack.
(dll_crt0_1): Move child_info processing here. Accommodate new method
for passing arguments between cygwin programs. Initialize cygwin heap.
Establish __argc and __argv variables.
(_dll_crt0): Move most of child_info processing to dll_crt0_1.
(cygwin_dll_init): Remove duplication.
* dtable.cc (dtable::extend): Allocate dtable using cygwin heap.
(dtable::build_fhandler): Ditto for fhandler type being constructed.
(dtable::dup_worker): Free new fhandler from cygwin heap on error.
(dtable::select_*): Don't assume that this == fdtab.
(dtable::linearize_fd_array): Delete.
(dtable::delinearize_fd_array): Delete.
(dtable::fixup_after_exec): New file.
(dtable::vfork_child_dup): Use cygwin heap.
(dtable::vfork_parent_restore): Ditto.
* dtable.h: Remove obsolete methods. Add new method.
* environ.cc (posify): Eliminate already_posix parameter and logic.
(envsize): New function.
(_addenv): Use envsize.
(environ_init): Accept an argument pointing to an existing environment
list. If supplied, allocate space for this in the the program's heap.
* fhandler.cc (fhandler_base::operator =): Move here from fhandler.h.
Use cygwin heap to allocate filenames.
(fhandler_base::set_name): Allocate/free names from cygwin heap.
(fhandler_base::linearize): Delete.
(fhandler_base::de_linearize): Delete.
(fhandler_base::operator delete): Free from cygwin heap.
(fhandler_base::~fhandler_base): Ditto.
* fhandler.h: Accommodate elimination of *linearize and other changes
above.
* fhandler_console.cc (fhandler_console::fixup_after_exec): Rename from
de_linearize.
* heap.h: New file.
* fhandler_tty.cc (fhandler_tty_slave::fhandler_tty_slave): Use cygwin
heap for name. fhandler_tty::fixup_after_exec): Rename from
de_linearize.
* fork.cc (fork): Call cygheap_fixup_in_child.
* heap.cc: Use declarations in heap.h.
* malloc.cc: Sprinkle assertions throughout to catch attempts to
free/realloc something from the cygwin heap.
* path.cc: Throughout, eliminate use of per-thread cache for cwd. Use
cwd_* functions rather than cwd_* variables to access cwd_win32 and
cwd_posix.
(cwd_win32): New function.
(cwd_posix): New function.
(cwd_hash): New function.
(cwd_fixup_after_exec): New function.
* path.h: Accommodate path.cc changes.
* pinfo.cc (pinfo_init): Accept a pointer to an environment table.
Pass this to environ_init. Eliminate old 'title' tests.
* pinfo.h: Accommodate above change in argument.
* spawn.cc (struct av): New method for building argv list.
(av::unshift): New method.
(spawn_guts): Allocate everything that the child process needs in the
cygwin heap and pass a pointer to this to the child. Build argv list
using new method. Eliminate delinearize stuff.
* thread.h: Eliminate _cwd_win32 and _cwd_posix buffers.
* winsup.h: Eliminate obsolete functions. Add envsize() declaration.
2000-09-02 Egor Duda <deo@logos-m.ru>
* Makefile.in: Remove "make check" support. It is now in
winsup/Makefile.in.
Fri Sep 1 21:17:03 2000 Christopher Faylor <cgf@cygnus.com>
* sigproc.cc (mychild): New function.
(proc_subproc): Use mychild() to determine if a specific pid is valid
for wait()ing.
Fri Sep 1 16:57:44 2000 Christopher Faylor <cgf@cygnus.com>
* sigproc.cc (sigproc_init): Create wait_sig_inited without auto-reset
to avoid potential races.
(init_child_info): Avoid unneeded test.
Fri Sep 1 16:51:26 2000 Christopher Faylor <cgf@cygnus.com>
* sigproc.cc (proc_info): Rename proc_exists which takes a pid to
"pid_exists".
* shared.h: Split out "child_info" stuff into a new header file and
use where necessary.
Declare pid_exists.
* child_info.h: New file.
Thu Aug 31 16:06:21 2000 Christopher Faylor <cgf@cygnus.com>
* errno.cc (set_errno_from_win_error): Actually use arguments to
strace_printf.
2000-08-30 DJ Delorie <dj@redhat.com>
* times.cc (gettimeofday): use GetSystemTimeAsFileTime to avoid a
conversion
(FACTOR): correct value
(genf): set milliseconds to zero, DOW to 4.
2000-08-29 Egor Duda <deo@logos-m.ru>
* grp.cc (getgroups): fail with EINVAL if array is not large
enough to hold all supplementary group IDs.
Mon Aug 28 22:03:21 2000 Christopher Faylor <cgf@cygnus.com>
* signal.cc (_raise): New function.
* exceptions.cc (unused_sig_wrapper): Remove _raise.
* sigproc.h (class sigframe): Default frames to skip to zero or suffer
from exuberant optimization.
* fhandler_tty.cc (fhandler_tty::write): Set appropriate errno when
WriteFile to pipe fails.
Fri Aug 25 23:44:48 2000 Christopher Faylor <cgf@cygnus.com>
* pinfo.h (pinfo): Un-inline release.
* pinfo.cc (pinfo::release): Move here from pinfo.h.
* sigproc.cc (proc_terminate): Remove bogus 'pinfo child' which caused
strange destruction of random regions of memory when destructor was
invoked.
Fri Aug 25 21:25:32 2000 Christopher Faylor <cgf@cygnus.com>
* dcrt0.cc (dll_crt0_1): Move set_os_type.
(_dll_crt0): To here.
(cygwin_dll_init): And here.
* external.cc (fillout_pinfo): Use more foolproof method for scanning
for pids.
* pinfo.cc (set_myself): Eliminate myself_identity.init.
* sigproc.cc (wait_sig): Do it here instead to reduce the amount of
time where there could potentially be two processes with the same pid.
* spawn.cc (spawn_guts): Eliminate duplicate initialization.
* include/sys/cygwin.h: Mark unused PID_* elements.
Fri Aug 25 21:49:00 2000 Corinna Vinschen <corinna@vinschen.de>
* exec.cc (_execve): Change definition according to declaration in
newlib/libc/include/sys/unistd.h.
Thu Aug 24 22:17:19 2000 Christopher Faylor <cgf@cygnus.com>
* external.cc (cygwin_internal): Add CW_INIT_EXCEPTIONS to allow cygwin
exception handling on threads not created by cygwin.
* sigproc.cc (proc_terminate): Don't release pinfo structs since we are
exiting.
* include/sys/cygwin.h: Add CW_INIT_EXCEPTIONS.
Thu Aug 24 17:16:14 2000 Christopher Faylor <cgf@cygnus.com>
* select.cc (cygwin_select): Correct logic for "always_ready" fds or
when there is no wait specified.
* syslog.cc (pass_handler::set_message): Zero the buffer prior to
setting it.
2000-08-24 Egor Duda <deo@logos-m.ru>
* include/cygwin/core_dump.h: New file, contains structures used in
cygwin core core files.
* include/sys/procfs.h: New file, needed to autoconfigure cygwin core
dumps support in bfd.
Thu Aug 24 13:50:15 2000 Christopher Faylor <cgf@cygnus.com>
* environ.cc (parse_thing): nobinmode should force O_TEXT.
(regopt): Use correct path to find LOCAL_MACHINE registry options.
* fhandler.cc (fhandler_base::open): Set binary mode only when binmode
== O_BINARY.
* pipe.cc (pipe): Pipe handling should rely on binmode not _fmode now
that the two are different.
Thu Aug 24 13:21:09 2000 Christopher Faylor <cgf@cygnus.com>
* include/sys/cygwin.h (strace_printf_wrap): Force printing when
_STRACE_SYSTEM.
(strace_printf_wrap1): Ditto.
Thu Aug 24 12:30:17 2000 Christopher Faylor <cgf@cygnus.com>
* debug.h: Allow some debug defines for use in header files.
Wed Aug 23 23:00:24 2000 Christopher Faylor <cgf@cygnus.com>
* dcrt0.cc (dll_crt0_1): Move exception list and constructor stuff
earlier in the process. Use new second argument to set_myself.
(cygwin_dll_init): Initialize exception list and constructor stuff
here.
(_dll_crt0): And here. Also, deal with inherited pinfo shared memory
region from parent.
* pinfo.cc (set_myself): Accept a second argument signifying the a
shared memory region, passed from an execing parent.
(pinfo_init): Ditto.
* pinfo.h: Ditto.
* shared.h (child_info): Add a handle field to pass to child.
* spawn.cc (spawn_guts): Create a shared handle to pass to an execed
child.
* winsup.h: Remove extraneous declaration.
Wed Aug 23 10:51:57 2000 Christopher Faylor <cgf@cygnus.com>
* include/sys/cygwin.h: Protect class definitions.
Tue Aug 22 13:57:36 2000 Christopher Faylor <cgf@cygnus.com>
* path.cc (symlink_info::check): Clear error on each iteration of
extension check.
Tue Aug 22 11:23:59 2000 Christopher Faylor <cgf@cygnus.com>
* Makefile.in: Don't include '.d' file if there are none generated yet.
Tue Aug 22 11:08:11 2000 Christopher Faylor <cgf@cygnus.com>
* include/sys/cygwin.h: Declare some thread classes.
* include/mntent.h: Avoid declaring functions.
Tue Aug 22 01:08:01 2000 Christopher Faylor <cgf@cygnus.com>
* winsup.h: Eliminate inclusion of most of the cygwin .h files. Use .h
files only in sources which require them.
* Makefile.in: Generate dependencies with -MD option.
Mon Aug 21 23:49:05 2000 Christopher Faylor <cgf@cygnus.com>
* cygerrno.h: New file. Use this throughout whenever errno
manipulation is required.
* errno.cc: Use DWORD to hold Windows errors.
(geterrno_from_win_error): New function.
(seterrno_from_win_error): Use geterrno_from_win_error to convert
supplied windows error (suggested by Corinna Vinschen).
* path.cc (symlink_info): Add error element.
* path.cc (path_conv::check): Remove errno setting. Use new
symlink_info errno element to set path_conv error, where appropriate.
(symlink_info::check): Set error element rather than attempting to
manipulate errno. Add more checks for trailing / and /.. even though
they are currently useless. Avoid setting EINVAL.
Mon Aug 21 23:49:05 2000 Corinna Vinschen <corinna@vinschen.de>
* path.cc (normalize_posix_path): Correct check for trailing /.
2000-08-21 DJ Delorie <dj@redhat.com>
* include/cygwin/cygwin_dll.h (DECLARE_CYGWIN_DLL): hinstance,
not handle.
Fri Aug 18 11:11:00 2000 Corinna Vinschen <corinna@vinschen.de>
* dtable.cc (dtable::dup2): Extend fdtab if newfd is out of current
allocated bounds.
Sat Aug 12 01:47:28 2000 Christopher Faylor <cgf@cygnus.com>
* mkvers.sh: Properly trap exit removal of temp file. Remove debugging
statement.
Sat Aug 12 01:37:56 2000 Christopher Faylor <cgf@cygnus.com>
* poll.cc: Make winsup.h the first include file, re 2000-08-02 change.
Sat Aug 12 01:33:12 2000 Christopher Faylor <cgf@cygnus.com>
* winsup.h: Split out dtable definitions into separate header file.
* dtable.h: New file.
* sigproc.h: Eliminate pinfo.h usage here. Use it in source files that
need it.
Sat Aug 12 01:08:11 2000 Christopher Faylor <cgf@cygnus.com>
* Makefile.in: Use dtable.o rather than hinfo.o.
Sat Aug 12 00:47:11 2000 Christopher Faylor <cgf@cygnus.com>
Rename hinfo -> dtable. Name the former dtable array 'fdtab'.
Fri Aug 11 14:47:00 2000 Corinna Vinschen <corinna@vinschen.de>
* poll.cc: Allow any descriptor and any number of descriptors.
Allocate fd_set struct sdynamically.
Fri Aug 11 14:47:00 2000 Corinna Vinschen <corinna@vinschen.de>
* poll.cc: Add bounds checking for file descriptors. Return POLLNVAL
if fd is invalid. Return POLLERR for each valid fd if cygwin_select
returned with error.
include/sys/poll.h: Change POLLERR comment according to above change.
Thu Aug 10 21:54:29 2000 Christopher Faylor <cgf@cygnus.com>
* syslog.cc (syslog): Use a less malloc-intensive method for allocating
the buffer. Also fix a buffer overrun.
Thu Aug 10 15:31:39 2000 Christopher Faylor <cgf@cygnus.com>
* winsup.h: Change strchr inline for strange gcc problem.
* select.cc (select_stuff::wait): Bounds check w4 array.
Thu Aug 10 15:17:53 2000 Christopher Faylor <cgf@cygnus.com>
* dir.cc (readdir): Ensure that errno is *only* set when we've run out
of filenames.
* fhandler.cc (fhandler_disk_file::fstat): Use modern method for saving
errno, making it effective for the whole function.
Tue Aug 8 22:25:39 2000 Christopher Faylor <cgf@cygnus.com>
* select.cc (allocfd_set): Zero allocated fd_set.
(cygwin_select): Move fd_set copying logic from ::wait to here. Use
common return through sell.poll.
(select_stuff::wait): Just return success or failure and let caller
fill in fd_set.
* pinfo.h (pinfo): Eliminate self-referential pointer to sidbuf since
pinfo structure exists at random locations now.
* fork.cc (fork): Use 'use_psid' element to control when the psid is
relevant.
* shared.cc (sec_user): Ditto.
* spawn.cc (spawn_guts): Ditto.
* uinfo.cc (internal_getlogin): Ditto.
* syscall.cc (seteuid): Ditto. Set use_psid element.
Tue Aug 8 13:20:00 2000 Bob Wilson <bwilson@tensilica.com>
* fhandler_serial.cc (tcsendbreak): "sleeptime" argument to usleep()
must be in units of microseconds, not milliseconds.
Mon Aug 7 00:11:35 2000 Christopher Faylor <cgf@cygnus.com>
* include/cygwin/cygwin_dll.h: Remove extraneous (and incorrect)
declarations.
Fri Aug 4 00:00:46 2000 Christopher Faylor <cgf@cygnus.com>
* hinfo.cc (hinfo::find_unused_handle): Just check for table entry ==
NULL since we are already bounds checked by default.
* thread.cc (ResourceLocks::Lock): Streamline this function since it is
called a lot.
(ReleaseResourceLock): Ditto.
Thu Aug 3 20:44:39 2000 Christopher Faylor <cgf@cygnus.com>
* select.cc (fhandler_console::select_read): Call set_cursor_maybe
since select may block and cursor may not be visible.
* select.cc (fhandler_console::select_write): Ditto.
* select.cc (fhandler_console::select_except): Ditto.
Thu Aug 3 09:01:14 2000 Christopher Faylor <cgf@cygnus.com>
* fhandler_tty.cc (fhandler_pty_master::process_slave_output): Set
length field correctly when "need_nl".
Wed Aug 2 22:58:07 2000 Christopher Faylor <cgf@cygnus.com>
* fork.cc (vfork): Store complete stack frame in vfork_save structure
for later recovery.
* spawn.cc (spawn_guts): Reorganize slightly to consolidate handling
when there is a CreateProcess error.
(_spawnve): Only longjmp back to vfork handling when a process has been
successfuly started.
* winsup.h (vfork_save): Extend to include frame info. Remove obsolete
cpplus conditionals.
Wed Aug 2 15:14:51 2000 Christopher Faylor <cgf@cygnus.com>
* strace.cc (strace::prntf): Make second argument the function name,
rather than use special format options.
(strace::vprntf): Ditto.
(getfunc): New function.
* include/sys/strace.h: Reflect above changes.
* smallprint.c (__small_vsprintf): Eliminate '%F' formatting.
* pinfo.cc (set_myself): Modify for new strace::prntf parameter.
* errno.cc (seterrno_from_win_error): Ditto.
* fhandler_tty.cc (fhandler_tty_common::__acquire_output_mutex): Ditto.
* fhandler_tty.cc (fhandler_tty_common::__release_output_mutex): Ditto.
Wed Aug 2 13:20:04 2000 Christopher Faylor <cgf@cygnus.com>
* regexp/regexp.c: Add winsup.h.
2000-08-02 DJ Delorie <dj@redhat.com>
* winsup.h: take out protections of environ, errno, allow C use
* *.cc: put winsup.h before other headers (for __INSIDE_CYGWIN__);
use cur_environ() instead of just environ
* times.cc: remove import protections
* glob.c: add winsup.h
* localtime.c: ditto
* smallprint.c: ditto
* Makefile.in: don't __INSIDE_CYGWIN__ as it messes up profiling.
Wed Aug 2 11:22:53 2000 Christopher Faylor <cgf@cygnus.com>
* include/sys/strace.h: Fix strace definition.
Tue Aug 1 23:37:08 2000 Christopher Faylor <cgf@cygnus.com>
* strace.h: Add kludgy workarounds to avoid using deprecated methods
for variable argument macros when possible.
* sigproc.cc: Throughout, use sigproc_printf rather than sip_printf.
* strace.cc (strace::prntf): Remove 'active' check, since callers are
supposed to ensure this.
(__system_printf): Remove. Subsumed by strace::prntf.
* winsup.h: Define "NEW_MACRO_VARARGS" to indicate when to use new
macro varargs capability.
Sun Jul 30 13:54:35 2000 Christopher Faylor <cgf@cygnus.com>
* fhandler_console.cc: Remove VK_DIVIDE detection.
(get_nonascii_key): Simplify previous patch to return ascii char if it
is non-zero. Add a second "temporary buffer" argument to help with
thread safety.
* select.cc (peek_console): Pass a temporary buffer argument to
get_nonascii_key.
Sat Jul 29 14:32:12 2000 Christopher Faylor <cgf@cygnus.com>
* fhandler_console.cc: Add VK_DIVIDE detection. Return virtual keycode
if it is not detected and it is less than ' '.
Sat Jul 29 13:33:49 2000 Christopher Faylor <cgf@cygnus.com>
* path.cc (chdir): Avoid trailing dot calculation when chdir == '/'
or we end up with an empty string.
Sat Jul 29 12:11:33 2000 Christopher Faylor <cgf@cygnus.com>
* include/cygwin/version.h: Bump DLL minor version number to 5 due
to all of the changes below.
Sat Jul 29 12:01:32 2000 Christopher Faylor <cgf@cygnus.com>
Redefine process structure to avoid a fixed size table. Redefine
pinfo/_pinfo classes. Use these throughout.
* dcrt0.cc (dll_crt0_1): Accommodate set_myself argument change.
(__api_fatal): Accommodate _pinfo::record_death argument change.
* exceptions.cc (really_exit): Ditto.
(sig_handle_tty_stop): Use pinfo constructor to access process info.
(events_init): Don't create pinfo_mutex since it is no longer required.
* external.cc (fillout_pinfo): Use winpids class to iterate over all
system pids.
(cygwin_internal): lock_pinfo_for_update and unlock_pinfo are now
noops.
* fhandler_termios.cc (fhandler_termios::set_ctty): Use pinfo
constructor to access process info.
* fork.cc (fork): Reorganize to initialize child info after the child
has started since that is when we know the child's winpid, which is
necessary to allocate the pinfo shared memory.
* mmap.cc (recreate_mmaps_after_fork): Change arg type to _pinfo.
* pinfo.cc: Rename pinfo methods to _pinfo throughout. Eliminate
pinfo_list stuff.
(set_myself): Accept a pid argument now. Call pinfo initializer to
initialize myself. Detect when this is an "execed" process and create
an "indirect" pid block.
(pinfo_init): Accommodate set_myself arg change.
(procinfo): Remove.
(pinfo::lock_pinfo): Remove.
(pinfo::unlock_pinfo): Remove.
(pinfo::init): New method. Allocates shared memory space for process
pinfo structure.
(pinfo::record_death): Don't call locking functions.
(cygwin_winpid_to_pid): Simplify by using new pinfo constructor.
(EnumProcessesW95): New function for iterating over processes on
Windows 95.
(winpids::winpids): New constructor for winpids class. Sets up a list
of process ids.
(enum_init): Initialize w95/wnt pid enumerators.
* shared.cc (shared-info::initialize): Remove pid initialization.
* shared.h: Move pinfo stuff into pinfo.h.
(class shared_info): Remove pinfo_list element.
* signal.cc (kill_worker): Use pinfo constructor to access process
info.
(kill_pgrp): Ditto. Use winpids methods to access list of processes.
* sigproc.cc: Throughout, modify to use _pinfo where appropriate.
(proc_exists (pid_t)): New function. Determines if a process exists
based on the pid.
(proc_exists (_pinfo *p): Use new proc_exists function above.
(proc_subproc): Copy pinfo stuff around rather than _pinfo pointers.
Try to be careful about releasing shared memory when we don't need it
anymore. Remove pinfo locks.
(remove_zombies): Remove pinfo memory when zombie is going away.
* sigproc.h: Reflect _pinfo/pinfo changes in sigproc.cc.
* spawn.cc (spawn_guts): Eliminate pinfo *child argument. Reorganize
to only initialize child pinfo after process has been started and we
know the windows pid.
(_spawnve): Reflect spawn_guts changes.
* syscalls.cc (setpgid): Use pinfo constructor to access process info.
(getpgid): Ditto.
(internal_getlogin): Use _pinfo.
* winsup.h: Eliminate pinfo_mutex. Eliminate spawn_guts declaration
since it is static now. Reflect set_myself argument change.
* include/sys/cygwin.h: Add some PID_* enums to accommodate new pinfo
stuff.
Sat Jul 29 12:13:27 2000 Christopher Faylor <cgf@cygnus.com>
* include/cygwin/version.h: Update minor version for cygdrive changes
below.
Sat Jul 29 11:59:29 2000 Christopher Faylor <cgf@cygnus.com>
* environ.cc (parse_thing): Make binmode a DWORD.
* hinfo.cc (hinfo::init_std_file_from_handle): Use 'binmode' to
determine default open mode.
* winsup.h: Declare binmode.
Sat Jul 29 00:16:35 2000 Christopher Faylor <cgf@cygnus.com>
* include/cygwin/cygwin_dll.h: Update for modern compilers.
* lib/cygwin_crt0.c: Inexplicably need to define alloca for newer
compilers.
* fhandler.h (fhandler_console): Add new method.
* fhandler.cc (fhandler_console::set_cursor_maybe): New method.
(fhandler_console::read): Set cursor if it has moved to make it
visible.
Thu Jul 27 22:54:28 2000 Jason Tishler <jt@dothill.com>
* dcrt0.cc (dummy_autoload): Add load statement for RegDeleteValueA.
* external.cc (get_cygdrive_prefixes): New function.
(cygwin_internal): Add CW_GET_CYGDRIVE_PREFIXES case.
* path.cc (mount_info::read_cygdrive_info_from_registry): Read system
cygdrive prefix if user one is undefined.
(mount_info::write_cygdrive_info_to_registry): Write cygdrive prefix to
the appropriate registry hive. Overwrite in-memory copy of cygdrive,
if appropriate.
(mount_info::remove_cygdrive_info_from_registry): New method.
(mount_info::get_cygdrive_prefixes): New method.
(cygwin_umount): Remove cygdrive prefix, if appropriate.
* registry.cc (reg_key::killvalue): New method.
* shared.h (class reg_key): Add killvalue,
remove_cygdrive_info_to_registry, and get_cygdrive_prefixes
declarations.
* include/sys/cygwin.h (cygwin_getinfo_types): Add
CW_GET_CYGDRIVE_PREFIXES.
Thu Jul 27 23:33:32 2000 Christopher Faylor <cgf@cygnus.com>
* include/cygwin/version.h: Bump DLL minor version number to 4.
2000-07-27 DJ Delorie <dj@redhat.com>
* testsuite/winsup.api/winsup.exp: ignore stdout by default
* testsuite/winsup.api/crlf.c: non-verbose by default
* winsup.h: prune out windows headers we don't normally need
* assert.cc: add wingdi.h and winuser.h
* fhandler_console.cc: ditto
* fhandler_windows.cc: ditto
* select.cc: ditto
* spawn.cc: ditto
* strace.cc: ditto
* tty.cc: ditto
* window.cc: ditto
* hinfo.cc: add winsock.h
* syscalls.cc: add winnls.h
* uinfo.cc: ditto
Thu Jul 27 10:24:36 2000 Egor Duda <deo@logos-m.ru>
* fhandler.cc (fhandler_disk_file::fstat): Allow block calculation to
succeed for files >= 2GB and <= 4GB.
Wed Jul 26 16:05:04 2000 Christopher Faylor <cgf@cygnus.com>
* exceptions.cc (signal_exit): Renamed from "really_exit". Always sets
EXIT_SIGNAL bit and reorganizes exit value for backwards cygwin
handling.
(handle_exceptions): Call signal_exit. Set "core dumped" bit.
(sig_handle): Call signal_exit. Set "core dumped" bit appropriately.
Wed Jul 26 20:44:00 2000 Corinna Vinschen <corinna@vinschen.de>
* environ.cc (posify): Revert previous patch.
(_addenv): Remove check_null_empty_path from here.
(putenv): Call check_nullempty_path.
(setenv): Call check_nullempty_path for name as well here.
Don't report an error if value is empty string.
(environ_init): Revert usage of newp.
Wed Jul 26 14:32:38 2000 Egor Duda <deo@logos-m.ru>
* syscalls.cc (stat_worker): Make stat return correct st_blocks for
files with size bigger than 2Gb and less than 4Gb
Wed Jul 26 17:43:00 2000 Corinna Vinschen <corinna@vinschen.de>
* security.cc (lookup_name): Search on local machine first if
myself->domain is not empty.
2000-07-26 DJ Delorie <dj@cygnus.com>
* fhandler_console.cc (fhandler_console::read): Explicitly set cursor
to make it visible while waiting in WaitForMultipleObjects.
Wed Jul 26 10:59:00 2000 Corinna Vinschen <corinna@vinschen.de>
* passwd.cc: Change name of passwd_in_memory_p to passwd_state.
Change type to enum. Change storage class to static. Adjust comments.
(read_etc_passwd): Set passwd_state to different values when loaded
from file in contrast to being emulated.
(search_for): Return default passwd entry if passwd is emulated or
it's a request for the current user. Otherwise return NULL.
Tue Jul 25 21:50:42 2000 Christopher Faylor <cgf@cygnus.com>
* syscalls.cc (statfs): Use path_conv method to convert input path.
Tue Jul 25 21:40:51 2000 Christopher Faylor <cgf@cygnus.com>
* syscalls.cc (_link): Avoid extraneous call to
cygwin_conv_to_win32_path.
Tue Jul 25 21:11:15 2000 Christopher Faylor <cgf@cygnus.com>
* environ.cc (_addenv): New function. Subsumes functionality of
putenv/setenv. Does not allocate space for putenv case.
(putenv): Use _addenv to add a value to the environment.
(setenv): Ditto.
(environ_init): Don't malloc space for each entry in the environment
table. Just use the space from GetEnvironmentStrings.
(posify): Don't free the src argument since it is no longer malloced.
Mon Jul 24 21:10:00 2000 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (_link): Corrected previous patch.
Mon Jul 24 13:26:00 2000 Corinna Vinschen <corinna@vinschen.de>
* fhandler.h (class fhandler_dev_random): Add members for managing
pseudo randomness.
* fhandler_random.cc: Rearrange. Use pseudo random number generator
as entropy source if system entropy isn't available and if device is
used as /dev/urandom. Allow initializing device by calling write().
Sun Jul 23 23:11:00 2000 Corinna Vinschen <corinna@vinschen.de>
* fhandler.h: Add comment.
Sun Jul 23 20:00:00 2000 Corinna Vinschen <corinna@vinschen.de>
* fhandler.h (class fhandler_dev_raw): Add private member `varblkop'
to be set when variable blocksize mode is on.
* fhandler_raw.cc: Eliminate `\n' from trace output.
(clear): Set `varblkop' to 0.
(dup): Copy varblkop as well.
(writebuf): Care for variable blocksize.
(open): Ditto.
(raw_read): Ditto.
(raw_write): Ditto.
* fhandler_tape.cc (open): Ditto.
(ioctl): Ditto. Some cleanups.
Sat Jul 22 18:40:00 2000 Corinna Vinschen <corinna@vinschen.de>
Patch suggested by Kazuhiro Fujieda <fujieda@jaist.ac.jp>.
* winsup.h: Add new macros sys_wcstombs and sys_mbstowcs.
* syscalls.cc (_link): Replace calls to mbstowcs by call to
sys_mbstowcs.
* uinfo.cc (internal_getlogin): Replace calls to wcstombs and
mbstowcs by calls to sys_wcstombs and sys_mbstowcs. Replace
usage of constants by meaningful defines. Use result of
GetSystemDirectory for HOMEPATH and HOMEDRIVE as a last resort.
Fri Jul 21 21:33:00 2000 Corinna Vinschen <corinna@vinschen.de>
* spawn.cc (span_guts): Retrieve security attributes before setting
psid to NULL.
Fri Jul 21 12:03:00 2000 Corinna Vinschen <corinna@vinschen.de>
* security.cc (acl_worker): Use stat_suffixes in call to path_conv
just as in `stat_worker'.
Wed Jul 19 22:24:00 2000 Corinna Vinschen <corinna@vinschen.de>
* spawn.cc (spawn_guts): Don't restore impersonation in case
of _P_OVERLAY. Clean up slightly. Accommodate comments.
Wed Jul 19 22:11:00 2000 Corinna Vinschen <corinna@vinschen.de>
* shared.h (class pinfo): New members `root' and `rootlen'.
* syscalls.cc (chroot): Set new root for process.
* path.cc (getcwd_inner): Add parameter to force use of
new root from chroot() call.
(ischrootpath): New macro.
(normalize_posix_path): Care for changed root dir.
(normalize_win32_path): Ditto.
(getcwd_inner): Ditto.
(chdir): Eliminate trailing path component consisting
entirely of dots.
* fork.cc (fork): Copy pinfo members regarding chroot().
* spawn.cc (_spawnve): Ditto.
* dir.cc (opendir): Don't use computed win32 path if
chroot() took place.
Mon Jul 17 22:21:34 2000 Christopher Faylor <cgf@cygnus.com>
* dll_init.cc (dll_list::alloc): Fix debugging output.
Mon Jul 17 14:57:53 2000 Christopher Faylor <cgf@cygnus.com>
Throughout, eliminate third argument to path_conv and use new PC_*
constants for second argument.
* dcrt0.cc (dll_crt0_1): Reorganize to allow more initialization prior
to returning due to dynamic loading.
* path.h: Generalize SYMLINK_* constants to PC_*.
(path_conv): Create a new method. Fold third argument into second.
* dll_init.cc (dll_list::alloc): Try harder to find space to allocate
dll struct.
(dll_dllcrt0): Don't check sanity if we've already called dll_crt0.
* path.cc (path_conv::check): Don't check for a null or empty path
unless specifically told with a flag setting.
(check_null_empty_path): New function, adapted from macro.
* syscalls.cc (_rename): Use already-determined file attributes rather
than checking again.
* lib/cygwin/cygwin_attach.dll.c (cygwin_attach_dll): Use a static
per_process structure since this is apparently supposed to be zeroed.
* lib/cygwin_crt0.c (cygwin_crt0): Zero per_process structure sent to
older DLLs.
Mon Jul 17 19:39:00 2000 Corinna Vinschen <corinna@vinschen.de>
Patch suggested by Eric Fifer <EFifer@sanwaint.com>
* poll.cc (poll): Fix erroneous negations.
Mon Jul 17 17:56:00 2000 Corinna Vinschen <corinna@vinschen.de>
* environ.cc (setenv): Use __cygwin_environ instead of
environ after reallocating environment space.
Sun Jul 16 20:23:21 2000 Christopher Faylor <cgf@cygnus.com>
* _cygwin_crt0_common.cc: Undef 'environ' or suffer compiler error.
Sun Jul 16 16:03:00 2000 Christopher Faylor <cgf@cygnus.com>
* environ.cc: Use new definition of "environ" throughout.
(environ_init): Explicitly initialize __cygwin_environ.
(cur_environ): New function. Detects when user has updated
their environment.
* exec.cc: Use 'environ' define throughout rather than __cygwin_environ.
* spawn.cc: Ditto.
* winsup.h: Declare cur_environ, main_environ, environ.
Sun Jul 16 13:23:04 2000 Christopher Faylor <cgf@cygnus.com>
* acconfig.h: Add support for NEWVFORK.
* config.h.in: Ditto.
* configure.in: Add --enable-vfork option.
* configure: Regenerate.
* dcrt0.cc (quoted): Detect and fix up quoted backslashes.
* sigproc.cc (proc_subproc): Correctly name handle of newly added child
process to avoid erroneous debugging messages about closing the wrong
handle.
Sun Jul 16 02:30:09 2000 Christopher Faylor <cgf@cygnus.com>
* spawn.cc (spawn_guts): Use \ for quoting '"'.
* dcrt0.cc (quoted): Understand \ quoting for '"'.
Sun Jul 16 00:32:58 2000 Christopher Faylor <cgf@cygnus.com>
* dcrt0.cc (build_argv): Strip quotes from argv[0] since it should
never be globified.
Sat Jul 15 00:32:41 2000 Christopher Faylor <cgf@cygnus.com>
* dll_init.cc (dll_list::alloc): Round correctly. Use VirtualAlloc
since shared file mapping is unnecessary.
(dll_list::detach): Release memory via VirtualFree since there we no
longer use shared file mapping.
Fri Jul 14 22:40:22 2000 Christopher Faylor <cgf@cygnus.com>
* hinfo.cc (hinfo::linearize_fd_array): Make max_used_fd an int so that
we can detect when there are no fds to pass.
* dcrt0.cc (host_dependent_constants::init): Revert Sat Mar 18 01:32:04
2000 change.
(dll_crt0_1): Set "cygwin_finished_initializing" flag.
(dll_crt0): Don't perform memcpy if uptr is already set to internal
structure.
(_dll_crt0): Remember location of programs envptr.
* dll_init.h (per_module, dll, dll_list): Revamp.
* dll_init.cc: Revamp. Use new classes.
* fork.cc (fork): Use new revamped dll, dll_list, and per_module stuff.
* environ.cc: Use __cygwin_environ throughout rather than the
user_data->envptr.
* exec.cc: Ditto.
* spawn.cc: Ditto.
* winsup.h: Declare update_envptrs, cygwin_finished_initializing.
* lib/_cygwin_crt0_common.cc (_cygwin_crt0_common): Revert previous
change.
* lib/cygwin_attach_dll.cc (cygwin_attach_dll): Always pass in own
per_process structure or we end up overwriting information from the
main program.
Wed Jul 12 00:46:00 2000 Christopher Faylor <cgf@cygnus.com>
* debug.cc (thread_stub): Use impure_ptr in place of reent_data.
* dll_init.cc (dll_dllcrt0): Replace erroneous use of local symbol with
correct __cygwin_user_data->impure_ptr.
Wed Jul 12 00:01:03 2000 Christopher Faylor <cgf@cygnus.com>
* lib/_cygwin_crt0_common.cc (_cygwin_crt0_common): Don't reset
environ if already set.
Mon Jul 10 19:07:03 2000 Christopher Faylor <cgf@cygnus.com>
* fhandler_console.cc (fhandler_console::read): Unicode interface
to ReadConsoleInput only exists on W2K, so use workaround from
Kazuhiro Fujieda <fujieda@jaist.ac.jp>.
Mon Jul 10 11:30:00 2000 Christopher Faylor <cgf@cygnus.com>
* Makefile.in (install): Install textmode.o as well as binmode.o.
* fhandler_console.cc (fhandler_console::read): Use UNICODE when
reading from the console and translate to ASCII from that.
Sun Jul 9 21:52:00 2000 Corinna Vinschen <corinna@vinschen.de>
* spawn.cc (spawn_guts): Close handle `hToken' only if it's not
copied from myself->token.
* syscalls.cc (seteuid): Replace CopySid by memcpy which is foolproof
here.
Sun Jul 9 01:19:06 2000 Christopher Faylor <cgf@cygnus.com>
* cygwin.din: Export _getmode and getmode to allow querying of binary
state of an fd.
* external.cc (cygwin_internal): Add handling of perfile_table setting.
* fhandler.cc (perfile_table): New global.
(fhandler_base::get_default_fmode): New method to return a file's
default mode based on its name.
(fhandler_base::open): Use get_default_mode method to determine a
file's mode. Record file mode in file flags.
* fhandler.h (fhandler_base): Declare get_default_fmode
* syscalls.cc (getmode): New function.
* sys/cygwin.h (__cygwin_perfile): New structure.
(cygwin_getinfo_types): Move outside of WINVER conditional.
(per_process): Move inside of WINVER conditional.
Sat Jul 8 00:15:01 2000 Christopher Faylor <cgf@cygnus.com>
* external.cc (cygwin_internal): Export __cygwin_user_data.
* include/sys/cygwin.h: Allow definition of per_process even when not
compiling with C++.
(cygwin_getinfo_types): Add CW_USER_DATA.
* lib/_cygwin_crt0_common.cc (_cygwin_crt0_common): Get
__cygwin_user_data pointer from cygwin_internal. If it doesn't exist,
return failure. Use either this pointer or passed in pointer
throughout. Clear forkee.
* lib/crt0.h: Accommodate argument changes to _cygwin_crt0_common.
* lib/cygwin_attach_dll.c (cygwin_attach_dll): Reorganize to allow use
of newer binaries with older DLLs. Detect older DLLs when
_cygwin_crt0_common returns 0 and allocate space for a per_process
structure on the stack.
* lib/cygwin_crt0.c (cygwin_crt0): Ditto.
Fri Jul 7 10:31:00 2000 Corinna Vinschen <corinna@vinschen.de>
* include/sys/cygwin.h: Hide internal data types in per_process
when not __INSIDE_CYGWIN__.
Wed Jul 5 18:56:58 2000 Christopher Faylor <cgf@cygnus.com>
* dcrt0.cc (__cygwin_user_data): Initialize.
(dll_crt0_1): Eliminate user_data initialization.
(dll_crt0): Set up impure_ptr_ptr for older executables.
(cygwin_dll_init): Eliminate user_data initializations.
(__api_fatal): Don't check for user_data initialization.
* dll_init.cc (struct dll): Store entire contents of per_process rather
than just a pointer.
(add): Ditto.
(initOneDll): Don't check for user_data initialization.
(DllList::recordDll): Store contents of per_process argument.
(DllList::detachDll): Pass address of per_process field.
(DllList::initAll): Ditto.
(DllList::doGlobalDestructorsOfDlls): Ditto.
(DllListIterator::operator *): Ditto.
(dll_dllcrt0): Default to __cygwin_user_data if arg is NULL.
* include/sys/cygwin.h: Reorganize per_process to eliminate obsolete
fields and accommodate new way of initializing.
* lib/_cygwin_crt0_common: Initialize _impure_ptr from
__cygwin_user_data.impure_ptr.
2000-07-04 Vadim Egorov <egorovv@mailandnews.com>
* exceptions.cc (try_to_debug): Prevent recursive spawning of JIT
debugger. Treat special event from debugger as command to continue.
Mon Jul 4 19:29:00 2000 Corinna Vinschen <corinna@vinschen.de>
* poll.cc (poll): Zero out `open_fds' as well.
Mon Jul 4 1:22:00 2000 Corinna Vinschen <corinna@vinschen.de>
* include/cygwin/version.h: Bump API minor version to 24.
2000-07-04 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
* security.cc (read_sd): Eliminate OemToChar.
Mon Jul 4 18:57:00 2000 Corinna Vinschen <corinna@vinschen.de>
* poll.cc: New file. Implement `poll' system call.
* include/poll.h: Ditto.
* include/sys/poll.h: Ditto.
* Makefile.in: Add poll.o as dependency.
* cygwin.din: Add poll and _poll symbols.
2000-07-04 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
* dcrt0.cc (dll_crt0_1): Eliminate SetFileApisToOEM and CharToOem.
* (dummy_autoload): Add functions used in fhandler_console.
* fhandler_console.cc (fhandler_console::read): Use ENCHANCED_KEY flag
to distinguish extended keys. Translate an input character from the
OEM code page to the ANSI code page.
* (fhandler_console::write_normal): Translate output characters from
the ANSI code page to the OEM code page.
* syscalls.cc (_link): Use MultiByteToWideChar instead of OemToCharW.
Mon Jul 3 16:09:16 2000 Christopher Faylor <cgf@cygnus.com>
* exceptions.cc (stack_info::walk): Use method to find offset.
(handle_exceptions): Be more assertive in finding ebp for use under
W2K. Create a dummy stack frame for cases where program is dying and a
stack dump is being output.
(sig_handle): Fill out a GetThreadContext for use with a user-generated
"core dump".
Mon Jul 3 10:53:00 2000 Corinna Vinschen <corinna@vinschen.de>
* include/cygwin/socket.h: Remove SOCK_PACKET define since it's
not supported by Windows sockets.
Sun Jul 2 21:50:48 2000 Christopher Faylor <cgf@cygnus.com>
* dcrt0.cc (user32_init): Add primitive guard against concurrent
attempts to call this function. Also add temporary debugging code to
display a message if the function is called multiple times.
(api32_init): Ditto.
Sun Jul 2 10:39:00 2000 Corinna Vinschen <corinna@vinschen.de>
* winsup.h: Define MAX_SID_LEN and new MAX_HOST_NAME.
* fork.cc (fork): Use above defines instead of numerical constants.
* shared.cc (sec_user): Ditto.
* shared.h (class pinfo): Ditto.
* syscall.cc (seteuid): Ditto.
* spawn.cc (_spawnve): Ditto. Eliminate conditional.
(spawn_guts): Set child->uid = USHRT_MAX when user context will be
changed in child process.
* uinfo.cc (uinfo_init): Check for myself->uid instead of myself->psid
to avoid reloading of /etc/passwd on process startup if ntsec is off.
Use above defines instead of numerical constants.
* security.cc: Move define for MAX_SID_LEN to winsup.h.
Sun Jul 2 1:57:00 2000 Corinna Vinschen <corinna@vinschen.de>
* uinfo.cc (uinfo_init): Eliminate calls to read_etc_group()
and read_etc_passwd().
2000-06-28 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
* assert.cc (__assert): Reduce dependency on newlib.
* exec.cc: Eliminate unnecessary inclusion of ctype.h.
* glob.c: Ditto.
* hinfo.cc: Ditto.
* init.cc: Ditto.
* strace.cc: Ditto.
* tty.cc: Ditto.
* grp.cc (parse_grp): Eliminate atoi.
* passwd.cc (grab_int): Ditto.
* grp.cc (getgroups): Eliminate str{n,}casecmp.
* path.cc (get_raw_device_number): Ditto.
* path.cc (sort_by_native_name): Ditto.
* spawn.cc (iscmd): Ditto.
* uinfo.cc (internal_getlogin): Ditto.
Sat Jul 1 11:43:32 2000 Christopher Faylor <cgf@cygnus.com>
* binmode.c (cygwin_premain0): Fix erroneous clearing of bit.
* textmode.c (cygwin_premain0): Ditto.
Sat Jul 1 00:24:04 2000 Christopher Faylor <cgf@cygnus.com>
* dcrt0.cc (_dll_crt0): Renamed from dll_crt0 ().
* winsup.h: Accommodate above change.
* cygwin.din: Ditto.
* lib/cygwin_crt0.c: Ditto.
Fri Jun 30 23:21:40 2000 Christopher Faylor <cgf@cygnus.com>
* Makefile.in: Use variables rather than configure constructs where
appropriate.
(LIBCOS): Find additional stub library stuff in their own subdirectory.
* dcrt0.cc: Convert user_data pointer to static __cygwin_user_data
area.
(do_global_ctors): Check magic_bisquit for initialization.
(dll_crt0_1): First group of premain functions prior to fd
initialization. Run second group before calling main.
(dll_crt0 ()): New function, called from new initialization code.
(dll_crt0 (per_process *uptr)): Call new dll_crt0 () function on
initialization.
* debug.cc (thread_stub): Initialize bottom of stack with per-thread
info.
* environ.cc (parse_thing): Use binmode global to control
CYGWIN=binmode behavior.
* fhandler.cc (fhandler_base::open): Allow explicit setting of __fmode
to O_BINARY or O_TEXT to override disk mount settings.
* libcmain.cc: Move to lib subdirectory.
* libccrt0.cc: Ditto.
* dll_main.cc: Ditto.
* dll_entry.cc: Ditto.
* getopt.c: Ditto.
* thread.cc (thread_init_wrapper): Call ExitThread explicitly rather
than returning, as a preliminary step towards placing per thread info
at the bottom of the stack.
* winsup.h: Move per_process class to include/sys/cygwin.h. Declare
new dll_crt0().
* include/cygwin/version.h: Bump API minor version.
* binmode.c: New file.
* textmode.c: Ditto.
* perthread.h: Ditto.
* lib/_cygwin_crt0_common.cc: Ditto.
* lib/crt0.h: Ditto.
* lib/cygwin_attach_dll.c: Ditto.
* lib/cygwin_crt0.c: Ditto.
* lib/dll_entry.cc: Ditto.
* lib/dll_main.cc: Ditto.
* lib/getopt.c: Ditto.
* lib/libcmain.c: Ditto.
* lib/premain0.c: Ditto.
* lib/premain1.c: Ditto.
* lib/premain2.c: Ditto.
* lib/premain3.c: Ditto.
Wed Jun 28 19:36:00 2000 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (seteuid): Initialize pi.token before calling
internal_getlogin().
* uinfo.cc (internal_getlogin): Use impersonation token instead
of process token in case of active impersonation. Add some comments.
(uinfo_init): Initializing myself->token and myself->impersonated
before calling internal_getlogin(). Add some comments.
Mon Jun 26 18:32:41 2000 Christopher Faylor <cgf@cygnus.com>
* windows.cc (setitimer): Round up when < 1000 usecs.
Mon Jun 26 17:34:54 2000 Christopher Faylor <cgf@cygnus.com>
* hinfo.cc (hinfo::dup2): Eliminate compiler warning.
Mon Jun 26 11:25:29 2000 Christopher Faylor <cgf@cygnus.com>
* hinfo.cc (hinfo::dup2): Guard against out of bounds newfd.
Sat Jun 24 23:43:06 2000 Christopher Faylor <cgf@cygnus.com>
* grp.cc (read_etc_group): Open file in text mode.
* pwd.cc (read_etc_passwd): Ditto.
* shared.h: Bump PROC_MAGIC.
Sat Jun 24 19:30:00 2000 Corinna Vinschen <corinna@vinschen.de>
* fork.cc (fork): Fix error in copying SID pointer.
* spawn.cc (_spawnve): Ditto.
* passwd.cc: Remove static from `passwd_in_memory_p'.
(read_etc_passwd): Remove static.
* uinfo.cc: Move global declaration of `read_etc_group' and
`group_in_memory_p' into `uinfo_init'.
(internal_getlogin): Try to get SID from current process first.
(uinfo_init): Don't set uid and gid if `myself' has a valid SID.
Only load /etc/passwd and /etc/group in that case.
Sat Jun 24 12:29:59 2000 Christopher Faylor <cgf@cygnus.com>
* shared.cc (shared_info::initialize): Improve error message clarity.
* mkvers.sh: Eliminate debugging output.
Thu Jun 22 17:50:59 2000 Christopher Faylor <cgf@cygnus.com>
* Makefile.in: Autogenerate cygwin.def when appropriate.
* include/sys/cygwin.h: Correct prototype.
Thu Jun 22 17:05:04 2000 Christopher Faylor <cgf@cygnus.com>
* include/sys/cygwin.h: Don't define parts of this file that rely on
Windows headers unless the Windows header was previously included.
Thu Jun 22 20:45:00 2000 Corinna Vinschen <corinna@vinschen.de>
* registry.cc (load_registry_hive): Use HKEY_USERS when checking
for existing user hive.
Use MAX_PATH instead of numerical constant for array size.
Use return code of RegLoadKeyA instead of GetLastError for error output.
Thu Jun 22 14:27:04 2000 Christopher Faylor <cgf@cygnus.com>
* Makefile.in: Add new-libcygwin.a back to all_host target.
Wed Jun 21 14:32:42 2000 Christopher Faylor <cgf@cygnus.com>
* Makefile.in: Add *.def to clean operation.
Wed Jun 21 13:18:23 2000 Christopher Faylor <cgf@cygnus.com>
* Makefile.in: Add *.exe to clean operation.
Wed Jun 21 01:02:38 2000 Christopher Faylor <cgf@cygnus.com>
* mkvers.sh: Fix sed usage for older seds.
Tue Jun 20 20:46:28 2000 Christopher Faylor <cgf@cygnus.com>
* Makefile.in: Don't touch winver_stamp if mkvers.sh was unsuccessful.
Tue Jun 20 17:41:30 2000 Christopher Faylor <cgf@cygnus.com>
* mkvers.sh: Fix problem with handling of CVS tags causing .rc syntax
errors.
Tue Jun 20 13:38:12 2000 Christopher Faylor <cgf@cygnus.com>
* Makefile.in: Change to build the DLL during a cross-compiler build.
Mon Jun 19 20:46:33 2000 Christopher Faylor <cgf@cygnus.com>
* select.cc (socket_cleanup): Shutdown I/O on dummy sockets prior to
closing them.
Mon Jun 19 19:35:00 2000 Corinna Vinschen <corinna@vinschen.de>
* dcrt0.cc: Add load statements for `GetSidIdentifierAuthority'
and `RegLoadKeyA'.
* registry.cc (get_registry_hive_path): New function.
(load_registry_hive): Ditto.
* security.cc (convert_sid_to_string_sid): New function.
(get_ssid): Renamed to `convert_string_sid_to_sid'.
(get_pw_sid): Call `convert_string_sid_to_sid' instead of `get_ssid'.
(get_gr_sid): Ditto.
(get_admin_sid): Ditto.
(get_system_sid): Ditto.
(get_creator_owner_sid): Ditto.
(get_world_sid): Ditto.
* shared.h: New prototypes for `get_registry_hive_path' and
`load_registry_hive'.
* spawn.cc (spawn_guts): Set child->psid to NULL to force calling
`internal_getlogin' from child process in case of changing user context.
Call `load_registry_hive' in case of changing user context.
(_spawnve): Copy user infos only if user context remains the same.
* uinfo.cc: Add load statement for `NetUserGetInfo'.
Remove load statement for `NetGetDCName'.
(internal_getlogin): Rewrite to speed up process startup
and to correct user environment in case user context changes.
(uinfo_init): Call internal_getlogin only if myself->psid is NULL,
that is user context changes.
* winsup.h: Add prototypes for `convert_sid_to_string_sid',
`convert_string_sid_to_sid' and `get_pw_sid'.
Sun Jun 18 13:42:50 2000 Christopher Faylor <cgf@cygnus.com>
* fhandler.h (set_name): Don't use 'unix' as name since this is defined
by gcc now.
* fhandler.cc (set_name): Ditto.
2000-06-17 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
* winsup.h (isabspath): Don't report `C:foo' as an absolute path.
Sat Jun 17 13:51:48 2000 Christopher Faylor <cgf@cygnus.com>
* configure.in: Detect "cross-hosting" situation and set appropriate
variables in Makefile to avoid building excess stuff.
* configure: Regenerate.
* Makefile.in: Accommodate above change.
Sat Jun 17 19:52:00 2000 Corinna Vinschen <corinna@vinschen.de>
* pinfo.cc (pinfo_init): Revert previous patch.
Sat Jun 17 13:29:00 2000 Corinna Vinschen <corinna@vinschen.de>
* pinfo.cc (pinfo_init): Add missing initializers.
* uinfo.cc (internal_getlogin): Request domain infos only
when ntsec is ON.
Fri Jun 16 19:27:27 2000 Christopher Faylor <cgf@cygnus.com>
* Makefile.in: Just use library files from this tree when building
cygrun.exe.
* path.cc (chdir): Don't set cache to offending chdir. Change comment
to reflect current reality.
Fri Jun 16 20:55:00 2000 Corinna Vinschen <corinna@vinschen.de>
* cygwin.din: Define symbols for `cygwin_logon_user' and
`cygwin_set_impersonation_token'.
* dcrt0.cc (dll_crt0_1): Eliminate superfluous conditional
statements.
Add load statements for `ImpersonateLoggedOnUser', `LogonUserA'
and `RevertToSelf'.
* fork.cc (fork): Care for correct impersonation of parent
and child process.
* security.cc (cygwin_set_impersonation_token): New function.
(cygwin_logon_user): Ditto.
shared.h (class pinfo): New members `orig_uid', `orig_gid',
`real_uid' nad `real_gid'.
spawn.cc (spawn_guts): Care for impersonation when starting
child process in a different user context.
* syscalls.cc (setgid): Call `setegid' now. Set real_gid.
(setuid): Call `seteuid' now. Set real_uid.
(seteuid): Functionality moved from setuid to here. Care for
correct impersonation.
(setegid): Functionality moved from setgid to here.
* uinfo.cc (uinfo_init): Initialization of additional pinfo
members.
(getuid): Return real uid.
(getgid): Return real gid.
(geteuid): Return effective uid.
(getegid): Return effective gid.
include/sys/cygwin.h: Add prototypes for `cygwin_logon_user' and
`cygwin_set_impersonation_token'.
include/cygwin/version.h: Bump API minor version to 22.
Thu Jun 15 15:43:50 2000 Christopher Faylor <cgf@cygnus.com>
* path.cc (normalize_posix_path): Convert path to POSIX if it seems to
be a Windows path.
2000-06-15 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
* path.cc (mount_info::add_item): Eliminate a trailing backslash
included in a native path starting with '//[A-Za-z]/...'.
* path.cc (mount_info::del_item): Accept a native path as its target.
Wed Jun 14 23:47:19 2000 Christopher Faylor <cgf@cygnus.com>
* environ.cc (conv_envvars): Detect and convert all environment
variables used by libiberty's choose-temp.c
Tue Jun 13 12:41:41 2000 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
* path.cc (mount_info::add_item): The previous patch can't handle
the case of overwriting a mount entry.
Tue Jun 13 00:17:04 2000 Christopher Faylor <cgf@cygnus.com>
* thread.h: Shorten "current_directory" variables to "cwd_*"
throughout.
* path.cc: Ditto.
(normalize_posix_path): Add some extra debugging info.
(chdir): Ditto. Store chdir'ed posix and MS-DOS directory names in
"cache" here rather than trying to derive them later.
Sun Jun 11 15:57:00 2000 Corinna Vinschen <corinna@vinschen.de>
* fhandler_random.cc (read): Call CryptAquireContext with
CRYPT_VERIFYCONTEXT.
Thu Jun 8 22:49:00 2000 Corinna Vinschen <corinna@vinschen.de>
* path.cc (path_conv::check): Erase two lines checked in
by mistake.
Thu Jun 8 15:53:00 2000 Corinna Vinschen <corinna@vinschen.de>
* fhandler.cc (fhandler_disk_file::open): Check for directory
to set O_DIROPEN on directories anyway.
2000-06-07 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
* path.cc (mount_info::init): Eliminate the mount_slash feature.
(mount_slash): Eliminated.
(mount_info::read_mounts): Eliminate looking up existing entries. The
loop for deleting cygpath entries is done only when such entries exist.
(mount_info::from_registry): Eliminate sorting.
(mount_info::add_item): Call add_reg_mount if necessary. Check nmounts
more precisely. Use strcasematch in looking up existing entries.
(mount_info::del_item): Call del_reg_mount if necessary. Use
strcasematch. Use memmove instead of memcpy.
(mount_info::import_v1_registry): Everything is done in this method.
(mount_info::to_registry): Eliminated.
(mount_info::from_v1_registry): Eliminated.
(cygwin_umount): Simply call del_item.
* shared.h: Modify the declaration of add_item and del_item. Remove the
declaration of from_v1_registry.
Wed Jun 7 23:56:10 2000 Christopher Faylor <cgf@cygnus.com>
* include/cygwin/version.h: Bump DLL minor version number to 3.
2000-06-07 DJ Delorie <dj@cygnus.com>
* cygwin.din: add cygwin_dll_init
* dcrt0.cc (cygwin_dll_init): new
(dll_crt0_1): short circuit if manually loaded
* path.cc (mount_info::init): don't init if manually loaded
Wed Jun 7 13:47:00 2000 Corinna Vinschen <corinna@vinschen.de>
* include/netinet/in_systm.h: New file.
* include/cygwin/in_systm.h: Ditto.
Thu Jun 1 01:55:45 2000 Christopher Faylor <cgf@cygnus.com>
* exceptions.cc: Remove unneeded include.
* dcrt0.cc: Wrap LoadDLLfunc stuff in dummy function.
* init.cc: Ditto.
* uinfo.cc: Ditto.
2000-05-31 DJ Delorie <dj@cygnus.com>
* include/cygwin/version.h: use decimal, NOT octal
Wed May 31 16:40:00 2000 Corinna Vinschen <corinna@vinschen.de>
* fhandler.cc (fhandler_disk_file::open): Check for executable
even if ntsec is on if filesystem doesn't support ACLs.
Wed May 31 15:57:00 2000 Corinna Vinschen <corinna@vinschen.de>
* dcrt0.cc: Use LoadDLLfuncEx for loading Crypto API functions
with parameter `notimp' set to 1.
Tue May 30 16:58:33 2000 Christopher Faylor <cgf@cygnus.com>
* path.cc (mount_info::conv_to_win32_path): Previous patch was too
aggressive in adding a trailing slash.
Mon May 29 20:31:01 2000 Christopher Faylor <cgf@cygnus.com>
* Makefile.in: Remove libadvapi32.a.
* autoload.h: Add additional field to autoload block for handling
unimplemented functions.
(LoadDLLfuncEx): New function which accepts additional parameter for
controlling unimplemented function behavior.
(LoadDLLfunc): Use LoadDLLfuncEx.
* dcrt0.cc: Use new arguments for LoadDLLfunc. Add advapi32 routines.
(noload): Rewrite in assembler. Handle new unimplemented function
type.
* exceptions.cc: Eliminate another vestige of StackWalk stuff.
* net.cc: Use new arguments for LoadDLLfunc.
* uinfo.cc: Ditto.
Mon May 29 20:18:47 2000 Christopher Faylor <cgf@cygnus.com>
* config.h.in: Remove obsolete define.
* path.h (isdrive): New macro.
* dcrt0.cc (globify): Use new macro to determine if a string refers to
an MS-DOS drive.
* environ.cc (winenv): Ditto.
* spawn.cc (find_exec): Ditto.
* path.cc (get_raw_device_number): Ditto.
(mount_info::conv_to_posix_path): Ditto.
(chdir): Ditto.
(cygwin_posix_path_list_p): Ditto.
(cygwin_split_path): Ditto.
(path_conv::check): Move tmp_buf to beginning of function since it can
be used earlier in the loop. Use tmp_buf rather than 'root' to hold
root information.
(mount_info::conv_to_win32_path): Add trailing slash to end of mount
path when it translates to a drive. Add defensive code to avoid
writing beyond the end of 'dst'.
Sat May 27 15:57:00 2000 Corinna Vinschen <corinna@vinschen.de>
* fhandler_random.cc (read): Use CRYPT_MACHINE_KEYSET in
call to CryptAcquireContext() to serve users that did not
log in interactively.
Fri May 26 11:16:00 2000 Corinna Vinschen <corinna@vinschen.de>
* errno.cc (errmap): Map ERROR_BAD_NET_NAME to errno ENOSHARE.
Fri May 26 02:23:35 2000 Christopher Faylor <cgf@cygnus.com>
* sigproc.h (sigframe::set): Accept a default frame pointer.
* sigproc.cc (sig_send): Use passed in frame pointer, if appropriate.
Thu May 25 17:44:25 2000 Christopher Faylor <cgf@cygnus.com>
* dir.cc (rmdir): Use file attributes that have already been discovered
by path_conv.
2000-05-25 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
* dir.cc (rmdir): Correct the manner in checking the target directory.
Wed May 24 21:59:00 2000 Corinna Vinschen <corinna@vinschen.de>
* dir.cc (writable_directory): Comment out previous code,
return always 1 for now.
(mkdir): Call set_file_attribute explicitely with S_IFDIR mode bit.
* syscalls.cc (chown_worker): Ditto.
(chmod): Ditto.
* security.cc (get_nt_attribute): Fix error in debug output.
Never set FILE_DELETE_CHILD for files.
Construct appropriate inherit attribute according to file type.
2000-05-23 DJ Delorie <dj@cygnus.com>
* syscalls.cc (_cygwin_istext_for_stdio): New, for newlib
* include/cygwin/version.h: Bump API number for detect old
programs using old getc/putc macros
2000-05-23 DJ Delorie <dj@cygnus.com>
* dir.cc (writable_directory): handle root directories
Tue May 23 10:09:26 2000 Christopher Faylor <cgf@cygnus.com>
* uname.cc (uname): Use a "s" to denote a snapshot to avoid confusion
with the number "5".
Tue May 23 10:01:07 2000 Christopher Faylor <cgf@cygnus.com>
* path.cc (mount_info::conv_to_posix_path): Avoid putting a trailing
slash on a directory name when the ms-dos path spec is a root directory
of a device.
* registry.cc (reg_key::build_reg): Set 'key_is_invalid' flag rather
than using an INVALID_HANDLE_KEY.
(reg_key::get_int): Test for key validity before performing registry
operations.
(reg_key::set_int): Ditto.
(reg_key::get_string): Ditto.
(reg_key::set_string): Ditto.
(reg_key::kill): Ditto.
(reg_key::~reg_key): Ditto.
Tue May 23 01:13:33 2000 Christopher Faylor <cgf@cygnus.com>
* mkvers.sh: Use snapshot date as build date since it is more
interesting.
* uname.cc (uname): Detect if this is a snapshot build and add an "S"
to the version number. Report the snapshot date as the release date.
Mon May 22 17:11:25 2000 Christopher Faylor <cgf@cygnus.com>
* environ.cc (regopt): Scan HKLM if HKCU scan fails.
Mon May 16 23:39:00 2000 Corinna Vinschen <corinna@vinschen.de>
* dir.cc (rmdir): Care for misleading error messages
when trying to remove a directory on a samba share.
Eliminate superfluous else branch.
* syscalls.cc (_rename): Additional check for ERROR_FILE_EXISTS
if MoveFile fails.
Sun May 21 20:51:44 2000 Christopher Faylor <cgf@cygnus.com>
* dcrt0.cc (dll_crt0_1): Move uinfo_init call to before sigproc_init to
avoid a race.
(noload): Add an extra argument for debugging.
* uinfo.cc (uinfo_init): Eliminate test for multiple calls.
(getlogin): Assume that uinfo_init has already been called.
Sat May 20 01:34:57 2000 Christopher Faylor <cgf@cygnus.com>
* exceptions.cc (interruptible): Add an argument to control whether
function just checks for validity. Flag module handle == 0 as
noninterrupible.
(call_handler): Always acquire and release ebp lock. Loop for only a
fixed amount of time attempting to grab mutos and find an interruptible
PC.
2000-05-19 DJ Delorie <dj@cygnus.com>
* syscalls.cc (setmode): change mode of any matching FILE* also.
Thu May 18 17:28:19 2000 Christopher Faylor <cgf@cygnus.com>
* Makefile.in: Remove external.h dependency.
* dcrt0.cc (sigthread::init): Move here from sigproc.h.
* sigproc.h (sigthread): Move init to dcrt0.cc.
Thu May 18 01:28:02 2000 Christopher Faylor <cgf@cygnus.com>
* select.cc (thread_pipe): Add paranoid check to ensure thread
termination.
* external.cc: Eliminate obsolete include.
* getopt.c (getopt_long): Fix compiler warning.
* shared.h: Moved PID_ definitions to include/sys/cygwin so that they
can be used by external programs.
* include/sys/cygwin.h: Move external definitions here. Include
sys/resource.h to avoid having to do this everywhere.
Thu May 18 01:04:02 2000 Christopher Faylor <cgf@cygnus.com>
* sigproc.h (sigframe): Don't set frame info unless tid matches this
thread id.
Wed May 17 23:13:32 2000 Christopher Faylor <cgf@cygnus.com>
* dcrt0.cc (dll_crt0_1): Initialize mainthread stuff here before
anything needs it.
* sigproc.cc (sigproc_init): Move mainthread initialization out of
here.
* sigproc.h (sigthread): Add init() method.
(sigframe): Don't try to initialize muto.
* sync.cc: Undef WaitForSingleObject to avoid recursion.
2000-05-17 DJ Delorie <dj@cygnus.com>
* testsuite/winsup.api/crlf.c: New
* testsuite/winsup.api/iospeed.c: New
Wed May 17 01:05:52 2000 Christopher Faylor <cgf@cygnus.com>
* path.cc (mount_info::cygdrive_posix_path): Don't add trailing slash
if referring to something like c:\.
* dcrt0.cc (dll_crt0_1): Move uinfo initialization prior to sig_send
initialization to give signal thread a chance to finish.
* debug.cc (WFSO): Move to sigproc.cc
(WFMO): Ditto.
* exceptions.cc (interruptible): Allocate slightly more space for
directory just for paranoia's sake.
(call_handler): Eliminate nonmain argument. Determine if main thread
has set a frame pointer and use it if so.
(sig_handle): Eliminate nonmain argument.
* net.cc: Record frame information in appropriate routines throughout.
* select.cc (select): Ditto.
* sigproc.cc: Use sigthread structure to record mainthread id
throughout.
(sig_send): Record frame information for signal handler.
(wait_sig): Reflect argument change in sig_handle.
(WFSO): Move here and record frame information for signal handler.
(WFMO): Ditto.
* sigproc.h: Implement new "sigthread" class. Implement "sigframe"
class for manipulating signal frame info.
* thread.cc (__pthread_kill): Use standard _kill() function rather than
calling sig_send directly.
* winsup.h: Eliminate ebp element from signal_dispatch class.
Tue May 16 23:39:00 2000 Corinna Vinschen <corinna@vinschen.de>
Patch suggested by John Rowley <wjr@bgs.ac.uk>
* fhandler_tape.cc (fhandler_dev_tape::ioctl): Check
for filemark feature on MTWEOF operation.
Tue May 16 11:49:13 2000 Christopher Faylor <cgf@cygnus.com>
* include/cygwin/in.h (AF_INET6): Use correct in6_addr struct.
Mon May 15 00:35:35 2000 Christopher Faylor <cgf@cygnus.com>
* include/cygwin/version.h: Bump DLL minor version number to 2.
Sun May 14 23:41:24 2000 Christopher Faylor <cgf@cygnus.com>
* shared.h: Bump PROC_MAGIC.
* include/cygwin/version.h: Bump API minor to accommodate two recent
exports.
2000-05-13 Mumit Khan <khan@xraylith.wisc.edu>
* include/cygwin/socket.h (AF_INET6): Use same value as winsock2.
2000-05-12 Mumit Khan <khan@xraylith.wisc.edu>
* include/cygwin/in.h (struct in6_addr): Fix spelling.
* include/cygwin/socket.h (AF_INET6, PF_INET6): Define macros.
(AF_MAX, PF_MAX): Bump to 32 to leave room for future expansion.
Fri May 12 21:35:54 2000 Christopher Faylor <cgf@cygnus.com>
* dcrt0.cc (build_argv): Remove unneeded variable.
* select.cc (peek_pipe): Don't check for "ready" if it's already set.
(peek_console): Ditto.
(peek_serial): Ditto.
(peek_socket): Ditto.
(peek_windows): Ditto.
Fri May 12 20:31:00 2000 Corinna Vinschen <corinna@vinschen.de>
* fhandler_raw.cc (write_file, read_file): New wrapper functions
for WriteFile and ReadFile to get rid of ERROR_MEDIA_CHANGED
and ERROR_BUS_RESET in case of first access to tape.
(fhandler_dev_raw::raw_write): Use write_file instead of WriteFile.
(fhandler_dev_raw::raw_read): Use read_file instead of ReadFile.
Fri May 12 01:04:57 2000 Christopher Faylor <cgf@cygnus.com>
* Makefile.in (DLL_OFILES): Sort.
* fhandler_tty.cc (fhandler_tty_slave::send_ioctl_request): Eliminate.
(fhandler_tty_slave::ioctl): Rewrite to avoid races.
2000-05-11 Mumit Khan <khan@xraylith.wisc.edu>
* mmap.cc (list::erase): Increment loop counter.
(map::erase): Likewise.
Thu May 11 00:54:00 2000 Charles Wilson <cwilson@ece.gatech.edu>
* cygwin.din: insure that regsub() is included in
cygwin1.dll
Tue May 9 18:59:41 2000 Christopher Faylor <cgf@cygnus.com>
* Makefile.in: Use appropriate VARIABLE to refer to cygwin.def in load
line.
Thu May 9 23:53:00 2000 Corinna Vinschen <corinna@vinschen.de>
* fhandler.cc (fhandler_base::puts_readahead): Change
while condition to disallow wild runs.
Thu May 9 15:24:00 2000 Corinna Vinschen <corinna@vinschen.de>
Patch suggested by <lha@stacken.kth.se>
* window.cc (setitimer): Check for overflow condition
in tv_sec.
Thu May 9 0:47:00 2000 Corinna Vinschen <corinna@vinschen.de>
Patch suggested by Eric Fifer <EFifer@sanwaint.com>
* errno.cc: Change mapping of ERROR_BAD_PATHNAME to ENOENT.
Thu May 9 0:47:00 2000 Corinna Vinschen <corinna@vinschen.de>
* path.cc (symlink::info): Treat non readable files
as normal non symlink files.
2000-05-08 Paul K. Fisher <pfisher@plexware.com>
* include/pthread.h (pthread_detach): Add missing prototype.
(pthread_join): same.
2000-05-08 DJ Delorie <dj@cygnus.com>
* fhandler.cc (lock): use signed math to allow checking ranges
properly.
Sat May 6 23:22:25 2000 Christopher Faylor <cgf@cygnus.com>
* dcrt0.cc (insert_file): Eliminate unused parameter.
(build_argv): Ditto.
* exceptions.cc (stack): Eliminate unused parameters.
(stackdump): Ditto.
(cygwin_stackdump): Reflect above changes.
(sig_handle): Ditto.
* fhandler.cc (fhandler_base::set_inheritance): Use kludge to avoid
unused parameter warning.
2000-05-06 Mumit Khan <khan@xraylith.wisc.edu>
* include/wchar.h (wcscmp, wcslen): Fix prototypes.
* syscalls.cc (wcslen, wcscmp): Adjust.
Fri May 5 23:32:07 2000 Christopher Faylor <cgf@cygnus.com>
* errno.cc (errmap): Correct DIRECTORY mapping to ENOTDIR.
2000-05-04 Mumit Khan <khan@xraylith.wisc.edu>
* Makefile.in (install): Install profile startup and library.
Wed May 3 21:54:11 2000 Christopher Faylor <cgf@cygnus.com>
* configure.in: Use -gstabs+ as compile debug option. This seems to
promote better handling of symbols.
* configure: Regenerate.
* delqueue.cc (delqueue_list::process_queue): Allow ERROR_ACCESS_DENIED
to indicate that a file is being shared under Windows 95.
* syscalls.cc (_unlink): Use full path name. Take special action for
Windows 95. Assume that an ERROR_ACCESS_DENIED indicates a sharing
violation unless it's on a remote drive. Punt if there is an
ERROR_ACCESS_DENIED on a remote drive.
Wed May 3 18:07:00 2000 Corinna Vinschen <corinna@vinschen.de>
* errno.cc (errmap): Map ERROR_BAD_NETPATH to new errno ENOSHARE.
(_sys_errlist): Add entry for ENOSHARE.
(strerror): Add case for ENOSHARE.
* syscalls.cc (stat_worker): Check for errno ENOSHARE.
Wed May 3 17:28:00 2000 Corinna Vinschen <corinna@vinschen.de>
* Makefile.in: Add dependencies for fhandler_random.o
* fhandler.h: Add device type FH_RANDOM. Add class
fhandler_dev_random.
* fhandler_random.cc: New file. Implementation of
fhandler_dev_random.
* hinfo.cc (build_fhandler): Add case for FH_RANDOM.
* path.cc: Add device names for random devices to
windows_device_names.
(get_device_number): Add if branch for random devices.
(win32_device_name): Add device name generation for
random devices.
winsup.h: Include <wincrypt.h>.
2000-05-02 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
* path.cc (mount_info::conv_to_win32_path): Previous patch
failed to set flags on a win32 path.
Tue May 2 11:34:00 2000 Corinna Vinschen <corinna@vinschen.de>
* security.cc (read_sd): Return 1 on success because we
can't rely on the returned SD size from GetFileSecurity.
Tue May 2 2:22:00 2000 Corinna Vinschen <corinna@vinschen.de>
* dcrt0.cc: Add dynamic load code for `OemToCharA' from user32.dll.
* security.cc (read_sd): Call `OemToCharA' to make
`GetFileSecurity' happy on filenames with umlauts.
Wed Apr 26 23:23:23 2000 Christopher Faylor <cgf@cygnus.com>
* path.cc (normalize_win32_path): Don't add a trailing slash when one
already exists.
(mount_info::conv_to_win32_path): Use existing code for dealing with
relative path names when input is already a win32 path.
2000-04-26 DJ Delorie <dj@cygnus.com>
* Makefile.in (install): install regexp.h
Wed Apr 26 16:20:00 2000 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (stat_worker): Previous patch could succeed
in stating a non-existant file.
Wed Apr 26 01:07:16 2000 Christopher Faylor <cgf@cygnus.com>
* exceptions.cc (interruptible): Allocate slightly more space for
directory name check. Windows 95 seems to null-terminate the directory
otherwise.
(interrupt_on_return): Issue a fatal error if we can't find the
caller's stack.
Tue Apr 25 16:50:54 2000 Christopher Faylor <cgf@cygnus.com>
* spawn.cc (find_exec): Accept a path_conv argument rather than a
buffer so that the caller can find things out about a translated path.
(perhaps_suffix): Ditto.
(spawn_guts): Allocate path_conv stuff here so that we can find out
stuff about the translated path (this is work in progress).
* environ.cc (environ_init): Accept an as-yet unused argument
indicating whether we were invoked from a cygwin parent or not.
(winenv): Ditto.
(posify): Accept an argument indicating whether the path has already
been translated.
* dlfcn.cc (check_access): Provide a path_conv buffer to find_exec.
* exec.cc (sexecvpe): Ditto.
* path.cc (path_conv::check): Rename from path_conv::path_conv.
(mount_item::getmntent): Recognize "Cygwin executable" bit.
(symlink_info::check): Remove debugging statements.
* path.h (class path_conv): Add iscygexec method. Rewrite constructor
to call "check" method to allow multiple operations on a path_conv
variable.
* pinfo.cc (pinfo_init): Pass argument to environ_init.
* shared.h: Bump PROC_MAGIC.
* winsup.h: Reflect above changes to function arguments.
* include/sys/mount.h: Add MOUNT_CYGWIN_EXEC type.
Thu Apr 25 21:35:00 2000 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (stat_worker): Previous patch failed to stat
each drives root dir on 9X.
Thu Apr 25 16:37:00 2000 Corinna Vinschen <corinna@vinschen.de>
* fhandler.cc (fhandler_disk_file::open): Check for allow_ntsec
when determining exec flag.
* path.cc (symlink_info::check): Remove call to get_file_attribute().
* security.cc (read_sd): Rename, ditto for variables to conform
to common naming convention. Use GetFileSecurity() instead of
BackupRead() to avoid permission problems when reading ACLs.
(write_sd): Same renaming as for read_sd().
(alloc_sd): Change default permissions according to Linux permissions
for group and world when write permission is set.
* syscalls.cc (stat_worker): Avoid different permission problems
when requesting file informations.
Thu Apr 25 10:50:00 2000 Corinna Vinschen <corinna@vinschen.de>
* net.cc: Avoid a warning in declaration inet_network.
Mon Apr 24 17:38:25 2000 Thorsten Otto <t.otto@germanynet.de>
* fhandler_console.cc (fhandler_console::read): Detect extended keycode
information for Windows 9x so that function keys will work correctly.
2000-04-24 Vadim Egorov <egorovv@mailandnews.com>
* net.cc (cygwin_inet_network): new function.
* cygwin.din (inet_network): new export
Fri Apr 21 10:37:08 2000 Christopher Faylor <cgf@cygnus.com>
* path.cc (normalize_posix_path): Previous two patches were still
incorrect so rewrite this function to deal with trailing dots.
(mount_info::conv_to_win32_path): Just check for '/' where appropriate.
Eliminate nofinalslash call since it is handled in normalize_posix_path
now.
Thu Apr 20 17:32:42 2000 Christopher Faylor <cgf@cygnus.com>
* exceptions.cc (handle_exceptions): Search further for stack info to
accommodate Windows 95.
Thu Apr 20 16:39:18 2000 Christopher Faylor <cgf@cygnus.com>
* path.cc (normalize_posix_path): Previous change failed to take root
access into account.
Thu Apr 20 11:26:00 2000 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (_link): Check new link path for trailing dot.
Thu Apr 20 00:32:03 2000 Christopher Faylor <cgf@cygnus.com>
* fhandler.h (fhandler_base::hclose): New virtual method.
(fhandler_base::set_inheritance): Make this a method so that we can use
the appropriate close methods.
* fhandler.cc (fhandler_base::set_inheritance): Ditto.
* path.cc (normalize_posix_path): Eliminate /. trailing path
component.
Wed Apr 20 0:19:00 2000 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (setuid): Allow switching user context after
successful call to ImpersonateLogedOnUser (NT only).
(setgid): Ditto.
(seteuid): Call setuid.
(setegid): Call setgid.
Wed Apr 19 22:00:00 2000 Corinna Vinschen <corinna@vinschen.de>
* uinfo.cc (internal_getlogin): Use NetGetDCName() instead
of NetGetAnyDCName().
Mon Apr 17 12:08:47 2000 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
* syscalls.cc (_rename): Try MoveFile() at first before
MoveFileEx(..., MOVEFILE_REPLACE_EXISTING).
Tue Apr 18 19:15:29 2000 Christopher Faylor <cgf@cygnus.com>
* dcrt0.cc (globify): Don't use \ quoting when apparently quoting a DOS
path spec, even within a quoted string.
Sun Apr 16 18:54:21 2000 Christopher Faylor <cgf@cygnus.com>
* init.cc (dll_entry): Use better check for determining when to set
thread specific stuff.
* syscalls.cc (_unlink): Continue with chmod'ing file even if
DELETE_ON_CLOSE succeeds, if file still exists.
Fri Apr 14 23:51:15 2000 Christopher Faylor <cgf@cygnus.com>
* fhandler_console.cc (keytable): Add support for keypad 5 key, which
MS seems to think is equivalent to VK_CLEAR.
* debug.cc (thread_stub): Eliminate initialization of reent stuff.
* init.cc (dll_entry): Move it here.
Thu Apr 13 18:32:26 2000 Christopher Faylor <cgf@cygnus.com>
* dcrt0.cc (insert_file): Avoid freeing previously allocated argument
list.
* path.cc (symlink_info::check): Rename from symlink_check_one. Use
new symlink_info struct for communication.
(path_conv::path_conv): Use symlink_info structure for communication
with symlink_info::check. Fix typo which resulted in symbolic links
always being resolved.
(readlink): Use stat_suffixes array when resolving a link.
* syscalls.cc (stat_suffixes): Make global.
Thu Apr 13 20:50:00 2000 Corinna Vinschen <corinna@vinschen.de>
* include/cygwin/version.h: Bump minor api to reflect export change.
Thu Apr 13 8:48:00 2000 Corinna Vinschen <corinna@vinschen.de>
* path.cc (conv_to_win32_path): Detect a win32 path
if path contains backslashes.
* cygwin.din: Add symbol for `lacl'.
* security.cc (ReadSD): Add debug output.
(acl_worker): New static function.
(acl): Call acl_worker now.
(lacl): New function.
(facl): Call acl_worker now.
* include/cygwin/acl.h: Add prototype for `lacl'.
Wed Apr 12 18:48:33 2000 Christopher Faylor <cgf@cygnus.com>
* path.cc (path_conv::path_conv): Ensure that suffix is correctly
copied to path when we've found a symlink but aren't following
symlinks.
Sat Apr 8 00:46:14 2000 Christopher Faylor <cgf@cygnus.com>
* fhandler.cc (fhandler_disk_file::fstat): Allocate enough space for
root dir determination or overflow an array.
Sat Apr 8 00:08:53 2000 Christopher Faylor <cgf@cygnus.com>
* exceptions.cc (sigsave): Copy on fork so that we can restore correct
behavior in forked process.
(interruptible): Flag as interruptible when running in main process
module.
(interrupt_setup): Save return address and address of return address.
(signal_fixup_after_fork): New function. Uses above two values to
restore proper behavior to forked process.
(interrupt_on_return): Pass return address address to interupt_setup.
(interrupt_now): Pass NULL for return address address to
interrupt_setup.
* fork.cc (fork): Call signal_fixup_after_fork.
* shared.h: Lint cleanups.
* winsup.h: Ditto.
Mon Apr 3 14:10:44 2000 Christopher Faylor <cgf@cygnus.com>
* fhandler.h (select_stuff): Eliminate use of 'total'.
* select.cc (cygwin_select): Ditto.
(select_stuff::wait): Use maximum size for w4 rather than calculating
what will fit.
Mon Apr 03 13:58:00 2000 Corinna Vinschen <corinna@vinschen.de>
* grp.cc (parse_grp): Save empty array instead of
NULL in gr_mem if no supplementary group is given.
Sun Apr 02 16:02:00 2000 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (chown_worker): Use previous uid/gid if
new uid/gid is -1.
Fry Mar 31 22:55:00 2000 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (chown_worker): New static function with
chown functionality.
(chown): Call chown_worker with SYMLINK_FOLLOW.
(fchown): New function. Call chown_worker with SYMLINK_FOLLOW.
(lchown): New function. Call chown_worker with SYMLINK_IGNORE.
* cygwin.din: Add symbols for fchown, lchown.
Fry Mar 31 11:18:00 2000 Corinna Vinschen <corinna@vinschen.de>
* path.cc (symlink): Call `set_file_attribute()' and
`SetFileAttributeA()' instead of `chmod()' to set
uid/gid correct.
Wed Mar 29 22:49:56 2000 Christopher Faylor <cgf@cygnus.com>
* fhandler.h (select_record): Explicitly zero elements of this class.
(select_stuff): Ditto.
* select.cc (cygwin_select): Eliminate memset zero of sel.
Tue Mar 28 16:45:42 2000 Christopher Faylor <cgf@cygnus.com>
* Makefile.in: Use default rules when compiling cygrun.o.
* dcrt0.cc (host_dependent_constants::init): Limit non-NT platforms to
32K chunks when copying regions during a fork.
* path.cc (symlink_check_one): Add temporary debugging output.
Simplify PATH_EXEC test.
* syscalls.cc (stat_suffixes): Null terminate this list.
Sat Mar 25 20:46:39 2000 Christopher Faylor <cgf@cygnus.com>
* path.cc (symlink_check_one): Recognize symlink settings from the
mount table.
* path.h: Make PATH_SYMLINK an alias for MOUNT_SYMLINK.
* syscalls.cc (stat_worker): Use extension search mechanism in
path_conv to look for .exe rather than trying to special case it here.
* mount.h: Make MOUNT_SYMLINK a real option.
Sat Mar 25 00:22:32 2000 Christopher Faylor <cgf@cygnus.com>
* environ.cc: Add TMPDIR to the list of environment variables which are
converted to POSIX format.
* sigproc.cc (proc_terminate): Don't attempt to delete when a muto
pointer is NULL.
Sun Mar 19 12:01:00 2000 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (stat_worker): Set st_nlink to 1 on remote drives.
Sat Mar 18 23:04:27 2000 Christopher Faylor <cgf@cygnus.com>
* times.cc: Fix extern declarations for variables that are exported but
used by this modules.
Sat Mar 18 01:32:04 2000 Christopher Faylor <cgf@cygnus.com>
* dcrt0.cc (host_dependent_constants::init): Eliminate DELETE flag
from shared constant.
Sat Mar 18 01:24:25 2000 Christopher Faylor <cgf@cygnus.com>
* delqueue.cc (delqueue_list::queue_file): Add some debugging.
* path.h (class path_conv): Add a char * operator for the most common
case.
* syscalls.cc (_unlink): Rewrite to use FILE_FLAG_DELETE_ON_CLOSE when
possible (i.e., on NT).
Fri Mar 17 18:16:00 2000 Corinna Vinschen <corinna@vinschen.de>
Patch suggested by Eric Fifer <EFifer@sanwaint.com>
* fhandler.cc (fhandler_base::open): Call set_file_attribute()
only if a file is really created.
Thu Mar 16 14:15:00 2000 Corinna Vinschen <corinna@vinschen.de>
* security.cc (set_process_privileges): Remove `static'.
(get_nt_attribute): Returns uid and gid additionally. Remove call
to set_process_privileges().
(get_file_attribute): Returns uid and gid additionally. Don't
call ntea if ntsec is ON.
(set_nt_attribute): Remove call to set_process_privileges().
Don't call ntea if ntsec is ON.
(acl): Remove call to set_process_privileges().
* dcrt0.cc (dll_crt0_1): Call set_process_privileges().
* winsup.h: New prototype for set_process_privileges(),
changed prototype for get_file_attribute().
* fhandler.cc (get_file_owner): Discard function.
(get_file_group): Ditto.
(fhandler_disk_file::fstat): Discard calls to get_file_owner() and
get_file_group().
* path.cc (path_conv::path_conv): New debugging output for result
of GetVolumeInformation().
(mount_info::conv_to_win32_path): Call backslashify() with pathbuf
instead of src_path.
* syscalls.cc (chown): Reformat slightly.
(chmod): Replace get_file_owner() and get_file_group() calls
by a call to get_file_attribute(). Discard local variable has_acls.
Reformat slightly.
(stat_worker): Root dir check now done by a call to rootdir().
Don't call num_entries() on remote drives.
Discard local variable has_acls.
Wed Mar 15 20:38:06 2000 Corinna Vinschen <corinna@vinschen.de>
* errno.cc: Map ERROR_NOACCESS to EFAULT.
Wed Mar 15 14:25:38 2000 Christopher Faylor <cgf@cygnus.com>
* spawn.cc (spawn_guts): Restore dependency on signal_arrived. It's
needed to wake up the WaitForSingleObject.
Tue Mar 14 23:41:16 2000 Christopher Faylor <cgf@cygnus.com>
Pipe changes throughout suggested by Eric Fifer <EFifer@sanwaint.com>
* debug.cc (threadname_init): Pass name of lock as arg 2 of new_muto.
* malloc.cc (malloc_init): Ditto.
* sigproc.cc (sigproc_init): Ditto.
* exceptions.cc (events_init): Ditto.
(call_handler): Eliminate special case for hExeced. Report locked
thread in debugging output.
* fhandler.cc (fhandker_pipe::fhandler_pipe): Propagate device type to
base class.
* fhandler.h (fhandler_pipe): Ditto.
* hinfo.cc (hinfo::build_fhandler): Pass specific type of pipe to
constructor.
* spawn.cc (spawn_guts): Eliminate dependency on signal when waiting
for subprocess.
* strace.cc: Remove obsolete #ifdef.
* sync.cc (muto::muto): Save the name of the muto.
(muto:~muto): Also release the muto.
* sync.h: Add a muto name field.
* select.cc (peek_pipe): Avoid doing a PeekNamedPipe on the write end
of a pipe.
Sun Mar 12 01:14:33 2000 Christopher Faylor <cgf@cygnus.com>
* fhandler.cc (fhandler_base::get_readahead_into_buffer): New function.
* fhandler.h: Declare new function. Add extra argument to
process_slave_output.
* fhandler_console.cc (fhandler_console::read): Move read ahead code to
new function.
* fhandler_tty.cc (fhandler_pty_master::process_slave_output): Move
common code here.
(fhandler_tty_slave::read): Understand readahead.
(fhandler_pty_master::read): Move code to process_slave_output.
* select.cc (peek_pipe): Avoid performing certain checks when non-read
and on inappropriate fh types.
Sat Mar 11 22:47:43 2000 Christopher Faylor <cgf@cygnus.com>
* fhandler_console.cc (fhandler_console::read): Don't even think about
breaking on interrupt if executing in a "cygwin" thread.
* fhandler_tty.cc (fhandler_pty_master::process_slave_output):
Streamline, simplify code.
* sigproc.cc (sig_send): Remove debugging statement.
Fri Mar 10 13:20:50 2000 Christopher Faylor <cgf@cygnus.com>
* sigproc.cc: Set wait_sig priority to normal.
Fri Mar 10 13:03:06 2000 Christopher Faylor <cgf@cygnus.com>
* sigproc.cc (wait_sig): Add addtional debugging output.
Thu Mar 9 15:25:01 2000 Christopher Faylor <cgf@cygnus.com>
* environ.cc: Eliminate oldstack CYGWIN option.
* exceptions.cc (sfta): Eliminate obsolete function.
(sgmb): Eliminate obsolete function.
(class stack_info): Remove MS method for walking the stack.
(stack_info::init): Just initialize required fields.
(stack_info::brute_force): Rename to stack_info::walk.
(handle_exceptions): Pass derived frame pointer to sig_send.
(interrupt_setup): Clear saved frame pointer here.
(interrupt_on_return): thestack is no longer a pointer.
(call_handler): Accept a flag to indicate when a signal was sent from
other than the main thread. Use saved frame pointer for determining
where to place signal handler call.
(sig_handle): Accept "nonmain" argument. Pass it to call_handler.
* fhandler_tty.cc (fhandler_tty_common::__acquire_output_mutex): Change
debugging output slightly.
* (fhandler_tty_common::__release_output_mutex): Ditto.
(fhandler_tty_slave::read): Fix a comment, remove a goto.
* sigproc.cc (sig_send): Accept an optional frame pointer argument for
use when suspending the main process. sigcomplete_main is an autoreset
event now. Save frame pointer for non-main operation.
(wait_sig): Make sigcomplete_main an autoreset event. Eliminate
NOSIGQUEUE. Pass rc to sig_handle to signify if this was a nonmain
process.
* sigproc.h: Reflect change to sig_send argument.
* syscalls.cc (swab): Eliminate swab function since it is now available
in newlib.
* winsup.h (signal_dispatch): Change CONTEXT cx to DWORD ebp.
Tue Mar 7 13:31:10 2000 Christopher Faylor <cgf@cygnus.com>
* sigproc.cc (sig_send): Eliminate sync_sig_send synchronization since
it didn't seem to affect the "bash hangs" problem.
Tue Mar 7 13:17:56 2000 Christopher Faylor <cgf@cygnus.com>
* mcount.c: Remove strace.h include.
Tue Mar 7 00:29:34 2000 Christopher Faylor <cgf@cygnus.com>
Throughout use strace class in place of individual functions and
variables.
* cygwin.din: Eliminate _strace_wm.
* sigproc.cc (wait_sig): Temporarily add more debugging output.
* include/cygwin/version.h: Bump minor api to reflect export change.
Sun Mar 5 01:17:05 2000 Christopher Faylor <cgf@cygnus.com>
* exceptions.cc (call_handler): Streamline to use only one call to
ResumeThread.
* sigproc.cc (sig_send): Use a muto around the ReleaseSemaphore.
Remove priority setting since it didn't solve anything.
Tue Feb 29 00:46:09 2000 Christopher Faylor <cgf@cygnus.com>
* sigproc.cc (sig_send): Temporarily set priority to highest while
sending a signal.
Mon Feb 28 11:23:29 2000 Christopher Faylor <cgf@cygnus.com>
* pinfo.cc (set_myself): Add build date to strace output.
Mon Feb 28 11:17:30 2000 Eric Fifer <EFifer@sanwaint.com>
* sigproc.cc (proc_subproc): Only clear wait event when not attending
to a signal.
Mon Feb 28 00:08:09 2000 Christopher Faylor <cgf@cygnus.com>
* configure.in: Remove --enable-strace-hhmmss option.
* configure: Regenerate.
Sun Feb 27 23:11:57 2000 Christopher Faylor <cgf@cygnus.com>
* dcrt0.cc (set_os_type): Record OS name string.
(getprogname): Eliminate obsolete function.
(dll_crt0_1): Move initial strace initialization output to set_myself.
* exceptions.cc (interruptible): Add debugging output.
(interrupt_setup): New function.
(interrupt_now): Use interrupt_setup to set up common interrupt handler
stuff.
(interrupt_on_return): Ditto.
(call_handler): Move signal_arrived arm and clear threads to region
where signalled thread is suspended or suffer races.
* pinfo.cc (set_myself): Output interesting information when strace is
first initialized. Initialize progname here.
* sigproc.cc (sig_dispatch_pending): Modify to ensure that flush signal
are sent synchronously.
* strace.cc (strace_vsprintf): Move code into strace program.
* uname.cc (uname): Use 'osname' global to construct cygwin name +
Windows type + version.
Fri Feb 25 19:26:42 2000 Christopher Faylor <cgf@cygnus.com>
* exceptions.cc (interruptible): Make a little more structured.
(call_handler): Allow signals to be sent even if signalled thread is
stopped. Change order of signal_arrived arming/waiting threads
clearing to eliminate a race.
(reset_signal_arrived): New helper function.
* malloc.cc (malloc_init): Use mutos so that signal handler can keep
track of who owns the lock.
(__malloc_lock): Ditto.
(__malloc_unlock): Ditto.
* sync.h (new_muto): Actually use a muto for the "buffer".
* Makefile.in: Fix a dependency.
2000-02-25 DJ Delorie <dj@cygnus.com>
* Makefile.in: fix "make check" support and cygrun.
Thu Feb 24 15:56:00 2000 Christopher Faylor <cgf@cygnus.com>
* syscalls.c (_read): Clear errno before doing any read operation.
Thu Feb 24 14:45:06 2000 Christopher Faylor <cgf@cygnus.com>
* exceptions.cc (call_handler): Use new muto linked list to look for
all potential mutos owned by suspended thread. Clear waiting threads
while thread is stopped.
(proc_subproc): Clarify debugging output.
* sync.h (class muto): Add 'next' field.
(new_muto): Keep linked list alive.
Thu Feb 24 00:59:15 2000 Christopher Faylor <cgf@cygnus.com>
Fix final round of gcc warnings relating to unused parameters.
* debug.cc (iscygthread): New function.
* debug.h: Declare it.
* exceptions.cc (set_process_mask): Flush pending signals.
(handle_sigsuspend): No need to flush pending signals.
(call_handler): Refine previous tests of muto ownership. Only clear
wait()'s when we have definitely responded to a signal.
* fhandler_console.cc (fhandler_console::read): Don't set EINTR if
executing in a "cygwin" thread.
* sigproc.cc (proc_subproc): Use second argument to control whether
CLEARWAIT actually sets "signalled" flag.
* sync.h (muto): Add 'unstable' method.
Wed Feb 23 21:59:44 2000 Christopher Faylor <cgf@cygnus.com>
* hinfo.cc (hinfo::extend): Clean up debugging output.
Wed Feb 23 21:34:58 2000 Christopher Faylor <cgf@cygnus.com>
* exceptions.cc (interruptible): Change method for determining if
something is interruptible.
(call_handler): Avoid suspending a thread if it owns a muto. Only set
signal_arrived if the thread was actually interrupted.
(events_init): Initialize module information needed by interruptible().
* init.cc (dll_entry): Record module handle of main for use by
interruptible().
(proc_subproc): Reorganize handling of terminated child so that the
bulk of the processing comes from the signal thread.
(wait_sig): Force processing of waiting threads if SIGCHLD is not
processed.
Tue Feb 22 23:06:01 2000 Christopher Faylor <cgf@cygnus.com>
Respond to more g++ warnings relating to initializing structures.
Mon Feb 21 18:36:37 2000 Christopher Faylor <cgf@cygnus.com>
* fhandler.cc (set_inheritance): Revert previous patch which got rid of
'name' parameter.
Mon Feb 21 00:19:40 2000 Christopher Faylor <cgf@cygnus.com>
Respond to a multitude of new g++ warnings.
Sun Feb 20 22:10:21 2000 Christopher Faylor <cgf@cygnus.com>
* environ.cc (getwinenv): Make __stdcall.
(winenv): Ditto.
* malloc.cc (strdup): New function. Occludes newlib version.
(_strdup_r): Ditto.
* winsup.h: Reflect above __stdcall changes.
Sun Feb 20 21:31:00 2000 Corinna Vinschen <corinna@vinschen.de>
* fhandler.cc (fhandler_disk_file::fstat): Modify get_file_attribute
return value if FILE_ATTRIBUTE_READONLY is set.
Thu Feb 17 11:00:23 2000 Christopher Faylor <cgf@cygnus.com>
* environ.cc (environ_init): Cosmetic change.
Mon Feb 7 16:50:44 2000 Christopher Faylor <cgf@cygnus.com>
* Makefile.in: cygrun needs libshell32.a.
Sun Feb 6 22:17:58 2000 Christopher Faylor <cgf@cygnus.com>
* sigproc.cc (proc_subproc): Simplify case for when a child process is
stopped since new signal handler ensures the desired behavior.
Sun Feb 6 21:52:33 2000 Christopher Faylor <cgf@cygnus.com>
* Makefile.in: Fix install target so that directories will be created
when necessary.
Sun Feb 6 18:12:17 2000 Christopher Faylor <cgf@cygnus.com>
* Makefile.in: exceptions.cc should depend on autoload.h.
* exceptions.cc: Undef DECLSPEC_IMPORT prior to including imagehlp.h to
avoid defining StackWalk as "import".
(call_handler): Minor optimizations.
(sig_handle_tty_stop): Fix typo in previous checkin.
* sigproc.cc (sigproc_init): Ditto, for signal_arrived initialization.
Sat Feb 5 15:37:37 2000 Christopher Faylor <cgf@cygnus.com>
* dcrt0.cc (isquote): Convert to inline function.
Sat Feb 5 00:26:01 2000 Christopher Faylor <cgf@cygnus.com>
Throughout, rename global_signal_arrived to signal_arrived.
Throughout, eliminate use of arm_signals and __signal_arrived.
Throughout, revert to use of simple call to WaitForSingleObject or
WaitForMultipleObjects.
* debug.h: Eliminate obsolete function declaration.
* exceptions.cc (sigWaitForSingleObject): Eliminate obsolete function
definition.
* fhandler.h: Reflect change to select_stuff wait method.
* fhandler_tape.cc (get_ll): Accommodate new w32api LARGE_INTEGER
definition.
* ntea.c (NTReadEARaw): Ditto.
(NTWriteEA): Ditto.
* security.cc (ReadSD): Ditto.
(WriteSD): Ditto.
* syscalls.cc (_link): Ditto.
* uname.cc (uname): Eliminate PPC switch.
2000-02-01 Salvador Eduardo Tropea <salvador@inti.gov.ar>
* include/io.h: add return type to setmode()
2000-01-27 DJ Delorie <dj@cygnus.com>
* include/netdb.h (h_errno): change __imp_ to dllimport
* cygwin.din (reent_data): add DATA
Thu Jan 27 01:07:14 2000 Christopher Faylor <cgf@cygnus.com>
* exceptions.cc (call_handler): Add debugging output.
* select.cc (MAKEready): Arm signals earlier.
* sigproc.cc (__signal_arrived:arm): Move debugging version of this
method here.
(__signal_arrived::release): Ditto.
* sigproc.h: Recognize debugging versions of above two methods.
(arm_signals::WaitForMultipleObjects): Don't release signal lock unless
signal arrived.
(arm_signals::WaitForMultipleSingleObject): Ditto.
(arm_signals::MsgWaitForMultipleObjects): Ditto.
Thu Jan 27 00:19:26 2000 Christopher Faylor <cgf@cygnus.com>
* sync.h (new_muto): Workaround change in gcc behavior.
Wed Jan 26 12:57:13 2000 Christopher Faylor <cgf@cygnus.com>
* Makefile.in: Ensure that all required libraries are built prior
to linking cygrun.exe.
Tue Jan 25 21:26:57 2000 Christopher Faylor <cgf@cygnus.com>
* exceptions.cc (sig_handle): Crudely work around potential problem
when main thread has a lock but is killed by a fatal signal.
* fhandler_tty.cc (fhandler_pty_master::write): Don't perform line
editing on the pty master (so why do we need the second argument to
line_edit, then?)
* thread.cc: Reformat to GNU standards.
2000-01-11 DJ Delorie <dj@cygnus.com>
* ROADMAP: new
2000-01-11 DJ Delorie <dj@cygnus.com>
* fhandler_zero.cc: new, emulate /dev/zero
* testsuite/winsup.api/devzero.c: new, test /dev/zero
* Makefile.in: build fhandler_zero.o
* fhandler.h: add support for /dev/zero
* hinfo.cc: ditto
* path.cc: ditto
2000-01-11 DJ Delorie <dj@cygnus.com>
* mmap.cc (mmap): MSDN says *one* of FILE_MAP_*, fix flags for
MAP_PRIVATE.
Mon Jan 10 01:11:00 2000 Corinna Vinschen <corinna@vinschen.de>
* security.cc (acl_access): New function.
* syscalls.cc (access): Call acl_access if ntsec is on.
Mon Jan 10 01:11:00 2000 Corinna Vinschen <corinna@vinschen.de>
* fhandler.cc (get_file_owner): Use of ReadSD() instead of
GetFileSecurity().
(get_file_group): Ditto.
Sun Jan 9 15:43:07 2000 Christopher Faylor <cgf@cygnus.com>
* debug.cc (struct thread_start): Add a flag to determine whether a
field is in use. Eliminate thread_start_ix since it was not
thread-safe.
(thread_stub): Use notavail flag to control whether the entry in
start_buf can be reused.
(makethread): Ditto.
Sun Jan 9 20:18:00 2000 Corinna Vinschen <corinna@vinschen.de>
* security.cc (alloc_sd): Rearrange order of ACE creation.
(setacl): Optimize creation of ACEs related to inheritance. Code
cleanup.
(aclcheck): Disable check for existance of DEF_)CLASS_OBJ.
Sat Jan 8 18:42:32 2000 Christopher Faylor <cgf@cygnus.com>
* mkvers.h: Reorg fix.
Sat Jan 8 20:00:00 2000 Corinna Vinschen <corinna@vinschen.de>
* cygwin.din: Add new acl API calls.
* grp.cc (getgroups): Change to work for any username.
* security.cc (get_id_from_sid): Change to work with acl API.
(is_grp_member): New function.
(get_nt_attribute): Rewritten.
(add_access_allowed_ace): New function.
(add_access_denied_ace): Ditto.
(alloc_sd): Rewritten.
(setacl): New function.
(getace): Ditto.
(searchace): Ditto.
(getacl): Ditto.
(acl): Ditto.
(facl): Ditto.
(aclcheck): Ditto.
(acecmp): Ditto.
(aclsort): Ditto.
(acltomode): Ditto.
(aclfrommode): Ditto.
(acltopbits): Ditto.
(aclfrompbits): Ditto.
(permtostr): Ditto.
(acltotext): Ditto.
(permfromstr): Ditto.
(aclfromtext): Ditto.
* syscalls.cc (access): Set errno again when needed.
* include/cygwin/acl.h: New file.
* include/sys/acl.h: Ditto.
Sat Jan 8 14:46:19 2000 Christopher Faylor <cgf@cygnus.com>
* Makefile.in: Add cygwin DLL specific CFLAGS define.
Fri Jan 7 21:01:57 2000 Christopher Faylor <cgf@cygnus.com>
* exceptions.cc (interrupt_on_return): Properly coerce assignment of
sigsave.func.
2000-01-07 Mumit Khan <khan@xraylith.wisc.edu>
* acconfig.h: New file.
* configure.in Add check for memset builtin.
(AC_CONFIG_HEADER): Use.
(STRACE_HHMMSS): Define instead of substituting.
(_MT_SAFE): Likewise.
(_CYG_THREAD_FAILSAFE): Likewise.
(DEBUGGING): Likewise.
(MT_SAFE): Substitute as a yes/no variable.
* Makefile.in: Remove DEBUGGING, STRACE_HHMMSS, and THREAD_FAILSAFE
variables and add DEFS. Update usage of MT_SAFE to reflect yes/no
values. Add config.h to winsup.h dependency.
(CFLAGS_CONFIG): Update.
(INCLUDES): Prepend `-I.'.
* utils/Makefile.in (INCLUDES): Likewise.
* winsup.h: Conditionally include config.h.
* thread.cc: Likewise.
* config.h.in: Generate new file.
* configure: Regenerate.
Fri Jan 7 16:21:01 2000 Christopher Faylor <cgf@cygnus.com>
* dcrt0.cc (dll_crt0): Allow signal handling for dynamically loaded
case.
Thu Jan 6 00:30:12 2000 Corinna Vinschen <corinna@vinschen.de>
* path.cc (symlink_check_one): Initialize local variable `unixattr'
before calling `get_file_attribute'.
* syscalls.cc (chown): Ditto.
* security.cc (get_nt_attribute): Eliminate attribute copying from
world to user/group in case of missing ACEs.
(alloc_sd): Set special rights for administrators group only if it's
neither owner nor group.
* utils/mkpasswd.c: Create entry for local group administrators (SID
544).
Thu Jan 6 00:21:31 2000 Christopher Faylor <cgf@cygnus.com>
Change function calls to __stdcall throughout.
* exceptions.cc (handle_exceptions): Probe stack for return address to
use with new signal method. Fill out sigsave.cx with this information.
(call_handler): Use sigsave.cx if it is available, rather than trying
to find the context of the main thread.
(interrupt_on_return): Use address of context rather than
pass-by-reference.
(interrupt_now): Ditto.
Thu Jan 6 00:21:31 2000 Corinna Vinschen <corinna@vinschen.de>
* grp.cc (getgroups): Return supplementary groups now.
* include/limits.h: Define NGROUP_MAX as 16 now.