autoconf-patches
[Top][All Lists]
Advanced

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

[PATCH] Serious problem with Autoconf on RedHat 7


From: Morten Eriksen
Subject: [PATCH] Serious problem with Autoconf on RedHat 7
Date: 02 Oct 2000 19:27:43 +0200
User-agent: Gnus/5.070098 (Pterodactyl Gnus v0.98) Emacs/20.3

Hi,

I don't know if this mail got through without losing a few electrons
due to the recent mailinglist hickups, so I'm resending it. With a
patch this time, so it might be easier to get it applied.  :^}

2000-10-02 Morten Eriksen <address@hidden>

        * aclang.m4 (AC_LANG_SOURCE(C++)): don't define exit(), it'll
        mismatch with the native exit() definition on some platforms
        (happens at least with g++ 2.96 and glibc 2.1.92 on Red Hat Linux
        v7).


Regards,
Morten

Attachment: try_compile_cpp.diff
Description: Text document



--- Begin Message --- Subject: Serious problem with Autoconf on RedHat 7 Date: 29 Sep 2000 18:17:09 +0200 User-agent: Gnus/5.070098 (Pterodactyl Gnus v0.98) Emacs/20.3
Hi,

I just discovered a nasty problem with the latest CVS Autoconf on Red
Hat Linux v7 (default setup, i.e. with g++ 2.96). In short, the
AC_TRY_COMPILE in the configure.in script below will fail:

->8-->8--->8-->8--->8-->8--->8-->8--->8-->8--->8-->8--->8-->8--

AC_INIT(configure.in)
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([#include <stdlib.h>], [], , AC_MSG_ERROR(sorr-ee))
AC_OUTPUT()

->8-->8--->8-->8--->8-->8--->8-->8--->8-->8--->8-->8--->8-->8--

Here's the relevant part of config.log:

->8-->8--->8-->8--->8-->8--->8-->8--->8-->8--->8-->8--->8-->8--

[...]
configure:1141: g++ -c -g -O2  conftest.cpp >&5
In file included from configure:1135:
/usr/include/stdlib.h:578: declaration of `void exit (int) throw ()' 
throws different exceptions
configure:1132: than previous declaration `void exit (int)'
configure: failed program was:
#line 1130 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit (int);
#endif
#include <stdlib.h>
int
main ()
{

  ;
  return 0;
}

->8-->8--->8-->8--->8-->8--->8-->8--->8-->8--->8-->8--->8-->8--

Now, this is obviously due to the "extern" forward declaration of
exit() not matching the exit() defined by the stdlib.h of GCC 2.96
when run as a C++ compiler.

Why is the explicit exit() declaration there anyway? Removing it will
of course make the configure script run correctly.

Regards,
Morten


--- End Message ---

reply via email to

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