Ok, that didn't work (it would have been too easy!  ;-) ).  It fails in a
different place, and the TCP6 issue is still present.  Here's what I did:

Removed include of sys/file.h

 gcc -DHAVE_CONFIG_H -I. -I. -I../../../../src/include -I/usr/local/include
-I../include -fexceptions -Wall -W -Wundef -Wshadow -Wpointer-arith
-Wcast-qual -Wcast-align -Wstrict-prototypes -Wredundant-decls
-D_FILE_OFFSET_BITS=64 -D__EXTENSIONS__ -g -O2 -D_THREAD_SAFE -pthread
-D_XOPEN_SOURCE=500 -MT ow_ds9097.lo -MD -MP -MF .deps/ow_ds9097.Tpo -c
ow_ds9097.c  -fPIC -DPIC -o .libs/ow_ds9097.o
ow_ds9097.c: In function `DS9097_send_and_get':
ow_ds9097.c:219: error: syntax error before "readset"
ow_ds9097.c:234: warning: implicit declaration of function `FD_ZERO'
ow_ds9097.c:234: error: `readset' undeclared (first use in this function)
ow_ds9097.c:234: error: (Each undeclared identifier is reported only once
ow_ds9097.c:234: error: for each function it appears in.)
ow_ds9097.c:235: warning: implicit declaration of function `FD_SET'
ow_ds9097.c:238: warning: implicit declaration of function `select'
ow_ds9097.c:242: warning: implicit declaration of function `FD_ISSET'
*** Error code 1

Stop in /usr/home/robert/owfs-2.4p3/module/owlib/src/c.
*** Error code 1

Ok, the linux man file says that's the new POSIX location as opposed to
sys/time,sys/types,unistd
I'll update to include it.

Added in:  #include <sys/select.h>

/bin/sh ../../../../libtool --tag=CC --mode=link gcc -I../include 
-I../../../owlib/src/include  -L../../../owlib/src/c  -fexceptions  -Wall 
-W  -Wundef  -Wshadow  -Wpointer-arith  -Wcast-qual  -Wcast-align 
-Wstrict-prototypes  -Wredundant-decls    -D_FILE_OFFSET_BITS=64 -g -O2
-D_THREAD_SAFE -pthread -D_XOPEN_SOURCE=500   -L/usr/local/lib -o owhttpd 
owhttpd.o owhttpd_handler.o  owhttpd_present.o owhttpd_write.o 
owhttpd_read.o owhttpd_dir.o  owhttpd_favicon.o -low   -Wl,--rpath
-Wl,/opt/owfs/lib -lusb
mkdir .libs
gcc -I../include -I../../../owlib/src/include -fexceptions -Wall -W -Wundef
-Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wstrict-prototypes
-Wredundant-decls -D_FILE_OFFSET_BITS=64 -g -O2 -D_THREAD_SAFE
-D_XOPEN_SOURCE=500 -o .libs/owhttpd owhttpd.o owhttpd_handler.o
owhttpd_present.o owhttpd_write.o owhttpd_read.o owhttpd_dir.o
owhttpd_favicon.o -Wl,--rpath -Wl,/opt/owfs/lib 
-L/usr/home/robert/owfs-2.4p3/module/owlib/src/c -pthread -L/usr/local/lib
/usr/home/robert/owfs-2.4p3/module/owlib/src/c/.libs/libow.so
/usr/local/lib/libusb.so -Wl,--rpath -Wl,/opt/owfs/lib -Wl,--rpath
-Wl,/usr/local/lib
/usr/home/robert/owfs-2.4p3/module/owlib/src/c/.libs/libow.so: undefined
reference to `major'
*** Error code 1

Hmm... this is a problem of BSD vs Linux. I'm trying to figure out, based on the
device name, whether it's i2c, serial or parallel. In linux you ask for the
major number and compare to the normal assignments. What is the BSD scheme?

Stop in /usr/home/robert/owfs-2.4p3/module/owhttpd/src/c.
*** Error code 1

Set __BSD_VISIBLE to 1 and it compiled.

I remarked out the clearing enpoint from the code:

/*                if ( (ret =
                        usb_clear_halt(usb, DS2490_EP3) ||
                        usb_clear_halt(usb, DS2490_EP2) ||
                        usb_clear_halt(usb, DS2490_EP1) ) ) {
                    LEVEL_DEFAULT("DS9490_open: usb_clear_halt failed
ret=%d\n", ret);
                } else */ if ( DS9490_setup_adapter(pn) ||

And now I get this:

bsdtest# ./owhttpd -u -p 3001 -F --error_print 2 --error_level 4
   CALL: PARSENAME path=[]
CONNECT: Adapter found: /dev/usb0//dev/ugen0
DEFAULT: Opened USB DS9490 adapter at /dev/usb0//dev/ugen0.
   DATA: DS9490_getstatus: Status byte[0]: 2
   DATA: DS9490_getstatus(): short detected
   DATA: DS9490_setup_adapter: getstatus failed ret=-1
DEFAULT: Error setting up USB DS9490 adapter at /dev/usb0//dev/ugen0.
   DATA: BUS_first: No data will be returned
   DATA: DS9490_reset
   DATA: BUS_first failed during connect [-1/-1]

Here are the entries from /var/log/messages:

Jul 19 22:09:47 bsdtest kernel: ugen0: vendor 0x04fa product 0x2490, rev
1.00/0.02, addr 2
Jul 19 22:11:55 bsdtest kernel: All threads purged from ugen0.1
Jul 19 22:11:55 bsdtest kernel: All threads purged from ugen0.2
Jul 19 22:11:55 bsdtest kernel: All threads purged from ugen0.3
Jul 19 22:11:55 bsdtest kernel: All threads purged from ugen0.1
Jul 19 22:11:55 bsdtest kernel: All threads purged from ugen0.2
Jul 19 22:11:55 bsdtest kernel: All threads purged from ugen0.3

netstat output:

%netstat -a
Active Internet connections (including servers)
Proto Recv-Q Send-Q  Local Address          Foreign Address        (state)
tcp6       0      0  *.3001                 *.*                    LISTEN
tcp4       0      0  10.0.1.146.ssh         TippyMac.64941        
ESTABLISHED
tcp4       0      0  localhost.smtp         *.*                    LISTEN
tcp4       0      0  *.ssh                  *.*                    LISTEN
tcp6       0      0  *.ssh                  *.*                    LISTEN
udp4       0      0  *.syslog               *.*                   
udp6       0      0  *.syslog               *.*                   
Active UNIX domain sockets

Rob.
-- 
View this message in context:
http://www.nabble.com/FreeBSD-6.1-Troubles...-tf1969732.html#a5408880
Sent from the OWFS - Dev forum at Nabble.com.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to