From: Ian Beckwith Date: Wed, 9 May 2012 04:43:55 +0000 (+0100) Subject: inconsistent types patch from upstream X-Git-Tag: 302-2~6 X-Git-Url: http://erislabs.net/gitweb/?p=ckermit.git;a=commitdiff_plain;h=461d310c445b711dc53afa14c1703508cd86d235 inconsistent types patch from upstream --- diff --git a/ckcpro.w b/ckcpro.w index a6b5f48..a2d1c56 100644 --- a/ckcpro.w +++ b/ckcpro.w @@ -60,7 +60,8 @@ _PROTOTYP(int sndspace,(int)); extern int timint, rtimo, nfils, hcflg, xflg, flow, mdmtyp, network; extern int oopts, omode, oname, opath, nopush, isguest, xcmdsrc, rcdactive; extern int rejection, moving, fncact, bye_active, urserver, fatalio; - extern int protocol, prefixing, filcnt, carrier, fnspath, interrupted; + extern int protocol, prefixing, carrier, fnspath, interrupted; + extern long filcnt; extern int recursive, inserver, nzxopts, idletmo, srvidl, xfrint; extern struct ck_p ptab[]; extern int remfile, rempipe, xferstat, filestatus, wearealike, fackpath; @@ -151,8 +152,9 @@ _PROTOTYP( int cmdsrc, (void) ); extern int quiet, tsecs, parity, backgrd, nakstate, atcapu, wslotn, winlo; extern int wslots, success, xitsta, rprintf, discard, cdtimo, keep, fdispla; extern int timef, stdinf, rscapu, sendmode, epktflg, epktrcvd, epktsent; - extern int binary, fncnv; - extern long speed, ffc, crc16, calibrate, dest; + extern int binary, fncnv, dest; + extern long speed, crc16; + CK_OFF_T calibrate, ffc; #ifdef COMMENT extern char *TYPCMD, *DIRCMD, *DIRCM2; #endif /* COMMENT */ @@ -208,8 +210,9 @@ int whereflg = 1; /* Unset with SET XFER REPORT */ static VOID wheremsg() { - extern int quiet, filrej; - int n; + extern int quiet; + extern long filrej; + long n; n = filcnt - filrej; debug(F101,"wheremsg n","",n); @@ -247,7 +250,7 @@ wheremsg() { switch (myjob) { case 's': if (sfspec) { - printf(" SENT: (%d files)",n); + printf(" SENT: (%ld files)",n); if (srfspec) printf(" Last: [%s]",srfspec); printf(" (%s)\r\n", success ? "OK" : "FAILED"); @@ -256,7 +259,7 @@ wheremsg() { case 'r': case 'v': if (rrfspec) { - printf(" RCVD: (%d files)",n); + printf(" RCVD: (%ld files)",n); if (rfspec) printf(" Last: [%s]",rfspec); printf(" (%s)\r\n", success ? "OK" : "FAILED"); @@ -1507,7 +1510,7 @@ _PROTOTYP(int sndwho,(char *)); ack(); /* If OK, acknowledge */ #endif /* CK_RESEND */ } else { /* Otherwise */ - extern long fsize; + extern CK_OFF_T fsize; char *r; r = getreason(iattr.reply.val); ack1((CHAR *)iattr.reply.val); /* refuse to accept the file */ diff --git a/ckuusx.c b/ckuusx.c index d332bed..6afc465 100644 --- a/ckuusx.c +++ b/ckuusx.c @@ -2361,7 +2361,8 @@ VOID setflow() { extern int flow, autoflow, mdmtyp, cxtype, cxflow[]; #ifndef NODIAL - extern int dialcapas, dialfc; + extern int dialfc; + extern long dialcapas; extern MDMINF * modemp[]; MDMINF * p = NULL; long bits = 0; diff --git a/debian/changelog b/debian/changelog index 7187358..8a7681a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,9 @@ ckermit (302-2) unstable; urgency=low Thanks to Mark Wooding (Closes: #660066). * New patch: 030_fix_dialmessage: fix \v(dialmessage) when dialsta is unset. Further thanks to Mark Wooding (Closes: #660276). + * New patch: 040_fix_types: fix inconsistent type declarations that can + cause a bus error on some platforms. Patch from Edward Berner, + via upstream. * New patch: 900_ck_patch: set ck_patch as we have modified source. * Fix pending l10n issues. Debconf translations: + Dutch; (Thanks to Jeroen Schot). Closes: #660843 @@ -14,7 +17,7 @@ ckermit (302-2) unstable; urgency=low * Update Homepage: to new kermitproject.org site (Closes: #666516). Thanks to Anders Andersson. - -- Ian Beckwith Wed, 09 May 2012 02:25:15 +0100 + -- Ian Beckwith Wed, 09 May 2012 05:42:35 +0100 ckermit (302-1) unstable; urgency=low diff --git a/debian/patches/040_fix_types.patch b/debian/patches/040_fix_types.patch new file mode 100644 index 0000000..5ad3790 --- /dev/null +++ b/debian/patches/040_fix_types.patch @@ -0,0 +1,79 @@ +Index: ckermit/ckcpro.w +=================================================================== +--- ckermit.orig/ckcpro.w 2012-05-09 05:25:12.000000000 +0100 ++++ ckermit/ckcpro.w 2012-05-09 05:26:59.000000000 +0100 +@@ -60,7 +60,8 @@ + extern int timint, rtimo, nfils, hcflg, xflg, flow, mdmtyp, network; + extern int oopts, omode, oname, opath, nopush, isguest, xcmdsrc, rcdactive; + extern int rejection, moving, fncact, bye_active, urserver, fatalio; +- extern int protocol, prefixing, filcnt, carrier, fnspath, interrupted; ++ extern int protocol, prefixing, carrier, fnspath, interrupted; ++ extern long filcnt; + extern int recursive, inserver, nzxopts, idletmo, srvidl, xfrint; + extern struct ck_p ptab[]; + extern int remfile, rempipe, xferstat, filestatus, wearealike, fackpath; +@@ -151,8 +152,9 @@ + extern int quiet, tsecs, parity, backgrd, nakstate, atcapu, wslotn, winlo; + extern int wslots, success, xitsta, rprintf, discard, cdtimo, keep, fdispla; + extern int timef, stdinf, rscapu, sendmode, epktflg, epktrcvd, epktsent; +- extern int binary, fncnv; +- extern long speed, ffc, crc16, calibrate, dest; ++ extern int binary, fncnv, dest; ++ extern long speed, crc16; ++ CK_OFF_T calibrate, ffc; + #ifdef COMMENT + extern char *TYPCMD, *DIRCMD, *DIRCM2; + #endif /* COMMENT */ +@@ -208,8 +210,9 @@ + + static VOID + wheremsg() { +- extern int quiet, filrej; +- int n; ++ extern int quiet; ++ extern long filrej; ++ long n; + n = filcnt - filrej; + debug(F101,"wheremsg n","",n); + +@@ -247,7 +250,7 @@ + switch (myjob) { + case 's': + if (sfspec) { +- printf(" SENT: (%d files)",n); ++ printf(" SENT: (%ld files)",n); + if (srfspec) + printf(" Last: [%s]",srfspec); + printf(" (%s)\r\n", success ? "OK" : "FAILED"); +@@ -256,7 +259,7 @@ + case 'r': + case 'v': + if (rrfspec) { +- printf(" RCVD: (%d files)",n); ++ printf(" RCVD: (%ld files)",n); + if (rfspec) + printf(" Last: [%s]",rfspec); + printf(" (%s)\r\n", success ? "OK" : "FAILED"); +@@ -1507,7 +1510,7 @@ + ack(); /* If OK, acknowledge */ + #endif /* CK_RESEND */ + } else { /* Otherwise */ +- extern long fsize; ++ extern CK_OFF_T fsize; + char *r; + r = getreason(iattr.reply.val); + ack1((CHAR *)iattr.reply.val); /* refuse to accept the file */ +Index: ckermit/ckuusx.c +=================================================================== +--- ckermit.orig/ckuusx.c 2012-05-09 05:25:12.000000000 +0100 ++++ ckermit/ckuusx.c 2012-05-09 05:26:59.000000000 +0100 +@@ -2361,7 +2361,8 @@ + setflow() { + extern int flow, autoflow, mdmtyp, cxtype, cxflow[]; + #ifndef NODIAL +- extern int dialcapas, dialfc; ++ extern int dialfc; ++ extern long dialcapas; + extern MDMINF * modemp[]; + MDMINF * p = NULL; + long bits = 0; diff --git a/debian/patches/series b/debian/patches/series index 9ef71cc..926b4f8 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,5 @@ 010_multiarch-makefile.patch 020_fix_ptys.patch 030_fix_dialmessage.patch +040_fix_types.patch 900_ck_patch.patch