From c59adc02887d4a20101d5a04d816e0280e80a9c0 Mon Sep 17 00:00:00 2001 From: Andrew Hsieh Date: Thu, 6 Aug 2015 17:35:24 +0800 Subject: Fix mingw build breakage 1) Add missing _GCOV_fopen if !__KERNEL__ 2) Use _fullpath Change-Id: Id10cedf85e9a3409c284b77321675f61d37e76c2 --- gcc-4.9/gcc/gcov-io.h | 1 + gcc-4.9/libgcc/libgcov-util.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/gcc-4.9/gcc/gcov-io.h b/gcc-4.9/gcc/gcov-io.h index e67bce4ea..895ff9867 100644 --- a/gcc-4.9/gcc/gcov-io.h +++ b/gcc-4.9/gcc/gcov-io.h @@ -187,6 +187,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see # define _GCOV_fwrite fwrite # define _GCOV_fread fread # define _GCOV_fileno fileno +# define _GCOV_fopen fopen #endif #ifndef IN_LIBGCOV diff --git a/gcc-4.9/libgcc/libgcov-util.c b/gcc-4.9/libgcc/libgcov-util.c index 4435cff4f..cb07d2875 100644 --- a/gcc-4.9/libgcc/libgcov-util.c +++ b/gcc-4.9/libgcc/libgcov-util.c @@ -36,6 +36,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see /* Borrowed from basic-block.h. */ #define RDIV(X,Y) (((X) + (Y) / 2) / (Y)) +#ifdef __MINGW32__ +#define realpath(path,resolved_path) _fullpath((resolved_path),(path),_MAX_PATH) +#endif + extern gcov_position_t gcov_position(); extern int gcov_is_error(); extern size_t gcov_max_filename; -- cgit v1.2.3