[Patch] Fix PR61889 for the w64-mingw32 case

Xinliang David Li davidxl@google.com
Mon Oct 13 19:43:00 GMT 2014


Honza, not sure if this patch is idea, but this will unblock mingw
build problems. Can this one get in?

thanks,

David

On Wed, Sep 24, 2014 at 8:22 AM, Rainer Emrich
<rainer@emrich-ebersheim.de> wrote:
> The following patch fixes PR61889 for x86_64-w64-mingw32. Details can be found
> on https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61889
>
> The patch was bootstrapped on x86_64-w64-mingw32.
>
> If patch the patch is ok, Kai would you apply, please?
>
> Rainer
>
> 2014-09-24  Rainer Emrich  <rainer@emrich-ebersheim.de>
>
>         PR gcov-profile/61889
>         * gcc/gcov-tool.c: Remove wrong #if !defined(_WIN32)
>         * libgcc/libgcov-driver-system.c: undefine clashing macro for mkdir
>
>
> Index: gcc/gcov-tool.c
> ===================================================================
> --- gcc/gcov-tool.c     (Revision 215554)
> +++ gcc/gcov-tool.c     (Arbeitskopie)
> @@ -89,11 +89,7 @@ gcov_output_files (const char *out, stru
>    /* Try to make directory if it doesn't already exist.  */
>    if (access (out, F_OK) == -1)
>      {
> -#if !defined(_WIN32)
>        if (mkdir (out, S_IRWXU | S_IRWXG | S_IRWXO) == -1 && errno != EEXIST)
> -#else
> -      if (mkdir (out) == -1 && errno != EEXIST)
> -#endif
>          fatal_error ("Cannot make directory %s", out);
>      } else
>        unlink_profile_dir (out);
> Index: libgcc/libgcov-driver-system.c
> ===================================================================
> --- libgcc/libgcov-driver-system.c      (Revision 215554)
> +++ libgcc/libgcov-driver-system.c      (Arbeitskopie)
> @@ -66,6 +66,9 @@ create_file_directory (char *filename)
>  #ifdef TARGET_POSIX_IO
>              && mkdir (filename, 0755) == -1
>  #else
> +#ifdef mkdir
> +#undef mkdir
> +#endif
>              && mkdir (filename) == -1
>  #endif
>              /* The directory might have been made by another process.  */



More information about the Gcc-patches mailing list