diff options
author | Nick Kralevich <nnk@google.com> | 2013-02-02 17:26:38 -0800 |
---|---|---|
committer | Nick Kralevich <nnk@google.com> | 2013-02-02 17:26:38 -0800 |
commit | 941daef629bd571032851edf7ae1dce24266640e (patch) | |
tree | 3e320981c5d7e3e65b4325a0bb64201e55e7db4e | |
parent | 544d196e2269503136f73347e6d652b23bb87a0d (diff) | |
download | system_core-941daef629bd571032851edf7ae1dce24266640e.zip system_core-941daef629bd571032851edf7ae1dce24266640e.tar.gz system_core-941daef629bd571032851edf7ae1dce24266640e.tar.bz2 |
Fix win_sdk build.
Don't depend on sys/cdefs.h, which doesn't exist when building
for the host.Don't try to compile property_len() checking code
in mingw32, it doesn't work.
Change-Id: I6a56b759bd4e8d30d6ca136e43d6515bf7408cc6
-rw-r--r-- | include/cutils/properties.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/cutils/properties.h b/include/cutils/properties.h index 5ec8c2c..f1461f2 100644 --- a/include/cutils/properties.h +++ b/include/cutils/properties.h @@ -17,7 +17,6 @@ #ifndef __CUTILS_PROPERTIES_H #define __CUTILS_PROPERTIES_H -#include <sys/cdefs.h> #include <stddef.h> #ifdef __cplusplus @@ -65,14 +64,17 @@ enum { }; #endif /*HAVE_SYSTEM_PROPERTY_SERVER*/ -#ifdef __BIONIC_FORTIFY_INLINE +#if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 && !defined(__MINGW32__) && !defined(__clang__) extern int __property_get_real(const char *, char *, const char *) __asm__(__USER_LABEL_PREFIX__ "property_get"); extern void __property_get_too_small_error() __attribute__((__error__("property_get() called with too small of a buffer"))); -__BIONIC_FORTIFY_INLINE +extern inline +__attribute__ ((always_inline)) +__attribute__ ((gnu_inline)) +__attribute__ ((artificial)) int property_get(const char *key, char *value, const char *default_value) { size_t bos = __builtin_object_size(value, 0); if (bos < PROPERTY_VALUE_MAX) { @@ -81,7 +83,7 @@ int property_get(const char *key, char *value, const char *default_value) { return __property_get_real(key, value, default_value); } -#endif /* __BIONIC_FORTIFY_INLINE */ +#endif /* defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 && !defined(__MINGW32__) && !defined(__clang__) */ #ifdef __cplusplus } |