Sparc systems fixes

This commit is contained in:
Michiel Broek
2001-12-23 16:44:18 +00:00
parent 2ce85589e4
commit a372efaea8
62 changed files with 170 additions and 193 deletions

View File

@@ -1,8 +1,7 @@
/*****************************************************************************
*
* File ..................: mbfido/addpkt.c
* $Id$
* Purpose ...............: Add mail to .pkt
* Last modification date : 31-Jul-2001
*
*****************************************************************************
* Copyright (C) 1997-2001
@@ -68,7 +67,7 @@ FILE *CreatePkt(char *Queue, fidoaddr Orig, fidoaddr Dest, char *Extension)
* Write .PKT header, see FSC-0039 rev. 4
*/
memset(&buffer, 0, sizeof(buffer));
time(&Now);
Now = time(NULL);
Tm = localtime(&Now);
if (Tm->tm_sec > 59)
Tm->tm_sec = 59;

View File

@@ -1,8 +1,7 @@
/*****************************************************************************
*
* File ..................: mbfido/aliasdb.c
* $Id$
* Purpose ...............: Alias Database
* Last modification date : 11-May-2001
*
*****************************************************************************
* Copyright (C) 1997-2001
@@ -137,7 +136,7 @@ int registrate(char *freename, char *address)
/*
* Already present, update date/time.
*/
time(&key.dtime);
key.dtime = time(NULL);
fseek(afp, - sizeof(key), SEEK_CUR);
fwrite(&key, sizeof(key), 1, afp);
close_alias_db();
@@ -147,7 +146,7 @@ int registrate(char *freename, char *address)
sprintf(key.freename, "%s", buf);
sprintf(key.address, "%s", address);
time(&key.dtime);
key.dtime = time(NULL);
if (fwrite(&key, sizeof(key), 1, afp) != 1) {
WriteError("$Cannot store: \"%s\" \"%s\"", MBSE_SS(buf), MBSE_SS(address));

View File

@@ -1,9 +1,7 @@
/*****************************************************************************
*
* File ..................: mbfido/ftn2rfc.c
* $Id$
* Purpose ...............: Gate netmail->email or echomail->news
* Last modification date : 29-Oct-2001
* Last modification date : 30-Oct-2001
*
*****************************************************************************
* Copyright (C) 1997-2001
@@ -900,7 +898,7 @@ int ftn2rfc(faddr *f, faddr *t, char *subj, char *origline, time_t mdate, int fl
}
} else { /* if newsmode */
time(&now);
now = time(NULL);
if (CFG.EmailMode == E_NOISP) {
/*
* Probaly not needed as messages for systems without ISP never get here.
@@ -1083,13 +1081,14 @@ int ftn2rfc(faddr *f, faddr *t, char *subj, char *origline, time_t mdate, int fl
/*
* Restamp future postings
*/
if(mdate > time(&now)) {
now = time(NULL);
if (mdate > now) {
Syslog('+', "Future posting: %s", rfcdate(mdate));
sprintf(temp,"Date: %s\n", rfcdate(now));
Send(newsmode, temp);
sprintf(temp,"X-Origin-Date: %s\n", rfcdate(mdate));
Send(newsmode, temp);
} else if((mdate < time(&now)-14*24*60*60) && (mdate > time(&now)-RESTAMP_OLD_POSTINGS*24*60*60)) {
} else if ((mdate < now-14*24*60*60) && (mdate > time(&now)-RESTAMP_OLD_POSTINGS*24*60*60)) {
/*
* Restamp old postings
*/

View File

@@ -74,7 +74,7 @@ void die(int onsig)
WriteError("Terminated with error %d", onsig);
}
time(&t_end);
t_end = time(NULL);
Syslog(' ', "MBAFF finished in %s", t_elapsed(t_start, t_end));
if (!do_quiet) {
@@ -98,7 +98,7 @@ int main(int argc, char **argv)
#endif
InitConfig();
TermInit(1);
time(&t_start);
t_start = time(NULL);
t = localtime(&t_start);
Diw = t->tm_wday;
Miy = t->tm_mon;

View File

@@ -98,7 +98,7 @@ void die(int onsig)
WriteError("Terminated with error %d", onsig);
}
time(&t_end);
t_end = time(NULL);
Syslog(' ', "MBDIFF finished in %s", t_elapsed(t_start, t_end));
if (!do_quiet) {
@@ -126,7 +126,7 @@ int main(int argc, char **argv)
#endif
InitConfig();
TermInit(1);
time(&t_start);
t_start = time(NULL);
umask(002);
/*

View File

@@ -234,7 +234,7 @@ void die(int onsig)
if (notify + areamgr + filemgr)
Syslog('+', "Notify msgs [%4d] AreaMgr [%4d] FileMgr [%4d]", notify, areamgr, filemgr);
time(&t_end);
t_end = time(NULL);
Syslog(' ', "MBFIDO finished in %s", t_elapsed(t_start, t_end));
ulockunpack();
@@ -296,7 +296,7 @@ int main(int argc, char **argv)
InitUser();
InitFidonet();
TermInit(1);
time(&t_start);
t_start = time(NULL);
t = localtime(&t_start);
Diw = t->tm_wday;
Miy = t->tm_mon;

View File

@@ -79,7 +79,7 @@ int main(int argc, char **argv)
#endif
InitConfig();
TermInit(1);
time(&t_start);
t_start = time(NULL);
umask(002);
/*

View File

@@ -91,7 +91,7 @@ void die(int onsig)
WriteError("Terminated with error %d", onsig);
}
time(&t_end);
t_end = time(NULL);
Syslog(' ', "MBFILE finished in %s", t_elapsed(t_start, t_end));
if (!do_quiet) {

View File

@@ -192,7 +192,7 @@ void die(int onsig)
WriteError("Terminated with error %d", onsig);
}
time(&t_end);
t_end = time(NULL);
Syslog(' ', "MBINDEX finished in %s", t_elapsed(t_start, t_end));
if (!do_quiet)

View File

@@ -92,7 +92,7 @@ int main(int argc, char **argv)
InitConfig();
TermInit(1);
oldmask = umask(007);
time(&t_start);
t_start = time(NULL);
/*
* Catch all signals we can, and ignore or catch them
@@ -235,7 +235,7 @@ void die(int onsig)
if (msg_tot || msg_del)
Syslog('+', "Msgs [%5d] Deleted [%5d]", msg_tot, msg_del);
time(&t_end);
t_end = time(NULL);
Syslog(' ', "MBMSG finished in %s", t_elapsed(t_start, t_end));
umask(oldmask);

View File

@@ -1,8 +1,7 @@
/*****************************************************************************
*
* File ..................: mbaff/msgutil.c
* $Id$
* Purpose ...............: Announce new files and FileFind
* Last modification date : 21-Jan-2001
*
*****************************************************************************
* Copyright (C) 1997-2001
@@ -91,7 +90,7 @@ void Msg_Pid(void)
sprintf(temp, "\001PID: MBSE-FIDO %s", VERSION);
MsgText_Add2(temp);
sprintf(temp, "\001CHRS: %s", getchrs(msgs.Ftncode));
(void)time(&tt);
tt = time(NULL);
sprintf(temp, "\001TZUTC: %s", gmtoffset(tt));
MsgText_Add2(temp);
free(temp);

View File

@@ -1,8 +1,7 @@
/*****************************************************************************
*
* File ..................: mbfido/post.c
* $Id$
* Purpose ...............: Post a message from a file.
* Last modification date : 20-Mar-2001
*
*****************************************************************************
* Copyright (C) 1997-2001
@@ -117,7 +116,7 @@ void Post(char *To, long Area, char *Subj, char *File, char *Flavor)
return;
}
(void)time(&tt);
tt = time(NULL);
t = localtime(&tt);
Diw = t->tm_wday;
Miy = t->tm_mon;

View File

@@ -84,7 +84,7 @@ int ProcessTic(fa_list *sbl)
int BBS_Imp = FALSE, DidBanner = FALSE;
time(&Now);
Now = time(NULL);
if (TIC.TicIn.PathError) {
WriteError("Our Aka is in the path");

View File

@@ -1,8 +1,7 @@
/*****************************************************************************
*
* File ..................: tosser/storenet.c
* Purpose ...............: Import a netmail message
* Last modification date : 28-Jul-2001
* $Id$
* Purpose ...............: Import a echomail message
*
*****************************************************************************
* Copyright (C) 1997-2001
@@ -69,9 +68,9 @@ int storeecho(faddr *f, faddr *t, time_t mdate, int flags, char *subj, char *msg
*/
if (!bad && !dupe) {
StatAdd(&msgs.Received, 1L);
time(&msgs.LastRcvd);
msgs.LastRcvd = time(NULL);
StatAdd(&mgroup.MsgsRcvd, 1L);
time(&mgroup.LastDate);
mgroup.LastDate = time(NULL);
UpdateMsgs();
}

View File

@@ -66,7 +66,7 @@ int storenet(faddr *f, faddr *t, time_t mdate, int flags, char *Subj, char *msgi
if (SearchNetBoard(t->zone, t->net)) {
StatAdd(&msgs.Received, 1L);
time(&msgs.LastRcvd);
msgs.LastRcvd = time(NULL);
UpdateMsgs();
result = Msg_Open(msgs.Base);