summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add missing ChangeLog entry.Christopher Faylor2005-12-031-0/+1
|
* * cygtls.h (_cygtls::el): New field.Christopher Faylor2005-12-0313-133/+179
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (_cygtls::handle_exceptions): New function declaration. (_cygtls::handle_threadlist_exception): Ditto. (_cygtls::init_exception_handler): Ditto. (_cygtls::init_threadlist_exceptions): Remove arg from declaration. * cygtls.cc (_cygtls::call2): Don't initialize exceptions here. (_cygtls::init_thread): Do it here instead and use member function. (_cygtls::handle_threadlist_exception): Move into _cygtls class. (_cygtls::init_exception_handler): Ditto. Rely on existence of 'el' memmber in _cygtls. (_cygtls::init_threadlist_exceptions): Ditto. * dcrt0.cc (dll_crt0_1): Remove exception_list definition and setting since it now commonly resides in the tls. * exceptions.cc (init_exception_handler): Move to cygtls.cc. (init_exceptions): Ditto. (rtl_unwind): New, safe wrapper function for RtlUnwind. (_cygtls::handle_exceptions): Move to _cygtls. Call rtl_unwind to unwind frames and eliminate copying of structures. Put address of failing instruction in si_addr, not the address on the stack. Return 0 to indicate that we've handled this exception. * external.cc (cygwin_internal): Make CW_INIT_EXCEPTIONS a no-op. * sigproc.cc (wait_sig): Accommodate argument change to _cygtls::init_threadlist_exceptions. * tlsoffsets.h: Regenerate. * include/exceptions.h (exception_list): Add more stuff to the exception list. Apparently windows needs this? (init_exceptions): Remove bogus declaration. * include/cygwin/signal.h (SI_USER): Redefine as zero as per SUSv3. * thread.cc (pthread_kill): Set si_pid and si_uid. * timer.cc (timer_thread): Set si_code to SI_TIMER.
* * dcrt0.cc (getstack): Try harder to modify memory.Christopher Faylor2005-12-022-4/+11
| | | | (alloc_stack): Alloc page prior to stack top, too.
* * devices.h (_major): Revert previous ill-advised change.Christopher Faylor2005-12-022-2/+7
| | | | (_minor): Ditto.
* * exceptions.cc (handle_exceptions): Translate a guard page exception to aChristopher Faylor2005-12-012-1/+10
| | | | "SIGBUS".
* * mmap.cc: Make debug output more consistently. Fix some comments.Corinna Vinschen2005-12-012-36/+51
| | | | | | | | | | | (gen_protect): Convert to inline function. (gen_access): Ditto. (mmap_record::gen_protect): Add create parameter as in global function. (mmap_record::alloc_page_map): Change condition so that always the correct protection setting is set after mapping has been established. (mmap64): For anonymous mappings set offset always to 0. (fixup_mmaps_after_fork): Always call fixup_mmap_after_fork method with the MAP_FIXED flag set.
* * devices.h (_minor): Coerce argument to proper type before manipulating.Christopher Faylor2005-12-015-29/+51
| | | | | | | | | | | | | | | | | | | | | (_major): Ditto. (device::is_fs_special): New function. * fhandler_disk_file.cc (fhandler_base::fstat_helper): Set the size to 0 for devices rather than reporting the size of the symlink. (fhandler_disk_file::readdir): Use is_fs_special to determine if .lnk should be stripped. * path.cc: Rename symlink_info::is_symlink to symlink_info::issymlink throughout. (symlink_info::isdevice): New field. (path_conv::check): Use 'isdevice' to determine if just-parsed entity is a device rather than relying on non-zero major/minor. (symlink_info::parse_device): Set isdevice to true if we've discovered a device. (symlink_info::check): Clear isdevice field prior to processing. Use isdevice to control debugging output. (symlink_info::set): Set isdevice to false. * path.h (path_conv::is_fs_special): New function. * devices.cc: Regenerate.
* 2005-11-30 Shaun Jackman <sjackman@gmail.com>Jeff Johnston2005-11-305-3/+81
| | | | | | | * libnosys/Makefile.in (OBJS): Add chown, readlink, and symlink. * libnosys/chown.c: New file. * libnosys/readlink.c: New file. * libnosys/symlink.c: New file.
* 2005-11-30 Shaun Jackman <sjackman@gmail.com>Jeff Johnston2005-11-303-2/+47
| | | | | | * arm/libcfunc.c (clock, sleep, usleep): New functions. * arm/syscalls.c (_clock): New function. (_times): Call _clock.
* * times.cc (hires_ms::prime): Remove debugging stuff.Christopher Faylor2005-11-302-14/+8
| | | | (hires_ms::usecs): Ditto.
* * mmap.cc (list::try_map): New method, implementing trying to mapCorinna Vinschen2005-11-302-44/+68
| | | | | | | | within another already existing map, moved from mmap64 here. (mmap64): Just call try_map now. (fhandler_dev_zero::fixup_mmap_after_fork): Always create new private map with PAGE_READWRITE protection. (fixup_mmaps_after_fork): Fix comment.
* * include/cygwin/version.h: Bump API minor version.Corinna Vinschen2005-11-292-1/+6
|
* * fhandler.h (fhandler_dev_zero::mmap): Add method.Corinna Vinschen2005-11-294-92/+329
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (fhandler_dev_zero::munmap): Ditto. (fhandler_dev_zero::msync): Ditto. (fhandler_dev_zero::fixup_mmap_after_fork): Ditto. * mmap.cc: Implement anonymous mapping using fhandler_dev_zero class. Implement private anonymous maps using VirtualAlloc/VirtualFree. Fix or add some more comments. (fh_paging_file): Change to type fhandler_dev_zero. (priv): New static inline function to avoid having lots of flag bit tests in the code. Use throughout were appropriate. (fixed): Ditto. (anonymous): Ditto. (noreserve): Ditto. (autogrow): Ditto. (gen_protect): Never generate PAGE_WRITECOPY protection for private anonymous maps. (gen_access): Drop FILE_MAP_EXECUTE handling since it's not supported correctly on 9x. (VirtualProt9x): Move comment from mmap64 here. (mmap_record::mmap_record): Gegerate correct device entry for anonymous maps, though unused right now. (mmap_record::priv): Call global priv function. (mmap_record::fixed): Call global fixed function. (mmap_record::anonymous): Call global anonymous function. (mmap_record::noreserve): Call global noreserve function. (mmap_record::autogrow): Call global autogrow function. (list::anonymous): New method. Use throughout were appropriate. (mmap_record::compatible_flags): Drop now useless ifdef. (mmap_record::alloc_page_map): Accomodate private anonymous maps. (mmap_record::map_pages): Accomodate MAP_NORESERVE mappings. (mmap_record::unmap_pages): Accomodate private anonymous maps. (mmap64): Simplify argument check. Don't remove the MAP_PRIVATE flag for anonymous mappings on 9x anymore since that's now handled gracefully. (mprotect): Accomodate MAP_NORESERVE mappings. Fix case when non-mmap areas are just MEM_RESERVEd. (fhandler_dev_zero::mmap): Implement anonymous mapping here. (fhandler_dev_zero::munmap): Ditto. (fhandler_dev_zero::msyn): Ditto. (fhandler_dev_zero::fixup_mmap_after_fork): Ditto. (fixup_mmaps_after_fork): Accomodate private anonymous maps. Enhance debug output in case VirtualProtect fails. * include/sys/mman.h: Really define MAP_NORESERVE now.
* * autoload.cc (NtCreateSection): Define.Corinna Vinschen2005-11-2816-759/+878
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cygheap.cc (_csbrk): Call getpagesize instead of getshmlba. * dcrt0.cc (dll_crt0_0): Call mmap_init. * external.cc (cygwin_internal): Call getpagesize instead of getshmlba. * fhandler.h (fhandler_base::mmap): Change access to prot parameter. (fhandler_base::fixup_mmap_after_fork): Ditto. (fhandler_disk_file::mmap): Ditto. (fhandler_disk_file::fixup_mmap_after_fork): Ditto. (fhandler_dev_mem::mmap): Ditto. (fhandler_dev_mem::fixup_mmap_after_fork): Ditto. * fhandler_mem.cc (fhandler_dev_mem::write): Call getsystempagesize instead of getpagesize. (fhandler_dev_mem::read): Ditto. (fhandler_dev_mem::fstat): Ditto. (fhandler_dev_mem::mmap): Move to mmap.cc. (fhandler_dev_mem::munmap): Ditto. (fhandler_dev_mem::msync): Ditto. (fhandler_dev_mem::fixup_mmap_after_fork): Ditto. * fhandler_proc.cc (format_proc_meminfo): Call getsystempagesize instead of getpagesize. * fhandler_process.cc (format_process_stat): Ditto. (format_process_status): Ditto. (get_mem_values): Ditto. * mmap.cc: Fix formatting. Try to make more readable and modular. Take advantage of pagesize==granularity. (gen_protect): New static function to evaluate Windows protection bits from POSIX protection and flags. (gen_access): Ditto for Windows access mode. (VirtualProt9x): Wrapper function to call VirtualProtect on 9x. (VirtualProtNT): Ditto for NT. (VirtualProtEx9x): Ditto for VirtualProtectEx on 9x. (VirtualProtExNT): Ditto for NT. (CreateMapping9x): Wrapper function for creating a mapping handle on 9x. (CreateMappingNT): Ditto for NT. (MapView9x): Wrapper function to map a view on 9x. (MapViewNT): Ditto for NT. (mmap_funcs_9x): Structure containing function pointers to wrapper functions for 9x. (mmap_funcs_nt): Ditto for NT. (mmap_func): Pointer to wrapper functions used in subsequent code. (mmap_init): Initialize mmap_func depending on OS. (class mmap_record): Use sensible member names. Add POSIX protection member. Drop Windows access flags member. Constify more methods. Use accessors instead of direct member access inside of own methods. (mmap_record::gen_protect): Class wrapper to evaluate matching Windows protection bits. (mmap_record::gen_access): Ditto for Windows access flags. (mmap_record::compatible_flags): New function to check if flags are compatible with flags of existing map. (list::add_record): Drop offset and length arguments. (class map): Change counters to unsigned. Match usage throughout. (mmapped_areas): Convert from pointer to global struct. (mmap_record::alloc_page_map): Simplify. (mmap_record::map_pages): Ditto. (mmap_record::fixup_page_map): Delete. (mmap64): Simplify. Add workaround for Windows 98 bug. Fix bug on NT that existing anonymous mappings weren't searched for a match. (munmap): Add workaround for Windows 98 bug. (msync): Simplify. (mprotect): Handle existing maps correctly. (mlock): Add local pagesize variable and enlightening comment. (fhandler_disk_file::mmap): Main functionality now in CreateMapping/ MapView wrapper functions. (fhandler_disk_file::fixup_mmap_after_fork): Call MapView wrapper. (fhandler_dev_mem::mmap): Moved from fhandler_mem.cc. Simplify by calling MapViewNT. (fhandler_dev_mem::munmap): Moved from fhandler_mem.cc. (fhandler_dev_mem::msync): Ditto. (fhandler_dev_mem::fixup_mmap_after_fork): Ditto. Call MapViewNT. (fixup_mmaps_after_fork): Restructure and hopefully speed up loop for setting protection and memory content on MAP_PRIVATE maps. * ntdll.h (AT_ROUND_TO_PAGE): Remove define. (AT_EXTENDABLE_FILE): Add define. (NtCreateSection): Add prototype. * syscalls.cc (getpagesize): Return granularity as pagesize now. (getsystempagesize): New function to retrieve "real" pagesize. (getshmlba): Delete since it's replaced by getpagesize now. * wincap.h (wincaps::has_mmap_alignment_bug): New element. * wincap.cc: Implement above element throughout. * winsup.h (getshmlba): Drop prototype. (getsystempagesize): Add prototype. (mmap_init): Ditto. * include/sys/mman.h: (Not yet) define MAP_NORESERVE.
* * fhandler_disk_file.cc (fhandler_base::fstat_helper): Don't rely onCorinna Vinschen2005-11-282-2/+12
| | | | | has_acl() state for evaluating inodes. Temporarily(?) enable "real" inodes for remote drives.
* Fix changelog typo.Daniel Jacobowitz2005-11-281-1/+1
|
* * heap.cc: Remove spurious getpagesize declaration.Christopher Faylor2005-11-253-3/+15
| | | | | * exceptions.cc (ctrl_c_handler): Distinguish CTRL-BREAK from CTRL-C in some cases.
* * autoload.cc (CloseWindowStation): Define.Christopher Faylor2005-11-241-0/+1
|
* * fhandler_tty.cc (fhandler_tty_slave::open): Reset the current windows stationChristopher Faylor2005-11-244-1/+16
| | | | | | | whenever ctty == -1 regardles of whetehr there's a windows station already assigned. Close the old windows station in this situation. * pinfo.cc (_pinfo::set_ctty): Reinstate incrementing of console count when recording ctty so that the current tty is always around.
* * Makefile.in: Link cygcheck with libwininet.a.Christopher Faylor2005-11-225-38/+272
| | | | | | | | | | | | | | * cygcheck.cc: Add includes. (grep_packages): New global variable. (display_internet_error): New function. (safe_chars): New global variable. (base_url): Ditto. (package_grep): New function. (usage): Reword --help output for clarity. Document new argument. (longopts): Add 'package-query' option. (opts): Add 'p' option, reorder to be consistent with 'longopts'. (main): Accommodate new option. * utils.sgml (cygcheck): Update --help output. Document new -p option.
* * strptime.cc (_strptime): Fix gcc warnings.Christopher Faylor2005-11-182-0/+6
|
* * memmem.cc: Move from here.Christopher Faylor2005-11-181-0/+5
| | | | * lib/memmem.cc: Move to here.
* 2005-11-18 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2005-11-182-3/+13
| | | | | * libc/time/strptime.c (strptime): Don't abort for %c and %Z. Treat %c as "%a %b %e %H:%M:%S %Y" and ignore %Z.
* * libc: Add subdirectory.Corinna Vinschen2005-11-189-6/+761
| | | | | | | | | | | | | * Makefile.in (VPATH): Add libc subdir. (DLL_OFILES): Add strptime.o and timelocal.o. * cygwin.din: Export timelocal and timegm. * localtime.cc: Define STD_INSPIRED unconditionally. * include/cygwin/time.h (timelocal): Add declaration. (timegm): Ditto. * include/cygwin/version.h: Bump API minor version. * libc/strptime.cc: New file. * libc/timelocal.cc: New file. * libc/timelocal.h: New file.
* * libc/include/ieeefp.h: Add C++ guards.Corinna Vinschen2005-11-182-0/+9
|
* * include/cygwin/sys_time.h: Move futimes and lutimes declaration here fromChristopher Faylor2005-11-182-1/+8
| | | | newlib.
* * include/sys/time.h: Move more cygwin stuff to cygwin-specific header.Christopher Faylor2005-11-182-4/+4
|
* * include/time.h: Remove more cygwin-specific stuff.Christopher Faylor2005-11-182-18/+4
|
* * times.cc (timezone): Put back (void).Christopher Faylor2005-11-183-1/+20
| | | | * include/cygwin/time.h: Add more cygwin stuff from newlib.
* * include/time.h: Move cygwin declarations to cygwin-specific header.Christopher Faylor2005-11-183-11/+10
| | | | * include/sys/time.h: Rename cygwin include to "sys_time.h".
* * include/cygwin/sys_time.h: Rename from include/cygwin/time.h.Christopher Faylor2005-11-183-4/+34
| | | | * include/cygwin/time.h: New file.
* 2005=11-18 Brian Gunlogson <gmb300@users.sourceforge.net>Danny Smith2005-11-181-0/+8
| | | | | | | | * include/winuser.h (GetClassLongPtr{AW}): Add prototypes. (SetClassLongPtr{AW}): Likewise. (GCLP_*): Add GetClassLongPtr defines. * lib/user32.def (GetClassLongPtr{AW}): Add stubs. (SetClassLongPtr{AW}): Likewise.
* 2005=11-18 Brian Gunlogson <gmb300@users.sourceforge.net>Danny Smith2005-11-182-0/+19
| | | | | | | | * include/winuser.h (GetClassLongPtr{AW}): Add prototypes. (SetClassLongPtr{AW}): Likewise. (GCLP_*): Add GetClassLongPtr defines. * lib/user32.def (GetClassLongPtr{AW}): Add stubs. (SetClassLongPtr{AW}): Likewise.
* 2005-11-17 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2005-11-175-150/+160
| | | | | | | | | * libc/sys/linux/dl/dl-local.h: New file based on old dlfcn.h in libc/sys/linux/include. * libc/sys/linux/dl/dlfcn.h: Moved to libc/sys/linux/include. * libc/sys/linux/dl/ldsodefs.h: Include dl-local.h instead of dlfcn.h. * libc/sys/linux/include/dlfcn.h: Replaced with dlfcn.h formerly in libc/sys/linux/dl.
* 2005-11-17 Shaun Jackman <sjackman@gmail.com>Jeff Johnston2005-11-172-4/+6
| | | | | * libgloss/arm/libcfunc.c (isatty): Call _isatty. GDB now supports the IsTTY SWI that _isatty calls.
* * fork.cc (fork): Move top-of-stack calculation later.Christopher Faylor2005-11-173-8/+16
| | | | | * pinfo.cc (_pinfo::set_ctty): Use __ctty to print current console in debugging output.
* * fhandler_tty.cc (fhandler_tty_slave::open): Don't expect thatCorinna Vinschen2005-11-172-7/+15
| | | | service applications have no window station attached.
* * cris/linunistd.h: Don't redefine errno as extern int.Hans-Peter Nilsson2005-11-172-2/+4
|
* * times.cc (hires_ms::prime): Don't escalate the priority.Christopher Faylor2005-11-162-6/+10
|
* * include/sys/elf64.h: Fix types to reflect linux usage.Christopher Faylor2005-11-143-38/+47
|
* * fhandler.h (fhandler_console::fixup_after_fork_exec): Define with additionalChristopher Faylor2005-11-143-9/+20
| | | | | | | | | bool parameter. (fhandler_console::fixup_after_exec): Accommodate fixup_after_fork_exec's parameter. (fhandler_console::fixup_after_fork): Ditto. * fhandler_console.cc (fhandler_console::fixup_after_fork_exec): Avoid opening new console only when close_on_exec AND execing.
* * fhandler.h (fhandler_console::fixup_after_fork_exec): Declare new function.Christopher Faylor2005-11-146-40/+24
| | | | | | | | | | | (fhandler_console::fixup_after_fork): Use fixup_after_fork_exec. (fhandler_console::fixup_after_exec): Ditto. * fhandler_console.cc (fhandler_console::fixup_after_fork): Delete definition. (fhandler_console::fixup_after_fork_exec): Rename from fixup_after_exec. * pinfo.cc (_pinfo::set_ctty): Don't play with console count here. * syscalls.cc (close_all_files): Don't close cygheap ctty if hExeced since the child will be copying information from us. (setsid): Use myctty() rather than raw ctty #.
* * cygheap.h (init_cygheap::manage_console_count): Declare new function.Christopher Faylor2005-11-1418-71/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (init_cygheap::console_count): Renamed from open_fhs. Make private. * cygheap.cc (init_cygheap::manage_console_count): Define new function. * dtable.cc (dtable::fixup_after_exec): Always call fixup_after_exec on elements of fd even when they are about to be closed. * fhandler.h (report_tty_counts): Remove open_fhs from debugging output. * fhandler_console.cc (fhandler_console::open): Use manage_console_count rather than manipulating count directly. (fhandler_console::close): Ditto. (fhandler_console::fixup_after_fork): Ditto. (fhandler_console::fixup_after_exec): Ditto. Don't close handles if close_on_exec. * fhandler_tty.cc (fhandler_tty_slave::open): Use manage_console_count() rather than manipulating count directly. Reflect change in arguments to report_tty_counts(). (fhandler_tty_slave::close): Ditto for both. (fhandler_tty_slave::dup): Ditto for both. (fhandler_tty_slave::ioctl): Use myctty() rather than raw ctty #. (fhandler_tty_slave::fixup_after_fork): Reflect change in arguments to report_tty_counts(). (fhandler_tty_master::init_console): Use manage_console_count() rather than manipulating count directly. * fhandler_clipboard.cc (fhandler_dev_clipboard::fixup_after_exec): Don't perform any operations if close_on_exec. * fhandler_dsp.cc (fhandler_dev_dsp::fixup_after_exec): Ditto. * fhandler_raw.cc (fhandler_dev_raw::fixup_after_exec): Ditto. * fhandler_serial.cc (fhandler_serial::fixup_after_exec): Ditto. * pinfo.h (_pinfo::_ctty): Declare new function. (myctty): Declare new macro. (__ctty): Declare new macro. * pinfo.cc (_pinfo::_ctty): Define new function. (_pinfo::set_ctty): Use manage_console_count() rather than manipulating count directly. * signal.cc (kill_pgrp): Use myctty() and __ctty() macros rather than raw ctty #. * syscalls.cc (setsid): Ditto. Use manage_console_count() rather than manipulating count directly.
* * mips.h: Assign 'm'/'M' codes to MIPS16e save/restoreThiemo Seufer2005-11-142-1/+14
| | | | | | | | | | | | | | | | | instructions. Define MIPS16_ALL_ARGS and MIPS16_ALL_STATICS for save/restore encoding of the args field. * mips16-opc.c: Add MIPS16e save/restore opcodes. * mips-dis.c (print_mips16_insn_arg): Handle printing of 'm'/'M' codes for save/restore. * config/tc-mips.c (mips16_ip): Add handling of 'm' and 'M' codes for the MIPS16e save/restore instructions. * gas/mips/mips.exp: Run new save/restore tests. * gas/testsuite/gas/mips/mips16e-save.s: New test for generating different styles of save/restore instructions. * gas/testsuite/gas/mips/mips16e-save.d: New.
* * fhandler_socket.cc (fhandler_socket::recvfrom): Just return 0 (EOF)Corinna Vinschen2005-11-133-2/+22
| | | | | | in case of WSAESHUTDOWN. (fhandler_socket::recvmsg): Ditto. * poll.cc (poll): Set revents to POLLIN instead of POLLHUP. Add comment.
* * include/commdlg.h (OPENFILENAMEW): Add members forDanny Smith2005-11-122-4/+16
| | | | | _WIN32_WINNT >= 0x0500. (OPENFILENAMEA): Modify whitespace. Ansify comment.
* * include/wingdi.h (GetICMProfile{AW}): Correct prototype.Danny Smith2005-11-122-2/+8
| | | | Thanks to: Paul J Lucas
* * Makefile.def: Remove gdb dependencies for gdbtk.Daniel Jacobowitz2005-11-116-64/+76
| | | | | | | * Makefile.tpl (CONFIGURE_GDB_TK, INSTALL_GDB_TK): New variables. (configure-gdb, install-gdb): New rules. * configure.in: Set CONFIGURE_GDB_TK and INSTALL_GDB_TK. * Makefile.in, configure: Regenerated.
* * cygheap.h (init_cygheap::_gtod): Remove.Christopher Faylor2005-11-118-58/+145
| | | | | | | | | | | | | | | | | | | | | | | * cygwin.din: Export clock_getres and clock_setres. * hires.h (hires_ms::minperiod): Delete declaration. (hires_ms::began_period): Ditto. (hires_ms::prime): Make void. (hires_ms::resolution): Just define here. (hires_ms::usecs): Remove unneeded argument. (gtod): Redeclare as a variable. * timer.cc (timer_thread): Eliminate argument to gtod.usecs(). (timer_tracker::gettime): Ditto. (timer_tracker::settime): Ditto. * times.cc (gettimeofday): Ditto. (hires_ms::began_period): Delete declaration. (hires_us::prime): Remove debugging. (hires_ms::prime): Make void. Eliminate period stuff. (hires_ms::usecs): Eliminate argument to gtod.usecs(). (hires_ms::resolution): New function. (clock_getres): Ditto. (clock_setres): Ditto. * version.h: Bump API version to 143. * include/cygwin/time.h: New file.
* * libc/include/sys/time.h: For cygwin, use general header rather than specificChristopher Faylor2005-11-112-1/+6
| | | | "sys/select.h".