> Sorry. This code meant to work with the different mkdir api in
> windows. I used wrong ifdef.
> 
> Here is the patch. OK for checkin?
OK. I also see the following with LTO bootstrap:
../../gcc/../libgcc/libgcov-util.c:41:24: error: type of �gcov_max_filename� 
does not match original declaration [-Werror]
 extern gcov_unsigned_t gcov_max_filename;
                        ^
../../gcc/../libgcc/libgcov-driver.c:88:8: note: previously declared here
 size_t gcov_max_filename = 0;
Probably both can be size_t?

Honza

> 
> Thanks,
> 
> -Rong
> 
> 2014-07-11  Rong Xu  <x...@google.com>
> 
>         * gcov-tool.c (gcov_output_files): Fix build error.
> 
> Index: gcov-tool.c
> ===================================================================
> --- gcov-tool.c (revision 212448)
> +++ gcov-tool.c (working copy)
> @@ -90,8 +90,8 @@ gcov_output_files (const char *out, struct gcov_in
>    /* Try to make directory if it doesn't already exist.  */
>    if (access (out, F_OK) == -1)
>      {
> -#ifdef TARGET_POSIX_IO
> -      if (mkdir (out, 0755) == -1 && errno != EEXIST)
> +#if !defined(_WIN32)
> +      if (mkdir (out, S_IRWXU | S_IRWXG | S_IRWXO) == -1 && errno != EEXIST)

Sounds almost like something we could have libiberty glue for...


>  #else
>        if (mkdir (out) == -1 && errno != EEXIST)
>  #endif
> 

Reply via email to