This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Fix windows.h inclusion for crosses to MinGW
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: binutils at sourceware dot org
- Date: Wed, 23 Mar 2011 17:09:22 +0000 (UTC)
- Subject: Fix windows.h inclusion for crosses to MinGW
The ld configure test for plugins on Windows includes Windows.h, as does
plugin.c. But the header included in MinGW's w32api distribution is
actually windows.h not Windows.h, so the configure test fails when the
host is MinGW but the build system has a case-sensitive filesystem. This
patch fixes the test and include to use windows.h. OK to commit?
2011-03-23 Joseph Myers <joseph@codesourcery.com>
* configure.in: Check for windows.h, not Windows.h.
* configure: Regenerate.
* plugin.c: Include windows.h, not Windows.h.
Index: configure.in
===================================================================
RCS file: /cvs/src/src/ld/configure.in,v
retrieving revision 1.68
diff -u -r1.68 configure.in
--- configure.in 22 Jan 2011 19:25:37 -0000 1.68
+++ configure.in 23 Mar 2011 16:55:21 -0000
@@ -173,7 +173,7 @@
AC_CHECK_FUNCS([dlopen dlsym dlclose],[],[enable_plugins=no])
# We also support plugins on Windows (MinGW).
if test x$enable_plugins = xno ; then
- AC_CHECK_HEADERS([Windows.h],[enable_plugins=yes],[],[AC_INCLUDES_DEFAULT])
+ AC_CHECK_HEADERS([windows.h],[enable_plugins=yes],[],[AC_INCLUDES_DEFAULT])
fi
AM_CONDITIONAL([ENABLE_PLUGINS], [test x$enable_plugins = xyes])
Index: plugin.c
===================================================================
RCS file: /cvs/src/src/ld/plugin.c,v
retrieving revision 1.28
diff -u -r1.28 plugin.c
--- plugin.c 10 Mar 2011 10:27:50 -0000 1.28
+++ plugin.c 23 Mar 2011 16:55:21 -0000
@@ -33,7 +33,7 @@
#include "plugin-api.h"
#include "elf-bfd.h"
#if !defined (HAVE_DLFCN_H) && defined (HAVE_WINDOWS_H)
-#include <Windows.h>
+#include <windows.h>
#endif
/* Report plugin symbols. */
--
Joseph S. Myers
joseph@codesourcery.com