summaryrefslogtreecommitdiff
path: root/pjlib/src/pj/os_error_win32.c
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/src/pj/os_error_win32.c
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/src/pj/os_error_win32.c')
-rw-r--r--pjlib/src/pj/os_error_win32.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/pjlib/src/pj/os_error_win32.c b/pjlib/src/pj/os_error_win32.c
index 8c6d56c3..80a4eb23 100644
--- a/pjlib/src/pj/os_error_win32.c
+++ b/pjlib/src/pj/os_error_win32.c
@@ -33,6 +33,8 @@
/*
* From Apache's APR:
*/
+#if defined(PJ_HAS_ERROR_STRING) && (PJ_HAS_ERROR_STRING!=0)
+
static const struct {
pj_os_err_type code;
const char *msg;
@@ -89,6 +91,9 @@ static const struct {
{0, NULL}
};
+#endif /* PJ_HAS_ERROR_STRING */
+
+
PJ_DEF(pj_status_t) pj_get_os_error(void)
{
@@ -155,6 +160,8 @@ int platform_strerror( pj_os_err_type os_errcode,
#endif
if (!len) {
+
+#if defined(PJ_HAS_ERROR_STRING) && (PJ_HAS_ERROR_STRING!=0)
int i;
for (i = 0; gaErrorList[i].msg; ++i) {
if (gaErrorList[i].code == os_errcode) {
@@ -167,6 +174,7 @@ int platform_strerror( pj_os_err_type os_errcode,
break;
}
}
+#endif /* PJ_HAS_ERROR_STRING */
} else {
/* Remove trailing newlines. */