summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix missing 'user' in usertemp docsCorinna Vinschen2016-01-271-1/+1
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Add 2.4.1 release message filecygwin-2_4_1-releaseCorinna Vinschen2016-01-231-0/+12
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygpath: Avoid returning SysWOW64Corinna Vinschen2016-01-211-0/+13
| | | | | | | | | | | | | | | | | | | | | On Cygwin 32 running under WOW64: When case-correcting the path fetched with -S, the underlying Windows function fetching the normalized path returns the real path C:\Windows\SysWOW64 instead of the path redirection enabled C:\Windows\System32 path. This breaks using the result of `cygpath -S' to fetch the POSIX path of the network related files under SYSTEMROOT\drivers\etc. This path is in fact under the *real* C:\Windows\System32 and only mapped into the 32 bit C:\Windows\System32 (aka C:\Windows\SysWOW64) via path redirection. Sounds messy? This patch checks if we're running under WOW64. If so, it changes the path returned by GetSystemDirectoryW from "system32" to "Sysnative". This in turn is changed to "System32" by NtQueryInformationFile, so we're back to what we need. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygwin_logon_user: Return non-privileged token as wellCorinna Vinschen2016-01-211-3/+7
| | | | | | | | | | If the calling process doesn't have sufficient privileges to fetch the linked token of an admin-user token, cygwin_logon_user fails. This patch changes that by returning the original, unprivileged token of the admin user to allow authentication and calling setuid for the current process. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix formatting in sec_auth.ccCorinna Vinschen2016-01-211-3/+3
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Bump cygwin version to 2.4.1Corinna Vinschen2016-01-161-1/+1
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* faq: Update FAQ question and answer about gdb and signalsJon Turney2016-01-151-6/+13
| | | | | | * faq-programming.xml: Update question and answer about gdb and signals. Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
* get_posix_access: Fix group deny bits leaking into file type attribute bitscygwin-2_4_0-releaseCorinna Vinschen2016-01-151-1/+1
| | | | | | | | * sec_acl.cc (get_posix_access): Fix bracketing in expression constructing POSIX group permissions so as not leaking deny bits into POSIX file type bits. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Initialize handle in dll_load to avoid compiler warningCorinna Vinschen2016-01-121-1/+1
| | | | | | * autoload.cc (dll_load): Initialize h to NULL. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Use MAKEWORD macro in WSAStartup call per documentationCorinna Vinschen2016-01-121-1/+1
| | | | | | | * autoload.cc (wsock_init): Use MAKEWORD macro to create requested version rather than handcrafted expression. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Try loading with safe path using LOAD_LIBRARY_SEARCH_SYSTEM32 firstCorinna Vinschen2016-01-123-18/+43
| | | | | | | | | | | | * autoload.cc (dll_load): Move safe loading from std_dll_init here. Add code to handle systems supporting LOAD_LIBRARY_SEARCH flags. Add comments to explain what the code is doing. Fix up comment preceeding this function. (std_dll_init): Move safe loading code to dll_load. * wincap.h (wincaps::has_load_lib_search_flags): New element. * wincap.cc: Implement above element throughout. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix previous fix for generating unique inode numbers for socketsCorinna Vinschen2016-01-113-8/+12
| | | | | | | | | | | | * fhandler.h (fhandler_base::get_plain_ino): New inline method. Add comment to explain what it's supposed to be used for. * fhandler_socket.cc (fhandler_socket::get_proc_fd_name): Create filename using inode number. (fhandler_socket::fstat): Generate inode number from filename if ino is not set (that's the case in a stat(2) call). * pipe.cc: Throughout, use get_plain_ino when appropriate. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Revert "autoload.cc: Drop using full paths for system DLLs"Corinna Vinschen2016-01-111-3/+11
| | | | | | | | | | This reverts commit 4b104ce07070e32363a217a554441a8b4df69d12. The DLLs always guaranteed to be loaded from the system dir are only those in the KnownDLLs list. We're using some DLLs not in that list on all supported OSes, thus we need to make sure to use full paths. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Return unique inode numbers when calling stat/fstat on pipes and IP socketsCorinna Vinschen2016-01-117-45/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fhandler.h (class fhandler_base): Convert unique_id to int64_t. (fhandler_base::set_ino): New protected inline method. (fhandler_base::get_unique_id): Convert to int64_t. (fhandler_base::set_unique_id): New inline method taking int64_t. (fhandler_pipe::fstat): Declare. (fhandler_pipe::init): Take extra parameter. (fhandler_pipe::create): Ditto. * fhandler_socket.cc (fhandler_socket::init_events): Set inode number to serial number. (fhandler_socket::fstat): Set device to DEV_TCP_MAJOR. Create st_ino from get_ino. * include/cygwin/signal.h (struct _sigcommune): Replace _si_pipe_fhandler with _si_pipe_unique_id. * pinfo.h (_pinfo::pipe_fhandler): Take unique id instead of HANDLE. * pinfo.cc (commune_process): Accommodate change to _si_pipe_unique_id. (_pinfo::commune_request): Ditto. (_pinfo::pipe_fhandler): Ditto. * pipe.cc (fhandler_pipe::init): Take unique id as argument and set inode number and unique_id from there. (fhandler_pipe::open): Rework to find any matching pipe from unique id in filename. (fhandler_pipe::get_proc_fd_name): Create filename using inode number. (fhandler_pipe::create): Generate and return unique id from process pid and pipe_unique_id. In outer method, call init with additional unique id as parameter. (fhandler_pipe::fstat): New method. (pipe_worker): Accommodate using 64 bit inode number in filename. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* select(2): Drop checking descriptors in case of immediate timeout.Corinna Vinschen2016-01-111-6/+11
| | | | | | | * select.cc (select): Call sel.poll only if sel.wait returned select_ok. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Add release message for previous commitCorinna Vinschen2016-01-091-0/+4
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* select: Don't timeout without setting descriptor arrays to all zeroCorinna Vinschen2016-01-091-15/+20
| | | | | | | | | | | | * select.cc (copyfd_set): Remove. (select): Don't copy local wait fd arrays over to returned fd arrays since bits set there are not accounted for in return value. Zero out returned fd arrays instead. Always call sel.poll even in case of a timeout. Always zero out fd array when timing out. Convert while/do to do/while for clarity. Use dedicated variable as return value to decouple return value from artificial return code from sel.wait. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Do not treat the command line or environment like pathsJohannes Schindelin2016-01-084-13/+44
| | | | | | | | | | | | | | | | | | | | | | | | * dcrt0.cc (dll_crt0_1), environ.cc (environ_init, getwinenveq, build_env), strfuncs.cc (sys_wcstombs, sys_wcstombs_alloc), wchar.c (sys_wcstombs, sys_wcstombs_alloc): avoid mis-conversions of text that does not, actually, refer to a path or file name Detailed explanation: Our WCS -> UTF conversion handles the private Unicode page specially to allow for otherwise invalid file names. However, this handling makes no sense for command-lines, nor environment variables, which we would rather convert verbatim. As a stop-gap solution, let's just introduce a version of the sys_wcstombs() function that specifically excludes that file name conversion magic. The proper solution is to change sys_wcstombs() to assume that it is not a path that wants to be converted, and introduce sys_wcstombs_path() that does, but that is a bigger task which we leave for another patch. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* Deprecate all winsup ChangeLog filesCorinna Vinschen2016-01-0712-9890/+9896
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygpath: Try to return system directories with correct caseCorinna Vinschen2016-01-072-14/+40
| | | | | | | | | * cygpath.cc (do_sysfolders): Drop lame workaround to fix case of directory returned by GetSystemDirectoryW. Try to fix case of any path returned by this function in case it has to return a POSIX path to support case-sensitivity. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* select: Set exceptfd bit if fetching mailslot info failsCorinna Vinschen2016-01-071-0/+1
| | | | | | * select.cc (peek_mailslot): Set except_ready if GetMailslotInfo fails. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* select.cc: Fit comments into 80 columnsCorinna Vinschen2016-01-071-11/+12
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Convert utmp{x}name to int, return useful value. Define _PATH_UTMPXCorinna Vinschen2016-01-076-8/+21
| | | | | | | | | | | * syscalls.cc (utmpname): Convert to int. Return 0 if strdup worked, -1 otherwise. * include/utmpx.h (_PATH_UTMPX): Define as _PATH_UTMP. (utmpxname): Declare as int function. * include/sys/utmp.h (utmpname): Ditto. * include/cygwin/version.h: Bump API minor version. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Drop use of not yet available type acl_perm_tCorinna Vinschen2016-01-071-1/+1
| | | | | | * sec_acl.cc (__aclcalcmask): Use mode_t instead of acl_perm_t Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Deprecate Cygwin ChangeLog fileCorinna Vinschen2016-01-072-2260/+2261
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix up errors in regenerated files for 2.3.0 release.newlib-snapshot-20160104Jeff Johnston2016-01-044-3223/+4941
|
* setfacl: Remove unused local variableCorinna Vinschen2015-12-252-1/+5
| | | | | | * setfacl.cc (delacl): Remove unused local variable. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Only request WRITE_DAC rights when writing an ACLCorinna Vinschen2015-12-252-2/+8
| | | | | | | | * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Only request query_write_dac rather than query_write_control access when writing an ACL. Fix a comment. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* aclsort: Honor calclass argument and allow recalculating ACL mask.Corinna Vinschen2015-12-242-1/+26
| | | | | | | * sec_acl.cc (__aclcalcmask): New function to recalculate ACL masks. (aclsort32): Honor calclass argument. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* aclfromtext: Actually return aclcnt parameterCorinna Vinschen2015-12-242-2/+10
| | | | | | * sec_acl.cc (aclfromtext32): Return missing aclcnt parameter. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Use TLS buffer in ACL<->text conversionCorinna Vinschen2015-12-242-4/+11
| | | | | | | * sec_acl.cc (acltotext32): Use tmp_pathbuf rather than stack buffer. (aclfromtext32): Ditto. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* sec_acl.cc: Cosmetic changesCorinna Vinschen2015-12-242-14/+18
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Regenerate files for newlib 2.3.0.newlib-2_3_0Jeff Johnston2015-12-21105-6166/+4598
|
* setfacl(1): Fix handling of -m and -x on a single commandlineCorinna Vinschen2015-12-212-9/+28
| | | | | | | | * setfacl.cc (delace): New helper function to delete a single ACE. (delacl): Call delace. (modacl): Ditto, if entry is supposed to get deleted. Align comments. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix atexit logic to honor _ATEXIT_DYNAMIC_ALLOC setting.Jeff Johnston2015-12-212-0/+12
| | | | | | | | | | | | | If small reent is enabled (_REENT_SMALL is defined) then malloc() was used in __register_exitproc() even if user requested it to be disabled (_ATEXIT_DYNAMIC_ALLOC is defined). With this fix, function fails when _ATEXIT_DYNAMIC_ALLOC is defined and whole static storage is already used. 2015-12-21 Freddie Chopin <freddie.chopin@gmail.com> * libc/stdlib/__atexit.c (__register_exitproc): Fix for _ATEXIT_DYNAMIC_ALLOC.
* Add static instance of _on_exit_args for _REENT_SMALL platforms.Jeff Johnston2015-12-218-23/+108
| | | | | | | | | | | | | 2015-12-21 Freddie Chopin <freddie.chopin@gmail.com> * libc/stdlib/on_exit_args.{c,h}: New files. * libc/stdlib/Makefile.am: Add new source file. * libc/stdlib/Makefile.in: Regenerate. * libc/stdlib/__atexit.c (__register_exitproc): Initialize _on_exit_args_ptr field of _GLOBAL_ATEXIT on first run. * libc/stdlib/on_exit.c: Force linking of static instance of _on_exit_args. * libc/stdlib/cxa_atexit.c: Likewise.
* setfacl(1): Rewrite support for mask recomputationCorinna Vinschen2015-12-216-37/+78
| | | | | | | | | | | | | | | | * setfacl.cc (modacl): Move recomputing mask into new function. (check_got_mask): New function checking if mask is in input. (recompute_mask): New function to recompute mask. (addmissing): Align mask computation to Linux setfacl. (setfacl): Call check_got_mask and recompute_mask on Set, Delete and Modify actions. (usage): Rename --substitute to --set. (longopts): Add --set option. * utils.xml (setfacl): Rename --substitute to --set. * new-features.xml (ov-new2.4): Rephrase setfacl changes. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* setfacl --mask/--no-mask really don't need an argumentHouder2015-12-202-2/+7
| | | | | | | * setfacl.cc (longopts): Drop accidentally requiring an argument to the --mask and --no-mask options. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix missing arg requirement for setfacl -x optionHouder2015-12-192-1/+5
| | | | | | * setfacl.cc (opts): Add colon to x option. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Drop sys_cp_wcstombs and save two arguments per callCorinna Vinschen2015-12-184-14/+12
| | | | | | | | | * strfuncs.cc (sys_cp_wcstombs): Delete and move functionality into sys_wcstombs. * wchar.h (sys_cp_wcstombs): Drop declaration. * fhandler_console.cc (dev_console::con_to_str): Call sys_wcstombs. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Build msp430-specific libnosysDJ Delorie2015-12-174-6/+12
| | | | | | | | | | The MSP430 debuggers support I/O on hardware through CIO, so we can use a CIO-enabled library as the "nosys" library (in addition to the libsim library, which talks to our simulator) * configure.in: Don't build default libnosys for msp430 * configure: Regenerate. * msp430/Makefile: Rename libcio to libnosys.
* ARC: Use new definitions for optional ARC CPU featuresAnton Kolesov2015-12-1724-69/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC for ARC has been updated to provide consistent naming of preprocessor definitions for different optional architecture features: * __ARC_BARREL_SHIFTER__ instead of __Xbarrel_shifter for -mbarrel-shifter * __ARC_LL64__ instead of __LL64__ for -mll64 * __ARCEM__ instead of __EM__ for -mcpu=arcem * __ARCHS__ instead of __HS__ for -mcpu=archs * etc (not used in newlib) This patch updates assembly routines for ARC to use new definitions instead of a deprecated ones. To ensure compatibility with older compiler new definitions are also defined in asm.h if needed, based on deprecated preprocessor definitions. *** newlib/ChangeLog *** 2015-12-15 Anton Kolesov <Anton.Kolesov@synopsys.com> * libc/machine/arc/asm.h: Define new GCC definition for old compiler. * libc/machine/arc/memcmp-bs-norm.S: Use new GCC defines to detect processor features. * libc/machine/arc/memcmp.S: Likewise. * libc/machine/arc/memcpy-archs.S: Likewise. * libc/machine/arc/memcpy-bs.S: Likewise. * libc/machine/arc/memcpy.S: Likewise. * libc/machine/arc/memset-archs.S: Likewise. * libc/machine/arc/memset-bs.S: Likewise. * libc/machine/arc/memset.S: Likewise. * libc/machine/arc/setjmp.S: Likewise. * libc/machine/arc/strchr-bs-norm.S: Likewise. * libc/machine/arc/strchr-bs.S: Likewise. * libc/machine/arc/strchr.S: Likewise. * libc/machine/arc/strcmp-archs.S: Likewise. * libc/machine/arc/strcmp.S: Likewise. * libc/machine/arc/strcpy-bs-arc600.S: Likewise. * libc/machine/arc/strcpy-bs.S: Likewise. * libc/machine/arc/strcpy.S: Likewise. * libc/machine/arc/strlen-bs-norm.S: Likewise. * libc/machine/arc/strlen-bs.S: Likewise. * libc/machine/arc/strlen.S: Likewise. * libc/machine/arc/strncpy-bs.S: Likewise. * libc/machine/arc/strncpy.S: Likewise. Signed-off-by: Anton Kolesov <Anton.Kolesov@synopsys.com>
* Remove inclusion of sys/select.h in sys/types.h for backward compatCorinna Vinschen2015-12-172-2/+4
| | | | | | * libc/include/sys/types.h: Remove including <sys/select.h>. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Update CIO hooks to be more flexible.DJ Delorie2015-12-172-9/+21
| | | | | | | Replace the one hook we had with two to avoid underscore issues. * msp430/cio.c: Remove, replace with... * msp430/cio.S: New, this.
* rl78: Don't output CR when LF is encountered in write().Kevin Buettner2015-12-162-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The file libgloss/rl78/write.c currently contains code which outputs \r when \n is seen. The code will then output the \n as well. This patch removes the bit of code that tests for \n and then outputs \r. I made this change to fix some failures in gdb.base/call-ar-st.exp. In that test, I see two carriage returns followed by a newline. One CR is output by the libgloss code. The other is output by the terminal driver. The total list of failures fixed (using the default rl78 multilib) are: FAIL: gdb.base/call-ar-st.exp: print print_double_array(double_array) (timeout) FAIL: gdb.base/call-ar-st.exp: print print_char_array(char_array) (timeout) FAIL: gdb.base/call-ar-st.exp: continue to tbreak2 (timeout) FAIL: gdb.base/call-ar-st.exp: continuing to tbreak3 (timeout) FAIL: gdb.base/call-ar-st.exp: print print_double_array(array_d) (timeout) FAIL: gdb.base/call-ar-st.exp: continuing to tbreak4 (timeout) FAIL: gdb.base/call-ar-st.exp: print sum_array_print(10, *list1, *list2, *list3, *list4) (timeout) FAIL: gdb.base/call-ar-st.exp: print print_small_structs (timeout) FAIL: gdb.base/call-ar-st.exp: print print_ten_doubles(123.456, 123.456, -0.12, -1.23, 343434.8, 89.098, 3.14, -5678.12345, -0.11111111, 216.97065) (timeout) FAIL: gdb.base/call-ar-st.exp: print print_small_structs from print_long_arg_list (timeout) FAIL: gdb.base/call-ar-st.exp: print print_struct_rep(*struct1, *struct2, *struct3) (timeout) FAIL: gdb.base/dprintf.exp: call: printf: 1st dprintf (timeout) FAIL: gdb.base/dprintf.exp: call: printf: 2nd dprintf (timeout) FAIL: gdb.base/interrupt.exp: process is alive (the program exited) There are no regressions. libgloss/ChangeLog: * rl78/write.c (_write): Don't output CR when LF is encountered.
* Add release message for previous commitCorinna Vinschen2015-12-161-0/+4
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix crash reading invalid SIDs from passwd and group filesCorinna Vinschen2015-12-163-4/+9
| | | | | | | * grp.cc (pwdgrp::parse_group): Only copy the SID if it's valid. * passwd.cc (pwdgrp::parse_passwd): Ditto. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Add usertemp to 2.4.0 release textCorinna Vinschen2015-12-151-0/+3
|
* Add _REENT_INIT_PTR_ZEROED()Sebastian Huber2015-12-142-6/+14
| | | | | | | | Provide a _REENT_INIT_PTR_ZEROED() macro to initialize an already zero-initialized struct _reent. * libc/include/sys/reent.h (_REENT_INIT_PTR_ZEROED): New. (_REENT_INIT_PTR): Define only once and use _REENT_INIT_PTR_ZEROED().
* FreeBSD compatibility for <sys/select.h>Sebastian Huber2015-12-148-23/+74
| | | | | | | | | | | | * libc/include/sys/_sigset.h: New. * libc/include/sys/select.h: Do not include <sys/types.h> and <sys/time.h> to avoid cyclic header file dependencies. Include specialized header files instead. (sigset_t): Conditionally define. * libc/include/sys/signal.h (sigset_t): Likewise. * libc/include/sys/time.h: Include <sys/select.h> if __BSD_VISIBLE. * libc/include/sys/types.h: Likewise.