diff options
author | tron <tron@pkgsrc.org> | 1998-06-18 23:48:52 +0000 |
---|---|---|
committer | tron <tron@pkgsrc.org> | 1998-06-18 23:48:52 +0000 |
commit | 3ce05840ffa4dc0fe1fd4a258a1efd039b64899c (patch) | |
tree | 759a6b8b5c6087d2dbb28d0aa0d782b45b99f8ae /emulators/wine/patches | |
parent | ac2e2b57de284f7c3fbeb2bb94cb16032bfdd1ba (diff) | |
download | pkgsrc-3ce05840ffa4dc0fe1fd4a258a1efd039b64899c.tar.gz |
Update Wine to 14-Jun-98 snapshot.
XXX Audio support is probably broken due to massive use of unsupported
XXX Linux stuff in the OSS interface which I commented out. However
XXX I don't have an application to test it.
Diffstat (limited to 'emulators/wine/patches')
-rw-r--r-- | emulators/wine/patches/patch-aa | 1389 | ||||
-rw-r--r-- | emulators/wine/patches/patch-ab | 32 | ||||
-rw-r--r-- | emulators/wine/patches/patch-ac | 726 | ||||
-rw-r--r-- | emulators/wine/patches/patch-ad | 17 | ||||
-rw-r--r-- | emulators/wine/patches/patch-ae | 21 | ||||
-rw-r--r-- | emulators/wine/patches/patch-af | 555 | ||||
-rw-r--r-- | emulators/wine/patches/patch-ag | 18 | ||||
-rw-r--r-- | emulators/wine/patches/patch-ah | 18 | ||||
-rw-r--r-- | emulators/wine/patches/patch-ai | 10 | ||||
-rw-r--r-- | emulators/wine/patches/patch-aj | 11 | ||||
-rw-r--r-- | emulators/wine/patches/patch-ak | 21 | ||||
-rw-r--r-- | emulators/wine/patches/patch-al | 72 | ||||
-rw-r--r-- | emulators/wine/patches/patch-am | 29 | ||||
-rw-r--r-- | emulators/wine/patches/patch-an | 18 |
14 files changed, 1536 insertions, 1401 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 - diff --git a/emulators/wine/patches/patch-ab b/emulators/wine/patches/patch-ab index 749318972ca..e921e14251f 100644 --- a/emulators/wine/patches/patch-ab +++ b/emulators/wine/patches/patch-ab @@ -1,12 +1,20 @@ ---- win32/console.c.orig Sun Feb 15 14:21:01 1998 -+++ win32/console.c Sun Mar 15 22:28:20 1998 -@@ -9,7 +9,9 @@ - #include <stdio.h> - #include <stdlib.h> - #include <unistd.h> -+#ifndef __NetBSD__ - #include <pty.h> -+#endif - #include <termios.h> - #include <sys/ioctl.h> - #include <sys/types.h> +--- 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 diff --git a/emulators/wine/patches/patch-ac b/emulators/wine/patches/patch-ac new file mode 100644 index 00000000000..b75623bf5ad --- /dev/null +++ b/emulators/wine/patches/patch-ac @@ -0,0 +1,726 @@ +--- configure.orig Sun Jun 14 16:45:59 1998 ++++ configure Thu Jun 18 22:00:27 1998 +@@ -2014,8 +2014,51 @@ + echo "$ac_t""no" 1>&6 + fi + ++echo $ac_n "checking for main in -lossaudio""... $ac_c" 1>&6 ++echo "configure:2019: 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 2027 "configure" ++#include "confdefs.h" ++ ++int main() { ++main() ++; return 0; } ++EOF ++if { (eval echo configure:2034: \"$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:2019: checking for iswalnum in -lw" >&5 ++echo "configure:2062: 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 +@@ -2023,7 +2066,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lw $LIBS" + cat > conftest.$ac_ext <<EOF +-#line 2027 "configure" ++#line 2070 "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 +@@ -2034,7 +2077,7 @@ + iswalnum() + ; return 0; } + EOF +-if { (eval echo configure:2038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ++if { (eval echo configure:2081: \"$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 +@@ -2062,7 +2105,7 @@ + fi + + echo $ac_n "checking for XF86DGAQueryExtension in -lXxf86dga""... $ac_c" 1>&6 +-echo "configure:2066: checking for XF86DGAQueryExtension in -lXxf86dga" >&5 ++echo "configure:2109: 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 +@@ -2070,7 +2113,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lXxf86dga $X_LIBS -lXext -lX11 $LIBS" + cat > conftest.$ac_ext <<EOF +-#line 2074 "configure" ++#line 2117 "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 +@@ -2081,7 +2124,7 @@ + XF86DGAQueryExtension() + ; return 0; } + EOF +-if { (eval echo configure:2085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ++if { (eval echo configure:2128: \"$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 +@@ -2109,17 +2152,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:2113: checking for $ac_hdr" >&5 ++echo "configure:2156: 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 2118 "configure" ++#line 2161 "configure" + #include "confdefs.h" + #include <$ac_hdr> + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:2123: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:2166: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -2147,12 +2190,12 @@ + + + echo $ac_n "checking "for Open Sound System"""... $ac_c" 1>&6 +-echo "configure:2151: checking "for Open Sound System"" >&5 ++echo "configure:2194: 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 2156 "configure" ++#line 2199 "configure" + #include "confdefs.h" + + #ifdef HAVE_SYS_SOUNDCARD_H +@@ -2172,7 +2215,27 @@ + + ; return 0; } + EOF +-if { (eval echo configure:2176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2219: \"$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 2227 "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:2239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_opensoundsystem="yes" + else +@@ -2183,6 +2246,8 @@ + fi + rm -f conftest* + fi ++rm -f conftest* ++fi + + echo "$ac_t""$ac_cv_c_opensoundsystem" 1>&6 + +@@ -2196,12 +2261,12 @@ + + + echo $ac_n "checking "for union semun"""... $ac_c" 1>&6 +-echo "configure:2200: checking "for union semun"" >&5 ++echo "configure:2265: 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 2205 "configure" ++#line 2270 "configure" + #include "confdefs.h" + #include <sys/types.h> + #include <sys/sem.h> +@@ -2209,7 +2274,7 @@ + union semun foo + ; return 0; } + EOF +-if { (eval echo configure:2213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_union_semun="yes" + else +@@ -2237,7 +2302,7 @@ + then + CFLAGS="$CFLAGS -Wall" + echo $ac_n "checking "for gcc strength-reduce bug"""... $ac_c" 1>&6 +-echo "configure:2241: checking "for gcc strength-reduce bug"" >&5 ++echo "configure:2306: 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 +@@ -2245,7 +2310,7 @@ + ac_cv_c_gcc_strength_bug="yes" + else + cat > conftest.$ac_ext <<EOF +-#line 2249 "configure" ++#line 2314 "configure" + #include "confdefs.h" + + int main(void) { +@@ -2256,7 +2321,7 @@ + exit( Array[1] != -2 ); + } + EOF +-if { (eval echo configure:2260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:2325: \"$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 +@@ -2279,7 +2344,7 @@ + + + echo $ac_n "checking "whether external symbols need an underscore prefix"""... $ac_c" 1>&6 +-echo "configure:2283: checking "whether external symbols need an underscore prefix"" >&5 ++echo "configure:2348: 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 +@@ -2291,14 +2356,14 @@ + .long 0 + EOF + cat > conftest.$ac_ext <<EOF +-#line 2295 "configure" ++#line 2360 "configure" + #include "confdefs.h" + extern int ac_test; + int main() { + if (ac_test) return 1 + ; return 0; } + EOF +-if { (eval echo configure:2302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ++if { (eval echo configure:2367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + ac_cv_c_extern_prefix="yes" + else +@@ -2322,7 +2387,7 @@ + + + echo $ac_n "checking "whether assembler accepts .string"""... $ac_c" 1>&6 +-echo "configure:2326: checking "whether assembler accepts .string"" >&5 ++echo "configure:2391: 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 +@@ -2332,14 +2397,14 @@ + .string "test" + EOF + cat > conftest.$ac_ext <<EOF +-#line 2336 "configure" ++#line 2401 "configure" + #include "confdefs.h" + + int main() { + + ; return 0; } + EOF +-if { (eval echo configure:2343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ++if { (eval echo configure:2408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + ac_cv_c_asm_string="yes" + else +@@ -2363,50 +2428,90 @@ + + + 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:2370: 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:2436: 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 2377 "configure" ++#line 2443 "configure" + #include "confdefs.h" + + int main() { + return 1 + ; return 0; } + EOF +-if { (eval echo configure:2384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ++if { (eval echo configure:2450: \"$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:2471: 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 2478 "configure" ++#include "confdefs.h" ++ ++int main() { ++return 1 ++; return 0; } ++EOF ++if { (eval echo configure:2485: \"$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 + + + ++ + echo $ac_n "checking "for reentrant X libraries"""... $ac_c" 1>&6 +-echo "configure:2410: checking "for reentrant X libraries"" >&5 ++echo "configure:2515: checking "for reentrant X libraries"" >&5 + if eval "test \"`echo '$''{'wine_cv_x_reentrant'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -2450,12 +2555,12 @@ + for ac_func in clone getpagesize memmove sigaltstack strerror stricmp tcgetattr timegm usleep wait4 waitpid + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:2454: checking for $ac_func" >&5 ++echo "configure:2559: 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 2459 "configure" ++#line 2564 "configure" + #include "confdefs.h" + /* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +@@ -2478,7 +2583,7 @@ + + ; return 0; } + EOF +-if { (eval echo configure:2482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ++if { (eval echo configure:2587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -2506,17 +2611,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:2510: checking for $ac_hdr" >&5 ++echo "configure:2615: 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 2515 "configure" ++#line 2620 "configure" + #include "confdefs.h" + #include <$ac_hdr> + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:2520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:2625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -2543,12 +2648,12 @@ + done + + echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 +-echo "configure:2547: checking whether stat file-mode macros are broken" >&5 ++echo "configure:2652: 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 2552 "configure" ++#line 2657 "configure" + #include "confdefs.h" + #include <sys/types.h> + #include <sys/stat.h> +@@ -2599,12 +2704,12 @@ + fi + + echo $ac_n "checking for working const""... $ac_c" 1>&6 +-echo "configure:2603: checking for working const" >&5 ++echo "configure:2708: 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 2608 "configure" ++#line 2713 "configure" + #include "confdefs.h" + + int main() { +@@ -2653,7 +2758,7 @@ + + ; return 0; } + EOF +-if { (eval echo configure:2657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2762: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_const=yes + else +@@ -2674,12 +2779,12 @@ + fi + + echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +-echo "configure:2678: checking for ANSI C header files" >&5 ++echo "configure:2783: 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 2683 "configure" ++#line 2788 "configure" + #include "confdefs.h" + #include <stdlib.h> + #include <stdarg.h> +@@ -2687,7 +2792,7 @@ + #include <float.h> + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:2691: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:2796: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -2704,7 +2809,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 2708 "configure" ++#line 2813 "configure" + #include "confdefs.h" + #include <string.h> + EOF +@@ -2722,7 +2827,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 2726 "configure" ++#line 2831 "configure" + #include "confdefs.h" + #include <stdlib.h> + EOF +@@ -2743,7 +2848,7 @@ + : + else + cat > conftest.$ac_ext <<EOF +-#line 2747 "configure" ++#line 2852 "configure" + #include "confdefs.h" + #include <ctype.h> + #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +@@ -2754,7 +2859,7 @@ + exit (0); } + + EOF +-if { (eval echo configure:2758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:2863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null + then + : + else +@@ -2778,12 +2883,12 @@ + fi + + echo $ac_n "checking for size_t""... $ac_c" 1>&6 +-echo "configure:2782: checking for size_t" >&5 ++echo "configure:2887: 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 2787 "configure" ++#line 2892 "configure" + #include "confdefs.h" + #include <sys/types.h> + #if STDC_HEADERS +@@ -2811,7 +2916,7 @@ + fi + + echo $ac_n "checking size of long long""... $ac_c" 1>&6 +-echo "configure:2815: checking size of long long" >&5 ++echo "configure:2920: 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 +@@ -2819,7 +2924,7 @@ + ac_cv_sizeof_long_long=0 + else + cat > conftest.$ac_ext <<EOF +-#line 2823 "configure" ++#line 2928 "configure" + #include "confdefs.h" + #include <stdio.h> + main() +@@ -2830,7 +2935,7 @@ + exit(0); + } + EOF +-if { (eval echo configure:2834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:2939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null + then + ac_cv_sizeof_long_long=`cat conftestval` + else +@@ -2854,12 +2959,12 @@ + if test "$ac_cv_header_sys_vfs_h" = "yes" + then + echo $ac_n "checking "whether sys/vfs.h defines statfs"""... $ac_c" 1>&6 +-echo "configure:2858: checking "whether sys/vfs.h defines statfs"" >&5 ++echo "configure:2963: checking "whether sys/vfs.h defines statfs"" >&5 + if eval "test \"`echo '$''{'wine_cv_sys_vfs_has_statfs'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <<EOF +-#line 2863 "configure" ++#line 2968 "configure" + #include "confdefs.h" + + #include <sys/types.h> +@@ -2876,7 +2981,7 @@ + + ; return 0; } + EOF +-if { (eval echo configure:2880: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + wine_cv_sys_vfs_has_statfs=yes + else +@@ -2903,12 +3008,12 @@ + if test "$ac_cv_header_sys_statfs_h" = "yes" + then + echo $ac_n "checking "whether sys/statfs.h defines statfs"""... $ac_c" 1>&6 +-echo "configure:2907: checking "whether sys/statfs.h defines statfs"" >&5 ++echo "configure:3012: checking "whether sys/statfs.h defines statfs"" >&5 + if eval "test \"`echo '$''{'wine_cv_sys_statfs_has_statfs'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <<EOF +-#line 2912 "configure" ++#line 3017 "configure" + #include "confdefs.h" + + #include <sys/types.h> +@@ -2923,7 +3028,7 @@ + + ; return 0; } + EOF +-if { (eval echo configure:2927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:3032: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + wine_cv_sys_statfs_has_statfs=yes + else +@@ -2950,12 +3055,12 @@ + if test "$ac_cv_header_sys_mount_h" = "yes" + then + echo $ac_n "checking "whether sys/mount.h defines statfs"""... $ac_c" 1>&6 +-echo "configure:2954: checking "whether sys/mount.h defines statfs"" >&5 ++echo "configure:3059: checking "whether sys/mount.h defines statfs"" >&5 + if eval "test \"`echo '$''{'wine_cv_sys_mount_has_statfs'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <<EOF +-#line 2959 "configure" ++#line 3064 "configure" + #include "confdefs.h" + + #include <sys/types.h> +@@ -2970,7 +3075,7 @@ + + ; return 0; } + EOF +-if { (eval echo configure:2974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:3079: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + wine_cv_sys_mount_has_statfs=yes + else +@@ -2996,7 +3101,7 @@ + + + echo $ac_n "checking "for statfs.f_bfree"""... $ac_c" 1>&6 +-echo "configure:3000: checking "for statfs.f_bfree"" >&5 ++echo "configure:3105: checking "for statfs.f_bfree"" >&5 + if eval "test \"`echo '$''{'wine_cv_statfs_bfree'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -3005,7 +3110,7 @@ + wine_cv_statfs_bfree=no + else + cat > conftest.$ac_ext <<EOF +-#line 3009 "configure" ++#line 3114 "configure" + #include "confdefs.h" + + #include <sys/types.h> +@@ -3032,7 +3137,7 @@ + + ; return 0; } + EOF +-if { (eval echo configure:3036: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:3141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + wine_cv_statfs_bfree=yes + else +@@ -3056,7 +3161,7 @@ + fi + + echo $ac_n "checking "for statfs.f_bavail"""... $ac_c" 1>&6 +-echo "configure:3060: checking "for statfs.f_bavail"" >&5 ++echo "configure:3165: checking "for statfs.f_bavail"" >&5 + if eval "test \"`echo '$''{'wine_cv_statfs_bavail'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -3065,7 +3170,7 @@ + wine_cv_statfs_bavail=no + else + cat > conftest.$ac_ext <<EOF +-#line 3069 "configure" ++#line 3174 "configure" + #include "confdefs.h" + + #include <sys/types.h> +@@ -3092,7 +3197,7 @@ + + ; return 0; } + EOF +-if { (eval echo configure:3096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:3201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + wine_cv_statfs_bavail=yes + else +@@ -3117,7 +3222,7 @@ + + + echo $ac_n "checking "for working sigaltstack"""... $ac_c" 1>&6 +-echo "configure:3121: checking "for working sigaltstack"" >&5 ++echo "configure:3226: checking "for working sigaltstack"" >&5 + if eval "test \"`echo '$''{'ac_cv_c_working_sigaltstack'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -3126,7 +3231,7 @@ + + else + cat > conftest.$ac_ext <<EOF +-#line 3130 "configure" ++#line 3235 "configure" + #include "confdefs.h" + + #include <stdio.h> +@@ -3164,7 +3269,7 @@ + } + + EOF +-if { (eval echo configure:3168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:3273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null + then + ac_cv_c_working_sigaltstack="yes" + else +@@ -3384,6 +3489,7 @@ + s%@LN_S@%$LN_S%g + s%@C2MAN@%$C2MAN%g + s%@DLLFLAGS@%$DLLFLAGS%g ++s%@LDSHARE@%$LDSHARE%g + /@MAKE_RULES@/r $MAKE_RULES + s%@MAKE_RULES@%%g + diff --git a/emulators/wine/patches/patch-ad b/emulators/wine/patches/patch-ad new file mode 100644 index 00000000000..1602ac8f6fe --- /dev/null +++ b/emulators/wine/patches/patch-ad @@ -0,0 +1,17 @@ +--- multimedia/audio.c.orig Sun May 31 18:14:49 1998 ++++ multimedia/audio.c Tue Jun 16 23:58:24 1998 +@@ -28,11 +28,14 @@ + + #ifdef HAVE_OSS + ++#ifdef __NetBSD__ ++#include <soundcard.h> + #ifdef HAVE_MACHINE_SOUNDCARD_H + # include <machine/soundcard.h> + #endif + #ifdef HAVE_SYS_SOUNDCARD_H + # include <sys/soundcard.h> ++#endif + #endif + + #define SOUND_DEV "/dev/dsp" diff --git a/emulators/wine/patches/patch-ae b/emulators/wine/patches/patch-ae new file mode 100644 index 00000000000..ce6887de523 --- /dev/null +++ b/emulators/wine/patches/patch-ae @@ -0,0 +1,21 @@ +--- multimedia/dsound.c.orig Sun May 31 18:14:50 1998 ++++ multimedia/dsound.c Wed Jun 17 00:00:14 1998 +@@ -45,13 +45,17 @@ + #include "debug.h" + + #ifdef HAVE_OSS +-# include <sys/ioctl.h> ++#include <sys/ioctl.h> ++#ifdef __NetBSD__ ++#include <soundcard.h> ++#else + # ifdef HAVE_MACHINE_SOUNDCARD_H + # include <machine/soundcard.h> + # endif + # ifdef HAVE_SYS_SOUNDCARD_H + # include <sys/soundcard.h> + # endif ++#endif + + static int audiofd = -1; + static LPDIRECTSOUND dsound = NULL; diff --git a/emulators/wine/patches/patch-af b/emulators/wine/patches/patch-af new file mode 100644 index 00000000000..12d2ac76b74 --- /dev/null +++ b/emulators/wine/patches/patch-af @@ -0,0 +1,555 @@ +--- multimedia/mcicda.c.orig Sun May 31 18:14:54 1998 ++++ multimedia/mcicda.c Wed Jun 17 19:00:35 1998 +@@ -15,6 +15,10 @@ + #include "mmsystem.h" + #include "debug.h" + ++#ifdef __NetBSD__ ++#include <soundcard.h> ++#include <sys/cdio.h> ++#else + #ifdef HAVE_LINUX_CDROM_H + # include <linux/cdrom.h> + #endif +@@ -24,12 +28,17 @@ + #ifdef HAVE_SYS_CDIO_H + # include <sys/cdio.h> + #endif ++#endif + ++#ifdef __NetBSD__ ++#define CDAUDIO_DEV "/dev/rcd0d" ++#else + #ifdef __FreeBSD__ + # define CDAUDIO_DEV "/dev/rcd0c" + #else + # define CDAUDIO_DEV "/dev/cdrom" + #endif ++#endif + + #ifdef SOUND_VERSION + # define IOCTL(a,b,c) ioctl(a,b,&c) +@@ -44,7 +53,7 @@ + #define CDFRAMES_PERMIN 4500 + #define SECONDS_PERMIN 60 + +-#if defined(linux) || defined(__FreeBSD__) ++#if defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__) + typedef struct { + int nUseCount; /* Incremented for each shared open */ + BOOL16 fShareable; /* TRUE if first open was shareable */ +@@ -55,7 +64,7 @@ + int unixdev; + #ifdef linux + struct cdrom_subchnl sc; +-#elif __FreeBSD__ ++#else + struct cd_sub_channel_info sc; + #endif + int mode; +@@ -80,28 +89,26 @@ + */ + static UINT16 CDAUDIO_GetNumberOfTracks(UINT16 wDevID) + { +-#if defined(linux) || defined(__FreeBSD__) ++#if defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__) + #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)) { + WARN(cdaudio, "(%04X) -- Error occured !\n", + wDevID); + return (WORD)-1; + } + #ifdef linux + CDADev[wDevID].nTracks = hdr.cdth_trk1; +-#elif __FreeBSD__ ++#else + CDADev[wDevID].nTracks = hdr.ending_track - hdr.starting_track + 1; + #endif + } +@@ -117,13 +124,13 @@ + */ + static BOOL32 CDAUDIO_GetTracksInfo(UINT16 wDevID) + { +-#if defined(linux) || defined(__FreeBSD__) ++#if defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__) + 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 +@@ -154,31 +161,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)) { + WARN(cdaudio, "error read entry\n"); + return FALSE; + } +@@ -186,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; +@@ -223,7 +228,7 @@ + */ + static DWORD CDAUDIO_mciOpen(UINT16 wDevID, DWORD dwFlags, LPMCI_OPEN_PARMS16 lpParms) + { +-#if defined(linux) || defined(__FreeBSD__) ++#if defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__) + TRACE(cdaudio,"(%04X, %08lX, %p);\n", + wDevID, dwFlags, lpParms); + if (lpParms == NULL) return MCIERR_INTERNAL; +@@ -286,7 +291,7 @@ + */ + static DWORD CDAUDIO_mciClose(UINT16 wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms) + { +-#if defined(linux) || defined(__FreeBSD__) ++#if defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__) + TRACE(cdaudio,"(%04X, %08lX, %p);\n", + wDevID, dwParam, lpParms); + if (CDADev[wDevID].lpdwTrackLen != NULL) free(CDADev[wDevID].lpdwTrackLen); +@@ -302,7 +307,7 @@ + static DWORD CDAUDIO_mciGetDevCaps(UINT16 wDevID, DWORD dwFlags, + LPMCI_GETDEVCAPS_PARMS lpParms) + { +-#if defined(linux) || defined(__FreeBSD__) ++#if defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__) + TRACE(cdaudio,"(%04X, %08lX, %p);\n", + wDevID, dwFlags, lpParms); + if (lpParms == NULL) return MCIERR_INTERNAL; +@@ -354,7 +359,7 @@ + */ + static DWORD CDAUDIO_mciInfo(UINT16 wDevID, DWORD dwFlags, LPMCI_INFO_PARMS16 lpParms) + { +-#if defined(linux) || defined(__FreeBSD__) ++#if defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__) + TRACE(cdaudio,"(%04X, %08lX, %p);\n", + wDevID, dwFlags, lpParms); + if (lpParms == NULL) return MCIERR_INTERNAL; +@@ -383,7 +388,7 @@ + static DWORD CDAUDIO_CalcFrame(UINT16 wDevID, DWORD dwFormatType, DWORD dwTime) + { + DWORD dwFrame = 0; +-#if defined(linux) || defined(__FreeBSD__) ++#if defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__) + UINT16 wTrack; + + TRACE(cdaudio,"(%04X, %08lX, %lu);\n", +@@ -429,9 +434,11 @@ + */ + static BOOL32 CDAUDIO_GetCDStatus(UINT16 wDevID) + { +-#if defined(linux) || defined(__FreeBSD__) ++#if defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__) + 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; +@@ -439,16 +446,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 +- )) { + TRACE(cdaudio,"opened or no_media !\n"); + CDADev[wDevID].mode = MCI_MODE_NOT_READY; + return TRUE; +@@ -456,25 +459,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 + WARN(cdaudio, "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; +@@ -482,7 +485,7 @@ + break; + #ifdef linux + case CDROM_AUDIO_PLAY: +-#elif __FreeBSD__ ++#else + case CD_AS_PLAY_IN_PROGRESS: + #endif + CDADev[wDevID].mode = MCI_MODE_PLAY; +@@ -490,7 +493,7 @@ + break; + #ifdef linux + case CDROM_AUDIO_PAUSED: +-#elif __FreeBSD__ ++#else + case CD_AS_PLAY_PAUSED: + #endif + CDADev[wDevID].mode = MCI_MODE_PAUSE; +@@ -500,7 +503,7 @@ + #ifdef linux + TRACE(cdaudio,"status=%02X !\n", + CDADev[wDevID].sc.cdsc_audiostatus); +-#elif __FreeBSD__ ++#else + TRACE(cdaudio,"status=%02X !\n", + CDADev[wDevID].sc.header.audio_status); + #endif +@@ -511,7 +514,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 + +@@ -524,7 +527,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 + TRACE(cdaudio,"%02u-%02u:%02u:%02u \n", + CDADev[wDevID].sc.what.position.track_number, + CDADev[wDevID].sc.what.position.absaddr.msf.minute, +@@ -551,7 +554,7 @@ + static DWORD CDAUDIO_CalcTime(UINT16 wDevID, DWORD dwFormatType, DWORD dwFrame) + { + DWORD dwTime = 0; +-#if defined(linux) || defined(__FreeBSD__) ++#if defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__) + UINT16 wTrack; + UINT16 wMinutes; + UINT16 wSeconds; +@@ -604,7 +607,7 @@ + */ + static DWORD CDAUDIO_mciStatus(UINT16 wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpParms) + { +-#if defined(linux) || defined(__FreeBSD__) ++#if defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__) + TRACE(cdaudio,"(%04X, %08lX, %p);\n", + wDevID, dwFlags, lpParms); + if (lpParms == NULL) return MCIERR_INTERNAL; +@@ -705,11 +708,11 @@ + */ + static DWORD CDAUDIO_mciPlay(UINT16 wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms) + { +-#if defined(linux) || defined(__FreeBSD__) ++#if defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__) + int start, end; + #ifdef linux + struct cdrom_msf msf; +-#elif __FreeBSD__ ++#else + struct ioc_play_msf msf; + #endif + +@@ -740,7 +743,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; +@@ -748,23 +751,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 +- )) { + WARN(cdaudio, "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)) { + WARN(cdaudio, "device doesn't play !\n"); + return MCIERR_HARDWARE; + } +@@ -772,7 +771,7 @@ + TRACE(cdaudio,"msf = %d:%d:%d %d:%d:%d\n", + msf.cdmsf_min0, msf.cdmsf_sec0, msf.cdmsf_frame0, + msf.cdmsf_min1, msf.cdmsf_sec1, msf.cdmsf_frame1); +-#elif __FreeBSD__ ++#else + TRACE(cdaudio,"msf = %d:%d:%d %d:%d:%d\n", + msf.start_m, msf.start_s, msf.start_f, + msf.end_m, msf.end_s, msf.end_f); +@@ -797,17 +796,15 @@ + */ + static DWORD CDAUDIO_mciStop(UINT16 wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms) + { +-#if defined(linux) || defined(__FreeBSD__) ++#if defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__) + TRACE(cdaudio,"(%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) { + TRACE(cdaudio, "MCI_NOTIFY_SUCCESSFUL %08lX !\n", +@@ -826,17 +823,15 @@ + */ + static DWORD CDAUDIO_mciPause(UINT16 wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms) + { +-#if defined(linux) || defined(__FreeBSD__) ++#if defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__) + TRACE(cdaudio,"(%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, CDROMRESUME)) return MCIERR_HARDWARE; ++#else ++ if (ioctl(CDADev[wDevID].unixdev, CDIOCRESUME, 0)) return MCIERR_HARDWARE; + #endif +- )) return MCIERR_HARDWARE; + CDADev[wDevID].mode = MCI_MODE_PAUSE; + if (dwFlags & MCI_NOTIFY) { + TRACE(cdaudio, "MCI_NOTIFY_SUCCESSFUL %08lX !\n", +@@ -855,17 +850,15 @@ + */ + static DWORD CDAUDIO_mciResume(UINT16 wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms) + { +-#if defined(linux) || defined(__FreeBSD__) ++#if defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__) + TRACE(cdaudio,"(%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) { + TRACE(cdaudio, "MCI_NOTIFY_SUCCESSFUL %08lX !\n", +@@ -884,19 +877,17 @@ + */ + static DWORD CDAUDIO_mciSeek(UINT16 wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms) + { +-#if defined(linux) || defined(__FreeBSD__) ++#if defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__) + DWORD dwRet; + MCI_PLAY_PARMS PlayParms; + TRACE(cdaudio,"(%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; + } +@@ -933,7 +924,7 @@ + */ + static DWORD CDAUDIO_mciSet(UINT16 wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms) + { +-#if defined(linux) || defined(__FreeBSD__) ++#if defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__) + TRACE(cdaudio,"(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms); + if (lpParms == NULL) return MCIERR_INTERNAL; + /* +@@ -959,24 +950,22 @@ + } + if (dwFlags & MCI_SET_DOOR_OPEN) { + TRACE(cdaudio, "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) { + TRACE(cdaudio, "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; + /* XXX should it be ",1" ??? */ ++#else ++ if (ioctl(CDADev[wDevID].unixdev, CDIOCALLOW, 0)) return MCIERR_HARDWARE; ++ if (ioctl(CDADev[wDevID].unixdev, CDIOCCLOSE, 0)) return MCIERR_HARDWARE; + #endif + CDADev[wDevID].nTracks = 0; + } +@@ -1002,7 +991,7 @@ + LONG CDAUDIO_DriverProc(DWORD dwDevID, HDRVR16 hDriv, WORD wMsg, + DWORD dwParam1, DWORD dwParam2) + { +-#if defined(linux) || defined(__FreeBSD__) ++#if defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__) + switch(wMsg) { + case DRV_LOAD: + return 1; +@@ -1059,23 +1048,22 @@ + (LPMCI_SEEK_PARMS)PTR_SEG_TO_LIN(dwParam2)); + case MCI_SET_DOOR_OPEN: + TRACE(cdaudio, "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: + TRACE(cdaudio,"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 ++ if (ioctl(CDADev[dwDevID].unixdev, CDIOCALLOW, 0)) return MCIERR_HARDWARE; ++ if (ioctl(CDADev[dwDevID].unixdev, CDIOCCLOSE, 0)) return MCIERR_HARDWARE; ++ if (ioctl(CDADev[dwDevID].unixdev, CDIOCPREVENT, 0)) return MCIERR_HARDWARE; + #endif + CDADev[dwDevID].nTracks = 0; + return 0; diff --git a/emulators/wine/patches/patch-ag b/emulators/wine/patches/patch-ag new file mode 100644 index 00000000000..a6bf0afd56f --- /dev/null +++ b/emulators/wine/patches/patch-ag @@ -0,0 +1,18 @@ +--- multimedia/mmaux.c.orig Sun May 31 18:14:58 1998 ++++ multimedia/mmaux.c Wed Jun 17 00:56:12 1998 +@@ -16,11 +16,15 @@ + #include "mmsystem.h" + #include "debug.h" + ++#ifdef __NetBSD__ ++#include <soundcard.h> ++#else + #ifdef HAVE_SYS_SOUNDCARD_H + # include <sys/soundcard.h> + #endif + #ifdef HAVE_MACHINE_SOUNDCARD_H + # include <machine/soundcard.h> ++#endif + #endif + + #define MIXER_DEV "/dev/mixer" diff --git a/emulators/wine/patches/patch-ah b/emulators/wine/patches/patch-ah new file mode 100644 index 00000000000..70a7adb8ec6 --- /dev/null +++ b/emulators/wine/patches/patch-ah @@ -0,0 +1,18 @@ +--- misc/lstr.c.orig Thu Jun 18 00:22:09 1998 ++++ misc/lstr.c Thu Jun 18 00:27:01 1998 +@@ -43,13 +43,13 @@ + /* FIXME: should probably get rid of wctype.h altogether */ + #include "casemap.h" + +-WCHAR _towupper(WCHAR code) ++WCHAR towupper(WCHAR code) + { + const WCHAR * ptr = uprtable[HIBYTE(code)]; + return ptr ? ptr[LOBYTE(code)] : code; + } + +-WCHAR _towlower(WCHAR code) ++WCHAR towlower(WCHAR code) + { + const WCHAR * ptr = lwrtable[HIBYTE(code)]; + return ptr ? ptr[LOBYTE(code)] : code; diff --git a/emulators/wine/patches/patch-ai b/emulators/wine/patches/patch-ai new file mode 100644 index 00000000000..29fba6805dd --- /dev/null +++ b/emulators/wine/patches/patch-ai @@ -0,0 +1,10 @@ +--- multimedia/mmsystem.c.orig Sat Jun 13 14:31:17 1998 ++++ multimedia/mmsystem.c Thu Jun 18 00:31:40 1998 +@@ -24,6 +24,7 @@ + #include "debug.h" + #include "xmalloc.h" + #include "callback.h" ++#include "debugtools.h" + + static int InstalledCount; + static int InstalledListLen; diff --git a/emulators/wine/patches/patch-aj b/emulators/wine/patches/patch-aj new file mode 100644 index 00000000000..805e9698e43 --- /dev/null +++ b/emulators/wine/patches/patch-aj @@ -0,0 +1,11 @@ +--- scheduler/sysdeps.c.orig Sun May 31 18:15:25 1998 ++++ scheduler/sysdeps.c Thu Jun 18 00:38:41 1998 +@@ -16,6 +16,8 @@ + #include <unistd.h> + #include "thread.h" + #include "winbase.h" ++#include "debug.h" ++#include "debugtools.h" + + /* Xlib critical section (FIXME: does not belong here) */ + CRITICAL_SECTION X11DRV_CritSection = { 0, }; diff --git a/emulators/wine/patches/patch-ak b/emulators/wine/patches/patch-ak new file mode 100644 index 00000000000..cdd7bb94d66 --- /dev/null +++ b/emulators/wine/patches/patch-ak @@ -0,0 +1,21 @@ +--- wine.ini.orig Sat May 30 17:29:40 1998 ++++ wine.ini Thu Jun 18 00:58:54 1998 +@@ -55,13 +55,13 @@ + Default = -adobe-times- + + [serialports] +-Com1=/dev/cua0 +-Com2=/dev/cua1 +-Com3=/dev/modem,38400 +-Com4=/dev/modem ++Com1=/dev/tty00 ++Com2=/dev/tty01 ++Com3=/dev/tty02 ++Com4=/dev/tty03 + + [parallelports] +-Lpt1=/dev/lp0 ++Lpt1=/dev/lpt0 + + [spooler] + LPT1:=|lpr diff --git a/emulators/wine/patches/patch-al b/emulators/wine/patches/patch-al new file mode 100644 index 00000000000..ec331e5af60 --- /dev/null +++ b/emulators/wine/patches/patch-al @@ -0,0 +1,72 @@ +--- configure.in.orig Sun Jun 14 16:46:00 1998 ++++ configure.in Thu Jun 18 21:57:10 1998 +@@ -73,6 +73,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 +@@ -96,7 +98,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 +@@ -178,23 +186,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 reentrant X libraries **** + dnl diff --git a/emulators/wine/patches/patch-am b/emulators/wine/patches/patch-am new file mode 100644 index 00000000000..6a7f4069266 --- /dev/null +++ b/emulators/wine/patches/patch-am @@ -0,0 +1,29 @@ +--- multimedia/init.c.orig Sat May 30 17:29:48 1998 ++++ multimedia/init.c Fri Jun 19 00:52:52 1998 +@@ -29,6 +29,7 @@ + #ifdef HAVE_OSS + int unixToWindowsDeviceType(int type) + { ++#ifndef __NetBSD__ + /* MOD_MIDIPORT output port + * MOD_SYNTH generic internal synth + * MOD_SQSYNTH square wave internal synth +@@ -46,6 +47,9 @@ + ERR(midi, "Cannot determine the type of this midi device. Assuming FM Synth\n"); + return MOD_FMSYNTH; + } ++#else ++ return MOD_FMSYNTH; ++#endif + } + #endif + +@@ -57,7 +61,7 @@ + */ + BOOL32 MULTIMEDIA_Init (void) + { +-#ifdef HAVE_OSS ++#if defined(HAVE_OSS) && !defined(__NetBSD__) + int i, status, numsynthdevs, nummididevs; + struct synth_info sinfo; + struct midi_info minfo; diff --git a/emulators/wine/patches/patch-an b/emulators/wine/patches/patch-an new file mode 100644 index 00000000000..7a79d573d30 --- /dev/null +++ b/emulators/wine/patches/patch-an @@ -0,0 +1,18 @@ +--- multimedia/mixer.c.orig Sun May 31 18:14:57 1998 ++++ multimedia/mixer.c Fri Jun 19 00:36:57 1998 +@@ -14,11 +14,15 @@ + #include "mmsystem.h" + #include "debug.h" + ++#ifdef __NetBSD__ ++#include <soundcard.h> ++#else + #ifdef HAVE_SYS_SOUNDCARD_H + # include <sys/soundcard.h> + #endif + #ifdef HAVE_MACHINE_SOUNDCARD_H + # include <machine/soundcard.h> ++#endif + #endif + + #define MIXER_DEV "/dev/mixer" |