]> sourceware.org Git - newlib-cygwin.git/log
newlib-cygwin.git
8 years agoRemove unnecessary locking in pthread_setcancelstate/pthread_setcanceltype
Corinna Vinschen [Tue, 8 Dec 2015 16:55:33 +0000 (17:55 +0100)]
Remove unnecessary locking in pthread_setcancelstate/pthread_setcanceltype

        * thread.cc (pthread::setcancelstate): Remove unnecessary locking.
        (pthread::setcanceltype): Ditto.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoRename FileId to IndexNumber in NT structures to align with upstream
Corinna Vinschen [Tue, 8 Dec 2015 13:33:07 +0000 (14:33 +0100)]
Rename FileId to IndexNumber in NT structures to align with upstream

        * ntdll.h (FILE_ID_BOTH_DIR_INFORMATION): Rename FileId to IndexNumber
        to align with Microsoft naming scheme.
        (FILE_INTERNAL_INFORMATION): Ditto.
        * fhandler_disk_file.cc: Rename FileId to IndexNumber throughout.
        * syscalls.cc: Ditto.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoFix minor style issue in _dll_crt0.
Corinna Vinschen [Mon, 7 Dec 2015 17:41:15 +0000 (18:41 +0100)]
Fix minor style issue in _dll_crt0.

Fix missing space.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoIntroduce the 'usertemp' filesystem type
Johannes Schindelin [Tue, 1 Dec 2015 14:02:14 +0000 (15:02 +0100)]
Introduce the 'usertemp' filesystem type

* mount.cc (mount_info::from_fstab_line): Support mounting the current
user's temp folder as /tmp/.  This is particularly useful a feature
when Cygwin's own files are write-protected.

* pathnames.xml: document the new usertemp file system type

Detailed explanation:

In the context of Windows, there is a per-user directory for temporary
files, by default specified via the environment variable %TEMP%. Let's
allow to use that directory for our /tmp/ directory.

With this patch, we introduce the special filesystem type "usertemp":
By specifying

none /tmp usertemp binary,posix=0 0 0

in /etc/fstab, the /tmp/ directory gets auto-mounted to the directory
specified by the %TEMP% variable.

This feature comes handy in particularly in scenarios where the
administrator might want to write-protect the entire Cygwin directory
yet still needs to allow users to write into the /tmp/ directory.
This is the case in the context of Git for Windows, where the
Cygwin (MSys2) root directory lives inside C:\Program Files and hence
/tmp/ would not be writable otherwise.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
8 years agoAdd definitions for NBBY to arm and rtems targets
Nick Withers [Mon, 7 Dec 2015 15:31:00 +0000 (16:31 +0100)]
Add definitions for NBBY to arm and rtems targets

* libc/sys/arm/sys/param.h (NBBY): Define if not already defined.
* libc/sys/rtems/include/sys/param.h (NBBY): Define.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoMove fd_stuff from sys/types.h to sys/select.h
Corinna Vinschen [Wed, 18 Nov 2015 21:13:31 +0000 (22:13 +0100)]
Move fd_stuff from sys/types.h to sys/select.h

* libc/include/sys/types.h: Move definitions of NBBY and howmany to
sys/param.h.  Move definitions of select(2) macros to sys/select.h.
* libc/include/sys/param.h: See above.
* libc/include/sys/select.h: Move Cygwin's sys/select.h here.

* include/sys/select.h: Move select(2) macros from newlib's sys/types.h
here.  Rename howmany to _howmany to unclutter namespace. Move file to
newlib.
* libc/rexex.cc: Add declaration for cygwin_gethostname.
* poll.cc: Include sys/param.h and locale select.h.
* select.h (cygwin_select): Declare.
* uname.cc: Declare cygwin_gethostname.
* winsup.h: Drop declarations of cygwin_select and cygwin_gethostname.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoAlways allocate main thread stack from pthread stack area on x86_64.
Corinna Vinschen [Mon, 7 Dec 2015 15:10:55 +0000 (16:10 +0100)]
Always allocate main thread stack from pthread stack area on x86_64.

        * dcrt0.cc: Semi-revert commit 12743c2d5d2721f3a80b4d7671a349be03c1f520.
        (dll_crt0_0): Drop setting wow64_needs_stack_adjustment on 64 bit.
        (_dll_crt0): Split out 64 bit code again and always create new main
        thread stack, unless forked off from the non main thread in the parent.
        Call create_new_main_thread_stack with parent stack commitsize if
        started from the parent's main thread.
        Only call child_info_fork::alloc_stack for the latter case on 64 bit.
        Slightly rearrange moving rsp and rbp to new stack and document how.
        Revert 32 bit wow64 handling to its former self.
        * miscfunc.cc (create_new_main_thread_stack): Take a commitsize
        parameter and use it if it's not 0.  Don't set _main_tls here, it's
        done in the caller _dll_crt0 anyway.  Return stackbase - 16 bytes,
        rather than stacklimit (which was very wrong anyway).
        * miscfuncs.h (create_new_main_thread_stack): Accommodate declaration
        to aforementioned change.
        * wincap.h (wincaps::has_3264_stack_broken): Remove element.
        * wincap.cc: Ditto, throughout.
        * wow64.cc: Semi-revert to pre-12743c2d5d2721f3a80b4d7671a349be03c1f520
        but keep architecture-agnostic type changes intact.  Fix formatting.
        * wow64.h: Revert to pre-12743c2d5d2721f3a80b4d7671a349be03c1f520.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoAllow cygwin_conv_path(3) and cygpath(1) to emit /proc/cygdrive prefixed path
Corinna Vinschen [Sun, 6 Dec 2015 16:25:48 +0000 (17:25 +0100)]
Allow cygwin_conv_path(3) and cygpath(1) to emit /proc/cygdrive prefixed path

        * include/sys/cygwin.h (CCP_PROC_CYGDRIVE): New flag.
        * mount.cc (mount_info::cygdrive_posix_path): Take flag values rather
        than just a trailing_slash_p bool.  Emit /proc/cygdrive path if
        CCP_PROC_CYGDRIVE flag is given.
        (mount_info::conv_to_posix_path): Take flag values rather than just
        a keep_rel_p bool.  Rename _p variables.  Print flag value as hex in
        debug_printf.  Call cygdrive_posix_path with flag values.
        * mount.h (mount_info::cygdrive_posix_path): Accommodate above change
        in declaration.
        (mount_info::conv_to_posix_path): Ditto.
        * fhandler_process.cc (format_process_exename): Accommodate change to
        mount_info::conv_to_posix_path.
        * path.cc (cygwin_conv_path): Ditto.

        * cygpath.cc (absolute_flag): Initialize to CCP_RELATIVE to simplify
        expressions.
        (cygdrive_flag): New global flag.
        (long_options): Add --proc-cygdrive option.
        (options): Add -U option.
        (usage): Add description for -U option.
        (do_sysfolders): Or cygdrive_flag to cygwin_conv_path call.
        (do_pathconv): Simply or absolute_flag to conv_func.  Or
        cygdrive_flag to conv_func.
        (do_options): Initalize absolute_flag to CCP_RELATIVE.  Initialize new
        cygdrive_flag.  Set absolute_flag to CCP_ABSOLUTE on -a.  Set
        cygdrive_flag to CCP_PROC_CYGDRIVE on -U.

        * new-features.xml (ov-new2.4): Document cygpath -U option.
        * utils.xml (cygpath): Ditto.
        * path.xml (func-cygwin-path): Add CCP_PROC_CYGDRIVE description.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoAlways define __high_bsssize, do not just PROVIDE it.
Nick Clifton [Fri, 4 Dec 2015 10:14:10 +0000 (10:14 +0000)]
Always define __high_bsssize, do not just PROVIDE it.

* msp430/msp430xl-sim.ld (__high_bsssize): Define.

8 years agoAdd release message for workaround added with previous commits
Corinna Vinschen [Thu, 3 Dec 2015 22:09:03 +0000 (23:09 +0100)]
Add release message for workaround added with previous commits

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoOn 64 bit, only create new thread stack if started from 32 bit process on affected...
Corinna Vinschen [Thu, 3 Dec 2015 21:56:44 +0000 (22:56 +0100)]
On 64 bit, only create new thread stack if started from 32 bit process on affected platforms

        * dcrt0.cc (dll_crt0_0): On 64 bit, set wow64_needs_stack_adjustment
        if not started from a 64 bit process.
        (_dll_crt0): Enable wow64_needs_stack_adjustment branch on 64 bit
        as well.  Remove 64 bit only code.  Introduce CREATE_STACK and
        FIX_STACK macros to conditionalize the code.  Rearrange and
        partially rewrite comments.
        * wincap.h (wincaps::has_3264_stack_broken): New element.
        * wincap.cc: Implement above element throughout.
        (wincapc::init): Set has_3264_stack_broken to false on 32 bit.
        * wow64.cc: Enable functionality on 64 bit architecture, except for
        wow64_revert_to_original_stack.  Enhance comments to explain.
        (wow64_eval_expected_main_stack): Make 64 bit clean.
        (wow64_test_for_64bit_parent): Ditto.
        * wow64.h: Export wow64_revert_to_original_stack on 32 bit only,
        everything else on all architectures.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoFix thinko in /proc/<PID>/maps TEB detection on W10 1511
Corinna Vinschen [Thu, 3 Dec 2015 15:54:08 +0000 (16:54 +0100)]
Fix thinko in /proc/<PID>/maps TEB detection on W10 1511

        * fhandler_process.cc (thread_info::thread_info): Accommodate the fact
        that TEBs take two pages.
        (thread_info::fill_if_match): Rewrite the method for post W10 1511 TEB
        detection.
        (format_process_maps): Add a state member to region.  Fix the code
        to handle PEB/TEB region since W10 1511.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoFix /proc/<PID>/maps output for PEB and TEBs on W10 1511
Corinna Vinschen [Thu, 3 Dec 2015 12:33:43 +0000 (13:33 +0100)]
Fix /proc/<PID>/maps output for PEB and TEBs on W10 1511

        * fhandler_process.cc (heap_info::fill_if_match): Return NULL, not 0.
        (thread_info::fill_if_match): Ditto.
        (thread_info::fill_if_match): New method to extract TEB info from
        PEB/TEB region since W10 1511.
        (format_process_maps): Drop outdated FIXME comment.  Add code to handle
        PEB/TEB region since W10 1511.
        * mmap.cc (posix_madvise): Align comment to new W10 1511 version.
        * wincap.h (wincaps::has_new_pebteb_region): New element.
        * wincap.cc: Implement above element throughout.
        (wincap_10_1511): New global wincaps to support Windows 10 since 1511.
        (wincapc::init): Use wincap_10_1511 for W10 builds >= 10586.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoAlways move 64 bit main thread stack to defined pthread stack area
Corinna Vinschen [Thu, 3 Dec 2015 12:02:55 +0000 (13:02 +0100)]
Always move 64 bit main thread stack to defined pthread stack area

         x86_64 only:
        * dcrt0.cc (_dll_crt0): Always move stack to pthread stack area.
        Explain why.
        * miscfuncs.cc (create_new_main_thread_stack): New function to create
        OS-like stack for main thread in pthread stack area.
        * miscfuncs.cc (create_new_main_thread_stack): Declare.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoCleanup in dcrt0.cc and fork.cc
Corinna Vinschen [Thu, 3 Dec 2015 11:59:56 +0000 (12:59 +0100)]
Cleanup in dcrt0.cc and fork.cc

        * dcrt0.cc (child_info_fork::alloc_stack): Fix formatting.
        * fork.cc (frok::parent): Fix formatting.
        (child_copy): Change type of res to BOOL.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoAlways restore full TEB stack info in forkee
Corinna Vinschen [Thu, 3 Dec 2015 11:58:37 +0000 (12:58 +0100)]
Always restore full TEB stack info in forkee

        * dcrt0.cc (dll_crt0_1): Always restore the TEB stack info.  Especially
        restore DeallocationStack.  Fix comment.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoAdd missing dcrt0.cc patch to previous commit
Corinna Vinschen [Thu, 3 Dec 2015 11:38:19 +0000 (12:38 +0100)]
Add missing dcrt0.cc patch to previous commit

* dcrt0.cc (child_info_fork::alloc_stack): Don't set stackaddr to 0.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoSafely recognize when fork is running from main thread or another pthread
Corinna Vinschen [Thu, 3 Dec 2015 11:38:19 +0000 (12:38 +0100)]
Safely recognize when fork is running from main thread or another pthread

        * child_info.h (struct child_info): Add member from_main.
        * fork.cc (frok::child): Check from_main rather than stackaddr.
        (frok::parent): Set ch.from_main if running in the main thread.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoRename parent stack members in child_info struct to align with OS names
Corinna Vinschen [Wed, 2 Dec 2015 11:31:40 +0000 (12:31 +0100)]
Rename parent stack members in child_info struct to align with OS names

        * child_info.h (CURR_CHILD_INFO_MAGIC): Align to below change.
        (class child_info_fork): Rename stacktop to stacklimit.  Rename
        stackbottom to stackbase.  Accommodate name change throughout Cygwin.
        Rephrase comments to be clearer.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoDrop using _tlsbase and _tlstop in favor of access via NtCurrentTeb.
Corinna Vinschen [Wed, 2 Dec 2015 11:11:06 +0000 (12:11 +0100)]
Drop using _tlsbase and _tlstop in favor of access via NtCurrentTeb.

        * cygtls.h (_tlsbase): Remove.  Replace throughout with
        NtCurrentTeb()->Tib.StackBase.
        (_tlstop): Remove. Replace throughout with
        NtCurrentTeb()->Tib.StackLimit.
        * dcrt0.cc (child_info_fork::alloc_stack): Move definition of local
        teb variable up to be used throughout.
        * include/cygwin/config.h (__getreent): Use inline function on both
        architectures.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agomiscfuncs.cc: Fix typos in comment
Corinna Vinschen [Wed, 2 Dec 2015 09:23:56 +0000 (10:23 +0100)]
miscfuncs.cc: Fix typos in comment

8 years agoOnly generate BUILTIN SIDs for uid/gid values <= 999
Corinna Vinschen [Sun, 29 Nov 2015 20:21:35 +0000 (21:21 +0100)]
Only generate BUILTIN SIDs for uid/gid values <= 999

* uinfo.cc (pwdgrp::fetch_account_from_windows): Only create 1-5-32-x
SIDs from ids for x <= 999.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoUse correct gid value for Microsoft Account when /etc/group is in use
Corinna Vinschen [Sun, 29 Nov 2015 19:26:48 +0000 (20:26 +0100)]
Use correct gid value for Microsoft Account when /etc/group is in use

* sec_acl.cc (get_posix_access): In case owner SID == group SID, when
encountering the group entry, change the value of `id' accordingly.
Explain why.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoSave and restore MXCSR register in delayed signal handling
Corinna Vinschen [Sat, 28 Nov 2015 10:10:41 +0000 (11:10 +0100)]
Save and restore MXCSR register in delayed signal handling

* gendef (sigdelayed): Save and restore content of the MXCSR register
on x86_64.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoBelatedly create release notes for commits 2f4fef9 and 9471b0b
Corinna Vinschen [Fri, 27 Nov 2015 14:56:01 +0000 (15:56 +0100)]
Belatedly create release notes for commits 2f4fef9 and 9471b0b

8 years agoFix race condition when waiting for a signal
Corinna Vinschen [Fri, 27 Nov 2015 13:39:11 +0000 (14:39 +0100)]
Fix race condition when waiting for a signal

        * cygtls.h (_cygtls::wait_signal_arrived): Renamed from
        set_signal_arrived.
        (_cygtls::set_signal_arrived): New function signalling signal_arrived.
        (_cygtls::reset_signal_arrived): Don't reset will_wait_for_signal.
        (_cygtls::unwait_signal_arrived): New function only resetting
        will_wait_for_signal.
        (class wait_signal_arrived): Rename from set_signal_arrived.
        Accommodate name change throughout Cygwin.
        (wait_signal_arrived::~wait_signal_arrived): Call
        _cygtls::unwait_signal_arrived.  Add comment.
        * cygserver_ipc.h (ipc_set_proc_info): Fetch signal_arrived handle
        via call to _cygtls::get_signal_arrived.
        * exceptions.cc (_cygtls::interrupt_setup): Signal signal_arrived via
        call to _cygtls::set_signal_arrived.
        (_cygtls::handle_SIGCONT): Ditto.
        * fhandler_socket.cc (fhandler_socket::wait_for_events): Generate
        WSAEVENT array prior to entering wait loop.  Add cancel event object
        if available.  Remove calls to pthread_testcancel and just call
        pthread::static_cancel_self if the cancel event object is signalled.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoFix SEGV of kill -l 0
Michael Kwasigroch [Thu, 26 Nov 2015 21:30:43 +0000 (22:30 +0100)]
Fix SEGV of kill -l 0

* kill.cc (strsigno): Don't call sys_sigabbrev for signal 0.
(listsig): Don't call strsigno for signal 0.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoFix creating relative native symlinks in top-level directories
Corinna Vinschen [Thu, 26 Nov 2015 11:12:52 +0000 (12:12 +0100)]
Fix creating relative native symlinks in top-level directories

* path.cc (symlink_native): Fix index when looking for colon in path.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoAdd MacType to BLODA
David Macek [Wed, 25 Nov 2015 12:49:42 +0000 (13:49 +0100)]
Add MacType to BLODA

One more patch. MacType was observed by several users to cause `GPGME:
Invalid crypto engine` failures in MSYS2. See
<https://github.com/Alexpux/MSYS2-packages/issues/393>.

I also removed two full stops in the sake of consistency.

* faq-using.xml: Add MacType to the BLODA.  Fix formatting.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoAdd a section describing peculiarities of how Cygwin creates NTFS symlinks
David Macek [Tue, 24 Nov 2015 22:59:01 +0000 (23:59 +0100)]
Add a section describing peculiarities of how Cygwin creates NTFS symlinks

First take on how to describe dereferencing of Cygwin-only symlinks path
components when creating NTFS symlinks.

Note that I haven't tried building the documentation, so I don't know if
the added paragraph breaks anything. Hopefully not.

* pathnames.xml: Add a section describing peculiarities of how Cygwin
creates NTFS symlinks.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoAdd Forefront TMG to the BLODA
David Macek [Tue, 24 Nov 2015 22:29:34 +0000 (23:29 +0100)]
Add Forefront TMG to the BLODA

A user of MSYS2 had non-deterministic segfaults when running simple
command from bash started from cmd. We've isolated the cause to
`C:\Program Files (x86)\Forefront TMG Client\FwcWsp64.dll`. See
<http://sourceforge.net/p/msys2/tickets/212/> for a little more
information.

It seems enough to include the software in BLODA, but if not, sorry for
the unsolicited patch and let's discuss.

* faq-using.xml: Add Forefront TMG to the BLODA

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoOnly build _strtodg_r on targets supporting a distinct long double type
Corinna Vinschen [Thu, 26 Nov 2015 09:13:53 +0000 (10:13 +0100)]
Only build _strtodg_r on targets supporting a distinct long double type

* libc/stdlib/strtodg.c: Add ifdef to check _HAVE_LONG_DOUBLE and
_LDBL_EQ_DBL.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years ago libc/stdlib/strtorx.c: Fix ifdef to check _LDBL_EQ_DBL.
Steve Ellcey [Tue, 24 Nov 2015 21:59:31 +0000 (13:59 -0800)]
libc/stdlib/strtorx.c: Fix ifdef to check _LDBL_EQ_DBL.

8 years ago[ARM] Adjust strcmp-armv7.S selection logic.
Marcus Shawcroft [Fri, 13 Nov 2015 13:53:38 +0000 (13:53 +0000)]
[ARM] Adjust strcmp-armv7.S selection logic.

Reformulate the strcmp-armv7.S selection logic around the architecture
features required by the implementation code rather (some) version of
the architecture that expose those features.

8 years ago[ARM] Factor out the thumb2 -Os implementation.
Marcus Shawcroft [Fri, 13 Nov 2015 14:26:22 +0000 (14:26 +0000)]
[ARM] Factor out the thumb2 -Os implementation.

The patch moves the inline ASM thumb2 -Os implementation out into its
own .S file.

Tested by building newlib and comparing libc.a binaries before and
after for all permutations of:

      Architectures:
        armv4 armv4t armv5 armv5t armv5te armv6 armv6j armv6k
        armv6z armv6kz armv6t2 armv6-m armv6s-m armv7 armv7-a
        armv7ve armv7-r armv7-m armv7e-m armv8-a iwmmxt iwmmxt2

      ISAs:
        thumb arm

      Optimization Levels:
        Os O2

      Excluding:
        armv6s-m -mthumb
        armv6-m -mthumb

        armv6zk -mthumb
        armv6z -mthumb
        armv6k -mthumb
        armv6j -mthumb

8 years agoFix initialisation of .upper.bss for the MSP430.
Nick Clifton [Mon, 23 Nov 2015 09:00:23 +0000 (09:00 +0000)]
Fix initialisation of .upper.bss for the MSP430.

* msp430/msp430xl-sim.ld (__high_bsssize): Define.

8 years agoFix numeric and monetary decimal point and thousands separator in fa_IR and ps_AF...
Corinna Vinschen [Sat, 21 Nov 2015 15:51:12 +0000 (16:51 +0100)]
Fix numeric and monetary decimal point and thousands separator in fa_IR and ps_AF locales

* nlsfuncs.cc (setlocaleinfo): New macro calling __setlocaleinfo.
(__setlocaleinfo): New function to set a locale-specific character
to an explicit wchar_t value.
(__set_lc_numeric_from_win): Handle fa_IR and ps_AF locales to return
same decimal point and thousands separator characters as on Linux.
(__set_lc_monetary_from_win): Ditto for monetary characters.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoHandle multibyte decimapl point in strtold.
Corinna Vinschen [Sat, 21 Nov 2015 15:40:21 +0000 (16:40 +0100)]
Handle multibyte decimapl point in strtold.

* libc/stdlib/strtodg.c: Define USE_LOCALE.
(_strtodg_r): Handle multibyte decimal point.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoMention strtold patch in Cygwin 2.4.0 release message
Corinna Vinschen [Fri, 20 Nov 2015 19:29:50 +0000 (20:29 +0100)]
Mention strtold patch in Cygwin 2.4.0 release message

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoImport correctly working strtold from David M. Gay.
Corinna Vinschen [Fri, 20 Nov 2015 17:14:58 +0000 (18:14 +0100)]
Import correctly working strtold from David M. Gay.

* libc/stdlib/Makefile.am (GENERAL_SOURCES): Add strtodg.c and
strtorx.c.
* libc/stdlib/Makefile.in: Regenerate.
* libc/stdlib/strtodg.c: New file implementing generic string to long
double conversion.
* libc/stdlib/strtorx.c: New file, implementing IEEE format string to
long double conversion.
* libc/stdlib/mprec.h (_strtodg_r): Declare.
(_strtorx_r): Declare.
* libc/stdlib/gdtoa.h (__UShort): Define.
* libc/stdlib/strtold.c (__flt_rounds): Define for i386 and x86_64
target.
(FLT_ROUNDS): Define, as 0 on platforms missing a __flt_rounds
function.
(_strtold_r): Converted from strtold.  Call _strtorx_r on targets
supporting distinct long doubles.
(strtold): Just call _strtold_r.
* libc/include/stdlib.h (_strtold_r): Declare.
* libc/stdlib/ldtoa.c (_strtold): Comment out.  Explain why.
* libc/stdio/vfscanf.c (__SVFSCANF_R): Call _strtold_r instead of
_strtold.
* libc/machine/powerpc/vfscanf.c (__svfscanf_r): Ditto.

* common.din (strtold): Drop redirection to _strtold.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoMake match function globally available to stdlib functions.
Corinna Vinschen [Fri, 20 Nov 2015 17:03:05 +0000 (18:03 +0100)]
Make match function globally available to stdlib functions.

* libc/stdlib/strtod.c (match): Move from here...
* libc/stdlib/gdtoa-hexnan.c (match): ...to here.
* libc/stdlib/mprec.h (match): Declare and add __match define.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoDrop unused declaration from wcstold.c
Corinna Vinschen [Fri, 20 Nov 2015 16:57:20 +0000 (17:57 +0100)]
Drop unused declaration from wcstold.c

* libc/stdlib/wcstold.c (_strtold): Drop unused declaration.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoFix typo in rpmatch doc reference
Yaakov Selkowitz [Thu, 19 Nov 2015 21:28:06 +0000 (15:28 -0600)]
Fix typo in rpmatch doc reference

* libc/stdlib/stdlib.tex: Fix typo in rpmatch reference.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
8 years agoldtoa.c: Reindent to GNU style
Corinna Vinschen [Thu, 19 Nov 2015 16:09:58 +0000 (17:09 +0100)]
ldtoa.c: Reindent to GNU style

* libc/stdlib/ldtoa.c: Convert to GNU style so as not to get crazy
reading the code.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoFix rpmatch build problem
Corinna Vinschen [Thu, 19 Nov 2015 15:31:08 +0000 (16:31 +0100)]
Fix rpmatch build problem

* libc/stdlib/rpmatch.c: Include sys/types.h to make GCC happy.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoSimplify the markup for sprintf and swprintf documentation
Jon Turney [Thu, 12 Nov 2015 13:11:07 +0000 (13:11 +0000)]
Simplify the markup for sprintf and swprintf documentation

- move the description of the alternative form produced with the # flag from a
nested table to an additional table

2015-11-12  Jon Turney  <jon.turney@dronecode.org.uk>

* libc/stdio/sprintf.c: Simplify documentation markup.
* libc/stdio/swprintf.c: Ditto.

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
8 years agoImprove markup of sscanf and swscanf documentation
Jon Turney [Thu, 12 Nov 2015 13:13:34 +0000 (13:13 +0000)]
Improve markup of sscanf and swscanf documentation

- use bullet points to separate width, size and type sections, rather than using
rows in an enormous table, for consistency with sprintf and swprintf.

- use code markup for size bullet point for consistency

- use a texinfo multitable for description of the size flags, rather than some
preformatted text

- tidy up some whitespace so type flags are all aligned

2015-11-12  Jon Turney  <jon.turney@dronecode.org.uk>

* libc/stdio/sscanf.c: Improve documentation markup.
* libc/stdio/swscanf.c: Ditto.

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
8 years agoDocument new ACL code
Corinna Vinschen [Wed, 18 Nov 2015 22:11:10 +0000 (23:11 +0100)]
Document new ACL code

* new-features.xml (ov-new2.4): Add new ACL changes.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoget_posix_access: Skip merging permissions if user can't get more permissions
Corinna Vinschen [Tue, 10 Nov 2015 09:00:33 +0000 (10:00 +0100)]
get_posix_access: Skip merging permissions if user can't get more permissions

        * sec_acl.cc (get_posix_access): Skip merging permissions if current
        user has rwx permissions anywa, or if the sum of all group and other
        permissions is less than or equal to the user's permissions.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoget_posix_access: Fix computation of effective user permissions
Corinna Vinschen [Tue, 10 Nov 2015 08:57:53 +0000 (09:57 +0100)]
get_posix_access: Fix computation of effective user permissions

        * sec_acl.cc (get_posix_access): Fix computation of effective user
permissions to handle current user, not only the file owner.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoFix file type mode bit handling on object security.
Corinna Vinschen [Thu, 3 Sep 2015 17:29:55 +0000 (19:29 +0200)]
Fix file type mode bit handling on object security.

* fhandler_tty.cc (fhandler_pty_slave::open): Add S_IFCHR flag
in call to create_object_sd_from_attribute.
(fhandler_pty_slave::fstat): Ditto in call to get_object_attribute.
(fhandler_pty_slave::fchmod): Add an orig_mode flag and ditto for
both calls.
(fhandler_pty_master::setup): Ditto in call to
create_object_sd_from_attribute.
* security.cc (get_object_attribute): Never add S_IFCHR to mode
here.  Let the caller decide.
(create_object_sd_from_attribute): Ditto.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agosetfacl: Allow to combine -b and -k options
Corinna Vinschen [Wed, 2 Sep 2015 10:23:09 +0000 (12:23 +0200)]
setfacl: Allow to combine -b and -k options

* setfacl.c (action_t): Rename DeleteAll to DeleteExt.  Add
DeleteAll.  Rearrange for bit-wise testing later in the code.
(delallacl): Handle -b -k combination.
(setfacl): Handle DeleteExt/DeleteAll.
(usage): Fix -b/-k output.  Rearrange output to better fill 80
columns.
(main): Allow to combine -b and -k.

* utils.xml (setfacl): Accommodate -b/-k change.
* new-features.xml (ov-new2.3): Add setfacl -b/-k change.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoFix permission evaluation for !new_style ACLs
Corinna Vinschen [Tue, 1 Sep 2015 22:05:46 +0000 (00:05 +0200)]
Fix permission evaluation for !new_style ACLs

* security.h (authz_get_user_attribute): Declare bool.
* sec_helper.cc (authz_ctx::get_user_attribute): Make bool method.
Set S_IxOTH bits in returned attributes rather than S_IxUSR bits.
(authz_get_user_attribute): Make bool function.
* sec_acl.cc (get_posix_access): Introduce cygsid array to keep
track of all SIDs in the ACL.  Move AuthZ calls into !new_style
permission post processing.  When not using AuthZ, use
CheckTokenMembership to collect group permissions.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoFix up POSIX permission handling
Corinna Vinschen [Tue, 1 Sep 2015 20:23:59 +0000 (22:23 +0200)]
Fix up POSIX permission handling

* fhandler_disk_file.cc (fhandler_disk_file::fchmod): Disable
deviation from POSIX 1003.1e in terms of GROUP_OBJ/CLASS_OBJ
permissions.  Follow POSIX 1003.1e again.  Keep old code in
for future reference.
* sec_acl.cc: Accommodate changes in ACE creation in leading
comment.
(set_posix_access): Fix user deny ACE creation.  Split group
deny ACE creation into two steps, one to reflect CLASS_OBJ,
the other to reflect OTHER_OBJ.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoUse Authz to fetch correct user permissions.
Corinna Vinschen [Mon, 31 Aug 2015 09:34:38 +0000 (11:34 +0200)]
Use Authz to fetch correct user permissions.

* sec_acl.cc (getacl): Use Authz to fetch correct user permissions.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoAdd Authz class to compute exact POSIX user perms in a security descriptor
Corinna Vinschen [Mon, 17 Aug 2015 16:29:24 +0000 (18:29 +0200)]
Add Authz class to compute exact POSIX user perms in a security descriptor

* autoload.cc (AuthzAccessCheck): Import.
(AuthzFreeContext): Import.
(AuthzInitializeContextFromSid): Import.
(AuthzInitializeContextFromToken): Import.
(AuthzInitializeResourceManager): Import.
* sec_helper.cc (get_sids_info): Remove.
(class authz_ctx_cache_entry): New class.
(class authz_ctx_cache): New class.
(class authz_ctx): New class.
(authz_get_user_attribute): New function.
* security.h (get_sids_info): Drop prototype.
(authz_get_user_attribute): Add prototype.
* winlean.h (_AUTHZ_): Define.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years ago* sec_acl.cc (get_posix_access): Fix class_perm in !new_style case.
Corinna Vinschen [Mon, 31 Aug 2015 14:56:14 +0000 (16:56 +0200)]
* sec_acl.cc (get_posix_access): Fix class_perm in !new_style case.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoReapply POSIX ACL changes.
Corinna Vinschen [Wed, 24 Jun 2015 09:52:29 +0000 (11:52 +0200)]
Reapply POSIX ACL changes.

  - New, unified implementation of POSIX permission and ACL handling.  The
    new ACLs now store the POSIX ACL MASK/CLASS_OBJ permission mask, and
    they allow to inherit the S_ISGID bit.  ACL inheritance now really
    works as desired, in a limited, but theoretically equivalent fashion
    even for non-Cygwin processes.

    To accommodate Windows default ACLs, the new code ignores SYSTEM and
    Administrators group permissions when computing the MASK/CLASS_OBJ
    permission mask on old ACLs, and it doesn't deny access to SYSTEM and
    Administrators group based on the value of MASK/CLASS_OBJ when
    creating the new ACLs.

    The new code now handles the S_ISGID bit on directories as on Linux:
    Setting S_ISGID on a directory causes new files and subdirs created
    within to inherit its group, rather than the primary group of the user
    who created the file.  This only works for files and directories
    created by Cygwin processes.

2015-05-29  Corinna Vinschen  <corinna@vinschen.de>

Reapply POSIX ACL changes.

* utils.xml (setfacl): Show new option output.
(getfacl): Show new option output.

* sec_acl.cc (get_posix_access): Check for Cygwin "standard" ACL.
Apply umask, if so.  Align comments.
* security.cc (set_created_file_access): Fix permission masking by
incoming requested file mode.

* sec_acl.cc (set_posix_access): Apply mask only in terms of execute bit
for SYSTEM and Admins group.

* sec_acl.cc (set_posix_access): Don't create DENY ACEs for USER and
GROUP entries if they are the same as USER_OBJ or GROUP_OBJ.

* fhandler.h (fhandler_pty_slave::facl): Add prototype.
* fhandler_tty.cc (fhandler_pty_slave::facl): New method.
(fhandler_pty_slave::fchown): Fix uid/gid handling.
* sec_acl.cc (set_posix_access): Drop superfluous class_idx variable.
Simplify and move around code in a few places.  To improve ACL
readability, add r/w permissions to Admins ACE appended to pty ACL.
Add comment to explain Windows ACE Mask filtering being in the way of
creating a real CLASS_OBJ.
(get_posix_access): Fake CLASS_OBJ for ptys.  Explain why.
* security.cc (get_object_attribute): Add S_IFCHR flag to attributes
when calling get_posix_access.

* sec_acl.cc (set_posix_access): Move merging group perms into owner
perms in case of owner == group after mask has been computed.  Take
mask into account when doing so to avoid unnecessary ACCESS_DENIED_ACE.

* sec_acl.cc (get_posix_access): Only set saw_group_obj flag if we saw
the ACCESS_ALLOWED_ACE.

* fhandler_disk_file.cc (fhandler_disk_file::fchmod): Deliberatly
set GROUP_OBJ and CLASS_OBJ perms to new group perms.  Add comment
to explain why.
* security.cc (set_created_file_access): Ditto.

* sec_acl.cc (set_posix_access): Replace previous patch.  Return
EINVAL if uid and/or guid is invalid and not backed by an actual
Windows account.

* sec_acl.cc (set_posix_access): Workaround owner/group SIDs being NULL.

* sec_acl.cc (set_posix_access): Handle files with owner == group.
Rephrase switch statement checking against unfiltered a_type value.
(get_posix_access): Handle files with owner == group.

* sec_acl.cc (get_posix_access): Don't use GROUP_OBJ access to fix up
CLASS_OBJ mask on old-style ACLs.  Fix a comment.

* sec_acl.cc (set_posix_access): Always make sure Admins have
WRITE_DAC and WRITE_OWNER permissions.
* security.h (create_object_sd_from_attribute): Drop handle parameter
from prototype.
* security.cc (create_object_sd_from_attribute): Drop handle parameter.
Just create the standard POSIXy security descriptor.
(set_object_attribute): Accommodate dropped paramter in call to
create_object_sd_from_attribute.
* fhandler_tty.cc: Ditto, throughout.

* fhandler_disk_file.cc (fhandler_disk_file::fchmod): Fix typo in
mask computation.

* fhandler.cc (fhandler_base::open_with_arch): Call open with mode
not umasked.
(fhandler_base::open): Explicitely umask mode on NFS here.  Call new
set_created_file_access rather than set_file_attribute.
* fhandler_disk_file.cc (fhandler_disk_file::fchmod): Reimplement
setting permissions on filesystems supporting ACLs using the new
set_posix_access call.
(fhandler_disk_file::fchown): Ditto.
(fhandler_disk_file::mkdir): Call new set_created_file_access rather
than set_file_attribute.
* fhandler_socket.cc (fhandler_socket::bind): Don't umask here.  Add
WRITE_OWNER access to allow writing group in case of SGID bit set.
Call new set_created_file_access rather than set_file_attribute.
* path.cc (symlink_worker): Call new set_created_file_access rather
than set_file_attribute.
* sec_acl.cc (searchace): Un-staticize.
(set_posix_access): New, complementary functionality to
get_posix_access.
(setacl): Implement in terms of get_posix_access/set_posix_access.
(get_posix_access): Add handling for just created files requiring
their first Cygwin ACL.  Fix new_style recognition.  Handle SGID
bit.  For old-style ACLs, ignore SYSTEM and Administrators when
computing the {DEF_}CLASS_OBJ perms.
* security.cc (get_file_sd): Revamp comment.  Change and (hopefully)
speed up inheritance processing for just created files.
(alloc_sd): Remove.
(set_security_attribute): Call set_posix_access instead of alloc_sd.
(get_object_attribute): Fix return value.
(create_object_sd_from_attribute): Call set_posix_access instead of
alloc_sd.
(set_file_attribute): Remove.
(set_created_file_access): New function implemented in terms of
get_posix_access/set_posix_access.
* security.h (set_file_attribute): Remove prototype.
(set_created_file_access): Add prototype.
(searchace): Ditto.
(set_posix_access): Ditto.
* syscalls.cc (open): Call open_with_arch with mode not umasked.

* sec_acl.cc: Change preceeding comment explaining new-style ACLs.
Describe how to generate deny ACEs in more detail.  Accommodate the
fact that a NULL deny ACE is used for {DEF_}CLASS_OBJ, rather than
a special Cygwin ACE.  Improve further comments.
(CYG_ACE_NEW_STYLE): Define.
(get_posix_access): Change from Cygwin ACE to NULL deny ACE.  Fix
CLASS_OBJ handling to generate CLASS_OBJ and DEF_CLASS_OBJ from a single
NULL deny ACE if the inheritance flags say so.
* sec_helper.cc (well_known_cygwin_sid): Remove.
* security.h (well_known_cygwin_sid): Drop declaration.

* sec_acl.cc (CYG_ACE_ISBITS_TO_WIN): Fix typo.
(get_posix_access): Rename index variable from i to idx.  Define only
once at top level.

* security.cc (add_access_allowed_ace): Drop unused parameter "offset".
Accommodate throughout.
(add_access_denied_ace): Ditto.
* sec_acl.cc: Accommodate above change throughout.
* security.h (add_access_allowed_ace): Adjust prototype to above change.
(add_access_denied_ace): Ditto.

* sec_acl.cc (get_posix_access): Handle multiple ACEs for the
owner and primary group of the file.  Handle the default primary
group ACE as DEF_GROUP_OBJ entry if the directory has the S_ISGID bit
set.  Add comments.  Minor code rearrangements.

Preliminary read side implementation of new permission handling.
* acl.h (MAX_ACL_ENTRIES): Raise to 2730.  Add comment to explain.
* sec_acl.cc:  Add leading comment to explain new ACL style.
Add definitions and macros to use for bits in new Cygwin ACL.
(DENY_RWX): New mask value for all temporary deny bits.
(getace): Add bool parameter to decide when leaving all bits intact,
rather than filtering them per the already set bits.
(get_posix_access): New function, taking over functionality to read
POSIX ACL from SECURITY_DESCRIPTOR.
(getacl): Just call get_posix_access.
* sec_helper.cc (well_known_cygwin_sid): Define.
* security.cc (get_attribute_from_acl): Remove.
(get_info_from_sd): Remove.
(get_reg_sd): Call get_posix_access instead of get_info_from_sd.
(get_file_attribute): Ditto.
(get_object_attribute): Ditto.
* security.h (well_known_cygwin_sid): Declare.
(get_posix_access): Add prototype.

* Throughout, use simpler ACE macros from Windows' accctrl.h.

* getfacl.c (main): Special-case SYSTEM and Admins group.  Add comments.

* setfacl.c: Align more to Linux tool.
(delacl): New function to delete acl entries only.
(modacl): Drop delete functionality.  Add handling of recomputing the
mask and default mask values.
(delallacl): Rename from delacl.
(setfacl): Call delacl in Delete case.  Call delallacl in DeleteAll
and DeleteDef case.
(usage): Accommodate new options.  Rearrange and rephrase slightly.
(longopts): Emit 'x' in --delete case.  Add --no-mask and --mask
options.
(opts): Add -x and -n options.
(main): Handle -d and -x the same.  Handle -n and --mask options.
Drop handling for -r option.

* getfacl.c (usage): Align more closely to Linux version.  Add new
options -c, -e, -E.  Change formatting to accommodate longer options.
(longopts): Rename --noname to --numeric.  Keep --noname for backward
compatibility.  Add --omit-header, --all-effective and --no-effective
options.
(opts): Add -c, -e and -E option.
(main): Handle new -c, -e, and -E options.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoBump Cygwin DLL version to 2.4.0
Corinna Vinschen [Wed, 18 Nov 2015 21:11:54 +0000 (22:11 +0100)]
Bump Cygwin DLL version to 2.4.0

* include/cygwin/version.h (CYGWIN_VERSION_DLL_MAJOR): Bump to 2004.
(CYGWIN_VERSION_API_MINOR): Reset to 0.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoAdd missing ChangeLog entry for previous commit
Corinna Vinschen [Wed, 18 Nov 2015 21:05:21 +0000 (22:05 +0100)]
Add missing ChangeLog entry for previous commit

8 years agoUpdate Cygwin's fnmatch to latest from FreeBSD.
Corinna Vinschen [Wed, 18 Nov 2015 19:51:12 +0000 (20:51 +0100)]
Update Cygwin's fnmatch to latest from FreeBSD.

        * collate.h (__collate_load_error): Convert to extern declaration.
        * globals.cc (__collate_load_error): Define and initialize here.
        * libc/fnmatch.c: Update to latest from FreeBSD.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoDon't generate Windows native symlinks targeting Cygwin-only targets
Corinna Vinschen [Wed, 18 Nov 2015 18:12:37 +0000 (19:12 +0100)]
Don't generate Windows native symlinks targeting Cygwin-only targets

* path.cc (symlink_native): Don't generate native symlink targeting
Cygwin special file.  Inform the caller.
(symlink_worker): Don;t bail out in WSYM_nativestrict case if the
target is a Cygwin special file.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoRegenerate Cygwin locale message info
Corinna Vinschen [Wed, 18 Nov 2015 18:09:30 +0000 (19:09 +0100)]
Regenerate Cygwin locale message info

* lc_msg.h: Regenerate.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agocygwin: export rpmatch(3)
Yaakov Selkowitz [Tue, 17 Nov 2015 18:23:33 +0000 (12:23 -0600)]
cygwin: export rpmatch(3)

winsup/cygwin/
* common.din (rpmatch): Export.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.

winsup/doc/
* new-features.xml (ov-new2.4): New section. Document rpmatch.
* posix.xml (std-bsd): Add rpmatch.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
8 years agoAdd rpmatch(3)
Yaakov Selkowitz [Tue, 17 Nov 2015 17:53:00 +0000 (11:53 -0600)]
Add rpmatch(3)

2015-11-17  Yaakov Selkowitz  <yselkowi@redhat.com>

* libc/include/stdlib.h (rpmatch): Declare.
* libc/stdlib/Makefile.am (ELIX_4_SOURCES): Add rpmatch.c.
(CHEWOUT_FILES): Add rpmatch.def.
* libc/stdlib/Makefile.in: Regenerate.
* libc/stdlib/rpmatch.c: New file.
* libc/stdlib/stdlib.tex: Add references to rpmatch.

8 years ago[ARM] Factor out the thumb1 -Os implementation. cygwin-2_3_1-relase cygwin-2_3_1-release
Marcus Shawcroft [Tue, 10 Nov 2015 15:12:30 +0000 (15:12 +0000)]
[ARM] Factor out the thumb1 -Os implementation.

The patch moves the inline ASM thumb1 -O2 implementation out into its
own .S file.

Tested by building newlib and comparing libc.a binaries before and
after for all permutations of:

      Architectures:
        armv4 armv4t armv5 armv5t armv5te armv6 armv6j armv6k
        armv6z armv6kz armv6t2 armv6-m armv6s-m armv7 armv7-a
        armv7ve armv7-r armv7-m armv7e-m armv8-a iwmmxt iwmmxt2

      ISAs:
        thumb arm

      Optimization Levels:
        Os O2

      Excluding:
        armv6s-m -mthumb
        armv6-m -mthumb

        armv6zk -mthumb
        armv6z -mthumb
        armv6k -mthumb
        armv6j -mthumb

8 years ago[ARM] Adding strlen.S
Marcus Shawcroft [Tue, 10 Nov 2015 14:08:42 +0000 (14:08 +0000)]
[ARM] Adding strlen.S

The patch adds strlen.S to contain the complementary preprocessor
logic to strlen-stub.c intended to provide #inclusion of alternative
.S implementations.

Initially we just include the existing strlen-armv7.S implementation.

We rewrite _ISA_ARMV7 in both strlen.S and strlen-stub.c to use the
underlying existing underlying defintion from arm_asm.h in order to
avoide including that file, this is in effect the first step towards a
move to ACLE predefines only.

Tested by building newlib and comparing libc.a binaries before and
after for all permutations of:

      Architectures:
        armv4 armv4t armv5 armv5t armv5te armv6 armv6j armv6k
        armv6z armv6kz armv6t2 armv6-m armv6s-m armv7 armv7-a
        armv7ve armv7-r armv7-m armv7e-m armv8-a iwmmxt iwmmxt2

      ISAs:
        thumb arm

      Optimization Levels:
        Os O2

      Excluding:
        armv6s-m -mthumb
        armv6-m -mthumb

        armv6zk -mthumb
        armv6z -mthumb
        armv6k -mthumb
        armv6j -mthumb

8 years ago[ARM] Rename strlen to strlen-stub.c
Marcus Shawcroft [Tue, 10 Nov 2015 14:04:54 +0000 (14:04 +0000)]
[ARM] Rename strlen to strlen-stub.c

In order to maintain consistency both within machine/arm and between
machine/arm and machine/aarch64, rename the 'c' stub to -stub.c.

Tested by building newlib and comparing libc.a binaries before and
after for all permutations of:

      Architectures:
        armv4 armv4t armv5 armv5t armv5te armv6 armv6j armv6k
        armv6z armv6kz armv6t2 armv6-m armv6s-m armv7 armv7-a
        armv7ve armv7-r armv7-m armv7e-m armv8-a iwmmxt iwmmxt2

      ISAs:
        thumb arm

      Optimization Levels:
       Os O2

      Excluding:
        armv6s-m -mthumb
        armv6-m -mthumb

        armv6zk -mthumb
        armv6z -mthumb
        armv6k -mthumb
        armv6j -mthumb

8 years ago[ARM] Reorganize strlen selection.
Marcus Shawcroft [Mon, 9 Nov 2015 23:25:36 +0000 (23:25 +0000)]
[ARM] Reorganize strlen selection.

Remove automake and autoconf selection of strchr implementation in
favour of conditional compilation in strlen.c.

8 years ago[ARM] Refactor strlen.c #if nesting.
Marcus Shawcroft [Mon, 9 Nov 2015 15:01:31 +0000 (15:01 +0000)]
[ARM] Refactor strlen.c #if nesting.

This patch flattens the condition code selection used in strlen in an
attempt to make the guarding condition for each alternative
implementation clearer and to structure the logic in a manner that
makes it easier to maintain complementary logic between the
alternative 'C' and assembler implementations.

Tested by building newlib and comparing libc.a binaries before and
after for all permutations of:

  Architectures:
    armv4 armv4t armv5 armv5t armv5te armv6 armv6j armv6k
    armv6z armv6kz armv6t2 armv6-m armv6s-m armv7 armv7-a
    armv7ve armv7-r armv7-m armv7e-m armv8-a iwmmxt iwmmxt2

  ISAs:
    thumb arm

  Optimization Levels:
    Os O2

  Excluding:
    armv6s-m -mthumb
    armv6-m -mthumb

    armv6zk -mthumb
    armv6z -mthumb
    armv6k -mthumb
    armv6j -mthumb

8 years agoAdd Synopsys license for newlib and libgloss
Anton Kolesov [Fri, 23 Oct 2015 18:24:57 +0000 (21:24 +0300)]
Add Synopsys license for newlib and libgloss

ChangeLog:
2015-11-12  Anton Kolesov  <Anton.Kolesov@synopsys.com>

* COPYING.LIBGLOSS: Add Synopsys license.
* COPYING.NEWLIB: Likewise.

8 years agoAdd support for ARC to newlib
Anton Kolesov [Fri, 23 Oct 2015 18:24:50 +0000 (21:24 +0300)]
Add support for ARC to newlib

newlib/ChangeLog:
2015-11-12  Anton Kolesov  <Anton.Kolesov@synopsys.com>

* configure.host: Add ARC support.
* libc/include/machine/setjmp.h: Likewise.
* libc/machine/configure: Likewise.
* libc/machine/configure.in: Likewise.
* libc/machine/arc/Makefile.am: Likewise.
* libc/machine/arc/Makefile.in: Likewise.
* libc/machine/arc/aclocal.m4: Likewise.
* libc/machine/arc/asm.h: Likewise.
* libc/machine/arc/configure: Likewise.
* libc/machine/arc/configure.in: Likewise.
* libc/machine/arc/memcmp-bs-norm.S: Likewise.
* libc/machine/arc/memcmp-stub.c: Likewise.
* libc/machine/arc/memcmp.S: Likewise.
* libc/machine/arc/memcpy-archs.S: Likewise.
* libc/machine/arc/memcpy-bs.S: Likewise.
* libc/machine/arc/memcpy-stub.c: 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-stub.c: 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-stub.c: Likewise.
* libc/machine/arc/strchr.S: Likewise.
* libc/machine/arc/strcmp-archs.S: Likewise.
* libc/machine/arc/strcmp-stub.c: 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-stub.c: 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-stub.c: Likewise.
* libc/machine/arc/strlen.S: Likewise.
* libc/machine/arc/strncpy-bs.S: Likewise.
* libc/machine/arc/strncpy-stub.c: Likewise.
* libc/machine/arc/strncpy.S: Likewise.

8 years agoAdd support for ARC to libgloss
Anton Kolesov [Fri, 23 Oct 2015 18:24:06 +0000 (21:24 +0300)]
Add support for ARC to libgloss

ChangeLog:
2015-11-12  Anton Kolesov  <Anton.Kolesov@synopsys.com>

* configure.in: Add ARC support to libgloss.
* configure: Regenerate.

libgloss/ChangeLog:
2015-11-12  Anton Kolesov  <Anton.Kolesov@synopsys.com>

* configure: Add ARC support.
* configure.in: Likewise.
* arc/Makefile.in: Likewise.
* arc/aclocal.m4: Likewise.
* arc/configure: Likewise.
* arc/configure.in: Likewise.
* arc/crt0.S: Likewise.
* arc/libcfunc.c: Likewise.
* arc/nsim-syscall.h: Likewise.
* arc/nsim-syscalls.c: Likewise.
* arc/nsim.specs: Likewise.
* arc/sbrk.c: Likewise.

8 years agoRemove obsolete ARC system
Anton Kolesov [Fri, 23 Oct 2015 18:23:40 +0000 (21:23 +0300)]
Remove obsolete ARC system

ARC architecture specific files has been added ages ago in newlib/libc/sys,
but with invention of libgloss those files should be moved from newlib to
libgloss.

newlib/ChangeLog:
2015-11-12  Anton Kolesov  <Anton.Kolesov@synopsys.com>

* configure.host: Remove ARC system.
* libc/sys/configure: Likewise.
* libc/sys/configure.in: Likewise.
* libc/sys/arc/Makefile.am: Likewise.
* libc/sys/arc/Makefile.in: Likewise.
* libc/sys/arc/aclocal.m4: Likewise.
* libc/sys/arc/configure: Likewise.
* libc/sys/arc/configure.in: Likewise.
* libc/sys/arc/crt0.S: Likewise.
* libc/sys/arc/dummy.S: Likewise.
* libc/sys/arc/isatty.c: Likewise.
* libc/sys/arc/mem-layout.c: Likewise.
* libc/sys/arc/sbrk.c: Likewise.
* libc/sys/arc/sys/syscall.h: Likewise.
* libc/sys/arc/syscalls.c: Likewise.

8 years agoFix multilib libgloss selection.
Marcus Shawcroft [Fri, 6 Nov 2015 14:41:33 +0000 (14:41 +0000)]
Fix multilib libgloss selection.

Regression testing newlib in conjunction with libgloss and
--enable-multilib can result in incompatible multilib versions of
newlib and libgloss being used during link.

This manifests on ARM target when newlib regression is run using a
GCC configured using --with-multilib-list=aprofile

With this configuration many of the multilib variants built are
mutually incompatible.

The issue is that the newlib dejagnu foo iterates each multilib
variant and correctly chooses the appropriate newlib variant but
always chooses the root/base libgloss variant.

The implementation of newlib/testsuite/lib/flags.exp contains the
following fragment:

set target_build_path "$objdir/$multibuildtop.."

The effect of this fragment is to explicitly select the root version
of libgloss, irrespective of the current multilib.

Digging around in VC it appears that the original implementation of
multlib magic came into the tree back in 2002 with:

6e9d950a (Thomas Fitzsimmons 2002-05-01 17:06:25 +0000 39)

In this initial version of multilib support, newlib was multilib
capable, but libgloss was not multilib capable, hence the necessity to
explicitly select the root libgloss version.

Subsequently flags.exp was modified to support out of tree testing:

cec1d3b4 (Jeff Johnston      2005-07-05 00:11:50 +0000 25)

This change is orthogonal to this issue, its effect is to exit early
in none multilib configurations.

Subsequently libgloss gained --enable-multilib support, the relevant
change is:

https://sourceware.org/ml/newlib/2006/msg00440.html
commit 00a4b31ad08aef361c5d74125ece410b4c285975
Author: Jeff Johnston <jjohnstn@redhat.com>
Date: Wed May 10 20:51:41 2006 +0000

This change enabled multilib support throughout libgloss, but ommitted
to adjust the flag.exp behaviour which anchors the libgloss multilib
selection to the base version.

The attached patch adjusts flags.exp to select the current multilib
variant of libgloss.

2015-11-06  Marcus Shawcroft  <marcus.shawcroft@arm.com>

        * testsuite/lib/flags.exp (libgloss_link_flags): Drop multilibtop
        from target_build_path.

8 years agomakedoc: Don't interpret license text as a command
Jon Turney [Fri, 6 Nov 2015 14:40:23 +0000 (14:40 +0000)]
makedoc: Don't interpret license text as a command

Align makedoc's iscommand() with it's documentation, and don't allow commands to
contain a space.  A command is a line containing only a sequence of capital
letters or '_', followed by optional spaces.

This prevents "IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE" (the only line in the license text which consists of only
capitals and spaces, without any punctuation) from being interepreted as a
makedoc command, leading to:

"Can't find IMPLIED"
"warning, IMPLIED is not recognised"

being emitted by makedoc, (which is normally un-noticed because makedoc's stderr
is redirected to a .ref file)

2015-11-06  Jon Turney  <jon.turney@dronecode.org.uk>

* doc/makedoc.c (iscommand): Only allow commands to have trailing
spaces, not space separated words.

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
8 years agodoc: Fix some inconsistent QUICKREF lines
Jon Turney [Sun, 25 Oct 2015 13:15:07 +0000 (13:15 +0000)]
doc: Fix some inconsistent QUICKREF lines

makedoc defines a command as 'all upper case, and alone on a line'.

A few QUICKREF lines currently violate this by having some additional text after
the QUICKREF.

So, currently, these lines are treated as an unknown command.

This is benign as QUICKREF currently does nothing but produce some ignored
output on stderr.  I'm not sure what the intent of QUICKREF is.

2015-11-06  Jon Turney  <jon.turney@dronecode.org.uk>

* libm/mathfp/s_acos.c: Fix QUICKREF.
* libm/mathfp/e_acosh.c: Ditto.
* libm/math/w_asin.c: Ditto.
* libm/mathfp/e_acosh.c: Ditto.
* libm/mathfp/s_acos.c: Ditto.

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
8 years agomakedoc: Fix INTERNAL(|DEFINITION|FUNCTION) command definitions
Jon Turney [Sun, 25 Oct 2015 15:25:00 +0000 (15:25 +0000)]
makedoc: Fix INTERNAL(|DEFINITION|FUNCTION) command definitions

The unused INTERNAL_DEFINITION, INTERNAL_FUNCTION and INTERNAL commands are
defined in terms of the non-existent built-in 'func'

This causes every single invocation of makedoc to output "Can't find func" three
times, as it parses doc.str.

This is normally un-noticed because makedoc's stderr is redirected to a .ref
file.

Fix these unused command definitions to something with equivalent lack of
effect, but without generating an error.

2015-11-06  Jon Turney  <jon.turney@dronecode.org.uk>

* doc/doc.str: Fix INTERNAL_DEFINITION, INTERNAL_FUNCTION and
INTERNAL.

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
8 years agoAArch64: Tune memcpy
Wilco Dijkstra [Fri, 6 Nov 2015 14:09:20 +0000 (14:09 +0000)]
AArch64: Tune memcpy

  * newlib/libc/machine/aarch64/memcpy.S (memcpy):
  Further tuning for performance.

8 years agoflock: Fix hang in object collision case
Corinna Vinschen [Thu, 12 Nov 2015 12:14:08 +0000 (13:14 +0100)]
flock: Fix hang in object collision case

* flock.cc (lockf_t::create_lock_obj): Correctly recreate lock object
attributes anew in each loop.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoAvoid .eh_frame in ARM newlib.
Joseph Myers [Thu, 12 Nov 2015 12:09:24 +0000 (12:09 +0000)]
Avoid .eh_frame in ARM newlib.

ARM newlib has various strcmp implementations that use .cfi_*
directives to generate unwind information.

The effect of this is that the generated objects contain .eh_frame
sections.  However, ARM uses its own unwind info format, not
.eh_frame, which is generated by ARM-specific directives, not .cfi_*.
The .eh_frame sections are useless, but also not removed by strip and
may be loaded into memory at runtime.

This patch fixes this by using .cfi_sections .debug_frame (as in
glibc) so that the directives generate .debug_frame instead.
.debug_frame is useful for the debugger, can be removed by strip, and
is not loaded into memory at runtime.

* libc/machine/arm/strcmp-arm-tiny.S: Use .cfi_sections
.debug_frame.
* libc/machine/arm/strcmp-armv4.S: Likewise.
* libc/machine/arm/strcmp-armv4t.S: Likewise.
* libc/machine/arm/strcmp-armv6.S: Likewise.
* libc/machine/arm/strcmp-armv6m.S: Likewise.
* libc/machine/arm/strcmp-armv7.S: Likewise.
* libc/machine/arm/strcmp-armv7m.S: Likewise.

8 years agoAdd comment to explain previous patch
Corinna Vinschen [Thu, 12 Nov 2015 10:52:02 +0000 (11:52 +0100)]
Add comment to explain previous patch

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoFix crash at process init on 64 bit XP/2003 under WOW64
Corinna Vinschen [Thu, 12 Nov 2015 10:48:30 +0000 (11:48 +0100)]
Fix crash at process init on 64 bit XP/2003 under WOW64

* init.cc (munge_threadfunc): Don't call NtQueryInformationThread with
ThreadQuerySetWin32StartAddress info class on XP 64 and Server 2003 64.
It crashes.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoBump Cygwin DLL minor number
Corinna Vinschen [Mon, 9 Nov 2015 09:12:48 +0000 (10:12 +0100)]
Bump Cygwin DLL minor number

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoReorganize memchr selection. cygwin-2_3_0-release
Marcus Shawcroft [Tue, 3 Nov 2015 14:17:56 +0000 (14:17 +0000)]
Reorganize memchr selection.

The patch cleans up the auto configury mechanism used to select
different implementations of memchr for various architecture versions.

The approach here is to remove the selection of memchr within automake
and instead use complimentary logic in memchr-stub.c and memchr.S to
choose between the gerneric memchr.c implementation or one of the
architecture specific implementations.

This patch also changes the selection criteria inline with the
previous proposal here:

https://sourceware.org/ml/newlib/2015/msg00752.html

but using the ACLE predefines.

Regressed for armv7-a armv5 armv8-a, correct selection of memcpy
implementation by manual inspection of a test program built for these
three architectures.

8 years agoReorganize memcpy selection.
Marcus Shawcroft [Fri, 30 Oct 2015 15:14:53 +0000 (15:14 +0000)]
Reorganize memcpy selection.

This patch cleans up the auto configury mechanism used to select
different implementations of memcpy for various architecture versions.

The approach here is to remove the selection of memcpy within automake
and instead use complimentary logic in memcpy-stub.c and memcpy.S to
choose between the generic memcpy.c implemenation or one of the
architecture specific memcpy*.S implemenations.

Regressed for armv7-a armv5 armv8-a, correct selection of memcpy
implementation by manual inspection of a test program built for these
three architectures.

This revised patch flips the remaining preprocessor logic in
memcpy-stub.c to use ACLE defines as requested in the previous review
and removes the now disused HAVE_ARMV7A and HAVE_ARMV8A configure.in
support.

8 years agoReplace __attribute((__warning__())) by __attribute__((deprecated()))
Olivier Martin [Fri, 6 Nov 2015 10:05:09 +0000 (10:05 +0000)]
Replace __attribute((__warning__())) by __attribute__((deprecated()))

Clang raises the warning message:
warning: unknown attribute '__warning__' ignored [-Wunknown-attributes]

* libc/include/stdlib.h (mktemp): Change attribute to deprecated.
(_mktemp_r): Ditto.

Signed-off-by: Olivier Martin <olivier@labapart.com>
8 years agoFake volume serial number on filesystems not providing it
Corinna Vinschen [Thu, 5 Nov 2015 17:34:34 +0000 (18:34 +0100)]
Fake volume serial number on filesystems not providing it

* mount.cc (fs_info::update): Fake a serial number on filesystems not
providing one.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoAvoid deadlock in flock(2)
Corinna Vinschen [Thu, 5 Nov 2015 17:31:36 +0000 (18:31 +0100)]
Avoid deadlock in flock(2)

* fcntl.cc (fcntl64): Don't lock fd table when performing locking.
* flock.cc (flock): Ditto.
(lockf): Ditto.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoFix iterating over pending signals if a signal doesn't have to be cleared
Corinna Vinschen [Thu, 5 Nov 2015 09:09:08 +0000 (10:09 +0100)]
Fix iterating over pending signals if a signal doesn't have to be cleared

* sigproc.cc (pending_signals::clear): Yet another fix to fix the fix.
Actually iterate over the list of pending signals even if there's a
signal which doesn't have to be cleared.  Other than that, revert loop
to it's former self as a while loop.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoAccommodate trailing NUL in PrlSF filesystem name.
Corinna Vinschen [Wed, 4 Nov 2015 13:47:25 +0000 (14:47 +0100)]
Accommodate trailing NUL in PrlSF filesystem name.

* globals.cc (ro_u_prlfs): Add trailing NUL.  Explain why.
* mount.cc (fs_info::update): Add a comment to explain PrlSF.
* path.h (path_conv::fs_is_prlfs): Add for symmetry.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoAdd missing release message for 68b4238f4a1276a1f6f18430580b62dfa0420ffd
Corinna Vinschen [Wed, 4 Nov 2015 09:09:12 +0000 (10:09 +0100)]
Add missing release message for 68b4238f4a1276a1f6f18430580b62dfa0420ffd

8 years agoFix potential endless loop in pending_signals::clear
Corinna Vinschen [Tue, 3 Nov 2015 17:25:23 +0000 (18:25 +0100)]
Fix potential endless loop in pending_signals::clear

* sigproc.cc (pending_signals::clear): Fix previous fix resulting in
yet another endless loop.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years ago[ARM] Select appropriate memcpy implementation for ARMv8-a.
Marcus Shawcroft [Tue, 3 Nov 2015 11:02:15 +0000 (11:02 +0000)]
[ARM] Select appropriate memcpy implementation for ARMv8-a.

The newlib configury logic that detects architecture version and
chooses an appropriate memcpy implementation does not consider
ARMv8-a.

This patch adds configury logic to detect ARMv8-a along with the
associated changes in Makefile.am and memcpy.

8 years agoMove duplicated documentation rules to Makefile.shared
Jeff Johnston [Mon, 2 Nov 2015 23:00:28 +0000 (18:00 -0500)]
Move duplicated documentation rules to Makefile.shared

- Also, harmonize libm to use CHEWOUT_FILES like libc, rather than chobj.
  Update documentation appropriately.

        * HOWTO: Update.
        * Makefile.shared: Move documentation rules to here...
        * libc/argz/Makefile.am: ... from here ...
        * libc/ctype/Makefile.am: ... and here.
        * libc/errno/Makefile.am: Ditto.
        * libc/iconv/Makefile.am: Ditto.
        * libc/iconv/ccs/Makefile.am : Ditto.
        * libc/iconv/ces/Makefile.am: Ditto.
        * libc/iconv/lib/Makefile.am: Ditto.
        * libc/locale/Makefile.am: Ditto.
        * libc/misc/Makefile.am: Ditto.
        * libc/posix/Makefile.am: Ditto.
        * libc/reent/Makefile.am: Ditto.
        * libc/search/Makefile.am: Ditto.
        * libc/stdio/Makefile.am: Ditto.
        * libc/stdio64/Makefile.am: Ditto.
        * libc/stdlib/Makefile.am : Ditto.
        * libc/string/Makefile.am: Ditto.
        * libc/syscalls/Makefile.am: Ditto.
        * libc/time/Makefile.am : Ditto.
        * libc/unix/Makefile.am: Ditto.
        * libc/xdr/Makefile.am: Ditto.
        * libm/common/Makefile.am: Ditto.
        * libm/complex/Makefile.am: Ditto.
        * libm/math/Makefile.am: Ditto.
        * libm/mathfp/Makefile.am: Ditto.

8 years agoConsistently use an em-dash in math functions.
Jeff Johnston [Mon, 2 Nov 2015 21:38:30 +0000 (16:38 -0500)]
Consistently use an em-dash in math functions.

- also move previous ChangeLog entry to newlib instead of top-level

        * libc/time/wcsftime.c: Consistently use an em-dash in FUNCTION
summary.
        * libm/common/isgreater.c: Ditto.
        * libm/common/s_fdim.c: Ditto.
        * libm/common/s_fma.c: Ditto.
        * libm/common/s_fmax.c: Ditto.
        * libm/common/s_fmin.c: Ditto.
        * libm/common/s_infinity.c: Ditto.
        * libm/common/s_isnan.c: Ditto.
        * libm/common/s_log2.c: Ditto.
        * libm/common/s_logb.c: Ditto.
        * libm/common/s_lrint.c: Ditto.
        * libm/common/s_lround.c: Ditto.
        * libm/common/s_nearbyint.c: Ditto.
        * libm/common/s_remquo.c: Ditto.
        * libm/common/s_rint.c: Ditto.
        * libm/common/s_round.c: Ditto.
        * libm/common/s_scalbn.c: Ditto.
        * libm/common/s_signbit.c: Ditto.
        * libm/common/s_trunc.c: Ditto.
        * libm/math/w_exp2.c: Ditto.
        * libm/math/w_gamma.c: Ditto.

8 years agoAdd missing semicolons to prototypes.
Jeff Johnston [Mon, 2 Nov 2015 21:34:49 +0000 (16:34 -0500)]
Add missing semicolons to prototypes.

        * libc/stdio/fseek.c: Add missing semicolons to prototypes in
        SYNOPSIS.
        * libc/stdio/fwide.c: Ditto.
        * libc/stdio64/fseeko64.c: Ditto.
        * libc/string/strtok.c: Ditto.
        * libc/string/wcstok.c: Ditto.
        * libm/math/w_cosh.c: Ditto.
        * libm/math/w_fmod.c:  Ditto.
        * libm/mathfp/s_cosh.c: Ditto.
        * libm/mathfp/s_fmod.c: Ditto.

8 years ago Improve performance of MIPS memcpy.
Steve Ellcey [Mon, 2 Nov 2015 21:30:19 +0000 (13:30 -0800)]
Improve performance of MIPS memcpy.

* libc/machine/mips/memcpy.S (memcpy): Add word copies for small
aligned data.

8 years agoDefine MAX_IPOPTLEN
Corinna Vinschen [Mon, 2 Nov 2015 14:42:30 +0000 (15:42 +0100)]
Define MAX_IPOPTLEN

* include/netinet/ip.h (MAX_IPOPTLEN): Define.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoFix incorrect implementation to clear per-thread pending signals
Corinna Vinschen [Mon, 2 Nov 2015 12:53:25 +0000 (13:53 +0100)]
Fix incorrect implementation to clear per-thread pending signals

* sigproc.cc (class pending_signals): Drop sigproc_init friendship.
(pending_signals::clear): Fix implementation to avoid subsequent
endless loop in wait_sig.  Improve comment.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This page took 0.08337 seconds and 5 git commands to generate.