From f50d39cc0c9f8487dde51788940bbce975a43503 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 15 Dec 1998 16:17:21 +0000 Subject: gcc -Wall cleanup. svn path=/trunk/; revision=2278 --- NEWS | 3 +++ driver.c | 2 +- env.c | 2 -- fetchmail-features.html | 10 ++++++---- sink.c | 5 +++-- smtp.c | 2 +- smtp.h | 2 +- socket.c | 35 ++++++++++++++++------------------- 8 files changed, 31 insertions(+), 30 deletions(-) diff --git a/NEWS b/NEWS index 1166f649..bbc998b5 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,9 @@ fetchmail-4.7.1 (): * Enable fetchmail to build correctly on systems without socketpair. +* gcc -Wall cleanup. + +There are 246 people on fetchmail-friends and 327 on fetchmail-announce. fetchmail-4.7.0 (Mon Dec 14 12:05:27 EST 1998): * Minor correction to make i18n subdirectory builds work better. diff --git a/driver.c b/driver.c index f9cd1763..c3004ebe 100644 --- a/driver.c +++ b/driver.c @@ -1282,7 +1282,7 @@ static void send_size_warnings(struct query *ctl) int size, nbr; int msg_to_send = FALSE; struct idlist *head=NULL, *current=NULL; - int max_warning_poll_count, good, bad; + int max_warning_poll_count; #define OVERHD "Subject: Fetchmail oversized-messages warning.\r\n\r\nThe following oversized messages remain on the mail server:" head = ctl->skipped; diff --git a/env.c b/env.c index cfd39f49..fc2dd22f 100644 --- a/env.c +++ b/env.c @@ -20,10 +20,8 @@ #ifdef HAVE_GETHOSTBYNAME #include #endif /* HAVE_GETHOSTBYNAME */ -#ifndef HAVE_STRFTIME /* For ctime prototype */ #include #include -#endif #include "fetchmail.h" #include "i18n.h" diff --git a/fetchmail-features.html b/fetchmail-features.html index 974bb03a..7cdf489f 100644 --- a/fetchmail-features.html +++ b/fetchmail-features.html @@ -10,7 +10,7 @@
Back to Fetchmail Home Page To Site Map -$Date: 1998/11/29 03:57:29 $ +$Date: 1998/12/15 16:17:21 $

@@ -20,11 +20,13 @@
  • Fetchmail now sends bouncemail on SMTP and LMTP errors. +
  • Full support for LMTP according to RFC2033. +
  • True multi-language support using GNU gettext.
  • Support for use of HESIOD with Kerberos. -
  • The -bsmtp option supports recording fetched mail as a BSMTP batch. +
  • The --bsmtp option supports recording fetched mail as a BSMTP batch.
  • The --limit option can now be used in daemon mode, with oversized-message notifications being mailed to the calling user. @@ -37,7 +39,7 @@ in www.demon.net's POP3 service.
  • Code is 64-bit clean and Y2K-safe. -
  • Automatically decodes armored 7-bit MIME into 8 bits. +
  • Can axutomatically decodes armored 7-bit MIME into 8 bits.
  • You can specify which SMTP error is recognized as a spam block. @@ -163,7 +165,7 @@ get-mail, gwpop, pimp-1.0, pop-perl5-1.2, popc, popmail-1.6 and upop.

    Back to Fetchmail Home Page To Site Map -$Date: 1998/11/29 03:57:29 $ +$Date: 1998/12/15 16:17:21 $

    Eric S. Raymond <esr@snark.thyrsus.com>
    diff --git a/sink.c b/sink.c index 60e157cb..05b67016 100644 --- a/sink.c +++ b/sink.c @@ -15,6 +15,7 @@ #include #include #include +#include #ifdef HAVE_MEMORY_H #include #endif /* HAVE_MEMORY_H */ @@ -445,7 +446,7 @@ int open_sink(struct query *ctl, struct msgblk *msg, else if (ctl->mimemsg & MSG_IS_7BIT) fputs(" BODY=7BIT", sinkfp); - fprintf(sinkfp, " SIZE=%ld\r\n", msg->reallen); + fprintf(sinkfp, " SIZE=%d\r\n", msg->reallen); /* * RFC 1123 requires that the domain name part of the @@ -650,7 +651,7 @@ int open_sink(struct query *ctl, struct msgblk *msg, } if ((ctl->server.esmtp_options & ESMTP_SIZE) && msg->reallen > 0) - sprintf(options + strlen(options), " SIZE=%ld", msg->reallen); + sprintf(options + strlen(options), " SIZE=%d", msg->reallen); /* * Try to get the SMTP listener to take the Return-Path diff --git a/smtp.c b/smtp.c index 9e26ae77..2b98d15f 100644 --- a/smtp.c +++ b/smtp.c @@ -34,7 +34,7 @@ char smtp_response[MSGBUFSIZE]; static char smtp_mode = 'S'; -int SMTP_setmode(char sl) +void SMTP_setmode(char sl) /* set whether we are speaking SMTP or LMTP */ { smtp_mode = sl; diff --git a/smtp.h b/smtp.h index 8563343c..bc0d9e40 100644 --- a/smtp.h +++ b/smtp.h @@ -19,7 +19,7 @@ #define ESMTP_SIZE 0x02 #define ESMTP_ETRN 0x04 -int SMTP_setmode(char); +void SMTP_setmode(char); int SMTP_helo(int socket,const char *host); int SMTP_ehlo(int socket,const char *host,int *opt); int SMTP_from(int socket,const char *from,const char *opts); diff --git a/socket.c b/socket.c index 7e11a701..9af6b7cf 100644 --- a/socket.c +++ b/socket.c @@ -49,27 +49,24 @@ static int handle_plugin(const char *host, const char *service, const char *plugin) /* get a socket mediated through a given external command */ { - if (plugin) + int fds[2]; + if (socketpair(AF_UNIX,SOCK_STREAM,0,fds)) { - int fds[2]; - if (socketpair(AF_UNIX,SOCK_STREAM,0,fds)) - { - error(0, 0, _("fetchmail: socketpair failed: %s(%d)"),strerror(errno),errno); - return -1; - } - if (!fork()) - { - dup2(fds[0],0); - dup2(fds[0],1); - if (outlevel >= O_VERBOSE) - error(0, 0, _("running %s %s %s"), plugin, host, service); - execlp(plugin,plugin,host,service,0); - error(0, 0, _("execl(%s) failed: %s (%d)"), - plugin, strerror(errno), errno); - exit(0); - } - return fds[1]; + error(0, 0, _("fetchmail: socketpair failed: %s(%d)"),strerror(errno),errno); + return -1; + } + if (!fork()) + { + dup2(fds[0],0); + dup2(fds[0],1); + if (outlevel >= O_VERBOSE) + error(0, 0, _("running %s %s %s"), plugin, host, service); + execlp(plugin,plugin,host,service,0); + error(0, 0, _("execl(%s) failed: %s (%d)"), + plugin, strerror(errno), errno); + exit(0); } + return fds[1]; } #endif /* HAVE_SOCKETPAIR */ -- cgit v1.2.3