This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch] Fix PR61889 for the w64-mingw32 case


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

Hmm, the patch is somewhat ugly and I do not know why MingW32 defines mkdir
macro and how. If Kai Tietz or other MingW32 maintainer is OK about it, the
patch is OK.

Honza
> 
> 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.  */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]