I am right now testing
Device::CDROM on a NetBSD machine. The tests that worked so splendidly on my Linux box kept
The source of the problem is the fact that BSDs use big-endian format for LBA-addressing on CDs (unlike Linux which uses host-byteorder). That means that I have defined some macros that do the necessary byte-swapping. In code this looks like this:
char min, sec, frame;
lba = self->ADDRaddr.lba;
lba_to_msf(lba, &min, &sec, &frame);
RETVAL = min;
I couldn't the hell figure out why it didn't work on BSD until I spotted a subtle but disastrous typo: It is supposed to be
__BSDISH__ and not
_BSDISH__. So in this particular XSUB the byte-swapping never happened.
I really wish there were strictures for the C preprocessor directives!