summaryrefslogtreecommitdiff
path: root/audio/cdparanoia
diff options
context:
space:
mode:
Diffstat (limited to 'audio/cdparanoia')
-rw-r--r--audio/cdparanoia/Makefile7
-rw-r--r--audio/cdparanoia/PLIST12
-rw-r--r--audio/cdparanoia/distinfo20
-rw-r--r--audio/cdparanoia/patches/patch-ab41
-rw-r--r--audio/cdparanoia/patches/patch-ac639
-rw-r--r--audio/cdparanoia/patches/patch-ad22
-rw-r--r--audio/cdparanoia/patches/patch-ae26
-rw-r--r--audio/cdparanoia/patches/patch-cb8
-rw-r--r--audio/cdparanoia/patches/patch-cf86
-rw-r--r--audio/cdparanoia/patches/patch-cg141
10 files changed, 401 insertions, 601 deletions
diff --git a/audio/cdparanoia/Makefile b/audio/cdparanoia/Makefile
index 73c1e118d2d..cf757e86d2a 100644
--- a/audio/cdparanoia/Makefile
+++ b/audio/cdparanoia/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.5 2001/12/03 17:57:44 wiz Exp $
+# $NetBSD: Makefile,v 1.6 2002/03/04 14:45:12 itohy Exp $
-DISTNAME= cdparanoia-III-alpha9.7
-PKGNAME= cdparanoia-3.0.9.7
+DISTNAME= cdparanoia-III-alpha9.8
+PKGNAME= cdparanoia-3.0.9.8
CATEGORIES= audio
MASTER_SITES= http://www.xiph.org/paranoia/download/
EXTRACT_SUFX= .src.tgz
@@ -11,6 +11,7 @@ HOMEPAGE= http://www.xiph.org/paranoia/
COMMENT= CDDA reading utility with extra data verification features
GNU_CONFIGURE= YES
+CONFIGURE_ARGS+= --includedir=${PREFIX}/include/cdparanoia
USE_GMAKE= YES
USE_LIBTOOL= YES
MAKE_ENV+= GCC=yes
diff --git a/audio/cdparanoia/PLIST b/audio/cdparanoia/PLIST
index 777d2ceeb85..d8fde6531f5 100644
--- a/audio/cdparanoia/PLIST
+++ b/audio/cdparanoia/PLIST
@@ -1,15 +1,17 @@
-@comment $NetBSD: PLIST,v 1.1 2001/11/01 00:15:27 zuntum Exp $
+@comment $NetBSD: PLIST,v 1.2 2002/03/04 14:45:12 itohy Exp $
bin/cdparanoia
-include/cdda_interface.h
-include/cdda_paranoia.h
+include/cdparanoia/cdda_interface.h
+include/cdparanoia/cdda_paranoia.h
+include/cdparanoia/utils.h
lib/libcdda_interface.a
lib/libcdda_interface.la
lib/libcdda_interface.so
lib/libcdda_interface.so.0
-lib/libcdda_interface.so.0.97
+lib/libcdda_interface.so.0.98
lib/libcdda_paranoia.a
lib/libcdda_paranoia.la
lib/libcdda_paranoia.so
lib/libcdda_paranoia.so.0
-lib/libcdda_paranoia.so.0.97
+lib/libcdda_paranoia.so.0.98
man/man1/cdparanoia.1
+@dirrm include/cdparanoia
diff --git a/audio/cdparanoia/distinfo b/audio/cdparanoia/distinfo
index ab086ffeac8..fb25f41fc2b 100644
--- a/audio/cdparanoia/distinfo
+++ b/audio/cdparanoia/distinfo
@@ -1,17 +1,17 @@
-$NetBSD: distinfo,v 1.4 2001/06/25 12:17:54 simonb Exp $
+$NetBSD: distinfo,v 1.5 2002/03/04 14:45:12 itohy Exp $
-SHA1 (cdparanoia-III-alpha9.7.src.tgz) = 7c379d3628878fd79ebc1d567408a4d31a7f2e39
-Size (cdparanoia-III-alpha9.7.src.tgz) = 109670 bytes
+SHA1 (cdparanoia-III-alpha9.8.src.tgz) = 04cc33a7d22d6255f6239e3e74195506b3bdde06
+Size (cdparanoia-III-alpha9.8.src.tgz) = 116591 bytes
SHA1 (patch-aa) = 31b37e9fb7be1cb16249bcd6a8561ab64c2fbf39
-SHA1 (patch-ab) = 2e8d86161008414093fa3b3a09de85718aa60740
-SHA1 (patch-ac) = 55aa40ebe0cb11c3a814ff44d554fc5fa9c37761
-SHA1 (patch-ad) = 7d8084320e736e5d012e8a8f2e13653a41f03f6d
-SHA1 (patch-ae) = b105910e67a0210e10cde0a1820ae3cb81088e49
+SHA1 (patch-ab) = 8753d808ef7afe077dde8a47053e04640d6c3e4d
+SHA1 (patch-ac) = bc058645ddd710b4b6315065195c85cb16398034
+SHA1 (patch-ad) = 45cb1d2d402f5769447507c8da24e289396021e7
+SHA1 (patch-ae) = ea4cbc4a13f36ba4da39bd9a944d4123f132b86e
SHA1 (patch-ba) = 05f8efe4f0a2753217d3c1cf1014da64b1d92b73
SHA1 (patch-ca) = 4d7c183aae36fd525a1294be4b6f9a76401c524e
-SHA1 (patch-cb) = aed42b4763b4a19187bbeb0714b8480f331bc5d4
+SHA1 (patch-cb) = 9a28bd78dc5df011717da9bb3006f84635c29edb
SHA1 (patch-cc) = 4132884598e845aa9ea0a501dd1635f9030cc104
SHA1 (patch-cd) = 44b8050dddae449b4e16c5aab9cfcaccb62f9031
SHA1 (patch-ce) = 83d0f1505bc019b6fb83584ad4f6571fccf3e2a2
-SHA1 (patch-cf) = 25ac909f9ab8095b925094d6c0ea7ad21c088a1e
-SHA1 (patch-cg) = 96c4d1e9032abfe35cc63cfc74a24674e71f15d9
+SHA1 (patch-cf) = ca8b2f4d13104ca387fa6205153a41cea405b9f8
+SHA1 (patch-cg) = a113dde9b6b6e1e73dd2a8cbff21318f44085529
diff --git a/audio/cdparanoia/patches/patch-ab b/audio/cdparanoia/patches/patch-ab
index 58be174fbd6..206a1b2b507 100644
--- a/audio/cdparanoia/patches/patch-ab
+++ b/audio/cdparanoia/patches/patch-ab
@@ -1,13 +1,13 @@
-$NetBSD: patch-ab,v 1.3 2001/06/25 12:17:55 simonb Exp $
+$NetBSD: patch-ab,v 1.4 2002/03/04 14:45:13 itohy Exp $
---- Makefile.in.orig Mon Jun 25 21:05:39 2001
-+++ Makefile.in Mon Jun 25 21:15:43 2001
+--- Makefile.in.orig Wed Mar 28 07:46:58 2001
++++ Makefile.in Sun Mar 3 23:08:01 2002
@@ -3,12 +3,12 @@
# DO NOT EDIT BELOW! ##########################################################
# (unless, of course, you know what you are doing :) ##########################
--VERSION=9.7
-+VERSION=97
+-VERSION=9.8
++VERSION=98
VPATH=@srcdir@
srcdir=@srcdir@
@@ -61,20 +61,26 @@ $NetBSD: patch-ab,v 1.3 2001/06/25 12:17:55 simonb Exp $
test:
cd interface && $(MAKE) all
-@@ -64,26 +64,15 @@
- cd paranoia && $(MAKE) slib
+@@ -65,31 +65,20 @@
install:
-- $(INSTALL) -p -m 0755 $(srcdir)/cdparanoia $(BINDIR)
-+ $(LIBTOOL) --mode=install $(INSTALL) -p -m 0755 $(srcdir)/cdparanoia $(BINDIR)
- $(INSTALL) -p -m 0644 $(srcdir)/cdparanoia.1 $(MANDIR)/man1
- $(INSTALL) -p -m 0644 $(srcdir)/paranoia/cdda_paranoia.h $(INCLUDEDIR)
-- $(INSTALL) -p -m 0644 $(srcdir)/paranoia/libcdda_paranoia.so.0.$(VERSION) $(LIBDIR)
-- $(INSTALL) -p -m 0644 $(srcdir)/paranoia/libcdda_paranoia.a $(LIBDIR)
-+ $(LIBTOOL) --mode=install $(INSTALL) -p -m 0644 $(srcdir)/paranoia/libcdda_paranoia.la $(LIBDIR)
- $(INSTALL) -p -m 0644 $(srcdir)/interface/cdda_interface.h $(INCLUDEDIR)
-- $(INSTALL) -p -m 0644 $(srcdir)/interface/libcdda_interface.so.0.$(VERSION) $(LIBDIR)
-- $(INSTALL) -p -m 0644 $(srcdir)/interface/libcdda_interface.a $(LIBDIR)
+ $(INSTALL) -d -m 0755 $(BINDIR)
+- $(INSTALL) -m 0755 $(srcdir)/cdparanoia $(BINDIR)
++ $(LIBTOOL) --mode=install $(INSTALL) -m 0755 $(srcdir)/cdparanoia $(BINDIR)
+ $(INSTALL) -d -m 0755 $(MANDIR)
+ $(INSTALL) -d -m 0755 $(MANDIR)/man1
+ $(INSTALL) -m 0644 $(srcdir)/cdparanoia.1 $(MANDIR)/man1
+ $(INSTALL) -d -m 0755 $(INCLUDEDIR)
+ $(INSTALL) -m 0644 $(srcdir)/paranoia/cdda_paranoia.h $(INCLUDEDIR)
+ $(INSTALL) -d -m 0755 $(LIBDIR)
+- $(INSTALL) -m 0644 $(srcdir)/paranoia/libcdda_paranoia.so.0.$(VERSION) $(LIBDIR)
+- $(INSTALL) -m 0644 $(srcdir)/paranoia/libcdda_paranoia.a $(LIBDIR)
++ $(LIBTOOL) --mode=install $(INSTALL) -m 0644 $(srcdir)/paranoia/libcdda_paranoia.la $(LIBDIR)
+ $(INSTALL) -m 0644 $(srcdir)/interface/cdda_interface.h $(INCLUDEDIR)
+- $(INSTALL) -m 0644 $(srcdir)/interface/libcdda_interface.so.0.$(VERSION) $(LIBDIR)
+- $(INSTALL) -m 0644 $(srcdir)/interface/libcdda_interface.a $(LIBDIR)
++ $(LIBTOOL) --mode=install $(INSTALL) -m 0644 $(srcdir)/interface/libcdda_interface.la $(LIBDIR)
+ $(INSTALL) -m 0644 $(srcdir)/utils.h $(INCLUDEDIR)
- ln -fs libcdda_interface.so.0.$(VERSION) \
- $(LIBDIR)/libcdda_interface.so.0
- ln -fs libcdda_interface.so.0.$(VERSION) \
@@ -83,7 +89,6 @@ $NetBSD: patch-ab,v 1.3 2001/06/25 12:17:55 simonb Exp $
- $(LIBDIR)/libcdda_paranoia.so.0
- ln -fs libcdda_paranoia.so.0.$(VERSION) \
- $(LIBDIR)/libcdda_paranoia.so
-+ $(LIBTOOL) --mode=install $(INSTALL) -p -m 0644 $(srcdir)/interface/libcdda_interface.la $(LIBDIR)
cdparanoia: $(OFILES) $(LIBDEP)
- $(LD) $(CFLAGS) $(LDFLAGS) $(OFILES) \
diff --git a/audio/cdparanoia/patches/patch-ac b/audio/cdparanoia/patches/patch-ac
index af8572f9a33..30a545867cc 100644
--- a/audio/cdparanoia/patches/patch-ac
+++ b/audio/cdparanoia/patches/patch-ac
@@ -1,329 +1,8 @@
-$NetBSD: patch-ac,v 1.3 2001/06/25 12:17:55 simonb Exp $
+$NetBSD: patch-ac,v 1.4 2002/03/04 14:45:13 itohy Exp $
---- configure.orig Mon Aug 16 08:29:42 1999
-+++ configure Mon Jun 25 21:40:23 2001
-@@ -1,7 +1,7 @@
- #! /bin/sh
-
- # Guess values for system-dependent variables and create Makefiles.
--# Generated automatically using autoconf version 2.12
-+# Generated automatically using autoconf version 2.13
- # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
- #
- # This configure script is free software; the Free Software Foundation
-@@ -49,6 +49,7 @@
- # Initialize some other variables.
- subdirs=
- MFLAGS= MAKEFLAGS=
-+SHELL=${CONFIG_SHELL-/bin/sh}
- # Maximum number of lines to put in a shell here document.
- ac_max_here_lines=12
-
-@@ -332,7 +333,7 @@
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
-- echo "configure generated by autoconf version 2.12"
-+ echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
-@@ -502,9 +503,11 @@
- # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
- ac_cpp='$CPP $CPPFLAGS'
- ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
--ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
- cross_compiling=$ac_cv_prog_cc_cross
-
-+ac_exeext=
-+ac_objext=o
- if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-@@ -543,26 +546,26 @@
-
-
- # Make sure we can run config.sub.
--if $ac_config_sub sun4 >/dev/null 2>&1; then :
-+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
- else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
- fi
-
- echo $ac_n "checking host system type""... $ac_c" 1>&6
--echo "configure:552: checking host system type" >&5
-+echo "configure:555: checking host system type" >&5
-
- host_alias=$host
- case "$host_alias" in
- NONE)
- case $nonopt in
- NONE)
-- if host_alias=`$ac_config_guess`; then :
-+ if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
- esac
-
--host=`$ac_config_sub $host_alias`
-+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
- host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
- host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
- host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-@@ -573,15 +576,16 @@
- # Extract the first word of "gcc", so it can be a program name with args.
- set dummy gcc; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:577: checking for $ac_word" >&5
-+echo "configure:580: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
- else
-- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-- for ac_dir in $PATH; do
-+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
-+ ac_dummy="$PATH"
-+ for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
-@@ -602,16 +606,17 @@
- # Extract the first word of "cc", so it can be a program name with args.
- set dummy cc; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:606: checking for $ac_word" >&5
-+echo "configure:610: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
- else
-- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
-- for ac_dir in $PATH; do
-+ ac_dummy="$PATH"
-+ for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
-@@ -646,25 +651,61 @@
- echo "$ac_t""no" 1>&6
- fi
-
-+ if test -z "$CC"; then
-+ case "`uname -s`" in
-+ *win32* | *WIN32*)
-+ # Extract the first word of "cl", so it can be a program name with args.
-+set dummy cl; ac_word=$2
-+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-+echo "configure:661: checking for $ac_word" >&5
-+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-+ echo $ac_n "(cached) $ac_c" 1>&6
-+else
-+ if test -n "$CC"; then
-+ ac_cv_prog_CC="$CC" # Let the user override the test.
-+else
-+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
-+ ac_dummy="$PATH"
-+ for ac_dir in $ac_dummy; do
-+ test -z "$ac_dir" && ac_dir=.
-+ if test -f $ac_dir/$ac_word; then
-+ ac_cv_prog_CC="cl"
-+ break
-+ fi
-+ done
-+ IFS="$ac_save_ifs"
-+fi
-+fi
-+CC="$ac_cv_prog_CC"
-+if test -n "$CC"; then
-+ echo "$ac_t""$CC" 1>&6
-+else
-+ echo "$ac_t""no" 1>&6
-+fi
-+ ;;
-+ esac
-+ fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
- fi
-
- echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
--echo "configure:654: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-+echo "configure:693: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
- ac_ext=c
- # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
- ac_cpp='$CPP $CPPFLAGS'
- ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
--ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
- cross_compiling=$ac_cv_prog_cc_cross
-
--cat > conftest.$ac_ext <<EOF
--#line 664 "configure"
-+cat > conftest.$ac_ext << EOF
-+
-+#line 704 "configure"
- #include "confdefs.h"
-+
- main(){return(0);}
- EOF
--if { (eval echo configure:668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-+if { (eval echo configure:709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- ac_cv_prog_cc_works=yes
- # If we can't run a trivial program, we are probably using a cross compiler.
- if (./conftest; exit) 2>/dev/null; then
-@@ -678,18 +719,24 @@
- ac_cv_prog_cc_works=no
- fi
- rm -fr conftest*
-+ac_ext=c
-+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-+ac_cpp='$CPP $CPPFLAGS'
-+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-+cross_compiling=$ac_cv_prog_cc_cross
-
- echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
- if test $ac_cv_prog_cc_works = no; then
- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
- fi
- echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
--echo "configure:688: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-+echo "configure:735: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
- echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
- cross_compiling=$ac_cv_prog_cc_cross
-
- echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
--echo "configure:693: checking whether we are using GNU C" >&5
-+echo "configure:740: checking whether we are using GNU C" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -698,7 +745,7 @@
- yes;
- #endif
- EOF
--if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
-+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
- else
- ac_cv_prog_gcc=no
-@@ -709,11 +756,15 @@
-
- if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-- ac_test_CFLAGS="${CFLAGS+set}"
-- ac_save_CFLAGS="$CFLAGS"
-- CFLAGS=
-- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
--echo "configure:717: checking whether ${CC-cc} accepts -g" >&5
-+else
-+ GCC=
-+fi
-+
-+ac_test_CFLAGS="${CFLAGS+set}"
-+ac_save_CFLAGS="$CFLAGS"
-+CFLAGS=
-+echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-+echo "configure:768: checking whether ${CC-cc} accepts -g" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -728,31 +779,36 @@
- fi
-
- echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-- if test "$ac_test_CFLAGS" = set; then
-- CFLAGS="$ac_save_CFLAGS"
-- elif test $ac_cv_prog_cc_g = yes; then
-+if test "$ac_test_CFLAGS" = set; then
-+ CFLAGS="$ac_save_CFLAGS"
-+elif test $ac_cv_prog_cc_g = yes; then
-+ if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
-- CFLAGS="-O2"
-+ CFLAGS="-g"
- fi
- else
-- GCC=
-- test "${CFLAGS+set}" = set || CFLAGS="-g"
-+ if test "$GCC" = yes; then
-+ CFLAGS="-O2"
-+ else
-+ CFLAGS=
-+ fi
- fi
-
- fi
- # Extract the first word of "ranlib", so it can be a program name with args.
- set dummy ranlib; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:748: checking for $ac_word" >&5
-+echo "configure:803: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
- else
-- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-- for ac_dir in $PATH; do
-+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
-+ ac_dummy="$PATH"
-+ for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
-@@ -773,15 +829,16 @@
- # Extract the first word of "ar", so it can be a program name with args.
- set dummy ar; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:777: checking for $ac_word" >&5
-+echo "configure:833: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
- else
-- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-- for ac_dir in $PATH; do
-+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
-+ ac_dummy="$PATH"
-+ for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="ar"
-@@ -801,15 +858,16 @@
- # Extract the first word of "install", so it can be a program name with args.
- set dummy install; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:805: checking for $ac_word" >&5
-+echo "configure:862: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_INSTALL'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- if test -n "$INSTALL"; then
- ac_cv_prog_INSTALL="$INSTALL" # Let the user override the test.
- else
-- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-- for ac_dir in $PATH; do
-+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
-+ ac_dummy="$PATH"
-+ for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_INSTALL="install"
-@@ -835,6 +893,12 @@
+--- configure.orig Sun Apr 16 00:13:01 2000
++++ configure Sun Mar 3 23:18:24 2002
+@@ -893,6 +893,12 @@
i?86-*-linux*)
DEBUG="-g -Wall -fsigned-char"
OPT="-O20 -ffast-math -fsigned-char -finline-functions";;
@@ -336,140 +15,124 @@ $NetBSD: patch-ac,v 1.3 2001/06/25 12:17:55 simonb Exp $
*)
DEBUG="-g -Wall -fsigned-char"
OPT="-O20 -fsigned-char";;
-@@ -842,7 +906,7 @@
+@@ -900,7 +906,7 @@
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
--echo "configure:846: checking how to run the C preprocessor" >&5
+-echo "configure:904: checking how to run the C preprocessor" >&5
+echo "configure:910: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
-@@ -857,14 +921,14 @@
+@@ -915,13 +921,13 @@
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
--#line 861 "configure"
+-#line 919 "configure"
+#line 925 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
--{ (eval echo configure:867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
--ac_err=`grep -v '^ *+' conftest.out`
+-{ (eval echo configure:925: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:931: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
- else
-@@ -874,14 +938,31 @@
+@@ -932,13 +938,13 @@
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
--#line 878 "configure"
+-#line 936 "configure"
+#line 942 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
--{ (eval echo configure:884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
--ac_err=`grep -v '^ *+' conftest.out`
+-{ (eval echo configure:942: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:948: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-+if test -z "$ac_err"; then
-+ :
-+else
-+ echo "$ac_err" >&5
-+ echo "configure: failed program was:" >&5
-+ cat conftest.$ac_ext >&5
-+ rm -rf conftest*
-+ CPP="${CC-cc} -nologo -E"
-+ cat > conftest.$ac_ext <<EOF
+ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+ if test -z "$ac_err"; then
+ :
+@@ -949,13 +955,13 @@
+ rm -rf conftest*
+ CPP="${CC-cc} -nologo -E"
+ cat > conftest.$ac_ext <<EOF
+-#line 953 "configure"
+#line 959 "configure"
-+#include "confdefs.h"
-+#include <assert.h>
-+Syntax Error
-+EOF
-+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+ #include "confdefs.h"
+ #include <assert.h>
+ Syntax Error
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:965: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
- else
-@@ -894,6 +975,8 @@
- rm -f conftest*
- fi
- rm -f conftest*
-+fi
-+rm -f conftest*
- ac_cv_prog_CPP="$CPP"
- fi
- CPP="$ac_cv_prog_CPP"
-@@ -903,12 +986,12 @@
+@@ -980,12 +986,12 @@
echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
--echo "configure:907: checking for ANSI C header files" >&5
+-echo "configure:984: checking for ANSI C header files" >&5
+echo "configure:990: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
--#line 912 "configure"
+-#line 989 "configure"
+#line 995 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
-@@ -916,8 +999,8 @@
+@@ -993,7 +999,7 @@
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
--{ (eval echo configure:920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
--ac_err=`grep -v '^ *+' conftest.out`
+-{ (eval echo configure:997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
- ac_cv_header_stdc=yes
-@@ -933,7 +1016,7 @@
+@@ -1010,7 +1016,7 @@
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
--#line 937 "configure"
+-#line 1014 "configure"
+#line 1020 "configure"
#include "confdefs.h"
#include <string.h>
EOF
-@@ -951,7 +1034,7 @@
+@@ -1028,7 +1034,7 @@
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
--#line 955 "configure"
+-#line 1032 "configure"
+#line 1038 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
-@@ -972,7 +1055,7 @@
+@@ -1049,7 +1055,7 @@
:
else
cat > conftest.$ac_ext <<EOF
--#line 976 "configure"
+-#line 1053 "configure"
+#line 1059 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-@@ -983,7 +1066,7 @@
+@@ -1060,7 +1066,7 @@
exit (0); }
EOF
--if { (eval echo configure:987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+-if { (eval echo configure:1064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
-@@ -1007,12 +1090,11 @@
+@@ -1084,12 +1090,11 @@
fi
@@ -478,157 +141,213 @@ $NetBSD: patch-ac,v 1.3 2001/06/25 12:17:55 simonb Exp $
TYPESIZES=""
echo $ac_n "checking size of short""... $ac_c" 1>&6
--echo "configure:1016: checking size of short" >&5
+-echo "configure:1093: checking size of short" >&5
+echo "configure:1098: checking size of short" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
-@@ -1020,7 +1102,7 @@
+@@ -1097,7 +1102,7 @@
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
--#line 1024 "configure"
+-#line 1101 "configure"
+#line 1106 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
-@@ -1031,7 +1113,7 @@
+@@ -1108,7 +1113,7 @@
exit(0);
}
EOF
--if { (eval echo configure:1035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+-if { (eval echo configure:1112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_short=`cat conftestval`
else
-@@ -1051,7 +1133,7 @@
+@@ -1128,7 +1133,7 @@
echo $ac_n "checking size of int""... $ac_c" 1>&6
--echo "configure:1055: checking size of int" >&5
+-echo "configure:1132: checking size of int" >&5
+echo "configure:1137: checking size of int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
-@@ -1059,7 +1141,7 @@
+@@ -1136,7 +1141,7 @@
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
--#line 1063 "configure"
+-#line 1140 "configure"
+#line 1145 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
-@@ -1070,7 +1152,7 @@
+@@ -1147,7 +1152,7 @@
exit(0);
}
EOF
--if { (eval echo configure:1074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+-if { (eval echo configure:1151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_int=`cat conftestval`
else
-@@ -1090,7 +1172,7 @@
+@@ -1167,7 +1172,7 @@
echo $ac_n "checking size of long""... $ac_c" 1>&6
--echo "configure:1094: checking size of long" >&5
+-echo "configure:1171: checking size of long" >&5
+echo "configure:1176: checking size of long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
-@@ -1098,7 +1180,7 @@
+@@ -1175,7 +1180,7 @@
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
--#line 1102 "configure"
+-#line 1179 "configure"
+#line 1184 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
-@@ -1109,7 +1191,7 @@
+@@ -1186,7 +1191,7 @@
exit(0);
}
EOF
--if { (eval echo configure:1113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+-if { (eval echo configure:1190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_long=`cat conftestval`
else
-@@ -1129,7 +1211,7 @@
+@@ -1206,7 +1211,7 @@
echo $ac_n "checking size of long long""... $ac_c" 1>&6
--echo "configure:1133: checking size of long long" >&5
+-echo "configure:1210: checking size of long long" >&5
+echo "configure:1215: checking size of long long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
-@@ -1137,7 +1219,7 @@
+@@ -1214,7 +1219,7 @@
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
--#line 1141 "configure"
+-#line 1218 "configure"
+#line 1223 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
-@@ -1148,7 +1230,7 @@
+@@ -1225,7 +1230,7 @@
exit(0);
}
EOF
--if { (eval echo configure:1152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+-if { (eval echo configure:1229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_long_long=`cat conftestval`
else
-@@ -1195,18 +1277,18 @@
+@@ -1257,12 +1262,12 @@
+ esac
+
+ echo $ac_n "checking for int16_t""... $ac_c" 1>&6
+-echo "configure:1261: checking for int16_t" >&5
++echo "configure:1266: checking for int16_t" >&5
+ if eval "test \"`echo '$''{'ac_cv_type_int16_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 1266 "configure"
++#line 1271 "configure"
+ #include "confdefs.h"
+ #include <sys/types.h>
+ #if STDC_HEADERS
+@@ -1290,12 +1295,12 @@
+ fi
+
+ echo $ac_n "checking for int32_t""... $ac_c" 1>&6
+-echo "configure:1294: checking for int32_t" >&5
++echo "configure:1299: checking for int32_t" >&5
+ if eval "test \"`echo '$''{'ac_cv_type_int32_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 1299 "configure"
++#line 1304 "configure"
+ #include "confdefs.h"
+ #include <sys/types.h>
+ #if STDC_HEADERS
+@@ -1323,12 +1328,12 @@
+ fi
+
+ echo $ac_n "checking for u_int16_t""... $ac_c" 1>&6
+-echo "configure:1327: checking for u_int16_t" >&5
++echo "configure:1332: checking for u_int16_t" >&5
+ if eval "test \"`echo '$''{'ac_cv_type_u_int16_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 1332 "configure"
++#line 1337 "configure"
+ #include "confdefs.h"
+ #include <sys/types.h>
+ #if STDC_HEADERS
+@@ -1356,12 +1361,12 @@
+ fi
+
+ echo $ac_n "checking for u_int32_t""... $ac_c" 1>&6
+-echo "configure:1360: checking for u_int32_t" >&5
++echo "configure:1365: checking for u_int32_t" >&5
+ if eval "test \"`echo '$''{'ac_cv_type_u_int32_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 1365 "configure"
++#line 1370 "configure"
+ #include "confdefs.h"
+ #include <sys/types.h>
+ #if STDC_HEADERS
+@@ -1400,17 +1405,17 @@
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
--echo "configure:1199: checking for $ac_hdr" >&5
-+echo "configure:1281: checking for $ac_hdr" >&5
+-echo "configure:1404: checking for $ac_hdr" >&5
++echo "configure:1409: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
--#line 1204 "configure"
-+#line 1286 "configure"
+-#line 1409 "configure"
++#line 1414 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
--{ (eval echo configure:1209: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
--ac_err=`grep -v '^ *+' conftest.out`
-+{ (eval echo configure:1291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+-{ (eval echo configure:1414: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:1419: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-@@ -1235,18 +1317,18 @@
+@@ -1440,17 +1445,17 @@
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
--echo "configure:1239: checking for $ac_hdr" >&5
-+echo "configure:1321: checking for $ac_hdr" >&5
+-echo "configure:1444: checking for $ac_hdr" >&5
++echo "configure:1449: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
--#line 1244 "configure"
-+#line 1326 "configure"
+-#line 1449 "configure"
++#line 1454 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
--{ (eval echo configure:1249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
--ac_err=`grep -v '^ *+' conftest.out`
-+{ (eval echo configure:1331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+-{ (eval echo configure:1454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:1459: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-@@ -1271,9 +1353,146 @@
+@@ -1476,9 +1481,146 @@
fi
done
@@ -636,17 +355,17 @@ $NetBSD: patch-ac,v 1.3 2001/06/25 12:17:55 simonb Exp $
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-+echo "configure:1361: checking for $ac_hdr" >&5
++echo "configure:1489: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
-+#line 1366 "configure"
++#line 1494 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-+{ (eval echo configure:1371: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:1499: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
@@ -667,7 +386,7 @@ $NetBSD: patch-ac,v 1.3 2001/06/25 12:17:55 simonb Exp $
+#define $ac_tr_hdr 1
+EOF
+ echo $ac_n "checking for getrawpartition in -lutil""... $ac_c" 1>&6
-+echo "configure:1392: checking for getrawpartition in -lutil" >&5
++echo "configure:1520: checking for getrawpartition in -lutil" >&5
+ac_lib_var=`echo util'_'getrawpartition | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
@@ -675,7 +394,7 @@ $NetBSD: patch-ac,v 1.3 2001/06/25 12:17:55 simonb Exp $
+ ac_save_LIBS="$LIBS"
+LIBS="-lutil $LIBS"
+cat > conftest.$ac_ext <<EOF
-+#line 1400 "configure"
++#line 1528 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
@@ -686,7 +405,7 @@ $NetBSD: patch-ac,v 1.3 2001/06/25 12:17:55 simonb Exp $
+getrawpartition()
+; return 0; }
+EOF
-+if { (eval echo configure:1411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:1539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
@@ -717,12 +436,12 @@ $NetBSD: patch-ac,v 1.3 2001/06/25 12:17:55 simonb Exp $
+for ac_func in getopt_long
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-+echo "configure:1442: checking for $ac_func" >&5
++echo "configure:1570: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
-+#line 1447 "configure"
++#line 1575 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
@@ -745,7 +464,7 @@ $NetBSD: patch-ac,v 1.3 2001/06/25 12:17:55 simonb Exp $
+
+; return 0; }
+EOF
-+if { (eval echo configure:1470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:1598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
@@ -771,36 +490,36 @@ $NetBSD: patch-ac,v 1.3 2001/06/25 12:17:55 simonb Exp $
+
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
--echo "configure:1277: checking whether ${MAKE-make} sets \${MAKE}" >&5
-+echo "configure:1496: checking whether ${MAKE-make} sets \${MAKE}" >&5
+-echo "configure:1482: checking whether ${MAKE-make} sets \${MAKE}" >&5
++echo "configure:1624: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
-@@ -1300,12 +1519,12 @@
+@@ -1505,12 +1647,12 @@
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
--echo "configure:1304: checking for working const" >&5
-+echo "configure:1523: checking for working const" >&5
+-echo "configure:1509: checking for working const" >&5
++echo "configure:1651: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
--#line 1309 "configure"
-+#line 1528 "configure"
+-#line 1514 "configure"
++#line 1656 "configure"
#include "confdefs.h"
int main() {
-@@ -1354,7 +1573,7 @@
+@@ -1559,7 +1701,7 @@
; return 0; }
EOF
--if { (eval echo configure:1358: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+if { (eval echo configure:1577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+-if { (eval echo configure:1563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:1705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
-@@ -1382,6 +1601,9 @@
+@@ -1587,6 +1729,9 @@
@@ -810,37 +529,7 @@ $NetBSD: patch-ac,v 1.3 2001/06/25 12:17:55 simonb Exp $
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
-@@ -1405,7 +1627,7 @@
- # Ultrix sh set writes to stderr and can't be redirected directly,
- # and sets the high bit in the cache file unless we assign to the vars.
- (set) 2>&1 |
-- case `(ac_space=' '; set) 2>&1` in
-+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
-@@ -1484,7 +1706,7 @@
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-- echo "$CONFIG_STATUS generated by autoconf version 2.12"
-+ echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
-@@ -1503,9 +1725,11 @@
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
- $ac_vpsub
- $extrasub
-+s%@SHELL@%$SHELL%g
- s%@CFLAGS@%$CFLAGS%g
- s%@CPPFLAGS@%$CPPFLAGS%g
- s%@CXXFLAGS@%$CXXFLAGS%g
-+s%@FFLAGS@%$FFLAGS%g
- s%@DEFS@%$DEFS%g
- s%@LDFLAGS@%$LDFLAGS%g
- s%@LIBS@%$LIBS%g
-@@ -1537,9 +1761,12 @@
+@@ -1744,9 +1889,12 @@
s%@SET_MAKE@%$SET_MAKE%g
s%@SBPCD_H@%$SBPCD_H%g
s%@UCDROM_H@%$UCDROM_H%g
diff --git a/audio/cdparanoia/patches/patch-ad b/audio/cdparanoia/patches/patch-ad
index 1bcdc333844..dd2498e55d5 100644
--- a/audio/cdparanoia/patches/patch-ad
+++ b/audio/cdparanoia/patches/patch-ad
@@ -1,7 +1,7 @@
-$NetBSD: patch-ad,v 1.2 2000/01/28 07:18:38 rh Exp $
+$NetBSD: patch-ad,v 1.3 2002/03/04 14:45:13 itohy Exp $
---- utils.h.orig Fri Oct 8 21:18:21 1999
-+++ utils.h Fri Jan 28 08:04:15 2000
+--- utils.h.orig Thu Apr 20 07:41:04 2000
++++ utils.h Sun Mar 3 23:24:19 2002
@@ -1,5 +1,16 @@
#include <stdlib.h>
+#ifdef __linux__
@@ -22,23 +22,23 @@ $NetBSD: patch-ad,v 1.2 2000/01/28 07:18:38 rh Exp $
@@ -19,15 +30,23 @@
}
- static inline size32 swap32(size32 x){
+ static inline int32_t swap32(int32_t x){
+#ifdef __NetBSD__
+ return bswap32(x);
+#else
- return((((unsigned size32)x & 0x000000ffU) << 24) |
- (((unsigned size32)x & 0x0000ff00U) << 8) |
- (((unsigned size32)x & 0x00ff0000U) >> 8) |
- (((unsigned size32)x & 0xff000000U) >> 24));
+ return((((u_int32_t)x & 0x000000ffU) << 24) |
+ (((u_int32_t)x & 0x0000ff00U) << 8) |
+ (((u_int32_t)x & 0x00ff0000U) >> 8) |
+ (((u_int32_t)x & 0xff000000U) >> 24));
+#endif
}
- static inline size16 swap16(size16 x){
+ static inline int16_t swap16(int16_t x){
+#ifdef __NetBSD__
+ return bswap16(x);
+#else
- return((((unsigned size16)x & 0x00ffU) << 8) |
- (((unsigned size16)x & 0xff00U) >> 8));
+ return((((u_int16_t)x & 0x00ffU) << 8) |
+ (((u_int16_t)x & 0xff00U) >> 8));
+#endif
}
diff --git a/audio/cdparanoia/patches/patch-ae b/audio/cdparanoia/patches/patch-ae
index fccae284968..8e23995f263 100644
--- a/audio/cdparanoia/patches/patch-ae
+++ b/audio/cdparanoia/patches/patch-ae
@@ -1,7 +1,7 @@
-$NetBSD: patch-ae,v 1.3 2001/06/25 12:17:55 simonb Exp $
+$NetBSD: patch-ae,v 1.4 2002/03/04 14:45:13 itohy Exp $
---- main.c.orig Tue Dec 14 19:18:44 1999
-+++ main.c Mon Jun 25 21:41:08 2001
+--- main.c.orig Mon Mar 26 12:44:50 2001
++++ main.c Mon Mar 4 23:05:48 2002
@@ -49,12 +49,18 @@
#include <unistd.h>
#include <string.h>
@@ -29,7 +29,7 @@ $NetBSD: patch-ae,v 1.3 2001/06/25 12:17:55 simonb Exp $
" -v --verbose : extra verbose operation\n"
" -q --quiet : quiet operation\n"
" -e --stderr-progress : force output of progress information to\n"
-@@ -274,6 +281,46 @@
+@@ -276,6 +283,50 @@
" -Z --disable-paranoia : disable all paranoia checking\n"
" -Y --disable-extra-paranoia : only do cdda2wav-style overlap checking\n"
" -X --abort-on-skip : abort on imperfect reads/skips\n\n"
@@ -67,8 +67,12 @@ $NetBSD: patch-ae,v 1.3 2001/06/25 12:17:55 simonb Exp $
+" addressed as LBA 0. Necessary for some\n"
+" Toshiba drives to get track boundaries\n"
+" correct\n"
-+" -z : never accept any less than perfect\n"
++" -O <n> : Add <n> samples to the offset when\n"
++" reading data. May be negative.\n"
++" -z[=n] : never accept any less than perfect\n"
+" data reconstruction (don't allow 'V's)\n"
++" but if [n] is given, skip after [n]\n"
++" retries without progress.\n"
+" -Z : disable all paranoia checking\n"
+" -Y : only do cdda2wav-style overlap checking\n"
+" -X : abort on imperfect reads/skips\n\n"
@@ -76,7 +80,7 @@ $NetBSD: patch-ae,v 1.3 2001/06/25 12:17:55 simonb Exp $
"OUTPUT SMILIES:\n"
" :-) Normal operation, low/no jitter\n"
-@@ -374,7 +421,7 @@
+@@ -376,7 +427,7 @@
int graph=30;
char buffer[256];
static long c_sector=0,v_sector=0;
@@ -85,15 +89,15 @@ $NetBSD: patch-ae,v 1.3 2001/06/25 12:17:55 simonb Exp $
static int last=0;
static long lasttime=0;
long sector,osector=0;
-@@ -585,6 +632,7 @@
+@@ -587,6 +638,7 @@
- const char *optstring = "escCn:o:d:g:S:prRwafvqVQhZzYXWBi:Tt:";
+ const char *optstring = "escCn:o:O:d:g:S:prRwafvqVQhZz::YXWBi:Tt:";
+#ifdef GETOPT_LONG
struct option options [] = {
{"stderr-progress",no_argument,NULL,'e'},
{"search-for-drive",no_argument,NULL,'s'},
-@@ -618,6 +666,7 @@
+@@ -621,6 +673,7 @@
{NULL,0,NULL,0}
};
@@ -101,7 +105,7 @@ $NetBSD: patch-ae,v 1.3 2001/06/25 12:17:55 simonb Exp $
long blocking_write(int outf, char *buffer, long num){
long words=0,temp;
-@@ -668,7 +717,12 @@
+@@ -673,7 +726,12 @@
atexit(cleanup);
@@ -115,7 +119,7 @@ $NetBSD: patch-ae,v 1.3 2001/06/25 12:17:55 simonb Exp $
switch(c){
case 'B':
batch=1;
-@@ -797,6 +851,27 @@
+@@ -810,6 +868,27 @@
report(VERSION);
/* Query the cdrom/disc; we may need to override some settings */
diff --git a/audio/cdparanoia/patches/patch-cb b/audio/cdparanoia/patches/patch-cb
index 2df56a59ceb..9d01366a378 100644
--- a/audio/cdparanoia/patches/patch-cb
+++ b/audio/cdparanoia/patches/patch-cb
@@ -1,7 +1,7 @@
-$NetBSD: patch-cb,v 1.1.1.1 2000/01/19 08:03:00 itohy Exp $
+$NetBSD: patch-cb,v 1.2 2002/03/04 14:45:14 itohy Exp $
---- interface/low_interface.h.orig Thu Dec 2 16:19:53 1999
-+++ interface/low_interface.h Sun Jan 16 18:48:11 2000
+--- interface/low_interface.h.orig Mon Mar 26 15:12:11 2001
++++ interface/low_interface.h Mon Mar 4 22:47:22 2002
@@ -25,6 +25,7 @@
#include <sys/time.h>
#include <sys/types.h>
@@ -10,7 +10,7 @@ $NetBSD: patch-cb,v 1.1.1.1 2000/01/19 08:03:00 itohy Exp $
#include <linux/major.h>
#include <linux/version.h>
-@@ -48,13 +49,24 @@
+@@ -47,13 +48,24 @@
#include <linux/cdrom.h>
#include <linux/major.h>
diff --git a/audio/cdparanoia/patches/patch-cf b/audio/cdparanoia/patches/patch-cf
index 9c809695bd7..2b7d6696217 100644
--- a/audio/cdparanoia/patches/patch-cf
+++ b/audio/cdparanoia/patches/patch-cf
@@ -1,8 +1,8 @@
-$NetBSD: patch-cf,v 1.2 2000/06/22 00:41:18 wiz Exp $
+$NetBSD: patch-cf,v 1.3 2002/03/04 14:45:14 itohy Exp $
---- interface/scan_devices.c.orig Tue Dec 14 08:30:23 1999
-+++ interface/scan_devices.c Thu Jun 22 02:36:44 2000
-@@ -17,6 +17,8 @@
+--- interface/scan_devices.c.orig Mon Mar 26 14:44:01 2001
++++ interface/scan_devices.c Mon Mar 4 00:23:01 2002
+@@ -19,6 +19,8 @@
#include "common_interface.h"
#include "utils.h"
@@ -10,11 +10,11 @@ $NetBSD: patch-cf,v 1.2 2000/06/22 00:41:18 wiz Exp $
+
#define MAX_DEV_LEN 20 /* Safe because strings only come from below */
/* must be absolute paths! */
- static char *scsi_cdrom_prefixes[3]={"/dev/scd","/dev/sr",NULL};
-@@ -28,10 +30,12 @@
- /* "/dev/aztcd", timeout is too long */
- "/dev/cm206cd",
- "/dev/gscd","/dev/optcd",NULL};
+ static char *scsi_cdrom_prefixes[]={
+@@ -49,10 +51,12 @@
+ "/dev/cm206cd",
+ "/dev/gscd",
+ "/dev/optcd",NULL};
+#endif
/* Functions here look for a cdrom drive; full init of a drive type
@@ -24,7 +24,7 @@ $NetBSD: patch-cf,v 1.2 2000/06/22 00:41:18 wiz Exp $
cdrom_drive *cdda_find_a_cdrom(int messagedest,char **messages){
/* Brute force... */
-@@ -78,6 +82,16 @@
+@@ -98,6 +102,16 @@
}
return(NULL);
}
@@ -41,7 +41,7 @@ $NetBSD: patch-cf,v 1.2 2000/06/22 00:41:18 wiz Exp $
cdrom_drive *cdda_identify(const char *device, int messagedest,char **messages){
struct stat st;
-@@ -143,6 +157,7 @@
+@@ -146,6 +160,7 @@
cdrom_drive *cdda_identify_cooked(const char *dev, int messagedest,
char **messages){
@@ -49,7 +49,7 @@ $NetBSD: patch-cf,v 1.2 2000/06/22 00:41:18 wiz Exp $
cdrom_drive *d=NULL;
struct stat st;
int fd=-1;
-@@ -270,6 +285,12 @@
+@@ -273,6 +288,12 @@
idmessage(messagedest,messages,"\t\tCDROM sensed: %s\n",description);
return(d);
@@ -63,8 +63,8 @@ $NetBSD: patch-cf,v 1.2 2000/06/22 00:41:18 wiz Exp $
struct sg_id {
@@ -289,12 +310,18 @@
-
/* Even *this* isn't as simple as it bloody well should be :-P */
+ /* SG has an easy interface, but SCSI overall does not */
static int get_scsi_id(int fd, scsiid *id){
+#ifdef __linux__
struct sg_id argid;
@@ -95,7 +95,23 @@ $NetBSD: patch-cf,v 1.2 2000/06/22 00:41:18 wiz Exp $
return(0);
}
-@@ -410,6 +444,7 @@
+@@ -401,6 +435,7 @@
+ strcat(a," ");
+ }
+
++#ifdef __linux__
+ /* At this point, we're going to punt compatability before SG2, and
+ allow only SG2 and SG3 */
+ static int verify_SG_version(cdrom_drive *d,int messagedest,
+@@ -430,6 +465,7 @@
+ idmessage(messagedest,messages,buffer,"");
+ return(major);
+ }
++#endif
+
+ cdrom_drive *cdda_identify_scsi(const char *generic_device,
+ const char *ioctl_device, int messagedest,
+@@ -460,6 +496,7 @@
generic_device);
return(NULL);
}
@@ -103,7 +119,7 @@ $NetBSD: patch-cf,v 1.2 2000/06/22 00:41:18 wiz Exp $
if((int)(g_st.st_rdev>>8)!=SCSI_GENERIC_MAJOR){
if((int)(g_st.st_rdev>>8)!=SCSI_CDROM_MAJOR){
idmessage(messagedest,messages,"\t\t%s is not a SCSI device",
-@@ -421,6 +456,7 @@
+@@ -471,6 +508,7 @@
ioctl_device=temp;
}
}
@@ -111,7 +127,7 @@ $NetBSD: patch-cf,v 1.2 2000/06/22 00:41:18 wiz Exp $
}
if(ioctl_device){
if(stat(ioctl_device,&i_st)){
-@@ -428,6 +464,7 @@
+@@ -478,6 +516,7 @@
ioctl_device);
return(NULL);
}
@@ -119,7 +135,7 @@ $NetBSD: patch-cf,v 1.2 2000/06/22 00:41:18 wiz Exp $
if((int)(i_st.st_rdev>>8)!=SCSI_CDROM_MAJOR){
if((int)(i_st.st_rdev>>8)!=SCSI_GENERIC_MAJOR){
idmessage(messagedest,messages,"\t\t%s is not a SCSI device",
-@@ -439,6 +476,7 @@
+@@ -489,6 +528,7 @@
ioctl_device=temp;
}
}
@@ -127,15 +143,15 @@ $NetBSD: patch-cf,v 1.2 2000/06/22 00:41:18 wiz Exp $
}
/* we need to resolve any symlinks for the lookup code to work */
-@@ -455,6 +493,7 @@
+@@ -505,6 +545,7 @@
}
if(!generic_device || !ioctl_device){
+#ifdef __linux__
if(generic_device){
- ioctl_device=scsi_match(generic_device,scsi_cdrom_prefixes,O_RDWR,
- O_RDONLY|O_NONBLOCK,
-@@ -468,6 +507,9 @@
+ ioctl_device=
+ scsi_match(generic_device,scsi_cdrom_prefixes,
+@@ -520,6 +561,9 @@
if(!generic_device)
goto cdda_identify_scsi_fail;
}
@@ -145,7 +161,7 @@ $NetBSD: patch-cf,v 1.2 2000/06/22 00:41:18 wiz Exp $
}
idmessage(messagedest,messages,"\t\tgeneric device: %s",generic_device);
-@@ -504,6 +546,7 @@
+@@ -556,6 +600,7 @@
type=(int)(i_st.st_rdev>>8);
@@ -153,7 +169,7 @@ $NetBSD: patch-cf,v 1.2 2000/06/22 00:41:18 wiz Exp $
if(type==SCSI_CDROM_MAJOR){
if (!S_ISBLK(i_st.st_mode)) {
idmessage(messagedest,messages,"\t\tSCSI CDROM device %s not a "
-@@ -515,8 +558,10 @@
+@@ -567,8 +612,10 @@
"major number",ioctl_device);
goto cdda_identify_scsi_fail;
}
@@ -164,17 +180,35 @@ $NetBSD: patch-cf,v 1.2 2000/06/22 00:41:18 wiz Exp $
if((int)(g_st.st_rdev>>8)==SCSI_GENERIC_MAJOR){
if (!S_ISCHR(g_st.st_mode)) {
idmessage(messagedest,messages,"\t\tGeneric SCSI device %s not a "
-@@ -528,6 +573,7 @@
+@@ -580,6 +627,7 @@
"major number",generic_device);
goto cdda_identify_scsi_fail;
}
+#endif
+
d=calloc(1,sizeof(cdrom_drive));
+@@ -590,6 +638,7 @@
+ d->bigendianp=-1; /* We don't know yet... */
+ d->nsectors=-1;
+
++#ifdef __linux__
+ version=verify_SG_version(d,messagedest,messages);
+ switch(version){
+ case -1:case 0:case 1:
+@@ -599,6 +648,9 @@
+ d->interface=GENERIC_SCSI;
+ break;
+ }
++#else
++ d->interface=GENERIC_SCSI;
++#endif
-@@ -564,7 +610,16 @@
+ /* malloc our big buffer for scsi commands */
+ d->sg=malloc(MAX_BIG_BUFF_SIZE);
+@@ -617,7 +669,16 @@
- /* It would seem some TOSHIBA CDROM gets things wrong */
+ /* It would seem some TOSHIBA CDROMs gets things wrong */
- if (!strncmp (p + 8, "TOSHIBA", 7) &&
+#ifndef TYPE_DISK
diff --git a/audio/cdparanoia/patches/patch-cg b/audio/cdparanoia/patches/patch-cg
index 4be339f82f4..ac350a0a4d5 100644
--- a/audio/cdparanoia/patches/patch-cg
+++ b/audio/cdparanoia/patches/patch-cg
@@ -1,34 +1,64 @@
-$NetBSD: patch-cg,v 1.5 2001/01/08 23:04:58 itohy Exp $
+$NetBSD: patch-cg,v 1.6 2002/03/04 14:45:14 itohy Exp $
---- interface/scsi_interface.c.orig Tue Dec 14 13:28:03 1999
-+++ interface/scsi_interface.c Mon Jan 8 09:11:38 2001
-@@ -32,6 +32,7 @@
- #endif
+--- interface/scsi_interface.c.orig Sat Mar 24 10:15:46 2001
++++ interface/scsi_interface.c Mon Mar 4 00:03:19 2002
+@@ -23,6 +23,7 @@
+ int table,reserved;
+ char buffer[256];
- static int look_for_dougg(cdrom_drive *d){
+#ifdef __linux__
- /* are we using the new SG driver by Doug Gilbert? If so, our memory
- strategy will be different. */
- int reserved,table;
-@@ -78,6 +79,9 @@
+ /* maximum transfer size? */
+ if(ioctl(d->cdda_fd,SG_GET_RESERVED_SIZE,&reserved)){
+ /* Up, guess not. */
+@@ -31,6 +32,10 @@
}
- return(1);
+ if(ioctl(d->cdda_fd,SG_GET_SG_TABLESIZE,&table))table=1;
+#else
-+ return(0);
++ reserved = 32*1024; /* ? */
++ table = 1;
+#endif
+ {
+ int cur;
+
+@@ -53,11 +58,13 @@
+ cdmessage(d,buffer);
+ }
+
++#ifdef __linux__
+ /* Disable command queue; we don't need it, no reason to have it on */
+ reserved=0;
+ if(ioctl(d->cdda_fd,SG_SET_COMMAND_Q,&reserved)){
+ cdmessage(d,"\tCouldn't disable command queue! Continuing anyway...\n");
+ }
++#endif
+
}
- static void find_bloody_big_buff_size(cdrom_drive *d){
-@@ -142,6 +146,7 @@
+@@ -65,8 +72,14 @@
+ int arg;
+ d->enable_cdda(d,0);
++#ifdef __linux__
+ cdmessage(d,"sending SG SCSI reset... ");
+ if(ioctl(d->cdda_fd,SG_SCSI_RESET,&arg))
++#endif
++#ifdef __NetBSD__
++ cdmessage(d,"sending SCSI reset... ");
++ if(ioctl(d->cdda_fd,CDIOCRESET,&arg))
++#endif
+ cdmessage(d,"FAILED: EBUSY\n");
+ else
+ cdmessage(d,"OK\n");
+@@ -74,6 +87,7 @@
+ d->enable_cdda(d,1);
}
+#ifdef __linux__
static void clear_garbage(cdrom_drive *d){
fd_set fdset;
struct timeval tv;
-@@ -172,20 +177,28 @@
+@@ -104,6 +118,7 @@
flag=1;
}
}
@@ -36,11 +66,12 @@ $NetBSD: patch-cg,v 1.5 2001/01/08 23:04:58 itohy Exp $
/* process a complete scsi command. */
static int handle_scsi_cmd(cdrom_drive *d,
- unsigned int cmd_len,
+@@ -111,14 +126,21 @@
unsigned int in_size,
unsigned int out_size,
+
- unsigned char bytefill,
-+ unsigned int bfill,
++ unsigned int bfill,
int bytecheck){
+ unsigned char bytefill = bfill;
int status = 0;
@@ -58,12 +89,13 @@ $NetBSD: patch-cg,v 1.5 2001/01/08 23:04:58 itohy Exp $
/* clear out any possibly preexisting garbage */
clear_garbage(d);
-@@ -291,11 +304,53 @@
+@@ -224,11 +246,53 @@
if(errno==0)errno=EIO;
return(TR_EREAD);
}
+#endif /* __linux__ */
-+
+
+- if(sg_hd->sense_buffer[0]){
+#ifdef __NetBSD__
+ if (in_size && out_size) {
+ warnx("handle_scsi_cmd: in and out is not supported");
@@ -86,8 +118,7 @@ $NetBSD: patch-cg,v 1.5 2001/01/08 23:04:58 itohy Exp $
+ }
+ sreq->senselen = SENSEBUFLEN;
+ sreq->timeout = 60000; /* 60s */
-
-- if(sg_hd->sense_buffer[0]){
++
+ status = ioctl(d->cdda_fd, SCIOCCOMMAND, (void *) sreq);
+ if (status < 0)
+ return(TR_ILLEGAL);
@@ -113,7 +144,7 @@ $NetBSD: patch-cg,v 1.5 2001/01/08 23:04:58 itohy Exp $
switch(key){
case 0:
if(errno==0)errno=EIO;
-@@ -333,9 +388,20 @@
+@@ -266,9 +330,20 @@
commands still get through. Perhaps no data comes back even
though the target reports success? */
@@ -135,7 +166,7 @@ $NetBSD: patch-cg,v 1.5 2001/01/08 23:04:58 itohy Exp $
if(d->sg_buffer[i]!=bytefill){
flag=1;
break;
-@@ -667,6 +733,23 @@
+@@ -600,6 +675,23 @@
return(tracks);
}
@@ -159,7 +190,7 @@ $NetBSD: patch-cg,v 1.5 2001/01/08 23:04:58 itohy Exp $
/* These do one 'extra' copy in the name of clean code */
static int i_read_28 (cdrom_drive *d, void *p, long begin, long sectors){
-@@ -840,16 +923,29 @@
+@@ -833,16 +925,29 @@
while(1) {
if((err=map(d,(p?buffer:NULL),begin,sectors))){
if(d->report_all){
@@ -190,7 +221,7 @@ $NetBSD: patch-cg,v 1.5 2001/01/08 23:04:58 itohy Exp $
cdmessage(d,b);
sprintf(b," Transport error: %s\n",strerror_tr[err]);
cdmessage(d,b);
-@@ -859,9 +955,17 @@
+@@ -852,9 +957,17 @@
fprintf(stderr,"scsi_read error: sector=%ld length=%ld retry=%d\n",
begin,sectors,retry_count);
fprintf(stderr," Sense key: %x ASC: %x ASCQ: %x\n",
@@ -209,19 +240,53 @@ $NetBSD: patch-cg,v 1.5 2001/01/08 23:04:58 itohy Exp $
fprintf(stderr," Transport error: %s\n",strerror_tr[err]);
fprintf(stderr," System error: %s\n",strerror(errno));
}
-@@ -1377,6 +1481,11 @@
- if(reportp)
- cdmessage(d,"\tDrive appears to be Mt. Fuji ATAPI C/DVD\n");
- return(1);
-+ case 0x32:
-+ /* Toshiba DVD */
-+ if(reportp)
-+ cdmessage(d,"\tDrive appears to be Toshiba ATAPI C/DVD\n");
-+ return(1);
- default:
- if(reportp)
- switch(d->inqbytes[3]&0x0f){
-@@ -1537,7 +1646,7 @@
+@@ -1308,21 +1421,43 @@
+ }
+
+ static int check_atapi(cdrom_drive *d){
++#ifdef __linux__
+ int atapiret=-1;
++#endif
++#ifdef __NetBSD__
++ struct scsi_addr scaddr;
++#endif
+ int fd = d->cdda_fd; /* this is the correct fd (not ioctl_fd), as the
+ generic device is the device we need to check */
+
+ cdmessage(d,"\nChecking for SCSI emulation...\n");
+
+- if (ioctl(fd,SG_EMULATED_HOST,&atapiret)){
++#ifdef __linux__
++ if (ioctl(fd,SG_EMULATED_HOST,&atapiret))
++#endif
++#ifdef __NetBSD__
++ if(ioctl(fd,SCIOCIDENTIFY,&scaddr))
++#endif
++ {
+ cderror(d,"\tSG_EMULATED_HOST ioctl() failed!\n");
+ return(-1);
+ } else {
+- if(atapiret==1){
++#ifdef __linux__
++ if(atapiret==1)
++#endif
++#ifdef __NetBSD__
++ if(scaddr.type == TYPE_ATAPI)
++#endif
++ {
++#ifdef __linux__
+ cdmessage(d,"\tDrive is ATAPI (using SCSI host adaptor emulation)\n");
+ /* Disable kernel SCSI command translation layer for access through sg */
+ if (ioctl(fd,SG_SET_TRANSFORM,0))
+ cderror(d,"\tCouldn't disable kernel command translation layer\n");
++#endif
++#ifdef __NetBSD__
++ cdmessage(d,"\tDrive is ATAPI\n");
++#endif
+ d->is_atapi=1;
+ }else{
+ cdmessage(d,"\tDrive is SCSI\n");
+@@ -1434,7 +1569,7 @@
d->read_toc = (!memcmp(d->drive_model, "IMS", 3) && !d->is_atapi) ? scsi_read_toc2 :
scsi_read_toc;