summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* cygcheck: Eenable output of Vista++ FS flagsCorinna Vinschen2016-10-231-19/+32
| | | | | | Also, code cleanup Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygcheck: Eliminate dead codeCorinna Vinschen2016-10-221-6/+0
| | | | | | Fixes Coverity CID 66907 Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygcheck: Fix broken test for invalid wcstombs conversion reading symlinksCorinna Vinschen2016-10-221-6/+6
| | | | | | Fixes Coverity CID 66905 Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygcheck: Fix check for Cygwin symlinkCorinna Vinschen2016-10-221-1/+1
| | | | | | Fixes Coverity CID 66904 and 66906 Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* strace: Add comment trying to explain confusing codeCorinna Vinschen2016-10-221-0/+6
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygcheck: Close with pclose what has been opened with popenCorinna Vinschen2016-10-221-1/+1
| | | | | | Fixes Coverity CID 66900 Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* towupper: Eliminate dead codeCorinna Vinschen2016-10-221-3/+0
| | | | | | Fixes Coverity CID 59865 Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix a potential buffer overflow in wscanf familyCorinna Vinschen2016-10-221-6/+8
| | | | | | Fixes Coverity CID 60046 Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* get_alt_digits: Fix typo in allocationCorinna Vinschen2016-10-221-1/+1
| | | | | | | | adi->digit is an array of CHAR *, not of CHAR **. Fixes Coverity CID 60043 Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Remove unreachable code from passwd(1)Corinna Vinschen2016-10-221-3/+0
| | | | | | Fixed Coverity CID 66966 Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Actually return value from __cp_indexCorinna Vinschen2016-10-222-4/+1
| | | | | | | | Fixes Coverty CID 153470 Also drop redundant declaration of __cp_index. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Drop redundant checks for NULL input string in wctomb helper funcsCorinna Vinschen2016-10-221-6/+0
| | | | | | Fixes Coverity CIDs 153465 and 153466 Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix check for empty locale string in newlocaleCorinna Vinschen2016-10-221-2/+5
| | | | | | | | | | | | | | | The original test is broken. It tests for a NULL locale which isn't just wrong, it simply can't occur at this point due to an earlier check for a NULL locale string. Thus, the locale info for a category is never taken from the environment. Fixes Coverty CID 153467. Also, add comment. Also, add some parens for readability. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Add _PC_CASE_INSENSITIVE to [f]pathconfKen Brown2016-10-215-1/+10
| | | | | | | | Update the getconf utility to support the new flag as well as _PC_POSIX_PERMISSIONS and _PC_POSIX_SECURITY. These were previously unsupported, probably as an oversight. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix SetThreadName with gdb 7.10 on x86Jon Turney2016-10-201-1/+8
| | | | | | | | | | | Additionally to eccefd97, we need to ensure the exception handler is installed for the _ljfault used to implement _try/_except to get called. Also use the correct macro for x86 conditional compilation. Addresses https://cygwin.com/ml/cygwin/2016-09/msg00143.html Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
* Update FAQ answer about setting an early breakpointJon Turney2016-10-201-4/+13
| | | | Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
* Don't check directories always case-insensitive in rename(2)Corinna Vinschen2016-10-192-1/+4
| | | | | | | | | | | | | | | | | | Long-standing problem in one of the corner cases of rename(2): If we rename a directory a check is performed to see if newpath is identical to oldpath or a subdir of oldpath. This check is (accidentally? no hints anywhere in ChangeLogs or code) performed case-insensitive for as long as we use Unicode paths and NT functions. This leads to the problems described in https://cygwin.com/ml/cygwin/2016-09/msg00264.html Change this to be conditional case-sensitive as all other checks but let's take this with a grain of salt. There may be corner-cases in this corner-case which require to chek parts of the path always case-insensitive. Off the top of my head I can't construct such a case but that's no proof they don't exist :} Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Add release msg for 5a3496cCorinna Vinschen2016-10-191-0/+13
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix regression in console charset handlingCorinna Vinschen2016-10-191-0/+2
| | | | | | | | | | | | Commit d16a5630 dropped usage of cygheap's locale functions in favor of local on-the-fly usage of UTF-8 instead of ASCII. This allowed to use the current local rather than a fixed system-wide locale set at startup time. d16a5630 just missed to add the ASCII->UTF-8 conversion in the console as well. Fixes https://cygwin.com/ml/cygwin/2016-10/msg00000.html Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Bump Cygwin version to 2.6.1Corinna Vinschen2016-10-191-1/+1
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Make ctype_.c and ctype_.h agree on _ctype_b typeThomas Preud'homme2016-10-171-0/+4
| | | | | | | | _ctype_b is defined in ctype_.c as a const char array for non cygwin targets allowing negative ctype index but as a char array for the same targets in ctype_.h, giving type conflict at compile time. This is because the cygwin targets are not treated specially in the latter file. This patch adds the necessary logic for cygwin targets in ctype_.h.
* dlopen: on x/lib search x/bin if exe is in x/binnewlib-snapshot-20160923Michael Haubenwallner2016-09-081-1/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On 09/02/2016 11:03 AM, Corinna Vinschen wrote: > On Sep 2 10:46, Michael Haubenwallner wrote: >> On 09/01/2016 03:32 PM, Corinna Vinschen wrote: >>> You could just use the global variable program_invocation_name. If in >>> doubt, use the Windows path global_progname and convert it to full POSIX >>> via cygwin_conv_path. >> >> Patch updated, using global_progname now. > > Looks good and you're right to do it this way since I just noticed > that program_invocation_name may return a relative pathname. Yep. > Btw., in other calls which require the full POSIX path we use > mount_table->conv_to_posix_path instead of cygwin_conv_path (see > e. g. fillout_pinfo()). It's a bit faster. Maybe something for a > followup patch. No problem - attached. This renders the original patch 4/4 valid again. > Note for some later improvement: I really wonder why we don't store > the absolute POSIX path of the current executable globally yet... Same here. Thanks! /haubi/ >From f7255edd33cb4abe34f27188aab8dccdfa5dd2a0 Mon Sep 17 00:00:00 2001 From: Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com> Date: Wed, 31 Aug 2016 18:05:11 +0200 Subject: [PATCH 3/4] dlopen: on x/lib search x/bin if exe is in x/bin citing https://cygwin.com/ml/cygwin-developers/2016-08/msg00020.html > Consider the file /usr/bin/cygz.dll: > - dlopen (libz.so) success > - dlopen (/usr/bin/libz.so) success > - dlopen (/usr/lib/libz.so) fails * dlfcn.c (dlopen): For dlopen("x/lib/N"), when the application executable is in "x/bin/", search for "x/bin/N" before "x/lib/N".
* dlopen (pathfinder): try each basename per dirMichael Haubenwallner2016-09-081-6/+6
| | | | | | | Rather than searching all search dirs per one basename, search for all basenames within per one search dir. pathfinder.h (check_path_access): Interchange dir- and basename-loops.
* dlopen: switch to new pathfinder classMichael Haubenwallner2016-09-083-109/+782
| | | | | | | | | | | | Instead of find_exec, without changing behaviour use new pathfinder class with new allocator_interface around tmp_pathbuf and new vstrlist class. * pathfinder.h (pathfinder): New file. * vstrlist.h (allocator_interface, allocated_type, vstrlist): New file. * dlfcn.cc (dlopen): Avoid redundant GetModuleHandleExW with RTLD_NOLOAD and RTLD_NODELETE. Switch to new pathfinder class, using (tmp_pathbuf_allocator): New class. (get_full_path_of_dll): Drop.
* Fix typo in strerror doccygwin-2_6_0-releaseCorinna Vinschen2016-08-311-1/+1
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* strace: Don't print exception info for SetThreadName exceptionCorinna Vinschen2016-08-311-2/+6
| | | | | | | | | | The new functionality to set the thread name for debugging purposes creates exception debugging events. These are printed out when running strace. Since these exceptions have nothing to do with real exceptions but are, like breakpoint execptions, expected and non-fatal, don't print exception info for them. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix passwd getting error 1265 when running on newer WindowsCorinna Vinschen2016-08-312-43/+52
| | | | | | | | | | | | | On Windows 8.1 and later, the NetUserChangePassword call apparently doesn't accept the usual "\\server" string anymore, but requires to use the "domain" instead, otherwise it emits en error code 1265, ERROR_DOWNGRADE_DETECTED. Since this is accepted by pre-8.1 as well, use the domain indiscriminately when calling NetUserChangePassword from passwd(1). While at it, do some minor cleanup in passwd.c. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Add release message for commit 3d3ab82Yaakov Selkowitz2016-08-301-0/+3
| | | | Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
* Fix off_t typedef on Cygwin64Yaakov Selkowitz2016-08-291-1/+1
| | | | | | | | | | While both long and long long are 64-bits on x86_64, they are distinct types, and long was used prior to commit 477463a2011ba81907a753df9ce7a71b6563db54. Changing this breaks the linking of previously compiled C++ functions with off_t arguments on 64-bit Cygwin with newly compiled code, as the mangling of long (l) and long long (x) differ. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
* Change return type from locale_t to struct __locale_t * as wellCorinna Vinschen2016-08-251-3/+4
| | | | | | Complements commit 14228e2. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Drop duplicate _ctype_ declaration from ctype_.hCorinna Vinschen2016-08-252-2/+2
| | | | | | It's already defined in ctype.h. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Drop global __ctype_ptr__ entirely in favor of using locale_t::ctype_ptrCorinna Vinschen2016-08-254-41/+37
| | | | | | | | | | Keep __ctype_ptr__ available on Cygwin only, for backward compatibility with existing apps referencing it via the ctype macros. Otherwise initialize __global_locale.ctype_ptr and __C_locale.ctype_ptr and use them throughout. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix formattingCorinna Vinschen2016-08-251-5/+6
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix SetThreadName with current gdbJon Turney2016-08-251-1/+6
| | | | | | | | | | | Wrap SetThreadName()'s call to RaiseException() in __try/__except/__endtry, so that if the attached debugger doesn't know about MS_VC_EXCEPTION (e.g. current gdb and probably strace as well) and continues exception processing, we ignore it, rather than dying due an unhandled exception. Also remove an unnecessary cast in the RaiseException() invocation. Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
* Use struct __locale_t * for reentrent locale functionsCorinna Vinschen2016-08-251-4/+4
| | | | | | | This fixes a build problem since locale_t is only defined if __POSIX_VISIBLE >= 200809. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Add strerror_l prototype, change str[n]casecmp_l feature testsBrian Inglis2016-08-252-10/+15
| | | | | strerror_l prototype was missing. str[n]casecmp_l feature tests in string.h vs. strings.h were transposed.
* Avoid crash when calling __localeconv_l with __C_localeCorinna Vinschen2016-08-241-0/+3
| | | | | | | | | __C_locale is const. Thus, overwriting the lconv values in __localeconv_l will try to write to a R/O region. Given the lconv values in __C_locale are initialized, there's no reason to write them in __localeconv_l at all. Just return &__C_locale.lconv. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Include winsup.h prior to including other headersCorinna Vinschen2016-08-241-2/+5
| | | | | | Otherwise _GNU_SOURCE is not set when needed in sys/features.h. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Use #if __GNU_VISIBLE, not #ifdef __GNU_VISIBLECorinna Vinschen2016-08-241-2/+2
| | | | | | sys/features.h always defines __GNU_VISIBLE, either as 0 or 1. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* strerror_l: Fix copy-and-paste typoEric Blake2016-08-231-1/+1
| | | | Signed-off-by: Eric Blake <eblake@redhat.com>
* Clarify Cygwin's support for Win32 pathsKen Brown2016-08-231-5/+9
| | | | See https://www.cygwin.com/ml/cygwin/2016-08/msg00431.html.
* Add missing LF in release textCorinna Vinschen2016-08-231-0/+1
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Mention strerror_l in libc/string/strings.texCorinna Vinschen2016-08-231-1/+1
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Add __get_C_locale inline function and fix new locale code for !_MB_CAPABLE ↵Corinna Vinschen2016-08-235-6/+36
| | | | | | | | | | targets Only access "C" locale using the new __get_C_locale inline function. Enable __global_locale for !_MB_CAPABLE targets. Accommodate !_MB_CAPABLE targets in new locale code. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Export and document strerror_l, strptime_l, wcsftime_l from CygwinCorinna Vinschen2016-08-234-12/+16
| | | | | | Bump Cygwin API minor number. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Implement GNU extension strptime_lCorinna Vinschen2016-08-234-66/+94
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Implement GNU extension wcsftime_lCorinna Vinschen2016-08-233-3/+7
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Implement missing POSIX-1.2008 function strerror_lCorinna Vinschen2016-08-233-1/+26
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Add missing declarations of str{n}casecmp_l to strings.h.Corinna Vinschen2016-08-231-0/+5
| | | | | | Per glibc, both funcs are defined as GNU visible in strings.h. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Send thread names to debuggerJon Turney2016-08-237-1/+38
| | | | | | | | | | | | | | | | | | GDB since commit 24cdb46e [1] can report and use these names. Add utility function SetThreadName(), which sends a thread name to the debugger. Use that: - to set the default thread name for main thread and newly created pthreads. - in pthread_setname_np() for user thread names. - for helper thread names in cygthread::create() - for helper threads which are created directly with CreateThread. Note that there can still be anonymous threads, created by system or injected DLLs. [1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=24cdb46e9f0a694b4fbc11085e094857f08c0419