diff options
93 files changed, 258 insertions, 252 deletions
diff --git a/alpine/mailpart.c b/alpine/mailpart.c index 9adad9df..63ead766 100644 --- a/alpine/mailpart.c +++ b/alpine/mailpart.c @@ -1467,7 +1467,7 @@ write_attachment_to_file(MAILSTREAM *stream, long int msgno, ATTACH_S *a, int fl if(flags & GER_BINARY) dt_flags |= DT_BINARY; - so_flags = (is_text & !(flags & GER_BINARY) ? WRITE_TO_LOCALE : 0) + so_flags = ((is_text && !(flags & GER_BINARY)) ? WRITE_TO_LOCALE : 0) | WRITE_ACCESS ; store = so_get(FileStar, file, so_flags); diff --git a/alpine/rpdump.c b/alpine/rpdump.c index 680ab0d4..d3708b76 100644 --- a/alpine/rpdump.c +++ b/alpine/rpdump.c @@ -42,9 +42,7 @@ int my_timer_period = ((IDLE_TIMEOUT + 1)*1000); #undef main -app_main (argc, argv) - int argc; - char argv[]; +app_main (int argc, char argv[]) { } @@ -59,9 +57,7 @@ app_main (argc, argv) * Note: We're not worrying about memory leaks. */ int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { MAILSTREAM *stream = NULL; FILE *fp; @@ -254,8 +250,7 @@ main(argc, argv) RemoteType -check_for_header_msg(stream) - MAILSTREAM *stream; +check_for_header_msg(MAILSTREAM *stream) { STRINGLIST *sl; int ret = NotSet; @@ -324,8 +319,7 @@ check_for_header_msg(stream) char * -ptype(rtype) - RemoteType rtype; +ptype(RemoteType rtype) { char *ret = NULL; @@ -351,8 +345,7 @@ ptype(rtype) char * -spechdr(rtype) - RemoteType rtype; +spechdr(RemoteType rtype) { char *ret = NULL; @@ -378,11 +371,7 @@ spechdr(rtype) int -parse_args(argc, argv, force, local, remote) - int argc; - char **argv; - int *force; - char **local, **remote; +parse_args(int argc, char **argv, int *force, char **local, char **remote) { int ac; char **av; @@ -447,64 +436,44 @@ Loop: while(--ac > 0 && **++av == '-'){ char * -err_desc(err) - int err; +err_desc(int err) { return((char *) strerror(err)); } -void mm_exists(stream, number) - MAILSTREAM *stream; - unsigned long number; +void mm_exists(MAILSTREAM *stream, unsigned long number) { } -void mm_expunged(stream, number) - MAILSTREAM *stream; - unsigned long number; +void mm_expunged(MAILSTREAM *stream, unsigned long number) { } -void mm_flags(stream, number) - MAILSTREAM *stream; - unsigned long number; +void mm_flags(MAILSTREAM *stream, unsigned long number) { } -void mm_list(stream, delim, name, attrib) - MAILSTREAM *stream; - int delim; - char *name; - long attrib; +void mm_list(MAILSTREAM *stream, int delim, char *name, long attrib) { } -void mm_lsub(stream, delimiter, name, attributes) - MAILSTREAM *stream; - int delimiter; - char *name; - long attributes; +void mm_lsub(MAILSTREAM *stream, int delimiter, char *name, long attributes) { } -void mm_notify(stream, string, errflg) - MAILSTREAM *stream; - char *string; - long errflg; +void mm_notify(MAILSTREAM *stream, char *string, long errflg) { mm_log(string, errflg); } -void mm_log(string, errflg) - char *string; - long errflg; +void mm_log(char *string, long errflg) { if(noshow_error) return; @@ -532,21 +501,12 @@ void mm_log(string, errflg) } } -void mm_login_method(mb, user, pwd, trial, method) - NETMBX *mb; - char *user; - void *pwd; - long trial; - char *method; +void mm_login_method(NETMBX *mb, char *user, void *pwd, long trial, char *method) { mm_login(mb, user, (char **) pwd, trial); } -void mm_login(mb, user, pwd, trial) - NETMBX *mb; - char *user; - char **pwd; - long trial; +void mm_login(NETMBX *mb, char *user, char **pwd, long trial) { char prompt[100], *last, tmp[MAILTMPLEN]; int i, j, goal, ugoal, len, rc, flags = 0; @@ -683,60 +643,45 @@ void mm_login(mb, user, pwd, trial) } -void mm_critical(stream) - MAILSTREAM *stream; +void mm_critical(MAILSTREAM *stream) { } -void mm_nocritical(stream) - MAILSTREAM *stream; +void mm_nocritical(MAILSTREAM *stream) { } -long mm_diskerror(stream, errcode, serious) - MAILSTREAM *stream; - long errcode; - long serious; +long mm_diskerror(MAILSTREAM *stream, long errcode, long serious) { return T; } -void mm_fatal(string) - char *string; +void mm_fatal(char *string) { fprintf(stderr, "%s\n", string); } -void mm_searched(stream, msgno) - MAILSTREAM *stream; - unsigned long msgno; +void mm_searched(MAILSTREAM *stream, unsigned long msgno) { } -void mm_status(stream, mailbox, status) - MAILSTREAM *stream; - char *mailbox; - MAILSTATUS *status; +void mm_status(MAILSTREAM *stream, char *mailbox, MAILSTATUS *status) { } -void mm_dlog(string) - char *string; +void mm_dlog(char *string) { fprintf(stderr, "%s\n", string); } int -opt_enter(string, field_len, prompt, flags) - char *string, *prompt; - int field_len; - int *flags; +opt_enter(char *string, int field_len, char *prompt, int *flags) { char *pw; int return_v = -10; @@ -776,8 +721,7 @@ opt_enter(string, field_len, prompt, flags) } char * -last_cmpnt(filename) - char *filename; +last_cmpnt(char *filename) { register char *p = NULL, *q = filename; @@ -792,9 +736,7 @@ last_cmpnt(filename) } int -wantto(question, dflt, on_ctrl_C) - char *question; - int dflt, on_ctrl_C; +wantto(char *question, int dflt, int on_ctrl_C) { int ret = 0; char rep[1000], *p; diff --git a/alpine/rpload.c b/alpine/rpload.c index dd3e43e6..9f53b503 100644 --- a/alpine/rpload.c +++ b/alpine/rpload.c @@ -45,9 +45,7 @@ int my_timer_period = ((IDLE_TIMEOUT + 1)*1000); #undef main -app_main (argc, argv) - int argc; - char argv[]; +app_main (int argc, char argv[]) { } @@ -68,9 +66,7 @@ app_main (argc, argv) * Note: We're not worrying about memory leaks. */ int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { MAILSTREAM *stream = NULL; FILE *fp; @@ -241,8 +237,7 @@ main(argc, argv) RemoteType -check_for_header_msg(stream) - MAILSTREAM *stream; +check_for_header_msg(MAILSTREAM *stream) { STRINGLIST *sl; int ret = NotSet; @@ -311,8 +306,7 @@ check_for_header_msg(stream) char * -ptype(rtype) - RemoteType rtype; +ptype(RemoteType rtype) { char *ret = NULL; @@ -338,8 +332,7 @@ ptype(rtype) char * -spechdr(rtype) - RemoteType rtype; +spechdr(RemoteType rtype) { char *ret = NULL; @@ -365,12 +358,7 @@ spechdr(rtype) int -parse_args(argc, argv, force, trimsize, local, remote, type) - int argc; - char **argv; - int *force, *trimsize; - char **local, **remote; - RemoteType *type; +parse_args(int argc, char **argv, int *force, int *trimsize, char **local, char **remote, RemoteType *type) { int ac; char **av; @@ -467,9 +455,7 @@ Loop: while(--ac > 0 && **++av == '-'){ long -dummy_soutr(stream, string) - void *stream; - char *string; +dummy_soutr(void *stream, char *string) { return LONGT; } @@ -480,10 +466,7 @@ dummy_soutr(stream, string) * special sort of folder. */ int -add_initial_msg(stream, mailbox, special_hdr) - MAILSTREAM *stream; - char *mailbox; - char *special_hdr; +add_initial_msg(MAILSTREAM *stream, char *mailbox, char *special_hdr) { STRING msg; char buf[20000]; @@ -545,11 +528,7 @@ add_initial_msg(stream, mailbox, special_hdr) * in it. */ int -append_data(stream, mailbox, special_hdr, fp) - MAILSTREAM *stream; - char *mailbox; - char *special_hdr; - FILE *fp; +append_data(MAILSTREAM *stream, char *mailbox, char *special_hdr, FILE *fp) { STRING msg; char buf[20000], *sto, *p; @@ -631,9 +610,7 @@ append_data(stream, mailbox, special_hdr, fp) * such a message or not. */ void -trim_data(stream, trimsize) - MAILSTREAM *stream; - int trimsize; +trim_data(MAILSTREAM *stream, int trimsize) { if(stream->nmsgs > trimsize + 1){ char sequence[20]; @@ -647,11 +624,7 @@ trim_data(stream, trimsize) void -write_fake_headers(where, subject, subtype, special_hdr) - RFC822BUFFER *where; - char *subject; - char *subtype; - char *special_hdr; +write_fake_headers(RFC822BUFFER *where, char *subject, char *subtype, char *special_hdr) { ENVELOPE *fake_env; BODY *fake_body; @@ -686,64 +659,44 @@ write_fake_headers(where, subject, subtype, special_hdr) char * -err_desc(err) - int err; +err_desc(int err) { return((char *) strerror(err)); } -void mm_exists(stream, number) - MAILSTREAM *stream; - unsigned long number; +void mm_exists(MAILSTREAM *stream, unsigned long number) { } -void mm_expunged(stream, number) - MAILSTREAM *stream; - unsigned long number; +void mm_expunged(MAILSTREAM *stream, unsigned long number) { } -void mm_flags(stream, number) - MAILSTREAM *stream; - unsigned long number; +void mm_flags(MAILSTREAM *stream, unsigned long number) { } -void mm_list(stream, delim, name, attrib) - MAILSTREAM *stream; - int delim; - char *name; - long attrib; +void mm_list(MAILSTREAM *stream, int delim, char *name, long attrib) { } -void mm_lsub(stream, delimiter, name, attributes) - MAILSTREAM *stream; - int delimiter; - char *name; - long attributes; +void mm_lsub(MAILSTREAM *stream, int delimiter, char *name, long attributes) { } -void mm_notify(stream, string, errflg) - MAILSTREAM *stream; - char *string; - long errflg; +void mm_notify(MAILSTREAM *stream, char *string, long errflg) { mm_log(string, errflg); } -void mm_log(string, errflg) - char *string; - long errflg; +void mm_log(char *string, long errflg) { if(noshow_error) return; @@ -771,21 +724,12 @@ void mm_log(string, errflg) } } -void mm_login_method(mb, user, pwd, trial, method) - NETMBX *mb; - char *user; - void *pwd; - long trial; - char *method; +void mm_login_method(NETMBX *mb, char *user, void *pwd, long trial, char *method) { mm_login(mb, user, (char **) pwd, trial); } -void mm_login(mb, user, pwd, trial) - NETMBX *mb; - char *user; - char **pwd; - long trial; +void mm_login(NETMBX *mb, char *user, char **pwd, long trial) { char prompt[100], *last, tmp[MAILTMPLEN]; int i, j, goal, ugoal, len, rc, flags = 0; @@ -921,60 +865,45 @@ void mm_login(mb, user, pwd, trial) } -void mm_critical(stream) - MAILSTREAM *stream; +void mm_critical(MAILSTREAM *stream) { } -void mm_nocritical(stream) - MAILSTREAM *stream; +void mm_nocritical(MAILSTREAM *stream) { } -long mm_diskerror(stream, errcode, serious) - MAILSTREAM *stream; - long errcode; - long serious; +long mm_diskerror(MAILSTREAM *stream, long errcode, long serious) { return T; } -void mm_fatal(string) - char *string; +void mm_fatal(char *string) { fprintf(stderr, "%s\n", string); } -void mm_searched(stream, msgno) - MAILSTREAM *stream; - unsigned long msgno; +void mm_searched(MAILSTREAM *stream, unsigned long msgno) { } -void mm_status(stream, mailbox, status) - MAILSTREAM *stream; - char *mailbox; - MAILSTATUS *status; +void mm_status(MAILSTREAM *stream, char *mailbox, MAILSTATUS *status) { } -void mm_dlog(string) - char *string; +void mm_dlog(char *string) { fprintf(stderr, "%s\n", string); } int -opt_enter(string, field_len, prompt, flags) - char *string, *prompt; - int field_len; - int *flags; +opt_enter(char *string, int field_len, char *prompt, int *flags) { char *pw; int return_v = -10; diff --git a/imap/src/osdep/amiga/dummy.c b/imap/src/osdep/amiga/dummy.c index cb3b45bd..b33297e8 100644 --- a/imap/src/osdep/amiga/dummy.c +++ b/imap/src/osdep/amiga/dummy.c @@ -27,7 +27,9 @@ #include <stdio.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include <pwd.h> diff --git a/imap/src/osdep/amiga/mbx.c b/imap/src/osdep/amiga/mbx.c index 3cc89c94..bf3aa0ac 100644 --- a/imap/src/osdep/amiga/mbx.c +++ b/imap/src/osdep/amiga/mbx.c @@ -37,7 +37,9 @@ #include <stdio.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include <pwd.h> diff --git a/imap/src/osdep/amiga/mh.c b/imap/src/osdep/amiga/mh.c index a7b56e8c..02bb917c 100644 --- a/imap/src/osdep/amiga/mh.c +++ b/imap/src/osdep/amiga/mh.c @@ -27,7 +27,9 @@ #include <stdio.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include <pwd.h> diff --git a/imap/src/osdep/amiga/mix.c b/imap/src/osdep/amiga/mix.c index 9ab3442c..9c5ad9da 100644 --- a/imap/src/osdep/amiga/mix.c +++ b/imap/src/osdep/amiga/mix.c @@ -26,7 +26,9 @@ #include <stdio.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include <pwd.h> diff --git a/imap/src/osdep/amiga/mmdf.c b/imap/src/osdep/amiga/mmdf.c index e962434e..8e26a6c1 100644 --- a/imap/src/osdep/amiga/mmdf.c +++ b/imap/src/osdep/amiga/mmdf.c @@ -28,7 +28,9 @@ #include <stdio.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <signal.h> #include "mail.h" #include "osdep.h" diff --git a/imap/src/osdep/amiga/mtx.c b/imap/src/osdep/amiga/mtx.c index 4c989564..1502b86c 100644 --- a/imap/src/osdep/amiga/mtx.c +++ b/imap/src/osdep/amiga/mtx.c @@ -37,7 +37,9 @@ #include <stdio.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include <pwd.h> diff --git a/imap/src/osdep/amiga/mx.c b/imap/src/osdep/amiga/mx.c index 7e2b022e..f2d6b3d3 100644 --- a/imap/src/osdep/amiga/mx.c +++ b/imap/src/osdep/amiga/mx.c @@ -30,7 +30,9 @@ #include <stdio.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include <pwd.h> diff --git a/imap/src/osdep/amiga/news.c b/imap/src/osdep/amiga/news.c index 9c9f738a..34ad6b45 100644 --- a/imap/src/osdep/amiga/news.c +++ b/imap/src/osdep/amiga/news.c @@ -30,7 +30,9 @@ #include <stdio.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include <sys/stat.h> diff --git a/imap/src/osdep/amiga/os_ami.c b/imap/src/osdep/amiga/os_ami.c index 9f0d27b0..90d611cc 100644 --- a/imap/src/osdep/amiga/os_ami.c +++ b/imap/src/osdep/amiga/os_ami.c @@ -39,7 +39,9 @@ #include <netdb.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <pwd.h> #include "misc.h" diff --git a/imap/src/osdep/amiga/phile.c b/imap/src/osdep/amiga/phile.c index ce72d0a9..e01eec22 100644 --- a/imap/src/osdep/amiga/phile.c +++ b/imap/src/osdep/amiga/phile.c @@ -30,7 +30,9 @@ #include <stdio.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <signal.h> #include "mail.h" #include "osdep.h" diff --git a/imap/src/osdep/amiga/tenex.c b/imap/src/osdep/amiga/tenex.c index 0982573f..c3f95e5a 100644 --- a/imap/src/osdep/amiga/tenex.c +++ b/imap/src/osdep/amiga/tenex.c @@ -42,7 +42,9 @@ #include <stdio.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include <sys/stat.h> diff --git a/imap/src/osdep/amiga/unix.c b/imap/src/osdep/amiga/unix.c index be3c437b..e553662f 100644 --- a/imap/src/osdep/amiga/unix.c +++ b/imap/src/osdep/amiga/unix.c @@ -40,7 +40,9 @@ #include <stdio.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <signal.h> #include "mail.h" #include "osdep.h" diff --git a/imap/src/osdep/nt/mbxnt.c b/imap/src/osdep/nt/mbxnt.c index f35bfa6c..859d06ea 100644 --- a/imap/src/osdep/nt/mbxnt.c +++ b/imap/src/osdep/nt/mbxnt.c @@ -37,7 +37,9 @@ #include <stdio.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include <fcntl.h> diff --git a/imap/src/osdep/nt/mtxnt.c b/imap/src/osdep/nt/mtxnt.c index fa80afde..90e7927e 100644 --- a/imap/src/osdep/nt/mtxnt.c +++ b/imap/src/osdep/nt/mtxnt.c @@ -37,7 +37,9 @@ #include <stdio.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include <fcntl.h> diff --git a/imap/src/osdep/nt/tenexnt.c b/imap/src/osdep/nt/tenexnt.c index 054ce73a..c1c57946 100644 --- a/imap/src/osdep/nt/tenexnt.c +++ b/imap/src/osdep/nt/tenexnt.c @@ -42,7 +42,9 @@ #include <stdio.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include <fcntl.h> diff --git a/imap/src/osdep/nt/unixnt.c b/imap/src/osdep/nt/unixnt.c index 8c147985..1b9ee3a2 100644 --- a/imap/src/osdep/nt/unixnt.c +++ b/imap/src/osdep/nt/unixnt.c @@ -40,7 +40,9 @@ #include <stdio.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include <time.h> diff --git a/imap/src/osdep/os2/mbxnt.c b/imap/src/osdep/os2/mbxnt.c index 5ea3b57e..44276adc 100644 --- a/imap/src/osdep/os2/mbxnt.c +++ b/imap/src/osdep/os2/mbxnt.c @@ -37,7 +37,9 @@ #include <stdio.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include <fcntl.h> diff --git a/imap/src/osdep/os2/mtxnt.c b/imap/src/osdep/os2/mtxnt.c index 0ca88fb7..7a4d0440 100644 --- a/imap/src/osdep/os2/mtxnt.c +++ b/imap/src/osdep/os2/mtxnt.c @@ -37,7 +37,9 @@ #include <stdio.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include <fcntl.h> diff --git a/imap/src/osdep/os2/os_os2.c b/imap/src/osdep/os2/os_os2.c index 9c6f2f5f..172b33e8 100644 --- a/imap/src/osdep/os2/os_os2.c +++ b/imap/src/osdep/os2/os_os2.c @@ -37,7 +37,9 @@ #include <netdb.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include "tcp_os2.h" /* must be before osdep includes tcp.h */ #include "mail.h" #include "osdep.h" diff --git a/imap/src/osdep/os2/tenexnt.c b/imap/src/osdep/os2/tenexnt.c index 4c1d0a3b..4609bfd8 100644 --- a/imap/src/osdep/os2/tenexnt.c +++ b/imap/src/osdep/os2/tenexnt.c @@ -42,7 +42,9 @@ #include <stdio.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include <fcntl.h> diff --git a/imap/src/osdep/os2/unixnt.c b/imap/src/osdep/os2/unixnt.c index 2e92d39a..0bf45ca2 100644 --- a/imap/src/osdep/os2/unixnt.c +++ b/imap/src/osdep/os2/unixnt.c @@ -40,7 +40,9 @@ #include <stdio.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include <time.h> diff --git a/imap/src/osdep/unix/dummy.c b/imap/src/osdep/unix/dummy.c index 646f67ea..992d855e 100644 --- a/imap/src/osdep/unix/dummy.c +++ b/imap/src/osdep/unix/dummy.c @@ -27,7 +27,9 @@ #include <stdio.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include <pwd.h> diff --git a/imap/src/osdep/unix/env_unix.c b/imap/src/osdep/unix/env_unix.c index c41a5d04..c2fae370 100644 --- a/imap/src/osdep/unix/env_unix.c +++ b/imap/src/osdep/unix/env_unix.c @@ -967,7 +967,7 @@ char *myusername_full (unsigned long *flags) * Returns: my local host name */ -char *mylocalhost () +char *mylocalhost (void) { if (!myLocalHost) { char *s,tmp[MAILTMPLEN]; @@ -985,7 +985,7 @@ char *mylocalhost () * Returns: my home directory name */ -char *myhomedir () +char *myhomedir (void) { if (!myHomeDir) myusername ();/* initialize if first time */ return myHomeDir ? myHomeDir : ""; @@ -996,7 +996,7 @@ char *myhomedir () * Returns: my home directory name */ -static char *mymailboxdir () +static char *mymailboxdir (void) { char *home = myhomedir (); /* initialize if first time */ @@ -1016,7 +1016,7 @@ static char *mymailboxdir () * Accepts: buffer string */ -char *sysinbox () +char *sysinbox (void) { char tmp[MAILTMPLEN]; if (!sysInbox) { /* initialize if first time */ diff --git a/imap/src/osdep/unix/kerb_mit.c b/imap/src/osdep/unix/kerb_mit.c index 82e6c936..f4b4e5ed 100644 --- a/imap/src/osdep/unix/kerb_mit.c +++ b/imap/src/osdep/unix/kerb_mit.c @@ -42,7 +42,7 @@ char *kerberos_login (char *user,char *authuser,int argc,char *argv[]); * This is alright since the server is probably still root at this point. */ -long kerberos_server_valid () +long kerberos_server_valid (void) { krb5_context ctx; krb5_keytab kt; diff --git a/imap/src/osdep/unix/mbx.c b/imap/src/osdep/unix/mbx.c index 3770e0a9..48a555be 100644 --- a/imap/src/osdep/unix/mbx.c +++ b/imap/src/osdep/unix/mbx.c @@ -37,7 +37,9 @@ #include <stdio.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include <pwd.h> diff --git a/imap/src/osdep/unix/mh.c b/imap/src/osdep/unix/mh.c index 68e3aa68..565332d5 100644 --- a/imap/src/osdep/unix/mh.c +++ b/imap/src/osdep/unix/mh.c @@ -27,7 +27,9 @@ #include <stdio.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include <pwd.h> diff --git a/imap/src/osdep/unix/mix.c b/imap/src/osdep/unix/mix.c index 11b4b3a3..dc7981d3 100644 --- a/imap/src/osdep/unix/mix.c +++ b/imap/src/osdep/unix/mix.c @@ -26,7 +26,9 @@ #include <stdio.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include <pwd.h> diff --git a/imap/src/osdep/unix/mmdf.c b/imap/src/osdep/unix/mmdf.c index 5cfa197e..70196144 100644 --- a/imap/src/osdep/unix/mmdf.c +++ b/imap/src/osdep/unix/mmdf.c @@ -28,7 +28,9 @@ #include <stdio.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <signal.h> #include "mail.h" #include "osdep.h" diff --git a/imap/src/osdep/unix/mtx.c b/imap/src/osdep/unix/mtx.c index 0afa3376..d2257313 100644 --- a/imap/src/osdep/unix/mtx.c +++ b/imap/src/osdep/unix/mtx.c @@ -37,7 +37,9 @@ #include <stdio.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include <pwd.h> diff --git a/imap/src/osdep/unix/mx.c b/imap/src/osdep/unix/mx.c index 6ba04ca0..274f88fe 100644 --- a/imap/src/osdep/unix/mx.c +++ b/imap/src/osdep/unix/mx.c @@ -30,7 +30,9 @@ #include <stdio.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include <pwd.h> diff --git a/imap/src/osdep/unix/news.c b/imap/src/osdep/unix/news.c index beda8a66..a733d576 100644 --- a/imap/src/osdep/unix/news.c +++ b/imap/src/osdep/unix/news.c @@ -30,7 +30,9 @@ #include <stdio.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include <sys/stat.h> diff --git a/imap/src/osdep/unix/os_a32.c b/imap/src/osdep/unix/os_a32.c index 513e92c7..4c63bf39 100644 --- a/imap/src/osdep/unix/os_a32.c +++ b/imap/src/osdep/unix/os_a32.c @@ -38,7 +38,9 @@ #include <netdb.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <pwd.h> #include "misc.h" #include <sys/select.h> diff --git a/imap/src/osdep/unix/os_a41.c b/imap/src/osdep/unix/os_a41.c index ecaff582..c7e66d35 100644 --- a/imap/src/osdep/unix/os_a41.c +++ b/imap/src/osdep/unix/os_a41.c @@ -38,7 +38,9 @@ #include <netdb.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <pwd.h> #include "misc.h" #include <sys/select.h> diff --git a/imap/src/osdep/unix/os_a52.c b/imap/src/osdep/unix/os_a52.c index fed6af78..396ddc6f 100644 --- a/imap/src/osdep/unix/os_a52.c +++ b/imap/src/osdep/unix/os_a52.c @@ -38,7 +38,9 @@ #include <netdb.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <pwd.h> #include "misc.h" #include <sys/select.h> diff --git a/imap/src/osdep/unix/os_aix.c b/imap/src/osdep/unix/os_aix.c index c38e5cf9..8ea809b4 100644 --- a/imap/src/osdep/unix/os_aix.c +++ b/imap/src/osdep/unix/os_aix.c @@ -38,7 +38,9 @@ #include <netdb.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <pwd.h> #include "misc.h" diff --git a/imap/src/osdep/unix/os_aos.c b/imap/src/osdep/unix/os_aos.c index a916f47b..96bc5fea 100644 --- a/imap/src/osdep/unix/os_aos.c +++ b/imap/src/osdep/unix/os_aos.c @@ -37,7 +37,9 @@ #include <netdb.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <pwd.h> #include "misc.h" diff --git a/imap/src/osdep/unix/os_art.c b/imap/src/osdep/unix/os_art.c index 8fb78028..f3111c01 100644 --- a/imap/src/osdep/unix/os_art.c +++ b/imap/src/osdep/unix/os_art.c @@ -36,7 +36,9 @@ #include <arpa/inet.h> #include <netdb.h> #include <errno.h> -extern int errno; +#ifndef errno +extern int errno; /* just in case */ +#endif #include <pwd.h> #include <sys/socket.h> #include <time.h> diff --git a/imap/src/osdep/unix/os_aux.h b/imap/src/osdep/unix/os_aux.h index 53ec6cc5..304e996f 100644 --- a/imap/src/osdep/unix/os_aux.h +++ b/imap/src/osdep/unix/os_aux.h @@ -37,7 +37,9 @@ #include <syslog.h> -extern int errno; +#ifndef errno +extern int errno; /* just in case */ +#endif char *strerror (int n); unsigned long strtoul (char *s,char **endp,int base); diff --git a/imap/src/osdep/unix/os_bsd.c b/imap/src/osdep/unix/os_bsd.c index a916f47b..96bc5fea 100644 --- a/imap/src/osdep/unix/os_bsd.c +++ b/imap/src/osdep/unix/os_bsd.c @@ -37,7 +37,9 @@ #include <netdb.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <pwd.h> #include "misc.h" diff --git a/imap/src/osdep/unix/os_bsf.c b/imap/src/osdep/unix/os_bsf.c index f32b1fb2..ee66ca2f 100644 --- a/imap/src/osdep/unix/os_bsf.c +++ b/imap/src/osdep/unix/os_bsf.c @@ -35,7 +35,9 @@ #include <netdb.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <pwd.h> #include "misc.h" diff --git a/imap/src/osdep/unix/os_bsi.c b/imap/src/osdep/unix/os_bsi.c index f32b1fb2..ee66ca2f 100644 --- a/imap/src/osdep/unix/os_bsi.c +++ b/imap/src/osdep/unix/os_bsi.c @@ -35,7 +35,9 @@ #include <netdb.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <pwd.h> #include "misc.h" diff --git a/imap/src/osdep/unix/os_cvx.c b/imap/src/osdep/unix/os_cvx.c index 10f01904..09d49815 100644 --- a/imap/src/osdep/unix/os_cvx.c +++ b/imap/src/osdep/unix/os_cvx.c @@ -42,7 +42,9 @@ #include <netdb.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <pwd.h> #include "misc.h" diff --git a/imap/src/osdep/unix/os_cyg.c b/imap/src/osdep/unix/os_cyg.c index c9cd2f70..fc300e38 100644 --- a/imap/src/osdep/unix/os_cyg.c +++ b/imap/src/osdep/unix/os_cyg.c @@ -38,7 +38,9 @@ #include <netdb.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <pwd.h> #include <crypt.h> #include "misc.h" diff --git a/imap/src/osdep/unix/os_d-g.c b/imap/src/osdep/unix/os_d-g.c index b34662f7..96d2b579 100644 --- a/imap/src/osdep/unix/os_d-g.c +++ b/imap/src/osdep/unix/os_d-g.c @@ -38,7 +38,9 @@ #include <netdb.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <pwd.h> #include "misc.h" diff --git a/imap/src/osdep/unix/os_do4.c b/imap/src/osdep/unix/os_do4.c index 186fd94e..95da87ec 100644 --- a/imap/src/osdep/unix/os_do4.c +++ b/imap/src/osdep/unix/os_do4.c @@ -36,7 +36,9 @@ #include <netdb.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <pwd.h> #include "misc.h" diff --git a/imap/src/osdep/unix/os_drs.c b/imap/src/osdep/unix/os_drs.c index 74386af9..35c2e35d 100644 --- a/imap/src/osdep/unix/os_drs.c +++ b/imap/src/osdep/unix/os_drs.c @@ -38,7 +38,9 @@ #include <netdb.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <pwd.h> #include "misc.h" diff --git a/imap/src/osdep/unix/os_dyn.c b/imap/src/osdep/unix/os_dyn.c index 98a1a548..dd864372 100644 --- a/imap/src/osdep/unix/os_dyn.c +++ b/imap/src/osdep/unix/os_dyn.c @@ -37,7 +37,9 @@ #include <arpa/inet.h> #include <netdb.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <pwd.h> #include "misc.h" diff --git a/imap/src/osdep/unix/os_hpp.c b/imap/src/osdep/unix/os_hpp.c index 39794973..ca7f1cdc 100644 --- a/imap/src/osdep/unix/os_hpp.c +++ b/imap/src/osdep/unix/os_hpp.c @@ -44,7 +44,9 @@ #include <netdb.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif extern char *sys_errlist[]; extern int sys_nerr; #include <pwd.h> diff --git a/imap/src/osdep/unix/os_lnx.c b/imap/src/osdep/unix/os_lnx.c index e95b2ac2..0b4b3eb3 100644 --- a/imap/src/osdep/unix/os_lnx.c +++ b/imap/src/osdep/unix/os_lnx.c @@ -35,7 +35,9 @@ #include <netdb.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <pwd.h> #include "misc.h" diff --git a/imap/src/osdep/unix/os_lyn.c b/imap/src/osdep/unix/os_lyn.c index 49871251..4e59250b 100644 --- a/imap/src/osdep/unix/os_lyn.c +++ b/imap/src/osdep/unix/os_lyn.c @@ -38,7 +38,9 @@ #include <netdb.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <pwd.h> #include "misc.h" diff --git a/imap/src/osdep/unix/os_mct.c b/imap/src/osdep/unix/os_mct.c index cb62de50..35243018 100644 --- a/imap/src/osdep/unix/os_mct.c +++ b/imap/src/osdep/unix/os_mct.c @@ -38,7 +38,9 @@ #include <netdb.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <pwd.h> #include "misc.h" diff --git a/imap/src/osdep/unix/os_mnt.c b/imap/src/osdep/unix/os_mnt.c index f19a487b..6f257149 100644 --- a/imap/src/osdep/unix/os_mnt.c +++ b/imap/src/osdep/unix/os_mnt.c @@ -38,7 +38,9 @@ #include <netdb.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <pwd.h> #include "misc.h" diff --git a/imap/src/osdep/unix/os_nto.c b/imap/src/osdep/unix/os_nto.c index 36c45b42..0dfcd833 100644 --- a/imap/src/osdep/unix/os_nto.c +++ b/imap/src/osdep/unix/os_nto.c @@ -38,7 +38,9 @@ #include <netdb.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <pwd.h> #include <shadow.h> #include <sys/select.h> diff --git a/imap/src/osdep/unix/os_nxt.c b/imap/src/osdep/unix/os_nxt.c index a3b749f5..7bb754bd 100644 --- a/imap/src/osdep/unix/os_nxt.c +++ b/imap/src/osdep/unix/os_nxt.c @@ -38,7 +38,9 @@ #include <netdb.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <pwd.h> #include "misc.h" diff --git a/imap/src/osdep/unix/os_os4.c b/imap/src/osdep/unix/os_os4.c index 42d90404..5fe1e798 100644 --- a/imap/src/osdep/unix/os_os4.c +++ b/imap/src/osdep/unix/os_os4.c @@ -38,7 +38,9 @@ #include <netdb.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <pwd.h> #include "misc.h" #include <sia.h> diff --git a/imap/src/osdep/unix/os_osf.c b/imap/src/osdep/unix/os_osf.c index 560a3b59..9dbfa9da 100644 --- a/imap/src/osdep/unix/os_osf.c +++ b/imap/src/osdep/unix/os_osf.c @@ -38,7 +38,9 @@ #include <netdb.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <pwd.h> #include "misc.h" #include <ustat.h> diff --git a/imap/src/osdep/unix/os_osx.c b/imap/src/osdep/unix/os_osx.c index 1788e21f..40561b7b 100644 --- a/imap/src/osdep/unix/os_osx.c +++ b/imap/src/osdep/unix/os_osx.c @@ -36,7 +36,9 @@ #include <netdb.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <pwd.h> #include "misc.h" diff --git a/imap/src/osdep/unix/os_pyr.c b/imap/src/osdep/unix/os_pyr.c index 69c8e7e4..64c17220 100644 --- a/imap/src/osdep/unix/os_pyr.c +++ b/imap/src/osdep/unix/os_pyr.c @@ -41,7 +41,9 @@ #include <netdb.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <pwd.h> #include "misc.h" diff --git a/imap/src/osdep/unix/os_qn6.c b/imap/src/osdep/unix/os_qn6.c index ded8c848..1ca60739 100644 --- a/imap/src/osdep/unix/os_qn6.c +++ b/imap/src/osdep/unix/os_qn6.c @@ -35,7 +35,9 @@ #include <netdb.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <pwd.h> #include <shadow.h> #include <sys/select.h> diff --git a/imap/src/osdep/unix/os_qnx.c b/imap/src/osdep/unix/os_qnx.c index b1382519..d273545f 100644 --- a/imap/src/osdep/unix/os_qnx.c +++ b/imap/src/osdep/unix/os_qnx.c @@ -38,7 +38,9 @@ #include <netdb.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <pwd.h> #include <shadow.h> #include <sys/select.h> diff --git a/imap/src/osdep/unix/os_s40.c b/imap/src/osdep/unix/os_s40.c index 3dc2fe63..d5faec9f 100644 --- a/imap/src/osdep/unix/os_s40.c +++ b/imap/src/osdep/unix/os_s40.c @@ -38,7 +38,9 @@ #include <netdb.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <pwd.h> #include "misc.h" diff --git a/imap/src/osdep/unix/os_sgi.c b/imap/src/osdep/unix/os_sgi.c index 3e5eb550..0044b47e 100644 --- a/imap/src/osdep/unix/os_sgi.c +++ b/imap/src/osdep/unix/os_sgi.c @@ -39,7 +39,9 @@ #include <netdb.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <pwd.h> #include "misc.h" diff --git a/imap/src/osdep/unix/os_shp.c b/imap/src/osdep/unix/os_shp.c index eb7e4e80..da657fb6 100644 --- a/imap/src/osdep/unix/os_shp.c +++ b/imap/src/osdep/unix/os_shp.c @@ -44,7 +44,9 @@ #include <netdb.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif extern char *sys_errlist[]; extern int sys_nerr; #include <pwd.h> diff --git a/imap/src/osdep/unix/os_slx.c b/imap/src/osdep/unix/os_slx.c index 95c586af..5b672c33 100644 --- a/imap/src/osdep/unix/os_slx.c +++ b/imap/src/osdep/unix/os_slx.c @@ -35,7 +35,9 @@ #include <netdb.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <pwd.h> #include <shadow.h> #include "misc.h" diff --git a/imap/src/osdep/unix/os_sos.c b/imap/src/osdep/unix/os_sos.c index 8256aafa..4f7c95a0 100644 --- a/imap/src/osdep/unix/os_sos.c +++ b/imap/src/osdep/unix/os_sos.c @@ -38,7 +38,9 @@ #include <netdb.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <pwd.h> #include "misc.h" #include <sys/security.h> diff --git a/imap/src/osdep/unix/os_sua.c b/imap/src/osdep/unix/os_sua.c index dcf9311b..c908b9da 100644 --- a/imap/src/osdep/unix/os_sua.c +++ b/imap/src/osdep/unix/os_sua.c @@ -38,7 +38,9 @@ #include <netdb.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <pwd.h> #include "misc.h" diff --git a/imap/src/osdep/unix/os_sun.c b/imap/src/osdep/unix/os_sun.c index 5348ef58..ce7cc394 100644 --- a/imap/src/osdep/unix/os_sun.c +++ b/imap/src/osdep/unix/os_sun.c @@ -38,7 +38,9 @@ #include <netdb.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <pwd.h> #include "misc.h" diff --git a/imap/src/osdep/unix/os_sv2.c b/imap/src/osdep/unix/os_sv2.c index 14e3951b..880995ff 100644 --- a/imap/src/osdep/unix/os_sv2.c +++ b/imap/src/osdep/unix/os_sv2.c @@ -36,7 +36,9 @@ #include <arpa/inet.h> #include <netdb.h> #include <errno.h> -extern int errno; +#ifndef errno +extern int errno; /* just in case */ +#endif #include <pwd.h> #include <sys/socket.h> #include <time.h> diff --git a/imap/src/osdep/unix/os_ult.c b/imap/src/osdep/unix/os_ult.c index 28b72ecc..ebcf2a0d 100644 --- a/imap/src/osdep/unix/os_ult.c +++ b/imap/src/osdep/unix/os_ult.c @@ -37,7 +37,9 @@ #include <netdb.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <pwd.h> #include "misc.h" diff --git a/imap/src/osdep/unix/os_vu2.c b/imap/src/osdep/unix/os_vu2.c index 0b9c026a..2bbe4765 100644 --- a/imap/src/osdep/unix/os_vu2.c +++ b/imap/src/osdep/unix/os_vu2.c @@ -37,7 +37,9 @@ #include <netdb.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <pwd.h> #include "misc.h" diff --git a/imap/src/osdep/unix/phile.c b/imap/src/osdep/unix/phile.c index e930841b..a972f257 100644 --- a/imap/src/osdep/unix/phile.c +++ b/imap/src/osdep/unix/phile.c @@ -30,7 +30,9 @@ #include <stdio.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <signal.h> #include "mail.h" #include "osdep.h" diff --git a/imap/src/osdep/unix/tcp_unix.c b/imap/src/osdep/unix/tcp_unix.c index cf18bb6f..e601164c 100644 --- a/imap/src/osdep/unix/tcp_unix.c +++ b/imap/src/osdep/unix/tcp_unix.c @@ -838,7 +838,7 @@ char *tcp_localhost (TCPSTREAM *stream) * Returns: client host address */ -char *tcp_clientaddr () +char *tcp_clientaddr (void) { if (!myClientAddr) { char buf[NI_MAXHOST]; @@ -860,7 +860,7 @@ char *tcp_clientaddr () * Returns: client host name */ -char *tcp_clienthost () +char *tcp_clienthost (void) { if (!myClientHost) { char buf[NI_MAXHOST]; @@ -892,7 +892,7 @@ char *tcp_clienthost () * Returns: client port number */ -long tcp_clientport () +long tcp_clientport (void) { if (!myClientHost && !myClientAddr) tcp_clientaddr (); return myClientPort; @@ -902,7 +902,7 @@ long tcp_clientport () * Returns: server host address */ -char *tcp_serveraddr () +char *tcp_serveraddr (void) { if (!myServerAddr) { char buf[NI_MAXHOST]; @@ -924,7 +924,7 @@ char *tcp_serveraddr () * Returns: server host name */ -char *tcp_serverhost () +char *tcp_serverhost (void) { if (!myServerHost) { /* once-only */ char buf[NI_MAXHOST]; @@ -948,7 +948,7 @@ char *tcp_serverhost () * Returns: server port number */ -long tcp_serverport () +long tcp_serverport (void) { if (!myServerHost && !myServerAddr) tcp_serveraddr (); return myServerPort; diff --git a/imap/src/osdep/unix/tenex.c b/imap/src/osdep/unix/tenex.c index 6d8ec011..c99d4b85 100644 --- a/imap/src/osdep/unix/tenex.c +++ b/imap/src/osdep/unix/tenex.c @@ -42,7 +42,9 @@ #include <stdio.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include <sys/stat.h> diff --git a/imap/src/osdep/unix/unix.c b/imap/src/osdep/unix/unix.c index 4bbaa01a..ec8dab94 100644 --- a/imap/src/osdep/unix/unix.c +++ b/imap/src/osdep/unix/unix.c @@ -40,7 +40,9 @@ #include <stdio.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include <signal.h> #include "mail.h" #include "osdep.h" diff --git a/imap/src/osdep/vms/os_vms.c b/imap/src/osdep/vms/os_vms.c index cd333ba9..7e8b2c84 100644 --- a/imap/src/osdep/vms/os_vms.c +++ b/imap/src/osdep/vms/os_vms.c @@ -38,7 +38,9 @@ #include <netdb.h> #include <ctype.h> #include <errno.h> +#ifndef errno extern int errno; /* just in case */ +#endif #include "misc.h" diff --git a/include/system.h b/include/system.h index 1ae6ad07..ef84c60c 100644 --- a/include/system.h +++ b/include/system.h @@ -96,7 +96,11 @@ void *memset(void *, int, size_t); # define collator strucmp #endif -#define PREREQ_FOR_SYS_TRANSLATION (HAVE_WCHAR_H && HAVE_WCRTOMB && HAVE_WCWIDTH && HAVE_MBSTOWCS && HAVE_LANGINFO_H && defined(CODESET) && !defined(_WINDOWS)) +#if defined(CODESET) && !defined(_WINDOWS) +#define PREREQ_FOR_SYS_TRANSLATION (HAVE_WCHAR_H && HAVE_WCRTOMB && HAVE_WCWIDTH && HAVE_MBSTOWCS && HAVE_LANGINFO_H) +#else +#define PREREQ_FOR_SYS_TRANSLATION (0) +#endif /* System uin32 definition */ #if HAVE_STDINT_H diff --git a/pico/browse.c b/pico/browse.c index 08054e37..c762742d 100644 --- a/pico/browse.c +++ b/pico/browse.c @@ -47,8 +47,10 @@ #ifndef _WINDOWS #if defined(bsd) || defined(lnx) +#ifndef errno extern int errno; #endif +#endif /* diff --git a/pico/fileio.c b/pico/fileio.c index 2847a2d9..236be932 100644 --- a/pico/fileio.c +++ b/pico/fileio.c @@ -24,8 +24,10 @@ #if defined(bsd) || defined(lnx) +#ifndef errno extern int errno; #endif +#endif diff --git a/pico/osdep/filesys.c b/pico/osdep/filesys.c index 75cb91ff..05be5fae 100644 --- a/pico/osdep/filesys.c +++ b/pico/osdep/filesys.c @@ -783,7 +783,9 @@ copy(char *a, char *b) char *cb; struct stat tsb, fsb; EML eml; +#ifndef errno extern int errno; +#endif if(our_stat(a, &fsb) < 0){ /* get source file info */ eml.s = errstr(errno); diff --git a/pith/adrbklib.c b/pith/adrbklib.c index 51099302..578cb0dc 100644 --- a/pith/adrbklib.c +++ b/pith/adrbklib.c @@ -672,7 +672,7 @@ adrbk_is_in_sort_order(AdrBk *ab, int be_quiet) { adrbk_cntr_t entry; AdrBk_Entry *ae, *ae_prev; - int (*cmp_func)(); + int (*cmp_func)(const qsort_t *, const qsort_t *); int we_cancel = 0; dprint((9, "- adrbk_is_in_sort_order -\n")); @@ -1975,7 +1975,7 @@ adrbk_add(AdrBk *ab, a_c_arg_t old_entry_num, char *nickname, char *fullname, AdrBk_Entry *ae; adrbk_cntr_t old_enum; adrbk_cntr_t new_enum; - int (*cmp_func)(); + int (*cmp_func)(const qsort_t *, const qsort_t *); int retval = 0; int need_write = 0; int set_mangled = 0; @@ -2908,7 +2908,7 @@ adrbk_write(AdrBk *ab, a_c_arg_t current_entry_num, adrbk_cntr_t *new_entry_num, AdrBk_Entry *ae = NULL; adrbk_cntr_t entry_num; #ifndef DOS - void (*save_sighup)(); + void (*save_sighup)(int); #endif int max_nick = 0, max_full = 0, full_two = 0, full_three = 0, @@ -3011,7 +3011,7 @@ adrbk_write(AdrBk *ab, a_c_arg_t current_entry_num, adrbk_cntr_t *new_entry_num, } #ifndef DOS - save_sighup = (void (*)())signal(SIGHUP, SIG_IGN); + save_sighup = (void (*)(int))signal(SIGHUP, SIG_IGN); #endif /* diff --git a/pith/busy.h b/pith/busy.h index e79f8eab..a867dad6 100644 --- a/pith/busy.h +++ b/pith/busy.h @@ -18,7 +18,7 @@ #define PITH_BUSY_INCLUDED -typedef int (*percent_done_t)(); /* returns %done for progress status msg */ +typedef int (*percent_done_t)(void); /* returns %done for progress status msg */ /* used to tweak busy without it */ diff --git a/pith/conf.h b/pith/conf.h index 3505f399..c8225fe2 100644 --- a/pith/conf.h +++ b/pith/conf.h @@ -930,10 +930,10 @@ void set_user_certs_container(struct pine *); /* mandatory to implement prototypes */ int set_input_timeout(int); -int get_input_timeout(); +int get_input_timeout(void); /* decide what to do: return 0 to continue, nonzero to abort pinerc write */ -int unexpected_pinerc_change(); +int unexpected_pinerc_change(void); #endif /* PITH_CONFIG_INCLUDED */ diff --git a/pith/debug.h b/pith/debug.h index c33ac578..230ec642 100644 --- a/pith/debug.h +++ b/pith/debug.h @@ -45,7 +45,7 @@ extern int debug; /* mandatory to implement stubs */ void output_debug_msg(int, char *fmt, ...); void dump_configuration(int); -void dump_contexts(); +void dump_contexts(void); diff --git a/pith/osdep/collate.c b/pith/osdep/collate.c index e8a90d21..1481d280 100644 --- a/pith/osdep/collate.c +++ b/pith/osdep/collate.c @@ -20,13 +20,13 @@ /* * global hook */ -int (*pcollator)(); +int (*pcollator)(const char *, const char *); void set_collation(int collation, int ctype) { - extern int collator(); /* set to strcoll if available in system.h */ + extern int collator(const char *, const char *); /* set to strcoll if available in system.h */ pcollator = strucmp; @@ -90,7 +90,7 @@ sstrcasecmp(const qsort_t *s1, const qsort_t *s2) Result: integer indicating which is greater ---*/ int -strucmp(register char *o, register char *r) +strucmp(const char *o, const char *r) { if(o == NULL){ if(r == NULL) @@ -130,7 +130,7 @@ strucmp(register char *o, register char *r) ----*/ int -struncmp(register char *o, register char *r, register int n) +struncmp(const char *o, const char *r, int n) { if(n < 1) return 0; diff --git a/pith/osdep/collate.h b/pith/osdep/collate.h index 182d0fde..e9051691 100644 --- a/pith/osdep/collate.h +++ b/pith/osdep/collate.h @@ -22,11 +22,11 @@ * Exported Prototypes */ void set_collation(int, int); -int strucmp(char *, char *); -int struncmp(char *, char *, int); +int strucmp(const char *, const char *); +int struncmp(const char *, const char *, int); int sstrcasecmp(const qsort_t *, const qsort_t *); -extern int (*pcollator)(); +extern int (*pcollator)(const char*, const char *); #endif /* PITH_OSDEP_COLLATE_INCLUDED */ diff --git a/pith/smime.c b/pith/smime.c index e330d1c9..d0ee89a1 100644 --- a/pith/smime.c +++ b/pith/smime.c @@ -2968,7 +2968,7 @@ do_signature_verify(PKCS7 *p7, BIO *in, BIO *out, int silent) */ typedef struct smime_filter_s { - void (*filter)(); + void (*filter)(char **, unsigned long *, char **, unsigned long *); } SMIME_FILTER_S; SMIME_FILTER_S sig_filter[] = { diff --git a/web/src/alpined.d/alpined.c b/web/src/alpined.d/alpined.c index 4c6f1e56..c02a8e0e 100644 --- a/web/src/alpined.d/alpined.c +++ b/web/src/alpined.d/alpined.c @@ -3865,8 +3865,7 @@ peWriteSig(Tcl_Interp *interp, char *file, Tcl_Obj **objv) -NAMEVAL_S *sort_key_rules(index) - int index; +NAMEVAL_S *sort_key_rules(int index) { static NAMEVAL_S is_rules[] = { {"Arrival", 0}, @@ -3893,8 +3892,7 @@ NAMEVAL_S *sort_key_rules(index) ? &is_rules[index] : NULL); } -NAMEVAL_S *wp_indexheight_rules(index) - int index; +NAMEVAL_S *wp_indexheight_rules(int index) { static NAMEVAL_S is_rules[] = { {"normal font", "24", 0}, @@ -11017,7 +11015,7 @@ pePrepareForAuthException(void) * pePrepareForAuthException - check globals getting feedback from bowels of c-client */ char * -peAuthException() +peAuthException(void) { static char buf[CRED_REQ_SIZE]; @@ -11138,11 +11136,7 @@ peMessageBounce(Tcl_Interp *interp, imapuid_t uid, int objc, Tcl_Obj **objv) int -peMessageSpamNotice(interp, uid, objc, objv) - Tcl_Interp *interp; - imapuid_t uid; - int objc; - Tcl_Obj **objv; +peMessageSpamNotice(Tcl_Interp *interp, imapuid_t uid, int objc, Tcl_Obj **objv) { char *to, *subj = NULL, errbuf[WP_MAX_POST_ERROR + 1], *rs = NULL; long rawno; diff --git a/web/src/alpined.d/alpineldap.c b/web/src/alpined.d/alpineldap.c index 23d4f12f..31655729 100644 --- a/web/src/alpined.d/alpineldap.c +++ b/web/src/alpined.d/alpineldap.c @@ -76,22 +76,17 @@ char peCredentialRequestor[CRED_REQ_SIZE]; STRLIST_S *peCertHosts; void -sml_addmsg(priority, text) - int priority; - char *text; +sml_addmsg(int priority, char *text) { } void -peDestroyUserContext(pps) - struct pine **pps; +peDestroyUserContext(struct pine **pps) { } int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { #ifdef ENABLE_LDAP struct pine *pine_state; diff --git a/web/src/alpined.d/signal.c b/web/src/alpined.d/signal.c index d36a6ec1..a630785b 100644 --- a/web/src/alpined.d/signal.c +++ b/web/src/alpined.d/signal.c @@ -32,7 +32,7 @@ static int cleanup_called_from_sig_handler; static RETSIGTYPE hup_signal(int); static RETSIGTYPE term_signal(int); static RETSIGTYPE auger_in_signal(int); -int fast_clean_up(); +int fast_clean_up(void); void end_signals(int); #if defined(DEBUG) && defined(SIGUSR1) && defined(SIGUSR2) static RETSIGTYPE usr1_signal(int); diff --git a/web/src/alpined.d/stubs.c b/web/src/alpined.d/stubs.c index 55436216..126e536c 100644 --- a/web/src/alpined.d/stubs.c +++ b/web/src/alpined.d/stubs.c @@ -42,7 +42,7 @@ peMarkInputTime(void) /********* ../../../pith/newmail.c stub **********/ time_t -time_of_last_input() +time_of_last_input(void) { return(time_of_input); } @@ -50,8 +50,7 @@ time_of_last_input() /********* ../../../pith/conf.c stub **********/ int -set_input_timeout(t) - int t; +set_input_timeout(int t) { int old_t = input_timeout; @@ -61,14 +60,14 @@ set_input_timeout(t) int -get_input_timeout() +get_input_timeout(void) { return(input_timeout); } int -unexpected_pinerc_change() +unexpected_pinerc_change(void) { dprint((1, "Unexpected pinerc change")); return(0); /* always overwrite */ @@ -76,8 +75,7 @@ unexpected_pinerc_change() /********* ../../../pith/mailcap.c stub **********/ int -exec_mailcap_test_cmd(cmd) - char *cmd; +exec_mailcap_test_cmd(char *cmd) { return(-1); /* never succeeds on web server */ } @@ -96,8 +94,7 @@ exec_mailcap_test_cmd(cmd) This is also called from imap routines and fs_get and fs_resize. ----*/ void -alpine_panic(message) - char *message; +alpine_panic(char *message) { in_panic = 1; @@ -125,7 +122,7 @@ alpine_panic(message) ----*/ int -panicking() +panicking(void) { return(in_panic); } @@ -139,9 +136,7 @@ panicking() ----*/ void -exceptional_exit(message, ev) - char *message; - int ev; +exceptional_exit(char *message, int ev) { syslog(LOG_ALERT, "%s", message); exit(ev); @@ -156,10 +151,7 @@ exceptional_exit(message, ev) Result: prints help messages ----------------------------------------------------------------------*/ void -display_args_err(s, a, err) - char *s; - char **a; - int err; +display_args_err(char *s, char **a, int err) { syslog(LOG_INFO, "Arg Error: %s", s); } |