switch on _POSIX_TIMERS

This commit is contained in:
Jeff Hill
2000-07-11 19:03:27 +00:00
parent be90158390
commit eaf92e0d65
2 changed files with 3 additions and 14 deletions

View File

@@ -14,10 +14,7 @@
//
extern "C" epicsShareFunc int epicsShareAPI tsStampGetCurrent (TS_STAMP *pDest)
{
// Under HP-UX CLOCK_REALTIME is part of an enum
# if defined(CLOCK_REALTIME) || (defined(HP_UX) && defined(_INCLUDE_POSIX4_SOURCE))
# ifdef _POSIX_TIMERS
struct timespec ts;
int status;

View File

@@ -10,20 +10,12 @@
#include <unistd.h>
/*
* "struct timespec" is not in all versions of POSIX 1.
* 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
#ifndef _POSIX_TIMERS
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 _POSIX_TIMERS */
#endif /* ifndef osdTimeh */