summaryrefslogtreecommitdiffstats
path: root/winsup
Commit message (Collapse)AuthorAgeFilesLines
* * net.cc (get_flags): New static function to generate interface flagsCorinna Vinschen2009-06-152-115/+300
| | | | | | | | | | | | value. (get_ipv4fromreg_ipcnt): New static function to fetch number of configured IPv4 addresses for a given NIC from registry. (get_ipv4fromreg): New static function to fetch configured IPv4 addresses for a given NIC from registry. (get_friendlyname): New static function to generate friendly name. (get_hwaddr): New static function to copy hardware address. (get_xp_ifs): Restructure slightly. Add code to generate IPv4 entries entries for interfaces which are disconnected.
* * errno.cc (errmap): Add mapping for ERROR_IO_INCOMPLETE.Christopher Faylor2009-06-145-16/+47
| | | | | | | | | | | | | * fhandler.cc (fhandler_base::fcntl): Fix comment. (fhandler_base::wait_overlapped): Accept an optional len parameter. Use the len parameter when WriteFile fails with ERROR_IO_PENDING. Make debug output less alarming. (fhandler_base::write_overlapped): Pass len to wait_overlapped. * fhandler.h (fhandler_base::wait_overlapped): Add an optional argument denoting the number of characters intended to be written. * fhandler_tty.cc (fhandler_pty_master::close): Don't close archetype handles when cygwin is still initializing since the handles aren't actually opened at that point.
* * localtime.cc (time2): Take another stab at fixing a compiler warning.Corinna Vinschen2009-06-142-1/+5
|
* * localtime.cc (time2): Take a stab at fixing a compiler warning.Christopher Faylor2009-06-142-1/+5
|
* * fhandler.cc (fhandler_base::wait_overlapped): Honor nonblocking flag forChristopher Faylor2009-06-144-7/+21
| | | | | | writes. Don't reset event handle when we see a ERROR_IO_PENDING. * sigproc.cc (stopped_or_terminated): Use bool constants for consistency. * wait.cc (wait4): Remove nonsensical comment.
* * fhandler_socket.cc (fhandler_socket::recv_internal): Set namelenCorinna Vinschen2009-06-132-1/+11
| | | | pointer to NULL if name pointer is NULL. Explain why.
* * faq-using.xml (faq.using.emacs): Update.Corinna Vinschen2009-06-122-2/+12
|
* * localtime.cc (time2): Change "spring gap" to "spring forward gap"Corinna Vinschen2009-06-122-5/+10
| | | | in comment.
* * localtime.cc (time2): Add workaround for spring gap problem. AddCorinna Vinschen2009-06-122-1/+27
| | | | explaining comment.
* * Makefile.in (SUBLIBS): Add librt.a.Corinna Vinschen2009-06-122-1/+9
| | | | (librt.a): New rule to build librt.a.
* Improve ChangeLog entry. Fix posix_ipc.cc copyrightCorinna Vinschen2009-06-122-2/+3
|
* * posix_ipc.cc (check_path): Fix typo in comment. Align namingCorinna Vinschen2009-06-122-4/+17
| | | | convention rules to Linux. Add comment.
* * path.cc (oopts): Sort alphabetically, add missing "auto" andCorinna Vinschen2009-06-102-31/+70
| | | | | | | | | | | "override" entries. (from_fstab_line): Handle mount points same as Cygwin itself. Use "cygdrive prefix" as posix name of cygdrive prefix. (from_fstab): Add auto entries for /usr/bin and /usr/lib. Add MOUNT_AUTOMATIC and MOUNT_IMMUTABLE flags to default root dir entry. Use "cygdrive prefix" as posix name of default cygdrive prefix. (getmntent): Allocate smaller buffers. Align output closer to output of mount(1).
* * autoload.cc (GetSystemTimes): Remove.Corinna Vinschen2009-06-093-35/+44
| | | | | | | | | | * fhandler_proc.cc (format_proc_uptime): Use global system_info rather than retrieving a local copy of the SYSTEM_INFO. Drop call to GetSystemTimes and retrieve SystemPerformanceInformation on all systems again with buffer size big enough for 64 bit systems. (format_proc_stat): Use global system_info rather than retrieving a local copy of the SYSTEM_INFO. Retrieve SystemPerformanceInformation with buffer size big enough for 64 bit systems.
* Fix ChangeLog entryCorinna Vinschen2009-06-081-1/+1
|
* * autoload.cc (GetSystemTimes): Define.Corinna Vinschen2009-06-083-39/+61
| | | | | | | | | * fhandler_proc.cc (format_proc_uptime): Use GetSystemInfo to retrieve processor count. Use GetSystemTimes when available to retrieve system idle time. Improve debug output. (format_proc_stat): Use GetSystemInfo to retrieve processor count. Improve debug output. Ignore if SystemPerformanceInformation returns error. Explain why.
* * fork.cc (frok::parent): Remove ancient code erroneously flushingCorinna Vinschen2009-06-082-4/+5
| | | | stdout descriptor.
* * cygerrno.h (save_errno::~save_errno): Set errno directly to avoidCorinna Vinschen2009-06-082-1/+6
| | | | flooding debug output.
* * path.cc (symlink_info::check): Return with error set to ENOENT ifCorinna Vinschen2009-06-082-1/+7
| | | | STATUS_NO_MEDIA_IN_DEVICE is returned.
* * cygheap.h (mini_cygheap): New struct.Christopher Faylor2009-06-089-185/+104
| | | | | | | | | | | | | | | | | | | | | | | | | (init_cygheap): Inherit locale field via mini_cygheap. * cygheap.cc (cygheap_at_start): Define new variable. (cygheap): Initialize as cygheap_at_start so that locale information is always available. (cygheap_init): Initialize cygheap iff it is set to cygheap_at_start. * shared_info.h (memory_init): Accommodate argument change. * memory.cc (memory_init): Accept an argument indicating whether cygheap should be initialized or not. * dcrt0.cc (child_info_fork::handle_fork): Pass false to memory_init(). (child_info_spawn::handle_spawn): Ditto. (dll_crt0_0): Pass true to memory_init when not forking or execing. * cygheap.h (cygheap_types::HEAP_2_DLL): New enum. * dll_init.h (dll): Remove unused namelen field. (dll_list::load_after_fork): Accommodate change in arguments. * dll_init.cc (dll_list::alloc): Allocate dll information in the cygwin heap. (dll_list::detach): Free dll information from the cygwin heap. (dll_list::load_after_fork): Use dll information in the cygwin heap directly rather than querying parent. * fork.cc (frok::first_dll): Delete. (frok::child): Don't report on first_dll. Don't pass it to load_on_fork. (frok::parent): Don't set first_dll. (fork): Ditto.
* * include/ddk/ntapi.h: Add NtXxx equivalent to ZwXxx where missingCorinna Vinschen2009-06-075-12/+2029
| | | | | | | | | and vice versa. * include/ddk/ntifs.h: Ditto. * include/ddk/winddk.h: Ditto. * lib/ntdll.def (NtPlugPlayControl, NtQueryInstallUILanguage, ZwPlugPlayControl, ZwQueryInstallUILanguage): Add entry points defined in header, but missing in lib. Omit NT4-only entry points.
* * dll_init.cc (dll_list::alloc): Allocate memory using a sectionCorinna Vinschen2009-06-072-25/+72
| | | | | | | object. Explain why. Drop call to GetSystemInfo, rather call getpagesize to get allocation granularity. Only align to allocation granularity under WOW64. Use roundup2 to align. (dll_list::detach): Call NtUnmapViewOfSection instead of VirtualFree.
* * mmap.cc: Use NtUnmapViewOfSection instead of UnmapViewOfFileCorinna Vinschen2009-06-062-5/+12
| | | | | | throughout for symmetry. (fhandler_dev_mem::munmap): Use correct process handle in call to NtUnmapViewOfSection.
* * dll_init.h (struct dll): Set size of name element to ANYSIZE_ARRAY.Corinna Vinschen2009-06-063-36/+60
| | | | | | | | * dll_init.cc: Fix formatting. (dll_list::alloc): Only allocate as much memory for struct dll as necessary for given DLL name. (dll_list::load_after_fork): Only read a single page of parent memory. Only read more if namelen indicates that it's necessary.
* * winbase.h (ilockexch): Fix asm constraints.Dave Korn2009-06-052-11/+25
| | | | (ilockcmpexch): Likewise.
* * heap.cc (heap_init): Fix typo in comment.Corinna Vinschen2009-06-052-1/+5
|
* * fhandler_clipboard.cc: Avoid calling system_printf.Corinna Vinschen2009-06-042-103/+112
| | | | | | | | (set_clipboard): Add basic error checking. Set errno here. Per MSDN, don't call GlobalFree on data block transferred to clipboard. (fhandler_dev_clipboard::write): Drop setting errno after call to set_clipboard. (fhandler_dev_clipboard::read): Add basic error checking. Simplify code.
* * new-features.sgml: Add changes to console BS and Space key.Corinna Vinschen2009-06-042-0/+9
|
* * fhandler_console.cc (set_console_title): Convert title string toCorinna Vinschen2009-06-042-5/+9
| | | | wchar_t and call SetConsoleTitleW.
* * fhandler_console.cc (fhandler_console::read): Allow Ctrl-Space toCorinna Vinschen2009-06-042-1/+9
| | | | emit a NUL byte.
* * thread.cc (__cygwin_lock_lock): Delete racy optimisation.Dave Korn2009-06-042-14/+10
| | | | (__cygwin_lock_unlock): Likewise.
* * strfuncs.cc (sys_cp_mbstowcs): Fix condition.Corinna Vinschen2009-06-032-1/+5
|
* * strfuncs.cc (sys_cp_wcstombs): Implement reverse functionalityCorinna Vinschen2009-06-032-12/+29
| | | | | | of the change to sys_cp_mbstowcs from 2009-05-30. (sys_cp_mbstowcs): Slightly reformat. Fix comment to accommodate change to sys_cp_wcstombs. Don't write to *ptr if dst is NULL.
* * fhandler_console.cc (fhandler_console::read): Convert Alt-BackspaceCorinna Vinschen2009-06-032-2/+10
| | | | to \033\177 or to \377 dependent on the setting of dev_state->metabit.
* * path.cc (path_conv::check): Don't call set_exec for files on "noacl"Corinna Vinschen2009-06-022-1/+9
| | | | mount points.
* * strfuncs.cc (sys_cp_mbstowcs): Treat src as unsigned char *. Convert failureChristopher Faylor2009-05-312-7/+30
| | | | of f_mbtowc into a single malformed utf-16 value.
* * cygwin/include/sys/termios.h: Make default erase character "^?".Christopher Faylor2009-05-302-1/+5
|
* * fhandler_console.cc (fhandler_console::read): Convert backspace key to DEL.Christopher Faylor2009-05-302-4/+14
|
* * path.cc (cwdstuff::set): Rewrite previous change to properly test the end ofChristopher Faylor2009-05-292-5/+17
| | | | the buffer.
* * path.cc (cwdstuff::set): Avoid removing a nonexistent trailing slash.Christopher Faylor2009-05-283-7/+12
|
* Change explicitely to explicitly throughout.Christopher Faylor2009-05-276-7/+11
|
* * net.cc (gethostby_helper): Use correct signedness.Christopher Faylor2009-05-202-35/+40
|
* * mount.cc (mount_info::add_item): Avoid using any-old '/' as indicating root.Christopher Faylor2009-05-192-1/+6
|
* * mount.cc (mount_info::got_usr_bin): Mark as NO_COPY.Christopher Faylor2009-05-182-3/+9
| | | | | (mount_info::got_usr_lib): Ditto. (mount_info::root_idx): Ditto.
* * cygpath.cc (codepage): New variable.Corinna Vinschen2009-05-173-10/+85
| | | | | | | | | (long_options): Add --codepage option. (options): Add -C option. (usage): Add -C/--codepage description. (my_wcstombs): New function. Use througout instead of wcstombs. (do_options): Handle -C/--codepage option. * utils.sgml (cygpath): Add description for new -C/--codepage option.
* * Makefile.in (cygpath.exe): Link against cygwin.a before linkingCorinna Vinschen2009-05-162-2/+9
| | | | | | against ntdll.dll to avoid linking symbols defined in both DLLs from ntdll. (ps.exe): Ditto.
* * setup2.sgml (setup-locale-console): Disable section for now.Corinna Vinschen2009-05-152-0/+6
|
* * cygpath.cc (main): Only setlocale for LC_CTYPE category. FallbackCorinna Vinschen2009-05-156-4/+32
| | | | | | | | to UTF-8 if locale is "C". * ldd.cc (main): Ditto. * mkgroup.c (main): Ditto. * mkpasswd.c (main): Ditto. * passwd.c (main): Ditto.
* * wchar.h (sys_mbstowcs): Add missing __stdcall attribute.Corinna Vinschen2009-05-152-1/+5
|
* * cygheap.cc (cygheap_init): Set Cygwin default locale values.Corinna Vinschen2009-05-1410-57/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cygheap.h (struct cygheap_locale): New structure. (struct user_heap_info): Add cygheap_locale member locale. * dcrt0.cc (dll_crt0_1): Revert to calling _setlocale_r so that only the applications locale is reverted to "C". * environ.cc (environ_init): Remove unused got_lc variable. * fhandler.h (class dev_console): Remove now unsed locale variables. * fhandler_console.cc (fhandler_console::get_tty_stuff): Remove setting dev_console's locale members. (dev_console::con_to_str): Use internal locale settings. Default to __ascii_wctomb if charset is "ASCII". (fhandler_console::write_normal): Ditto. * strfuncs.cc (__ascii_wctomb): Drop declaration. (__db_wctomb): Use fixed value 2 instead of not necessarily matching MB_CUR_MAX. (__eucjp_wctomb): Use 3 instead of MB_CUR_MAX. (sys_cp_wcstombs): Remove special case for "C" locale. (sys_wcstombs): Implement here. Use internal locale data stored on cygheap. (sys_cp_mbstowcs): Remove special case for "C" locale. (sys_mbstowcs): Implement here. Use internal locale data stored on cygheap. * syscalls.cc (internal_setlocale): New function to set cygheap locale data and to reset CWD posix path. (setlocale): Just call internal_setlocale from here if necessary. * wchar.h (__ascii_wctomb): Declare. (sys_wcstombs): Don't define inline, just declare. (sys_mbstowcs): Ditto.