--- pop2.c.orig Mon Sep 11 19:10:44 1995 +++ pop2.c Thu Jul 8 21:33:35 2010 @@ -67,6 +67,7 @@ #include #include +#include #include "socket.h" #include "popclient.h" @@ -134,7 +135,10 @@ struct optrec *options; /* open the socket to the POP server */ if ((socket = Socket(servername,POP2_PORT)) < 0) { - perror("doPOP2: socket"); + if (socket == -2) + herror("doPOP2: socket"); + else + perror("doPOP2: socket"); return(PS_SOCKET); } @@ -496,8 +500,8 @@ int mboxfd; int topipe; { int i,buflen,actsize; - char buf [MSGBUFSIZE]; - char frombuf [MSGBUFSIZE]; + char buf [POPMSGBUFSIZE]; + char frombuf [POPMSGBUFSIZE]; char savec; int msgTop; int needFrom; @@ -524,7 +528,7 @@ int topipe; actsize = 0; msgTop = !0; while (msgsize > 0) { - buflen = msgsize <= MSGBUFSIZE ? msgsize : MSGBUFSIZE; + buflen = msgsize <= POPMSGBUFSIZE ? msgsize : POPMSGBUFSIZE; /* read a bufferful */ if (SockRead(socket, buf, buflen) == 0) {