]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
misc. cleanup.
authorMichael Jerris <mike@jerris.com>
Mon, 9 Jan 2006 22:30:58 +0000 (22:30 +0000)
committerMichael Jerris <mike@jerris.com>
Mon, 9 Jan 2006 22:30:58 +0000 (22:30 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@313 d0543943-73ff-0310-b7d9-9358b9ac24b2

TODO
src/include/switch.h
src/include/switch_utils.h

diff --git a/TODO b/TODO
index 9719e42089f16d882d2b97bf38b131845608e1c1..655d97f5ccbcf6d2f3845fe2c982364cab59645c 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,4 +1,2 @@
-1. switch.h: Find a good home for the SWITCH_DECLARE stuff for win32\r
-2. MOD_WOOMERACHAN: #if 1==0 sectiton, convert to use switch_now instead of gettimeof day \r
-                               SWITCH_SLEEP (should I be using switch_sleep or switch_yield where I changed from sleep and usleep)\r
-3. if we don't need the timeval stuff let's get rid of it... it doesn't appear to be used.\r
+1. MOD_WOOMERACHAN: #if 1==0 sectiton, convert to use switch_now instead of gettimeof day \r
+2. switch_version.h.  Change both msvc and unix scripts to create this to look for a VERSION file to generate this for tarball releases.
\ No newline at end of file
index 99572729aa0239f2d1768886000cf3e335843816..e33787e9a1196d668a26db05e5a697b4a33ffa58 100644 (file)
 extern "C" {
 #endif
 
+//Need to include this before any other includes (MSVC Bug)
+#include <switch_platform.h>
+
 #ifndef WIN32
 #include <config.h>
 #endif
 
-//Need to include this before any other includes (MSVC Bug)
-#include <switch_platform.h>
-
 #include <assert.h>
 
 #include <switch_version.h>
index bc7b85af9b778a88736ca673ff074570496cfbef..6cafab3a59807eb603e8f7c17d2e76dd09156368 100644 (file)
@@ -51,17 +51,6 @@ extern "C" {
 #define vsnprintf apr_vsnprintf
 #endif
 
-#ifdef HAVE_TIMEVAL_STRUCT
-extern struct timeval tv;
-#ifdef WIN32
-typedef long switch_timeval_t;
-typedef long switch_suseconds_t;
-#else
-typedef typeof(tv.tv_sec) switch_timeval_t;
-typedef typeof(tv.tv_usec) switch_suseconds_t;
-#endif
-#endif
-
 /*!
   \brief Duplicate a string 
 */
@@ -151,59 +140,8 @@ SWITCH_DECLARE(int) switch_socket_waitfor(switch_pollfd_t *poll, int ms);
 SWITCH_DECLARE(char *) switch_cut_path(char *in);
 
 
-
-/* stuff below will probably be tossed soon */
-       
-#if !defined(switch_strdupa) && defined(__GNUC__)
-# define switch_strdupa(s)                                                                     \
-  (__extension__                                                                               \
-    ({                                                                                                 \
-      __const char *__old = (s);                                               \
-      size_t __len = strlen (__old) + 1;                               \
-      char *__new = (char *) __builtin_alloca (__len); \
-      (char *) memcpy (__new, __old, __len);                   \
-    }))
-#endif
-
-
-#ifdef HAVE_TIMEVAL_STRUCT
-struct timeval switch_tvadd(struct timeval a, struct timeval b);
-struct timeval switch_tvsub(struct timeval a, struct timeval b);
-
-
-/*static struct timeval switch_tvnow(void)
-{
-       struct timeval t;
-       gettimeofday(&t, NULL);
-       return t;
-}
-*/
-
-static struct timeval switch_tv(switch_timeval_t sec, switch_suseconds_t usec)
-{
-       struct timeval t;
-    t.tv_sec = sec;
-    t.tv_usec = usec;
-    return t;
-
-}
-
-static int switch_tvdiff_ms(struct timeval end, struct timeval start)
-{
-       /* the offset by 1,000,000 below is intentional...
-          it avoids differences in the way that division
-          is handled for positive and negative numbers, by ensuring
-          that the divisor is always positive
-       */
-       return  ((end.tv_sec - start.tv_sec) * 1000) +
-               (((1000000 + end.tv_usec - start.tv_usec) / 1000) - 1000);
-}
-
-#endif
-
 #ifdef __cplusplus
 }
-
 #endif
 
 #endif