That was a big help and the make went much further, however the next error is in ow_ds9490.c

I found where 'tm' was defined on time.h http://homepage.mac.com/rnc/ time.h And a reference to timezone in systime.h http://homepage.mac.com/rnc/ systime.h

Online man pages for Darwin can be found here: http:// developer.apple.com/documentation/Darwin/Reference/ManPages/ index.html#//apple_ref/doc/framework/manpages


ow_ds9490.c: In function 'DS9490_next_both':
ow_ds9490.c:919: error: storage size of 'tz' isn't known
ow_ds9490.c:945: warning: comparison between signed and unsigned
ow_ds9490.c:920: warning: unused variable 'now'
ow_ds9490.c:920: warning: unused variable 'endtime'
ow_ds9490.c:919: warning: unused variable 'tz'
ow_ds9490.c:918: warning: unused variable 'tv'
ow_ds9490.c: In function 'DS9490_HaltPulse':
ow_ds9490.c:1147: error: storage size of 'tz' isn't known
ow_ds9490.c:1147: warning: unused variable 'tz'
make[4]: *** [ow_ds9490.lo] Error 1



On Sep 30, 2005, at 3:05 AM, Christian Magnusson wrote:


It's a start at least to make owhttpd compile for your Mac OS X server.

B115200 is defined in
/usr/include/bits/termios.h which is included
from /usr/include/termios.h on most linux distributions.

I found one Mac OS X desktop at our office without any development kit,
but the man-pages were available. "man cfsetispeed" said the highest
supported baudrate in termios.h was 38400.

I have patched the code so it doesn't set higher speed if it's
not defined in termios.h

Check out the latest cvs again and please try it. Or apply the
patches manually below.

/Christian




rnc$ make
Making all in src
.... jump to end ....
ow_ds9097.c: In function 'DS9097_reset':
ow_ds9097.c:312: error: 'B115200' undeclared (first use in this
function)
ow_ds9097.c:395: warning: passing argument 2 of 'UT_setbit' as signed
due to prototype
make[4]: *** [ow_ds9097.lo] Error 1




Here are the minor changes I applied.

diff -ruw cvs/owfs/module/owlib/src/c/ow_ds9097.c
owfs/module/owlib/src/c/ow_ds9097.c
--- cvs/owfs/module/owlib/src/c/ow_ds9097.c     2005-09-28
11:08:47.000000000 +0200
+++ owfs/module/owlib/src/c/ow_ds9097.c 2005-09-30 09:50:03.000000000
+0200
@@ -309,8 +309,14 @@
     /* 6 data bits, Receiver enabled, Hangup, Dont change "owner" */
     term.c_cflag = CS6 | CREAD | HUPCL | CLOCAL;

+#ifndef B115200
+    /* MacOSX support max 38400 in termios.h ? */
+ cfsetispeed(&term, B38400); /* Set input speed to 38.4k */ + cfsetospeed(&term, B38400); /* Set output speed to 38.4k */
+#else
     cfsetispeed(&term, B115200);       /* Set input speed to 115.2k
*/
     cfsetospeed(&term, B115200);       /* Set output speed to 115.2k
*/
+#endif

     if(tcsetattr(fd, TCSANOW, &term) < 0 ) {
         STAT_ADD1(DS9097_reset_tcsetattr_errors);
diff -ruw cvs/owfs/module/owlib/src/c/ow_ds9097U.c
owfs/module/owlib/src/c/ow_ds9097U.c
--- cvs/owfs/module/owlib/src/c/ow_ds9097U.c    2005-09-28
11:08:47.000000000 +0200
+++ owfs/module/owlib/src/c/ow_ds9097U.c        2005-09-30
10:00:24.000000000 +0200
@@ -297,8 +297,14 @@
     switch ( baud ) {
     case B9600:    return PARMSET_9600    ;
     case B19200:   return PARMSET_19200   ;
+#ifdef B57600
+      /* MacOSX support max 38400 in termios.h ? */
     case B57600:   return PARMSET_57600   ;
+#endif
+#ifdef B115200
+      /* MacOSX support max 38400 in termios.h ? */
     case B115200:  return PARMSET_115200  ;
+#endif
     }
     return PARMSET_9600 ;
 }





-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers




-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to