From 4023dc924bce17e8d0f58462f9484b8aa59c5b6c Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Fri, 30 Jun 2000 15:32:05 +0000 Subject: [PATCH] HP-UX defines things a bit different (HP aCC error fix) --- src/libCom/osi/os/posix/osdTime.cpp | 6 +++++- src/libCom/osi/os/posix/osdTime.h | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/libCom/osi/os/posix/osdTime.cpp b/src/libCom/osi/os/posix/osdTime.cpp index cca141183..62c4ba504 100644 --- a/src/libCom/osi/os/posix/osdTime.cpp +++ b/src/libCom/osi/os/posix/osdTime.cpp @@ -14,7 +14,10 @@ // extern "C" epicsShareFunc int epicsShareAPI tsStampGetCurrent (TS_STAMP *pDest) { -# if defined(CLOCK_REALTIME) + +// Under HP-UX CLOCK_REALTIME is part of an enum + +# if defined(CLOCK_REALTIME) || (defined(HP_UX) && defined(_INCLUDE_POSIX4_SOURCE)) struct timespec ts; int status; @@ -22,6 +25,7 @@ extern "C" epicsShareFunc int epicsShareAPI tsStampGetCurrent (TS_STAMP *pDest) if (status) { return tsStampERROR; } + *pDest = osiTime (ts); return tsStampOK; # else diff --git a/src/libCom/osi/os/posix/osdTime.h b/src/libCom/osi/os/posix/osdTime.h index 53685db6e..58642a83a 100644 --- a/src/libCom/osi/os/posix/osdTime.h +++ b/src/libCom/osi/os/posix/osdTime.h @@ -15,12 +15,15 @@ * Solaris has it at ISO POSIX-1c so we will start from there, * but may need to fine tune this */ + +#ifndef HP_UX #if _POSIX_VERSION < 199506L struct timespec { time_t tv_sec; /* seconds since some epoch */ long tv_nsec; /* nanoseconds within the second */ }; #endif /* if _POSIX_VERSION < 199506L */ +#endif /* ifndef HP_UX */ #endif /* ifndef osdTimeh */