[paranoia] CD Paranoia for MacOS X

Peter Jones pjones at redhat.com
Mon Dec 8 09:39:25 PST 2003



On Sun, 7 Dec 2003, Scott Wood wrote:

> I have ported CD Paranoia to MacOS X (10.2 or newer).
> You can get it at: http://www.buserror.net/cdparanoia/
> 
> Make sure you unmount the CD first using disktool (as
> described in the README).
> 
> Let me know if anyone has any comments, problems, etc.

Hey, some comments.

1) Is it really worth doing ENDIAN_H in configure.in instead of just
"#ifdef __APPLE__"'ing it in the two places it gets used?  Same question
applies for GETOPT_H -- it's used at 1 place in actual C code.  Would
"#ifndef __APPLE__" around that include not be just as reasonable?  It
would certianly look more like the normal way people do that in C code.  
Maybe I just hate autoconf though :)

2)

+ifeq (@host_os@,linux)
+SHLIB := so.0.$(VERSION)
+COMPATLIB := so.0
+LINKLIB := so
+else
+ifeq (@host_os@,darwin)
+SHLIB := 0.$(VERSION).dylib
+COMPATLIB := 0.dylib
+LINKLIB := dylib
+else
+How do I make shared libraries?
+endif
+endif

This looks like it'd be safe to default to the Linux way; most UNIXes
follow a similar convention, don't they?

Along the same lines, you seem to _add_ a lot of "it's either MacOS or
Linux" assumptions.  AFAIK (and I could be wrong) current cdparanoia also
works on e.g. FreeBSD.  I don't know how much cdparanoia in ports is
patched, but I find it likely that, for example, FixupTOC here:

+#ifdef __linux__
   if (d->ioctl_fd != -1) {
+    struct cdrom_multisession ms_str;
     int result;
                                                                                
     ms_str.addr_format = CDROM_LBA;
     result = ioctl(d->ioctl_fd, CDROMMULTISESSION, &ms_str);
     if (result == -1) return -1;
                                                                                
     if (ms_str.addr.lba > 100) {

works without your modification on a FreeBSD box, but doesn't work
afterwards.  Do we know which platforms a change like that is affecting?  
If we don't, "#ifndef __APPLE__" seems far more appropriate than "#ifdef
__linux__".

All that being said, most of the changes look pretty reasonable.  One
relatively serious issue I have is that you've changed cdda_interface.h's
struct cdrom_drive.

Obviously, you've almost certainly got to do this, but the downside is
that it changes the ABI, and so getting a new version into linux distros
means rebuilding ripping software such as grip which links against
libcdda_interface, and means that the changes can't go into any commercial
distros that try to guarantee ABI compatibility where possible across
minor releases.  I think I'm probably the only person on the list who
actually cares about that, though, so I guess I'll get off my soapbox now.

One last note.  You appear to have taken a really, really old snapshot.  
I find this fairly telling when I diff against cvs:

--- paranoia-III/interface/common_interface.c   2003-12-08 11:24:03.000000000 -0500
+++ paranoia-III-OSX/interface/common_interface.c       2003-11-23 15:55:03.000000000 -0500
@@ -1,238 +1,243 @@
 /******************************************************************
  * CopyPolicy: GNU Public License 2 applies
- * Copyright (C) 1998, 2002 Monty monty at xiph.org
+ * Copyright (C) 1998 Monty xiphmont at mit.edu

Not that a lot has changed since then, but it's something to be aware of.


--
        Peter

RFC 882 put the dots in .com.
--- >8 ----
List archives:  http://www.xiph.org/archives/
Paranoia homepage: http://www.xiph.org/paranoia/
To unsubscribe from this list, send a message to 'paranoia-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.




More information about the Paranoia mailing list