I'm using gnulib with mingw32 and I have a problem with redefines.
/* portability defines, excluding path handling macros */
#if defined _MSC_VER
# define setmode _setmode
# define stat _stat
# define chmod _chmod
# define getcwd _getcwd
# define putenv _putenv
# define S_IXUSR _S_IEXEC
#elif defined __MINGW32__
# define setmode _setmode
# define stat _stat
# define chmod _chmod
# define getcwd _getcwd
# define putenv _putenv
#elif defined __CYGWIN__
# define HAVE_SETENV
# define FOPEN_WB "wb"
/* #elif defined other platforms ... */
#endif
This does not seem to take into consideration that gnulib might be used. I've been looking for a way to detect if gnulib is there or not, but couldn't find it. The only solution that comes to my mind is patching my libtool with #ifdef guards.
--