summaryrefslogtreecommitdiff
path: root/emulators/wine/patches/patch-aa
diff options
context:
space:
mode:
Diffstat (limited to 'emulators/wine/patches/patch-aa')
-rw-r--r--emulators/wine/patches/patch-aa1389
1 files changed, 0 insertions, 1389 deletions
diff --git a/emulators/wine/patches/patch-aa b/emulators/wine/patches/patch-aa
index 8ed14bd64bf..08f49012597 100644
--- a/emulators/wine/patches/patch-aa
+++ b/emulators/wine/patches/patch-aa
@@ -8,1392 +8,3 @@
AR = ar rc
RM = rm -f
MKDIR = mkdir
---- Makefile.in.orig Sun Feb 15 14:20:52 1998
-+++ Makefile.in Sun Mar 15 23:37:10 1998
-@@ -108,7 +108,7 @@
- lib: $(LIBSUBDIRS) $(LIB_TARGET)
-
- wine wine.sym: $(LIBSUBDIRS) $(LIB_TARGET) $(EMUSUBDIRS) dummy
-- $(CC) -o wine $(EMUOBJS) $(LIB_TARGET) $(LDOPTIONS) $(X_LIBS) $(XPM_LIB) $(XLIB) $(LIBS)
-+ $(CC) -o wine $(EMUOBJS) -L. -lwine $(LDOPTIONS) $(X_LIBS) $(XPM_LIB) $(XLIB) $(LIBS)
- nm -n wine | grep -v _compiled >wine.sym
-
- libwine.a: $(LIBOBJS)
-@@ -117,7 +117,7 @@
- $(RANLIB) $@
-
- libwine.so.1.0: $(LIBOBJS)
-- $(CC) -shared -Wl,-soname,libwine.so -o$@ $(LIBOBJS) $(LDOPTIONS) $(X_LIBS) $(XPM_LIB) $(XLIB) $(LIBS)
-+ ${LDSHARE} -o$@ $(LIBOBJS) $(LDOPTIONS)
-
- install_emu: install_lib
- $(INSTALL_PROGRAM) wine $(bindir)/wine
---- configure.orig Sun Feb 1 13:17:43 1998
-+++ configure Sun Mar 15 23:30:55 1998
-@@ -1936,8 +1936,51 @@
- echo "$ac_t""no" 1>&6
- fi
-
-+echo $ac_n "checking for main in -lossaudio""... $ac_c" 1>&6
-+echo "configure:1941: checking for main in -lossaudio" >&5
-+ac_lib_var=`echo ossaudio'_'main | sed 'y%./+-%__p_%'`
-+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-+ echo $ac_n "(cached) $ac_c" 1>&6
-+else
-+ ac_save_LIBS="$LIBS"
-+LIBS="-lossaudio $LIBS"
-+cat > conftest.$ac_ext <<EOF
-+#line 1949 "configure"
-+#include "confdefs.h"
-+
-+int main() {
-+main()
-+; return 0; }
-+EOF
-+if { (eval echo configure:1956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-+ rm -rf conftest*
-+ eval "ac_cv_lib_$ac_lib_var=yes"
-+else
-+ echo "configure: failed program was:" >&5
-+ cat conftest.$ac_ext >&5
-+ rm -rf conftest*
-+ eval "ac_cv_lib_$ac_lib_var=no"
-+fi
-+rm -f conftest*
-+LIBS="$ac_save_LIBS"
-+
-+fi
-+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-+ echo "$ac_t""yes" 1>&6
-+ ac_tr_lib=HAVE_LIB`echo ossaudio | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
-+ cat >> confdefs.h <<EOF
-+#define $ac_tr_lib 1
-+EOF
-+
-+ LIBS="-lossaudio $LIBS"
-+
-+else
-+ echo "$ac_t""no" 1>&6
-+fi
-+
- echo $ac_n "checking for iswalnum in -lw""... $ac_c" 1>&6
--echo "configure:1941: checking for iswalnum in -lw" >&5
-+echo "configure:1984: checking for iswalnum in -lw" >&5
- ac_lib_var=`echo w'_'iswalnum | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-@@ -1945,7 +1988,7 @@
- ac_save_LIBS="$LIBS"
- LIBS="-lw $LIBS"
- cat > conftest.$ac_ext <<EOF
--#line 1949 "configure"
-+#line 1992 "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
-@@ -1956,7 +1999,7 @@
- iswalnum()
- ; return 0; }
- EOF
--if { (eval echo configure:1960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-+if { (eval echo configure:2003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
-@@ -1984,7 +2027,7 @@
- fi
-
- echo $ac_n "checking for XF86DGAQueryExtension in -lXxf86dga""... $ac_c" 1>&6
--echo "configure:1988: checking for XF86DGAQueryExtension in -lXxf86dga" >&5
-+echo "configure:2031: checking for XF86DGAQueryExtension in -lXxf86dga" >&5
- ac_lib_var=`echo Xxf86dga'_'XF86DGAQueryExtension | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-@@ -1992,7 +2035,7 @@
- ac_save_LIBS="$LIBS"
- LIBS="-lXxf86dga $X_LIBS -lXext -lX11 $LIBS"
- cat > conftest.$ac_ext <<EOF
--#line 1996 "configure"
-+#line 2039 "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
-@@ -2003,7 +2046,7 @@
- XF86DGAQueryExtension()
- ; return 0; }
- EOF
--if { (eval echo configure:2007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-+if { (eval echo configure:2050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
-@@ -2029,12 +2072,12 @@
-
-
- echo $ac_n "checking "for Open Sound System"""... $ac_c" 1>&6
--echo "configure:2033: checking "for Open Sound System"" >&5
-+echo "configure:2076: checking "for Open Sound System"" >&5
- if eval "test \"`echo '$''{'ac_cv_c_opensoundsystem'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
--#line 2038 "configure"
-+#line 2081 "configure"
- #include "confdefs.h"
- #include <sys/soundcard.h>
- int main() {
-@@ -2046,7 +2089,27 @@
-
- ; return 0; }
- EOF
--if { (eval echo configure:2050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+if { (eval echo configure:2093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+ rm -rf conftest*
-+ ac_cv_c_opensoundsystem="yes"
-+else
-+ echo "configure: failed program was:" >&5
-+ cat conftest.$ac_ext >&5
-+ rm -rf conftest*
-+ cat > conftest.$ac_ext <<EOF
-+#line 2101 "configure"
-+#include "confdefs.h"
-+#include <soundcard.h>
-+int main() {
-+
-+/* check for one of the Open Sound System specific SNDCTL_ defines */
-+#if !defined(SNDCTL_DSP_STEREO)
-+#error No open sound system
-+#endif
-+
-+; return 0; }
-+EOF
-+if { (eval echo configure:2113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_c_opensoundsystem="yes"
- else
-@@ -2057,6 +2120,8 @@
- fi
- rm -f conftest*
- fi
-+rm -f conftest*
-+fi
-
- echo "$ac_t""$ac_cv_c_opensoundsystem" 1>&6
-
-@@ -2070,12 +2135,12 @@
-
-
- echo $ac_n "checking "for union semun"""... $ac_c" 1>&6
--echo "configure:2074: checking "for union semun"" >&5
-+echo "configure:2139: checking "for union semun"" >&5
- if eval "test \"`echo '$''{'ac_cv_c_union_semun'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
--#line 2079 "configure"
-+#line 2144 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #include <sys/sem.h>
-@@ -2083,7 +2148,7 @@
- union semun foo
- ; return 0; }
- EOF
--if { (eval echo configure:2087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+if { (eval echo configure:2152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_c_union_semun="yes"
- else
-@@ -2111,7 +2176,7 @@
- then
- CFLAGS="$CFLAGS -Wall"
- echo $ac_n "checking "for gcc strength-reduce bug"""... $ac_c" 1>&6
--echo "configure:2115: checking "for gcc strength-reduce bug"" >&5
-+echo "configure:2180: checking "for gcc strength-reduce bug"" >&5
- if eval "test \"`echo '$''{'ac_cv_c_gcc_strength_bug'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -2119,7 +2184,7 @@
- ac_cv_c_gcc_strength_bug="yes"
- else
- cat > conftest.$ac_ext <<EOF
--#line 2123 "configure"
-+#line 2188 "configure"
- #include "confdefs.h"
-
- int main(void) {
-@@ -2130,7 +2195,7 @@
- exit( Array[1] != -2 );
- }
- EOF
--if { (eval echo configure:2134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-+if { (eval echo configure:2199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
- then
- ac_cv_c_gcc_strength_bug="no"
- else
-@@ -2153,7 +2218,7 @@
-
-
- echo $ac_n "checking "whether external symbols need an underscore prefix"""... $ac_c" 1>&6
--echo "configure:2157: checking "whether external symbols need an underscore prefix"" >&5
-+echo "configure:2222: checking "whether external symbols need an underscore prefix"" >&5
- if eval "test \"`echo '$''{'ac_cv_c_extern_prefix'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -2165,14 +2230,14 @@
- .long 0
- EOF
- cat > conftest.$ac_ext <<EOF
--#line 2169 "configure"
-+#line 2234 "configure"
- #include "confdefs.h"
- extern int ac_test;
- int main() {
- if (ac_test) return 1
- ; return 0; }
- EOF
--if { (eval echo configure:2176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-+if { (eval echo configure:2241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- ac_cv_c_extern_prefix="yes"
- else
-@@ -2196,7 +2261,7 @@
-
-
- echo $ac_n "checking "whether assembler accepts .string"""... $ac_c" 1>&6
--echo "configure:2200: checking "whether assembler accepts .string"" >&5
-+echo "configure:2265: checking "whether assembler accepts .string"" >&5
- if eval "test \"`echo '$''{'ac_cv_c_asm_string'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -2206,14 +2271,14 @@
- .string "test"
- EOF
- cat > conftest.$ac_ext <<EOF
--#line 2210 "configure"
-+#line 2275 "configure"
- #include "confdefs.h"
-
- int main() {
-
- ; return 0; }
- EOF
--if { (eval echo configure:2217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-+if { (eval echo configure:2282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- ac_cv_c_asm_string="yes"
- else
-@@ -2237,57 +2302,97 @@
-
-
- DLLFLAGS=""
-+LDSHARE=""
- if test "$LIB_TARGET" = "libwine.so.1.0"
- then
-- echo $ac_n "checking "whether we can build a dll"""... $ac_c" 1>&6
--echo "configure:2244: checking "whether we can build a dll"" >&5
--if eval "test \"`echo '$''{'ac_cv_c_dll'+set}'`\" = set"; then
-+ echo $ac_n "checking "whether we can build a Linux dll"""... $ac_c" 1>&6
-+echo "configure:2310: checking "whether we can build a Linux dll"" >&5
-+if eval "test \"`echo '$''{'ac_cv_c_dll_linux'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- saved_cflags=$CFLAGS
- CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0"
- cat > conftest.$ac_ext <<EOF
--#line 2251 "configure"
-+#line 2317 "configure"
- #include "confdefs.h"
-
- int main() {
- return 1
- ; return 0; }
- EOF
--if { (eval echo configure:2258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-+if { (eval echo configure:2324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
-- ac_cv_c_dll="yes"
-+ ac_cv_c_dll_linux="yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
-- ac_cv_c_dll="no"
-+ ac_cv_c_dll_linux="no"
- fi
- rm -f conftest*
- CFLAGS=$saved_cflags
-
- fi
-
--echo "$ac_t""$ac_cv_c_dll" 1>&6
-- if test "$ac_cv_c_dll" = "yes"
-+echo "$ac_t""$ac_cv_c_dll_linux" 1>&6
-+ if test "$ac_cv_c_dll_linux" = "yes"
- then
- DLLFLAGS="-fPIC"
-- else
-+ LDSHARE="$$(CC) -shared -Wl,-soname,libwine.so"
-+ fi
-+ echo $ac_n "checking "whether we can build a NetBSD dll"""... $ac_c" 1>&6
-+echo "configure:2345: checking "whether we can build a NetBSD dll"" >&5
-+if eval "test \"`echo '$''{'ac_cv_c_dll_netbsd'+set}'`\" = set"; then
-+ echo $ac_n "(cached) $ac_c" 1>&6
-+else
-+ saved_cflags=$CFLAGS
-+ CFLAGS="$CFLAGS -fPIC -Bshareable -Bforcearchive"
-+ cat > conftest.$ac_ext <<EOF
-+#line 2352 "configure"
-+#include "confdefs.h"
-+
-+int main() {
-+return 1
-+; return 0; }
-+EOF
-+if { (eval echo configure:2359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-+ rm -rf conftest*
-+ ac_cv_c_dll_netbsd="yes"
-+else
-+ echo "configure: failed program was:" >&5
-+ cat conftest.$ac_ext >&5
-+ rm -rf conftest*
-+ ac_cv_c_dll_netbsd="no"
-+fi
-+rm -f conftest*
-+ CFLAGS=$saved_cflags
-+
-+fi
-+
-+echo "$ac_t""$ac_cv_c_dll_netbsd" 1>&6
-+ if test "$ac_cv_c_dll_netbsd" = "yes"
-+ then
-+ DLLFLAGS="-fPIC"
-+ LDSHARE="ld -Bshareable -Bforcearchive"
-+ fi
-+ if test "$ac_cv_c_dll_linux" = "no" -a "$ac_cv_c_dll_netbsd" = "no"
-+ then
- LIB_TARGET="libwine.a"
- fi
- fi
-
-
-
-+
- for ac_func in clone memmove strerror tcgetattr usleep wait4 waitpid
- do
- echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
--echo "configure:2286: checking for $ac_func" >&5
-+echo "configure:2391: 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 2291 "configure"
-+#line 2396 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-@@ -2310,7 +2415,7 @@
-
- ; return 0; }
- EOF
--if { (eval echo configure:2314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-+if { (eval echo configure:2419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
- else
-@@ -2338,17 +2443,17 @@
- do
- ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
- echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
--echo "configure:2342: checking for $ac_hdr" >&5
-+echo "configure:2447: 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 2347 "configure"
-+#line 2452 "configure"
- #include "confdefs.h"
- #include <$ac_hdr>
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
--{ (eval echo configure:2352: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+{ (eval echo configure:2457: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
- ac_err=`grep -v '^ *+' conftest.out`
- if test -z "$ac_err"; then
- rm -rf conftest*
-@@ -2375,12 +2480,12 @@
- done
-
- echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
--echo "configure:2379: checking whether stat file-mode macros are broken" >&5
-+echo "configure:2484: checking whether stat file-mode macros are broken" >&5
- if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
--#line 2384 "configure"
-+#line 2489 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #include <sys/stat.h>
-@@ -2431,12 +2536,12 @@
- fi
-
- echo $ac_n "checking for working const""... $ac_c" 1>&6
--echo "configure:2435: checking for working const" >&5
-+echo "configure:2540: 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 2440 "configure"
-+#line 2545 "configure"
- #include "confdefs.h"
-
- int main() {
-@@ -2485,7 +2590,7 @@
-
- ; return 0; }
- EOF
--if { (eval echo configure:2489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+if { (eval echo configure:2594: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_c_const=yes
- else
-@@ -2506,12 +2611,12 @@
- fi
-
- echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
--echo "configure:2510: checking for ANSI C header files" >&5
-+echo "configure:2615: 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 2515 "configure"
-+#line 2620 "configure"
- #include "confdefs.h"
- #include <stdlib.h>
- #include <stdarg.h>
-@@ -2519,7 +2624,7 @@
- #include <float.h>
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
--{ (eval echo configure:2523: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+{ (eval echo configure:2628: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
- ac_err=`grep -v '^ *+' conftest.out`
- if test -z "$ac_err"; then
- rm -rf conftest*
-@@ -2536,7 +2641,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 2540 "configure"
-+#line 2645 "configure"
- #include "confdefs.h"
- #include <string.h>
- EOF
-@@ -2554,7 +2659,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 2558 "configure"
-+#line 2663 "configure"
- #include "confdefs.h"
- #include <stdlib.h>
- EOF
-@@ -2575,7 +2680,7 @@
- :
- else
- cat > conftest.$ac_ext <<EOF
--#line 2579 "configure"
-+#line 2684 "configure"
- #include "confdefs.h"
- #include <ctype.h>
- #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-@@ -2586,7 +2691,7 @@
- exit (0); }
-
- EOF
--if { (eval echo configure:2590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-+if { (eval echo configure:2695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
- then
- :
- else
-@@ -2610,12 +2715,12 @@
- fi
-
- echo $ac_n "checking for size_t""... $ac_c" 1>&6
--echo "configure:2614: checking for size_t" >&5
-+echo "configure:2719: checking for size_t" >&5
- if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
--#line 2619 "configure"
-+#line 2724 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #if STDC_HEADERS
-@@ -2832,6 +2937,7 @@
- s%@INSTALL_DATA@%$INSTALL_DATA%g
- s%@LN_S@%$LN_S%g
- s%@DLLFLAGS@%$DLLFLAGS%g
-+s%@LDSHARE@%$LDSHARE%g
- /@MAKE_RULES@/r $MAKE_RULES
- s%@MAKE_RULES@%%g
-
---- configure.in.orig Sun Feb 1 13:17:43 1998
-+++ configure.in Sun Mar 15 23:29:53 1998
-@@ -48,6 +48,8 @@
-
- dnl Check for -li386 for NetBSD and OpenBSD
- AC_CHECK_LIB(i386,i386_set_ldt)
-+dnl Check for -lossaudio for NetBSD
-+AC_CHECK_LIB(ossaudio,main)
- dnl Check for -lw for Solaris
- AC_CHECK_LIB(w,iswalnum)
- dnl Check for XFree86 DGA extension
-@@ -62,7 +64,13 @@
- #if !defined(SNDCTL_DSP_STEREO)
- #error No open sound system
- #endif
--],ac_cv_c_opensoundsystem="yes",ac_cv_c_opensoundsystem="no"))
-+],ac_cv_c_opensoundsystem="yes",
-+ AC_TRY_COMPILE([#include <soundcard.h>],[
-+/* check for one of the Open Sound System specific SNDCTL_ defines */
-+#if !defined(SNDCTL_DSP_STEREO)
-+#error No open sound system
-+#endif
-+],ac_cv_c_opensoundsystem="yes",ac_cv_c_opensoundsystem="no")))
-
- if test "$ac_cv_c_opensoundsystem" = "yes"
- then
-@@ -144,23 +152,40 @@
- dnl **** Check for working dll ****
-
- DLLFLAGS=""
-+LDSHARE=""
- if test "$LIB_TARGET" = "libwine.so.1.0"
- then
-- AC_CACHE_CHECK("whether we can build a dll",
-- ac_cv_c_dll,
-+ AC_CACHE_CHECK("whether we can build a Linux dll",
-+ ac_cv_c_dll_linux,
- [saved_cflags=$CFLAGS
- CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0"
-- AC_TRY_LINK(,[return 1],ac_cv_c_dll="yes",ac_cv_c_dll="no")
-+ AC_TRY_LINK(,[return 1],ac_cv_c_dll_linux="yes",ac_cv_c_dll_linux="no")
-+ CFLAGS=$saved_cflags
-+ ])
-+ if test "$ac_cv_c_dll_linux" = "yes"
-+ then
-+ DLLFLAGS="-fPIC"
-+ LDSHARE="$$(CC) -shared -Wl,-soname,libwine.so"
-+ fi
-+ AC_CACHE_CHECK("whether we can build a NetBSD dll",
-+ ac_cv_c_dll_netbsd,
-+ [saved_cflags=$CFLAGS
-+ CFLAGS="$CFLAGS -fPIC -Bshareable -Bforcearchive"
-+ AC_TRY_LINK(,[return 1],ac_cv_c_dll_netbsd="yes",ac_cv_c_dll_netbsd="no")
- CFLAGS=$saved_cflags
- ])
-- if test "$ac_cv_c_dll" = "yes"
-+ if test "$ac_cv_c_dll_netbsd" = "yes"
- then
- DLLFLAGS="-fPIC"
-- else
-+ LDSHARE="ld -Bshareable -Bforcearchive"
-+ fi
-+ if test "$ac_cv_c_dll_linux" = "no" -a "$ac_cv_c_dll_netbsd" = "no"
-+ then
- LIB_TARGET="libwine.a"
- fi
- fi
- AC_SUBST(DLLFLAGS)
-+AC_SUBST(LDSHARE)
-
- dnl **** Check for functions and header files ****
-
---- multimedia/audio.c.orig Sun Jan 18 12:50:41 1998
-+++ multimedia/audio.c Sun Mar 15 22:28:20 1998
-@@ -28,7 +28,11 @@
- #include "debug.h"
-
- #ifdef HAVE_OSS
-+#ifdef __NetBSD__
-+#include <soundcard.h>
-+#else
- #include <sys/soundcard.h>
-+#endif
-
- #define SOUND_DEV "/dev/dsp"
- #define MIXER_DEV "/dev/mixer"
---- multimedia/dsound.c.orig Sun Feb 15 14:20:57 1998
-+++ multimedia/dsound.c Sun Mar 15 22:47:16 1998
-@@ -47,7 +47,11 @@
-
- #ifdef HAVE_OSS
- #include <sys/ioctl.h>
-+#ifdef __NetBSD__
-+#include <soundcard.h>
-+#else
- #include <sys/soundcard.h>
-+#endif
-
- static int audiofd = -1;
- static int current_buffered_frags = 4;
---- multimedia/mcianim.c.orig Sun Dec 21 14:14:43 1997
-+++ multimedia/mcianim.c Sun Mar 15 22:57:13 1998
-@@ -23,7 +23,7 @@
- #define ANIMFRAMES_PERMIN 1800
- #define SECONDS_PERMIN 60
-
--#if defined(linux) || defined(__FreeBSD__)
-+#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__)
- typedef struct {
- int nUseCount; /* Incremented for each shared open */
- BOOL16 fShareable; /* TRUE if first open was shareable */
-@@ -51,7 +51,7 @@
- */
- static DWORD ANIM_mciOpen(UINT16 wDevID, DWORD dwFlags, LPMCI_OPEN_PARMS16 lpParms)
- {
--#if defined(linux) || defined(__FreeBSD__)
-+#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__)
- LPSTR lpstrElementName;
- char str[128];
-
-@@ -114,7 +114,7 @@
- */
- static DWORD ANIM_mciClose(UINT16 wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms)
- {
--#if defined(linux) || defined(__FreeBSD__)
-+#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__)
- dprintf_mcianim(stddeb,"ANIM_mciClose(%u, %08lX, %p);\n",
- wDevID, dwParam, lpParms);
- if (AnimDev[wDevID].lpdwTrackLen != NULL) free(AnimDev[wDevID].lpdwTrackLen);
-@@ -129,7 +129,7 @@
- static DWORD ANIM_mciGetDevCaps(UINT16 wDevID, DWORD dwFlags,
- LPMCI_GETDEVCAPS_PARMS lpParms)
- {
--#if defined(linux) || defined(__FreeBSD__)
-+#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__)
- dprintf_mcianim(stddeb,"ANIM_mciGetDevCaps(%u, %08lX, %p);\n",
- wDevID, dwFlags, lpParms);
- if (lpParms == NULL) return MCIERR_INTERNAL;
-@@ -185,7 +185,7 @@
- static DWORD ANIM_CalcTime(UINT16 wDevID, DWORD dwFormatType, DWORD dwFrame)
- {
- DWORD dwTime = 0;
--#if defined(linux) || defined(__FreeBSD__)
-+#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__)
- UINT16 wTrack;
- UINT16 wMinutes;
- UINT16 wSeconds;
-@@ -239,7 +239,7 @@
- static DWORD ANIM_CalcFrame(UINT16 wDevID, DWORD dwFormatType, DWORD dwTime)
- {
- DWORD dwFrame = 0;
--#if defined(linux) || defined(__FreeBSD__)
-+#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__)
- UINT16 wTrack;
- dprintf_mcianim(stddeb,"ANIM_CalcFrame(%u, %08lX, %lu);\n",
- wDevID, dwFormatType, dwTime);
-@@ -287,7 +287,7 @@
- */
- static DWORD ANIM_mciInfo(UINT16 wDevID, DWORD dwFlags, LPMCI_INFO_PARMS16 lpParms)
- {
--#if defined(linux) || defined(__FreeBSD__)
-+#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__)
- dprintf_mcianim(stddeb,"ANIM_mciInfo(%u, %08lX, %p);\n",
- wDevID, dwFlags, lpParms);
- if (lpParms == NULL) return MCIERR_INTERNAL;
-@@ -321,7 +321,7 @@
- */
- static DWORD ANIM_mciStatus(UINT16 wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpParms)
- {
--#if defined(linux) || defined(__FreeBSD__)
-+#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__)
- dprintf_mcianim(stddeb,"ANIM_mciStatus(%u, %08lX, %p);\n",
- wDevID, dwFlags, lpParms);
- if (lpParms == NULL) return MCIERR_INTERNAL;
-@@ -410,7 +410,7 @@
- */
- static DWORD ANIM_mciPlay(UINT16 wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
- {
--#if defined(linux) || defined(__FreeBSD__)
-+#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__)
- int start, end;
- dprintf_mcianim(stddeb,"ANIM_mciPlay(%u, %08lX, %p);\n",
- wDevID, dwFlags, lpParms);
-@@ -449,7 +449,7 @@
- */
- static DWORD ANIM_mciStop(UINT16 wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
- {
--#if defined(linux) || defined(__FreeBSD__)
-+#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__)
- dprintf_mcianim(stddeb,"ANIM_mciStop(%u, %08lX, %p);\n",
- wDevID, dwFlags, lpParms);
- if (lpParms == NULL) return MCIERR_INTERNAL;
-@@ -472,7 +472,7 @@
- */
- static DWORD ANIM_mciPause(UINT16 wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
- {
--#if defined(linux) || defined(__FreeBSD__)
-+#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__)
- dprintf_mcianim(stddeb,"ANIM_mciPause(%u, %08lX, %p);\n",
- wDevID, dwFlags, lpParms);
- if (lpParms == NULL) return MCIERR_INTERNAL;
-@@ -495,7 +495,7 @@
- */
- static DWORD ANIM_mciResume(UINT16 wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
- {
--#if defined(linux) || defined(__FreeBSD__)
-+#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__)
- dprintf_mcianim(stddeb,"ANIM_mciResume(%u, %08lX, %p);\n",
- wDevID, dwFlags, lpParms);
- if (lpParms == NULL) return MCIERR_INTERNAL;
-@@ -518,7 +518,7 @@
- */
- static DWORD ANIM_mciSeek(UINT16 wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms)
- {
--#if defined(linux) || defined(__FreeBSD__)
-+#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__)
- DWORD dwRet;
- MCI_PLAY_PARMS PlayParms;
- dprintf_mcianim(stddeb,"ANIM_mciSeek(%u, %08lX, %p);\n",
-@@ -558,7 +558,7 @@
- */
- static DWORD ANIM_mciSet(UINT16 wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms)
- {
--#if defined(linux) || defined(__FreeBSD__)
-+#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__)
- dprintf_mcianim(stddeb,"ANIM_mciSet(%u, %08lX, %p);\n",
- wDevID, dwFlags, lpParms);
- if (lpParms == NULL) return MCIERR_INTERNAL;
-@@ -607,7 +607,7 @@
- LONG ANIM_DriverProc(DWORD dwDevID, HDRVR16 hDriv, WORD wMsg,
- DWORD dwParam1, DWORD dwParam2)
- {
--#if defined(linux) || defined(__FreeBSD__)
-+#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__)
- switch(wMsg) {
- case DRV_LOAD:
- return 1;
---- multimedia/mcicda.c.orig Sun Dec 21 14:14:43 1997
-+++ multimedia/mcicda.c Sun Mar 15 23:09:35 1998
-@@ -17,19 +17,24 @@
- #include "stddebug.h"
- #include "debug.h"
-
--#ifdef linux
-+#if defined(linux)
- #include <linux/soundcard.h>
- #include <linux/cdrom.h>
--#elif __FreeBSD__
-+#elif defined(__NetBSD__)
-+#include <soundcard.h>
-+#include <sys/cdio.h>
-+#elif defined(__FreeBSD__)
- #include <machine/soundcard.h>
- #include <sys/cdio.h>
- #endif
-
- #define SOUND_DEV "/dev/dsp"
--#ifdef __FreeBSD__
--#define CDAUDIO_DEV "/dev/rcd0c"
--#else
-+#if defined(linux)
- #define CDAUDIO_DEV "/dev/cdrom"
-+#elif defined(__NetBSD__)
-+#define CDAUDIO_DEV "/dev/rcd0d"
-+#elif defined(__FreeBSD__)
-+#define CDAUDIO_DEV "/dev/rcd0c"
- #endif
-
- #ifdef SOUND_VERSION
-@@ -45,7 +50,7 @@
- #define CDFRAMES_PERMIN 4500
- #define SECONDS_PERMIN 60
-
--#if defined(linux) || defined(__FreeBSD__)
-+#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__)
- typedef struct {
- int nUseCount; /* Incremented for each shared open */
- BOOL16 fShareable; /* TRUE if first open was shareable */
-@@ -56,7 +61,7 @@
- int unixdev;
- #ifdef linux
- struct cdrom_subchnl sc;
--#elif __FreeBSD__
-+#else
- struct cd_sub_channel_info sc;
- #endif
- int mode;
-@@ -81,21 +86,19 @@
- */
- static UINT16 CDAUDIO_GetNumberOfTracks(UINT16 wDevID)
- {
--#if defined(linux) || defined(__FreeBSD__)
-+#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__)
- #ifdef linux
- struct cdrom_tochdr hdr;
--#elif __FreeBSD__
-+#else
- struct ioc_toc_header hdr;
- #endif
-
- if (CDADev[wDevID].nTracks == 0) {
-- if (ioctl(CDADev[wDevID].unixdev,
- #ifdef linux
-- CDROMREADTOCHDR
--#elif __FreeBSD__
-- CDIOREADTOCHEADER
-+ if (ioctl(CDADev[wDevID].unixdev, CDROMREADTOCHDR, &hdr)) {
-+#else
-+ if (ioctl(CDADev[wDevID].unixdev, CDIOREADTOCHEADER, &hdr)) {
- #endif
-- , &hdr)) {
- dprintf_cdaudio(stddeb,
- "GetNumberOfTracks(%04X) // Error occured !\n",
- wDevID);
-@@ -103,7 +106,7 @@
- }
- #ifdef linux
- CDADev[wDevID].nTracks = hdr.cdth_trk1;
--#elif __FreeBSD__
-+#else
- CDADev[wDevID].nTracks = hdr.ending_track - hdr.starting_track + 1;
- #endif
- }
-@@ -119,13 +122,13 @@
- */
- static BOOL32 CDAUDIO_GetTracksInfo(UINT16 wDevID)
- {
--#if defined(linux) || defined(__FreeBSD__)
-+#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__)
- int i, length;
- int start, last_start = 0;
- int total_length = 0;
- #ifdef linux
- struct cdrom_tocentry entry;
--#elif __FreeBSD__
-+#else
- struct ioc_read_toc_entry entry;
- struct cd_toc_entry toc_buffer;
- #endif
-@@ -157,31 +160,29 @@
- if (i == CDADev[wDevID].nTracks)
- #ifdef linux
- entry.cdte_track = CDROM_LEADOUT;
--#elif __FreeBSD__
-+#else
- #define LEADOUT 0xaa
- entry.starting_track = LEADOUT; /* XXX */
- #endif
- else
- #ifdef linux
- entry.cdte_track = i + 1;
--#elif __FreeBSD__
-+#else
- entry.starting_track = i + 1;
- #endif
- #ifdef linux
- entry.cdte_format = CDROM_MSF;
--#elif __FreeBSD__
-+#else
- bzero((char *)&toc_buffer, sizeof(toc_buffer));
- entry.address_format = CD_MSF_FORMAT;
- entry.data_len = sizeof(toc_buffer);
- entry.data = &toc_buffer;
- #endif
-- if (ioctl(CDADev[wDevID].unixdev,
- #ifdef linux
-- CDROMREADTOCENTRY
--#elif __FreeBSD__
-- CDIOREADTOCENTRYS
-+ if (ioctl(CDADev[wDevID].unixdev, CDROMREADTOCENTRY, &entry)) {
-+#else
-+ if (ioctl(CDADev[wDevID].unixdev, CDIOREADTOCENTRYS, &entry)) {
- #endif
-- , &entry)) {
- dprintf_cdaudio(stddeb,
- "CDAUDIO_GetTracksInfo // error read entry\n");
- return FALSE;
-@@ -190,7 +191,7 @@
- start = CDFRAMES_PERSEC * (SECONDS_PERMIN *
- entry.cdte_addr.msf.minute + entry.cdte_addr.msf.second) +
- entry.cdte_addr.msf.frame;
--#elif __FreeBSD__
-+#else
- start = CDFRAMES_PERSEC * (SECONDS_PERMIN *
- toc_buffer.addr.msf.minute + toc_buffer.addr.msf.second) +
- toc_buffer.addr.msf.frame;
-@@ -229,7 +230,7 @@
- */
- static DWORD CDAUDIO_mciOpen(UINT16 wDevID, DWORD dwFlags, LPMCI_OPEN_PARMS16 lpParms)
- {
--#if defined(linux) || defined(__FreeBSD__)
-+#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__)
- dprintf_cdaudio(stddeb,"CDAUDIO_mciOpen(%04X, %08lX, %p);\n",
- wDevID, dwFlags, lpParms);
- if (lpParms == NULL) return MCIERR_INTERNAL;
-@@ -293,7 +294,7 @@
- */
- static DWORD CDAUDIO_mciClose(UINT16 wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms)
- {
--#if defined(linux) || defined(__FreeBSD__)
-+#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__)
- dprintf_cdaudio(stddeb,"CDAUDIO_mciClose(%04X, %08lX, %p);\n",
- wDevID, dwParam, lpParms);
- if (CDADev[wDevID].lpdwTrackLen != NULL) free(CDADev[wDevID].lpdwTrackLen);
-@@ -309,7 +310,7 @@
- static DWORD CDAUDIO_mciGetDevCaps(UINT16 wDevID, DWORD dwFlags,
- LPMCI_GETDEVCAPS_PARMS lpParms)
- {
--#if defined(linux) || defined(__FreeBSD__)
-+#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__)
- dprintf_cdaudio(stddeb,"CDAUDIO_mciGetDevCaps(%04X, %08lX, %p);\n",
- wDevID, dwFlags, lpParms);
- if (lpParms == NULL) return MCIERR_INTERNAL;
-@@ -363,7 +364,7 @@
- */
- static DWORD CDAUDIO_mciInfo(UINT16 wDevID, DWORD dwFlags, LPMCI_INFO_PARMS16 lpParms)
- {
--#if defined(linux) || defined(__FreeBSD__)
-+#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__)
- dprintf_cdaudio(stddeb,"CDAUDIO_mciInfo(%04X, %08lX, %p);\n",
- wDevID, dwFlags, lpParms);
- if (lpParms == NULL) return MCIERR_INTERNAL;
-@@ -392,7 +393,7 @@
- static DWORD CDAUDIO_CalcFrame(UINT16 wDevID, DWORD dwFormatType, DWORD dwTime)
- {
- DWORD dwFrame = 0;
--#if defined(linux) || defined(__FreeBSD__)
-+#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__)
- UINT16 wTrack;
-
- dprintf_cdaudio(stddeb,"CDAUDIO_CalcFrame(%04X, %08lX, %lu);\n",
-@@ -442,9 +443,11 @@
- */
- static BOOL32 CDAUDIO_GetCDStatus(UINT16 wDevID)
- {
--#if defined(linux) || defined(__FreeBSD__)
-+#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__)
- int oldmode = CDADev[wDevID].mode;
--#ifdef __FreeBSD__
-+#ifdef linux
-+ CDADev[wDevID].sc.cdsc_format = CDROM_MSF;
-+#else
- struct ioc_read_subchannel read_sc;
-
- read_sc.address_format = CD_MSF_FORMAT;
-@@ -452,16 +455,12 @@
- read_sc.track = 0;
- read_sc.data_len = sizeof(CDADev[wDevID].sc);
- read_sc.data = (struct cd_sub_channel_info *)&CDADev[wDevID].sc;
--#elif linux
-- CDADev[wDevID].sc.cdsc_format = CDROM_MSF;
- #endif
-- if (ioctl(CDADev[wDevID].unixdev,
- #ifdef linux
-- CDROMSUBCHNL, &CDADev[wDevID].sc
--#elif __FreeBSD__
-- CDIOCREADSUBCHANNEL, &read_sc
-+ if (ioctl(CDADev[wDevID].unixdev, CDROMSUBCHNL, &CDADev[wDevID].sc)) {
-+#else
-+ if (ioctl(CDADev[wDevID].unixdev, CDIOCREADSUBCHANNEL, &read_sc)) {
- #endif
-- )) {
- dprintf_cdaudio(stddeb,"CDAUDIO_GetCDStatus // opened or no_media !\n");
- CDADev[wDevID].mode = MCI_MODE_NOT_READY;
- return TRUE;
-@@ -469,25 +468,25 @@
- switch (
- #ifdef linux
- CDADev[wDevID].sc.cdsc_audiostatus
--#elif __FreeBSD__
-+#else
- CDADev[wDevID].sc.header.audio_status
- #endif
- ) {
- #ifdef linux
- case CDROM_AUDIO_INVALID:
--#elif __FreeBSD__
-+#else
- case CD_AS_AUDIO_INVALID:
- #endif
- dprintf_cdaudio(stddeb,"CDAUDIO_GetCDStatus // device doesn't support status, returning NOT_READY.\n");
- #ifdef linux
- CDADev[wDevID].mode = MCI_MODE_NOT_READY;
--#elif __FreeBSD__
-+#else
- CDADev[wDevID].mode = MCI_MODE_STOP;
- #endif
- break;
- #ifdef linux
- case CDROM_AUDIO_NO_STATUS:
--#elif __FreeBSD__
-+#else
- case CD_AS_NO_STATUS:
- #endif
- CDADev[wDevID].mode = MCI_MODE_STOP;
-@@ -495,7 +494,7 @@
- break;
- #ifdef linux
- case CDROM_AUDIO_PLAY:
--#elif __FreeBSD__
-+#else
- case CD_AS_PLAY_IN_PROGRESS:
- #endif
- CDADev[wDevID].mode = MCI_MODE_PLAY;
-@@ -503,7 +502,7 @@
- break;
- #ifdef linux
- case CDROM_AUDIO_PAUSED:
--#elif __FreeBSD__
-+#else
- case CD_AS_PLAY_PAUSED:
- #endif
- CDADev[wDevID].mode = MCI_MODE_PAUSE;
-@@ -513,7 +512,7 @@
- dprintf_cdaudio(stddeb,"CDAUDIO_GetCDStatus // status=%02X !\n",
- #ifdef linux
- CDADev[wDevID].sc.cdsc_audiostatus
--#elif __FreeBSD__
-+#else
- CDADev[wDevID].sc.header.audio_status
- #endif
- );
-@@ -524,7 +523,7 @@
- CDFRAMES_PERMIN * CDADev[wDevID].sc.cdsc_absaddr.msf.minute +
- CDFRAMES_PERSEC * CDADev[wDevID].sc.cdsc_absaddr.msf.second +
- CDADev[wDevID].sc.cdsc_absaddr.msf.frame;
--#elif __FreeBSD__
-+#else
- CDADev[wDevID].nCurTrack = CDADev[wDevID].sc.what.position.track_number;
- CDADev[wDevID].dwCurFrame =
- CDFRAMES_PERMIN * CDADev[wDevID].sc.what.position.absaddr.msf.minute +
-@@ -537,7 +536,7 @@
- CDADev[wDevID].sc.cdsc_absaddr.msf.minute,
- CDADev[wDevID].sc.cdsc_absaddr.msf.second,
- CDADev[wDevID].sc.cdsc_absaddr.msf.frame
--#elif __FreeBSD__
-+#else
- CDADev[wDevID].sc.what.position.track_number,
- CDADev[wDevID].sc.what.position.absaddr.msf.minute,
- CDADev[wDevID].sc.what.position.absaddr.msf.second,
-@@ -563,7 +562,7 @@
- static DWORD CDAUDIO_CalcTime(UINT16 wDevID, DWORD dwFormatType, DWORD dwFrame)
- {
- DWORD dwTime = 0;
--#if defined(linux) || defined(__FreeBSD__)
-+#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__)
- UINT16 wTrack;
- UINT16 wMinutes;
- UINT16 wSeconds;
-@@ -618,7 +617,7 @@
- */
- static DWORD CDAUDIO_mciStatus(UINT16 wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpParms)
- {
--#if defined(linux) || defined(__FreeBSD__)
-+#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__)
- dprintf_cdaudio(stddeb,"CDAUDIO_mciStatus(%04X, %08lX, %p);\n",
- wDevID, dwFlags, lpParms);
- if (lpParms == NULL) return MCIERR_INTERNAL;
-@@ -720,11 +719,11 @@
- */
- static DWORD CDAUDIO_mciPlay(UINT16 wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
- {
--#if defined(linux) || defined(__FreeBSD__)
-+#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__)
- int start, end;
- #ifdef linux
- struct cdrom_msf msf;
--#elif __FreeBSD__
-+#else
- struct ioc_play_msf msf;
- #endif
-
-@@ -756,7 +755,7 @@
- msf.cdmsf_min1 = end / CDFRAMES_PERMIN;
- msf.cdmsf_sec1 = (end % CDFRAMES_PERMIN) / CDFRAMES_PERSEC;
- msf.cdmsf_frame1 = end % CDFRAMES_PERSEC;
--#elif __FreeBSD__
-+#else
- msf.start_m = start / CDFRAMES_PERMIN;
- msf.start_s = (start % CDFRAMES_PERMIN) / CDFRAMES_PERSEC;
- msf.start_f = start % CDFRAMES_PERSEC;
-@@ -764,23 +763,19 @@
- msf.end_s = (end % CDFRAMES_PERMIN) / CDFRAMES_PERSEC;
- msf.end_f = end % CDFRAMES_PERSEC;
- #endif
-- if (ioctl(CDADev[wDevID].unixdev,
- #ifdef linux
-- CDROMSTART
--#elif __FreeBSD__
-- CDIOCSTART
-+ if (ioctl(CDADev[wDevID].unixdev, CDROMSTART)) {
-+#else
-+ if (ioctl(CDADev[wDevID].unixdev, CDIOCSTART, 0)) {
- #endif
-- )) {
- dprintf_cdaudio(stddeb,"CDAUDIO_mciPlay // motor doesn't start !\n");
- return MCIERR_HARDWARE;
- }
-- if (ioctl(CDADev[wDevID].unixdev,
- #ifdef linux
-- CDROMPLAYMSF
--#elif __FreeBSD__
-- CDIOCPLAYMSF
-+ if (ioctl(CDADev[wDevID].unixdev, CDROMPLAYMSF, &msf)) {
-+#else
-+ if (ioctl(CDADev[wDevID].unixdev, CDIOCPLAYMSF, &msf)) {
- #endif
-- , &msf)) {
- dprintf_cdaudio(stddeb,"CDAUDIO_mciPlay // device doesn't play !\n");
- return MCIERR_HARDWARE;
- }
-@@ -788,7 +783,7 @@
- #ifdef linux
- msf.cdmsf_min0, msf.cdmsf_sec0, msf.cdmsf_frame0,
- msf.cdmsf_min1, msf.cdmsf_sec1, msf.cdmsf_frame1
--#elif __FreeBSD__
-+#else
- msf.start_m, msf.start_s, msf.start_f,
- msf.end_m, msf.end_s, msf.end_f
- #endif
-@@ -814,17 +809,15 @@
- */
- static DWORD CDAUDIO_mciStop(UINT16 wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
- {
--#if defined(linux) || defined(__FreeBSD__)
-+#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__)
- dprintf_cdaudio(stddeb,"CDAUDIO_mciStop(%04X, %08lX, %p);\n",
- wDevID, dwFlags, lpParms);
- if (lpParms == NULL) return MCIERR_INTERNAL;
-- if (ioctl(CDADev[wDevID].unixdev,
- #ifdef linux
-- CDROMSTOP
--#elif __FreeBSD__
-- CDIOCSTOP
-+ if (ioctl(CDADev[wDevID].unixdev, CDROMSTOP)) return MCIERR_HARDWARE;
-+#else
-+ if (ioctl(CDADev[wDevID].unixdev, CDIOCSTOP, 0)) return MCIERR_HARDWARE;
- #endif
-- )) return MCIERR_HARDWARE;
- CDADev[wDevID].mode = MCI_MODE_STOP;
- if (dwFlags & MCI_NOTIFY) {
- dprintf_cdaudio(stddeb,
-@@ -844,17 +837,15 @@
- */
- static DWORD CDAUDIO_mciPause(UINT16 wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
- {
--#if defined(linux) || defined(__FreeBSD__)
-+#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__)
- dprintf_cdaudio(stddeb,"CDAUDIO_mciPause(%04X, %08lX, %p);\n",
- wDevID, dwFlags, lpParms);
- if (lpParms == NULL) return MCIERR_INTERNAL;
-- if (ioctl(CDADev[wDevID].unixdev,
- #ifdef linux
-- CDROMPAUSE
--#elif __FreeBSD__
-- CDIOCPAUSE
-+ if (ioctl(CDADev[wDevID].unixdev, CDROMPAUSE)) return MCIERR_HARDWARE;
-+#else
-+ if (ioctl(CDADev[wDevID].unixdev, CDIOCPAUSE, 0)) return MCIERR_HARDWARE;
- #endif
-- )) return MCIERR_HARDWARE;
- CDADev[wDevID].mode = MCI_MODE_PAUSE;
- if (dwFlags & MCI_NOTIFY) {
- dprintf_cdaudio(stddeb,
-@@ -874,17 +865,15 @@
- */
- static DWORD CDAUDIO_mciResume(UINT16 wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
- {
--#if defined(linux) || defined(__FreeBSD__)
-+#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__)
- dprintf_cdaudio(stddeb,"CDAUDIO_mciResume(%04X, %08lX, %p);\n",
- wDevID, dwFlags, lpParms);
- if (lpParms == NULL) return MCIERR_INTERNAL;
-- if (ioctl(CDADev[wDevID].unixdev,
- #ifdef linux
-- CDROMRESUME
--#elif __FreeBSD__
-- CDIOCRESUME
-+ if (ioctl(CDADev[wDevID].unixdev, CDROMRESUME)) return MCIERR_HARDWARE;
-+#else
-+ if (ioctl(CDADev[wDevID].unixdev, CDIOCRESUME, 0)) return MCIERR_HARDWARE;
- #endif
-- )) return MCIERR_HARDWARE;
- CDADev[wDevID].mode = MCI_MODE_STOP;
- if (dwFlags & MCI_NOTIFY) {
- dprintf_cdaudio(stddeb,
-@@ -904,19 +893,17 @@
- */
- static DWORD CDAUDIO_mciSeek(UINT16 wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms)
- {
--#if defined(linux) || defined(__FreeBSD__)
-+#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__)
- DWORD dwRet;
- MCI_PLAY_PARMS PlayParms;
- dprintf_cdaudio(stddeb,"CDAUDIO_mciSeek(%04X, %08lX, %p);\n",
- wDevID, dwFlags, lpParms);
- if (lpParms == NULL) return MCIERR_INTERNAL;
-- if (ioctl(CDADev[wDevID].unixdev,
- #ifdef linux
-- CDROMRESUME
--#elif __FreeBSD__
-- CDIOCRESUME
-+ if (ioctl(CDADev[wDevID].unixdev, CDROMRESUME)) {
-+#else
-+ if (ioctl(CDADev[wDevID].unixdev, CDIOCRESUME, 0)) {
- #endif
-- )) {
- perror("ioctl CDROMRESUME");
- return MCIERR_HARDWARE;
- }
-@@ -954,7 +941,7 @@
- */
- static DWORD CDAUDIO_mciSet(UINT16 wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms)
- {
--#if defined(linux) || defined(__FreeBSD__)
-+#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__)
- dprintf_cdaudio(stddeb,"CDAUDIO_mciSet(%04X, %08lX, %p);\n",
- wDevID, dwFlags, lpParms);
- if (lpParms == NULL) return MCIERR_INTERNAL;
-@@ -983,25 +970,27 @@
- if (dwFlags & MCI_SET_DOOR_OPEN) {
- dprintf_cdaudio(stddeb,
- "CDAUDIO_mciSet // MCI_SET_DOOR_OPEN !\n");
--#ifdef __FreeBSD__
-- if (ioctl(CDADev[wDevID].unixdev, CDIOCALLOW)) return MCIERR_HARDWARE;
-- if (ioctl(CDADev[wDevID].unixdev, CDIOCEJECT)) return MCIERR_HARDWARE;
-- if (ioctl(CDADev[wDevID].unixdev, CDIOCPREVENT)) return MCIERR_HARDWARE;
--#elif linux
-+#ifdef linux
- if (ioctl(CDADev[wDevID].unixdev, CDROMEJECT)) return MCIERR_HARDWARE;
-+#else
-+ if (ioctl(CDADev[wDevID].unixdev, CDIOCALLOW, 0)) return MCIERR_HARDWARE;
-+ if (ioctl(CDADev[wDevID].unixdev, CDIOCEJECT, 0)) return MCIERR_HARDWARE;
- #endif
- CDADev[wDevID].nTracks = 0;
- }
- if (dwFlags & MCI_SET_DOOR_CLOSED) {
- dprintf_cdaudio(stddeb,
- "CDAUDIO_mciSet // MCI_SET_DOOR_CLOSED !\n");
--#ifdef __FreeBSD__
-- if (ioctl(CDADev[wDevID].unixdev, CDIOCALLOW)) return MCIERR_HARDWARE;
-- if (ioctl(CDADev[wDevID].unixdev, CDIOCCLOSE)) return MCIERR_HARDWARE;
-- if (ioctl(CDADev[wDevID].unixdev, CDIOCPREVENT)) return MCIERR_HARDWARE;
--#elif linux
-+#ifdef linux
- if (ioctl(CDADev[wDevID].unixdev, CDROMEJECT)) return MCIERR_HARDWARE;
-+#else
-+#ifdef CDIOCCLOSE
-+ if (ioctl(CDADev[wDevID].unixdev, CDIOCCLOSE, 0)) return MCIERR_HARDWARE;
-+ if (ioctl(CDADev[wDevID].unixdev, CDIOCPREVENT, 0)) return MCIERR_HARDWARE;
- /* XXX should it be ",1" ??? */
-+#else
-+ return MCIERR_HARDWARE;
-+#endif
- #endif
- CDADev[wDevID].nTracks = 0;
- }
-@@ -1028,7 +1017,7 @@
- LONG CDAUDIO_DriverProc(DWORD dwDevID, HDRVR16 hDriv, WORD wMsg,
- DWORD dwParam1, DWORD dwParam2)
- {
--#if defined(linux) || defined(__FreeBSD__)
-+#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__)
- switch(wMsg) {
- case DRV_LOAD:
- return 1;
-@@ -1086,23 +1075,25 @@
- case MCI_SET_DOOR_OPEN:
- dprintf_cdaudio(stddeb,
- "CDAUDIO_DriverProc // MCI_SET_DOOR_OPEN !\n");
--#ifdef __FreeBSD__
-- if (ioctl(CDADev[dwDevID].unixdev, CDIOCALLOW)) return MCIERR_HARDWARE;
-- if (ioctl(CDADev[dwDevID].unixdev, CDIOCEJECT)) return MCIERR_HARDWARE;
-- if (ioctl(CDADev[dwDevID].unixdev, CDIOCPREVENT)) return MCIERR_HARDWARE;
--#elif linux
-+#ifdef linux
- if (ioctl(CDADev[dwDevID].unixdev, CDROMEJECT)) return MCIERR_HARDWARE;
-+#else
-+ if (ioctl(CDADev[dwDevID].unixdev, CDIOCALLOW, 0)) return MCIERR_HARDWARE;
-+ if (ioctl(CDADev[dwDevID].unixdev, CDIOCEJECT, 0)) return MCIERR_HARDWARE;
- #endif
- CDADev[dwDevID].nTracks = 0;
- return 0;
- case MCI_SET_DOOR_CLOSED:
- dprintf_cdaudio(stddeb,"CDAUDIO_DriverProc // MCI_SET_DOOR_CLOSED !\n");
--#ifdef __FreeBSD__
-- if (ioctl(CDADev[dwDevID].unixdev, CDIOCALLOW)) return MCIERR_HARDWARE;
-- if (ioctl(CDADev[dwDevID].unixdev, CDIOCCLOSE)) return MCIERR_HARDWARE;
-- if (ioctl(CDADev[dwDevID].unixdev, CDIOCPREVENT)) return MCIERR_HARDWARE;
--#elif linux
-+#ifdef linux
- if (ioctl(CDADev[dwDevID].unixdev, CDROMEJECT, 1)) return MCIERR_HARDWARE;
-+#else
-+#ifdef CDIOCCLOSE
-+ if (ioctl(CDADev[dwDevID].unixdev, CDIOCCLOSE, 0)) return MCIERR_HARDWARE;
-+ if (ioctl(CDADev[dwDevID].unixdev, CDIOCPREVENT, 0)) return MCIERR_HARDWARE;
-+#else
-+ return MCIERR_HARDWARE;
-+#endif
- #endif
- CDADev[dwDevID].nTracks = 0;
- return 0;
---- multimedia/midi.c.orig Sun Dec 21 14:14:43 1997
-+++ multimedia/midi.c Sun Mar 15 23:10:07 1998
-@@ -22,9 +22,12 @@
- #include "stddebug.h"
- #include "debug.h"
-
--#ifdef linux
-+#if defined(linux)
- #include <linux/soundcard.h>
--#elif __FreeBSD__
-+#elif defined(__NetBSD__)
-+#include <soundcard.h>
-+#include <sys/errno.h>
-+#elif defined(__FreeBSD__)
- #include <machine/soundcard.h>
- #include <sys/errno.h>
- #endif
---- multimedia/mixer.c.orig Sun Dec 21 14:14:43 1997
-+++ multimedia/mixer.c Sun Mar 15 22:55:34 1998
-@@ -14,9 +14,11 @@
- #include "driver.h"
- #include "mmsystem.h"
-
--#ifdef linux
-+#if defined(linux)
- #include <linux/soundcard.h>
--#elif __FreeBSD__
-+#elif defined(__NetBSD__)
-+#include <soundcard.h>
-+#elif defined(__FreeBSD__)
- #include <machine/soundcard.h>
- #endif
-
---- multimedia/mmaux.c.orig Sat Nov 1 14:06:35 1997
-+++ multimedia/mmaux.c Sun Mar 15 22:55:59 1998
-@@ -16,9 +16,11 @@
- #include "driver.h"
- #include "mmsystem.h"
-
--#ifdef linux
-+#if defined(linux)
- #include <linux/soundcard.h>
--#elif __FreeBSD__
-+#elif defined(__NetBSD__)
-+#include <soundcard.h>
-+#elif defined(__FreeBSD__)
- #include <machine/soundcard.h>
- #endif
-