[Freeswitch-trunk] [commit] r3707 - in freeswitch/trunk: . src/include

Freeswitch SVN anthm at freeswitch.org
Mon Dec 18 19:41:24 EST 2006


Author: anthm
Date: Mon Dec 18 19:41:20 2006
New Revision: 3707

Modified:
   freeswitch/trunk/configure
   freeswitch/trunk/configure.in
   freeswitch/trunk/src/include/switch_am_config.h.in
   freeswitch/trunk/src/include/switch_channel.h
   freeswitch/trunk/src/include/switch_core.h
   freeswitch/trunk/src/include/switch_event.h
   freeswitch/trunk/src/include/switch_platform.h
   freeswitch/trunk/src/include/switch_types.h

Log:
autodroolz

Modified: freeswitch/trunk/configure
==============================================================================
--- freeswitch/trunk/configure	(original)
+++ freeswitch/trunk/configure	Mon Dec 18 19:41:20 2006
@@ -20621,12 +20621,10 @@
                         if test "x${ax_cv_c_compiler_vendor}"  =  "xsun" ; then                                SOLINK="-Bdynamic -dy -G"
                                 new_AM_CFLAGS="-DPATH_MAX=2048 -KPIC -DPIC"
                                 new_AM_LDFLAGS="-L${prefix}/lib -R${prefix}/lib"
-                                FUNC_DEF=__func__
                                 IN_LINE=""
                         elif test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then                                SOLINK="-Bdynamic -dy -G"
                                 new_AM_CFLAGS="-DPATH_MAX=2048 -fPIC"
                                 new_AM_LDFLAGS=""
-                                FUNC_DEF=__FUNCTION__
                                 IN_LINE=inline
                         fi
                         DYNAMIC_LIB_EXTEN="so"
@@ -20639,19 +20637,16 @@
                         fi
                         DYNAMIC_LIB_EXTEN="dylib"
                         IN_LINE=inline
-                        FUNC_DEF=__FUNCTION__
                 ;;
                 x86_64-*-linux-gnu)
                         if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then
                                 SOLINK="-Bdynamic -dy -G"
                                 new_AM_CFLAGS="-KPIC -DPIC"
                                 new_AM_LDFLAGS="-L${prefix}/lib -R${prefix}/lib"
-                                FUNC_DEF=__func__
                         elif test "x${ax_cv_c_compiler_vendor}"="xgnu" ; then
                                 SOLINK="-shared -Xlinker -x"
                                 new_AM_CFLAGS="-fPIC"
                                 new_AM_LDFLAGS=""
-                                FUNC_DEF=__FUNCTION__
                         fi
                         DYNAMIC_LIB_EXTEN="so"
                         IN_LINE=inline
@@ -20661,12 +20656,10 @@
                                 SOLINK="-Bdynamic -dy -G"
                                 new_AM_CFLAGS="-KPIC -DPIC"
                                 new_AM_LDFLAGS="-L${prefix}/lib -R${prefix}/lib"
-                                FUNC_DEF=__func__
                         elif test "x${ax_cv_c_compiler_vendor}"="xgnu" ; then
                                 SOLINK="-shared -Xlinker -x"
                                 new_AM_CFLAGS="-fpic"
                                 new_AM_LDFLAGS=""
-                                FUNC_DEF=__FUNCTION__
                         fi
                         IN_LINE=inline
                         DYNAMIC_LIB_EXTEN="so"
@@ -20675,11 +20668,6 @@
 
 
 
-
-
-cat >>confdefs.h <<_ACEOF
-#define __AUTO_FUNCTION__ $FUNC_DEF
-_ACEOF
 
 
 cat >>confdefs.h <<_ACEOF

Modified: freeswitch/trunk/configure.in
==============================================================================
--- freeswitch/trunk/configure.in	(original)
+++ freeswitch/trunk/configure.in	Mon Dec 18 19:41:20 2006
@@ -48,12 +48,10 @@
                         if test "x${ax_cv_c_compiler_vendor}"  =  "xsun" ; then                                SOLINK="-Bdynamic -dy -G"
                                 new_AM_CFLAGS="-DPATH_MAX=2048 -KPIC -DPIC"
                                 new_AM_LDFLAGS="-L${prefix}/lib -R${prefix}/lib"
-                                FUNC_DEF=__func__
                                 IN_LINE=""
                         elif test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then                                SOLINK="-Bdynamic -dy -G"
                                 new_AM_CFLAGS="-DPATH_MAX=2048 -fPIC"
                                 new_AM_LDFLAGS=""
-                                FUNC_DEF=__FUNCTION__
                                 IN_LINE=inline
                         fi
                         DYNAMIC_LIB_EXTEN="so"
@@ -66,19 +64,16 @@
                         fi
                         DYNAMIC_LIB_EXTEN="dylib"
                         IN_LINE=inline
-                        FUNC_DEF=__FUNCTION__
                 ;;
                 x86_64-*-linux-gnu)
                         if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then
                                 SOLINK="-Bdynamic -dy -G"
                                 new_AM_CFLAGS="-KPIC -DPIC"
                                 new_AM_LDFLAGS="-L${prefix}/lib -R${prefix}/lib"
-                                FUNC_DEF=__func__
                         elif test "x${ax_cv_c_compiler_vendor}"="xgnu" ; then
                                 SOLINK="-shared -Xlinker -x"
                                 new_AM_CFLAGS="-fPIC"
                                 new_AM_LDFLAGS=""
-                                FUNC_DEF=__FUNCTION__
                         fi
                         DYNAMIC_LIB_EXTEN="so"
                         IN_LINE=inline
@@ -88,12 +83,10 @@
                                 SOLINK="-Bdynamic -dy -G"
                                 new_AM_CFLAGS="-KPIC -DPIC"
                                 new_AM_LDFLAGS="-L${prefix}/lib -R${prefix}/lib"
-                                FUNC_DEF=__func__
                         elif test "x${ax_cv_c_compiler_vendor}"="xgnu" ; then
                                 SOLINK="-shared -Xlinker -x"
                                 new_AM_CFLAGS="-fpic"
                                 new_AM_LDFLAGS=""
-                                FUNC_DEF=__FUNCTION__
                         fi
                         IN_LINE=inline
                         DYNAMIC_LIB_EXTEN="so"
@@ -103,7 +96,6 @@
 AC_SUBST(new_AM_LDFLAGS)
 AC_SUBST(SOLINK)
 AC_SUBST(DYNAMIC_LIB_EXTEN)
-AC_DEFINE_UNQUOTED([__AUTO_FUNCTION__],[$FUNC_DEF],[define it the right way ;)])
 AC_DEFINE_UNQUOTED([inline],[$IN_LINE],[sunpro is bad at inline])
 AC_DEFINE_UNQUOTED([__inline__],[$IN_LINE],[sunpro is bad at inline])
 

Modified: freeswitch/trunk/src/include/switch_am_config.h.in
==============================================================================
--- freeswitch/trunk/src/include/switch_am_config.h.in	(original)
+++ freeswitch/trunk/src/include/switch_am_config.h.in	Mon Dec 18 19:41:20 2006
@@ -112,9 +112,6 @@
 /* Version number of package */
 #undef VERSION
 
-/* define it the right way ;) */
-#undef __AUTO_FUNCTION__
-
 /* sunpro is bad at inline */
 #undef __inline__
 

Modified: freeswitch/trunk/src/include/switch_channel.h
==============================================================================
--- freeswitch/trunk/src/include/switch_channel.h	(original)
+++ freeswitch/trunk/src/include/switch_channel.h	Mon Dec 18 19:41:20 2006
@@ -87,7 +87,7 @@
   \param state new state
   \return current state of channel after application of new state
 */	
-#define switch_channel_set_state(channel, state) switch_channel_perform_set_state(channel, __FILE__, __FUNCTION__, __LINE__, state)
+#define switch_channel_set_state(channel, state) switch_channel_perform_set_state(channel, __FILE__, __SWITCH_FUNC__, __LINE__, state)
 
 /*!
   \brief return a cause code for a given string
@@ -285,14 +285,14 @@
   \param channel channel to answer
   \return SWITCH_STATUS_SUCCESS if channel was answered successfully
 */
-#define switch_channel_answer(channel) switch_channel_perform_answer(channel, __FILE__, __FUNCTION__, __LINE__)
+#define switch_channel_answer(channel) switch_channel_perform_answer(channel, __FILE__, __SWITCH_FUNC__, __LINE__)
 
 /*!
   \brief Mark a channel answered with no indication (for outbound calls)
   \param channel channel to mark answered
   \return SWITCH_STATUS_SUCCESS if channel was answered successfully
 */
-#define switch_channel_mark_answered(channel) switch_channel_perform_mark_answered(channel, __FILE__, __FUNCTION__, __LINE__)
+#define switch_channel_mark_answered(channel) switch_channel_perform_mark_answered(channel, __FILE__, __SWITCH_FUNC__, __LINE__)
 
 SWITCH_DECLARE(switch_status_t) switch_channel_perform_ringback(switch_channel_t *channel,
 																const char *file,
@@ -303,7 +303,7 @@
   \param channel channel to ring
   \return SWITCH_STATUS_SUCCESS if successful
 */
-#define switch_channel_ringback(channel) switch_channel_perform_ringback(channel, __FILE__, __FUNCTION__, __LINE__)
+#define switch_channel_ringback(channel) switch_channel_perform_ringback(channel, __FILE__, __SWITCH_FUNC__, __LINE__)
 
 
 SWITCH_DECLARE(switch_status_t) switch_channel_perform_pre_answer(switch_channel_t *channel,
@@ -315,7 +315,7 @@
   \param channel channel to pre-answer
   \return SWITCH_STATUS_SUCCESS
 */								
-#define switch_channel_pre_answer(channel) switch_channel_perform_pre_answer(channel, __FILE__, __FUNCTION__, __LINE__)
+#define switch_channel_pre_answer(channel) switch_channel_perform_pre_answer(channel, __FILE__, __SWITCH_FUNC__, __LINE__)
 
 /*!
   \brief add a state handler table to a given channel
@@ -385,7 +385,7 @@
   \param hangup_cause the appropriate hangup cause
   \return the resulting channel state.
 */
-#define switch_channel_hangup(channel, hangup_cause) switch_channel_perform_hangup(channel, __FILE__, __FUNCTION__, __LINE__, hangup_cause)
+#define switch_channel_hangup(channel, hangup_cause) switch_channel_perform_hangup(channel, __FILE__, __SWITCH_FUNC__, __LINE__, hangup_cause)
 
 /*!
   \brief Test for presence of DTMF on a given channel

Modified: freeswitch/trunk/src/include/switch_core.h
==============================================================================
--- freeswitch/trunk/src/include/switch_core.h	(original)
+++ freeswitch/trunk/src/include/switch_core.h	Mon Dec 18 19:41:20 2006
@@ -648,7 +648,7 @@
   \param sig signal to send
   \return status returned by the session's signal handler
 */
-#define switch_core_session_kill_channel(session, sig) switch_core_session_perform_kill_channel(session, __FILE__, __FUNCTION__, __LINE__, sig)
+#define switch_core_session_kill_channel(session, sig) switch_core_session_perform_kill_channel(session, __FILE__, __SWITCH_FUNC__, __LINE__, sig)
 
 /*! 
   \brief Wait for a session to be ready for input

Modified: freeswitch/trunk/src/include/switch_event.h
==============================================================================
--- freeswitch/trunk/src/include/switch_event.h	(original)
+++ freeswitch/trunk/src/include/switch_event.h	Mon Dec 18 19:41:20 2006
@@ -298,7 +298,7 @@
   \return SWITCH_STATUS_SUCCESS if the operation was successful
   \note the body supplied by this function will supersede an existing body the event may have
 */
-#define switch_event_fire(event) switch_event_fire_detailed(__FILE__, (char * )__FUNCTION__, __LINE__, event, NULL)
+#define switch_event_fire(event) switch_event_fire_detailed(__FILE__, (char * )__SWITCH_FUNC__, __LINE__, event, NULL)
 
 /*!
   \brief Fire an event filling in most of the arguements with obvious values and allowing user_data to be sent
@@ -307,7 +307,7 @@
   \return SWITCH_STATUS_SUCCESS if the operation was successful
   \note the body supplied by this function will supersede an existing body the event may have
 */
-#define switch_event_fire_data(event, data) switch_event_fire_detailed(__FILE__, (char * )__FUNCTION__, __LINE__, event, data)
+#define switch_event_fire_data(event, data) switch_event_fire_detailed(__FILE__, (char * )__SWITCH_FUNC__, __LINE__, event, data)
 ///\}
 
 SWITCH_END_EXTERN_C

Modified: freeswitch/trunk/src/include/switch_platform.h
==============================================================================
--- freeswitch/trunk/src/include/switch_platform.h	(original)
+++ freeswitch/trunk/src/include/switch_platform.h	Mon Dec 18 19:41:20 2006
@@ -41,8 +41,12 @@
 #endif
 
 #include <stdio.h>
-#ifndef __FUNCTION__
-#define __FUNCTION__ (const char *)__AUTO_FUNCTION__
+
+/* OMG */
+#ifdef WIN32
+#define __SWITCH_FUNC__ __FUNCTION__
+#else
+#define __SWITCH_FUNC__ (const char *)__func__
 #endif
 
 #ifdef _MSC_VER

Modified: freeswitch/trunk/src/include/switch_types.h
==============================================================================
--- freeswitch/trunk/src/include/switch_types.h	(original)
+++ freeswitch/trunk/src/include/switch_types.h	Mon Dec 18 19:41:20 2006
@@ -393,9 +393,9 @@
 } switch_core_session_message_flag_t;
 
 #define SWITCH_UUID_FORMATTED_LENGTH APR_UUID_FORMATTED_LENGTH 	
-#define SWITCH_CHANNEL_LOG SWITCH_CHANNEL_ID_LOG, __FILE__, __FUNCTION__, __LINE__
-#define SWITCH_CHANNEL_LOG_CLEAN SWITCH_CHANNEL_ID_LOG_CLEAN, __FILE__, __FUNCTION__, __LINE__
-#define SWITCH_CHANNEL_EVENT SWITCH_CHANNEL_ID_EVENT, __FILE__, __FUNCTION__, __LINE__
+#define SWITCH_CHANNEL_LOG SWITCH_CHANNEL_ID_LOG, __FILE__, __SWITCH_FUNC__, __LINE__
+#define SWITCH_CHANNEL_LOG_CLEAN SWITCH_CHANNEL_ID_LOG_CLEAN, __FILE__, __SWITCH_FUNC__, __LINE__
+#define SWITCH_CHANNEL_EVENT SWITCH_CHANNEL_ID_EVENT, __FILE__, __SWITCH_FUNC__, __LINE__
 
 /*!
   \enum switch_channel_state_t



More information about the Freeswitch-trunk mailing list