> From: Dmitry Goncharov <dgoncha...@users.sf.net> > Date: Sat, 24 Jul 2021 22:03:37 -0400 > Cc: Mike Frysinger <vap...@gentoo.org>, Paul Smith <psm...@gnu.org>, > bo...@kolpackov.net, > bug-make <bug-make@gnu.org> > > Wanted to test that windows this still works with this change. > > So, i followed instructions in README.W32. > Installed mingw gcc. Copied config.h.W32.template to config.h.w32. > Ran build_W32.bat gcc. It fails with > > C:\dgoncharov\make>gcc -mthreads -Wall -std=gnu99 -gdwarf-2 -g3 -O2 > -DMAKE_MAINT > AINER_MODE -I.\GccRel/src -I./src -I.\GccRel/lib -I./lib -I./src/w32/include > -DW > INDOWS32 -DHAVE_CONFIG_H -o .\GccRel/src/ar.o -c src/ar.c > In file included from src/ar.c:18: > src/makeint.h:314:13: error: conflicting types for 'mode_t' > typedef int mode_t; > ^~~~~~ > In file included from src/makeint.h:86, > from src/ar.c:18: > c:/Program Files > (x86)/mingw-w64/i686-8.1.0-posix-dwarf-rt_v6-rev0/mingw32/i686- > w64-mingw32/include/sys/types.h:77:17: note: previous declaration of 'mode_t' > wa > s here typedef _mode_t mode_t; > > Both make and mingw declare mode_t. > More errors like this follow. > > Does anyone have a ready to use config.h.W32?
config.h.W32.template has this: /* Define to 1 if you have the `umask' function. */ #if defined(__MINGW32__) || defined(__TINYC__) # define HAVE_UMASK 1 #endif and makeint.h says around line 315: #if !defined(HAVE_UMASK) typedef int mode_t; extern mode_t umask (mode_t); #endif So the typedef in makeint.h should have been excluded in the MinGW build. How come it wasn't in your case? Did MinGW64 stop defining __MINGW32__ or something? Or was makeint.h included before config.h?