summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYujie Qin <yujieqin@google.com>2016-04-06 11:04:55 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-04-06 11:04:55 +0000
commit9ff8c3e614ad10b938a9ea3ec123e1546a18e270 (patch)
tree4c7034560ffdae04d2c9d3d902dc3550f891089e
parent7ce5984e4865e3c5c8963d9c8b414a4e4b84f264 (diff)
parente95f96bb9d29978211250ee764ba78731ad316df (diff)
downloaddng_sdk-9ff8c3e614ad10b938a9ea3ec123e1546a18e270.tar.gz
Define dng_timespec as timespec for VS2015 and above
am: e95f96b * commit 'e95f96bb9d29978211250ee764ba78731ad316df': Define dng_timespec as timespec for VS2015 and above Change-Id: Ibaa10730127e46eda87c841d8f1e2549f44d4329
-rw-r--r--source/dng_pthread.h14
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;