pkgsrc/devel/fortran-utils/patches/patch-ac
dholland 17225bf6e9 Fix build.
XXX: is there any reason the distfile shouldn't be updated from base HEAD?
2011-10-02 23:12:06 +00:00

110 lines
1.8 KiB
Text
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

$NetBSD: patch-ac,v 1.2 2011/10/02 23:12:06 dholland Exp $
- use <stdlib.h> instead of a custom malloc declaration
- avoid symbol conflict with gettext
- make copyright/rcsid strings external to avoid unused warnings
- use standard C
--- fpr/fpr.c.orig 1994-05-27 12:31:21.000000000 +0000
+++ fpr/fpr.c
@@ -35,15 +35,16 @@
*/
#ifndef lint
-static char copyright[] =
+char copyright[] =
"@(#) Copyright (c) 1989, 1993\n\
The Regents of the University of California. All rights reserved.\n";
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)fpr.c 8.1 (Berkeley) 6/6/93";
+char sccsid[] = "@(#)fpr.c 8.1 (Berkeley) 6/6/93";
#endif /* not lint */
+#include <stdlib.h>
#include <stdio.h>
#define BLANK ' '
@@ -80,13 +81,15 @@ COLUMN *line;
int maxpos;
int maxcol;
-extern char *malloc();
-extern char *calloc();
-extern char *realloc();
-
+void init(void);
+void my_gettext(void);
+void savech(int col);
+void flush(void);
+void nospace(void);
-main()
+int
+main(void)
{
register int ch;
register char ateof;
@@ -124,7 +127,7 @@ main()
while ( ! ateof)
{
- gettext();
+ my_gettext();
ch = getchar();
if (ch == EOF)
{
@@ -176,7 +179,8 @@ main()
-init()
+void
+init(void)
{
register COLUMN *cp;
register COLUMN *cend;
@@ -209,8 +213,8 @@ init()
}
-
-gettext()
+void
+my_gettext(void)
{
register int i;
register char ateol;
@@ -283,8 +287,8 @@ gettext()
-savech(col)
-int col;
+void
+savech(int col)
{
register char ch;
register int oldmax;
@@ -340,7 +344,8 @@ int col;
-flush()
+void
+flush(void)
{
register int i;
register int anchor;
@@ -403,7 +408,8 @@ flush()
-nospace()
+void
+nospace(void)
{
fputs("Storage limit exceeded.\n", stderr);
exit(1);