|
From: <mla...@us...> - 2008-01-02 03:48:29
|
Revision: 390
http://g15daemon.svn.sourceforge.net/g15daemon/?rev=390&view=rev
Author: mlampard
Date: 2008-01-01 19:48:34 -0800 (Tue, 01 Jan 2008)
Log Message:
-----------
make define more specific as other libusb implementations may also block.
Modified Paths:
--------------
trunk/g15daemon-wip/configure.in
trunk/g15daemon-wip/g15daemon/utility_funcs.c
Modified: trunk/g15daemon-wip/configure.in
===================================================================
--- trunk/g15daemon-wip/configure.in 2008-01-02 03:18:26 UTC (rev 389)
+++ trunk/g15daemon-wip/configure.in 2008-01-02 03:48:34 UTC (rev 390)
@@ -76,7 +76,6 @@
uinput=false
fi
-
case $host_os in
*linux*)
AC_DEFINE([OSTYPE_LINUX], [1],[Target OS is Linux])
@@ -97,6 +96,7 @@
AC_SEARCH_LIBS([nanosleep],rt,[],[],[])
AC_MSG_NOTICE([OS is Solaris, using OS specific workarounds])
uinput=false
+ libusb_blocks=true
;;
*)
AC_DEFINE([OSTYPE_OTHER], [1],[Target OS is unknown])
@@ -104,9 +104,15 @@
uinput=false
;;
esac
+
AM_CONDITIONAL([KEXT_INSTALL], [test x$install_kext = xtrue])
AM_CONDITIONAL(UINPUT_INTERFACE_PLUGIN, [test x$uinput = xtrue])
+dnl Some versions of libusb do not honour timeout and block. Suns' version is one of them.
+if test "x$libusb_blocks" == "xtrue"; then
+ AC_DEFINE([LIBUSB_BLOCKS], [1],[Define if libusb implementation blocks on read or write])
+fi
+
G15D_BUILD_CC="`$CC -v 2>&1 | tail -n 1`"
G15D_BUILD_OS="`uname -s -r -m`"
G15D_BUILD_DATE="`date \"+%a %d %b %Y %T\"`"
Modified: trunk/g15daemon-wip/g15daemon/utility_funcs.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/utility_funcs.c 2008-01-02 03:18:26 UTC (rev 389)
+++ trunk/g15daemon-wip/g15daemon/utility_funcs.c 2008-01-02 03:48:34 UTC (rev 390)
@@ -186,7 +186,7 @@
int uf_write_buf_to_g15(lcd_t *lcd)
{
int retval = 0;
-#ifdef OSTYPE_SOLARIS
+#ifdef LIBUSB_BLOCKS
retval = writePixmapToLCD(lcd->buf);
#else
pthread_mutex_lock(&g15lib_mutex);
@@ -199,7 +199,7 @@
int uf_read_keypresses(unsigned int *keypresses, unsigned int timeout)
{
int retval=0;
-#ifdef OSTYPE_SOLARIS
+#ifdef LIBUSB_BLOCKS
retval = getPressedKeys(keypresses, timeout);
#else
pthread_mutex_lock(&g15lib_mutex);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|