]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Make esl work with C++ compilers
authorMathieu Rene <mrene@avgs.ca>
Wed, 21 Jan 2009 20:04:07 +0000 (20:04 +0000)
committerMathieu Rene <mrene@avgs.ca>
Wed, 21 Jan 2009 20:04:07 +0000 (20:04 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11336 d0543943-73ff-0310-b7d9-9358b9ac24b2

libs/esl/src/include/esl.h
libs/esl/src/include/esl_config.h
libs/esl/src/include/esl_event.h
libs/esl/src/include/esl_threadmutex.h

index 2abe03329b59ddc2d0e6f110b6f01a49d111fea4..aa04f8df3ad751ca55e3a313776a246056b76538 100644 (file)
 
 #include <stdarg.h>
 
+#ifdef _cplusplus
+extern "C" {
+#endif /* defined(_cplusplus) */
+
 #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))
 
@@ -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_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:
+ */
index a564d74f54ee31e229bec2743429589cc2dc9bb3..d6e121b544d54c783dd6c9f510452413868e9025 100644 (file)
 #define ESL_CONFIG_H
 
 #include "esl.h"
+
+#ifdef _cplusplus
+extern "C" {
+#endif /* defined(_cplusplus) */
+
+
 #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:
  * Local Variables:
  * mode:c
@@ -163,4 +175,4 @@ ESL_DECLARE(int) esl_config_get_cas_bits(char *strvalue, unsigned char *outbits)
  * End:
  * For VIM:
  * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
- */
+ */
\ No newline at end of file
index db9d5fae22a1ffb09c87a7a7747d7a868a019482..f86b411be93d9ba5dc25750003a7100aa69e667b 100644 (file)
 
 #include <esl.h>
 
+#ifdef _cplusplus
+extern "C" {
+#endif /* defined(_cplusplus) */
+
 typedef enum {
        ESL_STACK_BOTTOM,
        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:
  * Local Variables:
index 3355f57724a1637de7246c70a253015570a004c2..d971a3630dfb5e5551906daf8c8985db38bfd66b 100644 (file)
 
 #include "esl.h"
 
+#ifdef _cplusplus
+extern "C" {
+#endif /* defined(_cplusplus) */
+
 typedef struct esl_mutex esl_mutex_t;
 typedef struct esl_thread esl_thread_t;
 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_unlock(esl_mutex_t *mutex);
 
-#endif
+#ifdef _cplusplus
+}
+#endif /* defined(_cplusplus) */
+
+#endif /* defined(_ESL_THREADMUTEX_H) */
 
 /* For Emacs:
  * Local Variables: