🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nn
1 messages
1 total messages Started by Kristian Köhntopp Mon, 09 Sep 1996 00:00
nn-6.5.1 on Nextstep
#7953
Author: Kristian Köhntopp
Date: Mon, 09 Sep 1996 00:00
36 lines
1884 bytes
I compiled nn-6.5.1 out of the box on my Nextstation using
Nextstep 3.2. The connect to my NNTP-Server failed. Diffing
nn-6.5.0.b3/nntp.c against nn-6.5.1/nntp.c revealed that in
nntp.c:connect_server() a call to setvbuf had been introduced:

kris@white:~/Source$ diff -u nn-6.5.0.b3.patched/nntp.c
nn-6.5.1/nntp.c
--- nn-6.5.0.b3.patched/nntp.c  Sun Jul 21 11:57:17 1996
+++ nn-6.5.1/nntp.c     Mon Aug 26 06:09:08 1996
@@ -416,6 +418,7 @@
        close(sockt_rd);
         return -1;
     }
+    setvbuf(nntp_in, NULL, _IOLBF, 0);
     sockt_wr = dup(sockt_rd);
     if ((nntp_out = fdopen(sockt_wr, "w")) == NULL) {
        close(sockt_wr);

Changing _IOLBF to _IONBF made nn work, but I/O was extremely
slow (startup time over 10 seconds). Removing the setvbuf()
call restored the previous behaviour: nn was running at
original speed.

Why was the setvbuf() call introduced and which systems rely on
it? Can this please be made portable?

Kristian

--
Kristian Koehntopp, Wassilystrasse 30, 24113 Kiel, +49 431 688897
"Xs4all Internet will rotate the IP-numbering of the website www.xs4all.nl to
 ensure that it's 3100 userpages will all remain available for any
 internet-user." -- Felipe Rodriquez, Managing Director of xs4all.nl

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads