diff options
author | Trevor Saunders <tsaunders@mozilla.com> | 2015-02-10 03:40:20 +0000 |
---|---|---|
committer | Trevor Saunders <tbsaunde@gcc.gnu.org> | 2015-02-10 03:40:20 +0000 |
commit | 370500455759a49e82f55c91e559d7ecab0d32ab (patch) | |
tree | 87a98579e2db1bcfc8d7777f92b50a7acd6ca54b /gcc/gcov-tool.c | |
parent | 2d51422f3908ac452fee07e099d046991ad8f8f6 (diff) | |
download | gcc-370500455759a49e82f55c91e559d7ecab0d32ab.zip gcc-370500455759a49e82f55c91e559d7ecab0d32ab.tar.gz gcc-370500455759a49e82f55c91e559d7ecab0d32ab.tar.bz2 |
Support gcov-tool without ftw.h
gcc/
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.
From-SVN: r220566
Diffstat (limited to 'gcc/gcov-tool.c')
-rw-r--r-- | gcc/gcov-tool.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/gcov-tool.c b/gcc/gcov-tool.c index 0f97b53..d63ad1c 100644 --- a/gcc/gcov-tool.c +++ b/gcc/gcov-tool.c @@ -35,7 +35,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #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); @@ -49,6 +51,8 @@ extern void gcov_set_verbose (void); /* Set to verbose output mode. */ static bool verbose; +#if HAVE_FTW_H + /* Remove file NAME if it has a gcda suffix. */ static int @@ -69,13 +73,18 @@ unlink_gcda_file (const char *name, 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 |