diff options
author | rh <rh@pkgsrc.org> | 2002-08-10 23:22:02 +0000 |
---|---|---|
committer | rh <rh@pkgsrc.org> | 2002-08-10 23:22:02 +0000 |
commit | cceb2be7a93028d77c09165f5724e99c9aef29a8 (patch) | |
tree | 0ebc0bc927472b701f5c3adc646a9cd0bcbc924e /devel/gtexinfo/patches | |
parent | 8e65f3b9770bcdb950b700f3479473a7b6b46e15 (diff) | |
download | pkgsrc-cceb2be7a93028d77c09165f5724e99c9aef29a8.tar.gz |
Make sure proper prototypes are used for xmalloc() and the like so the
package actually works on PPC and other architectures where this matters.
Bump PKGREVISION.
This closes PR pkg/17377 by Andrew Cagney <cagney@mac.com>
Diffstat (limited to 'devel/gtexinfo/patches')
-rw-r--r-- | devel/gtexinfo/patches/patch-ah | 19 | ||||
-rw-r--r-- | devel/gtexinfo/patches/patch-ai | 48 |
2 files changed, 67 insertions, 0 deletions
diff --git a/devel/gtexinfo/patches/patch-ah b/devel/gtexinfo/patches/patch-ah new file mode 100644 index 00000000000..53d3639cdeb --- /dev/null +++ b/devel/gtexinfo/patches/patch-ah @@ -0,0 +1,19 @@ +$NetBSD: patch-ah,v 1.1 2002/08/10 23:22:02 rh Exp $ + +--- lib/system.h.orig Sun Jul 18 07:11:34 1999 ++++ lib/system.h +@@ -192,10 +192,10 @@ + struct passwd *getpwnam (); + + /* Our library routines not included in any system library. */ +-extern void *xmalloc (), *xrealloc (); +-extern char *xstrdup (); +-extern void xexit (); +-extern char *substring (); ++extern void *xmalloc (unsigned), *xrealloc (void *, unsigned); ++extern char *xstrdup (char *); ++extern void xexit (int); ++extern char *substring (char *, char *); + + /* For convenience. */ + #define STREQ(s1,s2) (strcmp (s1, s2) == 0) diff --git a/devel/gtexinfo/patches/patch-ai b/devel/gtexinfo/patches/patch-ai new file mode 100644 index 00000000000..54c226a7c58 --- /dev/null +++ b/devel/gtexinfo/patches/patch-ai @@ -0,0 +1,48 @@ +$NetBSD: patch-ai,v 1.1 2002/08/10 23:22:02 rh Exp $ + +--- lib/xmalloc.c.orig Tue Jun 20 06:06:31 1995 ++++ lib/xmalloc.c +@@ -27,10 +27,11 @@ + + #if !defined (ALREADY_HAVE_XMALLOC) + #include <stdio.h> ++#include <stdlib.h> + #include <sys/types.h> + + extern void *malloc (), *realloc (); +-static void memory_error_and_abort (); ++static void memory_error_and_abort (const char *); + + /* **************************************************************** */ + /* */ +@@ -42,8 +43,7 @@ + to hold BYTES number of bytes. If the memory cannot be allocated, + print an error message and abort. */ + void * +-xmalloc (bytes) +- int bytes; ++xmalloc (unsigned bytes) + { + void *temp = malloc (bytes); + +@@ -53,9 +53,7 @@ + } + + void * +-xrealloc (pointer, bytes) +- void *pointer; +- int bytes; ++xrealloc (void *pointer, unsigned bytes) + { + void *temp; + +@@ -71,8 +69,7 @@ + } + + static void +-memory_error_and_abort (fname) +- char *fname; ++memory_error_and_abort (const char *fname) + { + fprintf (stderr, "%s: Out of virtual memory!\n", fname); + abort (); |