[Top][All Lists]

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

Re: More exit() troubles

From: Alexandre Oliva
Subject: Re: More exit() troubles
Date: 18 Jan 2001 14:29:52 -0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Crater Lake)

On Jan 18, 2001, Akim Demaille <address@hidden> wrote:

>>>>>> "Lars" == Lars J Aas <address@hidden> writes:
Lars> I noticed that when I moved '' first, the first exit(42) test
Lars> didn't include <stdlib.h> - is that right?  

> Yes, it does, but you didn't see it because it didn't fail.  The test
> goes in two steps:

> configure:3338: /home/larsa/src/Coin/cfg/m4/msvccc -c -g >&5
> configure(3331) : error C2065: 'exit' : undeclared identifier

Hmm...  I didn't expect it to fail in this case.

Well, maybe we could just go without the test that doesn't include
stdlib.h when the declaration being tested is empty.  That would
probably work, as long as all tests do include stdlib.h.

Hmm, no.  I think the second test string should be the ``declaration'':

#include <stdlib.h>

This would test whether it is safe to #include it twice.  The
assumption being that any compiler that is picky enough to require a
declaration of exit() will have a stdlib.h that can be #included

Alexandre Oliva   Enjoy Guarana', see
Red Hat GCC Developer                  address@hidden,}
CS PhD student at IC-Unicamp        address@hidden,}
Free Software Evangelist    *Please* write to mailing lists, not to me

reply via email to

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