From 159bce8846c6ad6a801085814ce456b13d90b395 Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Thu, 16 Aug 2007 10:11:44 +0000 Subject: Ticket #354: continuing work to port the Symbian libraries to .DSO format git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1417 74dad513-b988-da41-8d7b-12977e46ad98 --- pjlib/include/pj/guid.h | 10 +++++++++- pjlib/include/pj/pool.h | 9 ++++++++- pjlib/src/pj/guid_simple.c | 7 ++++++- pjlib/src/pj/guid_uuid.c | 7 ++++++- pjlib/src/pj/guid_win32.c | 7 ++++++- pjlib/src/pj/os_symbian.h | 4 ++-- pjlib/src/pj/pool.c | 7 ++++++- 7 files changed, 43 insertions(+), 8 deletions(-) (limited to 'pjlib') diff --git a/pjlib/include/pj/guid.h b/pjlib/include/pj/guid.h index 3eea11a3..a437646f 100644 --- a/pjlib/include/pj/guid.h +++ b/pjlib/include/pj/guid.h @@ -55,8 +55,16 @@ PJ_BEGIN_DECL * * Regardless of the actual length of the GUID, it will not exceed * PJ_GUID_MAX_LENGTH characters. + * + * @see pj_GUID_STRING_LENGTH() + * @see PJ_GUID_MAX_LENGTH + */ +PJ_DECL_DATA(const unsigned) PJ_GUID_STRING_LENGTH; + +/** + * Get #PJ_GUID_STRING_LENGTH constant. */ -extern const unsigned PJ_GUID_STRING_LENGTH; +PJ_DECL(unsigned) pj_GUID_STRING_LENGTH(); /** * PJ_GUID_MAX_LENGTH specifies the maximum length of GUID string, diff --git a/pjlib/include/pj/pool.h b/pjlib/include/pj/pool.h index 5cb6aaf8..d12076fd 100644 --- a/pjlib/include/pj/pool.h +++ b/pjlib/include/pj/pool.h @@ -614,8 +614,15 @@ typedef struct pj_pool_factory_policy /** * This constant denotes the exception number that will be thrown by default * memory factory policy when memory allocation fails. + * + * @see pj_NO_MEMORY_EXCEPTION() */ -extern int PJ_NO_MEMORY_EXCEPTION; +PJ_DECL_DATA(int) PJ_NO_MEMORY_EXCEPTION; + +/** + * Get #PJ_NO_MEMORY_EXCEPTION constant. + */ +PJ_DECL(int) pj_NO_MEMORY_EXCEPTION(); /** * This global variable points to default memory pool factory policy. diff --git a/pjlib/src/pj/guid_simple.c b/pjlib/src/pj/guid_simple.c index fecdd78f..0f3d0853 100644 --- a/pjlib/src/pj/guid_simple.c +++ b/pjlib/src/pj/guid_simple.c @@ -21,7 +21,12 @@ #include #include -const unsigned PJ_GUID_STRING_LENGTH=20; +PJ_DEF_DATA(const unsigned) PJ_GUID_STRING_LENGTH=20; + +PJ_DEF(unsigned) pj_GUID_STRING_LENGTH() +{ + return PJ_GUID_STRING_LENGTH; +} static void init_mac_address(unsigned char mac_addr[16]) { diff --git a/pjlib/src/pj/guid_uuid.c b/pjlib/src/pj/guid_uuid.c index c4b46a5d..c0d71f4b 100644 --- a/pjlib/src/pj/guid_uuid.c +++ b/pjlib/src/pj/guid_uuid.c @@ -24,7 +24,12 @@ #include -const unsigned PJ_GUID_STRING_LENGTH=36; +PJ_DEF_DATA(const unsigned) PJ_GUID_STRING_LENGTH=36; + +PJ_DEF(unsigned) pj_GUID_STRING_LENGTH() +{ + return PJ_GUID_STRING_LENGTH; +} PJ_DEF(pj_str_t*) pj_generate_unique_string(pj_str_t *str) { diff --git a/pjlib/src/pj/guid_win32.c b/pjlib/src/pj/guid_win32.c index 41d3c5c2..1f145051 100644 --- a/pjlib/src/pj/guid_win32.c +++ b/pjlib/src/pj/guid_win32.c @@ -24,7 +24,12 @@ #include -const unsigned PJ_GUID_STRING_LENGTH=32; +PJ_DEF_DATA(const unsigned) PJ_GUID_STRING_LENGTH=32; + +PJ_DEF(unsigned) pj_GUID_STRING_LENGTH() +{ + return PJ_GUID_STRING_LENGTH; +} PJ_INLINE(void) hex2digit(unsigned value, char *p) { diff --git a/pjlib/src/pj/os_symbian.h b/pjlib/src/pj/os_symbian.h index abfa7f04..512640a2 100644 --- a/pjlib/src/pj/os_symbian.h +++ b/pjlib/src/pj/os_symbian.h @@ -25,9 +25,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include diff --git a/pjlib/src/pj/pool.c b/pjlib/src/pj/pool.c index 9f47892d..26fd6bbe 100644 --- a/pjlib/src/pj/pool.c +++ b/pjlib/src/pj/pool.c @@ -32,7 +32,12 @@ #define LOG(expr) PJ_LOG(6,expr) -int PJ_NO_MEMORY_EXCEPTION; +PJ_DEF_DATA(int) PJ_NO_MEMORY_EXCEPTION; + +PJ_DEF(int) pj_NO_MEMORY_EXCEPTION() +{ + return PJ_NO_MEMORY_EXCEPTION; +} /* * Create new block. -- cgit v1.2.3