Sorry. This code meant to work with the different mkdir api in windows. I used wrong ifdef.
Here is the patch. OK for checkin? 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) #else if (mkdir (out) == -1 && errno != EEXIST) #endif On Fri, Jul 11, 2014 at 6:08 AM, Jan-Benedict Glaw <jbg...@lug-owl.de> wrote: > On Fri, 2014-07-11 15:03:06 +0200, Jan-Benedict Glaw <jbg...@lug-owl.de> > wrote: >> See eg. >> http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=289639, >> it breaks like this: >> >> [...] >> g++ -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions >> -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wwrite-strings -Wcast-qual >> -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long >> -Wno-variadic-macros -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H >> -I. -I. -I/home/jbglaw/repos/gcc/gcc -I/home/jbglaw/repos/gcc/gcc/. >> -I/home/jbglaw/repos/gcc/gcc/../include >> -I/home/jbglaw/repos/gcc/gcc/../libcpp/include >> -I/home/jbglaw/repos/gcc/gcc/../libdecnumber >> -I/home/jbglaw/repos/gcc/gcc/../libdecnumber/dpd -I../libdecnumber >> -I/home/jbglaw/repos/gcc/gcc/../libbacktrace -o gcov-tool.o -MT >> gcov-tool.o -MMD -MP -MF ./.deps/gcov-tool.TPo >> /home/jbglaw/repos/gcc/gcc/gcov-tool.c >> /usr/include/sys/stat.h: In function ‘void gcov_output_files(const char*, >> gcov_info*)’: >> /usr/include/sys/stat.h:323: error: too few arguments to function ‘int >> mkdir(const char*, __mode_t)’ >> /home/jbglaw/repos/gcc/gcc/gcov-tool.c:96: error: at this point in file >> make[1]: *** [gcov-tool.o] Error 1 >> make[1]: Leaving directory `/home/jbglaw/build/rl78-elf/build-gcc/gcc' >> make: *** [all-gcc] Error 2 > > [...] > > +#ifdef TARGET_POSIX_IO > + if (mkdir (out, 0755) == -1 && errno != EEXIST) > +#else > + if (mkdir (out) == -1 && errno != EEXIST) > +#endif > > > And with POSIX I/O, this should probably use the S_I* macros for the > mode bits? > > MfG, JBG > > -- > Jan-Benedict Glaw jbg...@lug-owl.de +49-172-7608481 > Signature of: Arroganz verkürzt fruchtlose Gespräche. > the second : -- Jan-Benedict Glaw