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 6cf35f84045f38f067365623886fecff16ca92f9 (commit)
from 8cde3a9bf2856dcb9a759dec7ecb04a68e712254 (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 6cf35f84045f38f067365623886fecff16ca92f9
Author: Romain Naour <romain.naour(a)openwide.fr>
Date: Sat Aug 1 18:31:06 2015 +0200
add mkstemps, mkstemps64 and mkostemps, mkostemps64 functions
Change __gen_tempname() prototype in order to pass the additional
suffix lenght. In __gen_tempname() add a new check for suffixlen.
Update some comments in the code.
Signed-off-by: Romain Naour <romain.naour(a)openwide.fr>
Signed-off-by: Waldemar Brodkorb <wbx(a)uclibc-ng.org>
-----------------------------------------------------------------------
Summary of changes:
include/stdlib.h | 49 +++++++++++++++++++++++++++++
libc/misc/internals/tempname.c | 16 +++++-----
libc/misc/internals/tempname.h | 3 +-
libc/stdio/tempnam.c | 2 +-
libc/stdio/tmpfile.c | 2 +-
libc/stdio/tmpnam.c | 2 +-
libc/stdio/tmpnam_r.c | 2 +-
libc/stdlib/Makefile.in | 6 ++--
libc/stdlib/mkdtemp.c | 2 +-
libc/stdlib/mkostemp.c | 2 +-
libc/stdlib/mkostemp64.c | 3 +-
libc/stdlib/{mkostemp.c => mkostemps.c} | 14 ++++++---
libc/stdlib/{mkostemp.c => mkostemps64.c} | 12 ++++---
libc/stdlib/mkstemp.c | 2 +-
libc/stdlib/mkstemp64.c | 2 +-
libc/stdlib/{mkostemp.c => mkstemps.c} | 15 ++++-----
libc/stdlib/{mkostemp.c => mkstemps64.c} | 15 ++++-----
libc/stdlib/mktemp.c | 2 +-
libpthread/nptl/sem_open.c | 2 +-
19 files changed, 107 insertions(+), 46 deletions(-)
copy libc/stdlib/{mkostemp.c => mkostemps.c} (71%)
copy libc/stdlib/{mkostemp.c => mkostemps64.c} (71%)
copy libc/stdlib/{mkostemp.c => mkstemps.c} (69%)
copy libc/stdlib/{mkostemp.c => mkstemps64.c} (68%)
diff --git a/include/stdlib.h b/include/stdlib.h
index 809256d..ba8849e 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -644,6 +644,35 @@ extern int mkstemp64 (char *__template) __nonnull ((1)) __wur;
# endif
#endif
+#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
+# if defined __UCLIBC_SUSV3_LEGACY__
+extern char *mktemps (char *__template, int __suffixlen) __THROW __nonnull ((1)) __wur;
+# endif
+
+/* The mkstemps() function is like mkstemp(), except that the string in
+ template contains a suffix of suffixlen characters. Thus, template is
+ of the form prefixXXXXXXsuffix, and the string XXXXXX is modified as
+ for mkstemp().
+ Returns a file descriptor open on the file for reading and writing,
+ or -1 if it cannot create a uniquely-named file.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+# ifndef __USE_FILE_OFFSET64
+extern int mkstemps (char *__template, int __suffixlen) __nonnull ((1)) __wur;
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT (mkstemps, (char *__template, int __suffixlen), mkstemps64)
+ __nonnull ((1)) __wur;
+# else
+# define mkstemps mkstemps64
+# endif
+# endif
+# ifdef __USE_LARGEFILE64
+extern int mkstemps64 (char *__template, int __suffixlen) __nonnull ((1)) __wur;
+# endif
+#endif
+
#if defined __USE_BSD || defined __USE_XOPEN2K8
/* Create a unique temporary directory from TEMPLATE.
The last six characters of TEMPLATE must be "XXXXXX";
@@ -673,7 +702,27 @@ extern int __REDIRECT (mkostemp, (char *__template, int __flags), mkostemp64)
# ifdef __USE_LARGEFILE64
extern int mkostemp64 (char *__template, int __flags) __nonnull ((1)) __wur;
# endif
+#endif
+#ifdef __USE_GNU
+/* Generate a unique temporary file name from TEMPLATE similar to
+ mkostemp. But allow the caller to pass additional file name suffix.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+# ifndef __USE_FILE_OFFSET64
+extern int mkostemps (char *__template, int __suffixlen, int __flags) __nonnull ((1)) __wur;
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT (mkostemps, (char *__template, int __suffixlen, int __flags), mkostemps64)
+ __nonnull ((1)) __wur;
+# else
+# define mkostemps mkostemps64
+# endif
+# endif
+# ifdef __USE_LARGEFILE64
+extern int mkostemps64 (char *__template, int __suffixlen, int __flags) __nonnull ((1)) __wur;
+# endif
#endif
diff --git a/libc/misc/internals/tempname.c b/libc/misc/internals/tempname.c
index edcc31c..7654eb4 100644
--- a/libc/misc/internals/tempname.c
+++ b/libc/misc/internals/tempname.c
@@ -163,10 +163,10 @@ static void brain_damaged_fillrand(unsigned char *buf, unsigned int len)
}
}
-/* Generate a temporary file name based on TMPL. TMPL must match the
- rules for mk[s]temp (i.e. end in "XXXXXX"). The name constructed
- does not exist at the time of the call to __gen_tempname. TMPL is
- overwritten with the result.
+/* Generate a temporary file name based on TMPL. TMPL must match the
+ rules for mk[s]temp[s] (i.e. end in "prefixXXXXXXsuffix"). The name
+ constructed does not exist at the time of the call to __gen_tempname.
+ TMPL is overwritten with the result.
KIND may be one of:
__GT_NOCREATE: simply verify that the name does not exist
@@ -177,7 +177,8 @@ static void brain_damaged_fillrand(unsigned char *buf, unsigned int len)
__GT_DIR: create a directory with given mode.
*/
-int attribute_hidden __gen_tempname (char *tmpl, int kind, int flags, mode_t mode)
+int attribute_hidden __gen_tempname (char *tmpl, int kind, int flags,
+ int suffixlen, mode_t mode)
{
char *XXXXXX;
unsigned int i;
@@ -187,8 +188,9 @@ int attribute_hidden __gen_tempname (char *tmpl, int kind, int flags, mode_t mod
len = strlen (tmpl);
/* This is where the Xs start. */
- XXXXXX = tmpl + len - 6;
- if (len < 6 || strcmp (XXXXXX, "XXXXXX"))
+ XXXXXX = tmpl + len - 6 - suffixlen;
+ if (len < 6 || suffixlen < 0 || suffixlen > len - 6
+ || strncmp (XXXXXX, "XXXXXX", 6))
{
__set_errno (EINVAL);
return -1;
diff --git a/libc/misc/internals/tempname.h b/libc/misc/internals/tempname.h
index edfe26d..cc20f75 100644
--- a/libc/misc/internals/tempname.h
+++ b/libc/misc/internals/tempname.h
@@ -10,7 +10,8 @@ extern int ___path_search (char *tmpl, size_t tmpl_len, const char *dir,
const char *pfx /*, int try_tmpdir */) attribute_hidden;
#define __path_search(tmpl, tmpl_len, dir, pfx, try_tmpdir) ___path_search(tmpl, tmpl_len, dir, pfx)
-extern int __gen_tempname (char *__tmpl, int __kind, int flags, mode_t mode) attribute_hidden;
+extern int __gen_tempname (char *__tmpl, int __kind, int flags,
+ int suffixlen, mode_t mode) attribute_hidden;
/* The __kind argument to __gen_tempname may be one of: */
#define __GT_FILE 0 /* create a file */
diff --git a/libc/stdio/tempnam.c b/libc/stdio/tempnam.c
index 5ef199e..46c9210 100644
--- a/libc/stdio/tempnam.c
+++ b/libc/stdio/tempnam.c
@@ -35,7 +35,7 @@ tempnam (const char *dir, const char *pfx)
if (__path_search (buf, FILENAME_MAX, dir, pfx, 1))
return NULL;
- if (__gen_tempname (buf, __GT_NOCREATE, 0, 0))
+ if (__gen_tempname (buf, __GT_NOCREATE, 0, 0, 0))
return NULL;
return strdup (buf);
diff --git a/libc/stdio/tmpfile.c b/libc/stdio/tmpfile.c
index 83c85b5..3654f9e 100644
--- a/libc/stdio/tmpfile.c
+++ b/libc/stdio/tmpfile.c
@@ -35,7 +35,7 @@ FILE * tmpfile (void)
if (__path_search (buf, FILENAME_MAX, NULL, "tmpf", 0))
return NULL;
- fd = __gen_tempname (buf, __GT_FILE, 0, S_IRUSR | S_IWUSR);
+ fd = __gen_tempname (buf, __GT_FILE, 0, 0, S_IRUSR | S_IWUSR);
if (fd < 0)
return NULL;
diff --git a/libc/stdio/tmpnam.c b/libc/stdio/tmpnam.c
index 52997d3..a9f6796 100644
--- a/libc/stdio/tmpnam.c
+++ b/libc/stdio/tmpnam.c
@@ -40,7 +40,7 @@ tmpnam (char *s)
0))
return NULL;
- if (__builtin_expect (__gen_tempname (tmpbuf, __GT_NOCREATE, 0, 0), 0))
+ if (__builtin_expect (__gen_tempname (tmpbuf, __GT_NOCREATE, 0, 0, 0), 0))
return NULL;
if (s == NULL)
diff --git a/libc/stdio/tmpnam_r.c b/libc/stdio/tmpnam_r.c
index 3cc48b0..2e70c2d 100644
--- a/libc/stdio/tmpnam_r.c
+++ b/libc/stdio/tmpnam_r.c
@@ -27,7 +27,7 @@ char * tmpnam_r (char *s)
if (__path_search (s, L_tmpnam, NULL, NULL, 0))
return NULL;
- if (__gen_tempname (s, __GT_NOCREATE, 0, 0))
+ if (__gen_tempname (s, __GT_NOCREATE, 0, 0, 0))
return NULL;
return s;
diff --git a/libc/stdlib/Makefile.in b/libc/stdlib/Makefile.in
index 071f911..ae74995 100644
--- a/libc/stdlib/Makefile.in
+++ b/libc/stdlib/Makefile.in
@@ -13,8 +13,8 @@ include $(top_srcdir)libc/stdlib/malloc-standard/Makefile.in
CSRC-y := \
abort.c getenv.c mkdtemp.c realpath.c canonicalize.c mkstemp.c mkostemp.c \
- rand.c random.c random_r.c setenv.c div.c ldiv.c lldiv.c \
- getpt.c drand48-iter.c jrand48.c \
+ mkstemps.c mkostemps.c rand.c random.c random_r.c setenv.c div.c ldiv.c \
+ lldiv.c getpt.c drand48-iter.c jrand48.c \
jrand48_r.c lcong48.c lrand48.c lrand48_r.c mrand48.c mrand48_r.c nrand48.c \
nrand48_r.c rand_r.c srand48.c srand48_r.c seed48.c seed48_r.c \
a64l.c l64a.c __uc_malloc.c
@@ -22,7 +22,7 @@ CSRC-$(UCLIBC_SUSV2_LEGACY) += valloc.c
CSRC-$(UCLIBC_HAS_ADVANCED_REALTIME) += posix_memalign.c
CSRC-$(UCLIBC_HAS_PTY) += grantpt.c unlockpt.c ptsname.c
CSRC-$(UCLIBC_HAS_ARC4RANDOM) += arc4random.c
-CSRC-$(UCLIBC_HAS_LFS) += mkstemp64.c mkostemp64.c
+CSRC-$(UCLIBC_HAS_LFS) += mkstemp64.c mkostemp64.c mkstemps64.c mkostemps64.c
CSRC-$(UCLIBC_HAS_FLOATS) += drand48.c drand48_r.c erand48.c erand48_r.c
CSRC-$(if $(findstring yy,$(UCLIBC_HAS_FLOATS)$(UCLIBC_SUSV3_LEGACY)),y) += \
gcvt.c
diff --git a/libc/stdlib/mkdtemp.c b/libc/stdlib/mkdtemp.c
index e6d4a36..185e206 100644
--- a/libc/stdlib/mkdtemp.c
+++ b/libc/stdlib/mkdtemp.c
@@ -29,7 +29,7 @@
(This function comes from OpenBSD.) */
char * mkdtemp (char *template)
{
- if (__gen_tempname (template, __GT_DIR, 0, S_IRUSR | S_IWUSR | S_IXUSR))
+ if (__gen_tempname (template, __GT_DIR, 0, 0, S_IRUSR | S_IWUSR | S_IXUSR))
return NULL;
else
return template;
diff --git a/libc/stdlib/mkostemp.c b/libc/stdlib/mkostemp.c
index 912be30..4eab079 100644
--- a/libc/stdlib/mkostemp.c
+++ b/libc/stdlib/mkostemp.c
@@ -28,5 +28,5 @@ int
mkostemp (char *template, int flags)
{
flags -= flags & O_ACCMODE; /* Remove O_RDONLY, O_WRONLY, and O_RDWR. */
- return __gen_tempname (template, __GT_FILE, flags, S_IRUSR | S_IWUSR);
+ return __gen_tempname (template, __GT_FILE, flags, 0, S_IRUSR | S_IWUSR);
}
diff --git a/libc/stdlib/mkostemp64.c b/libc/stdlib/mkostemp64.c
index c6d6d84..25595ad 100644
--- a/libc/stdlib/mkostemp64.c
+++ b/libc/stdlib/mkostemp64.c
@@ -27,5 +27,6 @@
int
mkostemp64 (char *template, int flags)
{
- return __gen_tempname (template, __GT_BIGFILE, flags | O_LARGEFILE, S_IRUSR | S_IWUSR | S_IXUSR);
+ return __gen_tempname (template, __GT_BIGFILE, flags | O_LARGEFILE, 0,
+ S_IRUSR | S_IWUSR | S_IXUSR);
}
diff --git a/libc/stdlib/mkostemp.c b/libc/stdlib/mkostemps.c
similarity index 71%
copy from libc/stdlib/mkostemp.c
copy to libc/stdlib/mkostemps.c
index 912be30..13a5171 100644
--- a/libc/stdlib/mkostemp.c
+++ b/libc/stdlib/mkostemps.c
@@ -21,12 +21,16 @@
#include "../misc/internals/tempname.h"
/* Generate a unique temporary file name from TEMPLATE.
- The last six characters of TEMPLATE must be "XXXXXX";
- they are replaced with a string that makes the filename unique.
+ The TEMPLATE is of the form "XXXXXXsuffix" where six characters
+ after the TEMPLATE must be "XXXXXX" followed by the suffix.
+ The suffix length must be specified with suffixlen.
+ "XXXXXX" are replaced with a string that makes the filename unique.
Then open the file and return a fd. */
-int
-mkostemp (char *template, int flags)
+int mkostemps (char *template, int suffixlen, int flags)
{
flags -= flags & O_ACCMODE; /* Remove O_RDONLY, O_WRONLY, and O_RDWR. */
- return __gen_tempname (template, __GT_FILE, flags, S_IRUSR | S_IWUSR);
+ return __gen_tempname (template, __GT_FILE, flags, suffixlen,
+ S_IRUSR | S_IWUSR);
}
+
+
diff --git a/libc/stdlib/mkostemp.c b/libc/stdlib/mkostemps64.c
similarity index 71%
copy from libc/stdlib/mkostemp.c
copy to libc/stdlib/mkostemps64.c
index 912be30..0436fcf 100644
--- a/libc/stdlib/mkostemp.c
+++ b/libc/stdlib/mkostemps64.c
@@ -21,12 +21,14 @@
#include "../misc/internals/tempname.h"
/* Generate a unique temporary file name from TEMPLATE.
- The last six characters of TEMPLATE must be "XXXXXX";
- they are replaced with a string that makes the filename unique.
+ The TEMPLATE is of the form "XXXXXXsuffix" where six characters
+ after the TEMPLATE must be "XXXXXX" followed by the suffix.
+ The suffix length must be specified with suffixlen.
+ "XXXXXX" are replaced with a string that makes the filename unique.
Then open the file and return a fd. */
-int
-mkostemp (char *template, int flags)
+int mkostemps64 (char *template, int suffixlen, int flags)
{
flags -= flags & O_ACCMODE; /* Remove O_RDONLY, O_WRONLY, and O_RDWR. */
- return __gen_tempname (template, __GT_FILE, flags, S_IRUSR | S_IWUSR);
+ return __gen_tempname (template, __GT_FILE, flags, suffixlen,
+ S_IRUSR | S_IWUSR);
}
diff --git a/libc/stdlib/mkstemp.c b/libc/stdlib/mkstemp.c
index a3a1595..abcc93e 100644
--- a/libc/stdlib/mkstemp.c
+++ b/libc/stdlib/mkstemp.c
@@ -26,5 +26,5 @@
Then open the file and return a fd. */
int mkstemp (char *template)
{
- return __gen_tempname (template, __GT_FILE, 0, S_IRUSR | S_IWUSR);
+ return __gen_tempname (template, __GT_FILE, 0, 0, S_IRUSR | S_IWUSR);
}
diff --git a/libc/stdlib/mkstemp64.c b/libc/stdlib/mkstemp64.c
index 6f2ee3e..82c6da5 100644
--- a/libc/stdlib/mkstemp64.c
+++ b/libc/stdlib/mkstemp64.c
@@ -26,5 +26,5 @@
Then open the file and return a fd. */
int mkstemp64 (char *template)
{
- return __gen_tempname (template, __GT_BIGFILE, 0, S_IRUSR | S_IWUSR);
+ return __gen_tempname (template, __GT_BIGFILE, 0, 0, S_IRUSR | S_IWUSR);
}
diff --git a/libc/stdlib/mkostemp.c b/libc/stdlib/mkstemps.c
similarity index 69%
copy from libc/stdlib/mkostemp.c
copy to libc/stdlib/mkstemps.c
index 912be30..22aebf4 100644
--- a/libc/stdlib/mkostemp.c
+++ b/libc/stdlib/mkstemps.c
@@ -17,16 +17,17 @@
#include <stdio.h>
#include <stdlib.h>
-#include <fcntl.h>
+#include <sys/stat.h>
#include "../misc/internals/tempname.h"
/* Generate a unique temporary file name from TEMPLATE.
- The last six characters of TEMPLATE must be "XXXXXX";
- they are replaced with a string that makes the filename unique.
+ The TEMPLATE is of the form "XXXXXXsuffix" where six characters
+ after the TEMPLATE must be "XXXXXX" followed by the suffix.
+ The suffix length must be specified with suffixlen.
+ "XXXXXX" are replaced with a string that makes the filename unique.
Then open the file and return a fd. */
-int
-mkostemp (char *template, int flags)
+int mkstemps (char *template, int suffixlen)
{
- flags -= flags & O_ACCMODE; /* Remove O_RDONLY, O_WRONLY, and O_RDWR. */
- return __gen_tempname (template, __GT_FILE, flags, S_IRUSR | S_IWUSR);
+ return __gen_tempname (template, __GT_FILE, 0, suffixlen,
+ S_IRUSR | S_IWUSR);
}
diff --git a/libc/stdlib/mkostemp.c b/libc/stdlib/mkstemps64.c
similarity index 68%
copy from libc/stdlib/mkostemp.c
copy to libc/stdlib/mkstemps64.c
index 912be30..19fb4c8 100644
--- a/libc/stdlib/mkostemp.c
+++ b/libc/stdlib/mkstemps64.c
@@ -17,16 +17,17 @@
#include <stdio.h>
#include <stdlib.h>
-#include <fcntl.h>
+#include <sys/stat.h>
#include "../misc/internals/tempname.h"
/* Generate a unique temporary file name from TEMPLATE.
- The last six characters of TEMPLATE must be "XXXXXX";
- they are replaced with a string that makes the filename unique.
+ The TEMPLATE is of the form "XXXXXXsuffix" where six characters
+ after the TEMPLATE must be "XXXXXX" followed by the suffix.
+ The suffix length must be specified with suffixlen.
+ "XXXXXX" are replaced with a string that makes the filename unique.
Then open the file and return a fd. */
-int
-mkostemp (char *template, int flags)
+int mkstemps64 (char *template, int suffixlen)
{
- flags -= flags & O_ACCMODE; /* Remove O_RDONLY, O_WRONLY, and O_RDWR. */
- return __gen_tempname (template, __GT_FILE, flags, S_IRUSR | S_IWUSR);
+ return __gen_tempname (template, __GT_BIGFILE, 0, suffixlen,
+ S_IRUSR | S_IWUSR);
}
diff --git a/libc/stdlib/mktemp.c b/libc/stdlib/mktemp.c
index 4035966..be88153 100644
--- a/libc/stdlib/mktemp.c
+++ b/libc/stdlib/mktemp.c
@@ -24,7 +24,7 @@
* they are replaced with a string that makes the filename unique. */
char *mktemp(char *template)
{
- if (__gen_tempname (template, __GT_NOCREATE, 0, 0) < 0)
+ if (__gen_tempname (template, __GT_NOCREATE, 0,0, 0) < 0)
/* We return the null string if we can't find a unique file name. */
template[0] = '\0';
diff --git a/libpthread/nptl/sem_open.c b/libpthread/nptl/sem_open.c
index 3a72079..5584557 100644
--- a/libpthread/nptl/sem_open.c
+++ b/libpthread/nptl/sem_open.c
@@ -336,7 +336,7 @@ sem_open (const char *name, int oflag, ...)
mempcpy (mempcpy (tmpfname, mountpoint.dir, mountpoint.dirlen),
"XXXXXX", 7);
- fd = __gen_tempname (tmpfname, __GT_FILE, 0, mode);
+ fd = __gen_tempname (tmpfname, __GT_FILE, 0, 0, mode);
if (fd == -1)
return SEM_FAILED;
hooks/post-receive
--
uClibc-ng - small C library for embedded systems
Hi Waldemar,
We're considering possibility of dropping custom GitHub-based distribution of uClibc and
moving solely to official releases.
That raises the question about reliability of the server hosting tarballs with releases.
So I'm wondering if there're plans to arrange a mirror (or preferably more than one) of
uClibc-ng on say kernel.org etc.
-Alexey
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 4ff3a6c8eb91db71d6dc3d2932b66e848bd20ac3 (commit)
from 364ce357a9d90357cf96c51f5d160854fb11e7d6 (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 4ff3a6c8eb91db71d6dc3d2932b66e848bd20ac3
Author: Waldemar Brodkorb <wbx(a)uclibc-ng.org>
Date: Mon Aug 10 21:41:27 2015 +0200
glibc compat: bump glibc minor version
See this discussion:
http://lists.busybox.net/pipermail/buildroot/2015-August/137229.html
Should help to fix compile issues with boost for ARC.
-----------------------------------------------------------------------
Summary of changes:
include/features.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/features.h b/include/features.h
index dcf1348..f6fbbf4 100644
--- a/include/features.h
+++ b/include/features.h
@@ -393,7 +393,7 @@ uClibc was built without large file support enabled.
these macros to test for features in specific releases. */
/* Don't do it, if you want to keep uClibc happy. */
#define __GLIBC__ 2
-#define __GLIBC_MINOR__ 2
+#define __GLIBC_MINOR__ 10
#endif
#define __GLIBC_PREREQ(maj, min) \
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 364ce357a9d90357cf96c51f5d160854fb11e7d6 (commit)
from 7eb0394d914a66f2246fa3496718c83635f7e19c (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 364ce357a9d90357cf96c51f5d160854fb11e7d6
Author: Waldemar Brodkorb <wbx(a)uclibc-ng.org>
Date: Mon Aug 10 21:39:01 2015 +0200
getenv: allow overwriting of function
This fixes static compile issues of sudo, because sudo
uses it's own getenv implementation.
-----------------------------------------------------------------------
Summary of changes:
libc/stdlib/getenv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libc/stdlib/getenv.c b/libc/stdlib/getenv.c
index d5db178..9b04d0f 100644
--- a/libc/stdlib/getenv.c
+++ b/libc/stdlib/getenv.c
@@ -27,4 +27,4 @@ char *getenv(const char *var)
}
return NULL;
}
-libc_hidden_def(getenv)
+libc_hidden_weak(getenv)
hooks/post-receive
--
uClibc-ng - small C library for embedded systems
Hi,
I try to rebuild an old toolchain from my script which was originally
using uClibc 0.9.33.X, i have updated to binutils 2.25, gcc 4.9.3 and
uclibc-ng 1.0.5. But the build failed when building uclibc. Is
something wrong with the configuration of gcc first stage ?
LD ld-uClibc-1.0.5.so
STRIP -x -R .note -R .comment
/home/clement/cortex-toolchain/obj/uclibc/lib/libubacktrace.a
STRIP -x -R .note -R .comment
/home/clement/cortex-toolchain/obj/uclibc/lib/libdl.a
arm-unknown-linux-uclibcgnueabi-gcc: error: libgcc_eh.a: No such file
or directory
ldso/ldso/Makefile.in:76: recipe for target
'/home/clement/cortex-toolchain/obj/uclibc/lib/ld-uClibc.so' failed
make: *** [/home/clement/cortex-toolchain/obj/uclibc/lib/ld-uClibc.so] Error 1
make: *** Waiting for unfinished jobs....
My target is an arm linux and this the gcc first stage options:
${SRCDIR}/${GCC}/configure \
--target=${TARGET} \
--prefix=${PREFIX} \
--disable-decimal-float \
--disable-libatomic \
--disable-libgomp \
--disable-libmudflap \
--disable-libquadmath \
--disable-libssp \
--disable-libstdcxx-pch \
--disable-nls \
--disable-shared \
--disable-threads \
--enable-languages=c \
--enable-poison-system-directories \
--with-gnu-as \
--with-gnu-ld \
--with-newlib \
--with-sysroot=${SYSROOT} \
--without-headers \
--with-gmp=${LIBDIR} \
--with-mpc=${LIBDIR} \
--with-mpfr=${LIBDIR}
make all-gcc all-target-libgcc
make install-gcc install-target-libgcc
Thanks,
Clement
Hi,
the results of the OpenADK workshop in Essen are now included
in the release. Fixes for gcc 5.2.x/x86 and mips64 for n32
are the most important ones.
best regards
Waldemar
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 annotated tag, v1.0.5 has been created
at b0a9e75aab5e6257523c2eeeac80da96b19b9160 (tag)
tagging 647c71be1b8840cc14130393df7615759ab0f899 (commit)
replaces v1.0.4
tagged by Waldemar Brodkorb
on Sun Aug 2 12:23:26 2015 +0200
- Log -----------------------------------------------------------------
release 1.0.5 - Gulden Draak
Claudiu Zissulescu (1):
ARCv2: update memset() so it could be used without double load/stores
Waldemar Brodkorb (5):
fix static builds of pthread apps for x86/x86_64
set title correctly, as mentioned by tg
simplify, as the other does not work correctly, suggested by tg
sh: fix static linking issue
bump version for release
mirabilos (3):
integrate old m68k vfork bugfix of pre-µClibc-ng tree
fix MIPS N32 ABI Big Endian setjmp/longjmp
fix inline asm changing the stack pointer leading to segfaults problem
-----------------------------------------------------------------------
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 647c71be1b8840cc14130393df7615759ab0f899 (commit)
from c13f823941b103cf744929e5afcb3e2bc1342354 (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 647c71be1b8840cc14130393df7615759ab0f899
Author: Waldemar Brodkorb <wbx(a)uclibc-ng.org>
Date: Sun Aug 2 10:45:30 2015 +0200
bump version for release
-----------------------------------------------------------------------
Summary of changes:
Rules.mak | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Rules.mak b/Rules.mak
index a572b9f..4ca22b0 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -126,7 +126,7 @@ export RUNTIME_PREFIX DEVEL_PREFIX KERNEL_HEADERS MULTILIB_DIR
# Now config hard core
MAJOR_VERSION := 1
MINOR_VERSION := 0
-SUBLEVEL := 4
+SUBLEVEL := 5
EXTRAVERSION :=
VERSION := $(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL)
ABI_VERSION := $(MAJOR_VERSION)
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 c13f823941b103cf744929e5afcb3e2bc1342354 (commit)
via 7966d8aca0af0048b3d82bc9af210c293a4c9aac (commit)
via f5fa14e19c3dcd5f9648a8caaba63bc430f536da (commit)
via cdfebe7629971fc671a10c9b419f33f9ff928cbd (commit)
via fb1802d9b238ecb7066ab0867d8c4c3c3acefaea (commit)
from d8e6976a83cdd0ecac260de3afcb1973db8dffb0 (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 c13f823941b103cf744929e5afcb3e2bc1342354
Author: Waldemar Brodkorb <wbx(a)openadk.org>
Date: Wed Jul 29 21:06:54 2015 +0200
sh: fix static linking issue
commit 7966d8aca0af0048b3d82bc9af210c293a4c9aac
Author: Waldemar Brodkorb <wbx(a)uclibc-ng.org>
Date: Sat Jul 25 19:42:41 2015 +0200
simplify, as the other does not work correctly, suggested by tg
commit f5fa14e19c3dcd5f9648a8caaba63bc430f536da
Author: mirabilos <tg(a)mirbsd.org>
Date: Sat Jul 25 18:51:26 2015 +0200
fix inline asm changing the stack pointer leading to segfaults problem
commit cdfebe7629971fc671a10c9b419f33f9ff928cbd
Author: mirabilos <tg(a)mirbsd.org>
Date: Sat Jul 25 00:37:44 2015 +0200
fix MIPS N32 ABI Big Endian setjmp/longjmp
access to the jmp_buf structure occasionally happens asymmetrically:
fields defined in pointer size width (64 on N32) can be accessed as
32-bit words, but in that case, a̲l̲l̲ involved code must agree on that…
commit fb1802d9b238ecb7066ab0867d8c4c3c3acefaea
Author: mirabilos <tg(a)mirbsd.org>
Date: Fri Jul 24 22:18:07 2015 +0200
integrate old m68k vfork bugfix of pre-µClibc-ng tree
-----------------------------------------------------------------------
Summary of changes:
ldso/include/dl-syscall.h | 2 +-
libc/sysdeps/linux/i386/brk.c | 20 ++++++++++++--------
libc/sysdeps/linux/m68k/vfork.S | 19 +++++++++++--------
libc/sysdeps/linux/mips/__longjmp.c | 6 +++---
libpthread/nptl/forward.c | 2 +-
.../nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S | 6 ++++++
6 files changed, 34 insertions(+), 21 deletions(-)
diff --git a/ldso/include/dl-syscall.h b/ldso/include/dl-syscall.h
index 46ba07e..5528ba6 100644
--- a/ldso/include/dl-syscall.h
+++ b/ldso/include/dl-syscall.h
@@ -51,7 +51,7 @@ extern int _dl_errno;
static __always_inline attribute_noreturn __cold void _dl_exit(int status)
{
INLINE_SYSCALL(_dl_exit, 1, status);
-#if defined __GNUC__ && (!__GNUC_PREREQ (4, 4) && !__GNUC_PREREQ (4, 2))
+#if __GNUC_PREREQ(4, 5)
__builtin_unreachable(); /* shut up warning: 'noreturn' function does return*/
#else
while (1);
diff --git a/libc/sysdeps/linux/i386/brk.c b/libc/sysdeps/linux/i386/brk.c
index c2c9327..a513886 100644
--- a/libc/sysdeps/linux/i386/brk.c
+++ b/libc/sysdeps/linux/i386/brk.c
@@ -1,6 +1,7 @@
/* brk system call for Linux/i386.
Copyright (C) 1995, 1996, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
+ Copyright (c) 2015 mirabilos <tg(a)mirbsd.org>
+ This file is part of uclibc-ng, derived from the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -27,15 +28,18 @@ int brk(void *addr)
{
void *newbrk;
- /* %ebx is used in PIC code, need to save/restore it manually.
- * gcc won't do it for us if we will request it in constraints
+ /*
+ * EBC is used in PIC code, we need to save/restore it manually.
+ * Unfortunately, GCC won't do that for us even if we use con-
+ * straints, and we cannot push it either as ESP clobbers are
+ * silently ignored, but EDX is preserved, so it's scratch space.
*/
- __asm__("pushl %%ebx\n"
- "movl %2, %%ebx\n"
- "int $0x80\n"
- "popl %%ebx\n"
+ __asm__("xchgl %%edx,%%ebx"
+ "\n int $0x80"
+ "\n xchgl %%edx,%%ebx"
: "=a" (newbrk)
- : "0" (__NR_brk), "g" (addr)
+ : "0" (__NR_brk), "d" (addr)
+ : "cc"
);
__curbrk = newbrk;
diff --git a/libc/sysdeps/linux/m68k/vfork.S b/libc/sysdeps/linux/m68k/vfork.S
index b2fe033..bde9d5a 100644
--- a/libc/sysdeps/linux/m68k/vfork.S
+++ b/libc/sysdeps/linux/m68k/vfork.S
@@ -22,20 +22,23 @@ __vfork:
movl %sp@+, %a1 /* save the return address for later */
movl IMM __NR_vfork,%d0
trap #0
- movl IMM -4097, %d1
- cmpl %d0, %d1
- bcs fix_errno
- jmp %a1@ /* don't return, just jmp directly */
-fix_errno:
- negl %d0
+ movl %a1, -(%sp)
+
+ cmpil #-4096,%d0
+ blss 1f
+
+ neg.l %d0
#ifndef __PIC__ /* needs handling as the other archs */
movl errno, %a0
#else
movl errno@GOT(%a5), %a0
#endif
movl %d0, %a0@
- movl IMM -1, %d0
- jmp %a1@ /* don't return, just jmp directly */
+ move.l #-1, %d0
+
+1:
+ move.l %d0, %a0
+ rts
.size __vfork,.-__vfork
weak_alias(__vfork,vfork)
diff --git a/libc/sysdeps/linux/mips/__longjmp.c b/libc/sysdeps/linux/mips/__longjmp.c
index 5b59971..aa94f76 100644
--- a/libc/sysdeps/linux/mips/__longjmp.c
+++ b/libc/sysdeps/linux/mips/__longjmp.c
@@ -101,13 +101,13 @@ void __longjmp (__jmp_buf env, int val_arg)
/* Restore the stack pointer and the FP. They have to be restored
last and in a single asm as gcc, depending on options used, may
use either of them to access env. */
-#if _MIPS_SIM == _MIPS_SIM_ABI64
+#if _MIPS_SIM != _MIPS_SIM_ABI32
__asm__ __volatile__ ("ld $29, %0\n\t"
"ld $30, %1\n\t" : : "m" (env[0].__sp), "m" (env[0].__fp));
-#else /* O32 || N32 */
+#else /* O32 */
__asm__ __volatile__ ("lw $29, %0\n\t"
"lw $30, %1\n\t" : : "m" (env[0].__sp), "m" (env[0].__fp));
-#endif /* O32 || N32 */
+#endif /* O32 */
/* Give setjmp 1 if given a 0, or what they gave us if non-zero. */
if (val == 0)
diff --git a/libpthread/nptl/forward.c b/libpthread/nptl/forward.c
index 48d38d9..076d437 100644
--- a/libpthread/nptl/forward.c
+++ b/libpthread/nptl/forward.c
@@ -160,7 +160,7 @@ FORWARD2(__pthread_unwind,
/* We cannot call abort() here. */
INTERNAL_SYSCALL_DECL (err);
INTERNAL_SYSCALL (kill, err, 1, SIGKILL);
-#if defined __GNUC__ && (!__GNUC_PREREQ (4, 4) && !__GNUC_PREREQ (4, 2))
+#if __GNUC_PREREQ(4, 5)
__builtin_unreachable();
#else
while(1);
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S
index bac9dd4..9af4ea4 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S
@@ -138,6 +138,9 @@
.globl __lll_lock_wait_private
.type __lll_lock_wait_private,@function
.hidden __lll_lock_wait_private
+#ifndef IS_IN_libpthread
+ .weak __lll_lock_wait_private
+#endif
.align 5
cfi_startproc
__lll_lock_wait_private:
@@ -409,6 +412,9 @@ __lll_timedlock_wait:
.globl __lll_unlock_wake_private
.type __lll_unlock_wake_private,@function
.hidden __lll_unlock_wake_private
+#ifndef IS_IN_libpthread
+ .weak __lll_unlock_wake_private
+#endif
.align 5
cfi_startproc
__lll_unlock_wake_private:
hooks/post-receive
--
uClibc-ng - small C library for embedded systems