diff options
-rw-r--r-- | Makefile.in | 12 | ||||
-rw-r--r-- | NEWS | 11 | ||||
-rw-r--r-- | socket.c | 34 |
3 files changed, 42 insertions, 15 deletions
diff --git a/Makefile.in b/Makefile.in index 81b0d76c..d90d907d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -3,7 +3,7 @@ # If you're running QNX, we can't assume a working autoconf. # So just uncomment all the lines marked QNX. -VERS=2.5 +VERS=2.6 PL=0 # Ultrix 2.2 make doesn't expand the value of VPATH. @@ -153,7 +153,9 @@ fetchmail.spec: $(srcdir)/Makefile.in $(srcdir)/specgen.sh .PHONY: clean realclean distclean mostlyclean clean: -rm -f fetchmail *.o core fetchmail.dvi \ - rcfile_l.c rcfile_y.h rcfile_y.c fetchmail.tar fetchmail.tar.gz + rcfile_l.c rcfile_y.h rcfile_y.c \ + fetchmail.tar fetchmail.tar.gz \ + linetext[12] distclean: clean -rm -f Makefile config.h @@ -218,6 +220,12 @@ fetchmail-$(VERS).tar: $(all) fetchmail-$(VERS).tar.gz: fetchmail-$(VERS).tar gzip -f fetchmail-$(VERS).tar +# Test for stdio line-buffering lossage on sockets +linetest1: socket.c + $(CC) -g -I. -DMAIN socket.c -o linetest1 # Use setlinebuf +linetest2: socket.c + $(CC) -g -I. -DMAIN -DUSE_STDIO socket.c -o linetest2 # Use setvnbuf + # The automatically generated dependencies below may omit config.h # because it is included with ``#include <config.h>'' rather than # ``#include "config.h"''. So we add the explicit dependency to make sure. @@ -15,6 +15,17 @@ ------------------------------------------------------------------------------ fetchmail-2.6 () +features -- + + +bugs -- + +* Fixed length-computation bug (apparently introduced in 2.3) that messed + up IMAP deletes. + +* Dropped back to separate SockGets/SockWrite code with no attempt at + stdio buffering -- we hope this will fix the Solaris peoples' problems. + There are 166 people on the fetchmail-friends list. ------------------------------------------------------------------------------ @@ -34,6 +34,12 @@ #endif #endif +/* + * There are, in effect, two different implementations here. One + * uses read(2) and write(2) directly with no buffering, the other + * uses stdio with line buffering (for better throughput). Both + * are known to work under Linux. + */ /* #define USE_STDIO */ #ifdef USE_STDIO @@ -116,19 +122,6 @@ va_dcl { } #ifndef USE_STDIO -/* - * FIXME: This needs to be recoded to use stdio, if that's possible. - * - * If you think these functions are too slow and inefficient, you're - * absolutely right. I wish I could figure out what to do about it. - * The ancestral popclient used static buffering here to cut down on the - * number of read(2) calls, but we can't do that because we can have - * two or more sockets open at a time. - * - * The right thing to do would be to use stdio for internal per-socket - * buffering here (which is why SockOpen() returns a file pointer) but - * this causes mysterious lossage. - */ int SockWrite(char *buf, int size, int len, FILE *sockfp) { @@ -164,6 +157,7 @@ char *SockGets(char *buf, int len, FILE *sockfp) *cp = 0; return buf; } + #else int SockWrite(char *buf, int size, int len, FILE *sockfp) @@ -178,4 +172,18 @@ char *SockGets(char *buf, int len, FILE *sockfp) #endif +#ifdef MAIN +/* + * Use the chargen service to test buffering directly. + */ +main() +{ + FILE *fp = SockOpen("localhost", 19); + char buf[80]; + + while (SockGets(buf, sizeof(buf)-1, fp)) + SockWrite(buf, 1, strlen(buf), stdout); +} +#endif /* MAIN */ + /* socket.c ends here */ |