summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Cygwin: get_mem_values: Convert arguments to call-by-referenceCorinna Vinschen2018-08-171-17/+17
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: get_mem_values: Return allocation as size_t valuesCorinna Vinschen2018-08-171-18/+15
| | | | | | Use size_t in callers, too. Fix __small_sprintf format specifiers. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Revert "Use allocation granularity as the 'page_size' in /proc/<pid>/status ↵Corinna Vinschen2018-08-171-1/+1
| | | | | | | | | | | as well, for consistency with /proc/<pid>/statm" This reverts commit 8a32c24a7bdb0f3d80daa8f267cc63d15edcf771. Replacing page_size() with allocation_granularity() was incorrect. The values returned by get_mem_values() are # of pages of size page_size(). Multiplying with allocation_granularity() here results in values 16 times too big.
* Cygwin: Add missing items to release notesCorinna Vinschen2018-08-172-0/+9
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* setfacl: Rename the option --file to --set-file, as on LinuxKen Brown2018-08-174-4/+11
| | | | Retain --file as an undocumented option for backwards compatibility.
* Fix strtof ("-nan") returns positive NaNMasamichi Hosoda2018-08-161-2/+2
| | | | | | | | | | | | strtof ("-nan") returned positive NaN instead of negative NaN. strtod ("-nan") and strtold ("-nan") return negative NaN. Linux glibc has been fixed that strto{f|d|ld} ("-nan") returns negative NaN. https://sourceware.org/bugzilla/show_bug.cgi?id=23007 This commit makes strtof preserves the negative sign bit when parsing "-nan" like glibc.
* Remove unused NaN's integer representation definitionsMasamichi Hosoda2018-08-166-93/+8
| | | | | | | | By previous commit, strto{d|ld} ("nan") does not use the definition of NaN. There is no other function that uses the definitions. This commit remove the definitions.
* Fix strtod ("nan") and strtold ("nan") returns wrong negative NaNMasamichi Hosoda2018-08-162-9/+2
| | | | | | | | | | | | | | The definition of qNaN for x86_64 and i386 was wrong. strto{d|ld} ("nan") returned wrong negative NaN instead of correct positive NaN since it used the wrong definition. On the other hand, strtof ("nan") returns correct positive NaN since it uses nanf ("") instead of the wrong definition. This commit makes strto{d|ld} ("nan") uses {nan|nanl} ("") like strtof ("nan") using. So strto{d|ld} ("nan") returns positive NaN.
* Improve sincosf commentsWilco Dijkstra2018-08-164-21/+26
| | | | | | | Improve comments in sincosf implementation to make the code easier to understand. Rename the constant pi64 to pi63 since it's actually PI * 2^-63. Add comments for fields of sincos_t structure. Add comments describing implementation details to reduce_fast.
* Cygwin: Add FE_ALL_EXCEPT change to release notes.Corinna Vinschen2018-08-152-0/+6
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Keep the denormal-operand exception masked; modify FE_ALL_EXCEPT accordingly.J.H. van de Water2018-08-152-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By excluding the denormal-operand exception from FE_ALL_EXCEPT, it will not be possible anymore to UNmask this exception by means of the API defined by /usr/include/fenv.h Note: terminology has changed since IEEE Std 854-1987; denormalized numbers are called subnormal numbers nowadays. This modification has basically been motivated by the fact that it is also not possible on Linux to manipulate the denormal-operand exception by means of the interface as defined by /usr/include/fenv.h. This has been the state of affairs on Linux since 2001 (Andreas Jaeger). The exceptions required by the standard (IEEE Std 754), in case they can be supported by the implementation, are: FE_INEXACT, FE_UNDERFLOW, FE_OVERFLOW, FE_DIVBYZERO and FE_INVALID. Although it is allowed to define additional exceptions, there is no reason to support the "denormal-operand exception" in this case (fenv.h), because the subnormal numbers can be handled almost as fast the normalized numbers by the hardware of the x86/x86_64 architecture. Said differently, a reason to trap on the input of subnormal numbers does not exist. At least that is what William Kahan and others at Intel asserted around 2000. (that is William Kahan of the K-C-S draft, the precursor to the standard) This commit modifies winsup/cygwin/include/fenv.h as follows: - redefines FE_ALL_EXCEPT from 0x3f to 0x3d - removes the definition for FE_DENORMAL - introduces __FE_DENORM (0x2) (enum in Linux also uses __FE_DENORM) - introduces FE_ALL_EXCEPT_X86 (0x3f), i.e. ALL x86/x86_64 FP exceptions
* Cygwin: Add J.H. van de Water to CONTRIBUTORSCorinna Vinschen2018-08-151-0/+1
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: fenv.h: Convert to ASCII-onlyCorinna Vinschen2018-08-141-1/+1
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Added Restriction on base valueAditya Upadhyay2018-08-131-0/+4
|
* Cygwin: utils: ps: use fputs to print fixed stringsCorinna Vinschen2018-08-091-3/+3
| | | | | | Avoid gcc warning "format not a string literal and no format arguments" Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* newlib: strftime: fix over-enthusiastic fix from 0283642f35ceCorinna Vinschen2018-08-081-1/+2
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Add BSP and semihosting library for nios2-generic-nommu QEMU emulation.Sandra Loosemore2018-08-0828-0/+5848
|
* newlib: don't use __visibility__ attrribute on CygwinCorinna Vinschen2018-08-081-2/+7
| | | | | | gcc doesn't support visibility attribute on PE/COFF platforms Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* newlib: don't check malloc/free pointerCorinna Vinschen2018-08-082-17/+2
| | | | | | use preprocessor check for MALLOC_PROVIDED instead Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* newlib: fix various gcc warningsCorinna Vinschen2018-08-0811-18/+24
| | | | | | | | | * unused variables * potentially used uninitialized * suggested bracketing * misleading indentation Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* newlib: wordexp: drop dangerous fprintfCorinna Vinschen2018-08-081-2/+2
| | | | | | | | wordexp uses fprintf in a dangerous way. It uses an unchecked input string as format string, rather than as parameter to a %s. Replace fprintf with fputs. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: utils: strace: fix format stringCorinna Vinschen2018-08-081-1/+1
| | | | | | | %ll is long valid for mingw builds. Use this rather than %I64 to avoid a gcc warning Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: utils: change 3rd readlink param to size_tCorinna Vinschen2018-08-082-5/+5
| | | | | | Avoid gcc warnings Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: utils: cygcheck: fix filesystem output formatCorinna Vinschen2018-08-081-5/+1
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* newlib: newlocale: fix typo rendering ctype_ptr invalidCorinna Vinschen2018-08-081-1/+1
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* newlib: strftime: fix gcc warning on __ctlocCorinna Vinschen2018-08-081-5/+3
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* RTEMS: Add aligned_alloc() to crt0Sebastian Huber2018-08-081-1/+3
| | | | | | | | This is necessary to build the latest GCC 7 branch. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85904 Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Cygwin: implement sched_getcpuCorinna Vinschen2018-08-0710-44/+77
| | | | | | | | * create new function __get_cpus_per_group to evaluate # of CPU groups * Call from format_proc_cpuinfo and sched_getcpu * Bump API minor version Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Declare GNU-specific sched_getcpu()Sebastian Huber2018-08-071-0/+4
| | | | | | This is a glibc extension. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Fix return value on aio_read/write successMark Geisert2018-08-071-4/+4
| | | | | Internally track resultant byte counts as ssize_t, but return 0 as int for success indication, per POSIX.
* Cygwin: Document fegetenv patchCorinna Vinschen2018-08-031-0/+3
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: fegetenv() should not disable exceptionsJ.H. van de Water2018-08-031-1/+5
| | | | | | | | | | | | | | | fnstenv MUST be followed by fldenv in fegetenv(), as the former disables all exceptions in the x87 FPU, which is not appropriate here (fegetenv() ). fldenv after fnstenv should reload the x87 FPU w/ the configuration that was saved by fnstenv, i.e. a configuration that might have exceptions enabled. Note: x86_64 uses SSE for floating-point, not the x87 FPU. However, because feraiseexcept() attempts to provoke an exception using the x87 FPU, the bug in fegetenv() will make this attempt futile here (x86_64). Note: WoW uses the x87 FPU for floating-point, not SSE. Here anything that would normally result in triggering an exception, not only feraiseexcept(), will not be able to, as result of the bug in fegetenv().
* Patch from Richard Earnshaw <Richard.Earnshaw@arm.com>newlib-snapshot-20180802Jeff Johnston2018-08-011-4/+8
| | | | | * aarch64/cpu-init/rdimon-aem-el3.S (cpu_init_hook): Simplify entry/exit sequences. Add CFI unwind rules.
* RISC-V: Do not use _init/_finiSebastian Huber2018-07-304-11/+16
| | | | | | | Introduce new host configuration variable "have_init_fini" which is set to "yes" by default. Override it for RISC-V to "no". Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Add attributes to allocator functionsSebastian Huber2018-07-301-4/+5
| | | | Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* FreeBSD compat. __alloc_size(), __alloc_align()Sebastian Huber2018-07-302-5/+5
| | | | | | | | Restore FreeBSD compatibility for __alloc_size() and __alloc_align(). This is a follow-up to commit e494b560350cabef94126a4478096aae89ae35a0. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Define a new __alloc_size2 attribute to complement the exiting support.pfg2018-07-301-0/+2
| | | | | | | | | | | | | At least on GCC7 calling __alloc_size(x) twice is not equivalent to calling using the attribute once with two arguments. The later is the documented use in GCC documentation so add a new alloc_size(n, x) alternative to cover for the few places where it is used: basically: calloc(3), reallocarray(3) and mallocarray(9). Submitted by: Mark Millard MFC after: 3 days Reference: http://docs.freebsd.org/cgi/mid.cgi?F227842D-6BE2-4680-82E7-07906AF61CD7
* Remove lint support from system headers and MD x86 headers.kib2018-07-301-15/+3
| | | | | | | Reviewed by: dim, jhb Discussed with: imp Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D13156
* sys: further adoption of SPDX licensing ID tags.pfg2018-07-301-0/+2
| | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point.
* Make _Static_assert() work with GCC in older C++ standards.ed@FreeBSD.org2018-07-301-1/+1
| | | | | | | | | | | GCC only activates C11 keywords in C mode, not C++ mode. This means that when targeting an older C++ standard, we cannot fall back to using _Static_assert(). In this case, do define _Static_assert() as a macro that uses a typedef'ed array. Discussed in: r322875 commit thread Reported by: Mark MIllard MFC after: 1 month
* ctype: Avoid GCC note in towctrans_l.cSebastian Huber2018-07-301-2/+2
| | | | | | | | | | The previous version genenerated the following GCC note: towctrans_l.c:44:1: note: offset of packed bit-field 'diff' has changed in GCC 4.4 caseconv_table [] = { ^~~~~~~~~~~~~~ Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* ctype: Fix integer type for caseconv_entry::deltaSebastian Huber2018-07-301-1/+1
| | | | | | | | | | | | | | | The commit 46ba1675c457324b0eeef4670a09101ef3f34c50 accidently changed a bit-field from signed to unsigned. The caseconv_entry::delta must be a signed integer, see also "newlib/libc/ctype/caseconv.t". Unfortunately, a standard GCC/Newlib build is done without -Wsign-conversion. Using this warning option would have helped to avoid this bug: caseconv.t:2:22: warning: unsigned conversion from 'int' to 'unsigned int:17' changes value from '-32' to '131040' [-Wsign-conversion] {0x0061, 25, TOUP, -32}, Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Fix comparison between two character arraysJordi Sanfeliu2018-07-301-1/+1
| | | | | | | Hello, The member 'id' in the 'utmp' struct is not a numeric but a character array, hence the strncmp() function is needed to compare two members.
* Cygwin: fpathconf: update _PC_ASYNC_IO return valueYaakov Selkowitz2018-07-251-0/+1
| | | | Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
* Cygwin: define _POSIX_ASYNCHRONOUS_IOYaakov Selkowitz2018-07-252-2/+2
| | | | | | This feature is now available as of the recent AIO commits. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
* POSIX Asynchronous I/O support: other filesMark Geisert2018-07-2510-26/+44
| | | | | | Updates to misc files to integrate AIO into the Cygwin source tree. Much of it has to be done when adding any new syscalls. There are some updates to limits.h for AIO-specific limits. And some doc mods.
* POSIX Asynchronous I/O support: fhandler filesMark Geisert2018-07-254-34/+83
| | | | | | | | | | | This code is where the AIO implementation is wired into existing Cygwin mechanisms for file and device I/O: the fhandler* functions. It makes use of an existing internal routine prw_open to supply a "shadow fd" that permits asynchronous operations on a file the user app accesses via its own fd. This allows AIO to read or write at arbitrary locations within a file without disturbing the app's file pointer. (This was already the case with normal pread|pwrite; we're just adding "async" to the mix.)
* POSIX Asynchronous I/O support: aio filesMark Geisert2018-07-252-0/+1087
| | | | | | This is the core of the AIO implementation: aio.cc and aio.h. The latter is used within the Cygwin DLL by aio.cc and the fhandler* modules, as well as by user programs wanting the AIO functionality.
* getfacl: Simplify by using acl_to_any_textKen Brown2018-07-251-113/+41
|
* getfacl and setfacl: Align with LinuxKen Brown2018-07-232-9/+9
| | | | | | Make getfacl print two colons instead of one after "other" and "mask". Change the help text for setfacl to indicate that there can be either one colon or two.