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
This commit is contained in:
Moises Silva 2009-11-27 19:21:39 +00:00
parent ecf3294a88
commit 2c976c9f81
1 changed files with 11 additions and 2 deletions

View 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;