summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorR. Bernstein <rocky@gnu.org>2012-04-21 23:42:53 -0400
committerR. Bernstein <rocky@gnu.org>2012-04-21 23:42:53 -0400
commitc7c422221ed6d1460701cb398ea9fdd99ca5e39b (patch)
treec8d2c95cf7fce4f1c9fb32a7e91476b08e3147f7
parenta7bca58f7f64d4005804eaa645682972487202c0 (diff)
OSX fixes: test for stdbool.h, allow darwin10-12 and set DARWINT_10_OR_GREATER. Use generic CD-Text routines.
-rw-r--r--configure.ac14
-rw-r--r--lib/driver/osx.c8
2 files changed, 10 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index 1c385529..580d2d3b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -168,7 +168,7 @@ AC_DEFINE(LIBCDIO_CONFIG_H, 1,
dnl headers
AC_HEADER_STDC
-AC_CHECK_HEADERS(errno.h fcntl.h glob.h limits.h pwd.h)
+AC_CHECK_HEADERS(errno.h fcntl.h glob.h limits.h pwd.h stdbool.h)
AC_CHECK_HEADERS(stdarg.h stdbool.h stdio.h sys/cdio.h sys/param.h \
sys/time.h sys/timeb.h sys/utsname.h)
@@ -324,7 +324,7 @@ case $host_os in
## AC_DEFINE([HAVE_AIX_CDROM], [1],
## [Define 1 if you have AIX CD-ROM support])
;;
- darwin6*|darwin7*|darwin8*|darwin9*|darwin10*)
+ darwin[6-9]|darwin1[0-2])
AC_CHECK_HEADERS(IOKit/IOKitLib.h CoreFoundation/CFBase.h,
[have_iokit_h="yes"])
if test "x$have_iokit_h" = "xyes" ; then
@@ -346,15 +346,11 @@ case $host_os in
fi
case $host_os in
- darwin10*)
- darwin_10=1
- ;;
- *)
- darwin_10=0
+ darwin1[0-2])
+ AC_DEFINE([DARWIN_10_OR_GREATER], 1,
+ [Define 1 if you have Darwin OS X 10 or greater])
;;
esac
- AC_DEFINE([DARWIN_10_OR_GREATER], [$darwin_10],
- [Define 1 if you have Darwin OS X 10 or greater])
AC_SUBST(DARWIN_PKG_LIB_HACK)
LIBCDIO_LIBS="$LIBCDIO_LIBS $DARWIN_PKG_LIB_HACK"
cd_drivers="${cd_drivers}, Darwin"
diff --git a/lib/driver/osx.c b/lib/driver/osx.c
index 507e64a2..3c1b35b2 100644
--- a/lib/driver/osx.c
+++ b/lib/driver/osx.c
@@ -32,7 +32,9 @@
# include "config.h"
#endif
-static const char _rcsid[] = "$Id: osx.c,v 1.14 2008/10/17 11:58:52 rocky Exp $";
+#ifdef HAVE_STDBOOL_H
+# include <stdbool.h>
+#endif
#include <cdio/logging.h>
#include <cdio/sector.h>
@@ -1898,8 +1900,8 @@ cdio_open_osx (const char *psz_orig_source)
.eject_media = _eject_media_osx,
.free = _free_osx,
.get_arg = _get_arg_osx,
- .get_cdtext = NULL,
- .get_cdtext_raw = NULL,
+ .get_cdtext = get_cdtext_generic,
+ .get_cdtext_raw = read_cdtext_generic,
.get_default_device = cdio_get_default_device_osx,
.get_devices = cdio_get_devices_osx,
.get_disc_last_lsn = get_disc_last_lsn_osx,