[Asterisk-cvs] asterisk/include/asterisk channel.h, 1.62, 1.63 frame.h, 1.37, 1.38 lock.h, 1.27, 1.28

markster at lists.digium.com markster at lists.digium.com
Tue Dec 14 18:39:44 CST 2004


Update of /usr/cvsroot/asterisk/include/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv25047/include/asterisk

Modified Files:
	channel.h frame.h lock.h 
Log Message:
Merge slimey's Solaris compatibility (with small mods) (bug #2740)


Index: channel.h
===================================================================
RCS file: /usr/cvsroot/asterisk/include/asterisk/channel.h,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- channel.h	7 Dec 2004 20:38:43 -0000	1.62
+++ channel.h	14 Dec 2004 23:36:30 -0000	1.63
@@ -829,6 +829,19 @@
 	return 0;
 }
 
+#ifdef SOLARIS
+static inline void timersub(struct timeval *tvend, struct timeval *tvstart, struct timeval *tvdiff)
+{
+	tvdiff->tv_sec = tvend->tv_sec - tvstart->tv_sec;
+	tvdiff->tv_usec = tvend->tv_usec - tvstart->tv_usec;
+	if (tvdiff->tv_usec < 0) {
+		tvdiff->tv_sec --;
+		tvdiff->tv_usec += 1000000;
+	}
+
+}
+#endif
+
 //! Waits for activity on a group of channels
 /*! 
  * \param nfds the maximum number of file descriptors in the sets

Index: frame.h
===================================================================
RCS file: /usr/cvsroot/asterisk/include/asterisk/frame.h,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- frame.h	3 Dec 2004 23:46:09 -0000	1.37
+++ frame.h	14 Dec 2004 23:36:30 -0000	1.38
@@ -22,6 +22,10 @@
 
 #include <sys/types.h>
 #include <sys/time.h>
+
+#ifdef SOLARIS
+#include "solaris-compat/compat.h"
+#endif
 	
 /*
  * Autodetect system endianess

Index: lock.h
===================================================================
RCS file: /usr/cvsroot/asterisk/include/asterisk/lock.h,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- lock.h	20 Oct 2004 12:39:22 -0000	1.27
+++ lock.h	14 Dec 2004 23:36:30 -0000	1.28
@@ -48,6 +48,10 @@
 #define AST_MUTEX_KIND			PTHREAD_MUTEX_RECURSIVE
 #endif /* PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP */
 
+#ifdef SOLARIS
+#define AST_MUTEX_INIT_W_CONSTRUCTORS
+#endif
+
 #ifdef DEBUG_THREADS
 
 #ifdef THREAD_CRASH




More information about the svn-commits mailing list