1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-02-04 11:23:46 +00:00

Fixes for 64-bit platforms.

Submitted by:	Corey Smith <csmith@bonddesk.com>
This commit is contained in:
Dmitry Sivachenko 2003-02-11 15:14:00 +00:00
parent 38dbb75757
commit bb21fb5270
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=75299
6 changed files with 116 additions and 0 deletions

View File

@ -0,0 +1,20 @@
--- src/parsetime.c.orig Fri Oct 11 14:39:46 2002
+++ src/parsetime.c Mon Feb 10 20:47:18 2003
@@ -660,6 +660,7 @@
{
long mday=0, wday, mon, year = ptv->tm.tm_year;
int tlen;
+ time_t montime;
switch (sc_tokid) {
case YESTERDAY:
@@ -713,7 +714,8 @@
tlen = strlen(sc_token);
mon = atol(sc_token);
if (mon > 10*356*24*60*60) {
- ptv->tm=*localtime(&mon);
+ montime = mon;
+ ptv->tm=*localtime(&montime);
token();
break;
}

View File

@ -0,0 +1,20 @@
--- src/parsetime.c.orig Fri Oct 11 14:39:46 2002
+++ src/parsetime.c Mon Feb 10 20:47:18 2003
@@ -660,6 +660,7 @@
{
long mday=0, wday, mon, year = ptv->tm.tm_year;
int tlen;
+ time_t montime;
switch (sc_tokid) {
case YESTERDAY:
@@ -713,7 +714,8 @@
tlen = strlen(sc_token);
mon = atol(sc_token);
if (mon > 10*356*24*60*60) {
- ptv->tm=*localtime(&mon);
+ montime = mon;
+ ptv->tm=*localtime(&montime);
token();
break;
}

View File

@ -0,0 +1,18 @@
--- src/rateup.c.orig Sat Oct 19 05:06:55 2002
+++ src/rateup.c Mon Feb 10 22:55:06 2003
@@ -830,12 +830,14 @@
struct HISTORY *hist;
unsigned long rd[5];
time_t cur;
+ long lasttime;
if ((fi = fopen(file,"r")) != NULL) {
- if (fscanf(fi,"%ld %s %s\n",(long int *)&last.time,&last.in[0],&last.out[0]) != 3){
+ if (fscanf(fi,"%ld %s %s\n",&lasttime,&last.in[0],&last.out[0]) != 3){
fprintf(stderr,"Read Error: File %s lin 1\n",file);
retcode = 1;
}
+ last.time = lasttime;
cur = last.time;
x = histvalid=0;
hist = history;

18
net/mrtg/files/patch-aa Normal file
View File

@ -0,0 +1,18 @@
--- src/rateup.c.orig Sat Oct 19 05:06:55 2002
+++ src/rateup.c Mon Feb 10 22:55:06 2003
@@ -830,12 +830,14 @@
struct HISTORY *hist;
unsigned long rd[5];
time_t cur;
+ long lasttime;
if ((fi = fopen(file,"r")) != NULL) {
- if (fscanf(fi,"%ld %s %s\n",(long int *)&last.time,&last.in[0],&last.out[0]) != 3){
+ if (fscanf(fi,"%ld %s %s\n",&lasttime,&last.in[0],&last.out[0]) != 3){
fprintf(stderr,"Read Error: File %s lin 1\n",file);
retcode = 1;
}
+ last.time = lasttime;
cur = last.time;
x = histvalid=0;
hist = history;

View File

@ -0,0 +1,20 @@
--- src/parsetime.c.orig Fri Oct 11 14:39:46 2002
+++ src/parsetime.c Mon Feb 10 20:47:18 2003
@@ -660,6 +660,7 @@
{
long mday=0, wday, mon, year = ptv->tm.tm_year;
int tlen;
+ time_t montime;
switch (sc_tokid) {
case YESTERDAY:
@@ -713,7 +714,8 @@
tlen = strlen(sc_token);
mon = atol(sc_token);
if (mon > 10*356*24*60*60) {
- ptv->tm=*localtime(&mon);
+ montime = mon;
+ ptv->tm=*localtime(&montime);
token();
break;
}

View File

@ -0,0 +1,20 @@
--- src/parsetime.c.orig Fri Oct 11 14:39:46 2002
+++ src/parsetime.c Mon Feb 10 20:47:18 2003
@@ -660,6 +660,7 @@
{
long mday=0, wday, mon, year = ptv->tm.tm_year;
int tlen;
+ time_t montime;
switch (sc_tokid) {
case YESTERDAY:
@@ -713,7 +714,8 @@
tlen = strlen(sc_token);
mon = atol(sc_token);
if (mon > 10*356*24*60*60) {
- ptv->tm=*localtime(&mon);
+ montime = mon;
+ ptv->tm=*localtime(&montime);
token();
break;
}