bug-gnats
[Top][All Lists]
Advanced

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

Fwd: GNATS on Mac OS X


From: Peter Gammie
Subject: Fwd: GNATS on Mac OS X
Date: Fri, 12 May 2006 10:38:16 +1000

Here's a problem on PPC OS X, 10.4.6, GCC 4.0.1.

Perhaps someone with some autoconf skills can fix this.

cheers
peter

Begin forwarded message:

From: Peter Gammie <peteg42@gmail.com>
Date: 12 May 2006 10:15:11 AM
To: Toby Peterson <toby@opendarwin.org>
Subject: Re: GNATS on Mac OS X

On 12/05/2006, at 10:02 AM, Toby Peterson wrote:

The error is caused by -Dconst=

OK. Here's the test from gnats/configure.in:

# Some Solaris C compilers have const problems without a special ANSI option
AC_CACHE_CHECK([for really working const],gnats_really_working_const,[
AC_TRY_COMPILE([],
               [const char *foo(const char *x) { return x; }
                int bar(const char *x) { return x == foo(x); }],
               [gnats_really_working_const=yes],
               [gnats_really_working_const=no])
if test "$gnats_really_working_const" = no; then
  CFLAGS="$CFLAGS -Dconst= "
fi])

and the result from gnats/config.log:

configure:3993: checking for really working const
configure:4016: gcc -c -I/sw/include -I/opt/local/include -I/usr/ X11R6/include -I/sw/include -I/opt/local/include -I/usr/X11R6/ include conftest.c >&5
conftest.c: In function 'main':
conftest.c:26: error: nested functions are not supported on MacOSX
conftest.c:27: error: nested functions are not supported on MacOSX
configure:4022: $? = 1
configure: failed program was:
| /* confdefs.h.  */
|
| #define PACKAGE_NAME "gnats"
| #define PACKAGE_TARNAME "gnats"
| #define PACKAGE_VERSION "4.1.0"
| #define PACKAGE_STRING "gnats 4.1.0"
| #define PACKAGE_BUGREPORT "bug-gnats@gnu.org"
| #define YYTEXT_POINTER 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_ALLOCA_H 1
| #define HAVE_ALLOCA 1
| /* end confdefs.h.  */
|
| int
| main ()
| {
| const char *foo(const char *x) { return x; }
|                 int bar(const char *x) { return x == foo(x); }
|   ;
|   return 0;
| }
configure:4049: result: no

Hmm... that seems completely spurious. It's unnecessary to nest the functions like that, surely. That problem is fixed by just nuking the test. Things look OK now.





reply via email to

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