autoconf-patches
[Top][All Lists]
Advanced

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

Re: C++ fix and test


From: Alexandre Oliva
Subject: Re: C++ fix and test
Date: 20 Dec 2000 08:34:38 -0200
User-agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands)

On Dec 19, 2000, Pavel Roskin <address@hidden> wrote:

> Hello, Akim!

>> Unless you know for sure a simple include will break things, I'd
>> rather go for the simple solution, and make it complex later if
>> needed.

I do know there's a big risk of breaking things, and I'd rather not
take it.  And then, it's just a `for' testing various alternatives of
setting the $ac_cplusplus_exit_decl variable, that would be part of
aclang.m4 by default.  Some alternatives to test:

1)
#include <stdlib.h>

2)
extern "C" void exit (int);

3)
extern "C" void exit (int) throw();

4)
namespace std { extern "C" void exit (int); } using std::exit;

5)
namespace std { extern "C" void exit (int) throw(); } using std::exit;

We should attempt to compile all of them with and without #including
<stdlib.h>, and always calling exit(0), so that we detect any problems
with duplicate inclusion of stdlib.h and potential incompatibilities
between the declaration in  #including <stdlib.h> and the one we would
provide.

I believe this is the only safe way to make sure we can call exit(int)
:-(

> +# `cos' should be either in libc or in libm.

But you need a declaration to be able to call it, in C++.  Where would
this declaration be coming from?

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  address@hidden, redhat.com}
CS PhD student at IC-Unicamp        address@hidden, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me



reply via email to

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