pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/news/newsfetch Use binary stdio because "you're suppos...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/caf847d7c810
branches:  trunk
changeset: 471626:caf847d7c810
user:      tv <tv%pkgsrc.org@localhost>
date:      Mon Mar 29 17:31:54 2004 +0000

description:
Use binary stdio because "you're supposed to do that."
Needed for Cygwin et al.

diffstat:

 news/newsfetch/Makefile         |   4 +-
 news/newsfetch/distinfo         |   4 +-
 news/newsfetch/patches/patch-ab |  76 +++++++++++++++++++++++++++++++++++++++++
 news/newsfetch/patches/patch-ac |  19 ++++++++++
 4 files changed, 100 insertions(+), 3 deletions(-)

diffs (136 lines):

diff -r c3644e047463 -r caf847d7c810 news/newsfetch/Makefile
--- a/news/newsfetch/Makefile   Mon Mar 29 17:28:33 2004 +0000
+++ b/news/newsfetch/Makefile   Mon Mar 29 17:31:54 2004 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.6 2004/01/20 12:22:41 agc Exp $
+# $NetBSD: Makefile,v 1.7 2004/03/29 17:31:54 tv Exp $
 #
 
 DISTNAME=      newsfetch-1.3
+PKGREVISION=   1
 CATEGORIES=    news
 MASTER_SITES=  ${MASTER_SITE_LOCAL}
 
@@ -10,7 +11,6 @@
 COMMENT=       Downloads newsgroup messages in mail file format
 
 WRKSRC=                ${WRKDIR}/newsfetch
-USE_CONFIGURE= yes
 
 .include "../../mk/bsd.prefs.mk"
 
diff -r c3644e047463 -r caf847d7c810 news/newsfetch/distinfo
--- a/news/newsfetch/distinfo   Mon Mar 29 17:28:33 2004 +0000
+++ b/news/newsfetch/distinfo   Mon Mar 29 17:31:54 2004 +0000
@@ -1,5 +1,7 @@
-$NetBSD: distinfo,v 1.3 2003/09/22 21:12:18 wiz Exp $
+$NetBSD: distinfo,v 1.4 2004/03/29 17:31:54 tv Exp $
 
 SHA1 (newsfetch-1.3.tar.gz) = e497eecffa15d62b1cde6921734dd6e1cb9d933c
 Size (newsfetch-1.3.tar.gz) = 12159 bytes
 SHA1 (patch-aa) = 1311f2d0b7a8cdb4e07ba8b6dba491d9878e20df
+SHA1 (patch-ab) = 2d30938b62011db3afa2c0e06043b43bbb5cf0b2
+SHA1 (patch-ac) = 2241ba0950d3ee5f4c0c253cf4870cb4e070fe11
diff -r c3644e047463 -r caf847d7c810 news/newsfetch/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/news/newsfetch/patches/patch-ab   Mon Mar 29 17:31:54 2004 +0000
@@ -0,0 +1,76 @@
+$NetBSD: patch-ab,v 1.1 2004/03/29 17:31:55 tv Exp $
+
+--- nntp.c.orig        Mon Nov  3 08:34:59 2003
++++ nntp.c
+@@ -51,7 +51,7 @@ void read_nntp_data() 
+ int set_reader_mode() 
+ {
+       read_nntp_data();
+-      fprintf(socket_fp[0], "MODE READER\n");
++      fprintf(socket_fp[0], "MODE READER\r\n");
+       read_nntp_data();
+       return (get_error(command_buf));
+ }
+@@ -191,7 +191,7 @@ int check_group() 
+ int first_art, last_art, total_art, tmp;
+           
+ fprintf(stderr, "%s: ", group);
+-fprintf(socket_fp[0], "GROUP %s\n", group);
++fprintf(socket_fp[0], "GROUP %s\r\n", group);
+ read_nntp_data();
+           
+ #ifdef DEBUG
+@@ -220,7 +220,7 @@ read_nntp_data();
+                       first_article = last_art - max_article + 1;
+       }
+           
+-      fprintf(socket_fp[0], "STAT %d\n", first_article);
++      fprintf(socket_fp[0], "STAT %d\r\n", first_article);
+       read_nntp_data();
+           
+       while (!get_error_noprint(command_buf)) {
+@@ -238,7 +238,7 @@ read_nntp_data();
+                       return (0);
+               }
+                   
+-              fprintf(socket_fp[0], "STAT %d\n", first_article);
++              fprintf(socket_fp[0], "STAT %d\r\n", first_article);
+               read_nntp_data();
+       }
+           
+@@ -302,7 +302,7 @@ int check_header = 1;
+                       fprintf(stderr, "                                    %c", 0xd);
+       }
+           
+-      fprintf(socket_fp[0], "ARTICLE\n");
++      fprintf(socket_fp[0], "ARTICLE\r\n");
+       read_nntp_data();
+           
+       if (!get_error(command_buf))
+@@ -325,7 +325,7 @@ int check_header = 1;
+       /*
+        * Make it little fast 
+        */ 
+-      fprintf(socket_fp[0], "NEXT\n");
++      fprintf(socket_fp[0], "NEXT\r\n");
+       article_fetching = 1;
+           
+ #ifndef NO_STATUS_METER
+@@ -391,7 +391,7 @@ void get_group_list() 
+       char groupname[100];
+           
+       fprintf(stderr, "\nList of NewsGroups:\n");
+-      fprintf(socket_fp[0], "LIST\n");
++      fprintf(socket_fp[0], "LIST\r\n");
+       read_nntp_data();
+           
+       if (!get_error_strmsg(command_buf))
+@@ -411,7 +411,7 @@ void get_group_list() 
+ 
+ void send_quit() 
+ {
+-      fprintf(socket_fp[0], "QUIT\n");
++      fprintf(socket_fp[0], "QUIT\r\n");
+       read_nntp_data();
+ }
+ 
diff -r c3644e047463 -r caf847d7c810 news/newsfetch/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/news/newsfetch/patches/patch-ac   Mon Mar 29 17:31:54 2004 +0000
@@ -0,0 +1,19 @@
+$NetBSD: patch-ac,v 1.1 2004/03/29 17:31:55 tv Exp $
+
+--- net.c.orig Mon Nov  3 08:47:33 2003
++++ net.c
+@@ -104,12 +104,12 @@ int connect_server(char *server_name, in
+ void create_fd(int socketid, FILE ** sfp)
+ {
+ 
+-      if ((sfp[0] = fdopen(socketid, "w")) == NULL) {
++      if ((sfp[0] = fdopen(socketid, "wb")) == NULL) {
+               perror("fdopen");
+               close(socketid);
+               exit_now(1);
+       }
+-      if ((sfp[1] = fdopen(socketid, "r")) == NULL) {
++      if ((sfp[1] = fdopen(socketid, "rb")) == NULL) {
+               perror("fdopen");
+               close(socketid);
+               exit_now(1);



Home | Main Index | Thread Index | Old Index