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.
This commit is contained in:
Peter Wemm 2002-04-07 01:44:24 +00:00
parent 63a4964eec
commit 856bef3c17
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=94011
2 changed files with 6 additions and 0 deletions

View file

@ -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__

View file

@ -24,6 +24,7 @@
#endif
#include <sys/param.h>
#include "prepend_args.h"
#include "port.h"
/* Find the white-space-separated options specified by OPTIONS, and