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,12 +1,11 @@
/*****************************************************************************
*
* File ..................: gmtoffset.c
* $Id$
* Purpose ...............: Calculate UTC offset
* Last modification date : 18-Dec-1999
* Source ................: Eugene G. Crosser's ifmail package.
*
*****************************************************************************
* Copyright (C) 1997-1999
* Copyright (C) 1997-2001
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -47,7 +46,7 @@ long gmt_offset(time_t now)
long offset;
if (!now)
time(&now);
now = time(NULL);
ptm = *localtime(&now);
/*

View File

@@ -1,8 +1,7 @@
/*****************************************************************************
*
* File ..................: packet.c
* $Id$
* Purpose ...............: Fidonet mailer
* Last modification date : 06-Jun-2001
*
*****************************************************************************
* Copyright (C) 1997-2001
@@ -113,7 +112,7 @@ FILE *openpkt(FILE *pkt, faddr *addr, char flavor)
Syslog('P', "creating new .pkt");
memset(&buffer, 0, sizeof(buffer));
time(&t);
t = time(NULL);
ptm = localtime(&t);
if (ptm->tm_sec > 59)
ptm->tm_sec = 59;

View File

@@ -1,4 +1,6 @@
/* $Revision$
/* $Id$
**
** $ Revision: 1.2 $
**
** Originally written by Steven M. Bellovin <smb@research.att.com> while
** at the University of North Carolina at Chapel Hill. Later tweaked by
@@ -1427,7 +1429,7 @@ int GetTimeInfo(TIMEINFO *Now)
Now->usec = tv.tv_usec;
#else
/* Can't check for -1 since that might be a time, I guess. */
(void)time(&Now->time);
Now->time = time(NULL);
Now->usec = 0;
#endif /* defined(HAVE_GETTIMEOFDAY) */

View File

@@ -1,11 +1,10 @@
/*****************************************************************************
*
* File ..................: pktname.c
* $Id$
* Purpose ...............: BinkleyTerm outbound naming
* Last modification date : 23-Dec-2000
*
*****************************************************************************
* Copyright (C) 1997-2000
* Copyright (C) 1997-2001
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -228,7 +227,7 @@ char *dayname(void)
time_t tt;
struct tm *ptm;
(void)time(&tt);
tt = time(NULL);
ptm = localtime(&tt);
sprintf(buf, "%s", dow[ptm->tm_wday]);
@@ -245,7 +244,7 @@ char *arcname(faddr *addr, unsigned short Zone, int ARCmailCompat)
struct tm *ptm;
faddr *bestaka;
(void)time(&tt);
tt = time(NULL);
ptm = localtime(&tt);
ext = dow[ptm->tm_wday];

View File

@@ -1,8 +1,7 @@
/*****************************************************************************
*
* File ..................: rfcdate.c
* $Id$
* Purpose ...............: Date utilities
* Last modification date : 30-Apr-2001
*
*****************************************************************************
* Copyright (C) 1997-2001
@@ -149,7 +148,7 @@ char *rfcdate(time_t now)
long offset;
if (!now)
time(&now);
now = time(NULL);
ptm = *localtime(&now);
/*

View File

@@ -1,11 +1,10 @@
/*****************************************************************************
*
* File ..................: strutil.c
* $Id$
* Purpose ...............: Common string functions
* Last modification date : 18-Mar-2000
*
*****************************************************************************
* Copyright (C) 1997-2000
* Copyright (C) 1997-2001
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -264,7 +263,7 @@ char *GetLocalHM()
static char gettime[15];
time_t T_Now;
time(&T_Now);
T_Now = time(NULL);
sprintf(gettime,"%s", StrTimeHM(T_Now));
return(gettime);
}
@@ -280,7 +279,7 @@ char *GetLocalHMS()
static char gettime[15];
time_t T_Now;
time(&T_Now);
T_Now = time(NULL);
sprintf(gettime,"%s", StrTimeHMS(T_Now));
return(gettime);
}
@@ -328,30 +327,10 @@ char *GetDateDMY()
struct tm *l_d;
time_t T_Now;
time(&T_Now);
T_Now = time(NULL);
l_d = localtime(&T_Now);
sprintf(tdate, "%02d-%02d-%04d", l_d->tm_mday,l_d->tm_mon+1,l_d->tm_year+1900);
return(tdate);
}
/*
* Returns current date in DDMMYYY
*/
/*
char *tDate1()
{
static char tdate1[15];
struct tm *l_d;
time_t T_Now;
time(&T_Now);
l_d = localtime(&T_Now);
sprintf(tdate1, "%02d%02d%02d",
l_d->tm_mday,l_d->tm_mon+1,l_d->tm_year+1900);
return(tdate1);
}
*/