From a55202787df1d5cfd3e37cb4c021422ee4aa9530 Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Sun, 21 Jan 2024 19:03:45 -0700 Subject: [PATCH] =?utf8?q?=20=20=20*=20Clean=20up=20some=20function=20defi?= =?utf8?q?nitions=20to=20comply=20with=20strict=20=20=20=20=20=20prototype?= =?utf8?q?s.=20Suggested=20and=20worked=20in=20part=20by=20Holger=20Hoffst?= =?utf8?q?=C3=A4tte.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- alpine/mailpart.c | 2 +- alpine/rpdump.c | 110 +++++++++-------------------------- alpine/rpload.c | 129 +++++++++-------------------------------- imap/src/osdep/amiga/dummy.c | 2 + imap/src/osdep/amiga/mbx.c | 2 + imap/src/osdep/amiga/mh.c | 2 + imap/src/osdep/amiga/mix.c | 2 + imap/src/osdep/amiga/mmdf.c | 2 + imap/src/osdep/amiga/mtx.c | 2 + imap/src/osdep/amiga/mx.c | 2 + imap/src/osdep/amiga/news.c | 2 + imap/src/osdep/amiga/os_ami.c | 2 + imap/src/osdep/amiga/phile.c | 2 + imap/src/osdep/amiga/tenex.c | 2 + imap/src/osdep/amiga/unix.c | 2 + imap/src/osdep/nt/mbxnt.c | 2 + imap/src/osdep/nt/mtxnt.c | 2 + imap/src/osdep/nt/tenexnt.c | 2 + imap/src/osdep/nt/unixnt.c | 2 + imap/src/osdep/os2/mbxnt.c | 2 + imap/src/osdep/os2/mtxnt.c | 2 + imap/src/osdep/os2/os_os2.c | 2 + imap/src/osdep/os2/tenexnt.c | 2 + imap/src/osdep/os2/unixnt.c | 2 + imap/src/osdep/unix/dummy.c | 2 + imap/src/osdep/unix/env_unix.c | 8 +-- imap/src/osdep/unix/kerb_mit.c | 2 +- imap/src/osdep/unix/mbx.c | 2 + imap/src/osdep/unix/mh.c | 2 + imap/src/osdep/unix/mix.c | 2 + imap/src/osdep/unix/mmdf.c | 2 + imap/src/osdep/unix/mtx.c | 2 + imap/src/osdep/unix/mx.c | 2 + imap/src/osdep/unix/news.c | 2 + imap/src/osdep/unix/os_a32.c | 2 + imap/src/osdep/unix/os_a41.c | 2 + imap/src/osdep/unix/os_a52.c | 2 + imap/src/osdep/unix/os_aix.c | 2 + imap/src/osdep/unix/os_aos.c | 2 + imap/src/osdep/unix/os_art.c | 4 +- imap/src/osdep/unix/os_aux.h | 4 +- imap/src/osdep/unix/os_bsd.c | 2 + imap/src/osdep/unix/os_bsf.c | 2 + imap/src/osdep/unix/os_bsi.c | 2 + imap/src/osdep/unix/os_cvx.c | 2 + imap/src/osdep/unix/os_cyg.c | 2 + imap/src/osdep/unix/os_d-g.c | 2 + imap/src/osdep/unix/os_do4.c | 2 + imap/src/osdep/unix/os_drs.c | 2 + imap/src/osdep/unix/os_dyn.c | 2 + imap/src/osdep/unix/os_hpp.c | 2 + imap/src/osdep/unix/os_lnx.c | 2 + imap/src/osdep/unix/os_lyn.c | 2 + imap/src/osdep/unix/os_mct.c | 2 + imap/src/osdep/unix/os_mnt.c | 2 + imap/src/osdep/unix/os_nto.c | 2 + imap/src/osdep/unix/os_nxt.c | 2 + imap/src/osdep/unix/os_os4.c | 2 + imap/src/osdep/unix/os_osf.c | 2 + imap/src/osdep/unix/os_osx.c | 2 + imap/src/osdep/unix/os_pyr.c | 2 + imap/src/osdep/unix/os_qn6.c | 2 + imap/src/osdep/unix/os_qnx.c | 2 + imap/src/osdep/unix/os_s40.c | 2 + imap/src/osdep/unix/os_sgi.c | 2 + imap/src/osdep/unix/os_shp.c | 2 + imap/src/osdep/unix/os_slx.c | 2 + imap/src/osdep/unix/os_sos.c | 2 + imap/src/osdep/unix/os_sua.c | 2 + imap/src/osdep/unix/os_sun.c | 2 + imap/src/osdep/unix/os_sv2.c | 4 +- imap/src/osdep/unix/os_ult.c | 2 + imap/src/osdep/unix/os_vu2.c | 2 + imap/src/osdep/unix/phile.c | 2 + imap/src/osdep/unix/tcp_unix.c | 12 ++-- imap/src/osdep/unix/tenex.c | 2 + imap/src/osdep/unix/unix.c | 2 + imap/src/osdep/vms/os_vms.c | 2 + include/system.h | 6 +- pico/browse.c | 2 + pico/fileio.c | 2 + pico/osdep/filesys.c | 2 + pith/adrbklib.c | 8 +-- pith/busy.h | 2 +- pith/conf.h | 4 +- pith/debug.h | 2 +- pith/osdep/collate.c | 8 +-- pith/osdep/collate.h | 6 +- pith/smime.c | 2 +- web/src/alpined.d/alpined.c | 14 ++--- web/src/alpined.d/alpineldap.c | 11 +--- web/src/alpined.d/signal.c | 2 +- web/src/alpined.d/stubs.c | 26 +++------ 93 files changed, 258 insertions(+), 252 deletions(-) diff --git a/alpine/mailpart.c b/alpine/mailpart.c index 9adad9d..63ead76 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 680ab0d..d3708b7 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 dd3e43e..9f53b50 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 cb3b45b..b33297e 100644 --- a/imap/src/osdep/amiga/dummy.c +++ b/imap/src/osdep/amiga/dummy.c @@ -27,7 +27,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include diff --git a/imap/src/osdep/amiga/mbx.c b/imap/src/osdep/amiga/mbx.c index 3cc89c9..bf3aa0a 100644 --- a/imap/src/osdep/amiga/mbx.c +++ b/imap/src/osdep/amiga/mbx.c @@ -37,7 +37,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include diff --git a/imap/src/osdep/amiga/mh.c b/imap/src/osdep/amiga/mh.c index a7b56e8..02bb917 100644 --- a/imap/src/osdep/amiga/mh.c +++ b/imap/src/osdep/amiga/mh.c @@ -27,7 +27,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include diff --git a/imap/src/osdep/amiga/mix.c b/imap/src/osdep/amiga/mix.c index 9ab3442..9c5ad9d 100644 --- a/imap/src/osdep/amiga/mix.c +++ b/imap/src/osdep/amiga/mix.c @@ -26,7 +26,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include diff --git a/imap/src/osdep/amiga/mmdf.c b/imap/src/osdep/amiga/mmdf.c index e962434..8e26a6c 100644 --- a/imap/src/osdep/amiga/mmdf.c +++ b/imap/src/osdep/amiga/mmdf.c @@ -28,7 +28,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #include "mail.h" #include "osdep.h" diff --git a/imap/src/osdep/amiga/mtx.c b/imap/src/osdep/amiga/mtx.c index 4c98956..1502b86 100644 --- a/imap/src/osdep/amiga/mtx.c +++ b/imap/src/osdep/amiga/mtx.c @@ -37,7 +37,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include diff --git a/imap/src/osdep/amiga/mx.c b/imap/src/osdep/amiga/mx.c index 7e2b022..f2d6b3d 100644 --- a/imap/src/osdep/amiga/mx.c +++ b/imap/src/osdep/amiga/mx.c @@ -30,7 +30,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include diff --git a/imap/src/osdep/amiga/news.c b/imap/src/osdep/amiga/news.c index 9c9f738..34ad6b4 100644 --- a/imap/src/osdep/amiga/news.c +++ b/imap/src/osdep/amiga/news.c @@ -30,7 +30,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include diff --git a/imap/src/osdep/amiga/os_ami.c b/imap/src/osdep/amiga/os_ami.c index 9f0d27b..90d611c 100644 --- a/imap/src/osdep/amiga/os_ami.c +++ b/imap/src/osdep/amiga/os_ami.c @@ -39,7 +39,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #include "misc.h" diff --git a/imap/src/osdep/amiga/phile.c b/imap/src/osdep/amiga/phile.c index ce72d0a..e01eec2 100644 --- a/imap/src/osdep/amiga/phile.c +++ b/imap/src/osdep/amiga/phile.c @@ -30,7 +30,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #include "mail.h" #include "osdep.h" diff --git a/imap/src/osdep/amiga/tenex.c b/imap/src/osdep/amiga/tenex.c index 0982573..c3f95e5 100644 --- a/imap/src/osdep/amiga/tenex.c +++ b/imap/src/osdep/amiga/tenex.c @@ -42,7 +42,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include diff --git a/imap/src/osdep/amiga/unix.c b/imap/src/osdep/amiga/unix.c index be3c437..e553662 100644 --- a/imap/src/osdep/amiga/unix.c +++ b/imap/src/osdep/amiga/unix.c @@ -40,7 +40,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #include "mail.h" #include "osdep.h" diff --git a/imap/src/osdep/nt/mbxnt.c b/imap/src/osdep/nt/mbxnt.c index f35bfa6..859d06e 100644 --- a/imap/src/osdep/nt/mbxnt.c +++ b/imap/src/osdep/nt/mbxnt.c @@ -37,7 +37,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include diff --git a/imap/src/osdep/nt/mtxnt.c b/imap/src/osdep/nt/mtxnt.c index fa80afd..90e7927 100644 --- a/imap/src/osdep/nt/mtxnt.c +++ b/imap/src/osdep/nt/mtxnt.c @@ -37,7 +37,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include diff --git a/imap/src/osdep/nt/tenexnt.c b/imap/src/osdep/nt/tenexnt.c index 054ce73..c1c5794 100644 --- a/imap/src/osdep/nt/tenexnt.c +++ b/imap/src/osdep/nt/tenexnt.c @@ -42,7 +42,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include diff --git a/imap/src/osdep/nt/unixnt.c b/imap/src/osdep/nt/unixnt.c index 8c14798..1b9ee3a 100644 --- a/imap/src/osdep/nt/unixnt.c +++ b/imap/src/osdep/nt/unixnt.c @@ -40,7 +40,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include diff --git a/imap/src/osdep/os2/mbxnt.c b/imap/src/osdep/os2/mbxnt.c index 5ea3b57..44276ad 100644 --- a/imap/src/osdep/os2/mbxnt.c +++ b/imap/src/osdep/os2/mbxnt.c @@ -37,7 +37,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include diff --git a/imap/src/osdep/os2/mtxnt.c b/imap/src/osdep/os2/mtxnt.c index 0ca88fb..7a4d044 100644 --- a/imap/src/osdep/os2/mtxnt.c +++ b/imap/src/osdep/os2/mtxnt.c @@ -37,7 +37,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include diff --git a/imap/src/osdep/os2/os_os2.c b/imap/src/osdep/os2/os_os2.c index 9c6f2f5..172b33e 100644 --- a/imap/src/osdep/os2/os_os2.c +++ b/imap/src/osdep/os2/os_os2.c @@ -37,7 +37,9 @@ #include #include #include +#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 4c1d0a3..4609bfd 100644 --- a/imap/src/osdep/os2/tenexnt.c +++ b/imap/src/osdep/os2/tenexnt.c @@ -42,7 +42,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include diff --git a/imap/src/osdep/os2/unixnt.c b/imap/src/osdep/os2/unixnt.c index 2e92d39..0bf45ca 100644 --- a/imap/src/osdep/os2/unixnt.c +++ b/imap/src/osdep/os2/unixnt.c @@ -40,7 +40,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include diff --git a/imap/src/osdep/unix/dummy.c b/imap/src/osdep/unix/dummy.c index 646f67e..992d855 100644 --- a/imap/src/osdep/unix/dummy.c +++ b/imap/src/osdep/unix/dummy.c @@ -27,7 +27,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include diff --git a/imap/src/osdep/unix/env_unix.c b/imap/src/osdep/unix/env_unix.c index c41a5d0..c2fae37 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 82e6c93..f4b4e5e 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 3770e0a..48a555b 100644 --- a/imap/src/osdep/unix/mbx.c +++ b/imap/src/osdep/unix/mbx.c @@ -37,7 +37,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include diff --git a/imap/src/osdep/unix/mh.c b/imap/src/osdep/unix/mh.c index 68e3aa6..565332d 100644 --- a/imap/src/osdep/unix/mh.c +++ b/imap/src/osdep/unix/mh.c @@ -27,7 +27,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include diff --git a/imap/src/osdep/unix/mix.c b/imap/src/osdep/unix/mix.c index 11b4b3a..dc7981d 100644 --- a/imap/src/osdep/unix/mix.c +++ b/imap/src/osdep/unix/mix.c @@ -26,7 +26,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include diff --git a/imap/src/osdep/unix/mmdf.c b/imap/src/osdep/unix/mmdf.c index 5cfa197..7019614 100644 --- a/imap/src/osdep/unix/mmdf.c +++ b/imap/src/osdep/unix/mmdf.c @@ -28,7 +28,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #include "mail.h" #include "osdep.h" diff --git a/imap/src/osdep/unix/mtx.c b/imap/src/osdep/unix/mtx.c index 0afa337..d225731 100644 --- a/imap/src/osdep/unix/mtx.c +++ b/imap/src/osdep/unix/mtx.c @@ -37,7 +37,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include diff --git a/imap/src/osdep/unix/mx.c b/imap/src/osdep/unix/mx.c index 6ba04ca..274f88f 100644 --- a/imap/src/osdep/unix/mx.c +++ b/imap/src/osdep/unix/mx.c @@ -30,7 +30,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include diff --git a/imap/src/osdep/unix/news.c b/imap/src/osdep/unix/news.c index beda8a6..a733d57 100644 --- a/imap/src/osdep/unix/news.c +++ b/imap/src/osdep/unix/news.c @@ -30,7 +30,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include diff --git a/imap/src/osdep/unix/os_a32.c b/imap/src/osdep/unix/os_a32.c index 513e92c..4c63bf3 100644 --- a/imap/src/osdep/unix/os_a32.c +++ b/imap/src/osdep/unix/os_a32.c @@ -38,7 +38,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #include "misc.h" #include diff --git a/imap/src/osdep/unix/os_a41.c b/imap/src/osdep/unix/os_a41.c index ecaff58..c7e66d3 100644 --- a/imap/src/osdep/unix/os_a41.c +++ b/imap/src/osdep/unix/os_a41.c @@ -38,7 +38,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #include "misc.h" #include diff --git a/imap/src/osdep/unix/os_a52.c b/imap/src/osdep/unix/os_a52.c index fed6af7..396ddc6 100644 --- a/imap/src/osdep/unix/os_a52.c +++ b/imap/src/osdep/unix/os_a52.c @@ -38,7 +38,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #include "misc.h" #include diff --git a/imap/src/osdep/unix/os_aix.c b/imap/src/osdep/unix/os_aix.c index c38e5cf..8ea809b 100644 --- a/imap/src/osdep/unix/os_aix.c +++ b/imap/src/osdep/unix/os_aix.c @@ -38,7 +38,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #include "misc.h" diff --git a/imap/src/osdep/unix/os_aos.c b/imap/src/osdep/unix/os_aos.c index a916f47..96bc5fe 100644 --- a/imap/src/osdep/unix/os_aos.c +++ b/imap/src/osdep/unix/os_aos.c @@ -37,7 +37,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #include "misc.h" diff --git a/imap/src/osdep/unix/os_art.c b/imap/src/osdep/unix/os_art.c index 8fb7802..f3111c0 100644 --- a/imap/src/osdep/unix/os_art.c +++ b/imap/src/osdep/unix/os_art.c @@ -36,7 +36,9 @@ #include #include #include -extern int errno; +#ifndef errno +extern int errno; /* just in case */ +#endif #include #include #include diff --git a/imap/src/osdep/unix/os_aux.h b/imap/src/osdep/unix/os_aux.h index 53ec6cc..304e996 100644 --- a/imap/src/osdep/unix/os_aux.h +++ b/imap/src/osdep/unix/os_aux.h @@ -37,7 +37,9 @@ #include -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 a916f47..96bc5fe 100644 --- a/imap/src/osdep/unix/os_bsd.c +++ b/imap/src/osdep/unix/os_bsd.c @@ -37,7 +37,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #include "misc.h" diff --git a/imap/src/osdep/unix/os_bsf.c b/imap/src/osdep/unix/os_bsf.c index f32b1fb..ee66ca2 100644 --- a/imap/src/osdep/unix/os_bsf.c +++ b/imap/src/osdep/unix/os_bsf.c @@ -35,7 +35,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #include "misc.h" diff --git a/imap/src/osdep/unix/os_bsi.c b/imap/src/osdep/unix/os_bsi.c index f32b1fb..ee66ca2 100644 --- a/imap/src/osdep/unix/os_bsi.c +++ b/imap/src/osdep/unix/os_bsi.c @@ -35,7 +35,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #include "misc.h" diff --git a/imap/src/osdep/unix/os_cvx.c b/imap/src/osdep/unix/os_cvx.c index 10f0190..09d4981 100644 --- a/imap/src/osdep/unix/os_cvx.c +++ b/imap/src/osdep/unix/os_cvx.c @@ -42,7 +42,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #include "misc.h" diff --git a/imap/src/osdep/unix/os_cyg.c b/imap/src/osdep/unix/os_cyg.c index c9cd2f7..fc300e3 100644 --- a/imap/src/osdep/unix/os_cyg.c +++ b/imap/src/osdep/unix/os_cyg.c @@ -38,7 +38,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #include #include "misc.h" diff --git a/imap/src/osdep/unix/os_d-g.c b/imap/src/osdep/unix/os_d-g.c index b34662f..96d2b57 100644 --- a/imap/src/osdep/unix/os_d-g.c +++ b/imap/src/osdep/unix/os_d-g.c @@ -38,7 +38,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #include "misc.h" diff --git a/imap/src/osdep/unix/os_do4.c b/imap/src/osdep/unix/os_do4.c index 186fd94..95da87e 100644 --- a/imap/src/osdep/unix/os_do4.c +++ b/imap/src/osdep/unix/os_do4.c @@ -36,7 +36,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #include "misc.h" diff --git a/imap/src/osdep/unix/os_drs.c b/imap/src/osdep/unix/os_drs.c index 74386af..35c2e35 100644 --- a/imap/src/osdep/unix/os_drs.c +++ b/imap/src/osdep/unix/os_drs.c @@ -38,7 +38,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #include "misc.h" diff --git a/imap/src/osdep/unix/os_dyn.c b/imap/src/osdep/unix/os_dyn.c index 98a1a54..dd86437 100644 --- a/imap/src/osdep/unix/os_dyn.c +++ b/imap/src/osdep/unix/os_dyn.c @@ -37,7 +37,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #include "misc.h" diff --git a/imap/src/osdep/unix/os_hpp.c b/imap/src/osdep/unix/os_hpp.c index 3979497..ca7f1cd 100644 --- a/imap/src/osdep/unix/os_hpp.c +++ b/imap/src/osdep/unix/os_hpp.c @@ -44,7 +44,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif extern char *sys_errlist[]; extern int sys_nerr; #include diff --git a/imap/src/osdep/unix/os_lnx.c b/imap/src/osdep/unix/os_lnx.c index e95b2ac..0b4b3eb 100644 --- a/imap/src/osdep/unix/os_lnx.c +++ b/imap/src/osdep/unix/os_lnx.c @@ -35,7 +35,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #include "misc.h" diff --git a/imap/src/osdep/unix/os_lyn.c b/imap/src/osdep/unix/os_lyn.c index 4987125..4e59250 100644 --- a/imap/src/osdep/unix/os_lyn.c +++ b/imap/src/osdep/unix/os_lyn.c @@ -38,7 +38,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #include "misc.h" diff --git a/imap/src/osdep/unix/os_mct.c b/imap/src/osdep/unix/os_mct.c index cb62de5..3524301 100644 --- a/imap/src/osdep/unix/os_mct.c +++ b/imap/src/osdep/unix/os_mct.c @@ -38,7 +38,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #include "misc.h" diff --git a/imap/src/osdep/unix/os_mnt.c b/imap/src/osdep/unix/os_mnt.c index f19a487..6f25714 100644 --- a/imap/src/osdep/unix/os_mnt.c +++ b/imap/src/osdep/unix/os_mnt.c @@ -38,7 +38,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #include "misc.h" diff --git a/imap/src/osdep/unix/os_nto.c b/imap/src/osdep/unix/os_nto.c index 36c45b4..0dfcd83 100644 --- a/imap/src/osdep/unix/os_nto.c +++ b/imap/src/osdep/unix/os_nto.c @@ -38,7 +38,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #include #include diff --git a/imap/src/osdep/unix/os_nxt.c b/imap/src/osdep/unix/os_nxt.c index a3b749f..7bb754b 100644 --- a/imap/src/osdep/unix/os_nxt.c +++ b/imap/src/osdep/unix/os_nxt.c @@ -38,7 +38,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #include "misc.h" diff --git a/imap/src/osdep/unix/os_os4.c b/imap/src/osdep/unix/os_os4.c index 42d9040..5fe1e79 100644 --- a/imap/src/osdep/unix/os_os4.c +++ b/imap/src/osdep/unix/os_os4.c @@ -38,7 +38,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #include "misc.h" #include diff --git a/imap/src/osdep/unix/os_osf.c b/imap/src/osdep/unix/os_osf.c index 560a3b5..9dbfa9d 100644 --- a/imap/src/osdep/unix/os_osf.c +++ b/imap/src/osdep/unix/os_osf.c @@ -38,7 +38,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #include "misc.h" #include diff --git a/imap/src/osdep/unix/os_osx.c b/imap/src/osdep/unix/os_osx.c index 1788e21..40561b7 100644 --- a/imap/src/osdep/unix/os_osx.c +++ b/imap/src/osdep/unix/os_osx.c @@ -36,7 +36,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #include "misc.h" diff --git a/imap/src/osdep/unix/os_pyr.c b/imap/src/osdep/unix/os_pyr.c index 69c8e7e..64c1722 100644 --- a/imap/src/osdep/unix/os_pyr.c +++ b/imap/src/osdep/unix/os_pyr.c @@ -41,7 +41,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #include "misc.h" diff --git a/imap/src/osdep/unix/os_qn6.c b/imap/src/osdep/unix/os_qn6.c index ded8c84..1ca6073 100644 --- a/imap/src/osdep/unix/os_qn6.c +++ b/imap/src/osdep/unix/os_qn6.c @@ -35,7 +35,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #include #include diff --git a/imap/src/osdep/unix/os_qnx.c b/imap/src/osdep/unix/os_qnx.c index b138251..d273545 100644 --- a/imap/src/osdep/unix/os_qnx.c +++ b/imap/src/osdep/unix/os_qnx.c @@ -38,7 +38,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #include #include diff --git a/imap/src/osdep/unix/os_s40.c b/imap/src/osdep/unix/os_s40.c index 3dc2fe6..d5faec9 100644 --- a/imap/src/osdep/unix/os_s40.c +++ b/imap/src/osdep/unix/os_s40.c @@ -38,7 +38,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #include "misc.h" diff --git a/imap/src/osdep/unix/os_sgi.c b/imap/src/osdep/unix/os_sgi.c index 3e5eb55..0044b47 100644 --- a/imap/src/osdep/unix/os_sgi.c +++ b/imap/src/osdep/unix/os_sgi.c @@ -39,7 +39,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #include "misc.h" diff --git a/imap/src/osdep/unix/os_shp.c b/imap/src/osdep/unix/os_shp.c index eb7e4e8..da657fb 100644 --- a/imap/src/osdep/unix/os_shp.c +++ b/imap/src/osdep/unix/os_shp.c @@ -44,7 +44,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif extern char *sys_errlist[]; extern int sys_nerr; #include diff --git a/imap/src/osdep/unix/os_slx.c b/imap/src/osdep/unix/os_slx.c index 95c586a..5b672c3 100644 --- a/imap/src/osdep/unix/os_slx.c +++ b/imap/src/osdep/unix/os_slx.c @@ -35,7 +35,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #include #include "misc.h" diff --git a/imap/src/osdep/unix/os_sos.c b/imap/src/osdep/unix/os_sos.c index 8256aaf..4f7c95a 100644 --- a/imap/src/osdep/unix/os_sos.c +++ b/imap/src/osdep/unix/os_sos.c @@ -38,7 +38,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #include "misc.h" #include diff --git a/imap/src/osdep/unix/os_sua.c b/imap/src/osdep/unix/os_sua.c index dcf9311..c908b9d 100644 --- a/imap/src/osdep/unix/os_sua.c +++ b/imap/src/osdep/unix/os_sua.c @@ -38,7 +38,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #include "misc.h" diff --git a/imap/src/osdep/unix/os_sun.c b/imap/src/osdep/unix/os_sun.c index 5348ef5..ce7cc39 100644 --- a/imap/src/osdep/unix/os_sun.c +++ b/imap/src/osdep/unix/os_sun.c @@ -38,7 +38,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #include "misc.h" diff --git a/imap/src/osdep/unix/os_sv2.c b/imap/src/osdep/unix/os_sv2.c index 14e3951..880995f 100644 --- a/imap/src/osdep/unix/os_sv2.c +++ b/imap/src/osdep/unix/os_sv2.c @@ -36,7 +36,9 @@ #include #include #include -extern int errno; +#ifndef errno +extern int errno; /* just in case */ +#endif #include #include #include diff --git a/imap/src/osdep/unix/os_ult.c b/imap/src/osdep/unix/os_ult.c index 28b72ec..ebcf2a0 100644 --- a/imap/src/osdep/unix/os_ult.c +++ b/imap/src/osdep/unix/os_ult.c @@ -37,7 +37,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #include "misc.h" diff --git a/imap/src/osdep/unix/os_vu2.c b/imap/src/osdep/unix/os_vu2.c index 0b9c026..2bbe476 100644 --- a/imap/src/osdep/unix/os_vu2.c +++ b/imap/src/osdep/unix/os_vu2.c @@ -37,7 +37,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #include "misc.h" diff --git a/imap/src/osdep/unix/phile.c b/imap/src/osdep/unix/phile.c index e930841..a972f25 100644 --- a/imap/src/osdep/unix/phile.c +++ b/imap/src/osdep/unix/phile.c @@ -30,7 +30,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #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 cf18bb6..e601164 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 6d8ec01..c99d4b8 100644 --- a/imap/src/osdep/unix/tenex.c +++ b/imap/src/osdep/unix/tenex.c @@ -42,7 +42,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include "mail.h" #include "osdep.h" #include diff --git a/imap/src/osdep/unix/unix.c b/imap/src/osdep/unix/unix.c index 4bbaa01..ec8dab9 100644 --- a/imap/src/osdep/unix/unix.c +++ b/imap/src/osdep/unix/unix.c @@ -40,7 +40,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include #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 cd333ba..7e8b2c8 100644 --- a/imap/src/osdep/vms/os_vms.c +++ b/imap/src/osdep/vms/os_vms.c @@ -38,7 +38,9 @@ #include #include #include +#ifndef errno extern int errno; /* just in case */ +#endif #include "misc.h" diff --git a/include/system.h b/include/system.h index 1ae6ad0..ef84c60 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 08054e3..c762742 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 2847a2d..236be93 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 75cb91f..05be5fa 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 5109930..578cb0d 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 e79f8ea..a867dad 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 3505f39..c8225fe 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 c33ac57..230ec64 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 e8a90d2..1481d28 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 182d0fd..e905169 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 e330d1c..d0ee89a 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 4c6f1e5..c02a8e0 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 23d4f12..3165572 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 d36a6ec..a630785 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 5543621..126e536 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); } -- 2.11.4.GIT