autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: More exit() troubles - the answer


From: Lars J. Aas
Subject: Re: More exit() troubles - the answer
Date: Mon, 22 Jan 2001 13:45:13 +0100
User-agent: Mutt/1.2.5i

On Mon, Jan 22, 2001 at 11:08:59AM +0100, Akim Demaille wrote:
: >>>>> "Alexandre" == Alexandre Oliva <address@hidden> writes:
: 
: Lars> There's "#pragma once" and an ifndef wrapper in it ASAIR, so
: Lars> that should work fine.  Using '' first in the list of
: Lars> ac_declaration's didn't trigger though, probably for some other
: Lars> reason.
: 
: Alexandre> It should work for C and older versions of g++, so it
: Alexandre> should remain first.  A new entry with `#include
: Alexandre> <stdlib.h>' should be added second.
: 
: Err, I don't want to dive into this thread...

They say "to err is human".  Sometimes I have wondered, but here you
clearly show that you are :)

: Could somelars send us the patch?  Thanks :)

It passed my initial tests so I guess it works.  Here's a patch (you'll
have to find one fault and fix it before submitting it :):


2001-01-22  Lars J. Aas  <address@hidden>

        * aclang.m4 (_AC_PROG_CXX_EXIT_DECLARATION): First try no declaration,
        then '#include <stdlib.h>', before trying the explicit declarations.

Index: aclang.m4
===================================================================
RCS file: /cvs/autoconf/aclang.m4,v
retrieving revision 1.114
diff -u -r1.114 aclang.m4
--- aclang.m4   2001/01/22 09:10:55     1.114
+++ aclang.m4   2001/01/22 12:38:25
@@ -1129,12 +1129,13 @@
 # Find a valid prototype for exit and declare it in confdefs.h.
 m4_define([_AC_PROG_CXX_EXIT_DECLARATION],
 [for ac_declaration in \
+   ''\
+   '#include <stdlib.h>' \
    'extern "C" void std::exit (int) throw (); using std::exit;' \
    'extern "C" void std::exit (int); using std::exit;' \
    'extern "C" void exit (int) throw ();' \
    'extern "C" void exit (int);' \
-   'void exit (int);' \
-   ''
+   'void exit (int);'
 do
   _AC_COMPILE_IFELSE([AC_LANG_PROGRAM(address@hidden:@include <stdlib.h>
 $ac_declaration],



reply via email to

[Prev in Thread] Current Thread [Next in Thread]