List:Commits« Previous MessageNext Message »
From:konstantin Date:January 31 2008 10:52pm
Subject:bk commit into 6.0 tree (kostja:1.2793)
View as plain text  
Below is the list of changes that have just been committed into a local
6.0 repository of kostja.  When kostja does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2008-02-01 00:52:34+03:00, kostja@dipika.(none) +1 -0
  Ensure that libevent builds on Solaris out of the box.

  config/ac-macros/libevent.m4@stripped, 2008-02-01 00:52:31+03:00, kostja@dipika.(none) +71 -0
    Ensure that libevent builds on Solaris out of the box.

diff -Nrup a/config/ac-macros/libevent.m4 b/config/ac-macros/libevent.m4
--- a/config/ac-macros/libevent.m4	2007-11-22 04:11:30 +03:00
+++ b/config/ac-macros/libevent.m4	2008-02-01 00:52:31 +03:00
@@ -277,6 +277,77 @@ AC_TRY_COMPILE([
 	[Define to unsigned int if you dont have it])]
 )
 
+AH_VERBATIM([HAVE_TIMERADD], [
+/* Define if timeradd is defined in <sys/time.h> */
+#undef HAVE_TIMERADD
+#ifndef HAVE_TIMERADD
+#undef timersub
+#define timeradd(tvp, uvp, vvp)						\
+	do {								\
+		(vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec;		\
+		(vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec;       \
+		if ((vvp)->tv_usec >= 1000000) {			\
+			(vvp)->tv_sec++;				\
+			(vvp)->tv_usec -= 1000000;			\
+		}							\
+	} while (0)
+#define	timersub(tvp, uvp, vvp)						\
+	do {								\
+		(vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec;		\
+		(vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec;	\
+		if ((vvp)->tv_usec < 0) {				\
+			(vvp)->tv_sec--;				\
+			(vvp)->tv_usec += 1000000;			\
+		}							\
+	} while (0)
+#endif /* !HAVE_TIMERADD */
+])
+
+AH_VERBATIM([HAVE_TIMERCLEAR], [
+#undef HAVE_TIMERCLEAR
+#ifndef HAVE_TIMERCLEAR
+#define	timerclear(tvp)	(tvp)->tv_sec = (tvp)->tv_usec = 0
+#endif
+])
+
+AH_VERBATIM([HAVE_TIMERCMP], [
+#undef HAVE_TIMERCMP
+#ifndef HAVE_TIMERCMP
+#undef timercmp
+#define	timercmp(tvp, uvp, cmp)						\
+	(((tvp)->tv_sec == (uvp)->tv_sec) ?				\
+	 ((tvp)->tv_usec cmp (uvp)->tv_usec) :				\
+	 ((tvp)->tv_sec cmp (uvp)->tv_sec))
+#endif
+])
+
+AH_VERBATIM([HAVE_TIMERISSET], [
+#undef HAVE_TIMERISSET
+#ifndef HAVE_TIMERISSET
+#undef timerisset
+#define	timerisset(tvp)	((tvp)->tv_sec || (tvp)->tv_usec)
+#endif
+])
+
+AH_VERBATIM([HAVE_TAILQFOREACH], [
+/* Define if TAILQ_FOREACH is defined in <sys/queue.h> */
+#undef HAVE_TAILQFOREACH
+#ifndef HAVE_TAILQFOREACH
+#define	TAILQ_FIRST(head)		((head)->tqh_first)
+#define	TAILQ_END(head)			NULL
+#define	TAILQ_NEXT(elm, field)		((elm)->field.tqe_next)
+#define TAILQ_FOREACH(var, head, field)					\
+	for((var) = TAILQ_FIRST(head);					\
+	    (var) != TAILQ_END(head);					\
+	    (var) = TAILQ_NEXT(var, field))
+#define	TAILQ_INSERT_BEFORE(listelm, elm, field) do {			\
+	(elm)->field.tqe_prev = (listelm)->field.tqe_prev;		\
+	(elm)->field.tqe_next = (listelm);				\
+	*(listelm)->field.tqe_prev = (elm);				\
+	(listelm)->field.tqe_prev = &(elm)->field.tqe_next;		\
+} while (0)
+#endif /* TAILQ_FOREACH */
+])
 ])
 
 
Thread
bk commit into 6.0 tree (kostja:1.2793)konstantin31 Jan