On 06/30/11 02:14, Daniel Diaz wrote:
> Hello,
> 
> gprolog 1.4.0 has just been released (see www.gprolog.org 
> <http://www.gprolog.org>).
> 

Thanks for the new gprolog release!

On non-x86/amd64 archs gprolog-1.4.0 can fail to compile:

make[1]: Entering directory
`/var/tmp/portage/dev-lang/gprolog-1.4.0/work/gprolog-1.4.0/src/Ma2Asm'
<snip>
gcc  -march=G4 -O2 -pipe -fno-strict-aliasing -c ma2asm_inst.c
In file included from ma2asm_inst.c:83:
powerpc_any.c:503: error: conflicting types for 'Call_C_Arg_Int'
ma_protos.h:169: note: previous declaration of 'Call_C_Arg_Int' was here
powerpc_any.c:838: error: conflicting types for 'Cmp_Ret_And_Int'
ma_protos.h:205: note: previous declaration of 'Cmp_Ret_And_Int' was here
powerpc_any.c:961: error: conflicting types for 'Dico_Long'
ma_protos.h:221: note: previous declaration of 'Dico_Long' was here
make[1]: *** [ma2asm_inst.o] Error 1

Patch attached.


Thanks

Keri
diff -ur gprolog-1.4.0.orig/src/Ma2Asm/alpha_any.c 
gprolog-1.4.0/src/Ma2Asm/alpha_any.c
--- gprolog-1.4.0.orig/src/Ma2Asm/alpha_any.c   2011-03-29 05:20:05.000000000 
+1300
+++ gprolog-1.4.0/src/Ma2Asm/alpha_any.c        2011-07-05 19:38:52.000000000 
+1200
@@ -870,7 +870,7 @@
  *                                                                         *
  *-------------------------------------------------------------------------*/
 int
-Call_C_Arg_Int(int offset, long int_val)
+Call_C_Arg_Int(int offset, PlLong int_val)
 {
   switch (offset)
     {
@@ -1433,7 +1433,7 @@
  *                                                                         *
  *-------------------------------------------------------------------------*/
 void
-Cmp_Ret_And_Int(long int_val)
+Cmp_Ret_And_Int(PlLong int_val)
 {
   Inst_Printf("lda", "$1,%ld", int_val);
   Inst_Printf("subq", "$0,$1,$1");
@@ -1551,7 +1551,7 @@
  *                                                                         *
  *-------------------------------------------------------------------------*/
 void
-Dico_Long(char *name, int global, VType vtype, long value)
+Dico_Long(char *name, int global, VType vtype, PlLong value)
 {
   switch (vtype)
     {
diff -ur gprolog-1.4.0.orig/src/Ma2Asm/mips_irix.c 
gprolog-1.4.0/src/Ma2Asm/mips_irix.c
--- gprolog-1.4.0.orig/src/Ma2Asm/mips_irix.c   2011-03-29 05:20:05.000000000 
+1300
+++ gprolog-1.4.0/src/Ma2Asm/mips_irix.c        2011-07-05 19:39:30.000000000 
+1200
@@ -510,7 +510,7 @@
  *                                                                         *
  *-------------------------------------------------------------------------*/
 int
-Call_C_Arg_Int(int offset, long int_val)
+Call_C_Arg_Int(int offset, PlLong int_val)
 {
   switch (offset)
     {
@@ -1125,7 +1125,7 @@
  *                                                                         *
  *-------------------------------------------------------------------------*/
 void
-Cmp_Ret_And_Int(long int_val)
+Cmp_Ret_And_Int(PlLong int_val)
 {
   Inst_Printf("li", "$24,%d", int_val);
   Inst_Printf("sub", "$12,$2,$24");    /* $2 - $24 -> $12 */
@@ -1238,7 +1238,7 @@
  *                                                                         *
  *-------------------------------------------------------------------------*/
 void
-Dico_Long(char *name, int global, VType vtype, long value)
+Dico_Long(char *name, int global, VType vtype, PlLong value)
 {
   switch (vtype)
     {
diff -ur gprolog-1.4.0.orig/src/Ma2Asm/powerpc_any.c 
gprolog-1.4.0/src/Ma2Asm/powerpc_any.c
--- gprolog-1.4.0.orig/src/Ma2Asm/powerpc_any.c 2011-03-29 05:20:05.000000000 
+1300
+++ gprolog-1.4.0/src/Ma2Asm/powerpc_any.c      2011-07-05 19:17:16.000000000 
+1200
@@ -500,7 +500,7 @@
  *                                                                         *
  *-------------------------------------------------------------------------*/
 int
-Call_C_Arg_Int(int offset, long int_val)
+Call_C_Arg_Int(int offset, PlLong int_val)
 {
   BEFORE_ARG;
 
@@ -835,7 +835,7 @@
  *                                                                         *
  *-------------------------------------------------------------------------*/
 void
-Cmp_Ret_And_Int(long int_val)
+Cmp_Ret_And_Int(PlLong int_val)
 {
   if (LITTLE_INT(int_val))
     Inst_Printf("cmpwi", CR(1) "," R(3) ",%ld", int_val);
@@ -958,7 +958,7 @@
  *                                                                         *
  *-------------------------------------------------------------------------*/
 void
-Dico_Long(char *name, int global, VType vtype, long value)
+Dico_Long(char *name, int global, VType vtype, PlLong value)
 {
   switch (vtype)
     {
diff -ur gprolog-1.4.0.orig/src/Ma2Asm/sparc_any.c 
gprolog-1.4.0/src/Ma2Asm/sparc_any.c
--- gprolog-1.4.0.orig/src/Ma2Asm/sparc_any.c   2011-03-29 05:20:05.000000000 
+1300
+++ gprolog-1.4.0/src/Ma2Asm/sparc_any.c        2011-07-05 19:18:29.000000000 
+1200
@@ -449,7 +449,7 @@
  *                                                                         *
  *-------------------------------------------------------------------------*/
 int
-Call_C_Arg_Int(int offset, long int_val)
+Call_C_Arg_Int(int offset, PlLong int_val)
 {
   BEFORE_ARG;
 
@@ -792,7 +792,7 @@
  *                                                                         *
  *-------------------------------------------------------------------------*/
 void
-Cmp_Ret_And_Int(long int_val)
+Cmp_Ret_And_Int(PlLong int_val)
 {
   if (LITTLE_INT(int_val))
     Inst_Printf("cmp", "%%o0,%ld", int_val);
@@ -912,7 +912,7 @@
  *                                                                         *
  *-------------------------------------------------------------------------*/
 void
-Dico_Long(char *name, int global, VType vtype, long value)
+Dico_Long(char *name, int global, VType vtype, PlLong value)
 {
 
   switch (vtype)
_______________________________________________
Users-prolog mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/users-prolog

Reply via email to