diff options
-rw-r--r-- | emulators/wine/Makefile | 22 | ||||
-rw-r--r-- | emulators/wine/files/md5 | 4 | ||||
-rw-r--r-- | emulators/wine/patches/patch-ab | 28 | ||||
-rw-r--r-- | emulators/wine/patches/patch-ac | 585 | ||||
-rw-r--r-- | emulators/wine/patches/patch-af | 786 | ||||
-rw-r--r-- | emulators/wine/patches/patch-ah | 50 | ||||
-rw-r--r-- | emulators/wine/patches/patch-ai | 57 | ||||
-rw-r--r-- | emulators/wine/patches/patch-aj | 46 | ||||
-rw-r--r-- | emulators/wine/patches/patch-am | 32 | ||||
-rw-r--r-- | emulators/wine/patches/patch-ao | 162 | ||||
-rw-r--r-- | emulators/wine/patches/patch-ap | 10 | ||||
-rw-r--r-- | emulators/wine/patches/patch-aq | 14 | ||||
-rw-r--r-- | emulators/wine/pkg/COMMENT | 2 | ||||
-rw-r--r-- | emulators/wine/pkg/DESCR | 12 | ||||
-rw-r--r-- | emulators/wine/pkg/PLIST | 3 |
15 files changed, 765 insertions, 1048 deletions
diff --git a/emulators/wine/Makefile b/emulators/wine/Makefile index cf359a117f0..747e9ee8a2f 100644 --- a/emulators/wine/Makefile +++ b/emulators/wine/Makefile @@ -1,23 +1,23 @@ -# $NetBSD: Makefile,v 1.13 1998/11/12 23:20:09 frueauf Exp $ +# $NetBSD: Makefile,v 1.14 1998/12/14 02:17:10 tv Exp $ -DISTNAME= Wine-980614 -PKGNAME= wine-980614 -WRKSRC= ${WRKDIR}/${PKGNAME} +DISTNAME= Wine-981211 +PKGNAME= wine-981211 +WRKSRC= ${WRKDIR}/${PKGNAME} CATEGORIES= emulators MASTER_SITES= ${MASTER_SITE_SUNSITE} MASTER_SITE_SUBDIR= ALPHA/wine/development ONLY_FOR_ARCHS= i386 -MAINTAINER= mycroft@netbsd.org -HOMEPAGE= http://www.winehq.com/ +MAINTAINER= mycroft@netbsd.org +HOMEPAGE= http://www.winehq.com/ -DEPENDS+= xpm-3.4k:../../graphics/xpm +DEPENDS+= xpm-3.4k:../../graphics/xpm -CONFLICTS= wine-980215 +CONFLICTS= wine-980[26]* -USE_X11= yes -GNU_CONFIGURE= yes -CONFIGURE_ARGS+= --enable-dll +USE_X11= yes +GNU_CONFIGURE= yes +CONFIGURE_ARGS+= --enable-dll post-install: ${INSTALL_DATA} ${WRKSRC}/wine.ini ${PREFIX}/etc/wine.conf.example diff --git a/emulators/wine/files/md5 b/emulators/wine/files/md5 index c1b5375338f..2dadf82575e 100644 --- a/emulators/wine/files/md5 +++ b/emulators/wine/files/md5 @@ -1,3 +1,3 @@ -$NetBSD: md5,v 1.3 1998/08/07 13:21:29 agc Exp $ +$NetBSD: md5,v 1.4 1998/12/14 02:17:10 tv Exp $ -MD5 (Wine-980614.tar.gz) = 417297d1d84e1638320b3debf542c9a6 +MD5 (Wine-981211.tar.gz) = dc51f8faa2bef9053c5f61cd32fa2d62 diff --git a/emulators/wine/patches/patch-ab b/emulators/wine/patches/patch-ab index b3f052c3190..6ebc076df46 100644 --- a/emulators/wine/patches/patch-ab +++ b/emulators/wine/patches/patch-ab @@ -1,22 +1,22 @@ -$NetBSD: patch-ab,v 1.4 1998/08/07 10:40:35 agc Exp $ +$NetBSD: patch-ab,v 1.5 1998/12/14 02:17:10 tv Exp $ ---- 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) +--- Makefile.in.orig Fri Dec 11 08:26:26 1998 ++++ Makefile.in Sun Dec 13 17:33:34 1998 +@@ -153,7 +153,7 @@ + lib: $(LIBSUBDIRS) $(X11SUBDIRS) $(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) + wine wine.sym: $(LIBSUBDIRS) $(X11SUBDIRS) $(LIB_TARGET) $(EMUSUBDIRS) dummy +- $(CC) -o wine $(EMUOBJS) $(LIB_TARGET) $(ALT_LINK) $(LDOPTIONS) $(X_LIBS) $(XLIB) $(LIBS) ++ $(CC) -o wine $(EMUOBJS) -L. -lwine $(ALT_LINK) $(LDOPTIONS) $(X_LIBS) $(XLIB) $(LIBS) nm -n wine | grep -v _compiled >wine.sym + @echo "Wine build complete." - libwine.a: $(LIBOBJS) -@@ -117,7 +117,7 @@ +@@ -163,7 +163,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) + libwine.so.1.0: $(LIBOBJS) $(X11OBJS) +- $(CC) -shared -Wl,-soname,libwine.so -o$@ $(LIBOBJS) $(X11OBJS) $(LDOPTIONS) $(X_LIBS) $(XLIB) $(LIBS) ++ ${LDSHARE} -o$@ $(LIBOBJS) $(X11OBJS) $(LDOPTIONS) install_emu: install_lib - $(INSTALL_PROGRAM) wine $(bindir)/wine + [ -d $(bindir) ] || $(MKDIR) $(bindir) diff --git a/emulators/wine/patches/patch-ac b/emulators/wine/patches/patch-ac index ce7ca25f023..93451f27033 100644 --- a/emulators/wine/patches/patch-ac +++ b/emulators/wine/patches/patch-ac @@ -1,13 +1,13 @@ -$NetBSD: patch-ac,v 1.2 1998/08/07 10:40:35 agc Exp $ +$NetBSD: patch-ac,v 1.3 1998/12/14 02:17:10 tv Exp $ ---- configure.orig Sun Jun 14 16:45:59 1998 -+++ configure Thu Jun 18 22:00:27 1998 -@@ -2014,8 +2014,51 @@ +--- configure.orig Fri Dec 11 08:26:26 1998 ++++ configure Sun Dec 13 00:59:26 1998 +@@ -2037,8 +2037,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 ++echo "configure:2042: 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 @@ -15,14 +15,14 @@ $NetBSD: patch-ac,v 1.2 1998/08/07 10:40:35 agc Exp $ + ac_save_LIBS="$LIBS" +LIBS="-lossaudio $LIBS" +cat > conftest.$ac_ext <<EOF -+#line 2027 "configure" ++#line 2050 "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 ++if { (eval echo configure:2057: \"$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 @@ -50,98 +50,17 @@ $NetBSD: patch-ac,v 1.2 1998/08/07 10:40:35 agc Exp $ +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 +-echo "configure:2042: checking for iswalnum in -lw" >&5 ++echo "configure:2085: 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 +@@ -2489,7 +2532,27 @@ - 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 +-if { (eval echo configure:2493: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_opensoundsystem="yes" +else @@ -149,7 +68,7 @@ $NetBSD: patch-ac,v 1.2 1998/08/07 10:40:35 agc Exp $ + cat conftest.$ac_ext >&5 + rm -rf conftest* + cat > conftest.$ac_ext <<EOF -+#line 2227 "configure" ++#line 2544 "configure" +#include "confdefs.h" +#include <soundcard.h> +int main() { @@ -161,11 +80,11 @@ $NetBSD: patch-ac,v 1.2 1998/08/07 10:40:35 agc Exp $ + +; return 0; } +EOF -+if { (eval echo configure:2239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_opensoundsystem="yes" else -@@ -2183,6 +2246,8 @@ +@@ -2500,6 +2563,8 @@ fi rm -f conftest* fi @@ -174,110 +93,7 @@ $NetBSD: patch-ac,v 1.2 1998/08/07 10:40:35 agc Exp $ 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 @@ +@@ -2680,50 +2745,90 @@ DLLFLAGS="" @@ -285,26 +101,26 @@ $NetBSD: patch-ac,v 1.2 1998/08/07 10:40:35 agc Exp $ 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 +-echo "configure:2687: 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 ++echo "configure:2753: 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" +-#line 2694 "configure" ++#line 2760 "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 +-if { (eval echo configure:2701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ++if { (eval echo configure:2767: \"$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" @@ -330,21 +146,21 @@ $NetBSD: patch-ac,v 1.2 1998/08/07 10:40:35 agc Exp $ + 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 ++echo "configure:2788: 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" ++#line 2795 "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 ++if { (eval echo configure:2802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + ac_cv_c_dll_netbsd="yes" +else @@ -373,354 +189,15 @@ $NetBSD: patch-ac,v 1.2 1998/08/07 10:40:35 agc Exp $ + - 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 "checking "for reentrant libc"""... $ac_c" 1>&6 +-echo "configure:2727: checking "for reentrant libc"" >&5 ++echo "configure:2832: checking "for reentrant libc"" >&5 + if eval "test \"`echo '$''{'wine_cv_libc_reentrant'+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 +@@ -3849,6 +3954,7 @@ s%@C2MAN@%$C2MAN%g + s%@XLIB@%$XLIB%g s%@DLLFLAGS@%$DLLFLAGS%g +s%@LDSHARE@%$LDSHARE%g /@MAKE_RULES@/r $MAKE_RULES diff --git a/emulators/wine/patches/patch-af b/emulators/wine/patches/patch-af index ad37b1ee6c2..7ffce34788f 100644 --- a/emulators/wine/patches/patch-af +++ b/emulators/wine/patches/patch-af @@ -1,10 +1,10 @@ -$NetBSD: patch-af,v 1.3 1998/08/07 10:40:35 agc Exp $ +$NetBSD: patch-af,v 1.4 1998/12/14 02:17:11 tv Exp $ ---- multimedia/mcicda.c.orig Sun May 31 18:14:54 1998 -+++ multimedia/mcicda.c Fri Jun 19 19:30:10 1998 -@@ -15,6 +15,10 @@ - #include "mmsystem.h" +--- multimedia/mcicda.c.orig Thu Dec 10 04:03:00 1998 ++++ multimedia/mcicda.c Sun Dec 13 11:00:34 1998 +@@ -18,6 +18,10 @@ #include "debug.h" + #include "multimedia.h" +#ifdef __NetBSD__ +#include <soundcard.h> @@ -13,7 +13,7 @@ $NetBSD: patch-af,v 1.3 1998/08/07 10:40:35 agc Exp $ #ifdef HAVE_LINUX_CDROM_H # include <linux/cdrom.h> #endif -@@ -24,12 +28,17 @@ +@@ -30,12 +34,17 @@ #ifdef HAVE_SYS_CDIO_H # include <sys/cdio.h> #endif @@ -31,531 +31,497 @@ $NetBSD: patch-af,v 1.3 1998/08/07 10:40:35 agc Exp $ #ifdef SOUND_VERSION # define IOCTL(a,b,c) ioctl(a,b,&c) -@@ -44,7 +53,7 @@ +@@ -50,7 +59,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; + int nUseCount; /* Incremented for each shared open */ + BOOL16 fShareable; /* TRUE if first open was shareable */ +@@ -61,7 +70,7 @@ + int unixdev; #ifdef linux - struct cdrom_subchnl sc; --#elif __FreeBSD__ + struct cdrom_subchnl sc; +-#elif defined(__FreeBSD__) +#else - struct cd_sub_channel_info sc; + struct cd_sub_channel_info sc; #endif - int mode; -@@ -80,28 +89,26 @@ - */ - static UINT16 CDAUDIO_GetNumberOfTracks(UINT16 wDevID) + int cdMode; +@@ -103,27 +112,25 @@ + */ + static UINT16 CDAUDIO_GetNumberOfTracks(WINE_CDAUDIO* wcda) { -#if defined(linux) || defined(__FreeBSD__) +#if defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__) #ifdef linux - struct cdrom_tochdr hdr; --#elif __FreeBSD__ + struct cdrom_tochdr hdr; +-#elif defined(__FreeBSD__) +#else - struct ioc_toc_header hdr; + struct ioc_toc_header hdr; #endif - - if (CDADev[wDevID].nTracks == 0) { -- if (ioctl(CDADev[wDevID].unixdev, + + if (wcda->nTracks == 0) { +- if (ioctl(wcda->unixdev, #ifdef linux -- CDROMREADTOCHDR --#elif __FreeBSD__ -- CDIOREADTOCHEADER -+ if (ioctl(CDADev[wDevID].unixdev, CDROMREADTOCHDR, &hdr)) { +- CDROMREADTOCHDR +-#elif defined(__FreeBSD__) +- CDIOREADTOCHEADER ++ if (ioctl(wcda->unixdev, CDROMREADTOCHDR, &hdr)) { +#else -+ if (ioctl(CDADev[wDevID].unixdev, CDIOREADTOCHEADER, &hdr)) { ++ if (ioctl(wcda->unixdev, CDIOREADTOCHEADER, &hdr)) { #endif -- , &hdr)) { - WARN(cdaudio, "(%04X) -- Error occured !\n", - wDevID); - return (WORD)-1; - } +- , &hdr)) { + WARN(cdaudio, "(%p) -- Error occured !\n", wcda); + return (WORD)-1; + } #ifdef linux - CDADev[wDevID].nTracks = hdr.cdth_trk1; --#elif __FreeBSD__ + wcda->nTracks = hdr.cdth_trk1; +-#elif defined(__FreeBSD__) +#else - CDADev[wDevID].nTracks = hdr.ending_track - hdr.starting_track + 1; + wcda->nTracks = hdr.ending_track - hdr.starting_track + 1; #endif - } -@@ -117,13 +124,13 @@ - */ - static BOOL32 CDAUDIO_GetTracksInfo(UINT16 wDevID) + } +@@ -139,13 +146,13 @@ + */ + static BOOL32 CDAUDIO_GetTracksInfo(WINE_CDAUDIO* wcda) { -#if defined(linux) || defined(__FreeBSD__) +#if defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__) - int i, length; - int start, last_start = 0; - int total_length = 0; + int i, length; + int start, last_start = 0; + int total_length = 0; #ifdef linux - struct cdrom_tocentry entry; --#elif __FreeBSD__ + struct cdrom_tocentry entry; +-#elif defined(__FreeBSD__) +#else - struct ioc_read_toc_entry entry; - struct cd_toc_entry toc_buffer; + struct ioc_read_toc_entry entry; + struct cd_toc_entry toc_buffer; #endif -@@ -154,31 +161,29 @@ - if (i == CDADev[wDevID].nTracks) +@@ -177,31 +184,29 @@ + if (i == wcda->nTracks) #ifdef linux - entry.cdte_track = CDROM_LEADOUT; --#elif __FreeBSD__ + entry.cdte_track = CDROM_LEADOUT; +-#elif defined(__FreeBSD__) +#else #define LEADOUT 0xaa - entry.starting_track = LEADOUT; /* XXX */ + entry.starting_track = LEADOUT; /* XXX */ #endif - else + else #ifdef linux - entry.cdte_track = i + 1; --#elif __FreeBSD__ + entry.cdte_track = i + 1; +-#elif defined(__FreeBSD__) +#else - entry.starting_track = i + 1; + entry.starting_track = i + 1; #endif #ifdef linux - entry.cdte_format = CDROM_MSF; --#elif __FreeBSD__ + entry.cdte_format = CDROM_MSF; +-#elif defined(__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; + 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, +- if (ioctl(wcda->unixdev, #ifdef linux -- CDROMREADTOCENTRY --#elif __FreeBSD__ -- CDIOREADTOCENTRYS -+ if (ioctl(CDADev[wDevID].unixdev, CDROMREADTOCENTRY, &entry)) { +- CDROMREADTOCENTRY +-#elif defined(__FreeBSD__) +- CDIOREADTOCENTRYS ++ if (ioctl(wcda->unixdev, CDROMREADTOCENTRY, &entry)) { +#else -+ if (ioctl(CDADev[wDevID].unixdev, CDIOREADTOCENTRYS, &entry)) { ++ if (ioctl(wcda->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) +- , &entry)) { + WARN(cdaudio, "error read entry\n"); + return FALSE; + } +@@ -209,7 +214,7 @@ + start = CDFRAMES_PERSEC * (SECONDS_PERMIN * + entry.cdte_addr.msf.minute + entry.cdte_addr.msf.second) + + entry.cdte_addr.msf.frame; +-#elif defined(__FreeBSD__) ++#else + start = CDFRAMES_PERSEC * (SECONDS_PERMIN * + toc_buffer.addr.msf.minute + toc_buffer.addr.msf.second) + + toc_buffer.addr.msf.frame; +@@ -230,7 +235,7 @@ + wcda->lpbTrackFlags[i] = + #ifdef linux + (entry.cdte_adr << 4) | (entry.cdte_ctrl & 0x0f); +-#elif defined(__FreeBSD__) ++#else + (toc_buffer.addr_type << 4) | (toc_buffer.control & 0x0f); + #endif + TRACE(cdaudio, "track #%u flags=%02x\n", i + 1, wcda->lpbTrackFlags[i]); +@@ -248,7 +253,7 @@ + */ + static DWORD CDAUDIO_mciOpen(UINT16 wDevID, DWORD dwFlags, LPMCI_OPEN_PARMS32A lpOpenParms) { -#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 @@ - */ + DWORD dwDeviceID; + WINE_CDAUDIO* wcda; + +@@ -328,7 +333,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 @@ + WINE_CDAUDIO* wcda = CDAUDIO_mciGetOpenDrv(wDevID); + + TRACE(cdaudio,"(%04X, %08lX, %p);\n", wDevID, dwParam, lpParms); +@@ -351,7 +356,7 @@ static DWORD CDAUDIO_mciGetDevCaps(UINT16 wDevID, DWORD dwFlags, - LPMCI_GETDEVCAPS_PARMS lpParms) + 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 @@ - */ + TRACE(cdaudio,"(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms); + + if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; +@@ -403,7 +408,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 ret = 0; + LPSTR str = 0; + WINE_CDAUDIO* wcda = CDAUDIO_mciGetOpenDrv(wDevID); +@@ -445,7 +450,7 @@ + static DWORD CDAUDIO_CalcFrame(WINE_CDAUDIO* wcda, DWORD dwTime) { - DWORD dwFrame = 0; + DWORD dwFrame = 0; -#if defined(linux) || defined(__FreeBSD__) +#if defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__) - UINT16 wTrack; + UINT16 wTrack; - TRACE(cdaudio,"(%04X, %08lX, %lu);\n", -@@ -429,9 +434,11 @@ - */ - static BOOL32 CDAUDIO_GetCDStatus(UINT16 wDevID) + TRACE(cdaudio,"(%p, %08lX, %lu);\n", wcda, wcda->dwTimeFormat, dwTime); +@@ -487,9 +492,9 @@ + */ + static BOOL32 CDAUDIO_GetCDStatus(WINE_CDAUDIO* wcda) { -#if defined(linux) || defined(__FreeBSD__) +#if defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__) - int oldmode = CDADev[wDevID].mode; + int oldmode = wcda->cdMode; -#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)) { ++#if defined(__FreeBSD__) || defined(__NetBSD__) + struct ioc_read_subchannel read_sc; + + read_sc.address_format = CD_MSF_FORMAT; +@@ -500,13 +505,11 @@ + #elif linux + wcda->sc.cdsc_format = CDROM_MSF; #endif -- )) { - TRACE(cdaudio,"opened or no_media !\n"); - CDADev[wDevID].mode = MCI_MODE_NOT_READY; - return TRUE; -@@ -456,25 +459,25 @@ - switch ( +- if (ioctl(wcda->unixdev, #ifdef linux - CDADev[wDevID].sc.cdsc_audiostatus --#elif __FreeBSD__ -+#else - CDADev[wDevID].sc.header.audio_status - #endif - ) { +- CDROMSUBCHNL, &wcda->sc +-#elif defined(__FreeBSD__) +- CDIOCREADSUBCHANNEL, &read_sc ++ if (ioctl(wcda->unixdev, CDROMSUBCHNL, &wcda->sc)) { ++#else ++ if (ioctl(wcda->unixdev, CDIOCREADSUBCHANNEL, &read_sc)) { + #endif +- )) { + TRACE(cdaudio,"opened or no_media !\n"); + wcda->cdMode = MCI_MODE_OPEN; /* was NOT_READY */ + return TRUE; +@@ -514,13 +517,13 @@ + switch ( #ifdef linux - case CDROM_AUDIO_INVALID: --#elif __FreeBSD__ + wcda->sc.cdsc_audiostatus +-#elif defined(__FreeBSD__) +#else - case CD_AS_AUDIO_INVALID: + wcda->sc.header.audio_status #endif - WARN(cdaudio, "device doesn't support status, returning NOT_READY.\n"); + ) { #ifdef linux - CDADev[wDevID].mode = MCI_MODE_NOT_READY; --#elif __FreeBSD__ + case CDROM_AUDIO_INVALID: +-#elif defined(__FreeBSD__) +#else - CDADev[wDevID].mode = MCI_MODE_STOP; + case CD_AS_AUDIO_INVALID: #endif - break; + WARN(cdaudio, "device doesn't support status, using MCI status.\n"); +@@ -528,7 +531,7 @@ + break; #ifdef linux - case CDROM_AUDIO_NO_STATUS: --#elif __FreeBSD__ + case CDROM_AUDIO_NO_STATUS: +-#elif defined(__FreeBSD__) +#else - case CD_AS_NO_STATUS: + case CD_AS_NO_STATUS: #endif - CDADev[wDevID].mode = MCI_MODE_STOP; -@@ -482,7 +485,7 @@ - break; + wcda->cdMode = MCI_MODE_STOP; +@@ -536,7 +539,7 @@ + break; #ifdef linux - case CDROM_AUDIO_PLAY: --#elif __FreeBSD__ + case CDROM_AUDIO_PLAY: +-#elif defined(__FreeBSD__) +#else - case CD_AS_PLAY_IN_PROGRESS: + case CD_AS_PLAY_IN_PROGRESS: #endif - CDADev[wDevID].mode = MCI_MODE_PLAY; -@@ -490,7 +493,7 @@ - break; + wcda->cdMode = MCI_MODE_PLAY; +@@ -544,7 +547,7 @@ + break; #ifdef linux - case CDROM_AUDIO_PAUSED: --#elif __FreeBSD__ + case CDROM_AUDIO_PAUSED: +-#elif defined(__FreeBSD__) +#else - case CD_AS_PLAY_PAUSED: + case CD_AS_PLAY_PAUSED: #endif - CDADev[wDevID].mode = MCI_MODE_PAUSE; -@@ -500,7 +503,7 @@ + wcda->cdMode = MCI_MODE_PAUSE; +@@ -554,7 +557,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) + TRACE(cdaudio,"status=%02X !\n", + wcda->sc.cdsc_audiostatus); +-#elif defined(__FreeBSD__) ++#else + TRACE(cdaudio,"status=%02X !\n", + wcda->sc.header.audio_status); + #endif +@@ -565,7 +568,7 @@ + CDFRAMES_PERMIN * wcda->sc.cdsc_absaddr.msf.minute + + CDFRAMES_PERSEC * wcda->sc.cdsc_absaddr.msf.second + + wcda->sc.cdsc_absaddr.msf.frame; +-#elif defined(__FreeBSD__) ++#else + wcda->nCurTrack = wcda->sc.what.position.track_number; + wcda->dwCurFrame = + CDFRAMES_PERMIN * wcda->sc.what.position.absaddr.msf.minute + +@@ -578,7 +581,7 @@ + wcda->sc.cdsc_absaddr.msf.minute, + wcda->sc.cdsc_absaddr.msf.second, + wcda->sc.cdsc_absaddr.msf.frame); +-#elif defined(__FreeBSD__) ++#else + TRACE(cdaudio,"%02u-%02u:%02u:%02u \n", + wcda->sc.what.position.track_number, + wcda->sc.what.position.absaddr.msf.minute, +@@ -605,7 +608,7 @@ + static DWORD CDAUDIO_CalcTime(WINE_CDAUDIO* wcda, DWORD dwFrame) { - DWORD dwTime = 0; + 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 @@ - */ + UINT16 wTrack; + UINT16 wMinutes; + UINT16 wSeconds; +@@ -651,7 +654,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 @@ - */ + WINE_CDAUDIO* wcda = CDAUDIO_mciGetOpenDrv(wDevID); + DWORD ret = 0; + +@@ -759,13 +762,13 @@ + */ 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; + int start, end; + WINE_CDAUDIO* wcda = CDAUDIO_mciGetOpenDrv(wDevID); + DWORD ret = 0; #ifdef linux - struct cdrom_msf msf; --#elif __FreeBSD__ + struct cdrom_msf msf; +-#elif defined(__FreeBSD__) +#else - struct ioc_play_msf msf; + 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, + +@@ -796,7 +799,7 @@ + msf.cdmsf_min1 = end / CDFRAMES_PERMIN; + msf.cdmsf_sec1 = (end % CDFRAMES_PERMIN) / CDFRAMES_PERSEC; + msf.cdmsf_frame1 = end % CDFRAMES_PERSEC; +-#elif defined(__FreeBSD__) ++#else + msf.start_m = start / CDFRAMES_PERMIN; + msf.start_s = (start % CDFRAMES_PERMIN) / CDFRAMES_PERSEC; + msf.start_f = start % CDFRAMES_PERSEC; +@@ -804,23 +807,19 @@ + msf.end_s = (end % CDFRAMES_PERMIN) / CDFRAMES_PERSEC; + msf.end_f = end % CDFRAMES_PERSEC; + #endif +- if (ioctl(wcda->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, +- CDROMSTART +-#elif defined(__FreeBSD__) +- CDIOCSTART ++ if (ioctl(wcda->unixdev, CDROMSTART)) { ++#else ++ if (ioctl(wcda->unixdev, CDIOCSTART, NULL)) { + #endif +- )) { + WARN(cdaudio, "motor doesn't start !\n"); + return MCIERR_HARDWARE; + } +- if (ioctl(wcda->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 @@ - */ +- CDROMPLAYMSF +-#elif defined(__FreeBSD__) +- CDIOCPLAYMSF ++ if (ioctl(wcda->unixdev, CDROMPLAYMSF, &msf)) { ++#else ++ if (ioctl(wcda->unixdev, CDIOCPLAYMSF, &msf)) { + #endif +- , &msf)) { + WARN(cdaudio, "device doesn't play !\n"); + return MCIERR_HARDWARE; + } +@@ -828,7 +827,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 defined(__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); +@@ -854,20 +853,19 @@ + */ 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, + WINE_CDAUDIO* wcda = CDAUDIO_mciGetOpenDrv(wDevID); + + TRACE(cdaudio,"(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms); + + if (wcda == NULL) return MCIERR_INVALID_DEVICE_ID; + +- if (ioctl(wcda->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 @@ - */ +- CDROMSTOP +-#elif defined(__FreeBSD__) +- CDIOCSTOP ++ if (ioctl(wcda->unixdev, CDROMSTOP)) ++#else ++ if (ioctl(wcda->unixdev, CDIOCSTOP, NULL)) + #endif +- )) return MCIERR_HARDWARE; ++ return MCIERR_HARDWARE; + wcda->mciMode = MCI_MODE_STOP; + if (lpParms && (dwFlags & MCI_NOTIFY)) { + TRACE(cdaudio, "MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback); +@@ -885,20 +883,19 @@ + */ 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, + WINE_CDAUDIO* wcda = CDAUDIO_mciGetOpenDrv(wDevID); + + TRACE(cdaudio,"(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms); + + if (wcda == NULL) return MCIERR_INVALID_DEVICE_ID; + +- if (ioctl(wcda->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 @@ - */ +- CDROMPAUSE +-#elif defined(__FreeBSD__) +- CDIOCPAUSE ++ if (ioctl(wcda->unixdev, CDROMPAUSE)) ++#else ++ if (ioctl(wcda->unixdev, CDIOCPAUSE, NULL)) + #endif +- )) return MCIERR_HARDWARE; ++ return MCIERR_HARDWARE; + wcda->mciMode = MCI_MODE_PAUSE; + if (lpParms && (dwFlags & MCI_NOTIFY)) { + TRACE(cdaudio, "MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback); +@@ -916,20 +913,19 @@ + */ 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, + WINE_CDAUDIO* wcda = CDAUDIO_mciGetOpenDrv(wDevID); + + TRACE(cdaudio,"(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms); + + if (wcda == NULL) return MCIERR_INVALID_DEVICE_ID; + +- if (ioctl(wcda->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 @@ - */ +- CDROMRESUME +-#elif defined(__FreeBSD__) +- CDIOCRESUME ++ if (ioctl(wcda->unixdev, CDROMRESUME)) ++#else ++ if (ioctl(wcda->unixdev, CDIOCRESUME, NULL)) + #endif +- )) return MCIERR_HARDWARE; ++ return MCIERR_HARDWARE; + wcda->mciMode = MCI_MODE_STOP; + if (lpParms && (dwFlags & MCI_NOTIFY)) { + TRACE(cdaudio, "MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback); +@@ -947,7 +943,7 @@ + */ 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, + DWORD dwRet; + MCI_PLAY_PARMS PlayParms; + WINE_CDAUDIO* wcda = CDAUDIO_mciGetOpenDrv(wDevID); +@@ -957,13 +953,11 @@ + if (wcda == NULL) return MCIERR_INVALID_DEVICE_ID; + if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; + +- if (ioctl(wcda->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 @@ - */ +- CDROMRESUME +-#elif defined(__FreeBSD__) +- CDIOCRESUME ++ if (ioctl(wcda->unixdev, CDROMRESUME)) { ++#else ++ if (ioctl(wcda->unixdev, CDIOCRESUME, NULL)) { + #endif +- )) { + perror("ioctl CDROMRESUME"); + return MCIERR_HARDWARE; + } +@@ -1004,16 +998,16 @@ + + if (wcda == NULL) return MCIERR_INVALID_DEVICE_ID; + +-#ifdef __FreeBSD__ +- if (ioctl(wcda->unixdev, CDIOCALLOW)) return MCIERR_HARDWARE; ++ #if defined(__FreeBSD__) || defined(__NetBSD__) ++ if (ioctl(wcda->unixdev, CDIOCALLOW, NULL)) return MCIERR_HARDWARE; + if (open) { +- if (ioctl(wcda->unixdev, CDIOCEJECT)) return MCIERR_HARDWARE; ++ if (ioctl(wcda->unixdev, CDIOCEJECT, NULL)) return MCIERR_HARDWARE; + wcda->mciMode = MCI_MODE_OPEN; + } else { +- if (ioctl(wcda->unixdev, CDIOCCLOSE)) return MCIERR_HARDWARE; ++ if (ioctl(wcda->unixdev, CDIOCCLOSE, NULL)) return MCIERR_HARDWARE; + wcda->mciMode = MCI_MODE_STOP; + } +- if (ioctl(wcda->unixdev, CDIOCPREVENT)) return MCIERR_HARDWARE; ++ if (ioctl(wcda->unixdev, CDIOCPREVENT, NULL)) return MCIERR_HARDWARE; + #elif linux + if (open) { + if (ioctl(wcda->unixdev, CDROMEJECT)) return MCIERR_HARDWARE; +@@ -1032,7 +1026,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,24 @@ - } - 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; -+#ifdef CDIOCCLOSE -+ if (ioctl(CDADev[wDevID].unixdev, CDIOCCLOSE, 0)) return MCIERR_HARDWARE; -+#endif - #endif - CDADev[wDevID].nTracks = 0; - } -@@ -1002,7 +993,7 @@ - LONG CDAUDIO_DriverProc(DWORD dwDevID, HDRVR16 hDriv, WORD wMsg, - DWORD dwParam1, DWORD dwParam2) + WINE_CDAUDIO* wcda = CDAUDIO_mciGetOpenDrv(wDevID); + + TRACE(cdaudio,"(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms); +@@ -1087,7 +1081,7 @@ + LONG MCICDAUDIO_DriverProc32(DWORD dwDevID, HDRVR16 hDriv, DWORD 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 +1050,24 @@ - (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; -+#ifdef CDIOCCLOSE -+ if (ioctl(CDADev[dwDevID].unixdev, CDIOCCLOSE, 0)) return MCIERR_HARDWARE; -+#endif -+ if (ioctl(CDADev[dwDevID].unixdev, CDIOCPREVENT, 0)) return MCIERR_HARDWARE; - #endif - CDADev[dwDevID].nTracks = 0; - return 0; + switch(wMsg) { + case DRV_LOAD: return 1; + case DRV_FREE: return 1; diff --git a/emulators/wine/patches/patch-ah b/emulators/wine/patches/patch-ah index d9c064ce314..6d415c6e911 100644 --- a/emulators/wine/patches/patch-ah +++ b/emulators/wine/patches/patch-ah @@ -1,20 +1,36 @@ -$NetBSD: patch-ah,v 1.2 1998/08/07 10:40:36 agc Exp $ +$NetBSD: patch-ah,v 1.3 1998/12/14 02:17:11 tv Exp $ ---- 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" +--- console/xterm.c.orig Sun Dec 13 08:49:50 1998 ++++ console/xterm.c Sun Dec 13 08:50:33 1998 +@@ -116,9 +116,9 @@ + *slave = fds; --WCHAR _towupper(WCHAR code) -+WCHAR towupper(WCHAR code) - { - const WCHAR * ptr = uprtable[HIBYTE(code)]; - return ptr ? ptr[LOBYTE(code)] : code; - } + if (term != NULL) +- tcsetattr((*slave)->_fileno, TCSANOW, term); ++ tcsetattr(fileno(*slave), TCSANOW, term); + if (winsize != NULL) +- ioctl((*slave)->_fileno, TIOCSWINSZ, winsize); ++ ioctl(fileno(*slave), TIOCSWINSZ, winsize); + + if (name != NULL) + strcpy(name, pts_name); +@@ -143,8 +143,8 @@ + return FALSE; --WCHAR _towlower(WCHAR code) -+WCHAR towlower(WCHAR code) - { - const WCHAR * ptr = lwrtable[HIBYTE(code)]; - return ptr ? ptr[LOBYTE(code)] : code; + if ((*pid=fork()) == 0) { +- tcsetattr((*slave)->_fileno, TCSADRAIN, &term); +- sprintf(buf, "-Sxx%d", (*master)->_fileno); ++ tcsetattr(fileno(*slave), TCSADRAIN, &term); ++ sprintf(buf, "-Sxx%d", fileno(*master)); + execlp("xterm", "xterm", buf, NULL); + ERR(console, "error creating AllocConsole xterm\n"); + exit(1); +@@ -168,7 +168,7 @@ + } + } + term.c_lflag |= ECHO; +- tcsetattr((*master)->_fileno, TCSADRAIN, &term); ++ tcsetattr(fileno(*master), TCSADRAIN, &term); + + return TRUE; + } diff --git a/emulators/wine/patches/patch-ai b/emulators/wine/patches/patch-ai index e36dfa2ca95..c7efb34f411 100644 --- a/emulators/wine/patches/patch-ai +++ b/emulators/wine/patches/patch-ai @@ -1,12 +1,49 @@ -$NetBSD: patch-ai,v 1.2 1998/08/07 10:40:36 agc Exp $ +$NetBSD: patch-ai,v 1.3 1998/12/14 02:17:11 tv Exp $ ---- 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" +--- multimedia/mcimidi.c.orig Sun Dec 13 11:14:40 1998 ++++ multimedia/mcimidi.c Sun Dec 13 11:18:04 1998 +@@ -72,6 +72,7 @@ + * MCI MIDI implemantation * + *======================================================================*/ - static int InstalledCount; - static int InstalledListLen; ++#ifndef __NetBSD__ + /************************************************************************** + * MIDI_mciGetOpenDev [internal] + */ +@@ -1461,6 +1462,7 @@ + } + return ret; + } ++#endif + + /*======================================================================* + * MIDI entry points * +@@ -1483,6 +1485,20 @@ + case DRV_CONFIGURE: MessageBox16(0, "Sample Midi Linux Driver !", "MMLinux Driver", MB_OK); return 1; + case DRV_INSTALL: return DRVCNF_RESTART; + case DRV_REMOVE: return DRVCNF_RESTART; ++#ifdef __NetBSD__ ++ case MCI_OPEN_DRIVER: ++ case MCI_CLOSE_DRIVER: ++ case MCI_PLAY: ++ case MCI_RECORD: ++ case MCI_STOP: ++ case MCI_SET: ++ case MCI_PAUSE: ++ case MCI_RESUME: ++ case MCI_STATUS: ++ case MCI_GETDEVCAPS: ++ case MCI_INFO: ++ case MCI_SEEK: ++#else + case MCI_OPEN_DRIVER: return MIDI_mciOpen (dwDevID, dwParam1, (LPMCI_OPEN_PARMS32A) dwParam2); + case MCI_CLOSE_DRIVER: return MIDI_mciClose (dwDevID, dwParam1, (LPMCI_GENERIC_PARMS) dwParam2); + case MCI_PLAY: return MIDI_mciPlay (dwDevID, dwParam1, (LPMCI_PLAY_PARMS) dwParam2); +@@ -1495,6 +1511,7 @@ + case MCI_GETDEVCAPS: return MIDI_mciGetDevCaps(dwDevID, dwParam1, (LPMCI_GETDEVCAPS_PARMS)dwParam2); + case MCI_INFO: return MIDI_mciInfo (dwDevID, dwParam1, (LPMCI_INFO_PARMS32A) dwParam2); + case MCI_SEEK: return MIDI_mciSeek (dwDevID, dwParam1, (LPMCI_SEEK_PARMS) dwParam2); ++#endif + case MCI_LOAD: + case MCI_SAVE: + case MCI_FREEZE: diff --git a/emulators/wine/patches/patch-aj b/emulators/wine/patches/patch-aj index 90ec13e8fb5..1ebede928da 100644 --- a/emulators/wine/patches/patch-aj +++ b/emulators/wine/patches/patch-aj @@ -1,13 +1,37 @@ -$NetBSD: patch-aj,v 1.2 1998/08/07 10:40:36 agc Exp $ +$NetBSD: patch-aj,v 1.3 1998/12/14 02:17:11 tv Exp $ ---- 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" +--- multimedia/midi.c.orig Sun Dec 13 11:27:17 1998 ++++ multimedia/midi.c Sun Dec 13 11:31:30 1998 +@@ -108,7 +108,7 @@ + /*======================================================================* + * Low level MIDI implemantation * + *======================================================================*/ +- ++#ifndef __NetBSD__ + /************************************************************************** + * MIDI_NotifyClient [internal] + */ +@@ -1482,6 +1482,7 @@ + */ + return MMSYSERR_NOTENABLED; + } ++#endif - /* Xlib critical section (FIXME: does not belong here) */ - CRITICAL_SECTION X11DRV_CritSection = { 0, }; + /*======================================================================* + * MIDI entry points * +@@ -1497,6 +1498,7 @@ + wDevID, wMsg, dwUser, dwParam1, dwParam2); + + switch (wMsg) { ++#ifndef __NetBSD__ + case MODM_OPEN: + return modOpen(wDevID, (LPMIDIOPENDESC)dwParam1, dwParam2); + case MODM_CLOSE: +@@ -1519,6 +1521,7 @@ + return 0; + case MODM_RESET: + return modReset(wDevID); ++#endif + default: + TRACE(midi, "Unsupported message\n"); + } diff --git a/emulators/wine/patches/patch-am b/emulators/wine/patches/patch-am index fd9eaa41d16..8a4ef07fc78 100644 --- a/emulators/wine/patches/patch-am +++ b/emulators/wine/patches/patch-am @@ -1,31 +1,31 @@ -$NetBSD: patch-am,v 1.2 1998/08/07 10:40:36 agc Exp $ +$NetBSD: patch-am,v 1.3 1998/12/14 02:17:11 tv Exp $ ---- 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 @@ +--- multimedia/init.c.orig Sun Oct 11 10:15:36 1998 ++++ multimedia/init.c Sun Dec 13 01:14:24 1998 +@@ -36,6 +36,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; - } + /* MOD_MIDIPORT output port + * MOD_SYNTH generic internal synth + * MOD_SQSYNTH square wave internal synth +@@ -55,6 +56,9 @@ + "Assuming FM Synth\n"); + return MOD_FMSYNTH; + } +#else + return MOD_FMSYNTH; +#endif } #endif -@@ -57,7 +61,7 @@ +@@ -66,7 +70,7 @@ */ - BOOL32 MULTIMEDIA_Init (void) + BOOL32 MULTIMEDIA_MidiInit(void) { -#ifdef HAVE_OSS +#if defined(HAVE_OSS) && !defined(__NetBSD__) - int i, status, numsynthdevs, nummididevs; - struct synth_info sinfo; - struct midi_info minfo; + int i, status, numsynthdevs = 255, nummididevs = 255; + struct synth_info sinfo; + struct midi_info minfo; diff --git a/emulators/wine/patches/patch-ao b/emulators/wine/patches/patch-ao new file mode 100644 index 00000000000..a4768ccd152 --- /dev/null +++ b/emulators/wine/patches/patch-ao @@ -0,0 +1,162 @@ +$NetBSD: patch-ao,v 1.1 1998/12/14 02:17:11 tv Exp $ + +--- ole/variant.c.orig Sun Dec 13 12:04:14 1998 ++++ ole/variant.c Sun Dec 13 12:11:16 1998 +@@ -32,6 +32,8 @@ + #include <time.h> + + ++#undef CHAR_MAX ++#undef CHAR_MIN + static const char CHAR_MAX = 127; + static const char CHAR_MIN = -128; + static const BYTE UI1_MAX = 255; +@@ -40,10 +42,10 @@ + static const unsigned short UI2_MIN = 0; + static const short I2_MAX = 32767; + static const short I2_MIN = -32768; +-static const unsigned long UI4_MAX = 4294967295; ++static const unsigned long UI4_MAX = 4294967295UL; + static const unsigned long UI4_MIN = 0; + static const long I4_MAX = 2147483647; +-static const long I4_MIN = -2147483648; ++static const long I4_MIN = -(2147483648UL); + static const DATE DATE_MIN = -657434; + static const DATE DATE_MAX = 2958465; + +@@ -1768,7 +1770,7 @@ + * Convert currency to unsigned char + */ + HRESULT WINAPI VarUI1FromCy32(CY cyIn, BYTE* pbOut) { +- double t = round((((double)cyIn.u.Hi * 4294967296) + (double)cyIn.u.Lo) / 10000); ++ double t = round((((double)cyIn.u.Hi * 4294967296.0) + (double)cyIn.u.Lo) / 10000); + + if (t > UI1_MAX || t < UI1_MIN) return DISP_E_OVERFLOW; + +@@ -1974,7 +1976,7 @@ + * Convert currency to signed short + */ + HRESULT WINAPI VarI2FromCy32(CY cyIn, short* psOut) { +- double t = round((((double)cyIn.u.Hi * 4294967296) + (double)cyIn.u.Lo) / 10000); ++ double t = round((((double)cyIn.u.Hi * 4294967296.0) + (double)cyIn.u.Lo) / 10000); + + if (t > I2_MAX || t < I2_MIN) return DISP_E_OVERFLOW; + +@@ -2167,7 +2169,7 @@ + * Convert currency to signed long + */ + HRESULT WINAPI VarI4FromCy32(CY cyIn, LONG* plOut) { +- double t = round((((double)cyIn.u.Hi * 4294967296) + (double)cyIn.u.Lo) / 10000); ++ double t = round((((double)cyIn.u.Hi * 4294967296.0) + (double)cyIn.u.Lo) / 10000); + + if (t > I4_MAX || t < I4_MIN) return DISP_E_OVERFLOW; + +@@ -2341,7 +2343,7 @@ + * Convert currency to float + */ + HRESULT WINAPI VarR4FromCy32(CY cyIn, FLOAT* pfltOut) { +- *pfltOut = (FLOAT)((((double)cyIn.u.Hi * 4294967296) + (double)cyIn.u.Lo) / 10000); ++ *pfltOut = (FLOAT)((((double)cyIn.u.Hi * 4294967296.0) + (double)cyIn.u.Lo) / 10000); + + return S_OK; + } +@@ -2491,7 +2493,7 @@ + * Convert currency to double + */ + HRESULT WINAPI VarR8FromCy32(CY cyIn, double* pdblOut) { +- *pdblOut = (double)((((double)cyIn.u.Hi * 4294967296) + (double)cyIn.u.Lo) / 10000); ++ *pdblOut = (double)((((double)cyIn.u.Hi * 4294967296.0) + (double)cyIn.u.Lo) / 10000); + + return S_OK; + } +@@ -2674,7 +2676,7 @@ + * Convert currency to date + */ + HRESULT WINAPI VarDateFromCy32(CY cyIn, DATE* pdateOut) { +- *pdateOut = (DATE)((((double)cyIn.u.Hi * 4294967296) + (double)cyIn.u.Lo) / 10000); ++ *pdateOut = (DATE)((((double)cyIn.u.Hi * 4294967296.0) + (double)cyIn.u.Lo) / 10000); + + if (*pdateOut > DATE_MAX || *pdateOut < DATE_MIN) return DISP_E_TYPEMISMATCH; + return S_OK; +@@ -3384,7 +3386,7 @@ + * Convert currency to signed char + */ + HRESULT WINAPI VarI1FromCy32(CY cyIn, CHAR* pcOut) { +- double t = round((((double)cyIn.u.Hi * 4294967296) + (double)cyIn.u.Lo) / 10000); ++ double t = round((((double)cyIn.u.Hi * 4294967296.0) + (double)cyIn.u.Lo) / 10000); + + if (t > CHAR_MAX || t < CHAR_MIN) return DISP_E_OVERFLOW; + +@@ -3618,7 +3620,7 @@ + * Convert currency to unsigned short + */ + HRESULT WINAPI VarUI2FromCy32(CY cyIn, USHORT* pusOut) { +- double t = round((((double)cyIn.u.Hi * 4294967296) + (double)cyIn.u.Lo) / 10000); ++ double t = round((((double)cyIn.u.Hi * 4294967296.0) + (double)cyIn.u.Lo) / 10000); + + if (t > UI2_MAX || t < UI2_MIN) return DISP_E_OVERFLOW; + +@@ -3766,7 +3768,7 @@ + * Convert currency to unsigned long + */ + HRESULT WINAPI VarUI4FromCy32(CY cyIn, ULONG* pulOut) { +- double t = round((((double)cyIn.u.Hi * 4294967296) + (double)cyIn.u.Lo) / 10000); ++ double t = round((((double)cyIn.u.Hi * 4294967296.0) + (double)cyIn.u.Lo) / 10000); + + if (t > UI4_MAX || t < UI4_MIN) return DISP_E_OVERFLOW; + +@@ -3804,8 +3806,8 @@ + */ + HRESULT WINAPI VarCyFromI432(LONG lIn, CY* pcyOut) { + double t = (double)lIn * (double)10000; +- pcyOut->u.Hi = (LONG)(t / (double)4294967296); +- pcyOut->u.Lo = (ULONG)fmod(t, (double)4294967296); ++ pcyOut->u.Hi = (LONG)(t / (double)4294967296.0); ++ pcyOut->u.Lo = (ULONG)fmod(t, (double)4294967296.0); + if (lIn < 0) pcyOut->u.Hi--; + + return S_OK; +@@ -3817,8 +3819,8 @@ + */ + HRESULT WINAPI VarCyFromR432(FLOAT fltIn, CY* pcyOut) { + double t = round((double)fltIn * (double)10000); +- pcyOut->u.Hi = (LONG)(t / (double)4294967296); +- pcyOut->u.Lo = (ULONG)fmod(t, (double)4294967296); ++ pcyOut->u.Hi = (LONG)(t / (double)4294967296.0); ++ pcyOut->u.Lo = (ULONG)fmod(t, (double)4294967296.0); + if (fltIn < 0) pcyOut->u.Hi--; + + return S_OK; +@@ -3830,8 +3832,8 @@ + */ + HRESULT WINAPI VarCyFromR832(double dblIn, CY* pcyOut) { + double t = round(dblIn * (double)10000); +- pcyOut->u.Hi = (LONG)(t / (double)4294967296); +- pcyOut->u.Lo = (ULONG)fmod(t, (double)4294967296); ++ pcyOut->u.Hi = (LONG)(t / (double)4294967296.0); ++ pcyOut->u.Lo = (ULONG)fmod(t, (double)4294967296.0); + if (dblIn < 0) pcyOut->u.Hi--; + + return S_OK; +@@ -3843,8 +3845,8 @@ + */ + HRESULT WINAPI VarCyFromDate32(DATE dateIn, CY* pcyOut) { + double t = round((double)dateIn * (double)10000); +- pcyOut->u.Hi = (LONG)(t / (double)4294967296); +- pcyOut->u.Lo = (ULONG)fmod(t, (double)4294967296); ++ pcyOut->u.Hi = (LONG)(t / (double)4294967296.0); ++ pcyOut->u.Lo = (ULONG)fmod(t, (double)4294967296.0); + if (dateIn < 0) pcyOut->u.Hi--; + + return S_OK; +@@ -3891,8 +3893,8 @@ + */ + HRESULT WINAPI VarCyFromUI432(ULONG ulIn, CY* pcyOut) { + double t = (double)ulIn * (double)10000; +- pcyOut->u.Hi = (LONG)(t / (double)4294967296); +- pcyOut->u.Lo = (ULONG)fmod(t, (double)4294967296); ++ pcyOut->u.Hi = (LONG)(t / (double)4294967296.0); ++ pcyOut->u.Lo = (ULONG)fmod(t, (double)4294967296.0); + + return S_OK; + } diff --git a/emulators/wine/patches/patch-ap b/emulators/wine/patches/patch-ap new file mode 100644 index 00000000000..54377cbe587 --- /dev/null +++ b/emulators/wine/patches/patch-ap @@ -0,0 +1,10 @@ +$NetBSD: patch-ap,v 1.1 1998/12/14 02:17:12 tv Exp $ + +--- graphics/psdrv/Makefile.in.orig Sun Dec 13 17:23:30 1998 ++++ graphics/psdrv/Makefile.in Sun Dec 13 17:23:46 1998 +@@ -1,4 +1,4 @@ +-DEFS = -D__WINE__ ++DEFS = @DLLFLAGS@ -D__WINE__ + TOPSRCDIR = @top_srcdir@ + TOPOBJDIR = ../.. + SRCDIR = @srcdir@ diff --git a/emulators/wine/patches/patch-aq b/emulators/wine/patches/patch-aq new file mode 100644 index 00000000000..109a6b7134e --- /dev/null +++ b/emulators/wine/patches/patch-aq @@ -0,0 +1,14 @@ +$NetBSD: patch-aq,v 1.1 1998/12/14 02:17:12 tv Exp $ + +--- tools/wrc/writeres.c.orig Sun Dec 13 18:00:43 1998 ++++ tools/wrc/writeres.c Sun Dec 13 18:01:11 1998 +@@ -43,8 +43,7 @@ + #endif + "\taddl\t$4,%%esp\n" + "\tret\n\n" +- "\t.section .ctors,\"aw\"\n" +- "\t.long\t.LAuto_Register\n\n" ++ ".stabs \"___CTOR_LIST__\",22,0,0,.LAuto_Register\n\n" + ; + + char h_file_head_str[] = diff --git a/emulators/wine/pkg/COMMENT b/emulators/wine/pkg/COMMENT index 7edc3500c30..bae837a9f06 100644 --- a/emulators/wine/pkg/COMMENT +++ b/emulators/wine/pkg/COMMENT @@ -1 +1 @@ -Windows emulator +Beta Windows (3.1x, 95, NT) emulator diff --git a/emulators/wine/pkg/DESCR b/emulators/wine/pkg/DESCR index 3504a97a2db..e379fe2c644 100644 --- a/emulators/wine/pkg/DESCR +++ b/emulators/wine/pkg/DESCR @@ -1 +1,11 @@ -WINE emulates the Windows and Win32 APIs under Unix and X. +Wine is a program which allows running Microsoft Windows programs +(including DOS, Windows 3.x and Win32 executables) on Unix. It consists +of a program loader which loads and executes an Microsoft Windows binary, +and a library that implements Windows API calls using their Unix or X11 +equivalents. The library may also be used for porting Win32 code into +native Unix executables. + +Wine is free software, and its license (contained in the file LICENSE) is +BSD style. Basically, you can do anything with it except claim that you +wrote it. + diff --git a/emulators/wine/pkg/PLIST b/emulators/wine/pkg/PLIST index 0b6fdf438d4..0b6232c258f 100644 --- a/emulators/wine/pkg/PLIST +++ b/emulators/wine/pkg/PLIST @@ -1,4 +1,5 @@ -@comment $NetBSD: PLIST,v 1.6 1998/07/15 12:14:24 agc Exp $ +@comment $NetBSD: PLIST,v 1.7 1998/12/14 02:17:13 tv Exp $ +bin/dosmod bin/wine etc/wine.conf.example include/wine/windows.h |