From faede3bfd55af757bd3b76b075d435d6b31b2c0f Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Wed, 2 May 2007 18:54:19 +0000 Subject: Errno and memory size tweaking for Symbian git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1244 74dad513-b988-da41-8d7b-12977e46ad98 --- pjlib/include/pj/errno.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'pjlib/include/pj/errno.h') diff --git a/pjlib/include/pj/errno.h b/pjlib/include/pj/errno.h index 71ba69fd..cd5d9164 100644 --- a/pjlib/include/pj/errno.h +++ b/pjlib/include/pj/errno.h @@ -167,7 +167,11 @@ PJ_DECL(pj_status_t) pj_register_strerror(pj_status_t start_code, * @warning Macro implementation; the syserr argument may be evaluated * multiple times. */ -#define PJ_STATUS_FROM_OS(e) (e == 0 ? PJ_SUCCESS : e + PJ_ERRNO_START_SYS) +#if PJ_NATIVE_ERR_POSITIVE +# define PJ_STATUS_FROM_OS(e) (e == 0 ? PJ_SUCCESS : e + PJ_ERRNO_START_SYS) +#else +# define PJ_STATUS_FROM_OS(e) (e == 0 ? PJ_SUCCESS : PJ_ERRNO_START_SYS - e) +#endif /** * @hideinitializer @@ -179,7 +183,11 @@ PJ_DECL(pj_status_t) pj_register_strerror(pj_status_t start_code, * multiple times. If the statcode was not created by * pj_get_os_error or PJ_STATUS_FROM_OS, the results are undefined. */ -#define PJ_STATUS_TO_OS(e) (e == 0 ? PJ_SUCCESS : e - PJ_ERRNO_START_SYS) +#if PJ_NATIVE_ERR_POSITIVE +# define PJ_STATUS_TO_OS(e) (e == 0 ? PJ_SUCCESS : e - PJ_ERRNO_START_SYS) +#else +# define PJ_STATUS_TO_OS(e) (e == 0 ? PJ_SUCCESS : PJ_ERRNO_START_SYS - e) +#endif /** -- cgit v1.2.3