diff --git a/Changelog b/Changelog index 876fe47..8101958 100644 --- a/Changelog +++ b/Changelog @@ -1,6 +1,8 @@ [Changes 1.2c01] -* Fix building plugins on FreeBSD-10. (caf) +* Fix building on newer Cygwin (reported by VICODAN). (caf) + +* Fix building plugins on FreeBSD-10 (reported by cpet). (caf) * Messages sent to channels should use lastlog level PUBLIC, not MSG. (caf) diff --git a/configure b/configure index 9fc4caf..59e6f0e 100755 --- a/configure +++ b/configure @@ -6340,6 +6340,7 @@ echo $ECHO_N "checking for the iphlpapi library... $ECHO_C" >&6 LIBS="-liphlpapi $LIBS" cat >conftest.$ac_ext <<_ACEOF + #define WIN32_LEAN_AND_MEAN #include #include diff --git a/configure.in b/configure.in index 93da450..d90f254 100644 --- a/configure.in +++ b/configure.in @@ -169,6 +169,7 @@ if test x"$bx_cv_lib_resolver" != x"not found"; then OLDLIBS="$LIBS" LIBS="-liphlpapi $LIBS" AC_LINK_IFELSE([[ + #define WIN32_LEAN_AND_MEAN #include #include diff --git a/source/misc.c b/source/misc.c index 181d2b7..81e2a08 100644 --- a/source/misc.c +++ b/source/misc.c @@ -4,6 +4,31 @@ #include "irc.h" static char cvsrevision[] = "$Id$"; CVS_REVISION(misc_c) + +#ifdef HAVE_LIBIPHLPAPI +#define WIN32_LEAN_AND_MEAN +#include +#include +#endif + +#include +#include + +#include +#include +#include + +#include +#include +#ifndef __OPENNT +#include +#endif +#include + +#if defined(sparc) && defined(sun4c) +#include +#endif + #include "struct.h" #include "server.h" @@ -45,24 +70,6 @@ CVS_REVISION(misc_c) #define MAIN_SOURCE #include "modval.h" -#include -#include - -#include -#include -#include - -#include -#include -#ifndef __OPENNT -#include -#endif -#include - -#if defined(sparc) && defined(sun4c) -#include -#endif - #ifdef GUI extern int guiipc[2]; extern int newscrollerpos, lastscrollerpos, lastscrollerwindow; @@ -2054,8 +2061,6 @@ static struct resstats { } ar_reinfo; #ifdef HAVE_LIBIPHLPAPI -#include -#include void ar_get_windows_dns(void) {