Re: More exit() troubles - the answer

2001-01-22 Thread Akim Demaille
> "Alexandre" == Alexandre Oliva <[EMAIL PROTECTED]> writes: Alexandre> My reasoning is that, if it can be #included twice without Alexandre> error, it can't hurt. I can't think of any problem with Alexandre> it, can you? Systems usually have more imagination than you and I have :) Alexand

Re: More exit() troubles - the answer

2001-01-22 Thread Alexandre Oliva
On Jan 22, 2001, Akim Demaille <[EMAIL PROTECTED]> wrote: >> "Lars" == Lars J Aas <[EMAIL PROTECTED]> writes: Lars> * aclang.m4 (_AC_PROG_CXX_EXIT_DECLARATION): First try no Lars> declaration, then '#include ', before trying the Lars> explicit declarations. > If Alexandre thinks it is OK tha

Re: More exit() troubles - the answer

2001-01-22 Thread Akim Demaille
> "Lars" == Lars J Aas <[EMAIL PROTECTED]> writes: Lars> * aclang.m4 (_AC_PROG_CXX_EXIT_DECLARATION): First try no Lars> declaration, then '#include ', before trying the Lars> explicit declarations. If Alexandre thinks it is OK that stdlib.h be *always* included in *all the tests*, then it

Re: More exit() troubles - the answer

2001-01-22 Thread Lars J. Aas
On Mon, Jan 22, 2001 at 01:45:13PM +0100, Lars J. Aas wrote: : 2001-01-22 Lars J. Aas <[EMAIL PROTECTED]> : : * aclang.m4 (_AC_PROG_CXX_EXIT_DECLARATION): First try no declaration, : then '#include ', before trying the explicit declarations. + Suggested by Alexandre Oliva. (

Re: More exit() troubles - the answer

2001-01-22 Thread Lars J. Aas
On Mon, Jan 22, 2001 at 11:08:59AM +0100, Akim Demaille wrote: : > "Alexandre" == Alexandre Oliva <[EMAIL PROTECTED]> 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 tr

Re: More exit() troubles - the answer

2001-01-22 Thread Akim Demaille
> "Alexandre" == Alexandre Oliva <[EMAIL PROTECTED]> 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

Re: More exit() troubles - the answer

2001-01-19 Thread Alexandre Oliva
On Jan 19, 2001, "Lars J. Aas" <[EMAIL PROTECTED]> wrote: > There's "#pragma once" and an ifndef wrapper in it ASAIR, so that should > work fine. Using '' first in the list of ac_declaration's didn't trigger > though, probably for some other reason. It should work for C and older versions of g+

Re: More exit() troubles - the answer

2001-01-19 Thread Lars J. Aas
On Fri, Jan 19, 2001 at 06:56:36PM -0200, Alexandre Oliva wrote: : On Jan 19, 2001, "Lars J. Aas" <[EMAIL PROTECTED]> wrote: : : > On Fri, Jan 19, 2001 at 06:30:48PM -0200, Alexandre Oliva wrote: : > : I'd rather avoid this, if I could help it. Didn't `#include ' : > : work as an ac_declaration

Re: More exit() troubles - the answer

2001-01-19 Thread Alexandre Oliva
On Jan 19, 2001, "Lars J. Aas" <[EMAIL PROTECTED]> wrote: > On Fri, Jan 19, 2001 at 06:30:48PM -0200, Alexandre Oliva wrote: > : I'd rather avoid this, if I could help it. Didn't `#include ' > : work as an ac_declaration of exit? > Sure. And couldn't it be #included twice? Didn't it fix the

Re: More exit() troubles - the answer

2001-01-19 Thread Lars J. Aas
On Fri, Jan 19, 2001 at 06:30:48PM -0200, Alexandre Oliva wrote: : On Jan 19, 2001, "Lars J. Aas" <[EMAIL PROTECTED]> wrote: : : > * aclang.m4 (_AC_GROG_CXX_EXIT_DECLARATION): Take care of : > the _CRTIMP business with libc declarations with MS Visual C++. : : This is horrible :-( : : I

Re: More exit() troubles - the answer

2001-01-19 Thread Alexandre Oliva
On Jan 19, 2001, "Lars J. Aas" <[EMAIL PROTECTED]> wrote: > * aclang.m4 (_AC_GROG_CXX_EXIT_DECLARATION): Take care of > the _CRTIMP business with libc declarations with MS Visual C++. This is horrible :-( I'd rather avoid this, if I could help it. Didn't `#include ' work as an ac_

Re: More exit() troubles - the answer

2001-01-19 Thread Lars J. Aas
On Fri, Jan 19, 2001 at 07:35:04PM +0100, [EMAIL PROTECTED] wrote: : Thanks Lars, it's great! Here's a patch: 2000-01-19 Lars J. Aas <[EMAIL PROTECTED]> * aclang.m4 (_AC_GROG_CXX_EXIT_DECLARATION): Take care of the _CRTIMP business with libc declarations with MS Visual C++. I

Re: More exit() troubles - the answer

2001-01-19 Thread akim
Thanks Lars, it's great!

Re: More exit() troubles - the answer

2001-01-19 Thread Lars J. Aas
Upon closer inspection I found out that I was compiling with no special options, while the person having problems was using a linker option "/MDd". /MD is used to link against the msvcrt library, and /MDd to link against the debug version of that library. *rt is probably a DLL (run-time) and the

Re: More exit() troubles

2001-01-19 Thread Akim Demaille
> "Lars" == Lars J Aas <[EMAIL PROTECTED]> writes: Lars> If you doubled the number of delarations, prefixing half of them Lars> with __declspec(dllimport), the linkage setting might become Lars> correct, but I really don't see why there's a need for the Lars> declaration at all, or why people

Re: More exit() troubles

2001-01-19 Thread Lars J. Aas
On Thu, Jan 18, 2001 at 03:45:31PM +0100, Lars J. Aas wrote: : On Thu, Jan 18, 2001 at 03:13:02PM +0100, Akim Demaille wrote: : : Lars, does it work as expected? It works like a charm with g++: : : It didn't do any difference for me, but it wasn't me who had the problem. : I'm waiting for feedba

Re: More exit() troubles

2001-01-18 Thread Alexandre Oliva
On Jan 18, 2001, Akim Demaille <[EMAIL PROTECTED]> wrote: >> "Lars" == Lars J Aas <[EMAIL PROTECTED]> writes: Lars> I noticed that when I moved '' first, the first exit(42) test Lars> didn't include - is that right? > Yes, it does, but you didn't see it because it didn't fail. The test >

Re: More exit() troubles

2001-01-18 Thread Wan-Teh Chang
Akim Demaille wrote: > > Alexandre, help! > > > "Lars" == Lars J Aas <[EMAIL PROTECTED]> writes: > > Lars> I've attached a config.log that shows more problems with exit(). > Lars> The problem is that the Visual C++ compiler thinks exit is > Lars> declared to be exported from the library i

Re: More exit() troubles

2001-01-18 Thread Akim Demaille
> "Lars" == Lars J Aas <[EMAIL PROTECTED]> writes: Lars> I noticed that when I moved '' first, the first exit(42) test Lars> didn't include - is that right? Yes, it does, but you didn't see it because it didn't fail. The test goes in two steps: do _AC_COMPILE_IFELSE([AC_LANG_PROGRAM([

Re: More exit() troubles

2001-01-18 Thread Lars J. Aas
On Thu, Jan 18, 2001 at 03:13:02PM +0100, Akim Demaille wrote: : > "Alexandre" == Alexandre Oliva <[EMAIL PROTECTED]> writes: : : Alexandre> On Jan 18, 2001, "Lars J. Aas" <[EMAIL PROTECTED]> wrote: : >> I've attached a config.log that shows more problems with exit(). : : Alexandre> We shoul

Re: More exit() troubles

2001-01-18 Thread Akim Demaille
> "Alexandre" == Alexandre Oliva <[EMAIL PROTECTED]> writes: Alexandre> On Jan 18, 2001, "Lars J. Aas" <[EMAIL PROTECTED]> wrote: >> I've attached a config.log that shows more problems with exit(). Alexandre> We should probably move the '' case first. This will Alexandre> probably work with

Re: More exit() troubles

2001-01-18 Thread Alexandre Oliva
On Jan 18, 2001, "Lars J. Aas" <[EMAIL PROTECTED]> wrote: > I've attached a config.log that shows more problems with exit(). We should probably move the '' case first. This will probably work with VC++, and will be fine for most existing C++ compilers. -- Alexandre Oliva Enjoy Guarana', see

Re: More exit() troubles

2001-01-18 Thread Akim Demaille
Alexandre, help! > "Lars" == Lars J Aas <[EMAIL PROTECTED]> writes: Lars> I've attached a config.log that shows more problems with exit(). Lars> The problem is that the Visual C++ compiler thinks exit is Lars> declared to be exported from the library it is compiling, and Lars> not to be imp

More exit() troubles

2001-01-18 Thread Lars J. Aas
I've attached a config.log that shows more problems with exit(). The problem is that the Visual C++ compiler thinks exit is declared to be exported from the library it is compiling, and not to be imported from another system library. This causes only a warning while compiling objects (exit status