From 2c976c9f81db4bb9222cfa72e73b9ccd4d2931a2 Mon Sep 17 00:00:00 2001 From: Moises Silva Date: Fri, 27 Nov 2009 19:21:39 +0000 Subject: [PATCH] use ::abort when compiling in a c++ compiler git-svn-id: http://svn.openzap.org/svn/openzap/branches/sangoma_boost@912 a93c3328-9c30-0410-af19-c9cd2b2d52af --- libs/freetdm/src/include/openzap.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/libs/freetdm/src/include/openzap.h b/libs/freetdm/src/include/openzap.h index a1fec59b89..5350489687 100644 --- a/libs/freetdm/src/include/openzap.h +++ b/libs/freetdm/src/include/openzap.h @@ -776,7 +776,7 @@ ZIO_CODEC_FUNCTION(zio_alaw2ulaw); if (!(assertion)) { \ zap_log(ZAP_LOG_CRIT, msg); \ if (g_zap_crash_policy & ZAP_CRASH_ON_ASSERT) { \ - abort(); \ + zap_abort(); \ } \ } @@ -787,7 +787,7 @@ ZIO_CODEC_FUNCTION(zio_alaw2ulaw); if (!(assertion)) { \ zap_log(ZAP_LOG_CRIT, msg); \ if (g_zap_crash_policy & ZAP_CRASH_ON_ASSERT) { \ - abort(); \ + zap_abort(); \ } else { \ return retval; \ } \ @@ -823,6 +823,15 @@ ZIO_CODEC_FUNCTION(zio_alaw2ulaw); */ #define zap_socket_close(it) if (it > -1) { close(it); it = -1;} +static __inline__ void zap_abort(void) +{ +#ifdef __cplusplus + ::abort(); +#else + abort(); +#endif +} + static __inline__ void zap_set_state_all(zap_span_t *span, zap_channel_state_t state) { uint32_t j;