GNU bug report logs - #14830
[PATCH] * configure.ac (HAVE_W32): Avoid nested functions

Previous Next

Package: emacs;

Reported by: Peter Rosin <peda <at> lysator.liu.se>

Date: Mon, 8 Jul 2013 22:51:02 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Peter Rosin <peda <at> lysator.liu.se>
To: Andreas Schwab <schwab <at> suse.de>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 14830 <at> debbugs.gnu.org
Subject: bug#14830: [PATCH] * configure.ac (HAVE_W32): Avoid nested functions
Date: Tue, 09 Jul 2013 10:07:28 +0200
On 2013-07-09 09:17, Andreas Schwab wrote:
> Peter Rosin <peda <at> lysator.liu.se> 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...

Cheers,
Peter

diff --git a/ChangeLog b/ChangeLog
index 220cffb..3ba3093 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-07-09  Peter Rosin <peda <at> lysator.liu.se>  (tiny change>
+
+       * configure.ac (HAVE_W32): Avoid nested functions (the second
+       argument of AC_LANG_PROGRAM is already expanded inside a function).
+
 2013-07-08  Magnus Henoch <magnus.henoch <at> gmail.com> (tiny change)

        * configure.ac (HAVE_IMAGEMAGICK): Check on NS also (Bug#14798).
diff --git a/configure.ac b/configure.ac
index 3830ee3..bb140a8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1635,8 +1635,8 @@ if test "${opsys}" = "mingw32"; then
   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
      #include <windows.h>
      #include <usp10.h>]],
-   [[void test(PIMAGE_NT_HEADERS pHeader)
-     {PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader);}]])],
+   [[PIMAGE_NT_HEADERS pHeader;
+     PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader)]])],
    [emacs_cv_w32api=yes
     HAVE_W32=yes],
    emacs_cv_w32api=no)
--
1.7.9






This bug report was last modified 11 years and 321 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.