[Freeswitch-svn] [commit] r11336 - freeswitch/trunk/libs/esl/src/include

FreeSWITCH SVN mrene at freeswitch.org
Wed Jan 21 12:04:07 PST 2009


Author: mrene
Date: Wed Jan 21 14:04:07 2009
New Revision: 11336

Log:
Make esl work with C++ compilers

Modified:
   freeswitch/trunk/libs/esl/src/include/esl.h
   freeswitch/trunk/libs/esl/src/include/esl_config.h
   freeswitch/trunk/libs/esl/src/include/esl_event.h
   freeswitch/trunk/libs/esl/src/include/esl_threadmutex.h

Modified: freeswitch/trunk/libs/esl/src/include/esl.h
==============================================================================
--- freeswitch/trunk/libs/esl/src/include/esl.h	(original)
+++ freeswitch/trunk/libs/esl/src/include/esl.h	Wed Jan 21 14:04:07 2009
@@ -36,6 +36,10 @@
 
 #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 @@
 #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:
+ */

Modified: freeswitch/trunk/libs/esl/src/include/esl_config.h
==============================================================================
--- freeswitch/trunk/libs/esl/src/include/esl_config.h	(original)
+++ freeswitch/trunk/libs/esl/src/include/esl_config.h	Wed Jan 21 14:04:07 2009
@@ -53,6 +53,12 @@
 #define ESL_CONFIG_H
 
 #include "esl.h"
+
+#ifdef _cplusplus
+extern "C" {
+#endif /* defined(_cplusplus) */
+
+
 #define ESL_URL_SEPARATOR "://"
 
 
@@ -153,7 +159,13 @@
 
 
 /** @} */
-#endif
+
+#ifdef _cplusplus
+}
+#endif /* defined(_cplusplus) */
+
+#endif /* defined(ESL_CONFIG_H) */
+
 /* For Emacs:
  * Local Variables:
  * mode:c
@@ -163,4 +175,4 @@
  * End:
  * For VIM:
  * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
- */
+ */
\ No newline at end of file

Modified: freeswitch/trunk/libs/esl/src/include/esl_event.h
==============================================================================
--- freeswitch/trunk/libs/esl/src/include/esl_event.h	(original)
+++ freeswitch/trunk/libs/esl/src/include/esl_event.h	Wed Jan 21 14:04:07 2009
@@ -36,6 +36,10 @@
 
 #include <esl.h>
 
+#ifdef _cplusplus
+extern "C" {
+#endif /* defined(_cplusplus) */
+
 typedef enum {
 	ESL_STACK_BOTTOM,
 	ESL_STACK_TOP
@@ -268,8 +272,11 @@
 
 ///\}
 
+#ifdef _cplusplus
+}
+#endif /* defined(_cplusplus) */
 
-#endif
+#endif /* defined(ESL_EVENT_H) */
 
 /* For Emacs:
  * Local Variables:

Modified: freeswitch/trunk/libs/esl/src/include/esl_threadmutex.h
==============================================================================
--- freeswitch/trunk/libs/esl/src/include/esl_threadmutex.h	(original)
+++ freeswitch/trunk/libs/esl/src/include/esl_threadmutex.h	Wed Jan 21 14:04:07 2009
@@ -23,6 +23,10 @@
 
 #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_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:



More information about the Freeswitch-svn mailing list