+2015-02-09 Trevor Saunders <tsaunders@mozilla.com>
+
+ PR gcov-profile/61889
+ * config.in: regenerate.
+ * configure.in: Likewise.
+ * configure.ac: Check for ftw.h.
+ * gcov-tool.c: Check for ftw.h before using nftw.
+
2015-02-09 Trevor Saunders <tsaunders@mozilla.com>
PR lto/64076
#endif
+/* Define to 1 if you have the <ftw.h> header file. */
+#ifndef USED_FOR_TARGET
+#undef HAVE_FTW_H
+#endif
+
+
/* Define to 1 if you have the `fwrite_unlocked' function. */
#ifndef USED_FOR_TARGET
#undef HAVE_FWRITE_UNLOCKED
fi
for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \
- fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
+ fcntl.h ftw.h unistd.h sys/file.h sys/time.h sys/mman.h \
sys/resource.h sys/param.h sys/times.h sys/stat.h \
direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h
do :
AC_HEADER_SYS_WAIT
AC_HEADER_TIOCGWINSZ
AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \
- fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
+ fcntl.h ftw.h unistd.h sys/file.h sys/time.h sys/mman.h \
sys/resource.h sys/param.h sys/times.h sys/stat.h \
direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h)
#include <stdio.h>
#include <sys/stat.h>
#include <unistd.h>
+#if HAVE_FTW_H
#include <ftw.h>
+#endif
#include <getopt.h>
extern int gcov_profile_merge (struct gcov_info*, struct gcov_info*, int, int);
/* Set to verbose output mode. */
static bool verbose;
+#if HAVE_FTW_H
+
/* Remove file NAME if it has a gcda suffix. */
static int
return ret;
}
+#endif
/* Remove the gcda files in PATH recursively. */
static int
-unlink_profile_dir (const char *path)
+unlink_profile_dir (const char *path ATTRIBUTE_UNUSED)
{
+#if HAVE_FTW_H
return nftw(path, unlink_gcda_file, 64, FTW_DEPTH | FTW_PHYS);
+#else
+ return -1;
+#endif
}
/* Output GCOV_INFO lists PROFILE to directory OUT. Note that