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