[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: 1.1.2pre3 gcc-2.5.1 configure broken!
From:       Alexander Feigl <Alexander.Feigl () gmx ! de>
Date:       1999-08-26 7:03:51
[Download RAW message or body]

Am Don, 26 Aug 1999 schrieb nbecker@fred.net:
> In kdelibs-1.1.2pre3 the configure test for inline is broken with
> gcc-2.5.1!
> configure:2629: ANSI C++ forbids declaration `foo' with no type
> configure: failed program was:
> #line 2626 "configure"
> #include "confdefs.h"
> 
> int main() {
> } __inline__ foo() {
> ; return 0; }
> configure:2633: g++ -c -O2 -Wall  conftest.C 1>&5
> configure:2629: ANSI C++ forbids declaration `foo' with no type

I really thought somebody found a way to avoid this. I fixes my autoconf
package to make a workaround. It is a autoconf bug anyway.

Try this patch for autoconf if you like. It fixes some tests I recognized to be
broken. You'll have to run autoconf again to fix configure.

Alexander

["autoconf-gcc2.95.diff" (text/x-c)]

diff -Nur autoconf-2.13/acspecific.m4 autoconf-2.13-new/acspecific.m4
--- autoconf-2.13/acspecific.m4	Tue Jan  5 14:27:52 1999
+++ autoconf-2.13-new/acspecific.m4	Thu Aug 26 09:09:02 1999
@@ -1098,7 +1098,7 @@
 	/*
 	 * First, make a file with some known garbage in it.
 	 */
-	data = malloc(pagesize);
+	data = (char *) malloc(pagesize);
 	if (!data)
 		exit(1);
 	for (i = 0; i < pagesize; ++i)
@@ -1119,7 +1119,7 @@
 	fd = open("conftestmmap", O_RDWR);
 	if (fd < 0)
 		exit(1);
-	data2 = malloc(2 * pagesize);
+	data2 = (char *) malloc(2 * pagesize);
 	if (!data2)
 		exit(1);
 	data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
@@ -1137,7 +1137,7 @@
 	 */
 	for (i = 0; i < pagesize; ++i)
 		*(data2 + i) = *(data2 + i) + 1;
-	data3 = malloc(pagesize);
+	data3 = (char *) malloc(pagesize);
 	if (!data3)
 		exit(1);
 	if (read(fd, data3, pagesize) != pagesize)
@@ -1394,7 +1394,7 @@
 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
 # for constant arguments.  Useless!
 AC_CACHE_CHECK([for working alloca.h], ac_cv_header_alloca_h,
-[AC_TRY_LINK([#include <alloca.h>], [char *p = alloca(2 * sizeof(int));],
+[AC_TRY_LINK([#include <alloca.h>], [char *p = (char *) alloca(2 * sizeof(int));],
   ac_cv_header_alloca_h=yes, ac_cv_header_alloca_h=no)])
 if test $ac_cv_header_alloca_h = yes; then
   AC_DEFINE(HAVE_ALLOCA_H)
@@ -1885,7 +1885,7 @@
 [AC_CACHE_CHECK([for inline], ac_cv_c_inline,
 [ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
-  AC_TRY_COMPILE(, [} $ac_kw foo() {], [ac_cv_c_inline=$ac_kw; break])
+  AC_TRY_COMPILE(, [} $ac_kw int foo() {], [ac_cv_c_inline=$ac_kw; break])
 done
 ])
 case "$ac_cv_c_inline" in


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic