[svn-commits] tzafrir: tools/trunk r9426 - in /tools/trunk: ./ xpp/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sun Oct 17 13:41:31 CDT 2010


Author: tzafrir
Date: Sun Oct 17 13:41:24 2010
New Revision: 9426

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9426
Log:
astribank_is_starting: use semop if no semtimedop

astribank_is_starting should use a timeout for the semaphore, but if the
GNU-specific semtimedop() is not available, we'll just fall back to using
semop with no time out. Not as good, but better than nothing.

(closes issue #16783)
Reported by: abelbeck

Modified:
    tools/trunk/autoconfig.h.in
    tools/trunk/configure
    tools/trunk/configure.ac
    tools/trunk/xpp/astribank_is_starting.c

Modified: tools/trunk/autoconfig.h.in
URL: http://svnview.digium.com/svn/dahdi/tools/trunk/autoconfig.h.in?view=diff&rev=9426&r1=9425&r2=9426
==============================================================================
--- tools/trunk/autoconfig.h.in (original)
+++ tools/trunk/autoconfig.h.in Sun Oct 17 13:41:24 2010
@@ -2,6 +2,12 @@
 
 /* Define if your system has the DAHDI headers. */
 #undef HAVE_DAHDI
+
+/* Define if your system has the DAHDI23 headers. */
+#undef HAVE_DAHDI23
+
+/* Define DAHDI23 headers version */
+#undef HAVE_DAHDI23_VERSION
 
 /* Define DAHDI headers version */
 #undef HAVE_DAHDI_VERSION
@@ -20,6 +26,9 @@
 
 /* Define to indicate the ${NEWT_DESCRIP} library version */
 #undef HAVE_NEWT_VERSION
+
+/* Define to 1 if you have the `semtimedop' function. */
+#undef HAVE_SEMTIMEDOP
 
 /* Define to 1 if you have the <stdint.h> header file. */
 #undef HAVE_STDINT_H
@@ -63,6 +72,9 @@
 /* Define to the one symbol short name of this package. */
 #undef PACKAGE_TARNAME
 
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION
 

Modified: tools/trunk/configure.ac
URL: http://svnview.digium.com/svn/dahdi/tools/trunk/configure.ac?view=diff&rev=9426&r1=9425&r2=9426
==============================================================================
--- tools/trunk/configure.ac (original)
+++ tools/trunk/configure.ac Sun Oct 17 13:41:24 2010
@@ -98,6 +98,8 @@
 AST_C_DEFINE_CHECK([DAHDI23], [DAHDI_CONFIG_NTTE], [dahdi/user.h])
 AST_EXT_LIB_CHECK([NEWT], [newt], [newtBell], [newt.h])
 AST_EXT_LIB_CHECK([USB], [usb], [usb_init], [usb.h])
+
+AC_CHECK_FUNCS([semtimedop])
 
 PBX_HDLC=0
 AC_MSG_CHECKING([for GENERIC_HDLC_VERSION version 4 in linux/hdlc.h])

Modified: tools/trunk/xpp/astribank_is_starting.c
URL: http://svnview.digium.com/svn/dahdi/tools/trunk/xpp/astribank_is_starting.c?view=diff&rev=9426&r1=9425&r2=9426
==============================================================================
--- tools/trunk/xpp/astribank_is_starting.c (original)
+++ tools/trunk/xpp/astribank_is_starting.c Sun Oct 17 13:41:24 2010
@@ -15,6 +15,10 @@
 static int		verbose;
 static int		timeout_seconds = 60;
 
+/* If libc provides no timeout variant: try to do without it: */
+#ifndef HAVE_SEMTIMEDEOP
+#define  semtimedop(sem, ops, n, timeout)    semop(sem, ops, n)
+#endif
 
 static void usage(void)
 {




More information about the svn-commits mailing list