summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Export XSI sigpauseYaakov Selkowitz2017-06-145-4/+36
| | | | | | | | | | There are two common sigpause variants, both of which take an int argument. If you request _XOPEN_SOURCE or _GNU_SOURCE, you get the System V version, which removes the given signal from the process's signal mask; otherwise you get the BSD version, which sets the process's signal mask to the given value. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
* newlib/MAINTAINERS: Add OS maintainers section and myself for RTEMS and ↵Joel Sherrill2017-06-141-0/+7
| | | | Write After Approval.
* Feature test macros overhaul: Cygwin signal.hYaakov Selkowitz2017-06-141-1/+25
| | | | | | This should match newlib's <sys/signal.h>. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
* Feature test macros overhaul: signal.h (part 3)Yaakov Selkowitz2017-06-141-8/+16
| | | | | | | Notably, sigaction and friends are POSIX, but the form of sigpause currently provided is BSD. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
* stdio.h: guard function macros with !__cplusplusYaakov Selkowitz2017-06-141-0/+2
| | | | | | | | While POSIX allows these functions to also be defined as macros in C, in C++ this is not allowed, and prevents these names (particularly feof) from being used in a custom namespace. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
* Add JLI support.Claudiu Zissulescu2017-06-141-1/+6
| | | | | | | | | Initialize the jli_base registers for ARCv2 cpus. libgloss/ 2017-05-23 Claudiu Zissulescu <claziss@synopsys.com> * arc/crt0.S: Initialize the jli_base registers for ARCv2 cpus.
* Add profile support.Claudiu Zissulescu2017-06-144-8/+527
| | | | | | | | | | | | | | Add profile support for ARC processors. libgloss/ 2016-07-28 Claudiu Zissulescu <claziss@synopsys.com> * arc/crt0.S: Add calls to profiler support routines. * Makefile.in (CRT0): Add gcrt0. (NSIM_OBJS): Add mcount. (CRT0_INSTALL): Install gcrt0, and crt0. * arc/gcrt0.S: New file. * arc/mcount.c: Likewise.
* cygwin: readdir: don't lookup mount target inodesCorinna Vinschen2017-06-141-41/+30
| | | | | | | | | | | | So far Cygwin's readdir returned the inode number of a mount target in d_ino, rather than the actual inode number of the mount point in the underlying filesystem. This not only results in a performance hit if the mount target is a remote FS, it is also not done on other POSIX systems. Remove the code evaluating the mount target inode number. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* readdir() with mount point dentry, return mount point INOJoe Lowe2017-06-141-23/+10
| | | | | | | | | | | | | | | This patch fixes a minor compatibility issue w/ cygwin mount point handling in readdir(), compared to equivalent behavior of Linux and MacOS. dentry.d_ino should indicate the INO of the mount point itself, not the target volume root folder. Changed return type from readdir_check_reparse_point to uint8_t, to avoid unnecessarily being implicitly cast to and from a signed int. Renamed a related local variable "attr" to "oattr" that was eclipsing a member variable with the same name. Joe L.
* ccoshl: Align formatting to upstreamAditya Upadhyay2017-06-141-6/+6
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Importing ccoshl.c from netbsd.Aditya Upadhyay2017-06-133-4/+55
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Remove FreeBSD specifics from RTEMS <arpa/inet.h>Sebastian Huber2017-06-121-21/+0
| | | | | | | | | For whatever reason FreeBSD renames several functions provided by <arpa/inet.h> and uses weak references to provide the standard function names. This causes problems on targets lacking proper support for weak references. We do not need this function renaming on RTEMS. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Don't overread or write memory returned by _DTOA_RSilviu Baranga2017-06-091-12/+13
| | | | | | | | | | | | | | | Don't over-read memory returned by _DTOA_R, and never write to it since the result might be a string literal. For example, when doing: swprintf(tt, 20, L"%.*f", 6, 0.0); we will get back "0". Instead, write the result returned by _DTOA_R to the output buffer. After this, write the 0 chars directly to the the output buffer (if there are any). This also has the (marginal) advantage that we read/write less memory overall.
* Add COMODO Internet Security and ConEmu to BLODADavid Macek2017-06-091-1/+3
| | | | | | ConEmu: There has been at least one report of it causing crashes <https://github.com/Maximus5/ConEmu/issues/1158> COMODO Internet Security: Causing GPG failures <https://github.com/msys2/msys2/issues/38>
* Fix RTEMS ioctl() declarationSebastian Huber2017-06-071-2/+2
| | | | | | Using uint32_t for ioctl_command_t does not work well on 64-bit targets. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Update FreeBSD revision of RTEMS <sys/bitset.h>Sebastian Huber2017-06-071-1/+1
| | | | Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Fix some RTEMS CPUSET(9) macrosSebastian Huber2017-06-071-11/+11
| | | | Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Fix RTEMS CPU_EQUAL_S()Sebastian Huber2017-06-071-2/+2
| | | | | | | According to the FreeBSD man page BIT_CMP() returns true in case the two sets are NOT equal. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Add myself to Write After ApprovalSebastian Huber2017-06-071-0/+1
|
* Fix minor issues in memchr NEON implementationPrakhar Bahuguna2017-06-071-1/+2
|
* Print sign of NaN values.Kito Cheng2017-06-072-0/+8
|
* cygwin: document lrint bugfixCorinna Vinschen2017-06-071-0/+3
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygwin: Fix lrint{f,l} to return a 64 bit long on x86_64Corinna Vinschen2017-06-073-3/+9
| | | | | | | | Mingw-w64 (where the code has been taken from) has 4 byte longs independently of the architecture but x86_64 Cygwin has 64 bit longs. So use fistpll instead of fistpl on x86_64 Cygwin. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygwin: document env var crash fixCorinna Vinschen2017-06-061-0/+3
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygwin: Fix crash if env var name starts with non-ASCII charCorinna Vinschen2017-06-061-2/+2
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygwin: document wcsxfrm fixCorinna Vinschen2017-06-061-0/+3
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygwin wcsxfrm: byte swap result ourselvesCorinna Vinschen2017-06-061-8/+13
| | | | | | | | | | | | | | | | | | | | | Workaround a bug (or undocumented behaviour) in LCMapStringW: It's documented(*) that the cchDest parameter is a byte count with LCMAP_SORTKEY, but a character count otherwise. But the docs don't state what happens if you combine LCMAP_SORTKEY with LCMAP_BYTEREV. Tests indicate that LCMAP_SORTKEY treats cchDest as byte count, but then LCMAP_BYTEREV treats it as char count in the same call. So the latter swaps twice as much bytes in the destination buffer than the byte count it returns, which potentially results in writing past the end of the given output buffer. Solution: Don't specify LCMAP_BYTEREV in the LCMapStringW(LCMAP_SORTKEY) call, rather byte swap afterwards. (*) https://msdn.microsoft.com/en-us/library/windows/desktop/dd318702(v=vs.85).aspx Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix thinko in MSP430 libgloss implementation of write() system call.Martin Young2017-05-261-1/+1
|
* Update COPYING.NEWLIB appropriately.Jeff Johnston2017-05-251-1/+85
|
* Add de-facto standard <sys/ioctl.h> for RTEMSSebastian Huber2017-05-253-0/+252
| | | | Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Add some POSIX header files for RTEMSSebastian Huber2017-05-2520-6/+4641
| | | | | | | | | | | | | | | | | | | | | Add the POSIX header files * arpa/inet.h * net/if.h * netdb.h * netinet/in.h * netinet/tcp.h * sys/socket.h * sys/syslog.h * sys/uio.h * sys/un.h * syslog.h * termios.h and their dependencies for RTEMS. The origin of these files is the latest FreeBSD. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* FreeBSD compatibility for RTEMS <sys/cpuset.h>Sebastian Huber2017-05-254-138/+402
| | | | | | | | | | | Make the RTEMS <sys/cpuset.h> compatible with the latest FreeBSD version. Fix the CPU_COPY() parameter order, see also: https://devel.rtems.org/ticket/3023 Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Add __bitcount*() to RTEMS <machine/types.h>Sebastian Huber2017-05-252-0/+92
| | | | | | | Use a dedicated header file <machine/_bitcount.h> to avoid cyclic header dependencies in future changes. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Move ARM access.c from machine to sysSebastian Huber2017-05-255-14/+13
| | | | | | | | | The implementation of the POSIX access() function is nothing machine specific like memcpy(), etc. Move it back to the system domain. This avoids problems due to the include search order of the Newlib/GCC build which picks up machine includes before system includes. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Increase MSIZE for RTEMSSebastian Huber2017-05-251-1/+1
| | | | | | | | Increase the MSIZE for RTEMS to be in line with the latest FreeBSD version. The legacy network stack of RTEMS will provides its own definition. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* FreeBSD compatibility for RTEMS <sys/param.h>Sebastian Huber2017-05-252-125/+180
| | | | | | | Update the RTEMS <machine/param.h> and <sys/param.h> to be compatible with the latest FreeBSD version. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Add generic <machine/_align.h> for RTEMSSebastian Huber2017-05-252-11/+42
| | | | | | | It uses __BIGGEST_ALIGNMENT__ which is available in recent GCC and LLVM/clang. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* ARM/AArch64: Fix GetCmdLine semihosting directivesnewlib-snapshot-20170519Laurent ALFONSI2017-05-192-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When simulating arm code, the target program startup code (crt0) uses semihosting invocations to get the command line from the simulator. The simulator returns the command line and its size into the area passed in parameter. (ARM 32-bit specifications : http://infocenter.arm.com/help/topic/com.arm.doc.dui0058d/DUI0058.pdf chapter "5.4.19 SYS_GET_CMDLINE"). The memory area pointed by the semihosting register argument is located in .text section (usually not writtable (RX)). If we run this code on a simulator that respects this rights properties (qemu user-mode for instance), the command line will not be written to the .text program memory, in particular the length of the string. The program runs with an empty command line. This problem hasn't been seen earlier probably because qemu user-mode is not so much used, but this can happen with another simulator that refuse to write in a read-only segment. With this modification, the command line can be correctly passed to the target program. Changes: - libgloss/arm/crt0.S : Arguments passed to the AngelSWI_Reason_GetCmdLine semihosting invocation are placed into .data section instead of .text - libgloss/aarch64/crt0.S : Idem for aarch64 AngelSVC_Reason_GetCmdLine semihosting.
* cygwin CONTRIBUTORS: Add Daniel SantosCorinna Vinschen2017-04-251-0/+1
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix transposed lines in 2.8.1 release textJon Turney2017-04-241-2/+2
|
* Update 2.8.1 release textJon Turney2017-04-241-1/+7
|
* cygwin: add 2.8.1 release fileCorinna Vinschen2017-04-241-0/+23
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygwin TEST: Add nagging debug output to pinfoCorinna Vinschen2017-04-241-0/+13
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygwin: pinfo: do not wait for setting ppid on a transitional procinfoCorinna Vinschen2017-04-241-6/+11
| | | | | | | | This leads to excessive lag when stracing processes if the inferior process checks the process table. The reason is that ppid isn't set in the procinfo memory of the dynamically loading strace itself. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygwin: try unprivileged symlink creation on W10 1703 and laterCorinna Vinschen2017-04-241-2/+9
| | | | | | | | | | | | Add new SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE flag to CreateSymbolicLinkW call when running on W10 1703 or later. Don't do that on older versions to avoid ERROR_INVALID_PARAMETER. Preliminary, needs testing. There's an off-chance that the flag results in the same ERROR_INVALID_PARAMETER on 1703 if the developer settings are not enabled. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygwin: wincap: handle W10 1703Corinna Vinschen2017-04-242-2/+28
| | | | | | | Add has_unprivileged_createsymlink flag and set to true on 1703 and later. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygwin: wincap: fix evaluation of build numberCorinna Vinschen2017-04-241-0/+1
| | | | | | | | | RtlGetNtVersionNumbers returns the build number with some upper bits set for no apparent reason. The fact that RtlGetNtVersionNumbers is undocumented doesn't exactly help. Just filter out the upper WORD for now. If build numbers are in danger to become 6 digit numbers, re-evaluate.
* cygwin: remov unused winpids constructorCorinna Vinschen2017-04-241-2/+0
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix stat.st_blocks for files compressed with CompactOS methodChristian Franke2017-04-221-5/+12
| | | | | | | | Always retrieve FileCompressionInformation for non-empty files if FileStandardInformation returns 0 allocated blocks. This fixes stat.st_blocks for files compressed with CompactOS method. Signed-off-by: Christian Franke <franke@computer.org>
* cygwin doc: Add postinstall/preremove scripts to install Start Menu entriesBrian Inglis2017-04-223-2/+115
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>