cdindex under solaris

Winston Chang (wchang3 nospam at students.wisc.edu)
Tue, 29 Jun 1999 13:22:26 -0500

I had to make a few modifications to make cdindex compile under Solaris:

First, here's the result of uname:
SunOS massa 5.6 Generic sun4u sparc SUNW,Ultra-2

I had to add this to the top of cdi_solaris.cpp:

#include <sys/byteorder.h>

It was necessary because <sys/types.h> does NOT define ntohl(), although
that is what is in cdi_solaris.cpp:

#include <sys/types.h> // ntohl()

I had to add this to cdi_solaris.h:

#include <sys/types.h>

somewhere before this line:

#include <sys/cdio.h>

so that caddr_t is defined before <sys/cdio.h> is included.

caddr_t is defined in <sys/types.h>, but that file isn't automatically
included in <sys/cdio.h>, even though cdio.h makes use of caddr_t.
Solaris can be pretty dumb.

--------------------------------------------------

That's what I had to do to make it compile. Now, to make it work,
that's a different matter. It runs, but it seems to be messing up on
either the hashing or the grabbing of the data to hash. Basically, all
my queries result in a CD not found error.

For example, here's the result of an attempt with U2's Achtung Baby:

[massa: cdindex-1.1.0]$ ./cdindex -g -Ld /vol/dev/aliases/cdrom0
cdindex version 1.1.0 (Solaris)

Opening lynx -dump to:
'http://www.cdindex.org/cgi-bin/cdi/hget.pl?id=Ya4FaFDnbkWD.XOCRKQH4KTvBL8-&tracks=12&toc=1+12+998498+278+83118+149558+232398+315950+410938+515698+596418+669490+739278+838430+919510'
(Please open it by hand if the browser doesn't start automatically)

<clipped useless info>

That CD was not found. You can [10]Submit this CD to CDindex for next
time.

Any ideas?

--Winston Chang