summaryrefslogtreecommitdiff
path: root/pjlib/include
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2007-05-12 15:03:23 +0000
committerBenny Prijono <bennylp@teluu.com>2007-05-12 15:03:23 +0000
commitfd5aade84080ce74df1622958ea2c56c3e827703 (patch)
treeba9d237790fd514955f4e716afc162b7d7091d31 /pjlib/include
parent3727cae28c3f725ff6f909955718523737a597fa (diff)
Symbian fixes to compile on GCCE (nested callbacks etc)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1269 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/include')
-rw-r--r--pjlib/include/pj/compat/cc_armcc.h6
-rw-r--r--pjlib/include/pj/compat/os_symbian.h2
-rw-r--r--pjlib/include/pj/errno.h4
-rw-r--r--pjlib/include/pj/except.h10
-rw-r--r--pjlib/include/pj/types.h3
5 files changed, 21 insertions, 4 deletions
diff --git a/pjlib/include/pj/compat/cc_armcc.h b/pjlib/include/pj/compat/cc_armcc.h
index 504ca889..52fe74c0 100644
--- a/pjlib/include/pj/compat/cc_armcc.h
+++ b/pjlib/include/pj/compat/cc_armcc.h
@@ -33,8 +33,12 @@
#define PJ_CC_VER_2 __ARMCC_MINOR__
#define PJ_CC_VER_3 __ARMCC_PATCHLEVEL__
+#ifdef __cplusplus
+# define PJ_INLINE_SPECIFIER inline
+#else
+# define PJ_INLINE_SPECIFIER static __inline
+#endif
-#define PJ_INLINE_SPECIFIER static // why is not inline accepted?
#define PJ_THREAD_FUNC
#define PJ_NORETURN
#define PJ_ATTR_NORETURN __attribute__ ((noreturn))
diff --git a/pjlib/include/pj/compat/os_symbian.h b/pjlib/include/pj/compat/os_symbian.h
index b1b1cd1a..f6787b06 100644
--- a/pjlib/include/pj/compat/os_symbian.h
+++ b/pjlib/include/pj/compat/os_symbian.h
@@ -144,7 +144,9 @@
#define PJ_HAS_SOCKLEN_T 1
typedef unsigned int socklen_t;
+#ifndef __GCCE__
#include <e32def.h>
+#endif
/*
#if defined(PJ_EXPORTING)
diff --git a/pjlib/include/pj/errno.h b/pjlib/include/pj/errno.h
index cd5d9164..df6c1b02 100644
--- a/pjlib/include/pj/errno.h
+++ b/pjlib/include/pj/errno.h
@@ -111,6 +111,7 @@ PJ_DECL(void) pj_set_netos_error(pj_status_t code);
PJ_DECL(pj_str_t) pj_strerror( pj_status_t statcode,
char *buf, pj_size_t bufsize);
+typedef pj_str_t (*pjsip_error_callback)(pj_status_t, char*, pj_size_t);
/**
* Register strerror message handler for the specified error space.
* Application can register its own handler to supply the error message
@@ -132,8 +133,7 @@ PJ_DECL(pj_str_t) pj_strerror( pj_status_t statcode,
*/
PJ_DECL(pj_status_t) pj_register_strerror(pj_status_t start_code,
pj_status_t err_space,
- pj_str_t (*f)(pj_status_t,char*,
- pj_size_t));
+ pjsip_error_callback f);
/**
* @hideinitializer
diff --git a/pjlib/include/pj/except.h b/pjlib/include/pj/except.h
index 610f4626..509b01be 100644
--- a/pjlib/include/pj/except.h
+++ b/pjlib/include/pj/except.h
@@ -26,6 +26,7 @@
#include <pj/types.h>
#include <pj/compat/setjmp.h>
+#include <pj/log.h>
PJ_BEGIN_DECL
@@ -265,6 +266,15 @@ public:
while (0)
#define PJ_GET_EXCEPTION() pj_excp_.code_
+#else
+
+#define PJ_USE_EXCEPTION
+#define PJ_TRY
+#define PJ_CATCH_ANY if (0)
+#define PJ_END
+#define PJ_THROW(x_id) do { PJ_LOG(1,("PJ_THROW"," error code = %d",x_id)); } while (0)
+#define PJ_GET_EXCEPTION() 0
+
#endif /* __cplusplus */
#else
diff --git a/pjlib/include/pj/types.h b/pjlib/include/pj/types.h
index 7b7598b1..e9095524 100644
--- a/pjlib/include/pj/types.h
+++ b/pjlib/include/pj/types.h
@@ -302,6 +302,7 @@ PJ_DECL(pj_status_t) pj_init(void);
*/
PJ_DECL(void) pj_shutdown(void);
+typedef void (*pj_exit_callback)(void);
/**
* Register cleanup function to be called by PJLIB when pj_shutdown() is
* called.
@@ -310,7 +311,7 @@ PJ_DECL(void) pj_shutdown(void);
*
* @return PJ_SUCCESS on success.
*/
-PJ_DECL(pj_status_t) pj_atexit(void (*func)(void));
+PJ_DECL(pj_status_t) pj_atexit(pj_exit_callback func);