Hi there, The attached patch (mostly for discussion, not applying) cleans up three compiler warnings on Linux PPC. These are all related to implicitly declared functions. My solution may not be the best approach, but it works for me.
In particular, the posix_memalign() manpage states: Everybody agrees that posix_memalign() is declared in <stdlib.h>. In order to declare it, glibc needs _GNU_SOURCE defined, or _XOPEN_SOURCE defined to a value not less than 600. I'm also seeing some large integer truncation errors, but they're beyond my ability today. Warnings file attached. -- c
Index: include/parrot/parrot.h =================================================================== RCS file: /cvs/public/parrot/include/parrot/parrot.h,v retrieving revision 1.86 diff -u -u -r1.86 parrot.h --- include/parrot/parrot.h 14 Mar 2004 18:11:20 -0000 1.86 +++ include/parrot/parrot.h 15 Mar 2004 02:51:12 -0000 @@ -29,6 +29,7 @@ #include "parrot/config.h" /* ANSI C89 headers */ +#define _XOPEN_SOURCE 600 #include <stdlib.h> #include <stdio.h> #include <errno.h> Index: jit/ppc/jit_emit.h =================================================================== RCS file: /cvs/public/parrot/jit/ppc/jit_emit.h,v retrieving revision 1.35 diff -u -u -r1.35 jit_emit.h --- jit/ppc/jit_emit.h 21 Feb 2004 10:58:58 -0000 1.35 +++ jit/ppc/jit_emit.h 15 Mar 2004 02:51:12 -0000 @@ -833,12 +833,10 @@ r22, r23, r24, r25, r26, r27, r28, r29, r30, r31, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10 }; -#ifdef __IBMC__ - void ppc_flush_line(char *_sync); void ppc_sync(void); -#else +#ifndef __IBMC__ void ppc_flush_line(char *_sync)
In file included from src/jit_cpu.c:46: include/parrot/jit_emit.h: In function `Parrot_jit_begin': include/parrot/jit_emit.h:639: warning: large integer implicitly truncated to unsigned type include/parrot/jit_emit.h: In function `Parrot_jit_normal_op': include/parrot/jit_emit.h:668: warning: large integer implicitly truncated to unsigned type include/parrot/jit_emit.h: In function `Parrot_jit_cpcf_op': include/parrot/jit_emit.h:683: warning: large integer implicitly truncated to unsigned type include/parrot/jit_emit.h: In function `Parrot_jit_restart_op': include/parrot/jit_emit.h:716: warning: large integer implicitly truncated to unsigned type src/jit_cpu.c: In function `Parrot_end_jit': src/jit_cpu.c:63: warning: large integer implicitly truncated to unsigned type src/jit_cpu.c: In function `Parrot_branch_i_jit': src/jit_cpu.c:78: warning: large integer implicitly truncated to unsigned type In file included from src/exec.c:27: include/parrot/exec_dep.h: In function `Parrot_exec_cpcf_op': include/parrot/exec_dep.h:51: warning: large integer implicitly truncated to unsigned type src/exec_cpu.c: In function `Parrot_end_exec': src/exec_cpu.c:64: warning: large integer implicitly truncated to unsigned type src/exec_cpu.c: In function `Parrot_branch_i_exec': src/exec_cpu.c:79: warning: large integer implicitly truncated to unsigned type