# # http://www.gluelogic.com/code/PINE-maildir/ # # Extra hint for Opteron (amd64): # When compiling on amd64, use EXTRALDFLAGS="-L/usr/lib64" to avoid the warning: # /usr/bin/ld: skipping incompatible /usr/lib/libncurses.so # when searching for -lncurses # e.g. ./build lrh DEBUG="-g -O2" NOLDAP EXTRALDFLAGS="-L/usr/lib64" # diff -ruN pine4.61/imap/src/c-client/imap4r1.c pine4.61.new/imap/src/c-client/imap4r1.c --- pine4.61/imap/src/c-client/imap4r1.c 2004-07-08 18:02:03.000000000 -0400 +++ pine4.61.new/imap/src/c-client/imap4r1.c 2004-11-05 21:13:37.473546944 -0500 @@ -880,9 +880,9 @@ return NIL; } if (LOCAL->netstream) { /* still in the land of the living? */ - if ((int) mail_parameters (NIL,GET_TRUSTDNS,NIL)) { + if (mail_parameters (NIL,GET_TRUSTDNS,NIL)) { /* remote name for authentication */ - strncpy (mb.host,(int) mail_parameters (NIL,GET_SASLUSESPTRNAME,NIL)? + strncpy (mb.host, mail_parameters (NIL,GET_SASLUSESPTRNAME,NIL) ? net_remotehost (LOCAL->netstream) : net_host (LOCAL->netstream),NETMAXHOST-1); mb.host[NETMAXHOST-1] = '\0'; @@ -928,7 +928,7 @@ stream->perm_draft = LEVELIMAP4 (stream) ? NIL : T; stream->perm_user_flags = LEVELIMAP4 (stream) ? NIL : 0xffffffff; stream->sequence++; /* bump sequence number */ - sprintf (tmp,"{%s",(int) mail_parameters (NIL,GET_TRUSTDNS,NIL) ? + sprintf (tmp,"{%s", mail_parameters (NIL,GET_TRUSTDNS,NIL) ? net_host (LOCAL->netstream) : mb.host); if (!((i = net_port (LOCAL->netstream)) & 0xffff0000)) sprintf (tmp + strlen (tmp),":%lu",i); diff -ruN pine4.61/imap/src/c-client/nntp.c pine4.61.new/imap/src/c-client/nntp.c --- pine4.61/imap/src/c-client/nntp.c 2004-07-08 18:02:03.000000000 -0400 +++ pine4.61.new/imap/src/c-client/nntp.c 2004-11-05 21:12:33.420284520 -0500 @@ -725,7 +725,7 @@ stream->rdonly = stream->perm_deleted = T; /* UIDs are always valid */ stream->uid_validity = 0xbeefface; - sprintf (tmp,"{%s:%lu/nntp",(int) mail_parameters (NIL,GET_TRUSTDNS,NIL) ? + sprintf (tmp,"{%s:%lu/nntp", mail_parameters (NIL,GET_TRUSTDNS,NIL) ? net_host (nstream->netstream) : mb.host, net_port (nstream->netstream)); if (LOCAL->tlsflag) strcat (tmp,"/tls"); @@ -1663,7 +1663,7 @@ /* initialize stream */ memset ((void *) stream,0,sizeof (SENDSTREAM)); stream->netstream = netstream; - stream->host = cpystr ((int) mail_parameters (NIL,GET_TRUSTDNS,NIL) ? + stream->host = cpystr (mail_parameters (NIL,GET_TRUSTDNS,NIL) ? net_host (netstream) : mb.host); stream->debug = (mb.dbgflag || (options & NOP_DEBUG)) ? T : NIL; if (mb.loser) stream->loser = T; @@ -1702,9 +1702,9 @@ return NIL; } if (stream && mb.user[0]) { /* have a session, log in if have user name */ - if ((int) mail_parameters (NIL,GET_TRUSTDNS,NIL)) { + if (mail_parameters (NIL,GET_TRUSTDNS,NIL)) { /* remote name for authentication */ - strncpy (mb.host,(int) mail_parameters (NIL,GET_SASLUSESPTRNAME,NIL) ? + strncpy (mb.host, mail_parameters (NIL,GET_SASLUSESPTRNAME,NIL) ? net_remotehost (netstream) : net_host (netstream),NETMAXHOST-1); mb.host[NETMAXHOST-1] = '\0'; } @@ -1714,8 +1714,8 @@ if (stream) switch ((int) nntp_send_work (stream,"MODE","READER")) { case NNTPWANTAUTH: /* server wants auth first, do so and retry */ case NNTPWANTAUTH2: /* remote name for authentication */ - if ((int) mail_parameters (NIL,GET_TRUSTDNS,NIL)) { - strncpy (mb.host,(int) mail_parameters (NIL,GET_SASLUSESPTRNAME,NIL) ? + if (mail_parameters (NIL,GET_TRUSTDNS,NIL)) { + strncpy (mb.host, mail_parameters (NIL,GET_SASLUSESPTRNAME,NIL) ? net_remotehost (netstream) : net_host (netstream),NETMAXHOST-1); mb.host[NETMAXHOST-1] = '\0'; } @@ -1944,8 +1944,8 @@ NETMBX mb; char tmp[MAILTMPLEN]; /* remote name for authentication */ - sprintf (tmp,"{%.200s/nntp",(int) mail_parameters (NIL,GET_TRUSTDNS,NIL) ? - ((int) mail_parameters (NIL,GET_SASLUSESPTRNAME,NIL) ? + sprintf (tmp,"{%.200s/nntp", mail_parameters (NIL,GET_TRUSTDNS,NIL) ? + (mail_parameters (NIL,GET_SASLUSESPTRNAME,NIL) ? net_remotehost (stream->netstream) : net_host (stream->netstream)): stream->host); if (stream->netstream->dtb == diff -ruN pine4.61/imap/src/c-client/pop3.c pine4.61.new/imap/src/c-client/pop3.c --- pine4.61/imap/src/c-client/pop3.c 2004-05-04 15:09:45.000000000 -0400 +++ pine4.61.new/imap/src/c-client/pop3.c 2004-11-05 21:13:57.010576864 -0500 @@ -415,7 +415,7 @@ int silent = stream->silent; stream->silent = T; sprintf (tmp,"{%.200s:%lu/pop3", - (int) mail_parameters (NIL,GET_TRUSTDNS,NIL) ? + mail_parameters (NIL,GET_TRUSTDNS,NIL) ? net_host (LOCAL->netstream) : mb.host, net_port (LOCAL->netstream)); if (mb.tlsflag) strcat (tmp,"/tls"); @@ -597,9 +597,9 @@ auths &= ~(1 << i); if (auths) { /* got any authenticators? */ - if ((int) mail_parameters (NIL,GET_TRUSTDNS,NIL)) { + if (mail_parameters (NIL,GET_TRUSTDNS,NIL)) { /* remote name for authentication */ - strncpy (mb->host,(int) mail_parameters (NIL,GET_SASLUSESPTRNAME,NIL) ? + strncpy (mb->host, mail_parameters (NIL,GET_SASLUSESPTRNAME,NIL) ? net_remotehost (LOCAL->netstream) : net_host (LOCAL->netstream), NETMAXHOST-1); mb->host[NETMAXHOST-1] = '\0'; diff -ruN pine4.61/imap/src/c-client/smtp.c pine4.61.new/imap/src/c-client/smtp.c --- pine4.61/imap/src/c-client/smtp.c 2004-07-06 15:05:35.000000000 -0400 +++ pine4.61.new/imap/src/c-client/smtp.c 2004-11-05 21:13:11.132551384 -0500 @@ -164,7 +164,7 @@ stream = (SENDSTREAM *) memset (fs_get (sizeof (SENDSTREAM)),0, sizeof (SENDSTREAM)); stream->netstream = netstream; - stream->host = cpystr ((int) mail_parameters (NIL,GET_TRUSTDNS,NIL) ? + stream->host = cpystr (mail_parameters (NIL,GET_TRUSTDNS,NIL) ? net_host (netstream) : mb.host); stream->debug = (mb.dbgflag || (options & OP_DEBUG)) ? T : NIL; if (options & SOP_SECURE) mb.secflag = T; @@ -220,10 +220,10 @@ /* remote name for authentication */ if (stream && ((mb.secflag || mb.user[0]))) { if (ESMTP.auth) { /* use authenticator? */ - if ((int) mail_parameters (NIL,GET_TRUSTDNS,NIL)) { + if (mail_parameters (NIL,GET_TRUSTDNS,NIL)) { /* remote name for authentication */ strncpy (mb.host, - (int) mail_parameters (NIL,GET_SASLUSESPTRNAME,NIL) ? + mail_parameters (NIL,GET_SASLUSESPTRNAME,NIL) ? net_remotehost (netstream) : net_host (netstream), NETMAXHOST-1); mb.host[NETMAXHOST-1] = '\0'; @@ -428,8 +428,8 @@ NETMBX mb; /* yes, build remote name for authentication */ sprintf (tmp,"{%.200s/smtp%s}", - (int) mail_parameters (NIL,GET_TRUSTDNS,NIL) ? - ((int) mail_parameters (NIL,GET_SASLUSESPTRNAME,NIL) ? + mail_parameters (NIL,GET_TRUSTDNS,NIL) ? + (mail_parameters (NIL,GET_SASLUSESPTRNAME,NIL) ? net_remotehost (stream->netstream) : net_host (stream->netstream)) : stream->host, diff -ruN pine4.61/imap/src/c-client/utf8.c pine4.61.new/imap/src/c-client/utf8.c --- pine4.61/imap/src/c-client/utf8.c 2004-06-03 20:52:12.000000000 -0400 +++ pine4.61.new/imap/src/c-client/utf8.c 2004-11-05 21:04:44.526567200 -0500 @@ -733,7 +733,7 @@ ((ten = (c & BITS7) - p2->base_ten) < p2->max_ten)) ? t2[(ku*p2->max_ten) + ten] : UBOGON; else c = ((c1 >= p2->base_ku) && (c1 <= p2->max_ku)) ? - c1 + ((unsigned int) p2->tab) : UBOGON; + c1 + ((unsigned int) (unsigned long) p2->tab) : UBOGON; } else { /* CS2 not set up */ c = UBOGON; /* swallow byte, say bogon */ @@ -748,7 +748,7 @@ ((ten = (c & BITS7) - p3->base_ten) < p3->max_ten)) ? t3[(ku*p3->max_ten) + ten] : UBOGON; else c = ((c1 >= p3->base_ku) && (c1 <= p3->max_ku)) ? - c1 + ((unsigned int) p3->tab) : UBOGON; + c1 + ((unsigned int) (unsigned long) p3->tab) : UBOGON; } else { /* CS3 not set up */ c = UBOGON; /* swallow byte, say bogon */ diff -ruN pine4.61/imap/src/osdep/unix/dummy.c pine4.61.new/imap/src/osdep/unix/dummy.c --- pine4.61/imap/src/osdep/unix/dummy.c 2004-02-02 19:50:32.000000000 -0500 +++ pine4.61.new/imap/src/osdep/unix/dummy.c 2004-11-05 21:42:40.886507888 -0500 @@ -261,7 +261,7 @@ ((sbuf.st_mode & S_IFMT) == S_IFREG)); if (!dir || dir[strlen (dir) - 1] == '/') while (d = readdir (dp)) if (((d->d_name[0] != '.') || - (((int) mail_parameters (NIL,GET_HIDEDOTFILES,NIL)) ? NIL : + ((mail_parameters (NIL,GET_HIDEDOTFILES,NIL)) ? NIL : (d->d_name[1] && (((d->d_name[1] != '.') || d->d_name[2]) && strcmp (d->d_name+1,MXINDEXNAME+2))))) && (strlen (d->d_name) <= NETMAXMBX)) { @@ -426,8 +426,8 @@ *t = '/'; /* restore directory delimiter */ } /* create file */ - else if ((fd = open (path,O_WRONLY|O_CREAT|O_EXCL, - (int) mail_parameters(NIL,GET_MBXPROTECTION,NIL))) >= 0) + else if ((fd = open (path,O_WRONLY|O_CREAT|O_EXCL, (mode_t) + (long)mail_parameters(NIL,GET_MBXPROTECTION,NIL)))>=0) ret = !close (fd); if (!ret) { /* error? */ sprintf (tmp,"Can't create mailbox node %.80s: %.80s",path,strerror (errno)); diff -ruN pine4.61/imap/src/osdep/unix/env_unix.c pine4.61.new/imap/src/osdep/unix/env_unix.c --- pine4.61/imap/src/osdep/unix/env_unix.c 2004-07-08 18:02:04.000000000 -0400 +++ pine4.61.new/imap/src/osdep/unix/env_unix.c 2004-11-05 21:03:49.509931000 -0500 @@ -1621,10 +1621,10 @@ void *ret = data; switch (reason) { case BLOCK_SENSITIVE: /* entering sensitive code */ - ret = (void *) alarm (0); + ret = (void *) (unsigned long) alarm (0); break; case BLOCK_NONSENSITIVE: /* exiting sensitive code */ - if ((unsigned int) data) alarm ((unsigned int) data); + if ((unsigned long) data) alarm ((unsigned int) (unsigned long) data); break; default: /* ignore all other reasons */ break; diff -ruN pine4.61/imap/src/osdep/unix/fdstring.c pine4.61.new/imap/src/osdep/unix/fdstring.c --- pine4.61/imap/src/osdep/unix/fdstring.c 2000-10-24 19:40:49.000000000 -0400 +++ pine4.61.new/imap/src/osdep/unix/fdstring.c 2004-11-05 21:06:13.173090880 -0500 @@ -45,7 +45,7 @@ static void fd_string_init (STRING *s,void *data,unsigned long size) { FDDATA *d = (FDDATA *) data; - s->data = (void *) d->fd; /* note fd */ + s->data = (void *)(long)d->fd;/* note fd */ s->data1 = d->pos; /* note file offset */ s->size = size; /* note size */ s->curpos = s->chunk = d->chunk; @@ -84,7 +84,7 @@ /* set size of data */ if (s->cursize = min (s->chunksize,SIZE (s))) { /* move to that position in the file */ - lseek ((int) s->data,s->data1 + s->offset,L_SET); - read ((int) s->data,s->curpos,(size_t) s->cursize); + lseek ((int)(long) s->data,s->data1 + s->offset,L_SET); + read ((int)(long) s->data,s->curpos,(size_t) s->cursize); } } diff -ruN pine4.61/imap/src/osdep/unix/mbx.c pine4.61.new/imap/src/osdep/unix/mbx.c --- pine4.61/imap/src/osdep/unix/mbx.c 2004-06-18 20:47:36.000000000 -0400 +++ pine4.61.new/imap/src/osdep/unix/mbx.c 2004-11-05 21:42:06.491736688 -0500 @@ -305,8 +305,8 @@ else if (dummy_create_path (stream,s,get_dir_protection (mailbox))) { /* done if made directory */ if ((s = strrchr (s,'/')) && !s[1]) return T; - if ((fd = open (mbx,O_WRONLY|O_BINARY, - (int) mail_parameters (NIL,GET_MBXPROTECTION,NIL))) < 0) { + if ((fd = open (mbx,O_WRONLY|O_BINARY, (mode_t) + (long)mail_parameters (NIL,GET_MBXPROTECTION,NIL))) < 0) { sprintf (tmp,"Can't reopen mailbox node %.80s: %s",mbx,strerror (errno)); MM_LOG (tmp,ERROR); unlink (mbx); /* delete the file */ diff -ruN pine4.61/imap/src/osdep/unix/mmdf.c pine4.61.new/imap/src/osdep/unix/mmdf.c --- pine4.61/imap/src/osdep/unix/mmdf.c 2004-07-08 18:35:46.000000000 -0400 +++ pine4.61.new/imap/src/osdep/unix/mmdf.c 2004-11-05 21:41:53.033782608 -0500 @@ -458,8 +458,8 @@ else if (dummy_create_path (stream,s,get_dir_protection (mailbox))) { /* done if made directory */ if ((s = strrchr (s,'/')) && !s[1]) return T; - if ((fd = open (mbx,O_WRONLY, - (int) mail_parameters (NIL,GET_MBXPROTECTION,NIL))) < 0) { + if ((fd = open (mbx,O_WRONLY, (mode_t) + (long)mail_parameters (NIL,GET_MBXPROTECTION,NIL))) < 0) { sprintf (tmp,"Can't reopen mailbox node %.80s: %s",mbx,strerror (errno)); MM_LOG (tmp,ERROR); unlink (mbx); /* delete the file */ @@ -624,7 +624,8 @@ LOCAL->ld = fd; /* note lock's fd and name */ LOCAL->lname = cpystr (tmp); /* make sure mode OK (don't use fchmod()) */ - chmod (LOCAL->lname,(int) mail_parameters (NIL,GET_LOCKPROTECTION,NIL)); + chmod (LOCAL->lname, + (mode_t)(long)mail_parameters (NIL,GET_LOCKPROTECTION,NIL)); if (stream->silent) i = 0;/* silent streams won't accept KOD */ else { /* note our PID in the lock */ sprintf (tmp,"%d",getpid ()); diff -ruN pine4.61/imap/src/osdep/unix/mx.c pine4.61.new/imap/src/osdep/unix/mx.c --- pine4.61/imap/src/osdep/unix/mx.c 2004-04-27 17:57:32.000000000 -0400 +++ pine4.61.new/imap/src/osdep/unix/mx.c 2004-11-05 21:41:20.247766840 -0500 @@ -323,8 +323,8 @@ mailbox,strerror (errno)); else { /* create index file */ int mask = umask (0); - if (((fd = open (MXINDEX (tmp,mailbox),O_WRONLY|O_CREAT|O_EXCL, - (int) mail_parameters (NIL,GET_MBXPROTECTION,mailbox)))<0) + if (((fd = open (MXINDEX (tmp,mailbox),O_WRONLY|O_CREAT|O_EXCL, (mode_t) + (long)mail_parameters(NIL,GET_MBXPROTECTION,mailbox)))<0) || close (fd)) sprintf (tmp,"Can't create mailbox index %.80s: %s", mailbox,strerror (errno)); diff -ruN pine4.61/imap/src/osdep/unix/unix.c pine4.61.new/imap/src/osdep/unix/unix.c --- pine4.61/imap/src/osdep/unix/unix.c 2004-07-08 18:35:46.000000000 -0400 +++ pine4.61.new/imap/src/osdep/unix/unix.c 2004-11-05 21:42:29.475242664 -0500 @@ -304,8 +304,8 @@ else if (dummy_create_path (stream,s,get_dir_protection (mailbox))) { /* done if made directory */ if ((s = strrchr (s,'/')) && !s[1]) return T; - if ((fd = open (mbx,O_WRONLY, - (int) mail_parameters (NIL,GET_MBXPROTECTION,NIL))) < 0) { + if ((fd = open (mbx,O_WRONLY, (mode_t) + (long)mail_parameters (NIL,GET_MBXPROTECTION,NIL))) < 0) { sprintf (tmp,"Can't reopen mailbox node %.80s: %s",mbx,strerror (errno)); MM_LOG (tmp,ERROR); unlink (mbx); /* delete the file */ @@ -471,7 +471,8 @@ LOCAL->ld = fd; /* note lock's fd and name */ LOCAL->lname = cpystr (tmp); /* make sure mode OK (don't use fchmod()) */ - chmod (LOCAL->lname,(int) mail_parameters (NIL,GET_LOCKPROTECTION,NIL)); + chmod (LOCAL->lname, + (mode_t)(long)mail_parameters (NIL,GET_LOCKPROTECTION,NIL)); if (stream->silent) i = 0;/* silent streams won't accept KOD */ else { /* note our PID in the lock */ sprintf (tmp,"%d",getpid ()); diff -ruN pine4.61/pico/attach.c pine4.61.new/pico/attach.c --- pine4.61/pico/attach.c 2004-06-15 18:22:56.000000000 -0400 +++ pine4.61.new/pico/attach.c 2004-11-05 21:20:28.485063696 -0500 @@ -431,7 +431,7 @@ if(ki){ if((knwn = (PATMT **)malloc((ki+1) * (sizeof(PATMT *)))) == NULL){ emlwrite("\007Can't allocate space for %d known attachment array entries", - (void *) (ki + 1)); + (void *)(long) (ki + 1)); rv = -1; goto exit_early; } @@ -452,7 +452,7 @@ if((bld = (PATMT **)malloc(nbld * (sizeof(PATMT *)))) == NULL){ emlwrite("\007Can't allocate space for %d build array entries", - (void *) nbld); + (void *)(long) nbld); rv = -1; goto exit_early; } @@ -465,7 +465,7 @@ if(bi == nbld){ /* need to grow build array? */ if((bld = (PATMT **)realloc(bld, ++nbld * sizeof(PATMT *))) == NULL){ emlwrite("\007Can't resize build array to %d entries ", - (void *) nbld); + (void *)(long) nbld); rv = -1; goto exit_early; } @@ -773,7 +773,7 @@ } else if(c == ',' || c == ' '){ emlwrite("\007Attchmnt: '%c' not allowed in file name", - (void *)(int)c); + (void *)(long)c); rv = -1; level = TG; /* eat rest of garbage */ break; @@ -907,7 +907,7 @@ else if(!(lbln || quoted) && (c == ',' || c == ' ' || c == '[' || c == ']')){ emlwrite("\007Attchmnt: '%c' not allowed in file name", - (void *)(int)c); + (void *)(long)c); rv = -1; /* bad char in file name */ level = TG; /* gobble garbage */ } diff -ruN pine4.61/pico/browse.c pine4.61.new/pico/browse.c --- pine4.61/pico/browse.c 2004-06-11 17:51:48.000000000 -0400 +++ pine4.61.new/pico/browse.c 2004-11-05 21:21:34.024100248 -0500 @@ -759,7 +759,7 @@ return(0); } - emlwrite("\007Unknown command '%c'", (void *)c); + emlwrite("\007Unknown command '%c'", (void *)(long)c); break; case 'x': /* toggle selection */ @@ -768,7 +768,7 @@ if(gmp->flags & FB_LMODEPOS) emlwrite("\007Type L command to use ListMode", NULL); else - emlwrite("\007Unknown command '%c'", (void *)c); + emlwrite("\007Unknown command '%c'", (void *)(long)c); break; } @@ -807,7 +807,7 @@ } if(!(gmode&MDBRONLY)){ - emlwrite("\007Unknown command '%c'", (void *)c); + emlwrite("\007Unknown command '%c'", (void *)(long)c); break; } @@ -1655,9 +1655,9 @@ default: /* what? */ Default: if(c < 0xff) - emlwrite("\007Unknown command: '%c'", (void *) c); + emlwrite("\007Unknown command: '%c'", (void *)(long) c); else if(c & CTRL) - emlwrite("\007Unknown command: ^%c", (void *)(c&0xff)); + emlwrite("\007Unknown command: ^%c", (void *)(long)(c&0xff)); else emlwrite("\007Unknown command", NULL); case NODATA: /* no op */ diff -ruN pine4.61/pico/composer.c pine4.61.new/pico/composer.c --- pine4.61/pico/composer.c 2004-06-15 18:22:57.000000000 -0400 +++ pine4.61.new/pico/composer.c 2004-11-05 21:22:03.565609256 -0500 @@ -1260,7 +1260,7 @@ default : /* huh? */ bleep: if(ch&CTRL) - emlwrite("\007Unknown command: ^%c", (void *)(ch&0xff)); + emlwrite("\007Unknown command: ^%c", (void *)(long)(ch&0xff)); else case BADESC: emlwrite("\007Unknown command", NULL); @@ -1692,7 +1692,7 @@ && !fallowc((unsigned char) ch)){ /* no garbage in filenames */ emlwrite("\007Can't have a '%c' in folder name", - (void *) ch); + (void *)(long) ch); continue; } else if(headents[ods.cur_e].is_attach diff -ruN pine4.61/pico/display.c pine4.61.new/pico/display.c --- pine4.61/pico/display.c 2004-05-07 17:38:24.000000000 -0400 +++ pine4.61.new/pico/display.c 2004-11-05 21:40:48.699562896 -0500 @@ -1663,16 +1663,16 @@ l += arg ? 2 : 1; break; case 'd': - l += (long)dumbroot((int)arg, 10); + l += (long)dumbroot((int)(long)arg, 10); break; case 'D': l += (long)dumblroot((long)arg, 10); break; case 'o': - l += (long)dumbroot((int)arg, 8); + l += (long)dumbroot((int)(long)arg, 8); break; case 'x': - l += (long)dumbroot((int)arg, 16); + l += (long)dumbroot((int)(long)arg, 16); break; case 's': l += arg ? strlen((char *)arg) : 2; @@ -1694,22 +1694,22 @@ switch(*++bufp){ case 'c': if(arg) - pputc((char)(int)arg, 0); + pputc((char)(long)arg, 0); else { pputs("%c", 0); } break; case 'd': - mlputi((int)arg, 10); + mlputi((int)(long)arg, 10); break; case 'D': mlputli((long)arg, 10); break; case 'o': - mlputi((int)arg, 16); + mlputi((int)(long)arg, 16); break; case 'x': - mlputi((int)arg, 8); + mlputi((int)(long)arg, 8); break; case 's': pputs(arg ? (char *)arg : "%s", 0); diff -ruN pine4.61/pico/file.c pine4.61.new/pico/file.c --- pine4.61/pico/file.c 2004-06-11 17:49:48.000000000 -0400 +++ pine4.61.new/pico/file.c 2004-11-05 21:25:22.147420232 -0500 @@ -713,7 +713,7 @@ } if(s > 1) - emlwrite("Wrote %d lines", (void *)s); + emlwrite("Wrote %d lines", (void *)(long)s); else emlwrite("Wrote 1 line", NULL); } @@ -757,7 +757,7 @@ wp = wp->w_wndp; } if(s > 1){ - emlwrite("Wrote %d lines", (void *)s); + emlwrite("Wrote %d lines", (void *)(long)s); } else emlwrite("Wrote 1 line", NULL); diff -ruN pine4.61/pico/line.c pine4.61.new/pico/line.c --- pine4.61/pico/line.c 2004-05-07 17:41:16.000000000 -0400 +++ pine4.61.new/pico/line.c 2004-11-05 21:25:33.574683024 -0500 @@ -99,7 +99,7 @@ size = NBLOCK; /* line is for type-in. */ if ((lp = (LINE *) malloc(sizeof(LINE)+(size*sizeof(CELL)))) == NULL) { - emlwrite("Cannot allocate %d bytes", (void *)size); + emlwrite("Cannot allocate %d bytes", (void *)(long)size); return (NULL); } diff -ruN pine4.61/pico/main.c pine4.61.new/pico/main.c --- pine4.61/pico/main.c 2004-05-07 17:41:16.000000000 -0400 +++ pine4.61.new/pico/main.c 2004-11-05 21:18:47.066481664 -0500 @@ -247,7 +247,7 @@ curwp->w_flag |= WFMODE; /* and force an update */ if(timeoutset) - emlwrite("Checking for new mail every %D seconds", (void *)timeo); + emlwrite("Checking for new mail every %D seconds", (void *)(long)timeo); forwline(0, starton - 1); /* move dot to specified line */ diff -ruN pine4.61/pico/pico.c pine4.61.new/pico/pico.c --- pine4.61/pico/pico.c 2004-07-12 18:17:06.000000000 -0400 +++ pine4.61.new/pico/pico.c 2004-11-05 21:25:49.492263184 -0500 @@ -567,7 +567,7 @@ } if(c&CTRL) - emlwrite("\007Unknown Command: ^%c", (void *)(c&0xff)); + emlwrite("\007Unknown Command: ^%c", (void *)(long)(c&0xff)); else emlwrite("\007Unknown Command", NULL); diff -ruN pine4.61/pico/pilot.c pine4.61.new/pico/pilot.c --- pine4.61/pico/pilot.c 2004-06-11 17:49:49.000000000 -0400 +++ pine4.61.new/pico/pilot.c 2004-11-05 21:26:43.841000920 -0500 @@ -131,7 +131,7 @@ curbp->b_mode |= gmode; /* and set default modes*/ if(timeo) - emlwrite("Checking for new mail every %D seconds", (void *) timeo); + emlwrite("Checking for new mail every %D seconds", (void *)(long) timeo); set_browser_title(PILOT_VERSION); FileBrowse(filedir, NSTRING, filename, NSTRING, NULL, 0, NULL); diff -ruN pine4.61/pico/search.c pine4.61.new/pico/search.c --- pine4.61/pico/search.c 2004-07-01 17:36:36.000000000 -0400 +++ pine4.61.new/pico/search.c 2004-11-05 21:26:16.380175600 -0500 @@ -478,7 +478,8 @@ chword(realpat, realpat); /* replace word by itself */ update(); if(status == ABORT){ /* if cancelled return */ - emlwrite("Replace All cancelled after %d changes", (char *) n); + emlwrite("Replace All cancelled after %d changes", + (char *)(long) n); return (ABORT); /* ... else keep looking */ } } diff -ruN pine4.61/pine/filter.c pine4.61.new/pine/filter.c --- pine4.61/pine/filter.c 2004-07-08 19:39:42.000000000 -0400 +++ pine4.61.new/pine/filter.c 2004-11-05 21:40:26.275971800 -0500 @@ -739,13 +739,13 @@ #define GF_END(FI, FO) (GF_OP_END(FI), GF_IP_END(FO)) -#define GF_FLUSH(F) ((int)(GF_IP_END(F), (*(F)->f)((F), GF_DATA), \ - GF_IP_INIT(F), GF_EIB_INIT(F))) -#define GF_FLUSH_GLO(F) ((int)(GF_IP_END_GLO(F), (*(F)->f)((F), GF_DATA), \ - GF_IP_INIT_GLO(F), GF_EIB_INIT_GLO(F))) +#define GF_FLUSH(F) ((long)(GF_IP_END(F), (*(F)->f)((F), GF_DATA), \ + GF_IP_INIT(F), GF_EIB_INIT(F))) +#define GF_FLUSH_GLO(F) ((long)(GF_IP_END_GLO(F), (*(F)->f)((F), GF_DATA), \ + GF_IP_INIT_GLO(F), GF_EIB_INIT_GLO(F))) -#define GF_PUTC(F, C) ((int)(*ip++ = (C), (ip >= eib) ? GF_FLUSH(F) : 1)) -#define GF_PUTC_GLO(F, C) ((int)(*(*ipp)++ = (C), ((*ipp) >= (*eibp)) ? GF_FLUSH_GLO(F) : 1)) +#define GF_PUTC(F, C) (*ip++ = (C), (ip >= eib) ? GF_FLUSH(F) : 1L) +#define GF_PUTC_GLO(F, C) (*(*ipp)++ = (C), ((*ipp) >= (*eibp)) ? GF_FLUSH_GLO(F) : 1L) /* * Introducing the *_GLO macros for use in splitting the big macros out * into functions (wrap_flush, wrap_eol). The reason we need a @@ -2546,7 +2546,7 @@ gf_rich2plain_opt(plain) int plain; { - return((void *) plain); + return((void *)(long) plain); } @@ -2744,7 +2744,7 @@ gf_enriched2plain_opt(plain) int plain; { - return((void *) plain); + return((void *)(long) plain); } diff -ruN pine4.61/pine/folder.c pine4.61.new/pine/folder.c --- pine4.61/pine/folder.c 2004-07-12 22:26:16.000000000 -0400 +++ pine4.61.new/pine/folder.c 2004-11-05 21:27:44.573768136 -0500 @@ -2751,7 +2751,7 @@ /*--------------- Invalid Command --------------*/ default: - q_status_message1(SM_ORDER, 0, 2, "MIKE: fix cmd = %x", (void *) cmd); + q_status_message1(SM_ORDER,0,2,"MIKE: fix cmd = %x",(void *)(long)cmd); break; } diff -ruN pine4.61/pine/init.c pine4.61.new/pine/init.c --- pine4.61/pine/init.c 2004-07-15 13:37:24.000000000 -0400 +++ pine4.61.new/pine/init.c 2004-11-05 21:27:59.843446792 -0500 @@ -3072,7 +3072,7 @@ * Turn on gratuitous '>From ' quoting, if requested... */ mail_parameters(NULL, SET_FROMWIDGET, - (void *)(F_ON(F_QUOTE_ALL_FROMS, ps) ? 1 : 0)); + (void *)(F_ON(F_QUOTE_ALL_FROMS, ps) ? 1L : 0L)); /* * Turn off .lock creation complaints... diff -ruN pine4.61/pine/mailcap.c pine4.61.new/pine/mailcap.c --- pine4.61/pine/mailcap.c 2004-05-07 18:51:20.000000000 -0400 +++ pine4.61.new/pine/mailcap.c 2004-11-05 21:28:20.668280936 -0500 @@ -1117,7 +1117,7 @@ dprint(5, (debugfile, "extension=\"%s\"\n", (extension && *extension) ? *extension : "?")); - return((int) *extension); + return((int)(long) *extension); } diff -ruN pine4.61/pine/other.c pine4.61.new/pine/other.c --- pine4.61/pine/other.c 2004-07-02 17:38:16.000000000 -0400 +++ pine4.61.new/pine/other.c 2004-11-05 21:29:32.788317024 -0500 @@ -11667,7 +11667,7 @@ if(on_before != F_ON(f->id, ps)) switch(f->id){ case F_QUOTE_ALL_FROMS : - mail_parameters(NULL,SET_FROMWIDGET,(void *)(F_ON(f->id ,ps) ? 1 : 0)); + mail_parameters(NULL,SET_FROMWIDGET,(void *)(F_ON(f->id ,ps)? 1L : 0L)); break; case F_CMBND_ABOOK_DISP : @@ -11694,22 +11694,22 @@ case F_HIDE_NNTP_PATH : mail_parameters(NULL, SET_NNTPHIDEPATH, - (void *)(F_ON(f->id, ps) ? 1 : 0)); + (void *)(F_ON(f->id, ps) ? 1L : 0L)); break; case F_MAILDROPS_PRESERVE_STATE : mail_parameters(NULL, SET_SNARFPRESERVE, - (void *)(F_ON(f->id, ps) ? 1 : 0)); + (void *)(F_ON(f->id, ps) ? 1L : 0L)); break; case F_DISABLE_SHARED_NAMESPACES : mail_parameters(NULL, SET_DISABLEAUTOSHAREDNS, - (void *)(F_ON(f->id, ps) ? 1 : 0)); + (void *)(F_ON(f->id, ps) ? 1L : 0L)); break; case F_QUELL_LOCK_FAILURE_MSGS : mail_parameters(NULL, SET_LOCKEACCESERROR, - (void *)(F_ON(f->id, ps) ? 1 : 0)); + (void *)(F_ON(f->id, ps) ? 1L : 0L)); break; case F_MULNEWSRC_HOSTNAMES_AS_TYPED : @@ -11719,7 +11719,7 @@ case F_QUELL_INTERNAL_MSG : mail_parameters(NULL, SET_USERHASNOLIFE, - (void *)(F_ON(f->id, ps) ? 1 : 0)); + (void *)(F_ON(f->id, ps) ? 1L : 0L)); break; case F_ENABLE_INCOMING : diff -ruN pine4.61/pine/send.c pine4.61.new/pine/send.c --- pine4.61/pine/send.c 2004-06-30 14:28:02.000000000 -0400 +++ pine4.61.new/pine/send.c 2004-11-05 21:30:14.257012824 -0500 @@ -2510,7 +2510,7 @@ default: q_status_message1(SM_ORDER,3,3, - "Internal error: 1)FreeText header %d", (void *)i); + "Internal error: 1)FreeText header %d", (void *)(long)i); break; } @@ -2567,7 +2567,7 @@ default: q_status_message1(SM_ORDER,3,3, - "Internal error: Address header %d", (void *) i); + "Internal error: Address header %d", (void *)(long) i); break; } break; @@ -3732,7 +3732,7 @@ default: q_status_message1(SM_ORDER,3,7, - "Internal error: Address header %d", (void *)index); + "Internal error: Address header %d", (void *)(long)index); break; }