On Wed, 18 Jan 2006, Marcel Holtmann wrote:

I have set up development tools on OS X because that's my primary machine
now, and made some fixes to openobex so that it compiles and runs there.

please split the USB stuff from the rest and send two separate patches.

Sure, there you go.

By the way, someone should update the netowrk buffer reimplementation patch so that it applies against the latest cvs. Is the patch author still around?

Alexander

Homepage: http://www.sensi.org/~ak/
Index: lib/usbobex.c
===================================================================
RCS file: /cvsroot/openobex/openobex/lib/usbobex.c,v
retrieving revision 1.4
diff -u -r1.4 usbobex.c
--- lib/usbobex.c       3 Jan 2006 18:36:15 -0000       1.4
+++ lib/usbobex.c       14 Jan 2006 13:32:41 -0000
@@ -335,9 +335,8 @@
        self->trans.self.usb.dev_data = usb_open(self->trans.self.usb.device);
 
        ret = usb_set_configuration(self->trans.self.usb.dev_control, 
self->trans.self.usb.configuration);
-       if ((ret < 0) && (ret != -EBUSY)) {
+       if (ret < 0) {
                DEBUG(4, "Can't set configuration %d", ret);
-               goto err1;
        }
 
        ret = usb_claim_interface(self->trans.self.usb.dev_control, 
self->trans.self.usb.control_interface);
Index: acinclude.m4
===================================================================
RCS file: /cvsroot/openobex/openobex/acinclude.m4,v
retrieving revision 1.7
diff -u -r1.7 acinclude.m4
--- acinclude.m4        3 Jan 2006 10:46:36 -0000       1.7
+++ acinclude.m4        14 Jan 2006 13:32:39 -0000
@@ -123,6 +123,12 @@
        AC_CHECK_LIB(usb, usb_get_busses, dummy=yes, 
AC_DEFINE(NEED_USB_GET_BUSSES, 1, [Define to 1 if you need the usb_get_busses() 
function.]))
        AC_CHECK_LIB(usb, usb_interrupt_read, dummy=yes, 
AC_DEFINE(NEED_USB_INTERRUPT_READ, 1, [Define to 1 if you need the 
usb_interrupt_read() function.]))
 
+       case "${host_cpu}-${host_os}" in
+               *-darwin*)
+                       USB_LIBS="$USB_LIBS -framework CoreFoundation 
-framework IOKit"
+               ;;
+       esac
+
        CPPFLAGS=$ac_save_CPPFLAGS
        LDFLAGS=$ac_save_LDFLAGS
 
Index: bootstrap
===================================================================
RCS file: /cvsroot/openobex/openobex/bootstrap,v
retrieving revision 1.1
diff -u -r1.1 bootstrap
--- bootstrap   25 Dec 2005 01:36:22 -0000      1.1
+++ bootstrap   14 Jan 2006 13:32:39 -0000
@@ -2,6 +2,7 @@
 
 aclocal && \
     autoheader && \
-       libtoolize --copy --force && \
+       libtoolize --copy --force || \
+       glibtoolize --copy --force && \
            automake --add-missing --copy && \
                autoconf
Index: apps/obex_test_cable.c
===================================================================
RCS file: /cvsroot/openobex/openobex/apps/obex_test_cable.c,v
retrieving revision 1.20
diff -u -r1.20 obex_test_cable.c
--- apps/obex_test_cable.c      3 Jan 2006 18:36:15 -0000       1.20
+++ apps/obex_test_cable.c      14 Jan 2006 13:32:40 -0000
@@ -224,7 +224,13 @@
 {
        if(force)       {
                // Send a break to get out of OBEX-mode
-               if(ioctl(gt->ttyfd, TCSBRKP, 0) < 0)    {
+#ifdef TCSBRKP
+               if(ioctl(gt->ttyfd, TCSBRKP, 0) < 0) {
+#elif defined(TCSBRK)
+               if(ioctl(gt->ttyfd, TCSBRK, 0) < 0) {
+#else
+               if(tcsendbreak(gt->ttyfd, 0) < 0) {
+#endif /* TCSBRKP */
                        printf("Unable to send break!\n");
                }
        }
Index: ircp/ircp_client.c
===================================================================
RCS file: /cvsroot/openobex/openobex/ircp/ircp_client.c,v
retrieving revision 1.10
diff -u -r1.10 ircp_client.c
--- ircp/ircp_client.c  3 Jan 2006 18:36:15 -0000       1.10
+++ ircp/ircp_client.c  14 Jan 2006 13:32:41 -0000
@@ -4,7 +4,6 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <malloc.h>
 #include <string.h>
 #include <unistd.h>
 #include <fcntl.h>
Index: ircp/ircp_io.c
===================================================================
RCS file: /cvsroot/openobex/openobex/ircp/ircp_io.c,v
retrieving revision 1.13
diff -u -r1.13 ircp_io.c
--- ircp/ircp_io.c      3 Jan 2006 18:36:15 -0000       1.13
+++ ircp/ircp_io.c      14 Jan 2006 13:32:41 -0000
@@ -3,7 +3,7 @@
 #endif
 
 #include <stdio.h>
-#include <malloc.h>
+#include <stdlib.h>
 #include <unistd.h>
 #include <sys/stat.h>
 #include <sys/types.h>
Index: ircp/ircp_server.c
===================================================================
RCS file: /cvsroot/openobex/openobex/ircp/ircp_server.c,v
retrieving revision 1.17
diff -u -r1.17 ircp_server.c
--- ircp/ircp_server.c  3 Jan 2006 18:36:15 -0000       1.17
+++ ircp/ircp_server.c  14 Jan 2006 13:32:41 -0000
@@ -3,7 +3,7 @@
 #endif
 
 #include <stdio.h>
-#include <malloc.h>
+#include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
 

Reply via email to