diff options
author | wtc%google.com <devnull@localhost> | 2008-07-19 16:56:11 +0000 |
---|---|---|
committer | wtc%google.com <devnull@localhost> | 2008-07-19 16:56:11 +0000 |
commit | 01d50fafd1c10656959d1063bcb6395efbaa6832 (patch) | |
tree | e9ad46e306ddeec0cc5cb636fbae6ebd91d70027 | |
parent | 9ee3ae6715d66e13a6573f4001d622348736e700 (diff) | |
download | nspr-hg-01d50fafd1c10656959d1063bcb6395efbaa6832.tar.gz |
Bug 432430: Updated _symbian.cfg and prtypes.h for Symbian OS. The patch
is contributed by Harry Li <harry.li@pagefreedom.org>. r=wtc.
-rw-r--r-- | pr/include/md/_symbian.cfg | 18 | ||||
-rw-r--r-- | pr/include/prtypes.h | 21 |
2 files changed, 28 insertions, 11 deletions
diff --git a/pr/include/md/_symbian.cfg b/pr/include/md/_symbian.cfg index 2a225f79..09a24669 100644 --- a/pr/include/md/_symbian.cfg +++ b/pr/include/md/_symbian.cfg @@ -46,15 +46,6 @@ #define SYMBIAN #endif -/* - * Symbian OS emulator build preprocessor has built-in _WIN32 and __i386__ - * macros. - */ -#ifdef __WINS__ -#undef _WIN32 -#undef __i386__ -#endif - #define PR_AF_INET6 0x0806 /* same as AF_INET6 */ #ifdef __arm__ @@ -93,11 +84,16 @@ #define PR_ALIGN_OF_SHORT 2 #define PR_ALIGN_OF_INT 4 #define PR_ALIGN_OF_LONG 4 -#define PR_ALIGN_OF_INT64 4 #define PR_ALIGN_OF_FLOAT 4 -#define PR_ALIGN_OF_DOUBLE 4 #define PR_ALIGN_OF_POINTER 4 #define PR_ALIGN_OF_WORD 4 +#ifdef __WINS__ +#define PR_ALIGN_OF_INT64 4 +#define PR_ALIGN_OF_DOUBLE 4 +#else +#define PR_ALIGN_OF_INT64 8 +#define PR_ALIGN_OF_DOUBLE 8 +#endif #define PR_BYTES_PER_WORD_LOG2 2 #define PR_BYTES_PER_DWORD_LOG2 3 diff --git a/pr/include/prtypes.h b/pr/include/prtypes.h index f425aee9..66814841 100644 --- a/pr/include/prtypes.h +++ b/pr/include/prtypes.h @@ -177,6 +177,27 @@ #define PR_CALLBACK_DECL #define PR_STATIC_CALLBACK(__x) static __x +#elif defined(SYMBIAN) + +#define PR_EXPORT(__type) extern __declspec(dllexport) __type +#define PR_EXPORT_DATA(__type) extern __declspec(dllexport) __type +#ifdef __WINS__ +#define PR_IMPORT(__type) extern __declspec(dllexport) __type +#define PR_IMPORT_DATA(__type) extern __declspec(dllexport) __type +#else +#define PR_IMPORT(__type) extern __declspec(dllimport) __type +#define PR_IMPORT_DATA(__type) extern __declspec(dllimport) __type +#endif + +#define PR_EXTERN(__type) extern __type +#define PR_IMPLEMENT(__type) __type +#define PR_EXTERN_DATA(__type) extern __type +#define PR_IMPLEMENT_DATA(__type) __type + +#define PR_CALLBACK +#define PR_CALLBACK_DECL +#define PR_STATIC_CALLBACK(__x) static __x + #else /* Unix */ /* GCC 3.3 and later support the visibility attribute. */ |