Fix build. XXX: is there any reason the distfile shouldn't be updated from base HEAD?diff -r1.6 -r1.7 pkgsrc/devel/fortran-utils/distinfo
(dholland)
@@ -1,7 +1,7 @@ | @@ -1,7 +1,7 @@ | |||
1 | $NetBSD: distinfo,v 1.6 2011/09/25 19:44:08 joerg Exp $ | 1 | $NetBSD: distinfo,v 1.7 2011/10/02 23:12:06 dholland Exp $ | |
2 | 2 | |||
3 | SHA1 (fortran-utils-1.1.tar.gz) = 587f55857876b9447326faa1074d6d8b6b1a058e | 3 | SHA1 (fortran-utils-1.1.tar.gz) = 587f55857876b9447326faa1074d6d8b6b1a058e | |
4 | RMD160 (fortran-utils-1.1.tar.gz) = e286108ce7eb0a8062b6f624bea28c71be759109 | 4 | RMD160 (fortran-utils-1.1.tar.gz) = e286108ce7eb0a8062b6f624bea28c71be759109 | |
5 | Size (fortran-utils-1.1.tar.gz) = 7566 bytes | 5 | Size (fortran-utils-1.1.tar.gz) = 7566 bytes | |
6 | SHA1 (patch-ac) = 43f7683cb7d4a2b06db447a3f28c34c57c2252a7 | 6 | SHA1 (patch-ac) = 398da92ea8343835b3d2b6bf31d2966af059c443 | |
7 | SHA1 (patch-fsplit-fsplit.c) = 78dddf494e55cdf493677215a33c063973df0b85 | 7 | SHA1 (patch-fsplit-fsplit.c) = 61a4de606737cc005d1c36cbed305c5044afcdba |
@@ -1,44 +1,110 @@ | @@ -1,44 +1,110 @@ | |||
1 | $NetBSD: patch-ac,v 1.1 2006/01/15 18:28:32 joerg Exp $ | 1 | $NetBSD: patch-ac,v 1.2 2011/10/02 23:12:06 dholland Exp $ | |
2 | ||||
3 | - use <stdlib.h> instead of a custom malloc declaration | |||
4 | - avoid symbol conflict with gettext | |||
5 | - make copyright/rcsid strings external to avoid unused warnings | |||
6 | - use standard C | |||
2 | 7 | |||
3 | --- fpr/fpr.c.orig 1994-05-27 12:31:21.000000000 +0000 | 8 | --- fpr/fpr.c.orig 1994-05-27 12:31:21.000000000 +0000 | |
4 | +++ fpr/fpr.c | 9 | +++ fpr/fpr.c | |
5 | @@ -44,6 +44,7 @@ static char copyright[] = | 10 | @@ -35,15 +35,16 @@ | |
6 | static char sccsid[] = "@(#)fpr.c 8.1 (Berkeley) 6/6/93"; | 11 | */ | |
12 | ||||
13 | #ifndef lint | |||
14 | -static char copyright[] = | |||
15 | +char copyright[] = | |||
16 | "@(#) Copyright (c) 1989, 1993\n\ | |||
17 | The Regents of the University of California. All rights reserved.\n"; | |||
18 | #endif /* not lint */ | |||
19 | ||||
20 | #ifndef lint | |||
21 | -static char sccsid[] = "@(#)fpr.c 8.1 (Berkeley) 6/6/93"; | |||
22 | +char sccsid[] = "@(#)fpr.c 8.1 (Berkeley) 6/6/93"; | |||
7 | #endif /* not lint */ | 23 | #endif /* not lint */ | |
8 | 24 | |||
9 | +#include <stdlib.h> | 25 | +#include <stdlib.h> | |
10 | #include <stdio.h> | 26 | #include <stdio.h> | |
11 | 27 | |||
12 | #define BLANK ' ' | 28 | #define BLANK ' ' | |
13 | @@ -80,10 +81,7 @@ COLUMN *line; | 29 | @@ -80,13 +81,15 @@ COLUMN *line; | |
14 | int maxpos; | 30 | int maxpos; | |
15 | int maxcol; | 31 | int maxcol; | |
16 | 32 | |||
17 | -extern char *malloc(); | 33 | -extern char *malloc(); | |
18 | -extern char *calloc(); | 34 | -extern char *calloc(); | |
19 | -extern char *realloc(); | 35 | -extern char *realloc(); | |
20 | - | 36 | - | |
37 | +void init(void); | |||
21 | +void my_gettext(void); | 38 | +void my_gettext(void); | |
39 | +void savech(int col); | |||
40 | +void flush(void); | |||
41 | +void nospace(void); | |||
22 | 42 | |||
23 | 43 | |||
24 | main() | 44 | -main() | |
25 | @@ -124,7 +122,7 @@ main() | 45 | +int | |
46 | +main(void) | |||
47 | { | |||
48 | register int ch; | |||
49 | register char ateof; | |||
50 | @@ -124,7 +127,7 @@ main() | |||
26 | 51 | |||
27 | while ( ! ateof) | 52 | while ( ! ateof) | |
28 | { | 53 | { | |
29 | - gettext(); | 54 | - gettext(); | |
30 | + my_gettext(); | 55 | + my_gettext(); | |
31 | ch = getchar(); | 56 | ch = getchar(); | |
32 | if (ch == EOF) | 57 | if (ch == EOF) | |
33 | { | 58 | { | |
34 | @@ -209,8 +207,8 @@ init() | 59 | @@ -176,7 +179,8 @@ main() | |
60 | ||||
61 | ||||
62 | ||||
63 | -init() | |||
64 | +void | |||
65 | +init(void) | |||
66 | { | |||
67 | register COLUMN *cp; | |||
68 | register COLUMN *cend; | |||
69 | @@ -209,8 +213,8 @@ init() | |||
35 | } | 70 | } | |
36 | 71 | |||
37 | 72 | |||
38 | - | 73 | - | |
39 | -gettext() | 74 | -gettext() | |
40 | +void | 75 | +void | |
41 | +my_gettext(void) | 76 | +my_gettext(void) | |
42 | { | 77 | { | |
43 | register int i; | 78 | register int i; | |
44 | register char ateol; | 79 | register char ateol; | |
80 | @@ -283,8 +287,8 @@ gettext() | |||
81 | ||||
82 | ||||
83 | ||||
84 | -savech(col) | |||
85 | -int col; | |||
86 | +void | |||
87 | +savech(int col) | |||
88 | { | |||
89 | register char ch; | |||
90 | register int oldmax; | |||
91 | @@ -340,7 +344,8 @@ int col; | |||
92 | ||||
93 | ||||
94 | ||||
95 | -flush() | |||
96 | +void | |||
97 | +flush(void) | |||
98 | { | |||
99 | register int i; | |||
100 | register int anchor; | |||
101 | @@ -403,7 +408,8 @@ flush() | |||
102 | ||||
103 | ||||
104 | ||||
105 | -nospace() | |||
106 | +void | |||
107 | +nospace(void) | |||
108 | { | |||
109 | fputs("Storage limit exceeded.\n", stderr); | |||
110 | exit(1); |
@@ -1,31 +1,82 @@ | @@ -1,31 +1,82 @@ | |||
1 | $NetBSD: patch-fsplit-fsplit.c,v 1.1 2011/09/25 19:44:08 joerg Exp $ | 1 | $NetBSD: patch-fsplit-fsplit.c,v 1.2 2011/10/02 23:12:06 dholland Exp $ | |
2 | 2 | |||
3 | --- fsplit/fsplit.c.orig 2011-09-25 09:50:22.000000000 +0000 | 3 | - avoid conflict with posix getline | |
4 | - add const for clean build | |||
5 | - use <ctype.h> functions correctly | |||
6 | - use standard C | |||
7 | ||||
8 | --- fsplit/fsplit.c.orig 2000-01-30 21:03:32.000000000 +0000 | |||
4 | +++ fsplit/fsplit.c | 9 | +++ fsplit/fsplit.c | |
5 | @@ -97,7 +97,7 @@ struct stat sbuf; | 10 | @@ -97,28 +97,25 @@ struct stat sbuf; | |
6 | 11 | |||
7 | #define trim(p) while (*p == ' ' || *p == '\t') p++ | 12 | #define trim(p) while (*p == ' ' || *p == '\t') p++ | |
8 | 13 | |||
9 | -int getline __P((void)); | 14 | -int getline __P((void)); | |
10 | +int my_getline __P((void)); | 15 | +int my_getline __P((void)); | |
11 | void get_name __P((char *, int)); | 16 | void get_name __P((char *, int)); | |
12 | char *functs __P((char *)); | 17 | char *functs __P((char *)); | |
13 | int lend __P((void)); | 18 | int lend __P((void)); | |
14 | @@ -171,7 +171,7 @@ char **argv; | 19 | int lname __P((char *, int)); | |
20 | -char *look __P((char *, char *)); | |||
21 | +char *look __P((char *, const char *)); | |||
22 | int saveit __P((char *)); | |||
23 | int scan_name __P((char *, char *, int)); | |||
24 | char *skiplab __P((char *)); | |||
25 | static void usage __P((void)); | |||
26 | ||||
27 | int | |||
28 | -main(argc, argv) | |||
29 | -int argc; | |||
30 | -char **argv; | |||
31 | +main(int argc, char **argv) | |||
32 | { | |||
33 | extern int optind; | |||
34 | extern char *optarg; | |||
35 | ||||
36 | register FILE *ofp; /* output file */ | |||
37 | register int rv; /* 1 if got card in output file, 0 otherwise */ | |||
38 | - register char *ptr; | |||
39 | int nflag, /* 1 if got name of subprog., 0 otherwise */ | |||
40 | retval, | |||
41 | i; | |||
42 | @@ -171,7 +168,7 @@ char **argv; | |||
15 | errx(1, "can not open %s", x); | 43 | errx(1, "can not open %s", x); | |
16 | nflag = 0; | 44 | nflag = 0; | |
17 | rv = 0; | 45 | rv = 0; | |
18 | - while (getline() > 0) { | 46 | - while (getline() > 0) { | |
19 | + while (my_getline() > 0) { | 47 | + while (my_getline() > 0) { | |
20 | rv = 1; | 48 | rv = 1; | |
21 | fprintf(ofp, "%s", buf); | 49 | fprintf(ofp, "%s", buf); | |
22 | if (lend()) /* look for an 'end' statement */ | 50 | if (lend()) /* look for an 'end' statement */ | |
23 | @@ -263,7 +263,7 @@ int letters; | 51 | @@ -263,7 +260,7 @@ int letters; | |
24 | } | 52 | } | |
25 | 53 | |||
26 | int | 54 | int | |
27 | -getline() | 55 | -getline() | |
28 | +my_getline() | 56 | +my_getline() | |
29 | { | 57 | { | |
30 | register char *ptr; | 58 | register char *ptr; | |
31 | 59 | |||
60 | @@ -332,7 +329,7 @@ int len; | |||
61 | /* copy to buffer and converting to lower case */ | |||
62 | p = ptr; | |||
63 | while (*p && p <= &buf[71] ) { | |||
64 | - *iptr = isupper(*p) ? tolower(*p) : *p; | |||
65 | + *iptr = isupper((unsigned char)*p) ? tolower((unsigned char)*p) : *p; | |||
66 | iptr++; | |||
67 | p++; | |||
68 | } | |||
69 | @@ -437,9 +434,11 @@ char *p; | |||
70 | /* return 0 if m doesn't match initial part of s; | |||
71 | otherwise return ptr to next char after m in s */ | |||
72 | char *look(s, m) | |||
73 | -char *s, *m; | |||
74 | +char *s; | |||
75 | +const char *m; | |||
76 | { | |||
77 | - register char *sp, *mp; | |||
78 | + register char *sp; | |||
79 | + register const char *mp; | |||
80 | ||||
81 | sp = s; mp = m; | |||
82 | while (*mp) { |