This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch] Fix PR61889 for the w64-mingw32 case
- From: Xinliang David Li <davidxl at google dot com>
- To: Rainer Emrich <rainer at emrich-ebersheim dot de>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Kai Tietz <ktietz70 at googlemail dot com>, Jan Hubicka <hubicka at ucw dot cz>
- Date: Mon, 13 Oct 2014 12:40:20 -0700
- Subject: Re: [Patch] Fix PR61889 for the w64-mingw32 case
- Authentication-results: sourceware.org; auth=none
- References: <5422E1C8 dot 1080708 at emrich-ebersheim dot de>
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. */