public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Fix windows.h inclusion for crosses to MinGW
@ 2011-03-23 17:09 Joseph S. Myers
  2011-03-23 18:33 ` Kai Tietz
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Joseph S. Myers @ 2011-03-23 17:09 UTC (permalink / raw)
  To: binutils

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Fix windows.h inclusion for crosses to MinGW
  2011-03-23 17:09 Fix windows.h inclusion for crosses to MinGW Joseph S. Myers
@ 2011-03-23 18:33 ` Kai Tietz
  2011-03-23 20:40 ` Dave Korn
  2011-03-28  2:08 ` Alan Modra
  2 siblings, 0 replies; 4+ messages in thread
From: Kai Tietz @ 2011-03-23 18:33 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: binutils

2011/3/23 Joseph S. Myers <joseph@codesourcery.com>:
> 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

Hi Joseph,

I had this patch already in my tree but missed to post it. I can't
approve it, but I can confirm that it works.

Regards,
Kai

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Fix windows.h inclusion for crosses to MinGW
  2011-03-23 17:09 Fix windows.h inclusion for crosses to MinGW Joseph S. Myers
  2011-03-23 18:33 ` Kai Tietz
@ 2011-03-23 20:40 ` Dave Korn
  2011-03-28  2:08 ` Alan Modra
  2 siblings, 0 replies; 4+ messages in thread
From: Dave Korn @ 2011-03-23 20:40 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: binutils

On 23/03/2011 17:09, Joseph S. Myers wrote:
> 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?

  I don't have approval rights, but this is clearly correct and borders on
"obvious fix".

    cheers,
      DaveK

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Fix windows.h inclusion for crosses to MinGW
  2011-03-23 17:09 Fix windows.h inclusion for crosses to MinGW Joseph S. Myers
  2011-03-23 18:33 ` Kai Tietz
  2011-03-23 20:40 ` Dave Korn
@ 2011-03-28  2:08 ` Alan Modra
  2 siblings, 0 replies; 4+ messages in thread
From: Alan Modra @ 2011-03-28  2:08 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: binutils

On Wed, Mar 23, 2011 at 05:09:22PM +0000, Joseph S. Myers wrote:
> 	* configure.in: Check for windows.h, not Windows.h.
> 	* configure: Regenerate.
> 	* plugin.c: Include windows.h, not Windows.h.

OK.

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-03-28  2:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-23 17:09 Fix windows.h inclusion for crosses to MinGW Joseph S. Myers
2011-03-23 18:33 ` Kai Tietz
2011-03-23 20:40 ` Dave Korn
2011-03-28  2:08 ` Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).