summaryrefslogtreecommitdiffstats
path: root/winsup
Commit message (Collapse)AuthorAgeFilesLines
* fix typoChristopher Faylor2008-03-021-1/+1
|
* * cygtls.cc (_cygtls::init_exception_handler): Semi-revert to making onlyChristopher Faylor2008-03-025-12/+46
| | | | | | | | | | | | | ourselves the exception handler and nothing else. * exceptions.cc (open_stackdumpfile): Use correct format specifiers for unicode when printing nameof stackdump file. (stack_info::walk): Stop walking if ebp points into cygwin itself. (_cygtls::handle_exceptions): Detect when signal is masked and treat as if it was not caught. Reinitialize exception handler to known state to avoid subsequent attempts to call Windows exception handlers if an exception occurs in a signal handler. Revert to a 'return 0' rather than using a goto. * strfuncs.cc (sys_wcstombs_alloc): Minor formatting tweak. * winsup.h: Fix comment typo.
* * smallprint.cc (__small_vsprintf): Free allocated buffer rather than pointerChristopher Faylor2008-03-022-4/+11
| | | | into the buffer.
* Update ChangeLog.Christopher Faylor2008-03-011-0/+1
|
* * cygtls.h (_cygtls::handle_threadlist_exception): Eliminate.Christopher Faylor2008-03-014-43/+19
| | | | | | | | (_cygtls::init_threadlist_exceptions): Ditto. * cygtls.cc (_cygtls::handle_threadlist_exception): Eliminate. (_cygtls::init_threadlist_exceptions): Ditto. (_cygtls::find_tls): Use myfault handling to deal with errors caused by nonexistent threads.
* * cygtls.cc (_cygtls::init_exception_handler): Just return.Christopher Faylor2008-03-011-0/+4
|
* * exceptions.cc (_cygtls::handle_exceptions): Only call rtl_unwind whenChristopher Faylor2008-03-014-20/+22
| | | | | | | | exiting. Just return, don't set thread context. * gendef (_setjmp): Store %fs:0 in jmp_buf. (_sjfault): Ditto. (_ljfault): Restore %fs:0 from jmp_buf. (_longjmp): Ditto.
* * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Call close_fsCorinna Vinschen2008-02-292-3/+11
| | | | | | | instead of close to avoid calling close from wrong class when changing a file system based device node. (fhandler_disk_file::fchown): Ditto. (fhandler_disk_file::facl): Ditto.
* * exceptions.cc (_cygtls::handle_exceptions): When being debugged,Corinna Vinschen2008-02-282-2/+8
| | | | | leave through SetThreadContext, too, to keep exception handler stack intact.
* * exceptions.cc (open_stackdumpfile): Add comments.Corinna Vinschen2008-02-282-1/+8
|
* * exceptions.cc (open_stackdumpfile): Use NtCreateFile to createCorinna Vinschen2008-02-282-5/+28
| | | | stackdump file.
* * mkpasswd.c (main): Simplify generating SYSTEM entry. Add entriesCorinna Vinschen2008-02-282-15/+10
| | | | for LocalService and NetworkService accounts. Change comments.
* * exceptions.cc (stack_info::walk): Fix typo.Corinna Vinschen2008-02-272-1/+5
|
* * cygtls.cc (_cygtls::init_exception_handler): Fix comment.Corinna Vinschen2008-02-272-7/+6
|
* Fix dateCorinna Vinschen2008-02-271-1/+1
|
* * (struct __DIR_cache): Switch order of members so that the bufferCorinna Vinschen2008-02-272-1/+6
| | | | given to NtQueryDirectoryFile is 8 byte aligned.
* * cygtls.cc (_cygtls::handle_threadlist_exception): Make it clear that theChristopher Faylor2008-02-273-3/+25
| | | | | | function never actually returns. * exceptions.cc (_cygtls::handle_exceptions): Jump out of function rather than returning to avoid meddling by previously installed exception handlers.
* * dcrt0.cc (initial_env): Only use local buffer "buf" if DEBUGGING isCorinna Vinschen2008-02-2511-65/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | enabled. Replace calls to GetEnvironmentVariable by calls to GetEnvironmentVariableA for clarity. Call GetEnvironmentVariableA with NULL buffer. (cygbench): Ditto, drop local buffer. * environ.cc (getearly): Call GetEnvironmentVariableA. (environ_init): Retrieve unicode environment and convert to current codepage locally. (getwinenveq): Ditto. * exceptions.cc (try_to_debug): Accommodate new sys_mbstowcs calling convention. * fhandler_clipboard.cc (set_clipboard): Call sys_mbstowcs to retrieve required buffer length. * fork.cc (frok::child): Call GetEnvironmentVariableA. * miscfuncs.cc: Accommodate changed arguments in calls to sys_mbstowcs. * sec_auth.cc: Ditto. * strfuncs.cc (sys_wcstombs_alloc): Fix formatting. (sys_mbstowcs): Change arguments to allow specifying a source string length. (sys_mbstowcs_alloc): Ditto. * uinfo.cc (cygheap_user::ontherange): Accommodate changed arguments in calls to sys_mbstowcs. * winsup.h (sys_mbstowcs): Adjust declaration. (sys_mbstowcs_alloc): Ditto.
* 2008-02-24 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>Chris Sutcliffe2008-02-243-6/+7
| | | | | | * include/winnt.h: Update guard around KEY_WOW64_64KEY and KEY_WOW64_32KEY definitions. * include/winreg.h (KEY_WOW64_64KEY, KEY_WOW64_32KEY): Remove.
* 2008-02-23 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>Chris Sutcliffe2008-02-242-2/+10
| | | | * include/winnt.h (KEY_WOW64_64KEY, KEY_WOW64_32KEY): Define.
* * path.cc (cwdstuff::set): Revert error handling change in caseCorinna Vinschen2008-02-202-13/+14
| | | | DuplicateHandle fails, because it breaks Vista/Longhorn workaround.
* * sigproc.cc (sig_send): Use sigmask of target thread if it is specifiedChristopher Faylor2008-02-192-2/+7
| | | | otherwise default to main sigmask.
* * fhandler.cc (fhandler_base::fpathconf): Fix _PC_NAME_MAX andCorinna Vinschen2008-02-162-2/+15
| | | | _PC_PATH_MAX cases.
* * include/sys/cygwin.h (__INT_MAX_PATH): Remove.Corinna Vinschen2008-02-163-4/+10
| | | | | (external_pinfo): Convert program_long to pointer. * external.cc (fillout_pinfo): Add buffer for program_long value.
* * include/sys/cygwin.h (__INT_MAX_PATH): Define to 32K.Corinna Vinschen2008-02-152-1/+8
| | | | (external_pinfo): Set size to __INT_MAX_PATH.
* * include/sys/cygwin.h (external_pinfo): Define program_long size usingChristopher Faylor2008-02-152-1/+6
| | | | external buffer size rather than cygwin-internal buffer size.
* Perform whitespace cleanup throughout.Christopher Faylor2008-02-1545-315/+315
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dcrt0.cc (signal_shift_subtract): Eliminate ancient backwards compatibility. (check_sanity_and_sync): Ditto. * winsup.h (SIGTOMASK): Ditto. Just use constant in signal calculation. * include/cygwin/version: Remove backwards signal mask compatibility define. * path.cc (symlink_info::check_sysfile): Cosmetic change. * registry.cc (get_registry_hive_path): Remove unneeded variable. * exceptions.cc (handle_sigsuspend): Eliminate thread signal mask and use either main sigmask or current thread sigmask. (set_process_mask): Ditto. (sighold): Ditto. (sigrelse): Ditto. (sigset): Ditto. (set_process_mask_delta): Ditto. (_cygtls::call_signal_handler): Ditto. * fhandler_process.cc (format_process_status): Ditto. * fhandler_termios.cc (fhandler_termios::bg_check): Ditto. * pinfo.h (class pinfo): Ditto. * select.cc (pselect): Ditto. * signal.cc (sigprocmask): Ditto. (abort): Ditto. (sigpause): Ditto. (sigsend): Ditto. (wait_sig): Ditto. * thread.h (pthread::parent_tls): New member. * thread.cc (pthread::pthread): Record parent_tls here. (pthread::thread_init_wrapper): Initialize sigmask from parent thread.
* * cygheap.cc (cwcsdup): New function.Corinna Vinschen2008-02-1423-60/+138
| | | | | | | | | | | | | | | | | | | | | | (cwcsdup1): New function. * cygheap.h (cygheap_user::get_windows_id): New method returning PWCHAR. (cwcsdup): Declare. (cwcsdup1): Declare. * registry.cc (get_registry_hive_path): Use WCHAR instead of char throughout. (load_registry_hive): Ditto. * registry.h (get_registry_hive_path): Change declaration accordingly. (load_registry_hive): Ditto. * sec_helper.cc (cygpsid::string): New method returning PWCHAR. * security.h (cygpsid::string): Declare. * syscalls.cc (seteuid32): Convert local name var to WCHAR. * uinfo.cc (cygheap_user::env_userprofile): Convert local name buffers to WCHAR. Call sys_wcstombs_alloc to generate puserprof buffer. * winsup.h: Fix comment. (NT_MAX_PATH): New definition for maximum internal path length. Use throughout where appropriate. * include/limits.h (PATH_MAX): Set to 4096 as on Linux.
* * configure.in: Remove non-working options.Christopher Faylor2008-02-143-2160/+3195
| | | | * configure: Regenerate.
* * syscalls.cc (_isatty): Define as an alias to isatty to override newlibChristopher Faylor2008-02-133-2/+27
| | | | | | version. * thread.cc (pthread_kill): Deal with signal 0 as per POSIX and also avoid manipulating an invalid thread.
* * posix.sgml: Move llrint, llrintf, llrintl, lrintl, rintl, wcstol,Corinna Vinschen2008-02-132-11/+35
| | | | | | | | | wcstoll, wcstoul, wcstoull, wcsxfrm from unimplemented to implemented POSIX interfaces. Change headline of "GNU extensions" to "GNU and Linux extensions". Add fgetxattr, flistxattr, fremovexattr, fsetxattr, getxattr, lgetxattr, listxattr, llistxattr, lremovexattr, lsetxattr, removexattr, setxattr, wcpcpy and wcpncpy to list of implemented GNU functions.
* * cygtls.cc (_cygtls::init_exception_handler): Revert patchCorinna Vinschen2008-02-135-5/+58
| | | | | | | | | | from 2005-12-02. * exceptions.cc (stack_info::walk): Add workaround for NT 5.2 64 bit OSes. * wincap.h (wincaps::has_restricted_stack_args): New element. * wincap.cc: Implement above element throughout. (wincapc::init): Reset has_restricted_stack_args if not running under WOW64.
* 2008-02-02 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>Chris Sutcliffe2008-02-123-12/+24
| | | | | * include/specstrings.h (IN, OUT, OPTIONAL): Remove. * include/windef.h (IN, OUT, OPTIONAL): Define.
* * fhandler_disk_file.cc (fhandler_disk_file::fgetxattr): Remove unusedCorinna Vinschen2008-02-113-4/+53
| | | | | | attr. (fhandler_disk_file::fsetxattr): Ditto. * include/attr/xattr.h: New file.
* * dcrt0.cc (dll_crt0_1): Fix typo in call to sys_wcstombs.Corinna Vinschen2008-02-113-2/+7
| | | | * miscfuncs.cc (next_char): Initialize ret to keep gcc happy.
* Fix ChangeLog entry.Corinna Vinschen2008-02-101-1/+1
|
* * Makefile.in (DLL_OFILES): Add ntea.o.Corinna Vinschen2008-02-1011-130/+562
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cygwin.din (getxattr, listxattr, removexattr, setxattr, lgetxattr, llistxattr, lremovexattr, lsetxattr, fgetxattr, flistxattr, fremovexattr, fsetxattr): Export Linux extended attribute functions. Sort. * errno.cc (errmap): Add mappings for ERROR_EAS_DIDNT_FIT, ERROR_EAS_NOT_SUPPORTED, ERROR_EA_LIST_INCONSISTENT, ERROR_EA_TABLE_FULL, ERROR_FILE_CORRUPT, ERROR_INVALID_EA_NAME. * fhandler.h (class fhandler_base): Declare new fgetxattr and fsetxattr methods. (class fhandler_disk_file): Ditto. * fhandler.cc (fhandler_base::fgetxattr): New method. (fhandler_base::fsetxattr): New method. * fhandler_disk_file.cc (fhandler_disk_file::fgetxattr): New method. (fhandler_disk_file::fsetxattr): New method. * ntdll.h (STATUS_EA_TOO_LARGE): Define. (STATUS_NONEXISTENT_EA_ENTRY): Define. (STATUS_NO_EAS_ON_FILE): Define. * ntea.cc (read_ea): Rewrite for long pathnames and for using with Linux extended attribute functions. (write_ea): Ditto. (getxattr_worker): New static function. (getxattr): New function. (lgetxattr): New function. (fgetxattr): New function. (listxattr): New function. (llistxattr): New function. (flistxattr): New function. (setxattr_worker): New static function. (setxattr): New function. (lsetxattr): New function. (fsetxattr): New function. (removexattr): New function. (lsetxattr): New function. (fsetxattr): New function. * security.h (read_ea): Change declaration according to above changes. (write_ea): Ditto. * include/cygwin/version.h: Bump API minor version.
* * libc/ftw.cc (ftw): Allow nfds < 0 for glibc compatibility.Corinna Vinschen2008-02-103-0/+15
| | | | * libc/nftw.c (nftw): Ditto.
* Fix typo in latest ChangeLog entry.Corinna Vinschen2008-02-071-1/+1
|
* * dtable.cc (dtable::init_std_file_from_handle): Set access toCorinna Vinschen2008-02-074-1/+15
| | | | | | | | read/write of handle is connected to a tty or console. * fhandler_dsp.cc (fhandler_dev_dsp::dup): Set open flags correctly after duplicating from archetype. * fhandler_tty.cc (fhandler_tty_slave::dup): Ditto. (fhandler_pty_master::dup): Ditto.
* * bsd_helper.cc: Replace %E __small_printf format specifier with %luCorinna Vinschen2008-02-064-11/+21
| | | | | | | and call to GetLastError throughout. * bsd_mutex.cc: Ditto. * sysv_sem.cc (semget): Replace %X __small_printf format specifier with %llx.
* * miscfuncs.cc (next_char): Fix typos in comment.Corinna Vinschen2008-02-063-14/+7
| | | | * strfuncs.cc: Remove cygserver guards.
* Remove dependency from Cygwin internal code.Corinna Vinschen2008-02-064-12/+24
| | | | | | | | | | | * Makefile.in (CYGWIN_OBJS): Remove smallprint.o. (cygserver.exe): Remove strfuncs.o (strfuncs.o): Drop rule. * bsd_log.cc (_vlog): Use snprintf/vsnprintf instead of __small_sprintf/__small_vsprintf. * sysv_sem.cc (seminit): Use sys_malloc instead of malloc. Use snprintf instead of __small_sprintf. (semunload): Free the above allocated sema_mtx names here.
* * fhandler.h (fhandler_console::trunc_buf): Add to use as cache forCorinna Vinschen2008-02-067-34/+226
| | | | | | | | | | | | | | | | | | | | | | truncated multibyte characters on input. (fhandler_console::write_replacement_char): Declare new method. * fhandler_console.cc (CONVERT_LIMIT): Raise to 64K. (fhandler_console::fhandler_console): Initialize trunc_buf. (ERR): Define as independent value again. (fhandler_console::write_replacement_char): New method to print replacement chars. (fhandler_console::write_normal): Add handling for truncated multibyte sequences. Call next_char instead of pathetic CharNextExA function. Don't change src, rather just work with found later on. * miscfuncs.cc (is_cp_multibyte): Move here from strfuncs.cc. Don't call Windows function, restrict to well-known ANSI/OEM codepages and UTF-8. (next_char): Call CharNextExA only for doublebyte codepages. Implement for UTF-8 here. * strfuncs.cc (is_cp_multibyte): Move to miscfuncs.cc. * winsup.h (next_char): Declare. * include/limits.h (MB_LEN_MAX): Set to maximum value of MB_CUR_MAX as defined by newlib for now.
* * autoload.cc (CharToOemA): Remove.Corinna Vinschen2008-02-057-92/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (CharNextExA): Define. * environ.cc (codepage_init): Un-static. Set active_codepage to active codepage. Default to ansi regardless of buf pointer. * fhandler.h (dev_console::get_console_cp): New method. (dev_console::con_to_str): Change declaration according to new implementation. (dev_console::str_to_con): Ditto. * fhandler_console.cc (cp_convert): Remove. (dev_console::con_to_str): Redefine to take WCHAR as incoming console char. (dev_console::get_console_cp): Return correct codepage according to alternate_charset_active setting. (dev_console::str_to_con): Redefine to create WCHAR buffer for console output. (fhandler_console::read): Read console input as WCHARs. (base_chars): Fix typo in comment. (fhandler_console::char_command): Save and restore console output buffer using UNICODE functions. (fhandler_console::write_normal): Convert to write output in UNICODE. Use CharNextExA to recognize multibyte characters in input. Workaround problem with UTF-8 and MultiByteToWideChar. Simplify the loop for printing "normal" characters. * strfuncs.cc (active_codepage): New variable to store active codepage. (get_cp): Call codepage_init() if active_codepage is uninitialized. Just return active_codepage. (is_cp_multibyte): New function. * winsup.h (active_codepage): Declare. (codepage_init): Declare. (is_cp_multibyte): Declare.
* * Makefile.in: Don't link strfuncs.o from the Cygwin build dir.Corinna Vinschen2008-02-042-2/+10
| | | | Build it again with __OUTSIDE_CYGWIN__ defined.
* * smallprint.cc (__small_vsprintf): Use HEAP_NOTHEAP for type.Corinna Vinschen2008-02-043-2/+21
| | | | | | * strfuncs.cc (sys_wcstombs_alloc): Guard use of ccalloc to !__OUTSIDE_CYGWIN__ for use in cygserver. (sys_mbstowcs_alloc): Ditto.
* 2008-02-01 Brian Dessent <brian@dessent.net>Chris Sutcliffe2008-02-022-5/+14
| | | | | * Makefile.in: Add rules to generate multiple versions of libmoldname.a for the different runtime versions.
* 2008-02-02 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>Chris Sutcliffe2008-02-023-23/+34
| | | | | | | * include/specstrings.h: new file, move pseudo modifiers from windef.h. * include/windef.h (__in, __inout, __in_opt, __in_bcound, __in_ecount, __out, __out_ecount_part, __struct_bcount, __field_ecount_opt, __out_bcount_opt): Move to specstrings.h.
* * miscfuncs.cc (cygwin_wcsncasecmp): Never access more than nCorinna Vinschen2008-02-012-18/+28
| | | | | characters. (cygwin_strncasecmp): Ditto. Fix for strings longer than n.