summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add <sys/_stdint.h> for FreeBSD compatibilitySebastian Huber2015-04-236-46/+87
| | | | | | | | | | | | | | | | | | | | * libc/include/sys/_stdint.h: New file. * libc/include/stdint.h (int8_t): Move to <sys/_stdint.h>. (uint8_t): Likewise. (int16_t): Likewise. (uint16_t): Likewise. (int32_t): Likewise. (uint32_t): Likewise. (int64_t): Likewise. (uint64_t): Likewise. (intptr_t): Likewise. (uintptr_t): Likewise. * libc/include/sys/types.h: Include <sys/_stdint.h>. * libc/sys/rtems/machine/_types.h: Remove <stdint.h> include. * libc/sys/time.h>: Replace __uint32_t with uint32_t and __uint64_t with uint64_t. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Provide ucontext to signal handlersJon TURNEY2015-04-234-2/+70
| | | | | | | | | | | | | | Add ucontext.h header, defining ucontext_t and mcontext_t types. Provide sigaction sighandlers with a ucontext_t parameter, containing stack and context information. * include/sys/ucontext.h : New header. * include/ucontext.h : Ditto. * exceptions.cc (call_signal_handler): Provide ucontext_t parameter to signal handler function. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
* Make stack_t typedef generally availableJon TURNEY2015-04-232-9/+14
| | | | | | | * libc/include/sys/signal.h (stack_t): Make typedef generally available. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
* Add cygwin_internal() operation to retrieve the EXCEPTION_RECORD from a ↵Jon TURNEY2015-04-234-1/+26
| | | | | | | | | | | siginfo_t * * external.cc (cygwin_internal): Add operation to retrieve a copy of the EXCEPTION_RECORD from a siginfo_t *. * include/sys/cygwin.h (cygwin_getinfo_types): Ditto. * exception.h (cygwin_exception): Add exception_record accessor. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
* Rename struct ucontext to struct __mcontextJon TURNEY2015-04-232-9/+26
| | | | | | | | | * include/cygwin/signal.h : Rename struct ucontext to struct __mcontext. Fix layout differences from the Win32 API CONTEXT type. Remove unused member _internal. Rename member which corresponds to ContextFlags. Add cr2 member. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
* Fix UTF-16 surrogate handling in wctomb and friends.Corinna Vinschen2015-04-233-1/+9
| | | | | | | * libc/stdlib/wctomb_r.c (__utf8_wctomb): Fix check for handling a lone high surrogate. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Avoid potential crash at startup or in getgroups(2).Corinna Vinschen2015-04-233-1/+13
| | | | | | | * grp.cc (internal_getgroups): Handle negative domain index to avoid crashes. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix documentation of cygwin_internal()'s return type.Jon TURNEY2015-04-232-1/+5
| | | | | | * misc-funcs.xml (cygwin_internal): Correct return type. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
* Fix buffer size error handling in gethostname.Renato Silva2015-04-232-1/+8
| | | | | | * net.cc (cygwin_gethostname): Fix buffer size error handling. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Add release msgCorinna Vinschen2015-04-231-0/+10
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Document GNU basename.Corinna Vinschen2015-04-232-0/+23
| | | | | | | * new-features.xml (ov-new1.7.36): Add new section. Document GNU basename. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Don't allow fully qualified Windows account names.Corinna Vinschen2015-04-232-0/+12
| | | | | | | * uinfo.cc (pwdgrp::fetch_account_from_windows): Don't allow fully qualified Windows account names (domain\user or user@domain). Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Avoid excessive locking and calling tzset in time functions.Corinna Vinschen2015-04-234-5/+25
| | | | | | | | | | * libc/time/lcltime_r.c (localtime_r): Call _tzset_unlocked inside TZ lock. * libc/time/mktime.c (mktime): Ditto. * libc/time/strftime.c (strftime, wcsftime): Ditto. Guard against calling _tzset_unlocked more than once (baring recursion). Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Add _tzset_unlocked and _tzset_unlocked_rCorinna Vinschen2015-04-236-23/+49
| | | | | | | | | | | | | | | | | | | newlib: * libc/time/local.h (_tzset_unlocked_r): Add prototype. (_tzset_unlocked): Ditto. * libc/time/tzset.c (_tzset_unlocked): New function, call _tzset_unlocked_r. (tzset): Lock and call _tzset_unlocked_r. * libc/time/tzset_r (_tzset_unlocked_r): Remove locking and rename from _tzset_r. (_tzset_r): Lock and call _tzset_unlocked_r. cygwin: * localtime.cc (tzset_unlocked): Export as _tzset_unlocked. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Move tzset calls to time functions.Craig Howland2015-04-235-7/+13
| | | | | | | | | | * libc/stdlib/setenv_r.c (_setenv_r): Remove tzset() call for TZ definition. * libc/time/lcltime_r.c (localtime_r): Add tzset() call * libc/time/mktime.c (mktime): Ditto. * libc/time/strftime.c (strftime, wcsftime): Ditto. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* strftime: use tzname if TM_ZONE is NULLYaakov Selkowitz2015-04-232-3/+8
| | | | | | | This avoids a strlen(NULL) crash a few lines later. * libc/time/strftime.c (strftime) <%Z>: Initialize tznam to NULL. Use _tzname as fallback if TM_ZONE is NULL.
* cygwin: add GNU basename(3)Yaakov Selkowitz2015-04-235-1/+44
| | | | | | | | | | winsup/cygwin/ * common.din (__gnu_basename): Export. * path.cc (__gnu_basename): New function. winsup/doc/ * posix.xml (std-gnu): Add basename. (std-notes): Add note about two forms of basename.
* string: add GNU basename(3)Yaakov Selkowitz2015-04-236-2/+61
| | | | | | | | * libc/include/libgen.h (_BASENAME_DEFINED): Define. * libc/include/string.h (basename): Declare. * libc/string/Makefile.am (ELIX_4_SOURCES): Add gnu_basename.c. * libc/string/Makefile.in: Regenerate. * libc/string/gnu_basename.c: New file.
* Try best to handle user from domain not in trusted domain list.Corinna Vinschen2015-04-233-4/+45
| | | | | | | | | | * cygheap.h (cygheap_domain_info::add_domain): Add prototype. * uinfo.cc (cygheap_domain_info::add_domain): New method. (pwdgrp::fetch_account_from_windows): Try to add domain explicitely if it was not in the original list of trusted domains and go ahead rather than bailing out. Add comment to explain why. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Prepare to rename/reuse struct ucontext.Corinna Vinschen2015-04-236-112/+120
| | | | | | | | | * cygtls.h (struct _cygtls): Convert thread_context to type CONTEXT. * exceptions.cc (_cygtls::signal_debugger): Use sizeof (CONTEXT) for size of CONTEXT copied for GDB's digestion. * include/cygwin/signal.h: Add a preliminary comment. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Add CMIN and CTIME definitionsCorinna Vinschen2015-04-233-4/+11
| | | | | | | * include/sys/termios.h: Add CMIN and CTIME. * fhandler_termios.cc (fhandler_termios::tcinit): Use CMIN and CTIME. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Bump tty.cc copyright dateCorinna Vinschen2015-04-231-1/+1
|
* TIOCPKT mode of PTY is broken if ONLCR bit is cleared.Takashi Yano2015-04-237-132/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tty.h (class tty_min): Remove variable "write_error" to which any errors are not currently set at anywhere. (class tty): Add variable "column" for handling ONOCR. * tty.cc (tty::init): Add initialization code for variable "column". * fhandler.h (class fhandler_pty_master): Remove variable "need_nl" which is not necessary any more. "need_nl" was needed by OPOST process in fhandler_pty_master::process_slave_output(). (class fhandler_pty_common): Add function process_opost_output() for handling post processing for OPOST in write process. * fhandler_tty.cc (fhandler_pty_master::process_slave_output): Count TIOCPKT control byte into length to be read in TIOCPKT mode. Move post processing for OPOST to write process. Remove code related to variable "write_error". Return with EIO error if slave is already closed. (fhandler_pty_master::fhandler_pty_master): Remove initialization code for variable "need_nl". (fhandler_pty_common::process_opost_output): Add this function for handling of OPOST in write process. Add code to avoid blocking in non-blocking mode when output is suspended by ^S. (fhandler_pty_slave::write): Call fhandler_pty_common:: process_opost_output() instead of WriteFile(). Remove code related to variable "write_error". (fhandler_pty_master::doecho): Call fhandler_pty_common:: process_opost_output() instead of WriteFile(). * select.cc (peek_pipe): Remove code related to variable "need_nl". Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Import <sys/tree.h> from FreeBSDSebastian Huber2015-04-232-0/+805
| | | | * libc/include/sys/tree.h: New file.
* Ignore __STDC_{FORMAT,LIMIT,CONSTANT}_MACROSCorinna Vinschen2015-04-233-23/+9
| | | | | | | | | Per glibc BZ #15366: * inttypes.h: Drop __STDC_FORMAT_MACROS consideration. * stdint.h: Drop __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS consideration. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* * newlib.hin: Remove _UINTPTR_EQ_ULONG and _UINTPTR_EQ_ULONGLONG.Joel Sherrill2015-04-232-6/+4
| | | | | | 2013-03-23 Joel Sherrill <joel.sherrill@oarcorp.com> * newlib.hin: Remove _UINTPTR_EQ_ULONG and _UINTPTR_EQ_ULONGLONG.
* Change from configure time to compile time probe for intptr_t definition.Joel Sherrill2015-04-235-110/+36
| | | | | | | | | | | 2015-03-23 Joel Sherrill <joel.sherrill@oarcorp.com * configure.in: Delete logic to determine _UINTPTR_EQ_ULONGLONG and _UINTPTR_EQ_ULONG at configuration time. *libc/include/sys/config.h: Add logic to determine _UINTPTR_EQ_ULONGLONG and _UINTPTR_EQ_ULONG at compilation time. * libc/include/inttypes.h: Add include of <sys/config.h>. * configure: Regenerated.
* Drop cygwin/_types.h.Corinna Vinschen2015-04-232-16/+4
| | | | | | * include/cygwin/_types.h: Drop unused file. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Add ChangeLog entry for last patch to libc/include/sys/time.h.Steve Ellcey2015-04-231-0/+5
|
* Replace uint32_t/uint64_t type usage with __uint32_t/__uint64_t.Steve Ellcey2015-04-231-18/+18
| | | | | * libc/include/sys/time.h: Replace uint32_t and uint64_t with __uint32_t and __uint64_t.
* Implmenet faster getfrompw/getfromgrCorinna Vinschen2015-03-187-18/+43
| | | | | | | | | | | | | | | | | | * grp.cc (pwdgrp::parse_group): Call cygsid::getfromgr_passwd. * passwd.cc (pwdgrp::parse_passwd): Call cygsid::getfrompw_gecos. * pwdgrp.h (cygsid::getfrompw): Implement as inline method here, accessing pg_pwd's sid member directly. (cygsid::getfromgr): Implement as inline method here, accessing pg_grp's sid member directly. * sec_auth.cc (extract_nt_dom_user): Call cygsid::getfrompw_gecos. Explain why. * sec_helper.cc (cygsid::getfrompw): Drop implementation. (cygsid::getfromgr): Ditto. * security.h (cygsid::getfrompw_gecos): Implement former getfrompw inline here. (cygsid::getfromgr_passwd): Implement former getfromgr inline here. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Drop unneeded passwd argument from security functionsCorinna Vinschen2015-03-185-18/+31
| | | | | | | | | | | | | | | | * sec_auth.cc (get_server_groups): Drop unused passwd argument. Adjust calls throughout. (get_initgroups_sidlist): Ditto. (get_setgroups_sidlist): Ditto. (create_token): Ditto. (lsaauth): Ditto. * security.h (create_token): Adjust prototype to above change. (lsaauth): Ditto. (get_server_groups): Ditto. * grp.cc (get_groups): Adjust call to get_server_groups. * syscalls.cc (seteuid32): Adjust calls to lsaauth and create_token. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Drop unused timeoput paramter to internal_getloginCorinna Vinschen2015-03-174-7/+9
| | | | | | | | * grp.cc (internal_getgroups): Drop unused timeout parameter. * pwdgrp.h (internal_getgroups): Ditto in prototype. * uinfo.cc (internal_getlogin): Ditto in usage. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Add *.swp (Vim swap files) to .gitignoreCorinna Vinschen2015-03-171-0/+1
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Avoid name change if script is called via symlink from execvp et al.Corinna Vinschen2015-03-173-6/+14
| | | | | | | * spawn.cc (find_exec): Fix a name change in case of a symlink which can be opened as is. Signed-off-by: Corinna Vinschen <vinschen@redhat.com>
* Fix newlib texinfo source so 'info libc' and 'info libm' workJon TURNEY2015-03-163-6/+13
| | | | | | | | | | | | | | | | | | | | | | | If the newlib .info files are installed using install-info, 'info libc' and 'info libm' don't work. This seems to be due to the formatting of the directory entry line not being quite right, so fix that. Also use @direntry texinfo command, rather than writing .info directory entry literally. Also use @dircategory texinfo command to place into 'Newlib' category, rather than ending up in 'Miscellaneous' newlib/ChangeLog: 2015-03-13 Jon TURNEY <jon.turney@dronecode.org.uk> * libc/libc.texinfo: Fix directory entry. * libm/libm.texinfo: Ditto. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
* Fix winsup/doc to install into prefixJon TURNEY2015-03-162-0/+5
| | | | | | | | | | | | By default, docdir and htmldir are defined in terms of prefix, so make sure to define it, so their values are prefix-relative. Without this, 'make install' installs the documentation into /share/doc/ unless configured otherwise. * Makefile.in (prefix): Define. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
* Teach stackinfo::walk() how to virtually unwind the tls sigstackJon TURNEY2015-03-133-0/+21
| | | | | | | | | | This improves how stackinfo::dumpstack() dumps _sigbe and sigdelayed frames * exceptions.cc (stack_info): Add sigstackptr member. (walk): Unwind sigstackptr inside _sigbe and sigdelayed. * gendef (_sigdelayed_end): Add symbol to mark end of sigdelayed. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
* Remove now useless include/cygwin/sys_time.hCorinna Vinschen2015-03-132-27/+5
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Drop including cygwin/sys_time.h on Cygwin.Corinna Vinschen2015-03-132-4/+4
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Merge parts of <sys/time.h> from FreeBSDSebastian Huber2015-03-135-65/+539
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* net.cc: Remove extra braces.Alexey Pavlov2015-03-132-2/+7
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix typo in include/cygwin/version.hAlexey Pavlov2015-03-122-1/+5
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Drop defining _BSDTYPES_DEFINED before including winsup.h.Corinna Vinschen2015-03-122-2/+5
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Import libc/sys/rtems/include/semaphore.h from FreeBSD.Sebastian Huber2015-03-122-0/+60
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Let pty slave detect closure of last master handleTakashi Yano2015-03-122-3/+14
| | | | | | | * fhandler_tty.cc (fhandler_pty_master::close): Add code to make slave detect closure of master. Fix typo in error message. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix more typos in ntsec.xmlCorinna Vinschen2015-03-122-2/+7
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix typos in ntsec.xmlCorinna Vinschen2015-03-122-4/+10
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Add "tags" to .gitignoreCorinna Vinschen2015-03-111-0/+1
|
* Include sys/_timespec.h in cygwin/types.h to adjust to newlibCorinna Vinschen2015-03-112-1/+6
| | | | | | * include/cygwin/types.h: Include <sys/_timespec.h> Signed-off-by: Corinna Vinschen <corinna@vinschen.de>