({ \
const char *__old = (s); \
size_t __len = strlen(__old) + 1; \
- char *__new = __builtin_alloca(__len); \
+ char *__new = (char *)__builtin_alloca(__len); \
memcpy (__new, __old, __len); \
__new; \
}))
#include "asterisk/logger.h"
#include "asterisk/compiler.h"
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
#define AST_PTHREADT_NULL (pthread_t) -1
#define AST_PTHREADT_STOP (pthread_t) -2
return ast_atomic_sub_fetch(p, 1, __ATOMIC_RELAXED) == 0;
})
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
+
/*! @} */
#endif /* _ASTERISK_LOCK_H */
void __attribute__((format(printf, 2, 3))) ast_child_verbose(int level, const char *fmt, ...);
-int ast_register_verbose(void (*verboser)(const char *string)) attribute_warn_unused_result;
-int ast_unregister_verbose(void (*verboser)(const char *string)) attribute_warn_unused_result;
-
/*
* These gymnastics are due to platforms which designate char as unsigned by
* default. Level is the negative character -- offset by 1, because \0 is
if (__builtin_expect(buf->__AST_STR_LEN > 0, 1)) {
return (char *) buf->__AST_STR_STR;
}
- return "";
+ return (char *)"";
}
)