summaryrefslogtreecommitdiff
path: root/pjlib
diff options
context:
space:
mode:
Diffstat (limited to 'pjlib')
-rw-r--r--pjlib/include/pj/guid.h10
-rw-r--r--pjlib/include/pj/pool.h9
-rw-r--r--pjlib/src/pj/guid_simple.c7
-rw-r--r--pjlib/src/pj/guid_uuid.c7
-rw-r--r--pjlib/src/pj/guid_win32.c7
-rw-r--r--pjlib/src/pj/os_symbian.h4
-rw-r--r--pjlib/src/pj/pool.c7
7 files changed, 43 insertions, 8 deletions
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 <pj/rand.h>
#include <pj/string.h>
-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 <uuid/uuid.h>
-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 <pj/os.h>
-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 <e32base.h>
#include <e32cmn.h>
#include <e32std.h>
-#include <ES_SOCK.H>
+#include <es_sock.h>
#include <in_sock.h>
-#include <CHARCONV.H>
+#include <charconf.h>
#include <utf.h>
#include <e32cons.h>
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.