Subject: bug#14830: closed (Re: bug#14830: [PATCH] * configure.ac (HAVE_W32): Avoid nested functions)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 09 Jul 2013 18:09:02 +0000

Your bug report

#14830: [PATCH] * configure.ac (HAVE_W32): Avoid nested functions

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
14830: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14830
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#14830: [PATCH] * configure.ac (HAVE_W32): Avoid nested functions
From: Eli Zaretskii <[email-masked]>
To: Peter Rosin <[email-masked]>
Cc: [email-masked], [email-masked]
Date: Tue, 09 Jul 2013 21:07:44 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

> Date: Tue, 09 Jul 2013 10:07:28 +0200
> From: Peter Rosin <[email-masked]>
> CC: Eli Zaretskii <[email-masked]>, [email-masked]
> 
> On 2013-07-09 09:17, Andreas Schwab wrote:
> > Peter Rosin <[email-masked]> writes:
> > 
> >> #include <windows.h>
> >> #include <usp10.h>
> >>
> >> int
> >> main ()
> >> {
> >>   PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader);
> > 
> > You need to declare pHeader somewhere.
> 
> Big sigh. Thanks for catching...

Thanks, committed as trunk revision 113349.

Subject: [PATCH] * configure.ac (HAVE_W32): Avoid nested functions
From: Peter Rosin <[email-masked]>
To: [email-masked]
Date: Tue, 09 Jul 2013 00:49:43 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

diff --git a/ChangeLog b/ChangeLog
index 220cffb..03011cf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-07-09  Peter Rosin <[email-masked]>  (tiny change>
+
+	* configure.ac (HAVE_W32): Avoid nested functions (the second
+	argument of AC_LANG_PROGRAM is expanded inside a function).
+
 2013-07-08  Magnus Henoch <[email-masked]> (tiny change)

 	* configure.ac (HAVE_IMAGEMAGICK): Check on NS also (Bug#14798).
diff --git a/configure.ac b/configure.ac
index 3830ee3..1188f1b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1632,10 +1632,10 @@ fi

 if test "${opsys}" = "mingw32"; then
   AC_MSG_CHECKING([whether Windows API headers are recent enough])
-  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+  AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
      #include <windows.h>
-     #include <usp10.h>]],
-   [[void test(PIMAGE_NT_HEADERS pHeader)
+     #include <usp10.h>
+     void test(PIMAGE_NT_HEADERS pHeader)
      {PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader);}]])],
    [emacs_cv_w32api=yes
     HAVE_W32=yes],
--
1.7.9