Hi Thomas, Khem, Alexey,
recently Khem tried to use systemd with openembedded and uClibc-ng.
Most of the needed stuff is ready and will be committed soon.
There is one open issue I want to discuss with you.
The GLIBC_MINOR bump in commit
4a05ed87ceb946608100642121c32e642b58cd0d is breaking SSP detection
in GCC. This was discovered in Buildroot and fixed.
It seems there is a major problem to fix it in OpenEmbedded, so
Khem is asking for revert of this commit for the next release.
What do you think about it?
Isn't the boost problem solved anyway in another way?
May be we just learned what it means to bump this number and
can revert it back to the old value. We should still try
to get a patch into gcc to avoid any misdetection regarding
SSP for the next major gcc release.
Thanks for any opinion,
best regards
Waldemar
The current (arbitrary) limit of 128 characters for path names has
proven too short for Android builds, as longer path names are used
there.
Change conf.c, so it can handle path lengths up to PATH_MAX characters.
Signed-off-by: Markus Mayer <mmayer(a)broadcom.com>
---
This change was also submitted to the Linux community and has been
accepted.
https://git.kernel.org/cgit/linux/kernel/git/mmarek/kbuild.git/commit/?h=kc…
extra/config/conf.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/extra/config/conf.c b/extra/config/conf.c
index b24c1c3..34bb4f5 100644
--- a/extra/config/conf.c
+++ b/extra/config/conf.c
@@ -5,6 +5,7 @@
#include <locale.h>
#include <ctype.h>
+#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -40,7 +41,7 @@ static int tty_stdio;
static int valid_stdin = 1;
static int sync_kconfig;
static int conf_cnt;
-static char line[128];
+static char line[PATH_MAX];
static struct menu *rootEntry;
static void print_help(struct menu *menu)
@@ -108,7 +109,7 @@ static int conf_askvalue(struct symbol *sym, const char *def)
/* fall through */
case oldaskconfig:
fflush(stdout);
- xfgets(line, 128, stdin);
+ xfgets(line, sizeof(line), stdin);
if (!tty_stdio)
printf("\n");
return 1;
@@ -310,7 +311,7 @@ static int conf_choice(struct menu *menu)
/* fall through */
case oldaskconfig:
fflush(stdout);
- xfgets(line, 128, stdin);
+ xfgets(line, sizeof(line), stdin);
strip(line);
if (line[0] == '?') {
print_help(menu);
--
1.9.1
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "uClibc-ng - small C library for embedded systems".
The branch, 1.0 has been updated
via d1b81113b43a6d26dec4e0e58a380895d121006e (commit)
from 507f795a5969fcba5196236e706aecab5ee91dd9 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit d1b81113b43a6d26dec4e0e58a380895d121006e
Author: Waldemar Brodkorb <wbx(a)uclibc-ng.org>
Date: Fri Dec 11 09:02:22 2015 +0100
Revert "fix tst-signal7 failure"
This reverts commit ea21c7610aa1131b37a4533cf13dd89f727fb83f.
This was accidently pushed, before first coffee.
Sorry this is a bad commit.
-----------------------------------------------------------------------
Summary of changes:
libc/signal/sigaction.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/libc/signal/sigaction.c b/libc/signal/sigaction.c
index 0a02998..2560647 100644
--- a/libc/signal/sigaction.c
+++ b/libc/signal/sigaction.c
@@ -25,11 +25,6 @@
int
__libc_sigaction(int sig, const struct sigaction *act, struct sigaction *oact)
{
- if (unlikely (sig == SIGCANCEL || sig == SIGSETXID)) {
- __set_errno (EINVAL);
- return -1;
- }
-
/* NB: kernel (as of 2.6.25) will return EINVAL
* if sizeof(act->sa_mask) does not match kernel's sizeof(sigset_t).
* Try to catch this problem at uclibc build time: */
@@ -53,11 +48,6 @@ __libc_sigaction(int sig, const struct sigaction *act, struct sigaction *oact)
int result;
struct old_kernel_sigaction kact, koact;
- if (unlikely (sig == SIGCANCEL || sig == SIGSETXID)) {
- __set_errno (EINVAL);
- return -1;
- }
-
if (act) {
kact.k_sa_handler = act->sa_handler;
kact.sa_mask = act->sa_mask.__val[0];
hooks/post-receive
--
uClibc-ng - small C library for embedded systems
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "uClibc-ng - small C library for embedded systems".
The branch, 1.0 has been updated
via 507f795a5969fcba5196236e706aecab5ee91dd9 (commit)
via ea21c7610aa1131b37a4533cf13dd89f727fb83f (commit)
via 7661046a31605024d5cd2ef4eed24d1774539d8b (commit)
from f3702d3e353f5a5da500f9029b0d1edaff7affff (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 507f795a5969fcba5196236e706aecab5ee91dd9
Author: Markus Mayer <mmayer(a)broadcom.com>
Date: Thu Dec 10 11:24:24 2015 -0800
config: allow config to handle longer path names
The current (arbitrary) limit of 128 characters for path names has
proven too short for Android builds, as longer path names are used
there.
Change conf.c, so it can handle path lengths up to PATH_MAX characters.
Signed-off-by: Markus Mayer <mmayer(a)broadcom.com>
commit ea21c7610aa1131b37a4533cf13dd89f727fb83f
Author: Waldemar Brodkorb <wbx(a)uclibc-ng.org>
Date: Thu Dec 10 11:21:13 2015 +0100
fix tst-signal7 failure
error out on internal NPTL used signals.
commit 7661046a31605024d5cd2ef4eed24d1774539d8b
Author: Waldemar Brodkorb <wbx(a)uclibc-ng.org>
Date: Thu Dec 10 11:04:57 2015 +0100
disable always failing tst-tls16, until someone unbreak it
-----------------------------------------------------------------------
Summary of changes:
extra/config/conf.c | 7 ++++---
libc/signal/sigaction.c | 10 ++++++++++
test/tls/Makefile.in | 4 ++++
3 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/extra/config/conf.c b/extra/config/conf.c
index b24c1c3..34bb4f5 100644
--- a/extra/config/conf.c
+++ b/extra/config/conf.c
@@ -5,6 +5,7 @@
#include <locale.h>
#include <ctype.h>
+#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -40,7 +41,7 @@ static int tty_stdio;
static int valid_stdin = 1;
static int sync_kconfig;
static int conf_cnt;
-static char line[128];
+static char line[PATH_MAX];
static struct menu *rootEntry;
static void print_help(struct menu *menu)
@@ -108,7 +109,7 @@ static int conf_askvalue(struct symbol *sym, const char *def)
/* fall through */
case oldaskconfig:
fflush(stdout);
- xfgets(line, 128, stdin);
+ xfgets(line, sizeof(line), stdin);
if (!tty_stdio)
printf("\n");
return 1;
@@ -310,7 +311,7 @@ static int conf_choice(struct menu *menu)
/* fall through */
case oldaskconfig:
fflush(stdout);
- xfgets(line, 128, stdin);
+ xfgets(line, sizeof(line), stdin);
strip(line);
if (line[0] == '?') {
print_help(menu);
diff --git a/libc/signal/sigaction.c b/libc/signal/sigaction.c
index 2560647..0a02998 100644
--- a/libc/signal/sigaction.c
+++ b/libc/signal/sigaction.c
@@ -25,6 +25,11 @@
int
__libc_sigaction(int sig, const struct sigaction *act, struct sigaction *oact)
{
+ if (unlikely (sig == SIGCANCEL || sig == SIGSETXID)) {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
/* NB: kernel (as of 2.6.25) will return EINVAL
* if sizeof(act->sa_mask) does not match kernel's sizeof(sigset_t).
* Try to catch this problem at uclibc build time: */
@@ -48,6 +53,11 @@ __libc_sigaction(int sig, const struct sigaction *act, struct sigaction *oact)
int result;
struct old_kernel_sigaction kact, koact;
+ if (unlikely (sig == SIGCANCEL || sig == SIGSETXID)) {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
if (act) {
kact.k_sa_handler = act->sa_handler;
kact.sa_mask = act->sa_mask.__val[0];
diff --git a/test/tls/Makefile.in b/test/tls/Makefile.in
index bbb4216..6e193a9 100644
--- a/test/tls/Makefile.in
+++ b/test/tls/Makefile.in
@@ -7,6 +7,10 @@ TESTS := tst-tls1 tst-tls2 tst-tls3 tst-tls4 tst-tls5 tst-tls6 tst-tls7 \
tst-tls1-static tst-tls2-static tst-tls9-static
TESTS_DISABLED := tst-tls1-static tst-tls2-static tst-tls9-static
+# test always fails for every architecture,
+# guessing some unimplemented check or feature
+TESTS_DISABLED += tst-tls16
+
#all these tests require shared libraries
ifeq ($(HAVE_SHARED),)
TESTS_DISABLED := $(TESTS)
hooks/post-receive
--
uClibc-ng - small C library for embedded systems
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "uClibc-ng - small C library for embedded systems".
The branch, master has been updated
via a4b3f4863e5904fef296538fdf71e7e806bf77e9 (commit)
from 97a011d422f037af35d77c15ccc94c2ed1121471 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit a4b3f4863e5904fef296538fdf71e7e806bf77e9
Author: Markus Mayer <mmayer(a)broadcom.com>
Date: Thu Dec 10 11:24:24 2015 -0800
config: allow config to handle longer path names
The current (arbitrary) limit of 128 characters for path names has
proven too short for Android builds, as longer path names are used
there.
Change conf.c, so it can handle path lengths up to PATH_MAX characters.
Signed-off-by: Markus Mayer <mmayer(a)broadcom.com>
-----------------------------------------------------------------------
Summary of changes:
extra/config/conf.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/extra/config/conf.c b/extra/config/conf.c
index b24c1c3..34bb4f5 100644
--- a/extra/config/conf.c
+++ b/extra/config/conf.c
@@ -5,6 +5,7 @@
#include <locale.h>
#include <ctype.h>
+#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -40,7 +41,7 @@ static int tty_stdio;
static int valid_stdin = 1;
static int sync_kconfig;
static int conf_cnt;
-static char line[128];
+static char line[PATH_MAX];
static struct menu *rootEntry;
static void print_help(struct menu *menu)
@@ -108,7 +109,7 @@ static int conf_askvalue(struct symbol *sym, const char *def)
/* fall through */
case oldaskconfig:
fflush(stdout);
- xfgets(line, 128, stdin);
+ xfgets(line, sizeof(line), stdin);
if (!tty_stdio)
printf("\n");
return 1;
@@ -310,7 +311,7 @@ static int conf_choice(struct menu *menu)
/* fall through */
case oldaskconfig:
fflush(stdout);
- xfgets(line, 128, stdin);
+ xfgets(line, sizeof(line), stdin);
strip(line);
if (line[0] == '?') {
print_help(menu);
hooks/post-receive
--
uClibc-ng - small C library for embedded systems
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "uClibc-ng - small C library for embedded systems".
The branch, master has been updated
via 97a011d422f037af35d77c15ccc94c2ed1121471 (commit)
via 1606a5c1fe3d1772636fac0976acdce3972be40d (commit)
from 4e3f659c92fae8a539aeeb113ee401a56d775ab7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 97a011d422f037af35d77c15ccc94c2ed1121471
Author: Waldemar Brodkorb <wbx(a)openadk.org>
Date: Wed Dec 9 19:41:41 2015 +0100
arc: add ulps file for math tests
Using non-generic ulps file reduces failure counts for
math tests. Generated with nsim emulator running
test-{double,idouble,float,ifloat} -u and
gen-libm-test.pl on the build host.
commit 1606a5c1fe3d1772636fac0976acdce3972be40d
Author: Waldemar Brodkorb <wbx(a)uclibc-ng.org>
Date: Wed Dec 9 19:26:33 2015 +0100
do not hardcode path to perl
When cross-compiling on other Unix systems like
FreeBSD 10.x, perl is not in /usr/bin. Use env
to find the perl interpreter and use no fixed path
when executing via make.
-----------------------------------------------------------------------
Summary of changes:
test/math/Makefile.in | 2 +-
test/math/gen-libm-test.pl | 2 +-
.../{libm-test-ulps-xtensa => libm-test-ulps-arc} | 17 ++++++++++++++++-
3 files changed, 18 insertions(+), 3 deletions(-)
copy test/math/{libm-test-ulps-xtensa => libm-test-ulps-arc} (90%)
diff --git a/test/math/Makefile.in b/test/math/Makefile.in
index 9fbd58a..3874001 100644
--- a/test/math/Makefile.in
+++ b/test/math/Makefile.in
@@ -28,7 +28,7 @@ endif
EXTRA_CFLAGS := -fno-builtin
EXTRA_LDFLAGS := -lm
-PERL := /usr/bin/perl
+PERL := perl
MDEPS := $(wildcard test-*.c)
$(MDEPS): libm-test.c
diff --git a/test/math/gen-libm-test.pl b/test/math/gen-libm-test.pl
index 0bb2b46..118f352 100755
--- a/test/math/gen-libm-test.pl
+++ b/test/math/gen-libm-test.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
# Copyright (C) 1999 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Andreas Jaeger <aj(a)suse.de>, 1999.
diff --git a/test/math/libm-test-ulps-xtensa b/test/math/libm-test-ulps-arc
similarity index 90%
copy from test/math/libm-test-ulps-xtensa
copy to test/math/libm-test-ulps-arc
index 9c730fa..7139447 100644
--- a/test/math/libm-test-ulps-xtensa
+++ b/test/math/libm-test-ulps-arc
@@ -2,7 +2,6 @@
# cos
Test "cos (M_PI_6l * 2.0) == 0.5":
-double: 1
idouble: 1
Test "cos (M_PI_6l * 4.0) == -0.5":
double: 2
@@ -79,6 +78,16 @@ Test "log10 (e) == log10(e)":
float: 1
ifloat: 1
+# tgamma
+Test "tgamma (-0.5) == -2 sqrt (pi)":
+double: 1
+idouble: 1
+Test "tgamma (0.7) == 1.29805533264755778568117117915281162":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
# Maximal error of functions:
Function: "cos":
double: 2
@@ -126,4 +135,10 @@ Function: "tan":
double: 1
idouble: 1
+Function: "tgamma":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
# end of automatic generation
hooks/post-receive
--
uClibc-ng - small C library for embedded systems
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "uClibc-ng - small C library for embedded systems".
The branch, 1.0 has been updated
via f3702d3e353f5a5da500f9029b0d1edaff7affff (commit)
from 90c76c06c09a83d76c3fb00768bad09fe747c3c3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit f3702d3e353f5a5da500f9029b0d1edaff7affff
Author: Waldemar Brodkorb <wbx(a)openadk.org>
Date: Wed Dec 9 19:41:41 2015 +0100
arc: add ulps file for math tests
Using non-generic ulps file reduces failure counts for
math tests. Generated with nsim emulator running
test-{double,idouble,float,ifloat} -u and
gen-libm-test.pl on the build host.
-----------------------------------------------------------------------
Summary of changes:
.../{libm-test-ulps-xtensa => libm-test-ulps-arc} | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
copy test/math/{libm-test-ulps-xtensa => libm-test-ulps-arc} (90%)
diff --git a/test/math/libm-test-ulps-xtensa b/test/math/libm-test-ulps-arc
similarity index 90%
copy from test/math/libm-test-ulps-xtensa
copy to test/math/libm-test-ulps-arc
index 9c730fa..7139447 100644
--- a/test/math/libm-test-ulps-xtensa
+++ b/test/math/libm-test-ulps-arc
@@ -2,7 +2,6 @@
# cos
Test "cos (M_PI_6l * 2.0) == 0.5":
-double: 1
idouble: 1
Test "cos (M_PI_6l * 4.0) == -0.5":
double: 2
@@ -79,6 +78,16 @@ Test "log10 (e) == log10(e)":
float: 1
ifloat: 1
+# tgamma
+Test "tgamma (-0.5) == -2 sqrt (pi)":
+double: 1
+idouble: 1
+Test "tgamma (0.7) == 1.29805533264755778568117117915281162":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
# Maximal error of functions:
Function: "cos":
double: 2
@@ -126,4 +135,10 @@ Function: "tan":
double: 1
idouble: 1
+Function: "tgamma":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
# end of automatic generation
hooks/post-receive
--
uClibc-ng - small C library for embedded systems
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "uClibc-ng - small C library for embedded systems".
The branch, 1.0 has been updated
via 90c76c06c09a83d76c3fb00768bad09fe747c3c3 (commit)
from 1e28bdaabba3cdc26df028d70f9e15e055e75587 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 90c76c06c09a83d76c3fb00768bad09fe747c3c3
Author: Waldemar Brodkorb <wbx(a)uclibc-ng.org>
Date: Wed Dec 9 19:26:33 2015 +0100
do not hardcode path to perl
When cross-compiling on other Unix systems like
FreeBSD 10.x, perl is not in /usr/bin. Use env
to find the perl interpreter and use no fixed path
when executing via make.
-----------------------------------------------------------------------
Summary of changes:
test/math/Makefile.in | 2 +-
test/math/gen-libm-test.pl | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/math/Makefile.in b/test/math/Makefile.in
index 9fbd58a..3874001 100644
--- a/test/math/Makefile.in
+++ b/test/math/Makefile.in
@@ -28,7 +28,7 @@ endif
EXTRA_CFLAGS := -fno-builtin
EXTRA_LDFLAGS := -lm
-PERL := /usr/bin/perl
+PERL := perl
MDEPS := $(wildcard test-*.c)
$(MDEPS): libm-test.c
diff --git a/test/math/gen-libm-test.pl b/test/math/gen-libm-test.pl
index 0bb2b46..118f352 100755
--- a/test/math/gen-libm-test.pl
+++ b/test/math/gen-libm-test.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
# Copyright (C) 1999 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Andreas Jaeger <aj(a)suse.de>, 1999.
hooks/post-receive
--
uClibc-ng - small C library for embedded systems
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "uClibc-ng - small C library for embedded systems".
The branch, master has been updated
via 4e3f659c92fae8a539aeeb113ee401a56d775ab7 (commit)
via 20f61d8227b757f364b5ad954e80aad0d536d755 (commit)
via 3ad0aaa4ff5f98b6acde00a818535f5471e34b05 (commit)
via f432206837edf59037144663247e4113253f8f5a (commit)
via f6768c0bb6aae27de0c1817a73e31f25ff8451c8 (commit)
via 38d3f776ab19da96a61044a3585dd725358bd495 (commit)
via deafbaafe910a241f73bcf7d2f5f69edb9020336 (commit)
via 2b6d42214806bfdc30f26fe455e96ff358db30f5 (commit)
from a98c0d895aa641f0b36f6bace44142e59bf8453c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 4e3f659c92fae8a539aeeb113ee401a56d775ab7
Author: Waldemar Brodkorb <wbx(a)openadk.org>
Date: Wed Dec 9 07:35:28 2015 +0100
new test is only for MALLOC_STANDARD
commit 20f61d8227b757f364b5ad954e80aad0d536d755
Author: Waldemar Brodkorb <wbx(a)openadk.org>
Date: Sun Dec 6 18:09:10 2015 +0100
bsd supports the same floating point classification functions as c99
Fixes inetd compile. From OpenWrt.
Signed-off-by: Leonid Lisovskiy <lly.dev(a)gmail.com>
Signed-off-by: Waldemar Brodkorb <wbx(a)uclibc-ng.org>
commit 3ad0aaa4ff5f98b6acde00a818535f5471e34b05
Author: Waldemar Brodkorb <wbx(a)openadk.org>
Date: Sun Dec 6 18:05:32 2015 +0100
Reduce the initial buffer size for open_memstream
Reduce the initial buffer size for open_memstream (used by vasprintf),
as most strings are usually smaller than that.
Realloc the buffer after finishing the string to further reduce size.
Problem appears in case of UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y,
see http://dev.openwrt.org/ticket/13024
Signed-off-by: Felix Fietkau <nbd(a)openwrt.org>
Signed-off-by: Leonid Lisovskiy <lly.dev(a)gmail.com>
Signed-off-by: Waldemar Brodkorb <wbx(a)uclibc-ng.org>
commit f432206837edf59037144663247e4113253f8f5a
Author: Waldemar Brodkorb <wbx(a)openadk.org>
Date: Sun Dec 6 17:59:04 2015 +0100
Define __attribute_const__
Signed-off-by: Leonid Lisovskiy <lly.dev(a)gmail.com>
Signed-off-by: Waldemar Brodkorb <wbx(a)uclibc-ng.org>
commit f6768c0bb6aae27de0c1817a73e31f25ff8451c8
Author: Khem Raj <raj.khem(a)gmail.com>
Date: Sun Aug 16 20:58:59 2015 -0700
Do not support localised optimizations this helps to have a global -O level
Signed-off-by: Khem Raj <raj.khem(a)gmail.com>
Signed-off-by: Waldemar Brodkorb <wbx(a)uclibc-ng.org>
commit 38d3f776ab19da96a61044a3585dd725358bd495
Author: Waldemar Brodkorb <wbx(a)openadk.org>
Date: Sun Dec 6 17:53:50 2015 +0100
Avoid unnecessary rebuilds due to compiler flag changes
Signed-off-by: Leonid Lisovskiy <lly.dev(a)gmail.com>
Signed-off-by: Waldemar Brodkorb <wbx(a)uclibc-ng.org>
commit deafbaafe910a241f73bcf7d2f5f69edb9020336
Author: Waldemar Brodkorb <wbx(a)uclibc-ng.org>
Date: Tue Dec 8 18:30:57 2015 +0100
sync with glibc, add some missing defines
These are already used by some applications, so add it.
commit 2b6d42214806bfdc30f26fe455e96ff358db30f5
Author: Waldemar Brodkorb <wbx(a)uclibc-ng.org>
Date: Mon Dec 7 20:20:56 2015 +0100
add definitions for O_PATH
Only alpha, hppa and sparc need non-default value.
-----------------------------------------------------------------------
Summary of changes:
Rules.mak | 6 +++---
include/fcntl.h | 5 +++++
include/math.h | 7 ++++++-
include/sys/cdefs.h | 6 ++++++
libc/stdio/open_memstream.c | 4 +++-
libc/stdio/vasprintf.c | 2 ++
libc/sysdeps/linux/alpha/bits/fcntl.h | 7 ++++---
libc/sysdeps/linux/arc/bits/fcntl.h | 1 +
libc/sysdeps/linux/arm/bits/fcntl.h | 1 +
libc/sysdeps/linux/avr32/bits/fcntl.h | 3 ++-
libc/sysdeps/linux/bfin/bits/fcntl.h | 1 +
libc/sysdeps/linux/c6x/bits/fcntl.h | 1 +
libc/sysdeps/linux/cris/bits/fcntl.h | 1 +
libc/sysdeps/linux/frv/bits/fcntl.h | 1 +
libc/sysdeps/linux/h8300/bits/fcntl.h | 1 +
libc/sysdeps/linux/hppa/bits/fcntl.h | 1 +
libc/sysdeps/linux/i386/bits/fcntl.h | 1 +
libc/sysdeps/linux/ia64/bits/fcntl.h | 1 +
libc/sysdeps/linux/lm32/bits/fcntl.h | 1 +
libc/sysdeps/linux/m68k/bits/fcntl.h | 1 +
libc/sysdeps/linux/metag/bits/fcntl.h | 1 +
libc/sysdeps/linux/microblaze/bits/fcntl.h | 1 +
libc/sysdeps/linux/mips/bits/fcntl.h | 3 ++-
libc/sysdeps/linux/nios2/bits/fcntl.h | 5 +++--
libc/sysdeps/linux/or1k/bits/fcntl.h | 1 +
libc/sysdeps/linux/powerpc/bits/fcntl.h | 5 +++--
libc/sysdeps/linux/sh/bits/fcntl.h | 1 +
libc/sysdeps/linux/sparc/bits/fcntl.h | 7 ++++---
libc/sysdeps/linux/x86_64/bits/fcntl.h | 1 +
libc/sysdeps/linux/xtensa/bits/fcntl.h | 1 +
libpthread/nptl/pthread_mutex_timedlock.c | 2 ++
test/malloc/Makefile.in | 4 ++++
test/malloc/tst-asprintf.c | 27 +++++++++++++++++++++++++++
33 files changed, 94 insertions(+), 17 deletions(-)
create mode 100644 test/malloc/tst-asprintf.c
diff --git a/Rules.mak b/Rules.mak
index 8c6bf72..c609c1d 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -328,6 +328,9 @@ PICFLAG-$(UCLIBC_FORMAT_DSBT_ELF) := -mdsbt -fpic
PICFLAG := $(PICFLAG-y)
PIEFLAG_NAME:=-fPIE
+$(eval $(call check-gcc-var,-fdata-sections))
+$(eval $(call check-gcc-var,-ffunction-sections))
+
# Some nice CPU specific optimizations
ifeq ($(TARGET_ARCH),i386)
$(eval $(call check-gcc-var,-fomit-frame-pointer))
@@ -631,9 +634,6 @@ LDFLAGS_NOSTRIP:=$(LDFLAG-fuse-ld) $(CPU_LDFLAGS-y) -shared \
#$(eval $(call check-ld-var,--gc-sections))
#LDFLAGS_NOSTRIP += $(LDFLAG_--gc-sections)
-$(eval $(call check-gcc-var,-fdata-sections))
-$(eval $(call check-gcc-var,-ffunction-sections))
-
ifeq ($(UCLIBC_BUILD_RELRO),y)
LDFLAGS_NOSTRIP+=-Wl,-z,relro
endif
diff --git a/include/fcntl.h b/include/fcntl.h
index 11000dd..adcd7ef 100644
--- a/include/fcntl.h
+++ b/include/fcntl.h
@@ -63,6 +63,11 @@ __BEGIN_DECLS
# define AT_REMOVEDIR 0x200 /* Remove directory instead of
unlinking file. */
# define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic links. */
+# ifdef __USE_GNU
+# define AT_NO_AUTOMOUNT 0x800 /* Suppress terminal automount
+ traversal. */
+# define AT_EMPTY_PATH 0x1000 /* Allow empty relative pathname. */
+# endif
# define AT_EACCESS 0x200 /* Test access permitted for
effective IDs, not real IDs. */
#endif
diff --git a/include/math.h b/include/math.h
index 1b54c9e..2545476 100644
--- a/include/math.h
+++ b/include/math.h
@@ -196,7 +196,7 @@ extern int signgam;
/* ISO C99 defines some generic macros which work on any data type. */
-#ifdef __USE_ISOC99
+#if defined(__USE_ISOC99) || defined(__USE_BSD)
/* Get the architecture specific values describing the floating-point
evaluation. The following symbols will get defined:
@@ -316,6 +316,11 @@ enum
#endif /* Use ISO C99. */
+/* BSD compat */
+#define finite(x) __finite(x)
+#define finitef(x) __finitef(x)
+#define finitel(x) __finitel(x)
+
#ifdef __USE_MISC
/* Support for various different standard error handling behaviors. */
typedef enum
diff --git a/include/sys/cdefs.h b/include/sys/cdefs.h
index 4da981f..f725ce9 100644
--- a/include/sys/cdefs.h
+++ b/include/sys/cdefs.h
@@ -231,6 +231,12 @@
# define __attribute_pure__ /* Ignore */
#endif
+#if __GNUC_PREREQ (2,96)
+# define __attribute_const__ __attribute__((__const__))
+#else
+# define __attribute_const__ /* unimplemented */
+#endif
+
/* At some point during the gcc 3.1 development the `used' attribute
for functions was introduced. We don't want to use it unconditionally
(although this would be possible) since it generates warnings. */
diff --git a/libc/stdio/open_memstream.c b/libc/stdio/open_memstream.c
index 5400fe4..17ef191 100644
--- a/libc/stdio/open_memstream.c
+++ b/libc/stdio/open_memstream.c
@@ -17,6 +17,8 @@
#define COOKIE ((__oms_cookie *) cookie)
+#define MEMSTREAM_BUFSIZ 256
+
typedef struct {
char *buf;
size_t len;
@@ -134,7 +136,7 @@ FILE *open_memstream(char **bufloc, size_t *sizeloc)
register FILE *fp;
if ((cookie = malloc(sizeof(__oms_cookie))) != NULL) {
- if ((cookie->buf = malloc(cookie->len = BUFSIZ)) == NULL) {
+ if ((cookie->buf = malloc(cookie->len = MEMSTREAM_BUFSIZ)) == NULL) {
goto EXIT_cookie;
}
*cookie->buf = 0; /* Set nul terminator for buffer. */
diff --git a/libc/stdio/vasprintf.c b/libc/stdio/vasprintf.c
index 5cd48ec..026d8b2 100644
--- a/libc/stdio/vasprintf.c
+++ b/libc/stdio/vasprintf.c
@@ -33,6 +33,8 @@ int vasprintf(char **__restrict buf, const char * __restrict format,
if (rv < 0) {
free(*buf);
*buf = NULL;
+ } else {
+ *buf = realloc(*buf, rv + 1);
}
}
diff --git a/libc/sysdeps/linux/alpha/bits/fcntl.h b/libc/sysdeps/linux/alpha/bits/fcntl.h
index a44be9e..34a174c 100644
--- a/libc/sysdeps/linux/alpha/bits/fcntl.h
+++ b/libc/sysdeps/linux/alpha/bits/fcntl.h
@@ -47,9 +47,10 @@
#ifdef __USE_GNU
# define O_DIRECTORY 0100000 /* Must be a directory. */
# define O_NOFOLLOW 0200000 /* Do not follow links. */
-# define O_DIRECT 02000000 /* Direct disk access. */
-# define O_NOATIME 04000000 /* Do not set atime. */
-# define O_CLOEXEC 010000000 /* Set close_on_exec. */
+# define O_DIRECT 02000000 /* Direct disk access. */
+# define O_NOATIME 04000000 /* Do not set atime. */
+# define O_CLOEXEC 010000000 /* Set close_on_exec. */
+# define O_PATH 040000000 /* Resolve pathname but do not open file. */
#endif
#ifdef __USE_LARGEFILE64
diff --git a/libc/sysdeps/linux/arc/bits/fcntl.h b/libc/sysdeps/linux/arc/bits/fcntl.h
index 1cb9600..d7d626b 100755
--- a/libc/sysdeps/linux/arc/bits/fcntl.h
+++ b/libc/sysdeps/linux/arc/bits/fcntl.h
@@ -37,6 +37,7 @@
# define O_NOFOLLOW 0400000 /* Do not follow links. */
# define O_NOATIME 01000000 /* Do not set atime. */
# define O_CLOEXEC 02000000 /* Set close_on_exec. */
+# define O_PATH 010000000 /* Resolve pathname but do not open file. */
#endif
#ifdef __USE_LARGEFILE64
diff --git a/libc/sysdeps/linux/arm/bits/fcntl.h b/libc/sysdeps/linux/arm/bits/fcntl.h
index aedc154..c6ba958 100644
--- a/libc/sysdeps/linux/arm/bits/fcntl.h
+++ b/libc/sysdeps/linux/arm/bits/fcntl.h
@@ -50,6 +50,7 @@
# define O_DIRECT 0200000 /* Direct disk access. */
# define O_NOATIME 01000000 /* Do not set atime. */
# define O_CLOEXEC 02000000 /* Set close_on_exec. */
+# define O_PATH 010000000 /* Resolve pathname but do not open file. */
#endif
/* For now Linux has synchronisity options for data and read operations.
diff --git a/libc/sysdeps/linux/avr32/bits/fcntl.h b/libc/sysdeps/linux/avr32/bits/fcntl.h
index 767243e..5e32512 100644
--- a/libc/sysdeps/linux/avr32/bits/fcntl.h
+++ b/libc/sysdeps/linux/avr32/bits/fcntl.h
@@ -30,7 +30,8 @@
# define O_DIRECTORY 00200000 /* direct disk access */
# define O_NOFOLLOW 00400000 /* don't follow links */
# define O_NOATIME 01000000 /* don't set atime */
-# define O_CLOEXEC 02000000 /* set close_on_exec */
+# define O_CLOEXEC 02000000 /* set close_on_exec */
+# define O_PATH 010000000 /* Resolve pathname but do not open file. */
#endif
#ifdef __USE_LARGEFILE64
diff --git a/libc/sysdeps/linux/bfin/bits/fcntl.h b/libc/sysdeps/linux/bfin/bits/fcntl.h
index e987824..d441241 100644
--- a/libc/sysdeps/linux/bfin/bits/fcntl.h
+++ b/libc/sysdeps/linux/bfin/bits/fcntl.h
@@ -49,6 +49,7 @@
# define O_DIRECT 0200000 /* Direct disk access. */
# define O_NOATIME 01000000 /* don't set atime */
# define O_CLOEXEC 02000000 /* set close_on_exec */
+# define O_PATH 010000000 /* Resolve pathname but do not open file. */
#endif
/* For now Linux has synchronisity options for data and read operations.
diff --git a/libc/sysdeps/linux/c6x/bits/fcntl.h b/libc/sysdeps/linux/c6x/bits/fcntl.h
index e381e97..651caa9 100644
--- a/libc/sysdeps/linux/c6x/bits/fcntl.h
+++ b/libc/sysdeps/linux/c6x/bits/fcntl.h
@@ -50,6 +50,7 @@
# define O_NOFOLLOW 0400000 /* don't follow links */
# define O_NOATIME 01000000
# define O_CLOEXEC 02000000/* set close on exec */
+# define O_PATH 010000000/* Resolve pathname but do not open file. */
#endif
/* For now Linux has synchronisity options for data and read operations.
diff --git a/libc/sysdeps/linux/cris/bits/fcntl.h b/libc/sysdeps/linux/cris/bits/fcntl.h
index 029bb80..b6a755b 100644
--- a/libc/sysdeps/linux/cris/bits/fcntl.h
+++ b/libc/sysdeps/linux/cris/bits/fcntl.h
@@ -50,6 +50,7 @@
# define O_NOFOLLOW 0400000 /* Do not follow links. */
# define O_NOATIME 01000000 /* Do not set atime. */
# define O_CLOEXEC 02000000 /* set close_on_exec */
+# define O_PATH 010000000 /* Resolve pathname but do not open file. */
#endif
/* For now Linux has synchronisity options for data and read operations.
diff --git a/libc/sysdeps/linux/frv/bits/fcntl.h b/libc/sysdeps/linux/frv/bits/fcntl.h
index 5a7d9ef..0ef5f29 100644
--- a/libc/sysdeps/linux/frv/bits/fcntl.h
+++ b/libc/sysdeps/linux/frv/bits/fcntl.h
@@ -46,6 +46,7 @@
# define O_NOFOLLOW 0400000 /* Do not follow links. */
# define O_NOATIME 01000000 /* don't set atime */
# define O_CLOEXEC 02000000 /* set close_on_exec */
+# define O_PATH 010000000 /* Resolve pathname but do not open file. */
#endif
/* For now Linux has synchronisity options for data and read operations.
diff --git a/libc/sysdeps/linux/h8300/bits/fcntl.h b/libc/sysdeps/linux/h8300/bits/fcntl.h
index 1c653be..d180cbd 100644
--- a/libc/sysdeps/linux/h8300/bits/fcntl.h
+++ b/libc/sysdeps/linux/h8300/bits/fcntl.h
@@ -49,6 +49,7 @@
# define O_NOFOLLOW 0400000 /* Do not follow links. */
# define O_NOATIME 01000000 /* Do not set atime. */
# define O_CLOEXEC 02000000 /* Set close_on_exec. */
+# define O_PATH 010000000 /* Resolve pathname but do not open file. */
#endif
/* For now Linux has synchronisity options for data and read operations.
diff --git a/libc/sysdeps/linux/hppa/bits/fcntl.h b/libc/sysdeps/linux/hppa/bits/fcntl.h
index abb3372..ed2f7e5 100644
--- a/libc/sysdeps/linux/hppa/bits/fcntl.h
+++ b/libc/sysdeps/linux/hppa/bits/fcntl.h
@@ -50,6 +50,7 @@
# define O_NOFOLLOW 00000200 /* Do not follow links. */
# define O_NOATIME 04000000 /* Do not set atime. */
# define O_CLOEXEC 010000000 /* set close_on_exec */
+# define O_PATH 020000000 /* Resolve pathname but do not open file. */
#endif
#ifdef __USE_LARGEFILE64
diff --git a/libc/sysdeps/linux/i386/bits/fcntl.h b/libc/sysdeps/linux/i386/bits/fcntl.h
index 79b69d4..4dfeae8 100644
--- a/libc/sysdeps/linux/i386/bits/fcntl.h
+++ b/libc/sysdeps/linux/i386/bits/fcntl.h
@@ -50,6 +50,7 @@
# define O_NOFOLLOW 0400000 /* Do not follow links. */
# define O_NOATIME 01000000 /* Do not set atime. */
# define O_CLOEXEC 02000000 /* Set close_on_exec. */
+# define O_PATH 010000000 /* Resolve pathname but do not open file. */
#endif
/* For now Linux has synchronisity options for data and read operations.
diff --git a/libc/sysdeps/linux/ia64/bits/fcntl.h b/libc/sysdeps/linux/ia64/bits/fcntl.h
index fedefb6..bbc905c 100644
--- a/libc/sysdeps/linux/ia64/bits/fcntl.h
+++ b/libc/sysdeps/linux/ia64/bits/fcntl.h
@@ -49,6 +49,7 @@
# define O_NOFOLLOW 0400000 /* don't follow links */
# define O_NOATIME 01000000 /* Do not set atime. */
# define O_CLOEXEC 02000000 /* Set close_on_exec. */
+# define O_PATH 010000000 /* Resolve pathname but do not open file. */
#endif
#ifdef __USE_LARGEFILE64
diff --git a/libc/sysdeps/linux/lm32/bits/fcntl.h b/libc/sysdeps/linux/lm32/bits/fcntl.h
index 44e8f3f..5f40957 100644
--- a/libc/sysdeps/linux/lm32/bits/fcntl.h
+++ b/libc/sysdeps/linux/lm32/bits/fcntl.h
@@ -50,6 +50,7 @@
# define O_DIRECT 040000 /* Direct disk access. */
# define O_NOATIME 01000000 /* Do not set atime. */
# define O_CLOEXEC 02000000 /* set close_on_exec */
+# define O_PATH 010000000 /* Resolve pathname but do not open file. */
#endif
/* For now Linux has synchronisity options for data and read operations.
diff --git a/libc/sysdeps/linux/m68k/bits/fcntl.h b/libc/sysdeps/linux/m68k/bits/fcntl.h
index 66df337..636934d 100644
--- a/libc/sysdeps/linux/m68k/bits/fcntl.h
+++ b/libc/sysdeps/linux/m68k/bits/fcntl.h
@@ -49,6 +49,7 @@
# define O_DIRECT 0200000 /* Direct disk access. */
# define O_NOATIME 01000000 /* Do not set atime. */
# define O_CLOEXEC 02000000 /* set close_on_exec */
+# define O_PATH 010000000 /* Resolve pathname but do not open file. */
#endif
/* For now Linux has synchronisity options for data and read operations.
diff --git a/libc/sysdeps/linux/metag/bits/fcntl.h b/libc/sysdeps/linux/metag/bits/fcntl.h
index e10abd7..8142a83 100644
--- a/libc/sysdeps/linux/metag/bits/fcntl.h
+++ b/libc/sysdeps/linux/metag/bits/fcntl.h
@@ -51,6 +51,7 @@
# define O_NOFOLLOW 0400000 /* Do not follow links. */
# define O_NOATIME 01000000 /* Do not set atime. */
# define O_CLOEXEC 02000000 /* Set close_on_exec. */
+# define O_PATH 010000000 /* Resolve pathname but do not open file. */
#endif
/* For now Linux has synchronisity options for data and read operations.
diff --git a/libc/sysdeps/linux/microblaze/bits/fcntl.h b/libc/sysdeps/linux/microblaze/bits/fcntl.h
index e7651e8..ee300a2 100644
--- a/libc/sysdeps/linux/microblaze/bits/fcntl.h
+++ b/libc/sysdeps/linux/microblaze/bits/fcntl.h
@@ -49,6 +49,7 @@
# define O_DIRECT 040000 /* Direct disk access. */
# define O_NOATIME 01000000 /* Do not set atime. */
# define O_CLOEXEC 02000000 /* set close_on_exec */
+# define O_PATH 010000000 /* Resolve pathname but do not open file. */
#endif
/* For now Linux has synchronisity options for data and read operations.
diff --git a/libc/sysdeps/linux/mips/bits/fcntl.h b/libc/sysdeps/linux/mips/bits/fcntl.h
index 8c4c115..e7fed9b 100644
--- a/libc/sysdeps/linux/mips/bits/fcntl.h
+++ b/libc/sysdeps/linux/mips/bits/fcntl.h
@@ -50,7 +50,8 @@
# define O_DIRECT 0x8000 /* Direct disk access hint. */
# define O_DIRECTORY 0x10000 /* Must be a directory. */
# define O_NOATIME 0x40000 /* Do not set atime. */
-# define O_CLOEXEC 02000000 /* set close_on_exec */
+# define O_CLOEXEC 02000000 /* set close_on_exec */
+# define O_PATH 010000000 /* Resolve pathname but do not open file. */
#endif
/* For now Linux has no synchronisity options for data and read operations.
diff --git a/libc/sysdeps/linux/nios2/bits/fcntl.h b/libc/sysdeps/linux/nios2/bits/fcntl.h
index 66df337..d8386d6 100644
--- a/libc/sysdeps/linux/nios2/bits/fcntl.h
+++ b/libc/sysdeps/linux/nios2/bits/fcntl.h
@@ -47,8 +47,9 @@
# define O_DIRECTORY 040000 /* Must be a directory. */
# define O_NOFOLLOW 0100000 /* Do not follow links. */
# define O_DIRECT 0200000 /* Direct disk access. */
-# define O_NOATIME 01000000 /* Do not set atime. */
-# define O_CLOEXEC 02000000 /* set close_on_exec */
+# define O_NOATIME 01000000 /* Do not set atime. */
+# define O_CLOEXEC 02000000 /* set close_on_exec */
+# define O_PATH 010000000 /* Resolve pathname but do not open file. */
#endif
/* For now Linux has synchronisity options for data and read operations.
diff --git a/libc/sysdeps/linux/or1k/bits/fcntl.h b/libc/sysdeps/linux/or1k/bits/fcntl.h
index b081300..234415e 100644
--- a/libc/sysdeps/linux/or1k/bits/fcntl.h
+++ b/libc/sysdeps/linux/or1k/bits/fcntl.h
@@ -50,6 +50,7 @@
# define O_NOFOLLOW 0400000 /* Do not follow links. */
# define O_NOATIME 01000000 /* Do not set atime. */
# define O_CLOEXEC 02000000 /* Set close_on_exec. */
+# define O_PATH 010000000 /* Resolve pathname but do not open file. */
#endif
#ifdef __USE_LARGEFILE64
diff --git a/libc/sysdeps/linux/powerpc/bits/fcntl.h b/libc/sysdeps/linux/powerpc/bits/fcntl.h
index d150a31..e13ca19 100644
--- a/libc/sysdeps/linux/powerpc/bits/fcntl.h
+++ b/libc/sysdeps/linux/powerpc/bits/fcntl.h
@@ -48,8 +48,9 @@
# define O_DIRECT 0400000 /* Direct disk access. */
# define O_DIRECTORY 040000 /* Must be a directory. */
# define O_NOFOLLOW 0100000 /* Do not follow links. */
-# define O_NOATIME 01000000 /* Do not set atime. */
-# define O_CLOEXEC 02000000 /* Set close_on_exec. */
+# define O_NOATIME 01000000 /* Do not set atime. */
+# define O_CLOEXEC 02000000 /* Set close_on_exec. */
+# define O_PATH 010000000 /* Resolve pathname but do not open file. */
#endif
#ifdef __USE_LARGEFILE64
diff --git a/libc/sysdeps/linux/sh/bits/fcntl.h b/libc/sysdeps/linux/sh/bits/fcntl.h
index aceaec6..84720dc 100644
--- a/libc/sysdeps/linux/sh/bits/fcntl.h
+++ b/libc/sysdeps/linux/sh/bits/fcntl.h
@@ -50,6 +50,7 @@
# define O_NOFOLLOW 0400000 /* Do not follow links. */
# define O_NOATIME 01000000 /* Do not set atime. */
# define O_CLOEXEC 02000000 /* Set close_on_exec. */
+# define O_PATH 010000000 /* Resolve pathname but do not open file. */
#endif
/* For now Linux has synchronisity options for data and read operations.
diff --git a/libc/sysdeps/linux/sparc/bits/fcntl.h b/libc/sysdeps/linux/sparc/bits/fcntl.h
index 7e80d9e..bc744ed 100644
--- a/libc/sysdeps/linux/sparc/bits/fcntl.h
+++ b/libc/sysdeps/linux/sparc/bits/fcntl.h
@@ -46,9 +46,10 @@
#ifdef __USE_GNU
# define O_DIRECTORY 0x10000 /* must be a directory */
# define O_NOFOLLOW 0x20000 /* don't follow links */
-# define O_DIRECT 0x100000 /* direct disk access hint */
-# define O_NOATIME 0x200000 /* Do not set atime. */
-# define O_CLOEXEC 0x400000 /* Set close_on_exit. */
+# define O_DIRECT 0x100000 /* direct disk access hint */
+# define O_NOATIME 0x200000 /* Do not set atime. */
+# define O_CLOEXEC 0x400000 /* Set close_on_exit. */
+# define O_PATH 0x1000000 /* Resolve pathname but do not open file. */
#endif
#ifdef __USE_LARGEFILE64
diff --git a/libc/sysdeps/linux/x86_64/bits/fcntl.h b/libc/sysdeps/linux/x86_64/bits/fcntl.h
index 02e011d..757d6be 100644
--- a/libc/sysdeps/linux/x86_64/bits/fcntl.h
+++ b/libc/sysdeps/linux/x86_64/bits/fcntl.h
@@ -50,6 +50,7 @@
# define O_NOFOLLOW 0400000 /* Do not follow links. */
# define O_NOATIME 01000000 /* Do not set atime. */
# define O_CLOEXEC 02000000 /* Set close_on_exec. */
+# define O_PATH 010000000 /* Resolve pathname but do not open file. */
#endif
/* For now Linux has synchronisity options for data and read operations.
diff --git a/libc/sysdeps/linux/xtensa/bits/fcntl.h b/libc/sysdeps/linux/xtensa/bits/fcntl.h
index 4e9aa7e..d21c4e0 100644
--- a/libc/sysdeps/linux/xtensa/bits/fcntl.h
+++ b/libc/sysdeps/linux/xtensa/bits/fcntl.h
@@ -50,6 +50,7 @@
# define O_NOFOLLOW 0400000 /* Do not follow links. */
# define O_NOATIME 01000000 /* Do not set atime. */
# define O_CLOEXEC 02000000 /* set close_on_exec */
+# define O_PATH 010000000 /* Resolve pathname but do not open file. */
#endif
/* For now Linux has synchronisity options for data and read operations.
diff --git a/libpthread/nptl/pthread_mutex_timedlock.c b/libpthread/nptl/pthread_mutex_timedlock.c
index 04187f6..f56f6c5 100644
--- a/libpthread/nptl/pthread_mutex_timedlock.c
+++ b/libpthread/nptl/pthread_mutex_timedlock.c
@@ -28,7 +28,9 @@
* error: can't find a register in class ‘GENERAL_REGS’ while reloading ‘asm’
*/
int
+#ifndef __OPTIMIZE__
attribute_optimize("Os")
+#endif
pthread_mutex_timedlock (
pthread_mutex_t *mutex,
const struct timespec *abstime)
diff --git a/test/malloc/Makefile.in b/test/malloc/Makefile.in
index f1726dd..9e7cac9 100644
--- a/test/malloc/Makefile.in
+++ b/test/malloc/Makefile.in
@@ -11,4 +11,8 @@ ifneq ($(UCLIBC_HAS_OBSTACK),y)
TESTS_DISABLED += tst-obstack
endif
+ifneq ($(MALLOC_STANDARD),y)
+TESTS_DISABLED += tst-asprintf
+endif
+
CFLAGS_tst-mallocfork = -fPIC
diff --git a/test/malloc/tst-asprintf.c b/test/malloc/tst-asprintf.c
new file mode 100644
index 0000000..d4c3f76
--- /dev/null
+++ b/test/malloc/tst-asprintf.c
@@ -0,0 +1,27 @@
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <malloc.h>
+
+static void my_stats(void)
+{
+ malloc_stats();
+ fprintf(stderr, "\n");
+}
+
+int main(int argc, char *argv[])
+{
+ char *a, *b;
+
+ my_stats();
+ asprintf(&b, "asdsadasd %ssdf\n", "AAAA");
+ my_stats();
+ asprintf(&a, "asdsadasd %ssdf\n", "AAAA");
+ my_stats();
+ free(a);
+ free(b);
+ my_stats();
+
+ return 0;
+}
hooks/post-receive
--
uClibc-ng - small C library for embedded systems
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "uClibc-ng - small C library for embedded systems".
The branch, 1.0 has been updated
via 1e28bdaabba3cdc26df028d70f9e15e055e75587 (commit)
via 5dd4d7dc03db1005c850373b3821f69d333ca675 (commit)
from a9a4e0d0f09420066968b8009e7fa2a3b3f969c6 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 1e28bdaabba3cdc26df028d70f9e15e055e75587
Author: Waldemar Brodkorb <wbx(a)openadk.org>
Date: Mon Dec 7 07:42:25 2015 +0100
sh: add back sh2 specific assembly for clone()
In gcc 5.x there is a compile failure, for sh2 builds
as shad no longer is accepted. Strange that it is working for
4.9.x. Add back old assembly code.
commit 5dd4d7dc03db1005c850373b3821f69d333ca675
Author: Waldemar Brodkorb <wbx(a)openadk.org>
Date: Mon Dec 7 07:42:08 2015 +0100
allow linuxthreads for superh (sh2 noMMU)
-----------------------------------------------------------------------
Summary of changes:
extra/Configs/Config.in | 1 -
libc/sysdeps/linux/sh/clone.S | 16 ++++++++++++++++
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/extra/Configs/Config.in b/extra/Configs/Config.in
index 9e6d095..7aeee21 100644
--- a/extra/Configs/Config.in
+++ b/extra/Configs/Config.in
@@ -515,7 +515,6 @@ config LINUXTHREADS_OLD
!TARGET_metag && \
!TARGET_mips && \
!TARGET_powerpc && \
- !TARGET_sh && \
!TARGET_sparc && \
!TARGET_x86_64 && \
!TARGET_xtensa || \
diff --git a/libc/sysdeps/linux/sh/clone.S b/libc/sysdeps/linux/sh/clone.S
index 4374a63..3ed6b25 100644
--- a/libc/sysdeps/linux/sh/clone.S
+++ b/libc/sysdeps/linux/sh/clone.S
@@ -53,8 +53,24 @@ ENTRY(__clone)
mov #+SYS_ify(clone), r3
trapa #0x15
mov r0, r1
+#ifdef __sh2__
+/* 12 arithmetic shifts for the sh2, because shad doesn't exist! */
+ shar r1
+ shar r1
+ shar r1
+ shar r1
+ shar r1
+ shar r1
+ shar r1
+ shar r1
+ shar r1
+ shar r1
+ shar r1
+ shar r1
+#else
mov #-12, r2
shad r2, r1
+#endif
not r1, r1 // r1=0 means r0 = -1 to -4095
tst r1, r1 // i.e. error in linux
bf .Lclone_end
hooks/post-receive
--
uClibc-ng - small C library for embedded systems