From 078dac26a9deb57b258fc566341744f8bec23c74 Mon Sep 17 00:00:00 2001 From: peter Date: Sun, 7 Apr 2002 01:44:24 +0000 Subject: Bandaid for LP64 machines where 'warning: cast to pointer from different sized integer' bites. The various malloc functions return pointers, but without any prototype/declarations visible to callers, the compiler expects them to return int. --- gnu/usr.bin/tar/port.h | 5 +++++ gnu/usr.bin/tar/prepend_args.c | 1 + 2 files changed, 6 insertions(+) (limited to 'gnu/usr.bin') diff --git a/gnu/usr.bin/tar/port.h b/gnu/usr.bin/tar/port.h index 4e65a9a..6999eb4 100644 --- a/gnu/usr.bin/tar/port.h +++ b/gnu/usr.bin/tar/port.h @@ -17,6 +17,8 @@ You should have received a copy of the GNU General Public License along with GNU Tar; see the file COPYING. If not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ +/* $FreeBSD$ */ + /* AIX requires this to be the first thing in the file. */ #ifdef __GNUC__ #define alloca __builtin_alloca @@ -119,6 +121,9 @@ typedef long off_t; char *malloc (), *realloc (); char *getenv (); #endif +PTR ck_malloc (); +PTR ck_realloc (); +char *xmalloc (); #ifndef _POSIX_VERSION #ifdef __MSDOS__ diff --git a/gnu/usr.bin/tar/prepend_args.c b/gnu/usr.bin/tar/prepend_args.c index a4991f2..211cfab 100644 --- a/gnu/usr.bin/tar/prepend_args.c +++ b/gnu/usr.bin/tar/prepend_args.c @@ -24,6 +24,7 @@ #endif #include #include "prepend_args.h" +#include "port.h" /* Find the white-space-separated options specified by OPTIONS, and -- cgit v1.1