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 a6cdfdfff38584cadec40b6d6f2df2651e0b34b8 (commit)
via 545beca17885560298580b51619979529a309360 (commit)
via 688563159f328726f958163fcdab8088df66e977 (commit)
via d87cc4d9a6945daf48848022c93d0d9a0489a87e (commit)
from 6630ac965279ed2a76394fbad8fd861f275ed24c (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 a6cdfdfff38584cadec40b6d6f2df2651e0b34b8
Author: John Ata <john.ata(a)baesystems.com>
Date: Mon Oct 17 14:47:02 2016 -0400
Fix nftw when called with FTW_CHDIR and FTW_DEPTH
Change directory back to the parent before processing
the directory (after the contents have already been processed).
Signed-off-by: John Ata <john.ata(a)baesystems.com>
commit 545beca17885560298580b51619979529a309360
Author: Waldemar Brodkorb <wbx(a)uclibc-ng.org>
Date: Thu Oct 20 21:18:05 2016 +0200
test: add nftw test case
commit 688563159f328726f958163fcdab8088df66e977
Author: Vineet Gupta <Vineet.Gupta1(a)synopsys.com>
Date: Thu Oct 13 10:46:14 2016 -0700
ARC: update .note.ABI-tag for ABIv4
Cc: Anton Kolesov <akolesov(a)synopsys.com>
Cc: linux-snps-arc(a)lists.infradead.org
Signed-off-by: Vineet Gupta <vgupta(a)synopsys.com>
commit d87cc4d9a6945daf48848022c93d0d9a0489a87e
Author: Waldemar Brodkorb <wbx(a)uclibc-ng.org>
Date: Wed Oct 19 19:16:37 2016 +0200
create empty static files conditionally
-----------------------------------------------------------------------
Summary of changes:
Makefile.in | 26 +++++++++++++++++++-
libc/Makefile.in | 12 ++++-----
libc/misc/ftw/ftw.c | 13 +++++-----
libc/sysdeps/linux/arc/crt1.S | 6 ++++-
test/misc/tst-nftw.c | 57 +++++++++++++++++++++++++++++++++++++++++++
5 files changed, 99 insertions(+), 15 deletions(-)
create mode 100644 test/misc/tst-nftw.c
diff --git a/Makefile.in b/Makefile.in
index c289ed3..877a0b6 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -363,7 +363,31 @@ else
$(Q)cd $(PREFIX)$(DEVEL_PREFIX)include && $(RM) -f wchar-stub.h
endif
-EMPTY_LIB_NAMES = m crypt nsl resolv util dl rt pthread intl
+EMPTY_LIB_NAMES = dl
+ifeq ($(DO_C99_MATH),y)
+EMPTY_LIB_NAMES += m
+endif
+ifeq ($(UCLIBC_HAS_THREADS),y)
+EMPTY_LIB_NAMES += pthread
+endif
+ifeq ($(UCLIBC_HAS_REALTIME),y)
+EMPTY_LIB_NAMES += rt
+endif
+ifeq ($(UCLIBC_HAS_CRYPT),y)
+EMPTY_LIB_NAMES += crypt
+endif
+ifeq ($(UCLIBC_HAS_LIBUTIL),y)
+EMPTY_LIB_NAMES += util
+endif
+ifeq ($(UCLIBC_HAS_LIBRESOLV_STUB),y)
+EMPTY_LIB_NAMES += resolv
+endif
+ifeq ($(UCLIBC_HAS_LIBNSL_STUB),y)
+EMPTY_LIB_NAMES += nsl
+endif
+ifeq ($(UCLIBC_HAS_GETTEXT_AWARENESS),y)
+EMPTY_LIB_NAMES += intl
+endif
EMPTY_LIBS = $(EMPTY_LIB_NAMES:%=lib/lib%.a)
$(EMPTY_LIBS):
diff --git a/libc/Makefile.in b/libc/Makefile.in
index 85986a7..714a66e 100644
--- a/libc/Makefile.in
+++ b/libc/Makefile.in
@@ -42,9 +42,9 @@ else
libc-a-y = $(libc-y) $(libc-static-y)
endif
-libc-a-y += $(libnsl-a-y)
-libc-a-y += $(libresolv-a-y)
-libc-a-y += $(libm-a-y)
+libc-a-$(DO_C99_MATH) += $(libm-a-y)
+libc-a-$(UCLIBC_HAS_LIBNSL_STUB) += $(libnsl-a-y)
+libc-a-$(UCLIBC_HAS_LIBRESOLV_STUB) += $(libresolv-a-y)
libc-a-$(UCLIBC_HAS_LIBUTIL) += $(libutil-a-y)
libc-a-$(UCLIBC_HAS_CRYPT) += $(libcrypt-a-y)
libc-a-$(UCLIBC_HAS_ARGP) += $(libuargp-a-y)
@@ -55,10 +55,10 @@ libc-a-$(UCLIBC_HAS_BACKTRACE) += $(libubacktrace-a-y)
libc-so-y = $(libc-y:.o=.os) $(libc-shared-y)
-libc-so-y += $(libnsl-so-y)
-libc-so-y += $(libresolv-so-y)
libc-so-y += $(libdl-so-y)
-libc-so-y += $(libm-so-y)
+libc-so-$(DO_C99_MATH) += $(libm-so-y)
+libc-so-$(UCLIBC_HAS_LIBNSL_STUB) += $(libnsl-so-y)
+libc-so-$(UCLIBC_HAS_LIBRESOLV_STUB) += $(libresolv-so-y)
libc-so-$(UCLIBC_HAS_LIBUTIL) += $(libutil-so-y)
libc-so-$(UCLIBC_HAS_CRYPT) += $(libcrypt-so-y)
libc-so-$(UCLIBC_HAS_ARGP) += $(libuargp-so-y)
diff --git a/libc/misc/ftw/ftw.c b/libc/misc/ftw/ftw.c
index 05ea0fa..c6241ed 100644
--- a/libc/misc/ftw/ftw.c
+++ b/libc/misc/ftw/ftw.c
@@ -558,19 +558,14 @@ fail:
--data->ftw.level;
data->ftw.base = previous_base;
- /* Finally, if we process depth-first report the directory. */
- if (result == 0 && (data->flags & FTW_DEPTH))
- result = (*data->func) (data->dirbuf, st, FTW_DP, &data->ftw);
-
- if (old_dir
- && (data->flags & FTW_CHDIR)
+ if ((data->flags & FTW_CHDIR)
&& (result == 0
|| ((data->flags & FTW_ACTIONRETVAL)
&& (result != -1 && result != FTW_STOP))))
{
/* Change back to the parent directory. */
int done = 0;
- if (old_dir->stream != NULL)
+ if (old_dir && old_dir->stream != NULL)
if (__fchdir (dirfd (old_dir->stream)) == 0)
done = 1;
@@ -587,6 +582,10 @@ fail:
}
}
+ /* Finally, if we process depth-first report the directory. */
+ if (result == 0 && (data->flags & FTW_DEPTH))
+ result = (*data->func) (data->dirbuf, st, FTW_DP, &data->ftw);
+
return result;
}
diff --git a/libc/sysdeps/linux/arc/crt1.S b/libc/sysdeps/linux/arc/crt1.S
index ae863e7..70a06e0 100644
--- a/libc/sysdeps/linux/arc/crt1.S
+++ b/libc/sysdeps/linux/arc/crt1.S
@@ -72,5 +72,9 @@ __start:
0: .asciz "GNU" /* Vendor name */
1: .align 4
2: .long 0 /* Note data: Linux executable */
- .long 3,9,0 /* Earliest compatible kernel */
+#if (__GNUC__ > 4)
+ .long 4,8,0 /* Earliest compatible kernel for ABI v4 */
+#else
+ .long 3,9,0 /* Earliest compatible kernel for ABI v3 */
+#endif
3: .align 4 /* Pad out section */
diff --git a/test/misc/tst-nftw.c b/test/misc/tst-nftw.c
new file mode 100644
index 0000000..76d11eb
--- /dev/null
+++ b/test/misc/tst-nftw.c
@@ -0,0 +1,57 @@
+#define _XOPEN_SOURCE 500
+#define _GNU_SOURCE
+#include <ftw.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+int result = 0;
+
+static int process_one_entry(const char *fpath, const struct stat *sb,
+ int typeflag, struct FTW *ftwbuf)
+{
+
+ struct stat buf;
+ const char *rel_path = fpath+ftwbuf->base;
+
+ printf("Processing %s in working dir %s\n",
+ rel_path, get_current_dir_name());
+ if (stat(rel_path, &buf) < 0) {
+ perror("Oops...relative path does not exist in current directory");
+ result = 1;
+ }
+}
+
+static int
+do_test(void)
+{
+ char *path = "/tmp/stest_dir";
+ char *subpath = "/tmp/stest_dir/d1";
+ char *filepath = "/tmp/stest_dir/f1";
+ char *filesubpath = "/tmp/stest_dir/d1/f2";
+
+ if ((mkdir(path, 0700)) < 0)
+ perror("Creating path");
+ if ((mkdir(subpath, 0700)) < 0)
+ perror("Creating subpath");
+ if ((open(filepath, O_CREAT)) < 0)
+ perror("Opening filepath");
+ if ((open(filesubpath, O_CREAT)) < 0)
+ perror("Opening filesubpath");
+
+ if (nftw(path, process_one_entry, 100, (FTW_CHDIR|FTW_DEPTH|FTW_PHYS)) < 0)
+ perror("ntfw");
+
+ unlink(filesubpath);
+ unlink(filepath);
+ rmdir(subpath);
+ rmdir(path);
+
+ return result;
+}
+
+#define TIMEOUT 5
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
hooks/post-receive
--
uClibc-ng - small C library for embedded systems