Package: regina
Version: 3.3-2
Severity: normal
Tags: patch
When building 'regina' on ppc64/unstable, I get the following error:
./gci/gci_call.c:53: warning: type defaults to 'int' in declaration of
'GCI_STACK_ELEMENT'
./gci/gci_call.c:53: error: syntax error before '*' token
./gci/gci_call.c: In function 'doCall':
./gci/gci_call.c:62: error: 'info' undeclared (first use in this function)
./gci/gci_call.c:62: error: (Each undeclared identifier is reported only once
./gci/gci_call.c:62: error: for each function it appears in.)
./gci/gci_call.c:64: warning: implicit declaration of function 'func'
./gci/gci_call.c:64: warning: implicit declaration of function 'GCI_PASSARGS'
./gci/gci_call.c:64: error: 'buf' undeclared (first use in this function)
./gci/gci_call.c:143: error: 'func' undeclared (first use in this function)
./gci/gci_call.c: In function 'addCallList':
./gci/gci_call.c:173: error: 'GCI_STACK_ELEMENT' undeclared (first use in this
function)
./gci/gci_call.c: In function 'GCI_call':
./gci/gci_call.c:238: error: 'GCI_STACK_ELEMENT' undeclared (first use in this
function)
./gci/gci_call.c:238: error: syntax error before 'buf'
./gci/gci_call.c:239: error: 'buf' undeclared (first use in this function)
./gci/gci_call.c:278: error: 'GCI_ARGS' undeclared (first use in this function)
make[1]: *** [gci_call.sho] Error 1
make[1]: Leaving directory `/regina-3.3'
make: *** [stamp-build] Error 2
With the attached patch 'regina' can be compiled on ppc64.
Regards
Andreas Jochens
diff -urN ../tmp-orig/regina-3.3/configure ./configure
--- ../tmp-orig/regina-3.3/configure 2006-04-06 11:43:30.000000000 +0000
+++ ./configure 2006-04-06 10:26:31.000000000 +0000
@@ -996,6 +996,9 @@
*86_64-*linux*)
GCI_CONVERT_HEADER="gci_convert.linux.86_64"
;;
+ powerpc64-*linux*)
+ GCI_CONVERT_HEADER="gci_convert.linux.powerpc64"
+ ;;
alpha*-*linux*)
GCI_CONVERT_HEADER="gci_convert.linux.alpha"
;;
diff -urN ../tmp-orig/regina-3.3/configure.in ./configure.in
--- ../tmp-orig/regina-3.3/configure.in 2004-01-25 08:56:17.000000000 +0000
+++ ./configure.in 2006-04-06 10:24:51.000000000 +0000
@@ -43,6 +43,9 @@
*86_64-*linux*)
GCI_CONVERT_HEADER="gci_convert.linux.86_64"
;;
+ powerpc64-*linux*)
+ GCI_CONVERT_HEADER="gci_convert.linux.powerpc64"
+ ;;
alpha*-*linux*)
GCI_CONVERT_HEADER="gci_convert.linux.alpha"
;;
diff -urN ../tmp-orig/regina-3.3/gci/gci_convert.linux.powerpc64
./gci/gci_convert.linux.powerpc64
--- ../tmp-orig/regina-3.3/gci/gci_convert.linux.powerpc64 1970-01-01
00:00:00.000000000 +0000
+++ ./gci/gci_convert.linux.powerpc64 2006-04-06 10:26:10.000000000 +0000
@@ -0,0 +1,110 @@
+/*
+ * Generic Call Interface for Rexx
+ * Copyright © 2003-2004, Florian Große-Coosmann
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * ----------------------------------------------------------------------------
+ *
+ * This file configures the number converting system. Have a look at
+ * gci_convert.c for the requirements. This file must include gci.h.
+ */
+
+#define _GNU_SOURCE
+#include <limits.h>
+#include <float.h>
+#include "gci.h"
+
+#define GCI_Ir strtol
+#define GCI_Iw(s,v) sprintf( s, "%ld", v )
+#define GCI_I_1 signed char
+#define GCI_I_1m SCHAR_MIN
+#define GCI_I_1M SCHAR_MAX
+#define GCI_I_2 signed short
+#define GCI_I_2m SHRT_MIN
+#define GCI_I_2M SHRT_MAX
+#define GCI_I_4 signed int
+#define GCI_I_4m INT_MIN
+#define GCI_I_4M INT_MAX
+#define GCI_I_8 signed long
+#define GCI_I_8m LONG_MIN
+#define GCI_I_8M LONG_MAX
+
+#define GCI_Ur strtoul
+#define GCI_Uw(s,v) sprintf( s, "%lu", v )
+#define GCI_U_1 unsigned char
+#define GCI_U_1M UCHAR_MAX
+#define GCI_U_2 unsigned short
+#define GCI_U_2M USHRT_MAX
+#define GCI_U_4 unsigned
+#define GCI_U_4M UINT_MAX
+#define GCI_U_8 unsigned long
+#define GCI_U_8M ULONG_MAX
+
+#if 0
+
+ AMD's Opteron uses argument passing on the floating point unit
+ which isn't supported by GCI!
+
+#define GCI_Fr strtold
+#define GCI_Fw(s,v) sprintf( s, "%.*LE", LDBL_MANT_DIG/3, v )
+#define GCI_F_4 float
+#define GCI_F_4m (-FLT_MAX)
+#define GCI_F_4M FLT_MAX
+#define GCI_F_8 double
+#define GCI_F_8m (-DBL_MAX)
+#define GCI_F_8M DBL_MAX
+#define GCI_F_16 long double
+#define GCI_F_16m (-LDBL_MAX)
+#define GCI_F_16M LDBL_MAX
+#endif /* if 0 */
+
+/*
+ ******************************************************************************
+ */
+
+/*
+ * GCI_STACK_ELEMENT sets integral type of a stack element. This is typically
+ * an unsigned or int.
+ */
+#define GCI_STACK_ELEMENT unsigned long
+
+/*
+ * GCI_LITTLE_ENDIAN must be set to 1 or 0 depending on whether little endian
+ * or big endian is the machine's representation.
+ * In doubt, select 1 for Intel compatibles and 0 for others.
+ */
+#define GCI_LITTLE_ENDIAN 0
+
+/*
+ * GCI_ARGS shall be the maximum number of GCI_STACK_ELEMENTs which shall
+ * be passed on the stack. This is usually the base type of maximum width
+ * (e.g. long long or long double) / sizeof(unsigned) * GCI_REXX_ARGS.
+ * But you can't use sizeof(), therefore you have to compute it by hand.
+ * 4 * GCI_REXX_ARGS is an upper maximum for all useful systems I can imagine.
+ */
+#define GCI_ARGS 50 /* 25 full sized arguments */
+
+/*
+ * GCI_PASSARGS is a macro which enumerates GCI_ARGS args of an array which
+ * is passed to the macro. I don't know a good ANSI macro for this purpose.
+ * Feel free to provide it!
+ */
+#define GCI_PASSARGS(a) a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],\
+ a[10],a[11],a[12],a[13],a[14],a[15],a[16],a[17],a[18],\
+ a[19],a[20],a[21],a[22],a[23],a[24],a[25],a[26],a[27],\
+ a[28],a[29],a[30],a[31],a[32],a[33],a[34],a[35],a[36],\
+ a[37],a[38],a[39],a[40],a[41],a[42],a[43],a[44],a[45],\
+ a[46],a[47],a[48],a[49]
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]