diff options
author | William R. Otte <wotte@dre.vanderbilt.edu> | 2011-07-19 18:02:18 +0000 |
---|---|---|
committer | William R. Otte <wotte@dre.vanderbilt.edu> | 2011-07-19 18:02:18 +0000 |
commit | 09919f10057cbbd823c745ef55987cf516d8c533 (patch) | |
tree | c415090ab0260fd94e7b45c5c9806ec6e3c27cb9 | |
parent | 09ebaa023a6de546459647da40d1b4c80348163f (diff) | |
download | ATCD-09919f10057cbbd823c745ef55987cf516d8c533.tar.gz |
Tue Jul 19 18:01:43 UTC 2011 William R. Otte <wotte@dre.vanderbilt.edu>
* ace/OS_NS_errno.h:
* ace/config-android.h:
* include/makeinclude/platform_android.GNU:
Initial work to forward-port to head.
-rw-r--r-- | ACE/ChangeLog | 8 | ||||
-rw-r--r-- | ACE/ace/OS_NS_errno.h | 10 | ||||
-rw-r--r-- | ACE/ace/config-android.h | 20 | ||||
-rw-r--r-- | ACE/include/makeinclude/platform_android.GNU | 16 |
4 files changed, 44 insertions, 10 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog index 1afdad6fe43..43bf3f08d1f 100644 --- a/ACE/ChangeLog +++ b/ACE/ChangeLog @@ -1,3 +1,11 @@ +Tue Jul 19 18:01:43 UTC 2011 William R. Otte <wotte@dre.vanderbilt.edu> + + * ace/OS_NS_errno.h: + * ace/config-android.h: + * include/makeinclude/platform_android.GNU: + + Initial work to forward-port to head. + Mon Jul 18 16:06:27 UTC 2011 William Otte <wotte@Williams-MacBook-Air.local> * ace/OS_NS_errno.h: diff --git a/ACE/ace/OS_NS_errno.h b/ACE/ace/OS_NS_errno.h index 0d3233c1b3d..1d3b9683530 100644 --- a/ACE/ace/OS_NS_errno.h +++ b/ACE/ace/OS_NS_errno.h @@ -83,11 +83,13 @@ private: #if defined (ACE_HAS_WINCE_BROKEN_ERRNO) # define ACE_ERRNO_TYPE ACE_CE_Errno # define ACE_ERRNO_GET ACE_CE_Errno::instance ()->operator int() -#elif defined (ACE_HAS_ANDROID) -# define ACE_ERRNO_TYPE volatile int #else -# define ACE_ERRNO_TYPE int -# define ACE_ERRNO_GET errno +# ifndef ACE_ERRNO_TYPE +# define ACE_ERRNO_TYPE int +# endif // ACE_ERRNO_TYPE +# ifndef ACE_ERRNO_GET +# define ACE_ERRNO_GET errno +# endif // ACE_ERRNO_GET #endif /* ACE_HAS_WINCE_BROKEN_ERRNO */ ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ACE/ace/config-android.h b/ACE/ace/config-android.h index e678cc6faaa..a9bad1fbe31 100644 --- a/ACE/ace/config-android.h +++ b/ACE/ace/config-android.h @@ -26,12 +26,28 @@ #define ACE_LACKS_SYS_SYSCTL_H #define ACE_LACKS_STRRECVFD #define ACE_TEMPLATES_REQUIRE_SOURCE +#define ACE_LACKS_RAND_R +#define ACE_LACKS_WCSTOLL +#define ACE_LACKS_WCSTOULL +#define ACE_LACKS_NETDB_REENTRANT_FUNCTIONS + +// I'm not sure if this is correct +#define ACE_LACKS_RWLOCK_T /* This type is mandatory, but Android doesn't define it. */ typedef unsigned long fd_mask; #include "ace/config-linux.h" +#ifdef ACE_HAS_CLOCK_SETTIME +#undef ACE_HAS_CLOCK_SETTIME +#endif + +// epoll lacks some features on Android +#ifdef ACE_HAS_EVENT_POLL +#undef ACE_HAS_EVENT_POLL +#endif + # if defined(ACE_IMPORT_SINGLETON_DECLARATION) # undef ACE_IMPORT_SINGLETON_DECLARATION # define ACE_IMPORT_SINGLETON_DECLARATION(T) @@ -50,7 +66,7 @@ typedef unsigned long fd_mask; #ifdef ACE_SCANDIR_CMP_USES_CONST_VOIDPTR #undef ACE_SCANDIR_CMP_USES_CONST_VOIDPTR -#endif +#endif #ifdef ACE_HAS_UALARM #undef ACE_HAS_UALARM @@ -75,4 +91,6 @@ typedef unsigned long fd_mask; #define ACE_LACKS_CUSERID #define ACE_LACKS_PWD_FUNCTIONS +#define ACE_ERRNO_TYPE volatile int + #endif/* ACE_CONFIG_ANDROID_H*/ diff --git a/ACE/include/makeinclude/platform_android.GNU b/ACE/include/makeinclude/platform_android.GNU index b5c52f594e4..c20bbfffc12 100644 --- a/ACE/include/makeinclude/platform_android.GNU +++ b/ACE/include/makeinclude/platform_android.GNU @@ -1,14 +1,20 @@ # $Id$ static_libs_only=1 ssl=0 +inline=0 -HOST_PREBUILT :=/Users/frohnhoefere/Android/android-toolchain -NDK_HOME :=/Users/frohnhoefere/Android/android-ndk-r5b -SYSROOT := $(HOST_PREBUILT)/sysroot +# HOST_PREBUILT :=/Users/frohnhoefere/Android/android-toolchain +NDK_HOME := /opt/android-ndk-r6 +ANDROID_ARCH ?= arm +ANDROID_PLATFORM ?= android-8 +SYSROOT := $(NDK_HOME)/platforms/$(ANDROID_PLATFORM)/arch-$(ANDROID_ARCH) CC_FLAGS += $(CFLAGS) $(TEMPLATES_FLAG) CPP_FLAGS += \ + --sysroot=$(SYSROOT) \ + -I$(NDK_HOME)/sources/cxx-stl/gnu-libstdc++/include \ + -I$(NDK_HOME)/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include \ -fpic \ -ffunction-sections \ -funwind-tables \ @@ -30,7 +36,7 @@ CPP_FLAGS += \ -DANDROID \ -g -SOFLAGS += $(NDK_HOME)/sources/cxx-stl/gnu-libstdc++/libs/armeabi/libstdc++.a +SOFLAGS += $(NDK_HOME)/sources/cxx-stl/gnu-libstdc++/libs/armeabi/libstdc++.a LDFLAGS := \ --sysroot=$(SYSROOT) \ @@ -43,7 +49,7 @@ POSTLINK := \ $(SOFLAGS) CC=arm-linux-androideabi-g++ $(CPP_FLAGS) -CXX=arm-linux-androideabi-g++ $(CPP_FLAGS) +CXX=arm-linux-androideabi-g++ $(CPP_FLAGS) AR=arm-linux-androideabi-ar STRIP=arm-linux-androideabi-strip RANLIB=arm-linux-androideabi-ranlib |