diff options
author | Yujie Qin <yujieqin@google.com> | 2016-04-06 11:07:51 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-04-06 11:07:51 +0000 |
commit | cf206853c0f3e264894b2457e2f4af6eac015f5a (patch) | |
tree | ec435d537b613b0519f647c3a0ec324b8c9096ec | |
parent | 0b5085d950fa91d122b4e844b5da4e539732e621 (diff) | |
parent | 9ff8c3e614ad10b938a9ea3ec123e1546a18e270 (diff) | |
download | dng_sdk-cf206853c0f3e264894b2457e2f4af6eac015f5a.tar.gz |
Define dng_timespec as timespec for VS2015 and above am: e95f96b
am: 9ff8c3e
* commit '9ff8c3e614ad10b938a9ea3ec123e1546a18e270':
Define dng_timespec as timespec for VS2015 and above
Change-Id: Id2f3b31e371c8d1be1563728a50ac3fe95cb3708
-rw-r--r-- | source/dng_pthread.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/dng_pthread.h b/source/dng_pthread.h index 2095321..4572e31 100644 --- a/source/dng_pthread.h +++ b/source/dng_pthread.h @@ -53,11 +53,16 @@ #endif -// Use the standard "timespec" struct for VS2015 and above from <time.h>. Define -// "dng_timespec" as "timespec" otherwise. +// Use the standard "timespec" struct as "dng_timespec" for VS2015 and above +// from <time.h>. Define "dng_timespec" as "timespec" otherwise. #if _MSC_VER >= 1900 #include <time.h> +#define dng_timespec timespec #else +struct dng_timespec { + long tv_sec; + long tv_nsec; +}; #define timespec dng_timespec #endif @@ -70,11 +75,6 @@ extern "C" #define DNG_ETIMEDOUT 60 /* Operation timed out */ -struct dng_timespec { - long tv_sec; - long tv_nsec; -}; - typedef unsigned long dng_pthread_t; typedef struct dng_pthread_mutex_impl *dng_pthread_mutex_t; |