summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin
Commit message (Collapse)AuthorAgeFilesLines
...
* * mmap.cc (class list): Add member `hash'.Corinna Vinschen2001-02-082-8/+25
| | | | | | | | (list::list): Initialize `hash'. (list::get_list_by_fd): Use filepath hash value to get the correct mapping list if it's not an anonymous mapping. (map::add_list): Initialize `hash' with filepath hash value. (mmap): Check for reusing a mapping only on MAP_SHARED.
* * signal.cc (killpg): Correct first argument.Christopher Faylor2001-02-072-1/+5
|
* * autoload.cc: Add LoadDLLinitfunc for iphlpapi.dll.Corinna Vinschen2001-02-076-163/+263
| | | | | | | | | | | | | | | | | | | | Add LoadDLLfuncEx statements for GetIfTable@12 and GetIpAddrTable@12. * fhandler_socket.cc (fhandler_socket::ioctl): Move variable definitions to the beginning of the function to allow better debugging. Add handling for SIOCGIFHWADDR, SIOCGIFMETRIC and SIOCGIFMTU. * net.cc: Include iphlpapi.h. (get_2k_ifconf): Rewritten. Uses IP Helper API now. (get_nt_ifconf): Add handling for SIOCGIFHWADDR, SIOCGIFMETRIC and SIOCGIFMTU. (get_95_ifconf): Ditto. Renamed from `get_9x_ifconf'. (get_ifconf): Name loopback `lo' instead of `lo0' as in Linux. Add handling for SIOCGIFHWADDR, SIOCGIFMETRIC and SIOCGIFMTU. Call `get_95_ifconf' only on Windows 95, `get_nt_ifconf' only on Windows NT < Service Pack 3, `get_2k_ifconf otherwise. * include/asm/socket.h: Add defines for SIOCGIFHWADDR, SIOCGIFMETRIC and SIOCGIFMTU. * include/cygwin/if.h: Add `ifr_hwaddr', `ifr_metric' and `ifr_mtu'. (struct ifreq): Add `ifru_hwaddr'.
* * syscalls.cc (stat_worker): Add a check for the special case whenCorinna Vinschen2001-02-062-18/+47
| | | | a process creates a file using mode 000 using ntsec.
* * fhandler.cc (fhandler_base::open): Always add GENERIC_READ accessCorinna Vinschen2001-02-054-6/+101
| | | | | | | | | | when opening raw disk devices. * fhandler_floppy.cc (fhandler_dev_floppy::lseek): Implement bytewise access. * fhandler_raw.cc (fhandler_dev_raw::open): Always open raw disk device binary. (fhandler_dev_raw::raw_write): Don't drop read buffer content when writing after read.
* * mmap.cc (mmap_record::fixup_map): New method to duplicateCorinna Vinschen2001-02-052-45/+83
| | | | | | | | | the memory protection in a just forked child. (mmap): Realign gran_len to page boundary only on anonymous mapping before saving in the mmap_record. (munmap): Cleanup code. (msync): Ditto. (fixup_mmaps_after_fork): Ditto. Call mmap_record::fixup_map now.
* * cygheap.cc (creturn): Correctly calculate cygheap_max.Christopher Faylor2001-02-022-2/+7
|
* * shared.cc (shared_info::initialize): Reduce size of heap.Christopher Faylor2001-01-312-1/+5
|
* * include/sys/resource.h: Fix typo.Corinna Vinschen2001-01-312-2/+6
|
* * include/sys/resources.h: Add RLIMIT_NLIMITS and RLIM_NLIMITS.Corinna Vinschen2001-01-312-0/+7
|
* * include/cygwin/version.h: Bump version to 1.3.0.Christopher Faylor2001-01-302-3/+7
|
* * pinfo.cc (pinfo::init): Use INVALID_HANDLE_VALUE instead ofCorinna Vinschen2001-01-303-3/+9
| | | | | explicit cast (HANDLE) 0xffffffff. * shared.cc (open_shared): Ditto.
* * fhandler_serial.cc (raw_write): Use local copy of OVERLAPPED structureChristopher Faylor2001-01-302-7/+15
| | | | instead of shared structure to fix a race condition between read/write.
* * mmap.cc (mmap): Remove obsolete check for MAP_SHARED|MAP_ANON asCorinna Vinschen2001-01-292-12/+7
| | | | being invalid.
* * mmap.cc (mmap_record::find_empty): Fix loop condition.Corinna Vinschen2001-01-292-1/+5
|
* * syscalls.cc (_link): Make sure that newpath does not exist. Set errno if itChristopher Faylor2001-01-298-59/+88
| | | | | | | | | | | | | | | does. * cygheap.cc (init_cheap): Don't specify a load address for the heap. It doesn't work on #!*& Windows 9x. (cygheap_init): Move GetUserName to memory_init. * dcrt0.cc (dll_crt0_1): Call new memory_init functin, eliminate call to heap_init. * heap.cc (heap_init): Improve error output. * heap.h: Correct some declarations. * shared.cc (mount_table_init): Remove. (memory_init): Renamed from shared_init. Reorganize to accomodate strange Windows 9x problems with cygheap/heap interaction. * shared_info.h: Rename shared_init to memory_init.
* * include/cygwin/version.h: Bump API version.Christopher Faylor2001-01-282-1/+6
|
* * cygheap.cc (init_cheap): Move username initialization.Christopher Faylor2001-01-284-15/+51
| | | | | | | | | | | | | (cygheap_init): Here. * shared_info.h (mount_info): Add a sys_mount_table_counter field. (shared_info): Ditto. * path.cc (mount_info::conv_to_win32_path): Check that our mount table is in sync with the system mount table and reinitialize it if not. (mount_info::add_reg_mount): Bump sys_mount_table counters if the system mount table changes. (mount_info::del_reg_mount): Ditto. (mount_info::write_cygdrive_info_to_registry): Ditto. (mount_info::remove_cygdrive_info_from_registry): Ditto.
* Throughout, change 'cygwin_shared.mount' to 'mount_table'.Christopher Faylor2001-01-2821-211/+265
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * child_info.h (child_info): Move shared_h, console_h to cygheap. Add mount_h. * cygheap.h (init_cygheap): Add shared_h, console_h. * cygheap.cc (init_cheap): Initialize heap at a fixed location after the shared memory regions. Initialize cygheap->user name here. * dcrt0.cc (dll_crt0_1): Call getpagesize () to initialize constants. Remove cygheap_init since it is done in shared_init now. (_dll_crt0): Initialize mount_h, remove shared_h and console_h initialization. * fhandler_console.cc (console_shared_h): Eliminate. (get_tty_stuff): Use cygheap->console_h rather than console_shared_h. * heap.cc (heap_init): Use page size constant calculated earlier in initialization. * shared.cc: Eliminate cygwin_shared_h. Add cygwin_mount_h. (mount_table_init): New function for initializing a user mount table. (open_shared_file_map): Use constant for shared memory region. Initialize cygheap and mount table here. (open_shared): Improve debugging output. (shared_info::initialize): Eliminate call to mount.init. (shared_terminate): Use cygheap->shared_h. Close cygwin_mount_h. (open_shared_file_map): Eliminate. * shared_info.h (mount_info): Add a version field. (shared_align_past): New macro for calculating location for shared memory regions. * sigproc.cc (init_child_info): Eliminate shared_h, console_h. * spawn.cc (spawn_guts): Pass on cygwin_mount_h iff not a different user. * syscalls.cc (system_info): New global holding system memory defaults. (getpagesize): Use system_info. * uinfo.cc (internal_getlogin): Only fill in user name if nonexistent. * winsup.h: Declare system_info. * passwd.cc (read_etc_passwd): Use cygheap->user.name () rather than retrieving the name again.
* * path.cc (path_conv::check): Detect when path has symlinks.Christopher Faylor2001-01-272-5/+26
| | | | | (symlink_info::check): Remove debugging stuff. (chdir): Use posix'ized win32 path if cd'ed to a path using symlinks.
* Fix typos. Add some comments.Christopher Faylor2001-01-271-4/+6
|
* * exceptions.cc (sigreturn): Call any pending signals prior to resetting theChristopher Faylor2001-01-272-9/+27
| | | | | | signal mask so that stacked signals behave correctly. (sigdelayed): Avoid a race where a signal could end up calling an incorrect signal handler if two signals come in close together.
* * mmap.cc (fhandler_disk_file::mmap): Call CreateFileMapping withCorinna Vinschen2001-01-242-2/+12
| | | | len != 0 only when performing an anonymous mapping.
* * path.h: Add a new constant.Christopher Faylor2001-01-222-34/+10
| | | | * syscalls.cc (_read): Oscillate errno check.
* * include/cygwin/version.h: Bump API to reflect setlogmask.Christopher Faylor2001-01-225-11/+45
|
* * cygwin.din: Add export for setlogmask().Christopher Faylor2001-01-223-3/+6
| | | | * syslog.cc (setlogmask): New function.
* * resource.cc (setrlimit): Support RLIMIT_NOFILE.Corinna Vinschen2001-01-182-0/+9
|
* * syscalls.cc (setdtablesize): Call with amount to increment not total amount.Christopher Faylor2001-01-182-3/+10
| | | | Return success or failure error code.
* * autoload.cc (LoadDLLinitfunc): Remove debugging statement.Christopher Faylor2001-01-1713-65/+109
| | | | | | | | | | | | | | | | | | * exceptions.cc (sig_handle_tty_stop): Move setting of PID_STOPPED to earlier in interrupt. ((interrupt_setup): i.e., here. (sig_handle): Don't queue multiple SIGSTOPS. * fhandler.h (bg_check_types): Enumerate return value of bg_check for clarity. * signal.cc (kill_pgrp): Minor cleanup. * fhandler_termios.cc (fhandler_termios::bg_check): Use enumerated type for function return. Don't raise signal if a signal is already queued. * fhandler_console.cc (fhandler_console::read): Use enumerated return type for bg_check. * select.cc: Ditto, throughout. * read.cc: Ditto, throughout. * termios.cc: Ditto, throughout. (_read): YA interrupt detect simplification. * wait.cc (wait4): Ditto.
* * cygheap.cc (cygheap_user::~cygheap_user): TemporarilyCorinna Vinschen2001-01-172-0/+7
| | | | disable free'ing memory.
* * mmap.cc (mmap): Initialize fh to avoid compiler warnings.Corinna Vinschen2001-01-162-1/+5
|
* * wait.cc (wait4): Rename variable for consistency. Allow restartable signalChristopher Faylor2001-01-162-14/+22
| | | | behavior.
* * mmap.cc (mmap): Add more parameter checking. Change error outputCorinna Vinschen2001-01-152-27/+47
| | | | in case of EINVAL. Treat mmapping /dev/zero like MAP_ANONYMOUS.
* * mmap.cc: include <unistd.h>. Define some bit operations forCorinna Vinschen2001-01-152-33/+265
| | | | | | | | | | | | | | | | | the new page map. (mmap_record): Change type of base_address_ to caddr_t. Add map_map_ member. Add several methods to manipulate map_map_. (mmap_record::alloc_map): New method. (mmap_record::free_map): Ditto. (mmap_record::find_empty): Ditto. (mmap_record::map_map): Ditto. (mmap_record::unmap_map): Ditto. (list::add_record): Change return type to `mmap_record *'. Allocate page map. (list::match): New method. (mmap): Partly rewritten to take care for the new page map. Add some parameter checking. (munmap): Ditto.
* * heap.cc (heap_init): Fix extern declaration of getpagesize.Corinna Vinschen2001-01-153-4/+9
| | | | * syscalls.cc (getpagesize): Fix another typo.
* * syscalls.cc (getpagesize): Save pagesize in global variable toCorinna Vinschen2001-01-153-9/+18
| | | | | | avoid calling GetSystemInfo too often. * heap.cc (getpagesize): Eliminate. (heap_init): Use getpagesize function from syscalls.cc.
* * sysconf.cc (sysconf): return `getpagesize ()' on _SC_PAGESIZECorinna Vinschen2001-01-152-5/+6
| | | | request to avoid implementing the same twice.
* * syscalls.cc (_read): Use more lightweight method for determining if read hasChristopher Faylor2001-01-142-2/+6
| | | | been interrupted by a signal.
* * debug.h: Add regparm attributes to some functions.Christopher Faylor2001-01-128-8/+43
| | | | | | | | | | | | * signal.cc (sigaction): Don't treat SIGCONT specially. * exceptions.cc (interrupt_setup): Save sa_flags of interrupted signal for later use. (sig_handler): Default any stopping signal to SIGSTOP. (call_signal_handler): New function. (sigdelayed0): New function. * sigproc.cc (sigproc_init): Initialize SIGSTOP sigaction for special behavior. * sigproc.h: Define call_signal_handler. * syscalls.cc (_read): Allow restartable signal behavior.
* * fhandler.h (fhandler_base): New method `fixup_mmap_after_fork'.Corinna Vinschen2001-01-114-17/+109
| | | | | | | | | | | | | | | | | (fhandler_disk_file: Ditto. (fhandler_dev_mem): Ditto. * fhandler_mem.cc (fhandler_dev_mem::open): Set OBJ_INHERIT attribute for device\physicalmemory handle. (fhandler_dev_mem::mmap): Ditto. * fhandler_mem.cc (fhandler_dev_mem::fixup_mmap_after_fork): New method. * mmap.cc (mmap_record): Add private `fdesc_' member. Change constructor accordingly. (get_fd): New method. (mmap): Use new mmap_record constructor. (fhandler_base::fixup_mmap_after_fork): New method. (fhandler_disk_file::fixup_mmap_after_fork): Ditto. (fixup_mmaps_after_fork): Call `fixup_mmap_after_fork' of appropriate fhandler class.
* * sigproc.cc (wait_sig): Allow SIGCONT when stopped.Christopher Faylor2001-01-102-1/+5
|
* Patch suggested by Ren� M�ller Fonseca <fonseca@mip.sdu.dk>Corinna Vinschen2001-01-093-4/+10
| | | | | * include/sys/socket.h: Change prototype to have 2nd parameter `const'. * net.cc (cygwin_bind): Change 2nd parameter to `const'.
* * pinfo.cc (codepage_init): Move function.Christopher Faylor2001-01-0817-52/+60
| | | | | | | | | * environ.cc (codepage_init): To here. * exceptoins.cc (SIG_NONMASKABLE): Remove SIGCONT from consideration since it is supposed to be maskable. * signal.cc (sigaction): Ditto. * sigproc.cc (wait_sig): Ditto. * winsup.h: Eliminate global declaration of codepage_init.
* * resource.cc (getrlimit): Set errno on EFAULT instead of returning it.Corinna Vinschen2001-01-052-3/+33
| | | | | | | | (setrlimit): Ditto. Patch by David Sainty <David.Sainty@optimation.co.nz>: * resource.cc (setrlimit): Prevent failing with an error when the operation would not have changed anything.
* * thread.cc: Need LONG_MAX definition.Christopher Faylor2001-01-042-0/+5
|
* * thread.cc (MTinterface::CreateSemaphore): Correctly set semaphore max.Christopher Faylor2001-01-032-1/+6
|
* * fhandler_console.cc (fhandler_console::read): Restore missing test for codeChristopher Faylor2001-01-032-1/+6
| | | | page before doing OemToCharBuff.
* Wed Jan 3 09:20:20 2001 Jason Tishler <jt@dothill.com>Christopher Faylor2001-01-033-4151/+4155
| | | | | * include/cygwin/version.h: Fix typo in CYGWIN_VERSION_DLL_COMBINED macro.
* * cygwin.din: Add symbols for `getrlimit' and `setrlimit'.Corinna Vinschen2000-12-276-1/+102
| | | | | | | | | | | | * 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'.
* * autoload.h: Make DLL initializers global to avoid inlining.Christopher Faylor2000-12-264-14/+30
| | | | | | | | * exceptions.cc (interrupt_setup): Reorganize arguments to allow use of regparm. (interrupt_now): Ditto. (interrupt_on_return): Ditto. (call_handler): Ditto.