summaryrefslogtreecommitdiff
path: root/pjlib-util
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2006-03-18 12:26:55 +0000
committerBenny Prijono <bennylp@teluu.com>2006-03-18 12:26:55 +0000
commit1ef58d201f4613f91a9cbafa4545f37f3fab3cf6 (patch)
tree7169f9c55ab05f6140bc6f2faa0d583166b1eb94 /pjlib-util
parentf8793f52a83dd232eddf2bb61f48cca6dd759ffd (diff)
Added option to disable error message altogether, to save space footprint
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@330 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib-util')
-rw-r--r--pjlib-util/src/pjlib-util/errno.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/pjlib-util/src/pjlib-util/errno.c b/pjlib-util/src/pjlib-util/errno.c
index b5e43e7a..bce785ae 100644
--- a/pjlib-util/src/pjlib-util/errno.c
+++ b/pjlib-util/src/pjlib-util/errno.c
@@ -25,6 +25,7 @@
* MUST KEEP THIS ARRAY SORTED!!
* Message must be limited to 64 chars!
*/
+#if defined(PJ_HAS_ERROR_STRING) && PJ_HAS_ERROR_STRING!=0
static const struct
{
int code;
@@ -47,7 +48,7 @@ static const struct
/* XML errors */
{ PJLIB_UTIL_EINXML, "Invalid XML message" },
};
-
+#endif /* PJ_HAS_ERROR_STRING */
/*
@@ -58,6 +59,8 @@ PJ_DEF(pj_str_t) pjlib_util_strerror( pj_status_t statcode,
{
pj_str_t errstr;
+#if defined(PJ_HAS_ERROR_STRING) && (PJ_HAS_ERROR_STRING != 0)
+
if (statcode >= PJLIB_UTIL_ERRNO_START &&
statcode < PJLIB_UTIL_ERRNO_START + PJ_ERRNO_SPACE_SIZE)
{
@@ -96,10 +99,13 @@ PJ_DEF(pj_str_t) pjlib_util_strerror( pj_status_t statcode,
}
}
+#endif /* PJ_HAS_ERROR_STRING */
+
+
/* Error not found. */
errstr.ptr = buf;
errstr.slen = pj_ansi_snprintf(buf, bufsize,
- "Unknown error %d",
+ "Unknown pjlib-util error %d",
statcode);
return errstr;