From f2fca5dd5e03def5f6ca04cd0d312d352a8ecd0f Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Fri, 6 Aug 1999 00:41:42 +0000 Subject: [PATCH] solaris compiler does not like member w name of the struct --- src/libCom/osiTime.cc | 16 ++++++++-------- src/libCom/osiTime.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/libCom/osiTime.cc b/src/libCom/osiTime.cc index 4acea09a7..3a4bedd43 100644 --- a/src/libCom/osiTime.cc +++ b/src/libCom/osiTime.cc @@ -237,7 +237,7 @@ osiTime::operator tm_nano_sec () const ansiTimeTicks = *this; // from POSIX RT - localtime_r (&ansiTimeTicks.ts, &tm.tm); + localtime_r (&ansiTimeTicks.ts, &tm.ansi_tm); tm.nsec = this->nSec; @@ -250,7 +250,7 @@ osiTime::operator tm_nano_sec () const osiTime::osiTime (const struct tm_nano_sec &tm) { time_t ansiTimeTicks; - struct tm tmp = tm.tm; + struct tm tmp = tm.ansi_tm; ansiTimeTicks = mktime (&tmp); assert (ansiTimeTicks!=(time_t)-1); @@ -280,13 +280,13 @@ inline osiTime::osiTime (const struct timespec &ts) { this->sec = osiTime::time_tToInternalSec (ts.tv_sec); assert (ts.tv_nsec>=0); - unsigned long nSec = static_cast (ts.tv_nsec); - if (nSecnSec = nSec; + unsigned long nSecIn = static_cast (ts.tv_nsec); + if (nSecInnSec = nSecIn; } else { - this->sec += nSec / nSecPerSec; - this->nSec = nSec % nSecPerSec; + this->sec += nSecIn / nSecPerSec; + this->nSec = nSecIn % nSecPerSec; } } @@ -349,7 +349,7 @@ void osiTime::show (unsigned) const char bigBuffer[256]; tm_nano_sec tmns = *this; - status = strftime (bigBuffer, sizeof(bigBuffer), "%c", &tmns.tm); + status = strftime (bigBuffer, sizeof(bigBuffer), "%c", &tmns.ansi_tm); if (status>0) { printf ("osiTime: %s %f\n", bigBuffer, static_cast (tmns.nsec) / nSecPerSec); diff --git a/src/libCom/osiTime.h b/src/libCom/osiTime.h index 59ca184a6..9b343119d 100644 --- a/src/libCom/osiTime.h +++ b/src/libCom/osiTime.h @@ -47,7 +47,7 @@ struct timespec; // POSIX real time // an extended ANSI C RTL "struct tm" which includes nano seconds. // struct tm_nano_sec { - tm tm; // ANSI C time details + tm ansi_tm; // ANSI C time details unsigned long nsec; // nano seconds extension };