mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-08 20:43:51 +00:00
add sipcc to tree for sdp parser
This commit is contained in:
1 parent
36f89c8b7c
commit
0f00946782
369 files changed
+183596
No files matched your search
@@ -0,0 +1,85 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef _CPR_LINUX_ASSERT_H_
|
||||
#define _CPR_LINUX_ASSERT_H_
|
||||
|
||||
#include "assert.h"
|
||||
|
||||
/*--------------------------------------
|
||||
*
|
||||
* Macros
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* CPR assert macro which calls cpr_assert_msg instead of abort
|
||||
*
|
||||
* The macro is dependent on the setting of FILE_ID which is used
|
||||
* to override the __FILE__ setting. For certain compilers, i.e.
|
||||
* read 'Diab 4.4b', the __FILE__ is set to a Windows type path
|
||||
* name which can contain backslashes that can cause odd output.
|
||||
*/
|
||||
#ifdef FILE_ID
|
||||
#define cpr_assert(expr) \
|
||||
((expr) ? (void)0 : cpr_assert_msg(FILE_ID, __LINE__, #expr))
|
||||
#else
|
||||
#define cpr_assert(expr) \
|
||||
((expr) ? (void)0 : cpr_assert_msg(__FILE__, __LINE__, #expr))
|
||||
#endif
|
||||
|
||||
#define cpr_assert_debug(expr)
|
||||
|
||||
/*
|
||||
* A side note if somehow concerned about performance.
|
||||
*
|
||||
* This method will pre-render the string via the compiler,
|
||||
* but will use more space due to larger strings. Basically,
|
||||
* good for speed and bad for memory.
|
||||
*
|
||||
* This is coded mostly as an example so if performance was an issue
|
||||
* that the asserts could be low impact.
|
||||
*
|
||||
* #define cpr_assert_debug(expr) \
|
||||
* ((expr) ? (void)0 : cpr_assert_msg( \
|
||||
* __FILE__ ": line " __LINE__ ": assertion failed: " #expr))
|
||||
*
|
||||
* Note that this is not allowed when using __STRING_ANSI__
|
||||
*/
|
||||
|
||||
#define cpr_assert_debug_rtn(expr)
|
||||
|
||||
/*--------------------------------------
|
||||
*
|
||||
* Structures
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* CPR assert modes of operation
|
||||
*/
|
||||
typedef enum {
|
||||
CPR_ASSERT_MODE_NONE, /**< Off, no message ouput */
|
||||
CPR_ASSERT_MODE_WARNING_LIMITED, /**< Warnings to syslog are limited */
|
||||
CPR_ASSERT_MODE_WARNING_ALL, /**< All warnings sent to syslog */
|
||||
CPR_ASSERT_MODE_ABORT /**< Assert failure will call abort */
|
||||
} cpr_assert_mode_e;
|
||||
|
||||
|
||||
/*--------------------------------------
|
||||
*
|
||||
* Globals
|
||||
*
|
||||
*/
|
||||
extern uint32_t cpr_assert_count;
|
||||
|
||||
/*--------------------------------------
|
||||
*
|
||||
* Prototypes
|
||||
*
|
||||
*/
|
||||
void
|
||||
cpr_assert_msg(const char *file, const int line, const char *expression);
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user