summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin
Commit message (Collapse)AuthorAgeFilesLines
...
* * regexp/regexp.c: Add winsup.h.Christopher Faylor2000-08-022-0/+5
|
* * winsup.h: take out protections of environ, errno, allow C useDJ Delorie2000-08-0260-92/+98
| | | | | | | | | | * *.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.
* * include/sys/strace.h: Fix strace definition.Christopher Faylor2000-08-022-2/+6
|
* * strace.h: Add kludgy workarounds to avoid using deprecated methods forChristopher Faylor2000-08-025-125/+139
| | | | | | | | | | 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.
* * fhandler_console.cc: Remove VK_DIVIDE detection.Christopher Faylor2000-07-303-12/+19
| | | | | | | (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.
* * fhandler_console.cc: Add VK_DIVIDE detection. Return virtual keycode if itChristopher Faylor2000-07-292-0/+14
| | | | is not detected and it is less than ' '.
* * path.cc (chdir): Avoid trailing dot calculation when chdir == '/' or we endChristopher Faylor2000-07-292-1/+6
| | | | up with an empty string.
* * include/cygwin/version.h: Bump DLL minor version number to 5 due to all ofChristopher Faylor2000-07-2929-633/+761
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the changes below. Redefine process structure to avoid a fixed size table. Redefine pinfo/_pinfo classes. Use these throughout. * dcrt0.cc (dll_crt0_1): Accomodate set_myself argument change. (__api_fatal): Accomodate _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): Accomodate 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 accomodate new pinfo stuff. * include/cygwin/version.h: Update minor version for cygdrive changes below.
* * environ.cc (parse_thing): Make binmode a DWORD.Christopher Faylor2000-07-294-5/+10
| | | | | | * hinfo.cc (hinfo::init_std_file_from_handle): Use 'binmode' to determine default open mode. * winsup.h: Declare binmode.
* * include/cygwin/cygwin_dll.h: Update for modern compilers.Christopher Faylor2000-07-293-6/+10
| | | | | | | * 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.
* Minor formatting change.Christopher Faylor2000-07-282-2/+2
|
* * dcrt0.cc (dummy_autoload): Add load statement for RegDeleteValueA.Christopher Faylor2000-07-287-12/+155
| | | | | | | | | | | | | | | | | * 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.
* * include/cygwin/version.h: Bump DLL minor version number to 4.Christopher Faylor2000-07-282-1/+5
|
* * testsuite/winsup.api/winsup.exp: ignore stdout by defaultDJ Delorie2000-07-2715-2/+55
| | | | | | | | | | | | | | | | | | | * 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 * include/windows.h: optimize non-inclusion of repeat headers
* * fhandler.cc (fhandler_disk_file::fstat): Allow block calculation to succeedChristopher Faylor2000-07-272-1/+6
| | | | for files >= 2GB and <= 4GB.
* fix typo.Christopher Faylor2000-07-271-1/+1
|
* Give signal_exit noreturn attribute.Christopher Faylor2000-07-261-1/+1
|
* * exceptions.cc (signal_exit): Renamed from "really+exit". Always setsChristopher Faylor2000-07-262-18/+15
| | | | | | 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.
* * environ.cc (posify): Revert previous patch.Corinna Vinschen2000-07-262-18/+37
| | | | | | | | (_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.
* * syscalls.cc (stat_worker): Make stat return correct st_blocks for files withChristopher Faylor2000-07-262-151/+157
| | | | size bigger than 2Gb and less than 4Gb
* * security.cc (lookup_name): Search on local machine first ifCorinna Vinschen2000-07-262-0/+22
| | | | myself->domain is not empty.
* * fhandler_console.cc (fhandler_console::read): Explicitly set cursor to makeChristopher Faylor2000-07-262-0/+6
| | | | it visible while waiting in WaitForMultipleObjects.
* Add missing ChangeLog entry.Christopher Faylor2000-07-261-0/+10
|
* * passwd.cc: Change name of passwd_in_memory_p to passwd_state.Corinna Vinschen2000-07-262-15/+38
| | | | | | | | 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.
* * syscalls.cc (statfs): Use path_conv method to convert input path.Christopher Faylor2000-07-262-3/+5
|
* * syscalls.cc (_link): Avoid extraneous call to cygwin_conv_to_win32_path.Christopher Faylor2000-07-263-83/+122
|
* * syscalls.cc (_link): Corrected previous patch.Corinna Vinschen2000-07-242-1/+5
|
* * fhandler.h (class fhandler_dev_random): Add members for managingCorinna Vinschen2000-07-243-11/+95
| | | | | | | 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().
* * fhandler.h: Add comment.Corinna Vinschen2000-07-232-0/+7
|
* * fhandler.h (class fhandler_dev_raw): Add private member `varblkop'Corinna Vinschen2000-07-234-64/+97
| | | | | | | | | | | | | 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.
* Patch suggested by Kazuhiro Fujieda <fujieda@jaist.ac.jp>.Corinna Vinschen2000-07-224-17/+38
| | | | | | | | | | * 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.
* * spawn.cc (span_guts): Retrieve security attributes before settingCorinna Vinschen2000-07-212-6/+13
| | | | psid to NULL.
* * security.cc (acl_worker): Use stat_suffixes in call to path_convCorinna Vinschen2000-07-212-1/+7
| | | | just as in `stat_worker'.
* * spawn.cc (spawn_guts): Don't restore impersonation in caseCorinna Vinschen2000-07-192-6/+11
| | | | of _P_OVERLAY. Clean up slightly. Accomodate comments.
* * shared.h (class pinfo): New members `root' and `rootlen'.Corinna Vinschen2000-07-197-16/+148
| | | | | | | | | | | | | | | | * 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.
* Update copyright info.Christopher Faylor2000-07-191-2/+2
|
* * dll_init.cc (dll_list::alloc): Fix debugging output.Christopher Faylor2000-07-182-1/+5
|
* Update ChangeLog.Christopher Faylor2000-07-181-0/+2
|
* Throughout, eliminate third argument to path_conv and use new PC_* constantsChristopher Faylor2000-07-1715-99/+147
| | | | | | | | | | | | | | | | | | for second argument. * 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.
* Patch suggested by Eric Fifer <EFifer@sanwaint.com>Corinna Vinschen2000-07-172-3/+8
| | | | * poll.cc (poll): Fix erroneous negations.
* * environ.cc (setenv): Use __cygwin_environ instead ofCorinna Vinschen2000-07-172-2/+7
| | | | environ after reallocating environment space.
* * _cygwin_crt0_common.cc: Undef 'environ' or suffer compiler error.Christopher Faylor2000-07-172-0/+6
|
* * environ.cc: Use new definition of "environ" throughout.Christopher Faylor2000-07-165-17/+42
| | | | | | | | (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.
* * acconfig.h: Add support for NEWVFORK.Christopher Faylor2000-07-167-52/+98
| | | | | | | | | * 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.
* * spawn.cc (spawn_guts): Use \ for quoting '"'.Christopher Faylor2000-07-163-17/+29
| | | | * dcrt0.cc (quoted): Understand \ quoting for '"'.
* Slightly more efficient version of previous change.Christopher Faylor2000-07-161-1/+1
|
* * dcrt0.cc (build_argv): Strip quotes from argv[0] since it should never beChristopher Faylor2000-07-163-52/+41
| | | | globified.
* Update comments.Christopher Faylor2000-07-161-15/+14
|
* * dll_init.cc (dll_list::alloc): Round correctly. Use VirtualAlloc sinceChristopher Faylor2000-07-152-7/+23
| | | | | | shared file mapping is unnecessary. (dll_list::detach): Release memory via VirtualFree since there we no longer use shared file mapping.
* * hinfo.cc (hinfo::linearize_fd_array): Make max_used_fd an int so that we canChristopher Faylor2000-07-1513-477/+408
| | | | | | | | | | | | | | | | | | | | 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.