Make esl work with C++ compilers
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11336 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
af82478311
commit
0a8735931b
|
@ -36,6 +36,10 @@
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
#ifdef _cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif /* defined(_cplusplus) */
|
||||||
|
|
||||||
#define esl_copy_string(_x, _y, _z) strncpy(_x, _y, _z - 1)
|
#define esl_copy_string(_x, _y, _z) strncpy(_x, _y, _z - 1)
|
||||||
#define esl_set_string(_x, _y) esl_copy_string(_x, _y, sizeof(_x))
|
#define esl_set_string(_x, _y) esl_copy_string(_x, _y, sizeof(_x))
|
||||||
|
|
||||||
|
@ -336,7 +340,21 @@ ESL_DECLARE(esl_status_t) esl_events(esl_handle_t *handle, esl_event_type_t etyp
|
||||||
#define esl_recv(_h) esl_recv_event(_h, NULL)
|
#define esl_recv(_h) esl_recv_event(_h, NULL)
|
||||||
#define esl_recv_timed(_h, _ms) esl_recv_event_timed(_h, _ms, NULL)
|
#define esl_recv_timed(_h, _ms) esl_recv_event_timed(_h, _ms, NULL)
|
||||||
|
|
||||||
#endif
|
|
||||||
|
#ifdef _cplusplus
|
||||||
|
}
|
||||||
|
#endif /* defined(_cplusplus) */
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* defined(_ESL_H_) */
|
||||||
|
|
||||||
|
/* For Emacs:
|
||||||
|
* Local Variables:
|
||||||
|
* mode:c
|
||||||
|
* indent-tabs-mode:t
|
||||||
|
* tab-width:4
|
||||||
|
* c-basic-offset:4
|
||||||
|
* End:
|
||||||
|
* For VIM:
|
||||||
|
* vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
|
||||||
|
*/
|
||||||
|
|
|
@ -53,6 +53,12 @@
|
||||||
#define ESL_CONFIG_H
|
#define ESL_CONFIG_H
|
||||||
|
|
||||||
#include "esl.h"
|
#include "esl.h"
|
||||||
|
|
||||||
|
#ifdef _cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif /* defined(_cplusplus) */
|
||||||
|
|
||||||
|
|
||||||
#define ESL_URL_SEPARATOR "://"
|
#define ESL_URL_SEPARATOR "://"
|
||||||
|
|
||||||
|
|
||||||
|
@ -153,7 +159,13 @@ ESL_DECLARE(int) esl_config_get_cas_bits(char *strvalue, unsigned char *outbits)
|
||||||
|
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
#endif
|
|
||||||
|
#ifdef _cplusplus
|
||||||
|
}
|
||||||
|
#endif /* defined(_cplusplus) */
|
||||||
|
|
||||||
|
#endif /* defined(ESL_CONFIG_H) */
|
||||||
|
|
||||||
/* For Emacs:
|
/* For Emacs:
|
||||||
* Local Variables:
|
* Local Variables:
|
||||||
* mode:c
|
* mode:c
|
||||||
|
@ -163,4 +175,4 @@ ESL_DECLARE(int) esl_config_get_cas_bits(char *strvalue, unsigned char *outbits)
|
||||||
* End:
|
* End:
|
||||||
* For VIM:
|
* For VIM:
|
||||||
* vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
|
* vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
|
||||||
*/
|
*/
|
|
@ -36,6 +36,10 @@
|
||||||
|
|
||||||
#include <esl.h>
|
#include <esl.h>
|
||||||
|
|
||||||
|
#ifdef _cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif /* defined(_cplusplus) */
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
ESL_STACK_BOTTOM,
|
ESL_STACK_BOTTOM,
|
||||||
ESL_STACK_TOP
|
ESL_STACK_TOP
|
||||||
|
@ -268,8 +272,11 @@ ESL_DECLARE(const char *)esl_priority_name(esl_priority_t priority);
|
||||||
|
|
||||||
///\}
|
///\}
|
||||||
|
|
||||||
|
#ifdef _cplusplus
|
||||||
|
}
|
||||||
|
#endif /* defined(_cplusplus) */
|
||||||
|
|
||||||
#endif
|
#endif /* defined(ESL_EVENT_H) */
|
||||||
|
|
||||||
/* For Emacs:
|
/* For Emacs:
|
||||||
* Local Variables:
|
* Local Variables:
|
||||||
|
|
|
@ -23,6 +23,10 @@
|
||||||
|
|
||||||
#include "esl.h"
|
#include "esl.h"
|
||||||
|
|
||||||
|
#ifdef _cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif /* defined(_cplusplus) */
|
||||||
|
|
||||||
typedef struct esl_mutex esl_mutex_t;
|
typedef struct esl_mutex esl_mutex_t;
|
||||||
typedef struct esl_thread esl_thread_t;
|
typedef struct esl_thread esl_thread_t;
|
||||||
typedef void *(*esl_thread_function_t) (esl_thread_t *, void *);
|
typedef void *(*esl_thread_function_t) (esl_thread_t *, void *);
|
||||||
|
@ -36,7 +40,11 @@ ESL_DECLARE(esl_status_t) esl_mutex_lock(esl_mutex_t *mutex);
|
||||||
ESL_DECLARE(esl_status_t) esl_mutex_trylock(esl_mutex_t *mutex);
|
ESL_DECLARE(esl_status_t) esl_mutex_trylock(esl_mutex_t *mutex);
|
||||||
ESL_DECLARE(esl_status_t) esl_mutex_unlock(esl_mutex_t *mutex);
|
ESL_DECLARE(esl_status_t) esl_mutex_unlock(esl_mutex_t *mutex);
|
||||||
|
|
||||||
#endif
|
#ifdef _cplusplus
|
||||||
|
}
|
||||||
|
#endif /* defined(_cplusplus) */
|
||||||
|
|
||||||
|
#endif /* defined(_ESL_THREADMUTEX_H) */
|
||||||
|
|
||||||
/* For Emacs:
|
/* For Emacs:
|
||||||
* Local Variables:
|
* Local Variables:
|
||||||
|
|
Loading…
Reference in New Issue