summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerome Gaillard <jgaillard@google.com>2018-12-11 07:39:31 -0800
committerandroid-build-merger <android-build-merger@google.com>2018-12-11 07:39:31 -0800
commitbbed370da7c75b3e92adc4c9dce83df149b36838 (patch)
tree193980a0cf3bc9789c35b25a67fb0a7233ddf54f
parent5c458ab03aee32ca06e90f7ce0b4b4429975f4df (diff)
parente152f6b89dfb8161d44389ba4b2230342a25f789 (diff)
downloaddng_sdk-bbed370da7c75b3e92adc4c9dce83df149b36838.tar.gz
Enable libdng_sdk for Windows am: 33c601f0f3
am: e152f6b89d Change-Id: I7d0b0a5c72494ed045087204f003e05bf78300dd
-rw-r--r--Android.bp11
-rw-r--r--source/dng_pthread.cpp6
-rw-r--r--source/dng_pthread.h10
3 files changed, 14 insertions, 13 deletions
diff --git a/Android.bp b/Android.bp
index 9299471..c7215e1 100644
--- a/Android.bp
+++ b/Android.bp
@@ -121,6 +121,17 @@ cc_library{
"-framework AppKit",
],
},
+ windows: {
+ enabled: true,
+ cflags: [
+ "-D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR",
+ "-Wno-null-arithmetic",
+ "-Wno-sign-compare",
+ "-Wno-tautological-pointer-compare",
+ "-Wno-unknown-pragmas",
+ ],
+ static_libs: ["libcompiler_rt-extras"],
+ },
},
export_include_dirs: ["source"],
diff --git a/source/dng_pthread.cpp b/source/dng_pthread.cpp
index 0347856..58c9ed0 100644
--- a/source/dng_pthread.cpp
+++ b/source/dng_pthread.cpp
@@ -75,7 +75,7 @@ struct dng_pthread_mutex_impl
void Lock() { ::EnterCriticalSection(&lock); }
void Unlock() { ::LeaveCriticalSection(&lock); }
private:
- dng_pthread_mutex_impl &operator=(const dng_pthread_mutex_impl &) { }
+ dng_pthread_mutex_impl &operator=(const dng_pthread_mutex_impl &);
dng_pthread_mutex_impl(const dng_pthread_mutex_impl &) { }
};
@@ -95,7 +95,7 @@ struct dng_pthread_cond_impl
// Non copyable
private:
- dng_pthread_cond_impl &operator=(const dng_pthread_cond_impl &) { }
+ dng_pthread_cond_impl &operator=(const dng_pthread_cond_impl &);
dng_pthread_cond_impl(const dng_pthread_cond_impl &) { }
};
@@ -122,7 +122,7 @@ namespace
mutex->Unlock();
}
private:
- ScopedLock &operator=(const ScopedLock &) { }
+ ScopedLock &operator=(const ScopedLock &);
ScopedLock(const ScopedLock &) { }
};
diff --git a/source/dng_pthread.h b/source/dng_pthread.h
index 4572e31..80c3d24 100644
--- a/source/dng_pthread.h
+++ b/source/dng_pthread.h
@@ -53,18 +53,8 @@
#endif
-// 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
#ifdef __cplusplus
extern "C"