Commit Graph

19050 Commits

Author SHA1 Message Date
Sichen Zhao
42885ea4b8 Add man page entry for strnstr.c. 2017-08-30 15:10:07 +02:00
Sichen Zhao
f22054c94d Modify strnstr.c. 2017-08-30 15:08:58 +02:00
Corinna Vinschen
cdbec10e79 cygwin: add strptime %F fix to release notes
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-08-29 21:12:21 +02:00
Brian Inglis
d8e2463c75 winsup/cygwin/libc/strptime.cc(__strptime) fix %F width 2017-08-29 21:10:06 +02:00
Corinna Vinschen
4dfaef8141 cygwin: document %s support in strptime
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-08-29 11:16:13 +02:00
Sebastian Huber
f1863582ed Fix compile error due to new strnstr()
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>
2017-08-28 17:31:52 +02:00
ac8a82024f jehanne: add access(2) 2017-08-28 01:51:37 +02:00
27e59324a7 jehanne: initialize timeval and timezone reader 2017-08-25 23:29:01 +02:00
Corinna Vinschen
cf8bf843f8 cygwin: export strnstr
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-08-25 18:00:46 +02:00
Corinna Vinschen
c070326d31 newlib: rebuild string/Makefile.in
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-08-25 18:00:46 +02:00
Sichen Zhao
c206d04422 Port strnstr.c to newlib. 2017-08-25 18:00:46 +02:00
Sichen Zhao
3437665ac8 Import strnstr.c from FreeBSD. 2017-08-25 18:00:46 +02:00
Eric Blake
a4961ccd3f Revert "headers: avoid bareword attributes" for clang
This reverts most of commit 979d467ff6.

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>
2017-08-25 09:23:10 -05:00
Sebastian Huber
524eb4dc29 RTEMS: Use __uint64_t for _CLOCK_T_
This addresses:

https://devel.rtems.org/ticket/2135

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2017-08-25 14:25:42 +02:00
Sebastian Huber
7b2c362190 Make _CLOCK_T_ system configurable
Let systems optionally provide the _CLOCK_T_ type via
<machine/_types.h>.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2017-08-25 14:25:42 +02:00
Brian Inglis
406bd10fb4 newlib/libc/time/strptime.c(strptime_l) add %F %s support for strptime 2017-08-25 14:04:22 +02:00
Brian Inglis
8324ab5e2a winsup/cygwin/libc/strptime.cc(__strptime) add %s support to strptime 2017-08-25 11:39:11 +02:00
Alexander Fedotov-B55613
3ec9892f5d move ILP32 sanity check on heap base code under ARM_RDI_MONITOR 2017-08-24 14:41:19 +02:00
0ec8faf91e jehanne: fix open_translator 2017-08-24 00:10:39 +02:00
Corinna Vinschen
b706c6b479 cygwin: only expose /dev/con{in,out,sole} when started from a Windows console
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-08-23 17:43:41 +02:00
779da685df jehanne: define mkdir, chdir and fchdir 2017-08-23 04:59:30 +02:00
58696ccd34 jehanne: configure AT_FDCWD 2017-08-23 03:08:07 +02:00
60b472da26 jehanne: fix build 2017-08-23 02:24:29 +02:00
7917cb8537 jehanne: handle POSIX_chmod and POSIX_fchmod in default_error_translator 2017-08-23 01:07:32 +02:00
9daa35f217 jehanne: implement open_translator according to the new specification in libposix 2017-08-22 03:33:20 +02:00
Kito Cheng
bd86e9de75 Add myself to RISC-V Port Maintainer 2017-08-21 11:09:15 +02:00
Kito Cheng
6864c08b94 Change license to FreeBSD License for RISC-V
- 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.
2017-08-21 11:08:54 +02:00
075dc184a0 jehanne: introduce libposix_getdents machinery 2017-08-21 01:19:27 +02:00
79333d77e6 jehanne: add getcwd, getlogin, getlogin_r, getpass, pread and pwrite 2017-08-21 00:16:08 +02:00
185a319fdc jehanne: enable posix and unix functions in configure.host 2017-08-21 00:15:07 +02:00
Ken Brown
3012e251fa Document renameat2 2017-08-19 19:43:15 +02:00
Ken Brown
f665b1cef3 cygwin: Implement renameat2
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.
2017-08-19 18:06:49 +02:00
de37f0ac51 jehanne: rm useless local.h 2017-08-19 16:35:46 +02:00
075aeba3a9 jehanne: enable posix build 2017-08-19 16:09:36 +02:00
025678147e jehanne: fix sys/dirent.h (still BROKEN) 2017-08-19 00:08:48 +02:00
8fbd328317 jehanne: first try to enable posix (BROKEN) 2017-08-18 01:02:24 +02:00
8059e6c9db jehanne: introduced pause 2017-08-18 00:15:26 +02:00
1680e696ac Merge branch 'upstream-master' 2017-08-17 22:40:51 +02:00
Kito Cheng
c496cbb6bd Add RISC-V port for libgloss
Contributor list:
    - Andrew Waterman  <andrew@sifive.com>
    - Palmer Dabbelt  <palmer@dabbelt.com>
    - Kito Cheng  <kito.cheng@gmail.com>
    - Alex Suykov  <alex.suykov@gmail.com>
2017-08-17 14:51:05 -04:00
Kito Cheng
7040b2de08 Add RISC-V port for libm
Contributor list:
    - Michael Neilly  <mneilly@yahoo.com>
    - Kito Cheng  <kito.cheng@gmail.com>
2017-08-17 12:54:56 -04:00
Eric Blake
979d467ff6 headers: avoid bareword attributes
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>
2017-08-17 07:10:03 -05:00
Eric Blake
7b3d8b9485 headers: avoid bareword attributes
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>
2017-08-17 07:10:03 -05:00
Szabolcs Nagy
cfa64a86d1 Fix crt0 init fini code
__USES_INITFINI__ ifdef was incorrectly copied from arm
(it's an arm backend thing in gcc, not meaningful on aarch64)
2017-08-17 13:45:26 +02:00
Kito Cheng
363dbb9e44 Add RISC-V port for newlib
Contributor list:
    - Andrew Waterman  <andrew@sifive.com>
    - Palmer Dabbelt  <palmer@dabbelt.com>
    - Kito Cheng  <kito.cheng@gmail.com>
    - Scott Beamer  <sbeamer@eecs.berkeley.edu>
2017-08-16 18:00:58 -04:00
Alexander Fedotov-B55613
7e69f983a4 fix typo in AArch64 crt0 2017-08-15 16:19:25 +02:00
Alexander Fedotov-B55613
1f6644876e use stack from linker script when nosys 2017-08-14 10:18:14 +02:00
Corinna Vinschen
9d602b98f8 newlib: regenerate libc/stdlib/Makefile.am
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-08-11 10:17:16 +02:00
Yao Qi
32ca315312 Don't fetch command line options without semi-hosting
Nowadays, the code fetching command line options via semi-hosting are
unconditionally pulled in, so that the semi-hosting code is still
there even I compile with option --specs=nosys.specs.

gdb ./aarch64-none-elf/libgloss/aarch64/crt0.o

(gdb) disassemble _start

   0x0000000000000050 <+80>:	ldr	x1, 0x128 <_cpu_init_hook+48>
   0x0000000000000054 <+84>:	mov	w0, #0x15
   0x0000000000000058 <+88>:	hlt	#0xf000

This patch fixes this problem by wrapping the code by ARM_RDI_MONITOR.
When semi-hosting is not used, set command line options to NULL.
2017-08-09 17:43:09 +02:00
Tamar Christina
61ddc7a436 Fix crt0 overwriting.
On AArch64 we currently always link in crt0 regardless of if another
one is being provided by something else, like rdimon.a. This was never
an issue before as nosys was not supported on AArch64.

This updates the specs to supply a different crt0 when a semihosting
call is required.

Signed-off-by: Tamar Christina <tamar.christina@arm.com>
2017-08-09 14:50:13 +02:00
Ken Brown
d7821c045e Define sigsetjmp/siglongjmp only if __POSIX_VISIBLE 2017-08-07 16:07:46 +02:00