Wed Dec 15 03:14:51 2010 UTC ()
fix compiler warnings on macox (missing prototype for inet_ntoa and
account for strcpy being a macro).


(chuck)
diff -r1.7 -r1.8 pkgsrc/news/nntpclnt/distinfo
diff -r1.3 -r1.4 pkgsrc/news/nntpclnt/patches/patch-ab

cvs diff -r1.7 -r1.8 pkgsrc/news/nntpclnt/distinfo (expand / switch to unified diff)

--- pkgsrc/news/nntpclnt/distinfo 2005/04/01 03:32:07 1.7
+++ pkgsrc/news/nntpclnt/distinfo 2010/12/15 03:14:51 1.8
@@ -1,9 +1,9 @@ @@ -1,9 +1,9 @@
1$NetBSD: distinfo,v 1.7 2005/04/01 03:32:07 kim Exp $ 1$NetBSD: distinfo,v 1.8 2010/12/15 03:14:51 chuck Exp $
2 2
3SHA1 (nntpclnt-1.6.1.tar.gz) = df24e9083185680d85bdc016e9e4ba54f4071f80 3SHA1 (nntpclnt-1.6.1.tar.gz) = df24e9083185680d85bdc016e9e4ba54f4071f80
4RMD160 (nntpclnt-1.6.1.tar.gz) = b3d8ec94d74cc1a0f88264756b89c91fabde0750 4RMD160 (nntpclnt-1.6.1.tar.gz) = b3d8ec94d74cc1a0f88264756b89c91fabde0750
5Size (nntpclnt-1.6.1.tar.gz) = 34369 bytes 5Size (nntpclnt-1.6.1.tar.gz) = 34369 bytes
6SHA1 (patch-aa) = e4c947e9acdd6f814437409e475b819588c444fa 6SHA1 (patch-aa) = e4c947e9acdd6f814437409e475b819588c444fa
7SHA1 (patch-ab) = 594f068acbc6794cc4e22c77d3474ea7673a4f87 7SHA1 (patch-ab) = 8d00f429d249319d0cfba7c22d2e292acbef3089
8SHA1 (patch-ac) = ed067e2f2c6c22e32ca388dc6f990aa720d762aa 8SHA1 (patch-ac) = ed067e2f2c6c22e32ca388dc6f990aa720d762aa
9SHA1 (patch-ad) = 1b648dcaba5625326e17ecdce90622a02e207f17 9SHA1 (patch-ad) = 1b648dcaba5625326e17ecdce90622a02e207f17

cvs diff -r1.3 -r1.4 pkgsrc/news/nntpclnt/patches/patch-ab (expand / switch to unified diff)

--- pkgsrc/news/nntpclnt/patches/patch-ab 2005/04/01 03:28:36 1.3
+++ pkgsrc/news/nntpclnt/patches/patch-ab 2010/12/15 03:14:51 1.4
@@ -1,52 +1,77 @@ @@ -1,52 +1,77 @@
1$NetBSD: patch-ab,v 1.3 2005/04/01 03:28:36 kim Exp $ 1$NetBSD: patch-ab,v 1.4 2010/12/15 03:14:51 chuck Exp $
2 2
3--- nntpclnt.c.orig 1994-08-11 17:37:51.000000000 -0400 3--- nntpclnt.c.orig 1994-08-11 17:37:51.000000000 -0400
4+++ nntpclnt.c 2005-03-31 22:25:28.000000000 -0500 4+++ nntpclnt.c 2010-12-14 22:08:04.000000000 -0500
5@@ -24,6 +24,11 @@ 5@@ -24,6 +24,11 @@
6 * Include configuration parameters only if we're made in the nntp tree. 6 * Include configuration parameters only if we're made in the nntp tree.
7 */ 7 */
8  8
9+#if defined(USG) || defined(MSDOS) 9+#if defined(USG) || defined(MSDOS)
10+#include <string.h> 10+#include <string.h>
11+#else 11+#else
12+#include <strings.h> 12+#include <strings.h>
13+#endif 13+#endif
14 #ifdef NNTPSRC 14 #ifdef NNTPSRC
15 #include "config.h" 15 #include "config.h"
16 #endif /* NNTPSRC */ 16 #endif /* NNTPSRC */
17@@ -64,11 +69,6 @@ 17@@ -64,11 +69,6 @@
18 #define net_read(a,b,c,d,e) soread(a,b,c) 18 #define net_read(a,b,c,d,e) soread(a,b,c)
19 #define net_write(a,b,c,d) sowrite(a,b,c) 19 #define net_write(a,b,c,d) sowrite(a,b,c)
20 #endif 20 #endif
21-#if defined(USG) || defined(MSDOS) 21-#if defined(USG) || defined(MSDOS)
22-#include <string.h> 22-#include <string.h>
23-#else 23-#else
24-#include <strings.h> 24-#include <strings.h>
25-#endif 25-#endif
26 #include "nntpclnt.h" 26 #include "nntpclnt.h"
27 #ifdef NONETDB 27 #ifdef NONETDB
28 # define IPPORT_NNTP ((unsigned short) 119) 28 # define IPPORT_NNTP ((unsigned short) 119)
29@@ -199,7 +199,7 @@ 29@@ -154,7 +154,9 @@
 30 static char buf[256];
 31 char *index();
 32 char *getenv();
 33+#ifndef strcpy
 34 char *strcpy();
 35+#endif
 36
 37 if (cp = getenv("NNTPSERVER")) {
 38 (void) strcpy(buf, cp);
 39@@ -199,7 +201,7 @@
30 server_init(machine) 40 server_init(machine)
31 char *machine; 41 char *machine;
32 { 42 {
33- int sockt_rd, sockt_wr; 43- int sockt_rd, sockt_wr;
34+ int sockt_rd, sockt_wr, result[2]; 44+ int sockt_rd, sockt_wr, result[2];
35 char line[256]; 45 char line[256];
36 char *index(); 46 char *index();
37 #if defined(DECNET) || defined(SGI4DDN) 47 #if defined(DECNET) || defined(SGI4DDN)
38@@ -248,7 +248,13 @@ 48@@ -248,7 +250,13 @@
39 /* Now get the server's signon message */ 49 /* Now get the server's signon message */
40  50
41 (void) get_server(line, sizeof(line)); 51 (void) get_server(line, sizeof(line));
42- return (atoi(line)); 52- return (atoi(line));
43+ result[0] = atoi(line); 53+ result[0] = atoi(line);
44+ 54+
45+ put_server("MODE READER"); 55+ put_server("MODE READER");
46+ (void) get_server(line, sizeof(line)); 56+ (void) get_server(line, sizeof(line));
47+ result[1] = atoi(line); 57+ result[1] = atoi(line);
48+ 58+
49+ return ((result[1] != ERR_COMMAND) ? result[1] : result[0]); 59+ return ((result[1] != ERR_COMMAND) ? result[1] : result[0]);
50 } 60 }
51  61
52 #ifdef DATAKIT 62 #ifdef DATAKIT
 63@@ -296,6 +304,14 @@
 64 *
 65 * Errors: Printed via perror.
 66 */
 67+#ifdef h_addr
 68+/*
 69+ * would like to include <arpa/inet.h> for the inet_ntoa() prototype,
 70+ * but we have our own version of inet_addr() that does not match
 71+ * the prototype in <arpa/inet.h>
 72+ */
 73+extern char *inet_ntoa(struct in_addr in);
 74+#endif
 75
 76 int
 77 get_tcp_socket(machine)