summaryrefslogtreecommitdiffstats
path: root/newlib
Commit message (Collapse)AuthorAgeFilesLines
* Arrange for text mode on stdin, stdout and stderr.Kaz Kylheku2017-11-171-0/+20
| | | | | | * newlib/libc/stdio/findfp.c (__sinit): Add the Cygwin-specific __SCLE (stream convert line endings) flag when calling the std function to initializing the reent structure's _stdin, _stdout and _stderr members.
* Default stdio streams to text mode.Kaz Kylheku2017-11-161-2/+2
| | | | | | | | * newlib/libc/stdio/flags.c (__sflags): Enable for Cygwin the piece of code which adds the O_TEXT mode if O_BINARY is not present. And, also, fix that piece of code's incorrect use of the | operator to test a flag instead of &.
* stdio.h: Don't define unlocked macros using static inline on C++cygwin-2_9_0-releaseCorinna Vinschen2017-09-041-1/+1
| | | | | | | | | | | | In C++, the usage of static inline functions for getchar_unlocked and putchar_unlocked may result in error messages like error: ‘_putchar_unlocked’ was not declared in this scope Fix this by not using the _getchar_unlocked and _putchar_unlocked macros in C++. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* include: fix ffs, fls guardsYaakov Selkowitz2017-08-301-2/+4
| | | | Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
* newlib: string/Makefile.am (CHEWOUT_FILES): Add strnstr.defCorinna Vinschen2017-08-302-2/+2
| | | | | | Regenerate strings/Makefile.in Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* newlib: strnstr: drop traditional synopisisCorinna Vinschen2017-08-301-7/+0
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Add man page entry for strnstr.c.Sichen Zhao2017-08-302-0/+43
|
* Modify strnstr.c.Sichen Zhao2017-08-301-55/+10
|
* Fix compile error due to new strnstr()Sebastian Huber2017-08-281-43/+0
| | | | | | | | | | | | | | | Remove local strnstr() implementation to fix compile error: newlib/libc/iconv/lib/aliasesi.c:53:8: error: conflicting types for 'strnstr' _DEFUN(strnstr, (haystack, needle, length), ^ In file included from newlib/libc/iconv/lib/aliasesi.c:29:0: newlib/libc/include/string.h:125:10: note: previous declaration of 'strnstr' was here char *strnstr(const char *, const char *, size_t) __pure; ^~~~~~~ Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* newlib: rebuild string/Makefile.inCorinna Vinschen2017-08-251-27/+49
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Port strnstr.c to newlib.Sichen Zhao2017-08-252-0/+4
|
* Import strnstr.c from FreeBSD.Sichen Zhao2017-08-251-0/+65
|
* Revert "headers: avoid bareword attributes" for clangEric Blake2017-08-251-14/+16
| | | | | | | | | | | | | | | This reverts most of commit 979d467ff6e39ee5c52cf1aac7a6c9c63058141c. We cannot avoid some bareword attributes until clang is fixed to properly support __-decorated attributes; see this bug: https://bugs.llvm.org/show_bug.cgi?id=34319 The macros in question expand to the empty string under gcc, so only compilation under clang is affected, and since clang has the bug, the obvious solution is to roll back the changes, and document the issue. Signed-off-by: Eric Blake <eblake@redhat.com>
* RTEMS: Use __uint64_t for _CLOCK_T_Sebastian Huber2017-08-251-0/+3
| | | | | | | | This addresses: https://devel.rtems.org/ticket/2135 Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Make _CLOCK_T_ system configurableSebastian Huber2017-08-251-0/+3
| | | | | | | Let systems optionally provide the _CLOCK_T_ type via <machine/_types.h>. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* newlib/libc/time/strptime.c(strptime_l) add %F %s support for strptimeBrian Inglis2017-08-251-2/+32
|
* Add myself to RISC-V Port MaintainerKito Cheng2017-08-211-0/+1
|
* Change license to FreeBSD License for RISC-VKito Cheng2017-08-2112-12/+12
| | | | | | - For prevent confuse about what BSD license variant we used, 2- or 3-clause license, we change the license to FreeBSD license to make it unambiguously refers to the 2-clause license.
* cygwin: Implement renameat2Ken Brown2017-08-191-0/+3
| | | | | | Define the RENAME_NOREPLACE flag in <cygwin/fs.h> as defined on Linux in <linux/fs.h>. The other RENAME_* flags defined on Linux are not supported.
* Add RISC-V port for libmKito Cheng2017-08-1719-1/+7282
| | | | | | Contributor list: - Michael Neilly <mneilly@yahoo.com> - Kito Cheng <kito.cheng@gmail.com>
* headers: avoid bareword attributesEric Blake2017-08-172-15/+15
| | | | | | | | | Always use the __-decorated form of an attribute name in public headers, as the bareword form is in the user's namespace, and we don't want compilation to break just because the user defines the bareword to mean something else. Signed-off-by: Eric Blake <eblake@redhat.com>
* Add RISC-V port for newlibKito Cheng2017-08-1624-2/+7185
| | | | | | | | Contributor list: - Andrew Waterman <andrew@sifive.com> - Palmer Dabbelt <palmer@dabbelt.com> - Kito Cheng <kito.cheng@gmail.com> - Scott Beamer <sbeamer@eecs.berkeley.edu>
* newlib: regenerate libc/stdlib/Makefile.amCorinna Vinschen2017-08-111-9/+36
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Define sigsetjmp/siglongjmp only if __POSIX_VISIBLEKen Brown2017-08-071-2/+2
|
* Proper locking for getchar() and putchar()Sebastian Huber2017-08-071-7/+32
| | | | | | | | | | | | | Add internal inline functions _getchar_unlocked() and _putchar_unlocked() if __CUSTOM_FILE_IO__ is not defined. These functions get _REENT only once. Use them for getchar_unlocked() and putchar_unlocked(). Define getchar() and putchar() to these unlocked internal functions if __SINGLE_THREAD__ is defined, otherwise use the external functions to use proper locking of the FILE object. Assumes that __SINGLE_THREAD__ is not defined if __CYGWIN__ is defined. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Importing wcstoumax inttypes method from FreeBSD.Aditya Upadhyay2017-08-023-0/+160
|
* Importing wcstoimax inttypes method from FreeBSD.Aditya Upadhyay2017-08-023-0/+161
|
* Importing strtoumax inttypes method from FreeBSD.Aditya Upadhyay2017-08-023-0/+154
|
* Importing strtoimax inttypes method from FreeBSD.Aditya Upadhyay2017-08-023-0/+182
|
* Add elf.h to newlibYaakov Selkowitz2017-08-021-0/+3146
| | | | | | | This is copied from musl (MIT license). This is newer and more thorough than that of FreeBSD currently shipped only on Cygwin. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
* Importing catanl long double complex method from NetBSD.Aditya Upadhyay2017-07-283-4/+88
|
* Fixing HUGE_VALF to HUGE_VALL.Aditya Upadhyay2017-07-281-1/+1
|
* stdio: Fix make rule overrideSebastian Huber2017-07-282-10/+0
| | | | | | The Makefile.am contained two rules for the vfwscanf object. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* newlib: regenerate stdlib/Makefile.inCorinna Vinschen2017-07-281-33/+62
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Importing imaxdiv inttypes method from FreeBSD.Aditya Upadhyay2017-07-282-0/+49
|
* Importing imaxabs inttypes method from FreeBSD.Aditya Upadhyay2017-07-282-0/+37
|
* cygwin: Set __STDC_ISO_10646__ to Unicode 5.2 valueCorinna Vinschen2017-07-261-4/+3
| | | | | | Now that XP is not supported anymore we can freely do that. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* [arm] Fix strcpy for unified syntax on ARMv4t thumb.Richard Earnshaw2017-07-211-1/+1
| | | | | ARMv4t does not support mov between two low registers. Now we use unified syntax mov instructions need converting to movs.
* MSP430: Define __BUFSIZ__ as 256 to prevent default of 1024 being usednewlib-snapshot-20170720Jozef Lawrynowicz2017-07-201-0/+1
|
* arm: Update strcpy.c to use UAL syntax.Ian Tessier via newlib2017-07-201-6/+7
| | | | | | | | | | | | | With this change the arm platform can now be fully compiled with Clang. Tested by comparing the output with GCC 4.8.2, and Clang 4.0, using a variety of arches, big/little endianness, and arm/thumb mode to verify the generated assembly output matches between GCC vs Clang with UAL, and also GCC with UAL vs GCC with non-UAL, for all preprocessor code blocks. The only difference found is an extra nop at the end of the function when compiled with GCC using armv7-a/thumb/little-endian/-O2 compared to Clang. The nop is not emitted when compiled in big-endian mode.
* Synchronize RTEMS <sys/bitset.h> with FreeBSDSebastian Huber2017-07-121-5/+5
| | | | Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Add myself to OS Port Maintainers (RTEMS)Sebastian Huber2017-07-101-0/+1
|
* Synchronize RTEMS <sys/bitset.h> with FreeBSDSebastian Huber2017-07-101-1/+16
| | | | Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Rename __in and __out in headers to avoid collision with Windows APIsDavid Macek2017-07-071-9/+9
| | | | | * string.h: Local variables in expansion of strdupa and strndupa * sys/wait.h: Fields in anonymous union in expansion of __wait_status_to_int
* Fixed warnings for some long double complex methodsAditya Upadhyay2017-07-051-5/+5
|
* Add ffsl(), ffsll(), fls(), flsl(), flsll()Sebastian Huber2017-07-058-25/+240
| | | | | | | Use compiler builtin for ffs(). Remove duplicate implementation from Cygwin. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Synchronize <strings.h> with latest FreeBSDSebastian Huber2017-07-052-59/+62
| | | | | | | | | | Include <strings.h> in <string.h> if __BSD_VISIBLE like on FreeBSD. Remove redundant declarations from <string.h>. Make ffsl(), ffsll(), strncasecmp(), strcasecmp_l(), and strncasecmp_l() visible via __BSD_VISIBLE instead of __GNU_VISIBLE. Add fls(), flsl(), and flsll() to <strings.h> if __BSD_VISIBLE. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Implement bzero() via memset()Sebastian Huber2017-07-051-8/+5
| | | | | | | Use memset() to implement bzero() to profit from machine-specific memset() optimizations. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Feature test macros overhaul: unistd.h, part 2cygwin-2_8_1-releaseYaakov Selkowitz2017-06-301-4/+17
| | | | | | | This fixes commit f70aad3de4d845f8b720010a2f8817db842d81e8 as well as some other functions which were never properly guarded. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
* Add --enable-newlib-global-stdio-streamsSebastian Huber2017-06-305-2/+52
| | | | Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>