Hi Jim, Another module with an easy-to-fix compilation error on mingw is 'fts':
fts.c: In function `fts_build': fts.c:942: error: `nlink_t' undeclared (first use in this function) fts.c:942: error: (Each undeclared identifier is reported only once fts.c:942: error: for each function it appears in.) fts.c:942: error: parse error before "nlinks" fts.c:984: error: `nlinks' undeclared (first use in this function) make[3]: *** [fts.o] Error 1 All that's missing is the type 'nlink_t'. The type of st_nlink in 'struct stat' on this system is 'short'. But for declaring variables, 'int' will work as well. I'm applying this fix; no objections, I suppose? Bruno 2008-04-20 Bruno Haible <[EMAIL PROTECTED]> * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Also provided a substitute for nlink_t if missing. * tests/test-sys_stat.c: Check the existence of the nlink_t type. *** m4/sys_stat_h.m4.orig 2008-04-20 09:50:57.000000000 +0200 --- m4/sys_stat_h.m4 2008-04-20 09:47:44.000000000 +0200 *************** *** 1,5 **** ! # sys_stat_h.m4 serial 6 -*- Autoconf -*- ! dnl Copyright (C) 2006-2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. --- 1,5 ---- ! # sys_stat_h.m4 serial 7 -*- Autoconf -*- ! dnl Copyright (C) 2006-2008 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. *************** *** 45,48 **** --- 45,57 ---- gl_CHECK_NEXT_HEADERS([sys/stat.h]) SYS_STAT_H='sys/stat.h' AC_SUBST([SYS_STAT_H]) + + dnl Define types that are supposed to be defined in <sys/types.h> or + dnl <sys/stat.h>. + AC_CHECK_TYPE([nlink_t], [], + [AC_DEFINE([nlink_t], [int], + [Define to the type of st_nlink in struct stat, or a supertype.])], + [#include <sys/types.h> + #include <sys/stat.h>]) + ]) # gl_HEADER_SYS_STAT_H *** tests/test-sys_stat.c.orig 2008-04-20 09:50:57.000000000 +0200 --- tests/test-sys_stat.c 2008-04-20 09:49:41.000000000 +0200 *************** *** 1,5 **** /* Test of <sys/stat.h> substitute. ! Copyright (C) 2007 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by --- 1,5 ---- /* Test of <sys/stat.h> substitute. ! Copyright (C) 2007-2008 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by *************** *** 253,258 **** --- 253,261 ---- verify (!S_ISWHT (S_IFSOCK)); #endif + /* Check the existence of some types. */ + nlink_t t1; + int main () {