Fix build problem on Minix and a couple other minor C issues I noticed while passing by. Closes PR 45048 from Thomas Cort.diff -r1.1.1.1 -r1.2 pkgsrc/games/sex/Makefile
(dholland)
@@ -1,16 +1,17 @@ | @@ -1,16 +1,17 @@ | |||
1 | # $NetBSD: Makefile,v 1.1.1.1 2008/10/26 09:51:52 bjs Exp $ | 1 | # $NetBSD: Makefile,v 1.2 2011/06/12 04:47:26 dholland Exp $ | |
2 | 2 | |||
3 | DISTNAME= sex-1.0 | 3 | DISTNAME= sex-1.0 | |
4 | PKGREVISION= 1 | |||
4 | CATEGORIES= games | 5 | CATEGORIES= games | |
5 | MASTER_SITES= http://spatula.net/software/sex/ | 6 | MASTER_SITES= http://spatula.net/software/sex/ | |
6 | 7 | |||
7 | MAINTAINER= jfranz@bsdprojects.net | 8 | MAINTAINER= jfranz@bsdprojects.net | |
8 | COMMENT= Yet another program for spouting silly, random phrases | 9 | COMMENT= Yet another program for spouting silly, random phrases | |
9 | 10 | |||
10 | PKG_DESTDIR_SUPPORT= user-destdir | 11 | PKG_DESTDIR_SUPPORT= user-destdir | |
11 | 12 | |||
12 | AUTO_MKDIRS= yes | 13 | AUTO_MKDIRS= yes | |
13 | USE_BSD_MAKEFILE= yes | 14 | USE_BSD_MAKEFILE= yes | |
14 | 15 | |||
15 | MAKE_ENV+= MKCATPAGES=no | 16 | MAKE_ENV+= MKCATPAGES=no | |
16 | 17 |
@@ -1,7 +1,7 @@ | @@ -1,7 +1,7 @@ | |||
1 | $NetBSD: distinfo,v 1.1.1.1 2008/10/26 09:51:52 bjs Exp $ | 1 | $NetBSD: distinfo,v 1.2 2011/06/12 04:47:26 dholland Exp $ | |
2 | 2 | |||
3 | SHA1 (sex-1.0.tar.gz) = 12da3ac34d630f0967d09b4cbe6e73a88a8973d8 | 3 | SHA1 (sex-1.0.tar.gz) = 12da3ac34d630f0967d09b4cbe6e73a88a8973d8 | |
4 | RMD160 (sex-1.0.tar.gz) = 80c7c04f7b77329e4bf20fbf61d6c2fce54d75d6 | 4 | RMD160 (sex-1.0.tar.gz) = 80c7c04f7b77329e4bf20fbf61d6c2fce54d75d6 | |
5 | Size (sex-1.0.tar.gz) = 4820 bytes | 5 | Size (sex-1.0.tar.gz) = 4820 bytes | |
6 | SHA1 (patch-aa) = 18dbce142a90824cadbc1b30becd0cff4ca35e03 | 6 | SHA1 (patch-aa) = 18dbce142a90824cadbc1b30becd0cff4ca35e03 | |
7 | SHA1 (patch-ab) = 4df48147f5e6bbaf636c17be544e21a1728ec8fb | 7 | SHA1 (patch-ab) = 71348d87777d114c2250595da1f0343959756b57 |
@@ -1,13 +1,41 @@ | @@ -1,13 +1,41 @@ | |||
1 | $NetBSD: patch-ab,v 1.1.1.1 2008/10/26 09:51:52 bjs Exp $ | 1 | $NetBSD: patch-ab,v 1.2 2011/06/12 04:47:26 dholland Exp $ | |
2 | 2 | |||
3 | --- sex.c.orig 2001-04-28 18:21:29.000000000 +0100 | 3 | - use correct C constructs | |
4 | +++ sex.c 2008-10-23 11:00:07.000000000 +0100 | 4 | ||
5 | @@ -252,7 +252,7 @@ | 5 | --- sex.c.orig 2001-04-28 17:21:29.000000000 +0000 | |
6 | +++ sex.c | |||
7 | @@ -10,6 +10,7 @@ | |||
8 | ||||
9 | #include <stdio.h> | |||
10 | #include <stdlib.h> | |||
11 | +#include <string.h> | |||
12 | #include <time.h> | |||
13 | #include <ctype.h> | |||
14 | ||||
15 | @@ -240,7 +241,7 @@ TABLE list[] = { | |||
16 | {his, SZ(his)}, {dongadj, SZ(dongadj)}, | |||
17 | {dong, SZ(dong)}, {intoher, SZ(intoher)}, | |||
18 | {twatadj, SZ(twatadj)}, {twat, SZ(twat)}, | |||
19 | - {(char **)NULL, (short)NULL}, | |||
20 | + {NULL, 0}, | |||
21 | }; | |||
22 | ||||
23 | #define LLINE 50 | |||
24 | @@ -252,7 +253,7 @@ int main(int argc, char **argv) | |||
6 | register TABLE *ttp; | 25 | register TABLE *ttp; | |
7 | register char *cp; | 26 | register char *cp; | |
8 | int getpid(); | 27 | int getpid(); | |
9 | - long now; | 28 | - long now; | |
10 | + time_t now; | 29 | + time_t now; | |
11 | char buffer[2048]; | 30 | char buffer[2048]; | |
12 | int pos, lastword; | 31 | int pos, lastword; | |
13 | 32 | |||
33 | @@ -279,7 +280,7 @@ int main(int argc, char **argv) | |||
34 | buffer[lastword] = '\n'; | |||
35 | lwidth = pos - lastword; | |||
36 | } | |||
37 | - if (isspace(*cp)) { | |||
38 | + if (isspace((unsigned char)*cp)) { | |||
39 | lastword = pos; | |||
40 | } | |||
41 | pos++; |