]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
use ::abort when compiling in a c++ compiler
authorMoises Silva <moy@sangoma.com>
Fri, 27 Nov 2009 19:21:39 +0000 (19:21 +0000)
committerMoises Silva <moy@sangoma.com>
Fri, 27 Nov 2009 19:21:39 +0000 (19:21 +0000)
git-svn-id: http://svn.openzap.org/svn/openzap/branches/sangoma_boost@912 a93c3328-9c30-0410-af19-c9cd2b2d52af

libs/freetdm/src/include/openzap.h

index a1fec59b89a9f910357135942c871bfb7974eb8f..535048968784b7ccd19cc1ef396a0dfdf3844385 100644 (file)
@@ -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;