diff options
author | Benny Prijono <bennylp@teluu.com> | 2007-05-02 18:54:19 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2007-05-02 18:54:19 +0000 |
commit | faede3bfd55af757bd3b76b075d435d6b31b2c0f (patch) | |
tree | badc8973453990054ecbc923e5c80cc23f628d6b /pjlib/include/pj/errno.h | |
parent | 4b5a9b5ec7f7dd042d7fb40bccdf4ee44d28122b (diff) |
Errno and memory size tweaking for Symbian
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1244 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/include/pj/errno.h')
-rw-r--r-- | pjlib/include/pj/errno.h | 12 |
1 files changed, 10 insertions, 2 deletions
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 /** |