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

Freeswitch SVN anthm at freeswitch.org
Sun Sep 17 14:44:53 EDT 2006


Author: anthm
Date: Sun Sep 17 14:44:53 2006
New Revision: 2722

Modified:
   freeswitch/trunk/configure
   freeswitch/trunk/configure.in
   freeswitch/trunk/src/include/switch_am_config.h.in
   freeswitch/trunk/src/include/switch_utils.h

Log:
use usleep when possible, ./configure && make sure when you update

Modified: freeswitch/trunk/configure
==============================================================================
--- freeswitch/trunk/configure	(original)
+++ freeswitch/trunk/configure	Sun Sep 17 14:44:53 2006
@@ -20843,7 +20843,8 @@
 
 
 
-for ac_func in gethostname vasprintf mmap mlock mlockall
+
+for ac_func in gethostname vasprintf mmap mlock mlockall usleep
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 echo "$as_me:$LINENO: checking for $ac_func" >&5

Modified: freeswitch/trunk/configure.in
==============================================================================
--- freeswitch/trunk/configure.in	(original)
+++ freeswitch/trunk/configure.in	Sun Sep 17 14:44:53 2006
@@ -34,7 +34,7 @@
 AC_FUNC_MALLOC
 AC_TYPE_SIGNAL
 AC_FUNC_STRFTIME
-AC_CHECK_FUNCS([gethostname vasprintf mmap mlock mlockall])
+AC_CHECK_FUNCS([gethostname vasprintf mmap mlock mlockall usleep])
 
 AC_C_BIGENDIAN(AC_DEFINE([__BYTE_ORDER],__BIG_ENDIAN,[Big Endian]),AC_DEFINE([__BYTE_ORDER],__LITTLE_ENDIAN,[Little Endian]))
 AC_DEFINE([__LITTLE_ENDIAN],1234,[for the places where it is not defined])

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	Sun Sep 17 14:44:53 2006
@@ -64,6 +64,9 @@
 /* Define to 1 if you have the <unistd.h> header file. */
 #undef HAVE_UNISTD_H
 
+/* Define to 1 if you have the `usleep' function. */
+#undef HAVE_USLEEP
+
 /* Define to 1 if you have the `vasprintf' function. */
 #undef HAVE_VASPRINTF
 

Modified: freeswitch/trunk/src/include/switch_utils.h
==============================================================================
--- freeswitch/trunk/src/include/switch_utils.h	(original)
+++ freeswitch/trunk/src/include/switch_utils.h	Sun Sep 17 14:44:53 2006
@@ -166,7 +166,11 @@
 /*!
   \brief Wait a desired number of microseconds and yield the CPU
 */
+#ifdef HAVE_USLEEP
+#define switch_yield(ms) usleep(ms);
+#else
 #define switch_yield(ms) apr_sleep(ms * 10); //apr_thread_yield();
+#endif
 
 /*!
   \brief Declares a function designed to set a dymaic global string



More information about the Freeswitch-svn mailing list