Several ports fixes

This commit is contained in:
Michiel Broek 2005-01-06 22:21:59 +00:00
parent d7495fce84
commit f5b04a48ab
10 changed files with 20 additions and 10 deletions

View File

@ -3,6 +3,12 @@ $Id$
v0.71.1 28-Nov-2004
porting:
Compiles more or less on x86_64, there are issues with utmp
and struct lastlog
Compiles on NetBSD i386.
Compiles in Alpha.
upgrade:
Make sure you remove everything related to bbslist menus from
your menus and txtfiles.

View File

@ -84,7 +84,7 @@ libnodelist.a: ${NODELIST_OBJS}
ar r $@ $?
${RANLIB} $@
mbcharsetc: ${CHC_OBJS} ${LIBS}
mbcharsetc: ${CHC_OBJS}
${CC} -o mbcharsetc ${CHC_OBJS} ${LDFLAGS} ${LIBS}
charset.bin: mbcharsetc ${MAPS}

View File

@ -90,7 +90,9 @@
#include <zlib.h>
#endif
#include <pthread.h>
#if !defined(__ppc__)
#include <sys/poll.h>
#endif
/* used to use #elif, but native braindead hpux 9.00 c compiler didn't
* * understand it */
@ -138,7 +140,7 @@ struct termios;
#include <stddef.h>
#include <fcntl.h>
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__ppc__)
#include <netinet/in_systm.h>
#include <libgen.h>
#endif

View File

@ -36,7 +36,7 @@
* Signal handler signal names.
*/
#if defined(__i386__)
#if defined(__i386__) || defined(__x86_64__)
char SigName[32][16] = { "NOSIGNAL",
"SIGHUP", "SIGINT", "SIGQUIT", "SIGILL",
@ -48,7 +48,7 @@ char SigName[32][16] = { "NOSIGNAL",
"SIGXFSZ", "SIGVTALRM", "SIGPROF", "SIGWINCH",
"SIGIO", "SIGPWR", "SIGUNUSED"};
#elif defined(__PPC__)
#elif defined(__PPC__) || defined(__ppc__)
char SigName[32][16] = { "NOSIGNAL",
"SIGHUP", "SIGINT", "SIGQUIT", "SIGILL",

View File

@ -354,6 +354,8 @@ char *OsCPU()
{
#ifdef __i386__
return (char *)"i386";
#elif __x86_64__
return (char *)"x86_64";
#elif __PPC__
return (char *)"PPC";
#elif __sparc__

View File

@ -902,7 +902,7 @@ int hydra_batch(int role, file_list *to_send)
} else {
if (to_send) {
txlen = sprintf(txbuf, "%08lx%08lx%08lx%08lx%08lx",
mtime2sl(txstat.st_mtime+(txstat.st_mtime%2)),
(long)mtime2sl(txstat.st_mtime+(txstat.st_mtime%2)),
(long)(txstat.st_size), 0UL, 0UL, 0UL);
/*

View File

@ -222,7 +222,7 @@ static int sendtfile(char *ln, char *rn)
return 0;
}
sprintf(txbuf,"S %s %lu %lu",rn,(unsigned long)st.st_size,st.st_mtime+(st.st_mtime%2));
sprintf(txbuf,"S %s %lu %lu",rn,(unsigned long)st.st_size,(unsigned long)st.st_mtime+(st.st_mtime%2));
bufl = strlen(txbuf);
rc = tcp_sblk(txbuf, bufl, TCP_CMD);
rc = tcp_rblk(rxbuf, &bufl);

View File

@ -213,7 +213,7 @@ static int sendzfile(char *ln, char *rn)
Syslog('+', "Zmodem: size %lu bytes, dated %s", (unsigned long)st.st_size, date(st.st_mtime));
gettimeofday(&starttime, &tz);
sprintf(txbuf,"%s %lu %lo %o 0 0 0", rn,(unsigned long)st.st_size, st.st_mtime+(st.st_mtime%2), st.st_mode);
sprintf(txbuf,"%s %lu %lo %o 0 0 0", rn,(unsigned long)st.st_size, (long)st.st_mtime+((long)st.st_mtime%2), st.st_mode);
bufl = strlen(txbuf);
*(strchr(txbuf,' ')) = '\0'; /*hope no blanks in filename*/

View File

@ -2584,7 +2584,7 @@ unsigned long QWK_PackArea(unsigned long ulLast, long Area)
Total++;
memset(&Qwk, ' ', sizeof(Qwk));
sprintf(Temp, "%-*lu", sizeof(Qwk.Msgnum), (long)Number);
sprintf(Temp, "%-*lu", (int)sizeof(Qwk.Msgnum), (long)Number);
Syslog('M', "Message %s", Temp);
memcpy(Qwk.Msgnum, Temp, sizeof(Qwk.Msgnum));
tp = localtime(&Msg.Written);
@ -2617,7 +2617,7 @@ unsigned long QWK_PackArea(unsigned long ulLast, long Area)
Size += fwrite(Temp, (int)(128L - (Size % 128L)), 1, fdm);
}
sprintf(Qwk.Msgrecs, "%-*lu", sizeof(Qwk.Msgrecs), (long)((ftell(fdm) - Pos) / 128L));
sprintf(Qwk.Msgrecs, "%-*lu", (int)sizeof(Qwk.Msgrecs), (long)((ftell(fdm) - Pos) / 128L));
fseek(fdm, Pos, SEEK_SET);
fwrite(&Qwk, sizeof(Qwk), 1, fdm);
fseek(fdm, 0L, SEEK_END);

View File

@ -36,7 +36,7 @@
* Signal handler signal names.
*/
#if defined(__i386__)
#if defined(__i386__) || defined(__x86_64__)
char SigName[32][16] = { "NOSIGNAL",
"SIGHUP", "SIGINT", "SIGQUIT", "SIGILL",