]> git.sesse.net Git - vlc/commitdiff
* Coding style fixes here and there.
authorSam Hocevar <sam@videolan.org>
Sat, 28 Apr 2001 03:36:26 +0000 (03:36 +0000)
committerSam Hocevar <sam@videolan.org>
Sat, 28 Apr 2001 03:36:26 +0000 (03:36 +0000)
  * Miscellaneous QNX compile fixes.
  * Beginning of the mingw32 port by Gildas Bazin <gbazin@netcourrier.com>.
  * Added Marcari and Gildas to the AUTHORS file.

  (I commited the mingw32 port because it doesn't add any new code outside
   the #ifdefs, but we won't tell a word about it for the moment. We don't
   really need windows users whining about bugs, do we ?)

56 files changed:
AUTHORS
ChangeLog
Makefile
Makefile.opts.in
configure
configure.in
extras/GNUgetopt/getopt.c
include/common.h
include/config.h.in
include/defs.h.in
include/input_ext-dec.h
include/modules.h
include/threads.h
plugins/dvd/dvd_udf.c
plugins/dvd/input_dvd.c
plugins/fb/fb.c
plugins/ggi/ggi.c
plugins/glide/glide.c
plugins/gnome/gnome.c
plugins/gtk/gtk.c
plugins/gtk/gtk_callbacks.c
plugins/gtk/gtk_playlist.c
plugins/macosx/vout_macosx.c
plugins/mga/mga.c
plugins/mpeg/input_es.c
plugins/mpeg/input_ps.c
plugins/mpeg/input_ts.c
plugins/sdl/aout_sdl.c
plugins/sdl/sdl.c
plugins/sdl/vout_sdl.c
plugins/text/ncurses.c
plugins/x11/vout_x11.c
plugins/x11/x11.c
plugins/x11/xvideo.c
plugins/yuv/transforms_yuvmmx.h
src/audio_output/audio_output.c
src/input/input.c
src/input/input_clock.c
src/input/input_dec.c
src/input/input_ext-dec.c
src/input/input_ext-intf.c
src/input/input_netlist.c
src/input/input_programs.c
src/input/mpeg_system.c
src/interface/interface.c
src/interface/intf_channels.c
src/interface/intf_msg.c
src/interface/main.c
src/misc/modules.c
src/misc/mtime.c
src/misc/netutils.c
src/spu_decoder/spu_decoder.c
src/video_output/video_text.c
src/video_parser/video_parser.c
src/video_parser/vpar_blocks.c
src/video_parser/vpar_headers.c

diff --git a/AUTHORS b/AUTHORS
index 4a0585cfc6a5850c67ae1e57c102915c3fb80441..f60ecb3c59aaa8f0e819cf9ce18b4606a74c7f3f 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -5,6 +5,11 @@
 # The fields are: name (N), email (E), web-address (W), CVS account login (C),
 # PGP key ID and fingerprint (P), description (D), and snail-mail address (S).
 
+N: Marc Ariberti
+C: marcari
+E: marcari@via.ecp.fr
+D: communication with channel server
+
 N: Pierre Baillet
 E: oct@zoy.org
 C: octplane
@@ -14,6 +19,10 @@ N: Ethan C. Baldridge
 E: BaldridgeE@cadmus.com
 D: directory browsing code in modules.c
 
+N: Gildas Bazin
+E: gbazin@netcourrier.com
+D: mingw32 port
+
 N: Stéphane Borel
 E: stef@via.ecp.fr
 C: stef
@@ -40,6 +49,7 @@ E: ndeb@ece.cmu.edu
 D: Minor configure.in and Makefile.in fixes
 
 N: Cyril Deguet
+C: asmax
 E: asmax@via.ecp.fr
 D: PS input packet allocator
 
index 0f40191a5e013c05fc5f23d3ccc7ce74d8fa7052..a96b9948fa128e6ae9c34bd236a9ba788bda1372 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,7 +4,10 @@
 
 HEAD
 
-  * Changed broadcast handling
+  * Coding style fixes here and there.
+  * Miscellaneous QNX compile fixes.
+  * Beginning of the mingw32 port by Gildas Bazin <gbazin@netcourrier.com>.
+  * Changed broadcast handling.
   * Added a vlc-howto in sgml format in the doc directory.
   * Fixed the continuous 'seeking position' bug in network mode.
   * Support for `ts://foo:42' style input source.
index f79a6b9aa57bbd25ab6c9b5acfc1d63bf499a665..6740d6b5ccd2fc05a427ab3bb5e52cf7aa39bad1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -176,7 +176,7 @@ distclean: clean
        rm -f **/*.o **/*~ *.log
        rm -f Makefile.opts
        rm -f include/defs.h include/config.h include/modules_builtin.h
-       rm -f config.status config.cache config.log
+       rm -f config*status config*cache config*log
        rm -f gmon.out core build-stamp
        rm -Rf .dep
        rm -f .gdb_history
@@ -353,5 +353,5 @@ $(PLUGIN_OBJ): FORCE
 builtins: Makefile.modules Makefile.opts Makefile.dep Makefile $(BUILTIN_OBJ)
 $(BUILTIN_OBJ): FORCE
        cd $(shell echo " "$(PLUGINS_TARGETS)" " | sed -e 's@.* \([^/]*/\)'$(@:lib/%.a=%)' .*@plugins/\1@' -e 's@^ .*@@') && $(MAKE) $(@:%=../../%)
-       ranlib $@
+       $(RANLIB) $@
 
index d36fe45ed6d6884c5bca5cdf81955cbdf4a151dc..15ad43d14fc90cd887614885330ae616a7bbf283 100644 (file)
 # the plugins in this line and put them as built-ins, otherwise your
 # application won't be able to load them.
 # 
-PLUGINS := @PLUGINS@
+PLUGINS :=@PLUGINS@
 
 # 
 # Built-in modules to build
 # WARNING: do NOT put gtk and gnome together in this rule.
 # 
-BUILTINS := @BUILTINS@
+BUILTINS :=@BUILTINS@
 
 # 
 # Additional build options
@@ -42,7 +42,9 @@ GETOPT = @GETOPT@
 # Build environment
 # 
 CC = @CC@
+CFLAGS = @CFLAGS@
 SHELL = @SHELL@
+RANLIB = @RANLIB@
 
 # 
 # Installation environment
@@ -137,6 +139,10 @@ INCLUDE += -Iinclude -Iextras -I/usr/local/include
 #
 LIB += @LIB@ -L/usr/local/lib
 
+ifneq (,$(findstring mingw32,$(SYS)))
+LIB += -lws2_32
+endif
+
 #
 # Libraries needed by built-in modules
 #
index 9641ddb93a700bdbbd670e5e8cf79d97eb68882d..135a196ef711cb654e75b674a6d5d68ef828256c 100755 (executable)
--- a/configure
+++ b/configure
@@ -958,6 +958,36 @@ else
 fi
 echo "$ac_t""$CPP" 1>&6
 
+# Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:965: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_RANLIB="ranlib"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+  echo "$ac_t""$RANLIB" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
 
 # Find a good install program.  We prefer a C program (faster),
 # so one script is as good as another.  But avoid the broken or
@@ -971,7 +1001,7 @@ echo "$ac_t""$CPP" 1>&6
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:975: checking for a BSD compatible install" >&5
+echo "configure:1005: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1025,18 +1055,18 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1029: checking for working const" >&5
+echo "configure:1059: 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 1034 "configure"
+#line 1064 "configure"
 #include "confdefs.h"
 
 int main() {
 
 /* Ultrix mips cc rejects this.  */
-typedef int charset[2]; const charset x = {0,0};
+typedef int charset[2]; const charset x;
 /* SunOS 4.1.1 cc rejects this.  */
 char const *const *ccp;
 char **p;
@@ -1079,7 +1109,7 @@ ccp = (char const *const *) p;
 
 ; return 0; }
 EOF
-if { (eval echo configure:1083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -1099,15 +1129,17 @@ EOF
 
 fi
 
-echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:1104: checking whether byte ordering is bigendian" >&5
+
+if test x${cross_compiling} != xyes; then
+  echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
+echo "configure:1136: checking whether byte ordering is bigendian" >&5
 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_bigendian=unknown
 # See if sys/param.h defines the BYTE_ORDER macro.
 cat > conftest.$ac_ext <<EOF
-#line 1111 "configure"
+#line 1143 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -1118,11 +1150,11 @@ int main() {
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:1122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   # It does; now see whether it defined to BIG_ENDIAN or not.
 cat > conftest.$ac_ext <<EOF
-#line 1126 "configure"
+#line 1158 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -1133,7 +1165,7 @@ int main() {
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:1137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_bigendian=yes
 else
@@ -1153,7 +1185,7 @@ if test "$cross_compiling" = yes; then
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 1157 "configure"
+#line 1189 "configure"
 #include "confdefs.h"
 main () {
   /* Are we little or big endian?  From Harbison&Steele.  */
@@ -1166,7 +1198,7 @@ main () {
   exit (u.c[sizeof (long) - 1] == 1);
 }
 EOF
-if { (eval echo configure:1170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_bigendian=no
 else
@@ -1189,16 +1221,17 @@ EOF
 
 fi
 
+fi
 
 for ac_func in gettimeofday select strerror strtod strtol
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1197: checking for $ac_func" >&5
+echo "configure:1230: 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 1202 "configure"
+#line 1235 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1221,7 +1254,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -1248,12 +1281,12 @@ done
 for ac_func in setenv putenv
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1252: checking for $ac_func" >&5
+echo "configure:1285: 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 1257 "configure"
+#line 1290 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1276,7 +1309,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -1301,12 +1334,12 @@ fi
 done
 
 echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:1305: checking for connect" >&5
+echo "configure:1338: checking for connect" >&5
 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1310 "configure"
+#line 1343 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
@@ -1329,7 +1362,7 @@ connect();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_connect=yes"
 else
@@ -1346,8 +1379,9 @@ if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
   :
 else
   echo "$ac_t""no" 1>&6
-echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-echo "configure:1351: checking for connect in -lsocket" >&5
+
+  echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
+echo "configure:1385: checking for connect in -lsocket" >&5
 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1355,7 +1389,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1359 "configure"
+#line 1393 "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
@@ -1366,7 +1400,7 @@ int main() {
 connect()
 ; return 0; }
 EOF
-if { (eval echo configure:1370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1386,15 +1420,16 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
+
 fi
 
 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:1393: checking for gethostbyname" >&5
+echo "configure:1428: checking for gethostbyname" >&5
 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1398 "configure"
+#line 1433 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
@@ -1417,7 +1452,7 @@ gethostbyname();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_gethostbyname=yes"
 else
@@ -1434,8 +1469,9 @@ if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
   :
 else
   echo "$ac_t""no" 1>&6
-echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:1439: checking for gethostbyname in -lnsl" >&5
+
+  echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
+echo "configure:1475: checking for gethostbyname in -lnsl" >&5
 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1443,7 +1479,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1447 "configure"
+#line 1483 "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
@@ -1454,7 +1490,7 @@ int main() {
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:1458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1474,15 +1510,16 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
+
 fi
 
 echo $ac_n "checking for nanosleep""... $ac_c" 1>&6
-echo "configure:1481: checking for nanosleep" >&5
+echo "configure:1518: checking for nanosleep" >&5
 if eval "test \"`echo '$''{'ac_cv_func_nanosleep'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1486 "configure"
+#line 1523 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char nanosleep(); below.  */
@@ -1505,7 +1542,7 @@ nanosleep();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_nanosleep=yes"
 else
@@ -1522,8 +1559,9 @@ if eval "test \"`echo '$ac_cv_func_'nanosleep`\" = yes"; then
   :
 else
   echo "$ac_t""no" 1>&6
-echo $ac_n "checking for nanosleep in -lrt""... $ac_c" 1>&6
-echo "configure:1527: checking for nanosleep in -lrt" >&5
+
+  echo $ac_n "checking for nanosleep in -lrt""... $ac_c" 1>&6
+echo "configure:1565: checking for nanosleep in -lrt" >&5
 ac_lib_var=`echo rt'_'nanosleep | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1531,7 +1569,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lrt  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1535 "configure"
+#line 1573 "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
@@ -1542,7 +1580,7 @@ int main() {
 nanosleep()
 ; return 0; }
 EOF
-if { (eval echo configure:1546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1560,8 +1598,9 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   LIB="${LIB} -lrt"
 else
   echo "$ac_t""no" 1>&6
-echo $ac_n "checking for nanosleep in -lposix4""... $ac_c" 1>&6
-echo "configure:1565: checking for nanosleep in -lposix4" >&5
+
+    echo $ac_n "checking for nanosleep in -lposix4""... $ac_c" 1>&6
+echo "configure:1604: checking for nanosleep in -lposix4" >&5
 ac_lib_var=`echo posix4'_'nanosleep | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1569,7 +1608,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lposix4  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1573 "configure"
+#line 1612 "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
@@ -1580,7 +1619,7 @@ int main() {
 nanosleep()
 ; return 0; }
 EOF
-if { (eval echo configure:1584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1600,19 +1639,21 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
+  
 fi
 
+
 fi
 
 for ac_func in usleep
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1611: checking for $ac_func" >&5
+echo "configure:1652: 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 1616 "configure"
+#line 1657 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1635,7 +1676,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -1660,12 +1701,12 @@ fi
 done
 
 echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
-echo "configure:1664: checking for inet_aton" >&5
+echo "configure:1705: checking for inet_aton" >&5
 if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1669 "configure"
+#line 1710 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char inet_aton(); below.  */
@@ -1688,7 +1729,7 @@ inet_aton();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_inet_aton=yes"
 else
@@ -1705,8 +1746,9 @@ if eval "test \"`echo '$ac_cv_func_'inet_aton`\" = yes"; then
   :
 else
   echo "$ac_t""no" 1>&6
-echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6
-echo "configure:1710: checking for inet_aton in -lresolv" >&5
+
+  echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6
+echo "configure:1752: checking for inet_aton in -lresolv" >&5
 ac_lib_var=`echo resolv'_'inet_aton | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1714,7 +1756,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lresolv  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1718 "configure"
+#line 1760 "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
@@ -1725,7 +1767,7 @@ int main() {
 inet_aton()
 ; return 0; }
 EOF
-if { (eval echo configure:1729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1745,17 +1787,18 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
+
 fi
 
 for ac_func in vasprintf
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1754: checking for $ac_func" >&5
+echo "configure:1797: 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 1759 "configure"
+#line 1802 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1778,7 +1821,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -1804,12 +1847,12 @@ done
 
 
 echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
-echo "configure:1808: checking for getopt_long" >&5
+echo "configure:1851: checking for getopt_long" >&5
 if eval "test \"`echo '$''{'ac_cv_func_getopt_long'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1813 "configure"
+#line 1856 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char getopt_long(); below.  */
@@ -1832,7 +1875,7 @@ getopt_long();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_getopt_long=yes"
 else
@@ -1854,7 +1897,7 @@ else
   echo "$ac_t""no" 1>&6
  # FreeBSD has a gnugetopt library for this:
   echo $ac_n "checking for getopt_long in -lgnugetopt""... $ac_c" 1>&6
-echo "configure:1858: checking for getopt_long in -lgnugetopt" >&5
+echo "configure:1901: checking for getopt_long in -lgnugetopt" >&5
 ac_lib_var=`echo gnugetopt'_'getopt_long | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1862,7 +1905,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgnugetopt  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1866 "configure"
+#line 1909 "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
@@ -1873,7 +1916,7 @@ int main() {
 getopt_long()
 ; return 0; }
 EOF
-if { (eval echo configure:1877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1905,17 +1948,17 @@ for ac_hdr in unistd.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1909: checking for $ac_hdr" >&5
+echo "configure:1952: 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 1914 "configure"
+#line 1957 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1919: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1962: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1944,12 +1987,12 @@ done
 for ac_func in getpagesize
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1948: checking for $ac_func" >&5
+echo "configure:1991: 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 1953 "configure"
+#line 1996 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1972,7 +2015,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -1997,7 +2040,7 @@ fi
 done
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:2001: checking for working mmap" >&5
+echo "configure:2044: checking for working mmap" >&5
 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2005,7 +2048,7 @@ else
   ac_cv_func_mmap_fixed_mapped=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 2009 "configure"
+#line 2052 "configure"
 #include "confdefs.h"
 
 /* Thanks to Mike Haertel and Jim Avera for this test.
@@ -2032,15 +2075,12 @@ else
 #include <sys/types.h>
 #include <fcntl.h>
 #include <sys/mman.h>
-#include <stdlib.h>
-#include <sys/stat.h>
-
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
 
 /* This mess was copied from the GNU getpagesize.h.  */
 #ifndef HAVE_GETPAGESIZE
+# ifdef HAVE_UNISTD_H
+#  include <unistd.h>
+# endif
 
 /* Assume that all systems that can run configure have sys/param.h.  */
 # ifndef HAVE_SYS_PARAM_H
@@ -2095,7 +2135,7 @@ main()
        /*
         * First, make a file with some known garbage in it.
         */
-       data = (char*)malloc(pagesize);
+       data = malloc(pagesize);
        if (!data)
                exit(1);
        for (i = 0; i < pagesize; ++i)
@@ -2116,7 +2156,7 @@ main()
        fd = open("conftestmmap", O_RDWR);
        if (fd < 0)
                exit(1);
-       data2 = (char*)malloc(2 * pagesize);
+       data2 = malloc(2 * pagesize);
        if (!data2)
                exit(1);
        data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
@@ -2134,7 +2174,7 @@ main()
         */
        for (i = 0; i < pagesize; ++i)
                *(data2 + i) = *(data2 + i) + 1;
-       data3 = (char*)malloc(pagesize);
+       data3 = malloc(pagesize);
        if (!data3)
                exit(1);
        if (read(fd, data3, pagesize) != pagesize)
@@ -2148,7 +2188,7 @@ main()
 }
 
 EOF
-if { (eval echo configure:2152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_mmap_fixed_mapped=yes
 else
@@ -2171,12 +2211,12 @@ EOF
 fi
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:2175: checking return type of signal handlers" >&5
+echo "configure:2215: checking return type of signal handlers" >&5
 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2180 "configure"
+#line 2220 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -2193,7 +2233,7 @@ int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:2197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -2212,7 +2252,7 @@ EOF
 
 
 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:2216: checking for dlopen in -ldl" >&5
+echo "configure:2256: checking for dlopen in -ldl" >&5
 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2220,7 +2260,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2224 "configure"
+#line 2264 "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
@@ -2231,7 +2271,7 @@ int main() {
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:2235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2252,7 +2292,7 @@ else
 fi
 
 echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6
-echo "configure:2256: checking for pow in -lm" >&5
+echo "configure:2296: checking for pow in -lm" >&5
 ac_lib_var=`echo m'_'pow | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2260,7 +2300,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2264 "configure"
+#line 2304 "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
@@ -2271,7 +2311,7 @@ int main() {
 pow()
 ; return 0; }
 EOF
-if { (eval echo configure:2275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2292,9 +2332,9 @@ else
 fi
 
 echo $ac_n "checking for old style FreeBSD -pthread flag""... $ac_c" 1>&6
-echo "configure:2296: checking for old style FreeBSD -pthread flag" >&5
+echo "configure:2336: checking for old style FreeBSD -pthread flag" >&5
 cat > conftest.$ac_ext <<EOF
-#line 2298 "configure"
+#line 2338 "configure"
 #include "confdefs.h"
 #if defined(__FreeBSD_cc_version) && __FreeBSD_cc_version <= 500001
          yes
@@ -2310,7 +2350,7 @@ else
   rm -rf conftest*
   echo "$ac_t""no" 1>&6
        echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:2314: checking for pthread_create in -lpthread" >&5
+echo "configure:2354: checking for pthread_create in -lpthread" >&5
 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2318,7 +2358,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpthread  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2322 "configure"
+#line 2362 "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
@@ -2329,7 +2369,7 @@ int main() {
 pthread_create()
 ; return 0; }
 EOF
-if { (eval echo configure:2333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2353,7 +2393,7 @@ fi
 rm -f conftest*
 
 echo $ac_n "checking for thread_create in -lthreads""... $ac_c" 1>&6
-echo "configure:2357: checking for thread_create in -lthreads" >&5
+echo "configure:2397: checking for thread_create in -lthreads" >&5
 ac_lib_var=`echo threads'_'thread_create | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2361,7 +2401,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lthreads  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2365 "configure"
+#line 2405 "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
@@ -2372,7 +2412,7 @@ int main() {
 thread_create()
 ; return 0; }
 EOF
-if { (eval echo configure:2376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2394,21 +2434,22 @@ fi
 
 
 CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
-for ac_hdr in stddef.h
+
+for ac_hdr in stddef.h getopt.h strings.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2402: checking for $ac_hdr" >&5
+echo "configure:2443: 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 2407 "configure"
+#line 2448 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2434,21 +2475,21 @@ else
 fi
 done
 
-for ac_hdr in getopt.h
+for ac_hdr in sys/sockio.h fcntl.h sys/time.h unistd.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2442: checking for $ac_hdr" >&5
+echo "configure:2483: 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 2447 "configure"
+#line 2488 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2493: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2474,21 +2515,21 @@ else
 fi
 done
 
-for ac_hdr in sys/sockio.h
+for ac_hdr in sys/soundcard.h machine/soundcard.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2482: checking for $ac_hdr" >&5
+echo "configure:2523: 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 2487 "configure"
+#line 2528 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2492: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2514,21 +2555,21 @@ else
 fi
 done
 
-for ac_hdr in fcntl.h sys/time.h unistd.h
+for ac_hdr in dlfcn.h image.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2522: checking for $ac_hdr" >&5
+echo "configure:2563: 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 2527 "configure"
+#line 2568 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2573: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2554,21 +2595,21 @@ else
 fi
 done
 
-for ac_hdr in sys/soundcard.h machine/soundcard.h
+for ac_hdr in arpa/inet.h net/if.h netinet/in.h sys/socket.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2562: checking for $ac_hdr" >&5
+echo "configure:2603: 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 2567 "configure"
+#line 2608 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2613: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2594,21 +2635,21 @@ else
 fi
 done
 
-for ac_hdr in dlfcn.h image.h
+for ac_hdr in machine/param.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2602: checking for $ac_hdr" >&5
+echo "configure:2643: 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 2607 "configure"
+#line 2648 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2612: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2653: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2634,21 +2675,22 @@ else
 fi
 done
 
-for ac_hdr in arpa/inet.h net/if.h netinet/in.h sys/socket.h
+
+for ac_hdr in cthreads.h pthread.h kernel/scheduler.h kernel/OS.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2642: checking for $ac_hdr" >&5
+echo "configure:2684: 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 2647 "configure"
+#line 2689 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2652: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2694: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2674,95 +2716,49 @@ else
 fi
 done
 
-for ac_hdr in machine/param.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2682: 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 2687 "configure"
+
+cat > conftest.$ac_ext <<EOF
+#line 2722 "configure"
 #include "confdefs.h"
-#include <$ac_hdr>
+#include <pthread.h>
 EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2692: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "pthread_cond_t" >/dev/null 2>&1; then
   rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
+  
+  cat >> confdefs.h <<\EOF
+#define PTHREAD_COND_T_IN_PTHREAD_H 1
 EOF
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
 
 
-for ac_hdr in cthreads.h pthread.h kernel/scheduler.h kernel/OS.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2723: 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 2728 "configure"
+fi
+rm -f conftest*
+
+cat > conftest.$ac_ext <<EOF
+#line 2739 "configure"
 #include "confdefs.h"
-#include <$ac_hdr>
+#include <strings.h>
 EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "strncasecmp" >/dev/null 2>&1; then
   rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
+  
+  cat >> confdefs.h <<\EOF
+#define STRNCASECMP_IN_STRINGS_H 1
 EOF
-else
-  echo "$ac_t""no" 1>&6
+
+
 fi
-done
+rm -f conftest*
 
 
 save_CFLAGS=$CFLAGS
 
 CFLAGS="${CFLAGS} -Wall -Werror"
 echo $ac_n "checking for ntohl in sys/param.h""... $ac_c" 1>&6
-echo "configure:2764: checking for ntohl in sys/param.h" >&5
+echo "configure:2760: checking for ntohl in sys/param.h" >&5
 cat > conftest.$ac_ext <<EOF
-#line 2766 "configure"
+#line 2762 "configure"
 #include "confdefs.h"
 #include <sys/param.h>
 void foo() { int meuh; ntohl(meuh); }
@@ -2770,7 +2766,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cat >> confdefs.h <<\EOF
 #define NTOHL_IN_SYS_PARAM_H 1
@@ -2787,16 +2783,16 @@ rm -f conftest*
 
 CFLAGS="${CFLAGS} -rdynamic -Wall -Werror"
 echo $ac_n "checking if \$CC groks -rdynamic without complaining too much""... $ac_c" 1>&6
-echo "configure:2791: checking if \$CC groks -rdynamic without complaining too much" >&5
+echo "configure:2787: checking if \$CC groks -rdynamic without complaining too much" >&5
 cat > conftest.$ac_ext <<EOF
-#line 2793 "configure"
+#line 2789 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   LCFLAGS="${LCFLAGS} -rdynamic"
  echo "$ac_t""yes" 1>&6
@@ -2811,9 +2807,9 @@ rm -f conftest*
 CFLAGS=$save_CFLAGS
 
 echo $ac_n "checking for boolean_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:2815: checking for boolean_t in sys/types.h" >&5
+echo "configure:2811: checking for boolean_t in sys/types.h" >&5
 cat > conftest.$ac_ext <<EOF
-#line 2817 "configure"
+#line 2813 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 void quux() { boolean_t foo; }
@@ -2821,7 +2817,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2825: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cat >> confdefs.h <<\EOF
 #define BOOLEAN_T_IN_SYS_TYPES_H 1
@@ -2836,9 +2832,9 @@ else
 fi
 rm -f conftest*
 echo $ac_n "checking for boolean_t in pthread.h""... $ac_c" 1>&6
-echo "configure:2840: checking for boolean_t in pthread.h" >&5
+echo "configure:2836: checking for boolean_t in pthread.h" >&5
 cat > conftest.$ac_ext <<EOF
-#line 2842 "configure"
+#line 2838 "configure"
 #include "confdefs.h"
 #include <pthread.h>
 void quux() { boolean_t foo; }
@@ -2846,7 +2842,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2846: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cat >> confdefs.h <<\EOF
 #define BOOLEAN_T_IN_PTHREAD_H 1
@@ -2862,18 +2858,18 @@ fi
 rm -f conftest*
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2866: checking for working const" >&5
+echo "configure:2862: 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 2871 "configure"
+#line 2867 "configure"
 #include "confdefs.h"
 
 int main() {
 
 /* Ultrix mips cc rejects this.  */
-typedef int charset[2]; const charset x = {0,0};
+typedef int charset[2]; const charset x;
 /* SunOS 4.1.1 cc rejects this.  */
 char const *const *ccp;
 char **p;
@@ -2916,7 +2912,7 @@ ccp = (char const *const *) p;
 
 ; return 0; }
 EOF
-if { (eval echo configure:2920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -2937,12 +2933,12 @@ EOF
 fi
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2941: checking for ANSI C header files" >&5
+echo "configure:2937: 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 2946 "configure"
+#line 2942 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -2950,7 +2946,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2967,7 +2963,7 @@ rm -f conftest*
 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 2971 "configure"
+#line 2967 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -2985,7 +2981,7 @@ fi
 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 2989 "configure"
+#line 2985 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -3006,7 +3002,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 3010 "configure"
+#line 3006 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -3017,7 +3013,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:3021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -3041,12 +3037,12 @@ EOF
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:3045: checking for size_t" >&5
+echo "configure:3041: 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 3050 "configure"
+#line 3046 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3074,12 +3070,12 @@ EOF
 fi
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:3078: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:3074: checking whether time.h and sys/time.h may both be included" >&5
 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3083 "configure"
+#line 3079 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -3088,7 +3084,7 @@ int main() {
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:3092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_time=yes
 else
@@ -3112,27 +3108,33 @@ fi
 ARCH=${host_cpu}
 
 BUILTINS="${BUILTINS} es ps ts yuv idct idctclassic motion"
-if test x$host_os = xbeos; then
+case x$host_os in
+  xbeos|xnto-qnx)
     ACCEL_PLUGINS="yuvmmx idctmmx motionmmx"
-else
+    ;;
+  xmingw32msvc)
+    ACCEL_PLUGINS="idctmmx idctmmxext motionmmx motionmmxext"
+    ;;
+  *)
     ACCEL_PLUGINS="yuvmmx idctmmx idctmmxext motionmmx motionmmxext"
-fi
+    ;;
+esac
 
 for ac_hdr in sys/ioctl.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3126: checking for $ac_hdr" >&5
+echo "configure:3128: 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 3131 "configure"
+#line 3133 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3136: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3158,17 +3160,17 @@ EOF
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3162: checking for $ac_hdr" >&5
+echo "configure:3164: 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 3167 "configure"
+#line 3169 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3195,7 +3197,7 @@ fi
 done
 
   cat > conftest.$ac_ext <<EOF
-#line 3199 "configure"
+#line 3201 "configure"
 #include "confdefs.h"
 #include <linux/cdrom.h>
 EOF
@@ -3260,7 +3262,7 @@ if test "${enable_mmx+set}" = set; then
    if test x$enableval = xyes; then ARCH="${ARCH} mmx";
   BUILTINS="${BUILTINS} ${ACCEL_PLUGINS}"; fi 
 else
-   if test x${host_cpu} = xi686 -o x${host_cpu} = xi586 -o x${host_cpu} = xx86; then ARCH="${ARCH} mmx";
+   if test x${host_cpu} = xi686 -o x${host_cpu} = xi586 -o x${host_cpu} = xx86 -o x${host_cpu} = xi386; then ARCH="${ARCH} mmx";
   BUILTINS="${BUILTINS} ${ACCEL_PLUGINS}"; fi 
 fi
 
@@ -3346,7 +3348,7 @@ if test "${enable_esd+set}" = set; then
      # Extract the first word of "esd-config", so it can be a program name with args.
 set dummy esd-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3350: checking for $ac_word" >&5
+echo "configure:3352: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_ESD_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3411,17 +3413,17 @@ else
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3415: checking for $ac_hdr" >&5
+echo "configure:3417: 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 3420 "configure"
+#line 3422 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3425: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3427: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3492,17 +3494,17 @@ if test "${with_sdl+set}" = set; then
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3496: checking for $ac_hdr" >&5
+echo "configure:3498: 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 3501 "configure"
+#line 3503 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3506: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3540,17 +3542,17 @@ fi
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3544: checking for $ac_hdr" >&5
+echo "configure:3546: 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 3549 "configure"
+#line 3551 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3556: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3644,7 +3646,7 @@ if test x$enable_gtk != xno; then
   # Extract the first word of "gtk-config", so it can be a program name with args.
 set dummy gtk-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3648: checking for $ac_word" >&5
+echo "configure:3650: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3704,17 +3706,17 @@ if test x$enable_x11 != xno; then
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3708: checking for $ac_hdr" >&5
+echo "configure:3710: 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 3713 "configure"
+#line 3715 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3766,17 +3768,17 @@ if test x$enable_xvideo != xno; then
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3770: checking for $ac_hdr" >&5
+echo "configure:3772: 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 3775 "configure"
+#line 3777 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3780: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3814,17 +3816,17 @@ if test "${enable_alsa+set}" = set; then
   enableval="$enable_alsa"
   if test x$enable_alsa = xyes; then ac_safe=`echo "sys/asoundlib.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for sys/asoundlib.h""... $ac_c" 1>&6
-echo "configure:3818: checking for sys/asoundlib.h" >&5
+echo "configure:3820: checking for sys/asoundlib.h" >&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 3823 "configure"
+#line 3825 "configure"
 #include "confdefs.h"
 #include <sys/asoundlib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3841,7 +3843,7 @@ fi
 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
-echo "configure:3845: checking for main in -lasound" >&5
+echo "configure:3847: checking for main in -lasound" >&5
 ac_lib_var=`echo asound'_'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
@@ -3849,14 +3851,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lasound  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3853 "configure"
+#line 3855 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:3860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4070,6 +4072,7 @@ s%@VLC_CODENAME@%$VLC_CODENAME%g
 s%@SET_MAKE@%$SET_MAKE%g
 s%@CC@%$CC%g
 s%@CPP@%$CPP%g
+s%@RANLIB@%$RANLIB%g
 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
 s%@INSTALL_DATA@%$INSTALL_DATA%g
@@ -4341,9 +4344,9 @@ trace mode            : ${TRACE}
 optimizations         : ${OPTIMS}
 CSS decryption        : ${CSS}
 need builtin getopt   : ${GETOPT}
-plugin modules        : ${PLUGINS}
-built-in modules      : ${BUILTINS}
-vlc aliases           : ${ALIASES}
+plugin modules        :${PLUGINS}
+built-in modules      :${BUILTINS}
+vlc aliases           :${ALIASES}
 
 You may now tune Makefile.opts at your convenience."
 
index 0fa2af7d13e8e4a4d77c3b6817b6ef5ed71276a5..8b9ca2e2a6e62cc9736352592549f9fb8eaa7580 100644 (file)
@@ -13,22 +13,37 @@ dnl Check for tools
 AC_PROG_MAKE_SET
 AC_PROG_CC
 AC_PROG_CPP
+AC_PROG_RANLIB
 
 dnl AM_PROG_LIBTOOL
 AC_PROG_INSTALL
 
 dnl Check for compiler environment
 AC_C_CONST
-AC_C_BIGENDIAN
+
+dnl Check for endianness if not cross-compiling
+if test x${cross_compiling} != xyes; then
+  AC_C_BIGENDIAN
+fi
 
 dnl Check for system libs needed
 AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol)
 AC_CHECK_FUNCS(setenv putenv)
-AC_CHECK_FUNC(connect,,[AC_CHECK_LIB(socket,connect,LIB="${LIB} -lsocket")])
-AC_CHECK_FUNC(gethostbyname,,[AC_CHECK_LIB(nsl,gethostbyname,LIB="${LIB} -lnsl")])
-AC_CHECK_FUNC(nanosleep,,[AC_CHECK_LIB(rt,nanosleep,LIB="${LIB} -lrt",[AC_CHECK_LIB(posix4,nanosleep,LIB="${LIB} -lposix4")])])
+AC_CHECK_FUNC(connect,,[
+  AC_CHECK_LIB(socket,connect,LIB="${LIB} -lsocket")
+])
+AC_CHECK_FUNC(gethostbyname,,[
+  AC_CHECK_LIB(nsl,gethostbyname,LIB="${LIB} -lnsl")
+])
+AC_CHECK_FUNC(nanosleep,,[
+  AC_CHECK_LIB(rt,nanosleep,LIB="${LIB} -lrt",[
+    AC_CHECK_LIB(posix4,nanosleep,LIB="${LIB} -lposix4")
+  ])
+])
 AC_CHECK_FUNCS(usleep)
-AC_CHECK_FUNC(inet_aton,,[AC_CHECK_LIB(resolv,inet_aton,LIB="${LIB} -lresolv")])
+AC_CHECK_FUNC(inet_aton,,[
+  AC_CHECK_LIB(resolv,inet_aton,LIB="${LIB} -lresolv")
+])
 AC_CHECK_FUNCS(vasprintf)
 
 AC_CHECK_FUNC(getopt_long,[AC_DEFINE(HAVE_GETOPT_LONG,1,long getopt support)],
@@ -54,10 +69,10 @@ AC_EGREP_CPP(yes,
 AC_CHECK_LIB(threads,thread_create,LIB="${LIB} -lthreads")
 
 CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
-AC_CHECK_HEADERS(stddef.h)
-AC_CHECK_HEADERS(getopt.h)
-AC_CHECK_HEADERS(sys/sockio.h)
-AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h)
+
+dnl Check for headers
+AC_CHECK_HEADERS(stddef.h getopt.h strings.h)
+AC_CHECK_HEADERS(sys/sockio.h fcntl.h sys/time.h unistd.h)
 AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h)
 AC_CHECK_HEADERS(dlfcn.h image.h)
 AC_CHECK_HEADERS(arpa/inet.h net/if.h netinet/in.h sys/socket.h)
@@ -66,6 +81,16 @@ AC_CHECK_HEADERS(machine/param.h)
 dnl Check for threads library
 AC_CHECK_HEADERS(cthreads.h pthread.h kernel/scheduler.h kernel/OS.h)
 
+dnl Check for misc headers
+AC_EGREP_HEADER(pthread_cond_t,pthread.h,[
+  AC_DEFINE(PTHREAD_COND_T_IN_PTHREAD_H, 1,
+            Define if <pthread.h> defines pthread_cond_t.)
+])
+AC_EGREP_HEADER(strncasecmp,strings.h,[
+  AC_DEFINE(STRNCASECMP_IN_STRINGS_H, 1,
+            Define if <strings.h> defines strncasecmp.)
+])
+
 dnl Do a series of bizarre compilation tests
 save_CFLAGS=$CFLAGS
 
@@ -74,7 +99,7 @@ CFLAGS="${CFLAGS} -Wall -Werror"
 AC_MSG_CHECKING([for ntohl in sys/param.h])
 AC_TRY_COMPILE([#include <sys/param.h>
 void foo() { int meuh; ntohl(meuh); }],,
- AC_DEFINE(NTOHL_IN_SYS_PARAM_H, 1, Define if ntohl is in <sys/param.h>.)
+ AC_DEFINE(NTOHL_IN_SYS_PARAM_H, 1, Define if <sys/param.h> defines ntohl.)
  AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
 
 dnl Check for -rdynamic flag
@@ -110,11 +135,17 @@ dnl
 dnl  default modules
 dnl
 BUILTINS="${BUILTINS} es ps ts yuv idct idctclassic motion"
-if test x$host_os = xbeos; then
+case x$host_os in
+  xbeos|xnto-qnx)
     ACCEL_PLUGINS="yuvmmx idctmmx motionmmx"
-else
+    ;;
+  xmingw32msvc)
+    ACCEL_PLUGINS="idctmmx idctmmxext motionmmx motionmmxext"
+    ;;
+  *)
     ACCEL_PLUGINS="yuvmmx idctmmx idctmmxext motionmmx motionmmxext"
-fi
+    ;;
+esac
 
 dnl
 dnl  DVD module: check for DVD ioctls
@@ -166,7 +197,7 @@ AC_ARG_ENABLE(mmx,
 [  --disable-mmx           Disable MMX optimizations (default enabled for x86)],
 [ if test x$enableval = xyes; then ARCH="${ARCH} mmx";
   BUILTINS="${BUILTINS} ${ACCEL_PLUGINS}"; fi ],
-[ if test x${host_cpu} = xi686 -o x${host_cpu} = xi586 -o x${host_cpu} = xx86; then ARCH="${ARCH} mmx";
+[ if test x${host_cpu} = xi686 -o x${host_cpu} = xi586 -o x${host_cpu} = xx86 -o x${host_cpu} = xi386; then ARCH="${ARCH} mmx";
   BUILTINS="${BUILTINS} ${ACCEL_PLUGINS}"; fi ])
 
 dnl
@@ -507,9 +538,9 @@ trace mode            : ${TRACE}
 optimizations         : ${OPTIMS}
 CSS decryption        : ${CSS}
 need builtin getopt   : ${GETOPT}
-plugin modules        : ${PLUGINS}
-built-in modules      : ${BUILTINS}
-vlc aliases           : ${ALIASES}
+plugin modules        :${PLUGINS}
+built-in modules      :${BUILTINS}
+vlc aliases           :${ALIASES}
 
 You may now tune Makefile.opts at your convenience."
 
index 0f41fb692366816f1ac535b714c75cbca4ff9a8f..3462a3e0ab0ae742295b3500739bc671a1750201 100644 (file)
@@ -75,6 +75,9 @@
 #include <unixlib.h>
 #if HAVE_STRING_H - 0
 #include <string.h>
+#ifdef STRNCASECMP_IN_STRINGS_H
+#   include <strings.h>
+#endif
 #endif
 #endif
 
@@ -650,6 +653,7 @@ int
                                else
                                {
                                        if (opterr)
+                                       {
                                                if (argv[optind - 1][1] == '-')
                                                        /* --option */
                                                        fprintf(stderr,
@@ -660,6 +664,7 @@ int
                                                        fprintf(stderr,
                                                                _("%s: option `%c%s' doesn't allow an argument\n"),
                                                                argv[0], argv[optind - 1][0], pfound->name);
+                                       }
 
                                        nextchar += strlen(nextchar);
 
index 04b8c86de7d090946435f345530e523dd8dedcc9..fafb4a72492f0321b3df056f9630dc07c26dd968 100644 (file)
@@ -3,7 +3,7 @@
  * Collection of useful common types and macros definitions
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: common.h,v 1.30 2001/04/11 02:01:24 henri Exp $
+ * $Id: common.h,v 1.31 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@via.ecp.fr>
  *          Vincent Seguin <seguin@via.ecp.fr>
@@ -142,6 +142,7 @@ struct data_packet_s;
 
 #ifdef NTOHL_IN_SYS_PARAM_H
 #   include <sys/param.h>
+#elif defined(WIN32)
 #else
 #   include <netinet/in.h>
 #endif
index 56e98f1a8faef890a4a3b9b7211aafdb70496d19..4025bd6ea0f0cd8bf0bed18138495a1c5caa9435 100644 (file)
  * message function was called */
 #define INTF_MSG_DBG_FORMAT             "## %s:%s(),%i: "
 
-/* Maximal number of arguments on a command line, including the function name */
+/* Max number of arguments on a command line, including the function name */
 #define INTF_MAX_ARGS                   20
 
 /* Maximal size of a command line in a script */
index 4a17a5dbeeeb2c3721ae10ee94ee999ce522faa8..9caa9fed28c5ae54f3a26f41b5131c41d7d2df05 100644 (file)
 /* Define if you have the <stddef.h> header file.  */
 #undef HAVE_STDDEF_H
 
+/* Define if you have the <strings.h> header file.  */
+#undef HAVE_STRINGS_H
+
 /* Define if you have the <sys/ioctl.h> header file.  */
 #undef HAVE_SYS_IOCTL_H
 
 /* getopt support */
 #undef HAVE_GETOPT_LONG
 
-/* Define if ntohl is in <sys/param.h>. */
+/* Define if <pthread.h> defines pthread_cond_t. */
+#undef PTHREAD_COND_T_IN_PTHREAD_H
+
+/* Define if <strings.h> defines strncasecmp. */
+#undef STRNCASECMP_IN_STRINGS_H
+
+/* Define if <sys/param.h> defines ntohl. */
 #undef NTOHL_IN_SYS_PARAM_H
 
 /* Define if <sys/types.h> defines boolean_t. */
index d1e022d57d659fdd7dff720d63d9bbf90fe84996..d79a7422636de9801a29247427e2b48c8db18f85 100644 (file)
@@ -2,7 +2,7 @@
  * input_ext-dec.h: structures exported to the VideoLAN decoders
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: input_ext-dec.h,v 1.29 2001/04/25 10:22:32 massiot Exp $
+ * $Id: input_ext-dec.h,v 1.30 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Michel Kaempf <maxx@via.ecp.fr>
@@ -169,7 +169,7 @@ typedef struct bit_stream_s
     byte_t *                p_byte;
     /* Pointer to the last byte that is to be read (in the current packet */
     byte_t *                p_end;
-    /* Temporary buffer in case we're not aligned when changing data packets. */
+    /* Temporary buffer in case we're not aligned when changing data packets */
     WORD_TYPE               i_showbits_buffer;
     data_packet_t           showbits_data;
 } bit_stream_t;
index 3224c49a88667a84e1f6257e09a517a0cf47dedf..728cc32d4cdfb2222eaa46799aef56e00434064d 100644 (file)
@@ -2,7 +2,7 @@
  * modules.h : Module management functions.
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: modules.h,v 1.20 2001/04/15 04:19:57 sam Exp $
+ * $Id: modules.h,v 1.21 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
+#ifdef WIN32
+#include <sys/types.h>                                              /* off_t */
+#endif
+
 /* Number of tries before we unload an unused module */
 #define MODULE_HIDE_DELAY 100
 
index 1bc62cc4c77cdd4c49983bfe33d4412fbc5d50d0..bf67af4f193989cc2d9c1850bbb7db7ed7e30296 100644 (file)
@@ -3,7 +3,7 @@
  * This header provides a portable threads implementation.
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: threads.h,v 1.16 2001/03/21 13:42:33 sam Exp $
+ * $Id: threads.h,v 1.17 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
  *          Samuel Hocevar <sam@via.ecp.fr>
 
 #include <stdio.h>
 
-#if defined(HAVE_PTHREAD_H)            /* pthreads (Linux & BSD for example) */
+#if defined(PTHREAD_COND_T_IN_PTHREAD_H)      /* pthreads (like Linux & BSD) */
 #include <pthread.h>
 
 #elif defined(HAVE_CTHREADS_H)                                    /* GNUMach */
 #include <cthreads.h>
 
-#elif defined(HAVE_KERNEL_SCHEDULER_H) && defined(HAVE_KERNEL_OS_H)   /* BeOS */
+#elif defined(HAVE_KERNEL_SCHEDULER_H) && defined(HAVE_KERNEL_OS_H)  /* BeOS */
 #undef MAX
 #undef MIN
 #include <kernel/OS.h>
 #include <kernel/scheduler.h>
 #include <byteorder.h>
+
+#elif defined(WIN32)                          /* Win32 with MinGW32 compiler */
+#include <windows.h>
+#include <process.h>
+
 #else
 #error no threads available on your system !
 #endif
  * Types definition
  *****************************************************************************/
 
-#if defined(HAVE_PTHREAD_H)
-
+#if defined(PTHREAD_COND_T_IN_PTHREAD_H)
 typedef pthread_t        vlc_thread_t;
 typedef pthread_mutex_t  vlc_mutex_t;
 typedef pthread_cond_t   vlc_cond_t;
 
 #elif defined(HAVE_CTHREADS_H)
-
 typedef cthread_t        vlc_thread_t;
 
-/* those structs are the ones defined in /include/cthreads.h but we need
+/* Those structs are the ones defined in /include/cthreads.h but we need
  * to handle (*foo) where foo is a (mutex_t) while they handle (foo) where
  * foo is a (mutex_t*) */
 typedef struct s_mutex {
@@ -99,8 +102,7 @@ typedef struct s_condition {
 } vlc_cond_t;
 
 #elif defined(HAVE_KERNEL_SCHEDULER_H) && defined(HAVE_KERNEL_OS_H)
-
-/* This is the BeOS implementation of the vlc thread, note that the mutex is
+/* This is the BeOS implementation of the vlc threads, note that the mutex is
  * not a real mutex and the cond_var is not like a pthread cond_var but it is
  * enough for what wee need */
 
@@ -118,6 +120,12 @@ typedef struct
     thread_id       thread;
 } vlc_cond_t;
 
+#elif defined(WIN32)
+typedef HANDLE      vlc_thread_t;
+typedef HANDLE      vlc_mutex_t;
+typedef HANDLE      vlc_cond_t; 
+typedef unsigned (__stdcall *PTHREAD_START) (void *);
+
 #endif
 
 typedef void *(*vlc_thread_func_t)(void *p_data);
@@ -126,24 +134,24 @@ typedef void *(*vlc_thread_func_t)(void *p_data);
  * Prototypes
  *****************************************************************************/
 
-static __inline__ int  vlc_thread_create( vlc_thread_t *p_thread, char *psz_name,
-                                          vlc_thread_func_t func, void *p_data );
-static __inline__ void vlc_thread_exit  ( void );
-static __inline__ void vlc_thread_join  ( vlc_thread_t thread );
+static __inline__ int  vlc_thread_create ( vlc_thread_t *, char *,
+                                           vlc_thread_func_t, void * );
+static __inline__ void vlc_thread_exit   ( void );
+static __inline__ void vlc_thread_join   ( vlc_thread_t );
 
-static __inline__ int  vlc_mutex_init    ( vlc_mutex_t *p_mutex );
-static __inline__ int  vlc_mutex_lock    ( vlc_mutex_t *p_mutex );
-static __inline__ int  vlc_mutex_unlock  ( vlc_mutex_t *p_mutex );
-static __inline__ int  vlc_mutex_destroy ( vlc_mutex_t *p_mutex );
+static __inline__ int  vlc_mutex_init    ( vlc_mutex_t * );
+static __inline__ int  vlc_mutex_lock    ( vlc_mutex_t * );
+static __inline__ int  vlc_mutex_unlock  ( vlc_mutex_t * );
+static __inline__ int  vlc_mutex_destroy ( vlc_mutex_t * );
 
-static __inline__ int  vlc_cond_init    ( vlc_cond_t *p_condvar );
-static __inline__ int  vlc_cond_signal  ( vlc_cond_t *p_condvar );
-static __inline__ int  vlc_cond_wait    ( vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex );
-static __inline__ int vlc_cond_destroy  ( vlc_cond_t *p_condvar );
+static __inline__ int  vlc_cond_init     ( vlc_cond_t * );
+static __inline__ int  vlc_cond_signal   ( vlc_cond_t * );
+static __inline__ int  vlc_cond_wait     ( vlc_cond_t *, vlc_mutex_t * );
+static __inline__ int  vlc_cond_destroy  ( vlc_cond_t * );
 
 #if 0
-static _inline__ int    vlc_cond_timedwait   ( vlc_cond_t * condvar, vlc_mutex_t * mutex,
-                              mtime_t absoute_timeout_time );
+static __inline__ int  vlc_cond_timedwait( vlc_cond_t *, vlc_mutex_t *,
+                                           mtime_t );
 #endif
 
 /*****************************************************************************
@@ -153,7 +161,7 @@ static __inline__ int vlc_thread_create( vlc_thread_t *p_thread,
                                          char *psz_name, vlc_thread_func_t func,
                                          void *p_data)
 {
-#if defined(HAVE_PTHREAD_H)
+#if defined(PTHREAD_COND_T_IN_PTHREAD_H)
     return pthread_create( p_thread, NULL, func, p_data );
 
 #elif defined(HAVE_CTHREADS_H)
@@ -165,6 +173,23 @@ static __inline__ int vlc_thread_create( vlc_thread_t *p_thread,
                               B_NORMAL_PRIORITY, p_data );
     return resume_thread( *p_thread );
 
+#elif defined(WIN32)
+#if 0
+    DWORD threadID;
+    /* This method is not recommended when using the MSVCRT C library,
+     * so we'll have to use _beginthreadex instead */
+    *p_thread = CreateThread(0, 0, (LPTHREAD_START_ROUTINE) func, 
+                             p_data, 0, &threadID);
+#endif
+    unsigned threadID;
+    /* When using the MSVCRT C library you have to use the _beginthreadex
+     * function instead of CreateThread, otherwise you'll end up with memory
+     * leaks and the signal function not working */
+    *p_thread = (HANDLE)_beginthreadex(NULL, 0, (PTHREAD_START) func, 
+                             p_data, 0, &threadID);
+    
+    return( *p_thread ? 0 : 1 );
+
 #endif
 }
 
@@ -173,7 +198,7 @@ static __inline__ int vlc_thread_create( vlc_thread_t *p_thread,
  *****************************************************************************/
 static __inline__ void vlc_thread_exit( void )
 {
-#if defined(HAVE_PTHREAD_H)
+#if defined(PTHREAD_COND_T_IN_PTHREAD_H)
     pthread_exit( 0 );
 
 #elif defined(HAVE_CTHREADS_H)
@@ -183,6 +208,14 @@ static __inline__ void vlc_thread_exit( void )
 #elif defined(HAVE_KERNEL_SCHEDULER_H) && defined(HAVE_KERNEL_OS_H)
     exit_thread( 0 );
 
+#elif defined(WIN32)
+#if 0
+    ExitThread( 0 );
+#endif
+    /* For now we don't close the thread handles (because of race conditions).
+     * Need to be looked at. */
+    _endthreadex(0);
+
 #endif
 }
 
@@ -191,7 +224,7 @@ static __inline__ void vlc_thread_exit( void )
  *****************************************************************************/
 static __inline__ void vlc_thread_join( vlc_thread_t thread )
 {
-#if defined(HAVE_PTHREAD_H)
+#if defined(PTHREAD_COND_T_IN_PTHREAD_H)
     pthread_join( thread, NULL );
 
 #elif defined(HAVE_CTHREADS_H)
@@ -201,6 +234,9 @@ static __inline__ void vlc_thread_join( vlc_thread_t thread )
     int32 exit_value;
     wait_for_thread( thread, &exit_value );
 
+#elif defined(WIN32)
+    WaitForSingleObject( thread, INFINITE);
+
 #endif
 }
 
@@ -209,7 +245,7 @@ static __inline__ void vlc_thread_join( vlc_thread_t thread )
  *****************************************************************************/
 static __inline__ int vlc_mutex_init( vlc_mutex_t *p_mutex )
 {
-#if defined(HAVE_PTHREAD_H)
+#if defined(PTHREAD_COND_T_IN_PTHREAD_H)
     return pthread_mutex_init( p_mutex, NULL );
 
 #elif defined(HAVE_CTHREADS_H)
@@ -219,7 +255,11 @@ static __inline__ int vlc_mutex_init( vlc_mutex_t *p_mutex )
 #elif defined(HAVE_KERNEL_SCHEDULER_H) && defined(HAVE_KERNEL_OS_H)
 
     /* check the arguments and whether it's already been initialized */
-    if( p_mutex == NULL ) return B_BAD_VALUE;
+    if( p_mutex == NULL )
+    {
+        return B_BAD_VALUE;
+    }
+
     if( p_mutex->init == 9999 )
     {
         return EALREADY;
@@ -227,10 +267,17 @@ static __inline__ int vlc_mutex_init( vlc_mutex_t *p_mutex )
 
     p_mutex->lock = create_sem( 1, "BeMutex" );
     if( p_mutex->lock < B_NO_ERROR )
+    {
         return( -1 );
+    }
+
     p_mutex->init = 9999;
     return B_OK;
 
+#elif defined(WIN32)
+    *p_mutex = CreateMutex(0,FALSE,0);
+    return (*p_mutex?0:1);
+
 #endif
 }
 
@@ -239,7 +286,7 @@ static __inline__ int vlc_mutex_init( vlc_mutex_t *p_mutex )
  *****************************************************************************/
 static __inline__ int vlc_mutex_lock( vlc_mutex_t *p_mutex )
 {
-#if defined(HAVE_PTHREAD_H)
+#if defined(PTHREAD_COND_T_IN_PTHREAD_H)
     return pthread_mutex_lock( p_mutex );
 
 #elif defined(HAVE_CTHREADS_H)
@@ -249,12 +296,23 @@ static __inline__ int vlc_mutex_lock( vlc_mutex_t *p_mutex )
 #elif defined(HAVE_KERNEL_SCHEDULER_H) && defined(HAVE_KERNEL_OS_H)
     status_t err;
 
-    if( !p_mutex ) return B_BAD_VALUE;
-    if( p_mutex->init < 2000 ) return B_NO_INIT;
+    if( !p_mutex )
+    {
+        return B_BAD_VALUE;
+    }
+
+    if( p_mutex->init < 2000 )
+    {
+        return B_NO_INIT;
+    }
 
     err = acquire_sem( p_mutex->lock );
     return err;
 
+#elif defined(WIN32)
+    WaitForSingleObject( *p_mutex, INFINITE );
+    return 0;
+
 #endif
 }
 
@@ -263,7 +321,7 @@ static __inline__ int vlc_mutex_lock( vlc_mutex_t *p_mutex )
  *****************************************************************************/
 static __inline__ int vlc_mutex_unlock( vlc_mutex_t *p_mutex )
 {
-#if defined(HAVE_PTHREAD_H)
+#if defined(PTHREAD_COND_T_IN_PTHREAD_H)
     return pthread_mutex_unlock( p_mutex );
 
 #elif defined(HAVE_CTHREADS_H)
@@ -271,13 +329,23 @@ static __inline__ int vlc_mutex_unlock( vlc_mutex_t *p_mutex )
     return 0;
 
 #elif defined(HAVE_KERNEL_SCHEDULER_H) && defined(HAVE_KERNEL_OS_H)
+    if( !p_mutex)
+    {
+        return B_BAD_VALUE;
+    }
 
-    if(! p_mutex) return B_BAD_VALUE;
-    if( p_mutex->init < 2000 ) return B_NO_INIT;
+    if( p_mutex->init < 2000 )
+    {
+        return B_NO_INIT;
+    }
 
     release_sem( p_mutex->lock );
     return B_OK;
 
+#elif defined(WIN32)
+    ReleaseMutex( *p_mutex );
+    return 0;
+
 #endif
 }
 
@@ -286,13 +354,22 @@ static __inline__ int vlc_mutex_unlock( vlc_mutex_t *p_mutex )
  *****************************************************************************/
 static __inline__ int vlc_mutex_destroy( vlc_mutex_t *p_mutex )
 {
-#if defined(HAVE_PTHREAD_H)    
+#if defined(PTHREAD_COND_T_IN_PTHREAD_H)    
     return pthread_mutex_destroy( p_mutex );
+
 #elif defined(HAVE_KERNEL_SCHEDULER_H) && defined(HAVE_KERNEL_OS_H)
     if( p_mutex->init == 9999 )
+    {
         delete_sem( p_mutex->lock );
+    }
+
     p_mutex->init = 0;
     return B_OK;
+
+#elif defined(WIN32)
+    CloseHandle(*p_mutex);
+    return 0;
+
 #endif    
 }
 
@@ -301,7 +378,7 @@ static __inline__ int vlc_mutex_destroy( vlc_mutex_t *p_mutex )
  *****************************************************************************/
 static __inline__ int vlc_cond_init( vlc_cond_t *p_condvar )
 {
-#if defined(HAVE_PTHREAD_H)
+#if defined(PTHREAD_COND_T_IN_PTHREAD_H)
     return pthread_cond_init( p_condvar, NULL );
 
 #elif defined(HAVE_CTHREADS_H)
@@ -315,15 +392,28 @@ static __inline__ int vlc_cond_init( vlc_cond_t *p_condvar )
 
 #elif defined(HAVE_KERNEL_SCHEDULER_H) && defined(HAVE_KERNEL_OS_H)
     if( !p_condvar )
+    {
         return B_BAD_VALUE;
+    }
 
     if( p_condvar->init == 9999 )
+    {
         return EALREADY;
+    }
 
     p_condvar->thread = -1;
     p_condvar->init = 9999;
     return 0;
 
+#elif defined(WIN32)
+    /* Create an auto-reset event. */
+    *p_condvar = CreateEvent( NULL,   /* no security */
+                              FALSE,  /* auto-reset event */
+                              FALSE,  /* non-signaled initially */
+                              NULL ); /* unnamed */
+
+    return( *p_condvar ? 0 : 1 );
+    
 #endif
 }
 
@@ -332,7 +422,7 @@ static __inline__ int vlc_cond_init( vlc_cond_t *p_condvar )
  *****************************************************************************/
 static __inline__ int vlc_cond_signal( vlc_cond_t *p_condvar )
 {
-#if defined(HAVE_PTHREAD_H)
+#if defined(PTHREAD_COND_T_IN_PTHREAD_H)
     return pthread_cond_signal( p_condvar );
 
 #elif defined(HAVE_CTHREADS_H)
@@ -345,33 +435,45 @@ static __inline__ int vlc_cond_signal( vlc_cond_t *p_condvar )
 
 #elif defined(HAVE_KERNEL_SCHEDULER_H) && defined(HAVE_KERNEL_OS_H)
     if( !p_condvar )
+    {
         return B_BAD_VALUE;
+    }
 
     if( p_condvar->init < 2000 )
+    {
         return B_NO_INIT;
+    }
+
     while( p_condvar->thread != -1 )
     {
         thread_info info;
         if( get_thread_info(p_condvar->thread, &info) == B_BAD_VALUE )
+        {
             return 0;
+        }
 
         if( info.state != B_THREAD_SUSPENDED )
         {
-            // The  waiting thread is not suspended so it could
-            // have been interrupted beetwen the unlock and the
-            // suspend_thread line. That is why we sleep a little
-            // before retesting p_condver->thread.
+            /* The  waiting thread is not suspended so it could
+             * have been interrupted beetwen the unlock and the
+             * suspend_thread line. That is why we sleep a little
+             * before retesting p_condver->thread. */
             snooze( 10000 );
         }
         else
         {
-            // Ok, we have to wake up that thread
+            /* Ok, we have to wake up that thread */
             resume_thread( p_condvar->thread );
             return 0;
         }
     }
     return 0;
 
+#elif defined(WIN32)
+    /* Try to release one waiting thread. */
+    PulseEvent ( *p_condvar );
+    return 0;
+
 #endif
 }
 
@@ -380,7 +482,7 @@ static __inline__ int vlc_cond_signal( vlc_cond_t *p_condvar )
  *****************************************************************************/
 static __inline__ int vlc_cond_wait( vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex )
 {
-#if defined(HAVE_PTHREAD_H)
+#if defined(PTHREAD_COND_T_IN_PTHREAD_H)
     return pthread_cond_wait( p_condvar, p_mutex );
 
 #elif defined(HAVE_CTHREADS_H)
@@ -389,17 +491,23 @@ static __inline__ int vlc_cond_wait( vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex
 
 #elif defined(HAVE_KERNEL_SCHEDULER_H) && defined(HAVE_KERNEL_OS_H)
     if( !p_condvar )
+    {
         return B_BAD_VALUE;
+    }
 
     if( !p_mutex )
+    {
         return B_BAD_VALUE;
+    }
 
     if( p_condvar->init < 2000 )
+    {
         return B_NO_INIT;
+    }
 
-    // The p_condvar->thread var is initialized before the unlock because
-    // it enables to identify when the thread is interrupted beetwen the
-    // unlock line and the suspend_thread line
+    /* The p_condvar->thread var is initialized before the unlock because
+     * it enables to identify when the thread is interrupted beetwen the
+     * unlock line and the suspend_thread line */
     p_condvar->thread = find_thread( NULL );
     vlc_mutex_unlock( p_mutex );
     suspend_thread( p_condvar->thread );
@@ -408,6 +516,18 @@ static __inline__ int vlc_cond_wait( vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex
     vlc_mutex_lock( p_mutex );
     return 0;
 
+#elif defined(WIN32)
+    /* Release the <external_mutex> here and wait for the event
+     * to become signaled, due to <pthread_cond_signal> being
+     * called. */
+    vlc_mutex_unlock( p_mutex );
+
+    WaitForSingleObject( *p_condvar, INFINITE );
+
+    /* Reacquire the mutex before returning. */
+    vlc_mutex_lock( p_mutex );
+    return 0;
+
 #endif
 }
 
@@ -416,10 +536,17 @@ static __inline__ int vlc_cond_wait( vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex
  *****************************************************************************/
 static __inline__ int vlc_cond_destroy( vlc_cond_t *p_condvar )
 {
-#if defined(HAVE_PTHREAD_H)
+#if defined(PTHREAD_COND_T_IN_PTHREAD_H)
     return pthread_cond_destroy( p_condvar );
+
 #elif defined(HAVE_KERNEL_SCHEDULER_H) && defined(HAVE_KERNEL_OS_H)
     p_condvar->init = 0;
     return 0;
+
+#elif defined(WIN32)
+    CloseHandle( *p_condvar );
+    return 0;
+
 #endif    
 }
+
index 3211960cb10712a40f65717abacbde1f13d9c2ca..50d2ef78e3b9059bd0a1de6c0e4074b1d7da770f 100644 (file)
@@ -1,11 +1,11 @@
 /*****************************************************************************
  * dvd_udf.c: udf filesystem tools.
- * ---
+ *****************************************************************************
  * Mainly used to find asolute logical block adress of *.ifo files. It only
  * contains the basic udf handling functions
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: dvd_udf.c,v 1.5 2001/04/15 04:19:57 sam Exp $
+ * $Id: dvd_udf.c,v 1.6 2001/04/28 03:36:25 sam Exp $
  *
  * Author: Stéphane Borel <stef@via.ecp.fr>
  *
@@ -43,6 +43,9 @@
 #include <stdio.h>
 #include <unistd.h>
 #include <string.h>
+#ifdef STRNCASECMP_IN_STRINGS_H
+#   include <strings.h>
+#endif
 #include <fcntl.h>
 
 #include "common.h"
@@ -85,8 +88,8 @@ typedef struct ad_s
 
 /*****************************************************************************
  * UDFReadLB: reads absolute Logical Block of the disc
- * ---
- * returns number of read bytes on success, 0 on error
+ *****************************************************************************
+ * Returns number of read bytes on success, 0 on error
  *****************************************************************************/
 static int UDFReadLB( int i_fd, off_t i_lba, size_t i_block_count, u8 *pi_data )
 {
@@ -244,8 +247,8 @@ static int UDFPartition( u8 * pi_data, u16 * pi_flags, u16 * pi_nb,
 
 /*****************************************************************************
  * UDFLogVolume: reads the volume descriptor and checks the parameters
- * ---
- * returns 0 on OK, 1 on error
+ *****************************************************************************
+ * Returns 0 on OK, 1 on error
  *****************************************************************************/
 static int UDFLogVolume(u8 * pi_data, char * p_volume_descriptor )
 {
@@ -357,7 +360,7 @@ static int UDFFileIdentifier( u8 * pi_data, u8 * pi_file_characteristics,
 
 /*****************************************************************************
  * UDFMapICB: Maps ICB to FileAD
- * ---
+ *****************************************************************************
  * ICB: Location of ICB of directory to scan
  * FileType: Type of the file
  * File: Location of file the ICB is pointing to
@@ -397,7 +400,7 @@ static int UDFMapICB( struct ad_s icb, u8 * pi_file_type, struct ad_s * p_file,
 
 /*****************************************************************************
  * UDFScanDir: serach filename in dir
- * ---
+ *****************************************************************************
  * Dir: Location of directory to scan
  * FileName: Name of file to look for
  * FileICB: Location of ICB of the found file
@@ -489,14 +492,13 @@ static int UDFScanDir( struct ad_s dir, char * psz_filename,
     return 0;
 }
 
-
-/******************************************************************************
+/*****************************************************************************
  * UDFFindPartition: looks for a partition on the disc
- * ---
+ *****************************************************************************
  *   partnum: number of the partition, starting at 0
  *   part: structure to fill with the partition information
  *   return 1 if partition found, 0 on error;
- ******************************************************************************/
+ *****************************************************************************/
 static int UDFFindPartition( int i_part_nb, struct partition_s *p_partition )
 {
     u8          pi_lb[DVD_LB_SIZE];
@@ -634,13 +636,13 @@ static int UDFFindPartition( int i_part_nb, struct partition_s *p_partition )
 }
 
 
-/******************************************************************************
+/*****************************************************************************
  * UDFFindFile: looks for a file on the UDF disc/imagefile
- * ---
+ *****************************************************************************
  * Path has to be the absolute pathname on the UDF filesystem,
  * starting with '/'.
  * returns absolute LB number, or 0 on error
- ******************************************************************************/
+ *****************************************************************************/
 u32 UDFFindFile( int i_fd, char * psz_path )
 {
     struct partition_s  partition;
@@ -737,3 +739,4 @@ u32 UDFFindFile( int i_fd, char * psz_path )
 
     return partition.i_start + file.i_location;
 }
+
index 520abbb099dd84921ccb96f272c20aacf13060fb..2dbd2366d3596b1df32c18810f7bb8b183e017bf 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
  * input_dvd.c: DVD raw reading plugin.
- * ---
+ *****************************************************************************
  * This plugins should handle all the known specificities of the DVD format,
  * especially the 2048 bytes logical block size.
  * It depends on:
@@ -10,7 +10,7 @@
  *  -dvd_udf to find files
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: input_dvd.c,v 1.50 2001/04/27 19:29:11 massiot Exp $
+ * $Id: input_dvd.c,v 1.51 2001/04/28 03:36:25 sam Exp $
  *
  * Author: Stéphane Borel <stef@via.ecp.fr>
  *
@@ -51,6 +51,9 @@
 #include <sys/uio.h>
 
 #include <string.h>
+#ifdef STRNCASECMP_IN_STRINGS_H
+#   include <strings.h>
+#endif
 #include <errno.h>
 
 #include "config.h"
@@ -1346,7 +1349,8 @@ static int DVDChapterSelect( thread_dvd_data_t * p_dvd, int i_chapter )
 
     DVDChooseAngle( p_dvd );
 
-    /* Search for cell_index in cell adress_table and initialize start sector */
+    /* Search for cell_index in cell adress_table and initialize
+     * start sector */
     if( DVDFindSector( p_dvd ) < 0 )
     {
         intf_ErrMsg( "dvd error: can't select chapter" );
index 97521df4c673f7ce513086144e2c5b3a16ab6c68..a2f157d495bfc2c2733660035839f93efea310e5 100644 (file)
@@ -2,7 +2,7 @@
  * fb.c : framebuffer plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: fb.c,v 1.5 2001/03/21 13:42:33 sam Exp $
+ * $Id: fb.c,v 1.6 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *      
@@ -51,7 +51,7 @@ MODULE_CONFIG_END
 
 /*****************************************************************************
  * Capabilities defined in the other files.
- ******************************************************************************/
+ *****************************************************************************/
 void _M( vout_getfunctions )( function_list_t * p_function_list );
 
 /*****************************************************************************
index 2af618b654f0d79a87c95448483d3c9b685013bf..d6dad64b70e5c5ce508483a0e49fce73f46c1f4a 100644 (file)
@@ -2,7 +2,7 @@
  * ggi.c : GGI plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: ggi.c,v 1.5 2001/03/21 13:42:34 sam Exp $
+ * $Id: ggi.c,v 1.6 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *      
@@ -51,7 +51,7 @@ MODULE_CONFIG_END
 
 /*****************************************************************************
  * Capabilities defined in the other files.
- ******************************************************************************/
+ *****************************************************************************/
 void _M( vout_getfunctions )( function_list_t * p_function_list );
 
 /*****************************************************************************
index bde18a23ddad49772f7e750b630ce5b9b06793c7..86c255a0d77090282730bb2e0e844bf2f48b22f6 100644 (file)
@@ -2,7 +2,7 @@
  * glide.c : 3dfx Glide plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: glide.c,v 1.4 2001/03/21 13:42:34 sam Exp $
+ * $Id: glide.c,v 1.5 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -51,7 +51,7 @@ MODULE_CONFIG_END
 
 /*****************************************************************************
  * Capabilities defined in the other files.
- ******************************************************************************/
+ *****************************************************************************/
 void _M( vout_getfunctions )( function_list_t * p_function_list );
 
 /*****************************************************************************
index 67c42de36bec9ee437d3922459a492e59ab7a282..700ff98bcfb78ac9b282a22604a40ebd56e7c5af 100644 (file)
@@ -2,7 +2,7 @@
  * gnome.c : Gnome plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000 VideoLAN
- * $Id: gnome.c,v 1.6 2001/03/21 13:42:34 sam Exp $
+ * $Id: gnome.c,v 1.7 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *      
@@ -48,7 +48,7 @@ MODULE_CONFIG_END
 
 /*****************************************************************************
  * Capabilities defined in the other files.
- ******************************************************************************/
+ *****************************************************************************/
 void _M( intf_getfunctions )( function_list_t * p_function_list );
 
 /*****************************************************************************
index 48298ba74cbfa2cb531e19f5103fe81e759f37ea..f6ea542fc07bbfca11cf6295c802e4c54c22fdcc 100644 (file)
@@ -2,7 +2,7 @@
  * gtk.c : Gtk+ plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000 VideoLAN
- * $Id: gtk.c,v 1.2 2001/03/21 13:42:34 sam Exp $
+ * $Id: gtk.c,v 1.3 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *      
@@ -48,7 +48,7 @@ MODULE_CONFIG_END
 
 /*****************************************************************************
  * Capabilities defined in the other files.
- ******************************************************************************/
+ *****************************************************************************/
 void _M( intf_getfunctions )( function_list_t * p_function_list );
 
 /*****************************************************************************
index 4acfd9f9c42714102c413102c59d44c856f122e2..e32e8340a2e82e47734eae59cb896ca767585df7 100644 (file)
@@ -2,7 +2,7 @@
  * gtk_callbacks.c : Callbacks for the Gtk+ plugin.
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: gtk_callbacks.c,v 1.14 2001/04/11 04:31:59 sam Exp $
+ * $Id: gtk_callbacks.c,v 1.15 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Stéphane Borel <stef@via.ecp.fr>
@@ -29,7 +29,7 @@
  * Preamble
  *****************************************************************************/
 #include "defs.h"
-
+#include <sys/types.h>                                              /* off_t */                           
 #include <stdlib.h>
 
 #include <gtk/gtk.h>
@@ -58,7 +58,7 @@
 
 /*****************************************************************************
  * Callbacks
- ******************************************************************************/
+ *****************************************************************************/
 void
 on_menubar_open_activate               (GtkMenuItem     *menuitem,
                                         gpointer         user_data)
index 9b3b6c04f5bbb3ec1bc3e7fb089f544caedcff19..e87c4e30ab89af4cdf28b3e805588fab2119a458 100644 (file)
@@ -2,7 +2,7 @@
  * gtk_playlist.c : Interface for the playlist dialog
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: gtk_playlist.c,v 1.9 2001/04/08 13:09:32 octplane Exp $
+ * $Id: gtk_playlist.c,v 1.10 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Pierre Baillet <oct@zoy.org>
  *      
@@ -170,7 +170,11 @@ rebuildCList(GtkCList * clist, playlist_t * playlist_p)
    
     for( dummy=0; dummy < playlist_p->i_size; dummy++ )
     {
+#ifdef WIN32 /* WIN32 HACK */
+        text[0] = g_strdup( "" );
+#else
         text[0] = g_strdup( rindex( (char *)(playlist_p->p_item[playlist_p->i_size -1 - dummy].psz_name ), '/' ) + 1 );
+#endif
         text[1] = g_strdup( "no info");
         
         gtk_clist_insert( clist, 0, text );
index 7690712af18173954f0c0248348ce5f9da7ea9ce..5a88ca9b1f44f459d6b68ebf9edad081a2d43741 100644 (file)
@@ -340,7 +340,8 @@ static int MakeWindow( vout_thread_t *p_vout )
 }
 
 /*****************************************************************************
- * AllocBuffer: forces offscreen allocation (if different than current) in memory type specified
+ * AllocBuffer: forces offscreen allocation (if different than current) in
+ * memory type specified
  *****************************************************************************/
 static int AllocBuffer ( vout_thread_t *p_vout, short index )
 {
@@ -462,7 +463,7 @@ static void vout_Display( vout_thread_t *p_vout )
 
 /*****************************************************************************
  * flushQD: flushes buffered window area
 *****************************************************************************/
+ *****************************************************************************/
 void flushQD( vout_thread_t *p_vout )
 {
     CGrafPtr thePort;
@@ -491,7 +492,7 @@ void flushQD( vout_thread_t *p_vout )
 
 /*****************************************************************************
  * BlitToWindow: checks offscreen and blits it to the front
 *****************************************************************************/
+ *****************************************************************************/
 
 void BlitToWindow( vout_thread_t *p_vout, short index )
 {
index fc0c7d6df5f21509eb74508111562713867353a2..e5938c0a7d408fc0be0bb72e7989589c8eeff075 100644 (file)
@@ -2,7 +2,7 @@
  * mga.c : Matrox Graphic Array plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: mga.c,v 1.4 2001/03/21 13:42:34 sam Exp $
+ * $Id: mga.c,v 1.5 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -51,7 +51,7 @@ MODULE_CONFIG_END
 
 /*****************************************************************************
  * Capabilities defined in the other files.
- ******************************************************************************/
+ *****************************************************************************/
 void _M( vout_getfunctions )( function_list_t * p_function_list );
 
 /*****************************************************************************
index e971328350b00e3dc8eed7270fc7855f1fd5c423..c3d3341d14aa0dab1051c459d0fa9b69e2ba0ca9 100644 (file)
@@ -2,7 +2,7 @@
  * input_es.c: Elementary Stream demux and packet management
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: input_es.c,v 1.1 2001/04/20 15:02:48 sam Exp $
+ * $Id: input_es.c,v 1.2 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: 
  *
@@ -213,7 +213,11 @@ static void ESSeek( input_thread_t * p_input, off_t i_position )
     p_method = (thread_es_data_t *)p_input->p_plugin_data;
 
     /* A little bourrin but should work for a while --Meuuh */
+#ifndef WIN32
     fseeko( p_method->stream, i_position, SEEK_SET );
+#else
+    fseek( p_method->stream, (long)i_position, SEEK_SET );
+#endif
 
     p_input->stream.p_selected_area->i_tell = i_position;
 }
index c04de149c1fc9dbd861bdb32dbf03a1c4752cab4..ce10c6b52710c5e964de5c1aef7a8069f68f1837 100644 (file)
@@ -2,7 +2,7 @@
  * input_ps.c: PS demux and packet management
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: input_ps.c,v 1.19 2001/04/27 23:29:14 stef Exp $
+ * $Id: input_ps.c,v 1.20 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Cyril Deguet <asmax@via.ecp.fr>
@@ -32,6 +32,9 @@
 
 #include <stdlib.h>
 #include <string.h>
+#ifdef STRNCASECMP_IN_STRINGS_H
+#   include <strings.h>
+#endif
 #include <errno.h>
 
 #include <sys/types.h>
@@ -527,7 +530,11 @@ static void PSSeek( input_thread_t * p_input, off_t i_position )
     p_method = (thread_ps_data_t *)p_input->p_plugin_data;
 
     /* A little bourrin but should work for a while --Meuuh */
+#ifndef WIN32
     fseeko( p_method->stream, i_position, SEEK_SET );
+#else
+    fseek( p_method->stream, (long)i_position, SEEK_SET );
+#endif
 
     p_input->stream.p_selected_area->i_tell = i_position;
 }
index 0ed311ea89f2ba631b75f9a87c242fd63ff503f7..5f5ee9c0a2d2dd31262a45104283f59ac1817e33 100644 (file)
@@ -2,7 +2,7 @@
  * input_ts.c: TS demux and netlist management
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: input_ts.c,v 1.15 2001/04/27 16:08:26 sam Exp $
+ * $Id: input_ts.c,v 1.16 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Henri Fallon <henri@videolan.org>
  *
 
 #include <stdlib.h>
 #include <string.h>
+#ifdef STRNCASECMP_IN_STRINGS_H
+#   include <strings.h>
+#endif
 #include <errno.h>
 
 #include <sys/types.h>
 #include <sys/time.h>
+
 #ifdef SYS_NTO
 #include <sys/select.h>
 #endif
+
+#ifndef WIN32
 #include <sys/uio.h>
+#endif
+
 #include <sys/stat.h>
 #include <unistd.h>
 #include <fcntl.h>
@@ -195,7 +203,7 @@ static void TSInit( input_thread_t * p_input )
  *****************************************************************************/
 void TSFakeOpen( input_thread_t * p_input )
 {
-#if !defined( SYS_BEOS ) && !defined( SYS_NTO )
+#if !defined( SYS_BEOS ) && !defined( SYS_NTO ) && !defined( WIN32 )
     char *psz_name = p_input->p_source;
 
     if( ( strlen(psz_name) > 3 ) && !strncasecmp( psz_name, "ts:", 3 ) )
@@ -279,7 +287,11 @@ static int TSRead( input_thread_t * p_input,
     
     if( i_data )
     {
+#ifndef WIN32
         i_read = readv( p_input->i_handle, p_iovec, INPUT_READ_ONCE );
+#else
+        i_read = -1;
+#endif
         
         if( i_read == -1 )
         {
@@ -301,3 +313,4 @@ static int TSRead( input_thread_t * p_input,
     }
     return 0;
 }
+
index cd17ca4b2c1706814e37df568f2a1896fa2d9f43..0431be21e6c1df878ddcf6fe3937f4f56e729442 100644 (file)
@@ -2,7 +2,7 @@
  * aout_sdl.c : audio sdl functions library
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: aout_sdl.c,v 1.11 2001/04/26 11:23:16 sam Exp $
+ * $Id: aout_sdl.c,v 1.12 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -109,7 +109,6 @@ static int aout_Probe( probedata_t *p_data )
 {
     SDL_AudioSpec desired, obtained;
 
-    return 0;
     /* Start AudioSDL */
     if( SDL_Init(SDL_INIT_AUDIO | SDL_INIT_NOPARACHUTE) != 0 )
     {
@@ -120,7 +119,7 @@ static int aout_Probe( probedata_t *p_data )
     desired.freq       = 11025;                                 /* frequency */
     desired.format     = AUDIO_U8;                        /* unsigned 8 bits */
     desired.channels   = 2;                                          /* mono */
-    desired.callback   = NULL;                   /* no callback function yet */
+    desired.callback   = aout_SDLCallback;    /* callback function mandatory */
     desired.userdata   = NULL;                     /* null parm for callback */
     desired.samples    = 4096;
 
@@ -133,6 +132,7 @@ static int aout_Probe( probedata_t *p_data )
     }
 
     /* Otherwise, there are good chances we can use this plugin, return 100. */
+    intf_DbgMsg( "aout: SDL_OpenAudio successfully run" );
     SDL_CloseAudio();
 
     if( TestMethod( AOUT_METHOD_VAR, "sdl" ) )
index 69f6109c2bbb403ae8ec426cdc4d89284545d46c..5ecb714569a420e2de8e43a4933eabcc6a37a662 100644 (file)
@@ -2,7 +2,7 @@
  * sdl.c : SDL plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: sdl.c,v 1.14 2001/03/21 13:42:34 sam Exp $
+ * $Id: sdl.c,v 1.15 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Pierre Baillet <oct@zoy.org>
@@ -55,7 +55,7 @@ MODULE_CONFIG_END
 
 /*****************************************************************************
  * Capabilities defined in the other files.
- ******************************************************************************/
+ *****************************************************************************/
 void _M( aout_getfunctions )( function_list_t * p_function_list );
 void _M( vout_getfunctions )( function_list_t * p_function_list );
 
index b0bf0f7514ae21159a93d71ab8630f86f2a1aa34..e588042c0f299ddc5d6b4dd8b5419accca2d6a92 100644 (file)
@@ -2,7 +2,7 @@
  * vout_sdl.c: SDL video output display method
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: vout_sdl.c,v 1.47 2001/04/11 02:01:24 henri Exp $
+ * $Id: vout_sdl.c,v 1.48 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Pierre Baillet <oct@zoy.org>
@@ -158,8 +158,12 @@ static int vout_Create( vout_thread_t *p_vout )
     }
 
     /* Initialize library */
-    if( SDL_Init(SDL_INIT_VIDEO | SDL_INIT_EVENTTHREAD | SDL_INIT_NOPARACHUTE)
-            < 0 )
+    if( SDL_Init( SDL_INIT_VIDEO
+#ifndef WIN32
+    /* Win32 SDL implementation doesn't support SDL_INIT_EVENTTHREAD yet*/
+                | SDL_INIT_EVENTTHREAD
+#endif
+               | SDL_INIT_NOPARACHUTE ) < 0 )
     {
         intf_ErrMsg( "vout error: can't initialize SDL (%s)", SDL_GetError() );
         free( p_vout->p_sys );
index 13884015bccbbefc11af3acca71f3db0f35342a0..a65531d5a7760acadbac379e886846d691766109 100644 (file)
@@ -2,7 +2,7 @@
  * ncurses.c : NCurses plugin for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: ncurses.c,v 1.3 2001/03/21 13:42:34 sam Exp $
+ * $Id: ncurses.c,v 1.4 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *      
@@ -48,7 +48,7 @@ MODULE_CONFIG_END
 
 /*****************************************************************************
  * Capabilities defined in the other files.
- ******************************************************************************/
+ *****************************************************************************/
 void _M( intf_getfunctions )( function_list_t * p_function_list );
 
 /*****************************************************************************
index ebf6a51553cad5d208ea8484a76ec186465e7648..47c7c40c112f2e72bff107f9c10227cc0694005f 100644 (file)
@@ -2,7 +2,7 @@
  * vout_x11.c: X11 video output display method
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: vout_x11.c,v 1.21 2001/04/27 19:29:11 massiot Exp $
+ * $Id: vout_x11.c,v 1.22 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -559,7 +559,8 @@ static int vout_Manage( vout_thread_t *p_vout )
     if ( b_gofullscreen )
     {
         char *psz_display;
-        /* Open display, unsing 'vlc_display' or DISPLAY environment variable */
+        /* Open display, unsing 'vlc_display' or the DISPLAY
+         * environment variable */
         psz_display = XDisplayName( main_GetPszVariable( VOUT_DISPLAY_VAR, NULL ) );
 
         intf_DbgMsg( "vout: changing full-screen status" );
index 57f6dbbb29c68a87d0bb54e8a648672c772f37e8..d56e7e9e6aa09baf0d4679430f319eb6666e8e0b 100644 (file)
@@ -2,7 +2,7 @@
  * x11.c : X11 plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: x11.c,v 1.5 2001/03/21 13:42:34 sam Exp $
+ * $Id: x11.c,v 1.6 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *      
@@ -51,7 +51,7 @@ MODULE_CONFIG_END
 
 /*****************************************************************************
  * Capabilities defined in the other files.
- ******************************************************************************/
+ *****************************************************************************/
 void _M( vout_getfunctions )( function_list_t * p_function_list );
 
 /*****************************************************************************
index 898ca3ff4f174c66f167b3b0bb9f4cc0234bd6c1..d0f9f94113b3549a3593364dbabd7b1abe4771cb 100644 (file)
@@ -2,7 +2,7 @@
  * xvideo.c : Xvideo plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: xvideo.c,v 1.1 2001/04/01 06:21:44 sam Exp $
+ * $Id: xvideo.c,v 1.2 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Shane Harper <shanegh@optusnet.com.au>
  *      
@@ -51,7 +51,7 @@ MODULE_CONFIG_END
 
 /*****************************************************************************
  * Capabilities defined in the other files.
- ******************************************************************************/
+ *****************************************************************************/
 void _M( vout_getfunctions )( function_list_t * p_function_list );
 
 /*****************************************************************************
index b4aedb4932fef03c705a399ac8c79960d79437f7..a2727f9a6fdfd77091568eba36dda8ef3fac1568 100644 (file)
@@ -2,7 +2,7 @@
  * transforms_yuvmmx.h: MMX YUV transformation assembly
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: transforms_yuvmmx.h,v 1.3 2001/03/21 13:42:34 sam Exp $
+ * $Id: transforms_yuvmmx.h,v 1.4 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Olie Lho <ollie@sis.com.tw>
  *          Gaël Hendryckx <jimmy@via.ecp.fr>
@@ -44,7 +44,6 @@ UNUSED_LONGLONG(mmx_blueshift)  = 0x03;
 #undef UNUSED_LONGLONG
 
 #define MMX_INIT_16 "                                                       \n\
-                                                                            \n\
 movd      (%1), %%mm0       # Load 4 Cb       00 00 00 00 u3 u2 u1 u0       \n\
 movd      (%2), %%mm1       # Load 4 Cr       00 00 00 00 v3 v2 v1 v0       \n\
 pxor      %%mm4, %%mm4      # zero mm4                                      \n\
@@ -53,13 +52,11 @@ movq      (%0), %%mm6       # Load 8 Y        Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0       \n\
 "
 
 #define MMX_INIT_16_GRAY "                                                  \n\
-                                                                            \n\
 movq      (%0), %%mm6       # Load 8 Y        Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0       \n\
 #movl      $0, (%3)         # cache preload for image                       \n\
 "
 
 #define MMX_INIT_32 "                                                       \n\
-                                                                            \n\
 movd      (%1), %%mm0       # Load 4 Cb       00 00 00 00 u3 u2 u1 u0       \n\
 movl      $0, (%3)          # cache preload for image                       \n\
 movd      (%2), %%mm1       # Load 4 Cr       00 00 00 00 v3 v2 v1 v0       \n\
@@ -76,7 +73,6 @@ movq      (%0), %%mm6       # Load 8 Y        Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0       \n\
  */
 
 #define MMX_YUV_MUL "                                                       \n\
-                                                                            \n\
 # convert the chroma part                                                   \n\
 punpcklbw %%mm4, %%mm0          # scatter 4 Cb    00 u3 00 u2 00 u1 00 u0   \n\
 punpcklbw %%mm4, %%mm1          # scatter 4 Cr    00 v3 00 v2 00 v1 00 v0   \n\
@@ -104,7 +100,6 @@ pmulhw    mmx_Y_coeff, %%mm7    # Mul 4 Y odd     00 y7 00 y5 00 y3 00 y1   \n\
 "
 
 #define MMX_YUV_YCBR_422 "                                                  \n\
-                                                                            \n\
 punpcklbw %%mm1, %%mm0                                                      \n\
 movq %%mm6, %%mm2                                                           \n\
 punpckhbw %%mm0, %%mm6                                                      \n\
@@ -122,7 +117,6 @@ movq %%mm6, 8(%3)                                                           \n\
  */
 
 #define MMX_YUV_ADD "                                                       \n\
-                                                                            \n\
 # Do horizontal and vertical scaling                                        \n\
 movq      %%mm0, %%mm3          # Copy Cblue                                \n\
 movq      %%mm1, %%mm4          # Copy Cred                                 \n\
@@ -155,7 +149,6 @@ punpcklbw %%mm5, %%mm2          #                 G7 G6 G5 G4 G3 G2 G1 G0   \n\
  */
 
 #define MMX_YUV_GRAY "                                                      \n\
-                                                                            \n\
 # convert the luma part                                                     \n\
 psubusb   mmx_10w, %%mm6                                                    \n\
 movq      %%mm6, %%mm7                                                      \n\
@@ -201,7 +194,6 @@ movq      %%mm2, 8(%3)                                                      \n\
  */
 
 #define MMX_UNPACK_16 "                                                     \n\
-                                                                            \n\
 # mask unneeded bits off                                                    \n\
 pand      mmx_redmask, %%mm0    # b7b6b5b4 b3______ b7b6b5b4 b3______       \n\
 pand      mmx_grnmask, %%mm2    # g7g6g5g4 g3g2____ g7g6g5g4 g3g2____       \n\
@@ -237,7 +229,6 @@ movq      %%mm5, 8(%3)          # store pixel 4-7                           \n\
  */
 
 #define MMX_UNPACK_32 "                                                     \n\
-                                                                            \n\
 pxor      %%mm3, %%mm3  # zero mm3                                          \n\
 movq      %%mm0, %%mm6  #                 B7 B6 B5 B4 B3 B2 B1 B0           \n\
 movq      %%mm1, %%mm7  #                 R7 R6 R5 R4 R3 R2 R1 R0           \n\
@@ -265,3 +256,4 @@ movq      %%mm4, 24(%3) # Store ARGB7 ARGB6                                 \n\
 #pxor      %%mm4, %%mm4  # zero mm4                                          \n\
 #movq      8(%0), %%mm6  # Load 8 Y        Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0           \n\
 "
+
index fd22828aa40ab640c3149ed792afffa02e99a81e..de60d0348bba8bd9054f7eee3920383b2aa97534 100644 (file)
@@ -2,7 +2,7 @@
  * audio_output.c : audio output thread
  *****************************************************************************
  * Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: audio_output.c,v 1.56 2001/03/21 13:42:34 sam Exp $
+ * $Id: audio_output.c,v 1.57 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *
@@ -39,6 +39,9 @@
 #include "defs.h"
 
 #include <unistd.h>                                              /* getpid() */
+#ifdef WIN32                   /* getpid() for win32 is located in process.h */
+#include <process.h>
+#endif
 
 #include <stdio.h>                                           /* "intf_msg.h" */
 #include <stdlib.h>                            /* calloc(), malloc(), free() */
@@ -116,8 +119,8 @@ aout_thread_t *aout_CreateThread( int *pi_status )
         return( NULL );
     }
 
-    p_aout->b_stereo = ( p_aout->i_channels == 2 ) ? 1 : 0; /* FIXME: only works
-                                                   for i_channels == 1 or 2 ??*/
+    /* FIXME: only works for i_channels == 1 or 2 ?? */
+    p_aout->b_stereo = ( p_aout->i_channels == 2 ) ? 1 : 0;
 
     if ( p_aout->pf_setformat( p_aout ) )
     {
index 106f6ea778a363fdb62186fb0c3d74fb5bebfbd4..e923239accfdf8b4d4694d845651e925b7208e91 100644 (file)
@@ -4,7 +4,7 @@
  * decoders.
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: input.c,v 1.101 2001/04/27 18:07:56 henri Exp $
+ * $Id: input.c,v 1.102 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
 #include <fcntl.h>
 #include <unistd.h>
 #include <string.h>
+#ifdef STRNCASECMP_IN_STRINGS_H
+#   include <strings.h>
+#endif
 #include <errno.h>
 
 /* Network functions */
 
-#if !defined( SYS_BEOS ) && !defined( SYS_NTO )
-#include <netdb.h>                                             /* hostent ... */
+#if !defined( SYS_BEOS ) && !defined( SYS_NTO ) && !defined( WIN32 )
+#include <netdb.h>                                            /* hostent ... */
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
@@ -488,7 +491,7 @@ void input_FileOpen( input_thread_t * p_input )
         p_input->stream.p_selected_area->i_size = stat_info.st_size;
     }
     else if( S_ISFIFO(stat_info.st_mode)
-#ifndef SYS_BEOS
+#if !defined( SYS_BEOS ) && !defined( WIN32 )
              || S_ISSOCK(stat_info.st_mode)
 #endif
              )
@@ -509,8 +512,13 @@ void input_FileOpen( input_thread_t * p_input )
     vlc_mutex_unlock( &p_input->stream.stream_lock );
 
     intf_Msg( "input: opening file `%s'", p_input->p_source );
+#ifndef WIN32
     if( (p_input->i_handle = open( psz_name,
                                    /*O_NONBLOCK | O_LARGEFILE*/0 )) == (-1) )
+#else
+    if( (p_input->i_handle = open( psz_name, O_BINARY
+                                   /*O_NONBLOCK | O_LARGEFILE*/ )) == (-1) )
+#endif
     {
         intf_ErrMsg( "input error: cannot open file (%s)", strerror(errno) );
         p_input->b_error = 1;
@@ -531,7 +539,7 @@ void input_FileClose( input_thread_t * p_input )
 }
 
 
-#if !defined( SYS_BEOS ) && !defined( SYS_NTO )
+#if !defined( SYS_BEOS ) && !defined( SYS_NTO ) && !defined( WIN32 )
 /*****************************************************************************
  * input_NetworkOpen : open a network socket 
  *****************************************************************************/
index 8073397bbaf7d90cc629cbbe75ad09c0e102361d..20b4d74531871428d73e5bce108d1ea16f6e030a 100644 (file)
@@ -2,7 +2,7 @@
  * input_clock.c: Clock/System date convertions, stream management
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: input_clock.c,v 1.10 2001/04/26 03:55:44 sam Exp $
+ * $Id: input_clock.c,v 1.11 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -27,6 +27,7 @@
 #include "defs.h"
 
 #include <string.h>                                    /* memcpy(), memset() */
+#include <sys/types.h>                                              /* off_t */
 
 #include "config.h"
 #include "common.h"
index 20e6a2edc2a7278f7d1e6f6cb395096b20e10f1e..5079ed51fcbf8b39f3342f5c4bfb936d98e3df66 100644 (file)
@@ -2,7 +2,7 @@
  * input_dec.c: Functions for the management of decoders
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: input_dec.c,v 1.10 2001/04/06 09:15:47 sam Exp $
+ * $Id: input_dec.c,v 1.11 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -28,6 +28,7 @@
 
 #include <stdlib.h>
 #include <string.h>                                    /* memcpy(), memset() */
+#include <sys/types.h>                                              /* off_t */
 
 #include "config.h"
 #include "common.h"
index 62fd9904ddb110928ec7a30282093d27fc047bba..7be8abbed339eb52409ebf2baaa03235618e1f56 100644 (file)
@@ -2,7 +2,7 @@
  * input_ext-dec.c: services to the decoders
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: input_ext-dec.c,v 1.13 2001/04/25 10:22:33 massiot Exp $
+ * $Id: input_ext-dec.c,v 1.14 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -27,6 +27,7 @@
 #include "defs.h"
 
 #include <string.h>                                    /* memcpy(), memset() */
+#include <sys/types.h>                                              /* off_t */
 
 #include "config.h"
 #include "common.h"
index 2cd82879ab13e499361b854d207f575eef99b614..fdb0ad7d393e35fae13c4f494629ca06227e0185 100644 (file)
@@ -2,7 +2,7 @@
  * input_ext-intf.c: services to the interface
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: input_ext-intf.c,v 1.21 2001/04/27 16:08:26 sam Exp $
+ * $Id: input_ext-intf.c,v 1.22 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
 #include "defs.h"
 
 #include <string.h>                                    /* memcpy(), memset() */
+#include <sys/types.h>                                              /* off_t */
+
+#ifdef WIN32
+#define snprintf _snprintf
+#endif
 
 #include "config.h"
 #include "common.h"
index abf3866ea516bf461a907c0bfc98595b5f456cb1..a685c7b3249089ac5fb479da332e27c94c34cbf3 100644 (file)
@@ -2,7 +2,7 @@
  * input_netlist.c: netlist management
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: input_netlist.c,v 1.33 2001/04/06 09:15:47 sam Exp $
+ * $Id: input_netlist.c,v 1.34 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Henri Fallon <henri@videolan.org>
  *
@@ -29,7 +29,9 @@
 #include <stdlib.h>
 #include <string.h>                                    /* memcpy(), memset() */
 #include <sys/types.h>
+#ifndef WIN32
 #include <sys/uio.h>                                         /* struct iovec */
+#endif
 #include <unistd.h>
 
 #include "config.h"
 #include "input.h"
 #include "input_netlist.h"
 
+#ifdef WIN32 
+struct iovec
+  {
+    void *iov_base;     /* Pointer to data.  */
+    size_t iov_len;     /* Length of data.  */
+  };
+#endif
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/
index 9c78a2f23544394aa5b33abbc57385cae8ef49d7..82356a85ccb958d0de3686c7abd10f8a1046ef82 100644 (file)
@@ -2,7 +2,7 @@
  * input_programs.c: es_descriptor_t, pgrm_descriptor_t management
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: input_programs.c,v 1.51 2001/04/27 19:29:11 massiot Exp $
+ * $Id: input_programs.c,v 1.52 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -28,6 +28,7 @@
 
 #include <stdlib.h>
 #include <string.h>                                    /* memcpy(), memset() */
+#include <sys/types.h>                                              /* off_t */
 
 #include "config.h"
 #include "common.h"
index 118158ee35ad2c586e99e961b4e70c5b0f98e243..fd80efd4934eeeb3fd38fd7688b7586a09d94b72 100644 (file)
@@ -2,7 +2,7 @@
  * mpeg_system.c: TS, PS and PES management
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: mpeg_system.c,v 1.51 2001/04/17 14:54:54 massiot Exp $
+ * $Id: mpeg_system.c,v 1.52 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Michel Lespinasse <walken@via.ecp.fr>
@@ -32,6 +32,7 @@
 
 #include <stdlib.h>
 #include <string.h>                                    /* memcpy(), memset() */
+#include <sys/types.h>                                              /* off_t */
 
 #include "config.h"
 #include "common.h"
index c23091cef94b9fddce651ac959c67b8a876d8daf..2541507934e68dd5f3bddec58dde3090cc5166ae 100644 (file)
@@ -4,7 +4,7 @@
  * interface, such as command line.
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: interface.c,v 1.72 2001/04/11 02:01:24 henri Exp $
+ * $Id: interface.c,v 1.73 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
@@ -32,6 +32,7 @@
 #include <stdlib.h>                                      /* free(), strtol() */
 #include <stdio.h>                                                   /* FILE */
 #include <string.h>                                            /* strerror() */
+#include <sys/types.h>                                              /* off_t */
 
 #include "config.h"
 #include "common.h"
index 929591447094fcc562debd492fdc4a33470aba87..5f3002c6c7a8cef283f4c5c1c813b6a794f4943a 100644 (file)
@@ -2,7 +2,7 @@
  * intf_channels.c: channel handling functions
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: intf_channels.c,v 1.2 2001/03/21 13:42:34 sam Exp $
+ * $Id: intf_channels.c,v 1.3 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
@@ -92,9 +92,9 @@ int intf_LoadChannels( intf_thread_t *p_intf, char *psz_filename )
 
     if( i_index != 0 )
     {
-        /* Allocate array and rewind - some of the lines may be invalid, and the
-         * array will probably be larger than the actual number of channels, but
-         * it has no consequence. */
+        /* Allocate array and rewind - some of the lines may be invalid,
+         * and the array will probably be larger than the actual number of
+         * channels, but it has no consequences. */
         p_intf->p_channel = malloc( sizeof( intf_channel_t ) * i_index );
         if( p_intf->p_channel == NULL )
         {
@@ -296,7 +296,7 @@ static int ParseChannel( intf_channel_t *p_channel, char *psz_str )
                     i_field = -1;
                 }
                 break;
-            case 5:                                          /* input vlan id */
+            case 5:                                         /* input vlan id */
                 p_channel->i_input_vlan_id = strtol( psz_str, &psz_end, 0);
                 if( (*psz_str == '\0') || (*psz_end != '\0') )
                 {
index 40866681e1a483a34779408896721c06e5136c8d..b55bf3cf319fdfc272cc4e5211c3b618ae15f31b 100644 (file)
@@ -4,7 +4,7 @@
  * interface, such as message output. See config.h for output configuration.
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: intf_msg.c,v 1.31 2001/04/27 19:29:11 massiot Exp $
+ * $Id: intf_msg.c,v 1.32 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
 
 #include "main.h"
 
+#ifdef WIN32
+#define snprintf _snprintf         /* snprintf not defined in mingw32 (bug?) */
+#endif
+
 /*****************************************************************************
  * intf_msg_item_t
  *****************************************************************************
index 5a7e23aec5cccdf1fd68edbefb7ead8065fad898..7679075a133e720c6144de16659531719c48d617 100644 (file)
@@ -4,7 +4,7 @@
  * and spawn threads.
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: main.c,v 1.88 2001/04/27 18:07:56 henri Exp $
+ * $Id: main.c,v 1.89 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -261,7 +261,7 @@ int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
     /*
      * Read configuration
      */
-    if( GetConfiguration( &i_argc, ppsz_argv, ppsz_env ) )  /* parse cmd line */
+    if( GetConfiguration( &i_argc, ppsz_argv, ppsz_env ) ) /* parse cmd line */
     {
         intf_MsgDestroy();
         return( errno );
@@ -864,13 +864,15 @@ static void Version( void )
 static void InitSignalHandler( void )
 {
     /* Termination signals */
-    signal( SIGHUP,  FatalSignalHandler );
+#ifndef WIN32
     signal( SIGINT,  FatalSignalHandler );
+    signal( SIGHUP,  FatalSignalHandler );
     signal( SIGQUIT, FatalSignalHandler );
 
     /* Other signals */
     signal( SIGALRM, SimpleSignalHandler );
     signal( SIGPIPE, SimpleSignalHandler );
+#endif
 }
 
 
@@ -897,9 +899,11 @@ static void FatalSignalHandler( int i_signal )
     /* Once a signal has been trapped, the termination sequence will be
      * armed and following signals will be ignored to avoid sending messages
      * to an interface having been destroyed */
-    signal( SIGHUP,  SIG_IGN );
+#ifndef WIN32
     signal( SIGINT,  SIG_IGN );
+    signal( SIGHUP,  SIG_IGN );
     signal( SIGQUIT, SIG_IGN );
+#endif
 
     /* Acknowledge the signal received */
     intf_ErrMsgImm( "intf error: signal %d received, exiting", i_signal );
index e29f96ebe7b05dfd0da1210f0225e11f291b554e..50b9dd8667f6fcaa972e132484746b8c08467ff4 100644 (file)
@@ -2,7 +2,7 @@
  * modules.c : Built-in and plugin modules management functions
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: modules.c,v 1.26 2001/04/20 11:06:48 sam Exp $
+ * $Id: modules.c,v 1.27 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Ethan C. Baldridge <BaldridgeE@cadmus.com>
@@ -72,7 +72,7 @@ static int AllocateBuiltinModule( module_bank_t *,
                                   int ( * ) ( module_t * ),
                                   int ( * ) ( module_t * ),
                                   int ( * ) ( module_t * ) );
-static int FreeModule   ( module_bank_t * p_bank, module_t * );
+static int DeleteModule ( module_bank_t * p_bank, module_t * );
 static int LockModule   ( module_t * );
 static int UnlockModule ( module_t * );
 #ifdef HAVE_DYNAMIC_PLUGINS
@@ -213,7 +213,7 @@ void module_DestroyBank( module_bank_t * p_bank )
 
     while( p_bank->first != NULL )
     {
-        if( FreeModule( p_bank, p_bank->first ) )
+        if( DeleteModule( p_bank, p_bank->first ) )
         {
             /* Module deletion failed */
             intf_ErrMsg( "module error: `%s' can't be removed. trying harder.",
@@ -406,7 +406,7 @@ void module_Unneed( module_bank_t * p_bank, module_t * p_module )
  *****************************************************************************
  * This function loads a dynamically loadable module and allocates a structure
  * for its information data. The module can then be handled by module_Need,
- * module_Unneed and HideModule. It can be removed by FreeModule.
+ * module_Unneed and HideModule. It can be removed by DeleteModule.
  *****************************************************************************/
 static int AllocatePluginModule( module_bank_t * p_bank, char * psz_filename )
 {
@@ -525,7 +525,7 @@ static int AllocatePluginModule( module_bank_t * p_bank, char * psz_filename )
  *****************************************************************************
  * This function registers a built-in module and allocates a structure
  * for its information data. The module can then be handled by module_Need,
- * module_Unneed and HideModule. It can be removed by FreeModule.
+ * module_Unneed and HideModule. It can be removed by DeleteModule.
  *****************************************************************************/
 static int AllocateBuiltinModule( module_bank_t * p_bank,
                                   int ( *pf_init ) ( module_t * ),
@@ -623,11 +623,11 @@ static int AllocateBuiltinModule( module_bank_t * p_bank,
 }
 
 /*****************************************************************************
- * FreeModule: delete a module and its structure.
+ * DeleteModule: delete a module and its structure.
  *****************************************************************************
  * This function can only be called if i_usage <= 0.
  *****************************************************************************/
-static int FreeModule( module_bank_t * p_bank, module_t * p_module )
+static int DeleteModule( module_bank_t * p_bank, module_t * p_module )
 {
     /* If the module is not in use but is still in memory, we first have
      * to hide it and remove it from memory before we can free the
index 79a0331c4f9259757cb0e16e8202190c40a59d2c..5b02400d9ff349554ccf1533088a1e336d49ccb2 100644 (file)
@@ -3,7 +3,7 @@
  * Functions are prototyped in mtime.h.
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: mtime.c,v 1.16 2001/03/21 13:42:34 sam Exp $
+ * $Id: mtime.c,v 1.17 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
 #include <kernel/OS.h>
 #endif
 
+#ifdef WIN32
+#include <windows.h>
+#endif
+
 #include "config.h"
 #include "common.h"
 #include "mtime.h"
@@ -70,9 +74,30 @@ char *mstrtime( char *psz_buffer, mtime_t date )
  *****************************************************************************/
 mtime_t mdate( void )
 {
-#ifdef HAVE_KERNEL_OS_H
+#if defined( HAVE_KERNEL_OS_H )
     return( real_time_clock_usecs() );
-    
+
+#elif defined( WIN32 )
+    /* We don't get the real date, just the value of a high precision timer.
+     * this is because the usual time functions have at best only a milisecond
+     * resolution */
+    mtime_t freq,usec_time;
+
+    if( !QueryPerformanceFrequency((LARGE_INTEGER *)&freq) )
+    {
+        /* Milisecond resolution */
+        FILETIME file_time;
+        GetSystemTimeAsFileTime((FILETIME *)&file_time);
+        usec_time *= 1000;
+    }
+    else
+    {
+        /* Microsecond resolution */
+        QueryPerformanceCounter((LARGE_INTEGER *)&usec_time);
+       usec_time /= (freq/1000000);
+    }
+    return( usec_time );
+
 #else
     struct timeval tv_date;
 
@@ -81,7 +106,7 @@ mtime_t mdate( void )
      * here, since tv is a local variable. */
     gettimeofday( &tv_date, NULL );
     return( (mtime_t) tv_date.tv_sec * 1000000 + (mtime_t) tv_date.tv_usec );
-    
+
 #endif
 }
 
@@ -94,8 +119,7 @@ mtime_t mdate( void )
  *****************************************************************************/
 void mwait( mtime_t date )
 {
-#ifdef HAVE_KERNEL_OS_H
-
+#if defined( HAVE_KERNEL_OS_H )
     mtime_t delay;
     
     delay = date - real_time_clock_usecs();
@@ -104,15 +128,26 @@ void mwait( mtime_t date )
         return;
     }
     snooze( delay );
-#else
 
-#ifdef HAVE_USLEEP
-    struct timeval tv_date;
+#elif defined( WIN32 )
+    mtime_t usec_time, delay;
+
+    usec_time = mdate();
+    delay = date - usec_time;
+    if( delay <= 0 )
+    {
+        return;
+    }
+    /* Sleep only has milisecond resolution */
+    Sleep( (DWORD)(delay/1000) );
 
 #else
-    struct timeval tv_date, tv_delay;
 
-#endif
+#   ifdef HAVE_USLEEP
+    struct timeval tv_date;
+#   else
+    struct timeval tv_date, tv_delay;
+#   endif
     mtime_t        delay;          /* delay in msec, signed to detect errors */
 
     /* see mdate() about gettimeofday() possible errors */
@@ -127,17 +162,17 @@ void mwait( mtime_t date )
         return;
     }
 
-#ifdef HAVE_USLEEP
+#   ifdef HAVE_USLEEP
     usleep( delay );
-#else
+#   else
     tv_delay.tv_sec = delay / 1000000;
     tv_delay.tv_usec = delay % 1000000;
 
     /* see msleep() about select() errors */
     select( 0, NULL, NULL, NULL, &tv_delay );
-#endif
+#   endif
 
-#endif /* HAVE_KERNEL_OS_H */
+#endif
 }
 
 /*****************************************************************************
@@ -147,12 +182,17 @@ void mwait( mtime_t date )
  *****************************************************************************/
 void msleep( mtime_t delay )
 {
-#ifdef HAVE_KERNEL_OS_H
+#if defined( HAVE_KERNEL_OS_H )
     snooze( delay );
-#else
 
-#ifdef HAVE_USLEEP
+#elif defined( WIN32 )
+    Sleep( delay/1000 );             /* Sleep only has milisecond resolution */
+  /* Maybe we could use the multimedia timer to reach the right resolution,  */
+  /* or the old Winsock select() function ?*/
+
+#elif defined( HAVE_USLEEP )
     usleep( delay );
+
 #else
     struct timeval tv_delay;
 
@@ -163,7 +203,7 @@ void msleep( mtime_t delay )
      * (i.e. when a signal is sent to the thread, or when memory is full), and
      * can be ingnored. */
     select( 0, NULL, NULL, NULL, &tv_delay );
-#endif
 
-#endif /* HAVE_KERNEL_OS_H */
+#endif
 }
+
index 70decac2c65d4de38b573c78b1638b3344753a35..bf73a854db32c3801753fc77a620136814bef741 100644 (file)
@@ -2,7 +2,7 @@
  * netutils.c: various network functions
  *****************************************************************************
  * Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: netutils.c,v 1.27 2001/04/27 18:07:57 henri Exp $
+ * $Id: netutils.c,v 1.28 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Benoit Steiner <benny@via.ecp.fr>
  *****************************************************************************/
 #include "defs.h"
 
-#include <netdb.h>                                        /* gethostbyname() */
 #include <stdlib.h>                             /* free(), realloc(), atoi() */
 #include <errno.h>                                                /* errno() */
 #include <string.h>                                      /* bzero(), bcopy() */
 #include <unistd.h>                                         /* gethostname() */
 #include <sys/time.h>                                        /* gettimeofday */
 
+#ifndef WIN32
+#include <netdb.h>                                        /* gethostbyname() */
 #include <netinet/in.h>                               /* BSD: struct in_addr */
 #include <sys/socket.h>                              /* BSD: struct sockaddr */
+#endif
+
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>                           /* inet_ntoa(), inet_aton() */
 #endif
@@ -91,7 +94,7 @@ int network_BuildLocalAddr( struct sockaddr_in * p_socket, int i_port,
     
     /* Reset struct */
     memset( p_socket, 0, sizeof( struct sockaddr_in ) );
-    p_socket->sin_family = AF_INET;                                 /* family */
+    p_socket->sin_family = AF_INET;                                /* family */
     p_socket->sin_port = htons( i_port );
     if( psz_broadcast == NULL )
     {
@@ -143,8 +146,8 @@ int network_BuildRemoteAddr( struct sockaddr_in * p_socket, char * psz_server )
 
     /* Reset structure */
     memset( p_socket, 0, sizeof( struct sockaddr_in ) );
-    p_socket->sin_family = AF_INET;                                 /* family */
-    p_socket->sin_port = htons( 0 );                /* This is for remote end */
+    p_socket->sin_family = AF_INET;                                /* family */
+    p_socket->sin_port = htons( 0 );               /* This is for remote end */
     
      /* Try to convert address directly from in_addr - this will work if
       * psz_in_addr is dotted decimal. */
index 775cec5b6748faa787967235d87f7160c06db123..def2f546a9ed1d0df7010db6276d8b97dcfc31cf 100644 (file)
@@ -2,7 +2,7 @@
  * spu_decoder.c : spu decoder thread
  *****************************************************************************
  * Copyright (C) 2000 VideoLAN
- * $Id: spu_decoder.c,v 1.37 2001/04/25 10:22:33 massiot Exp $
+ * $Id: spu_decoder.c,v 1.38 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -27,6 +27,9 @@
 #include "defs.h"
 
 #include <unistd.h>                                              /* getpid() */
+#ifdef WIN32                   /* getpid() for win32 is located in process.h */
+#include <process.h>
+#endif
 
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>                                    /* memcpy(), memset() */
index fcd4bc4b8a805f5d3a6aebb704c535a6031eb11d..f94efbd3b84ddbed2dd89960c2dcc12cd7b67539 100644 (file)
@@ -2,7 +2,7 @@
  * video_text.c : text manipulation functions
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: video_text.c,v 1.25 2001/04/27 19:29:11 massiot Exp $
+ * $Id: video_text.c,v 1.26 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -254,7 +254,11 @@ vout_font_t *vout_LoadFont( const char *psz_name )
         }
 
         /* Open file */
+#ifndef WIN32
         i_file = open( psz_file, O_RDONLY );
+#else
+        i_file = open( psz_file, O_RDONLY | O_BINARY );
+#endif
         free( psz_file );
 
         if( i_file != -1 )
index 0ca6a621b5bffc2a32a3e9981455d802fc0d13ae..7f324eec241e9c62117a15d0277819182198c121 100644 (file)
@@ -2,7 +2,7 @@
  * video_parser.c : video parser thread
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: video_parser.c,v 1.79 2001/04/25 10:22:33 massiot Exp $
+ * $Id: video_parser.c,v 1.80 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Samuel Hocevar <sam@via.ecp.fr>
@@ -279,7 +279,7 @@ static int InitThread( vpar_thread_t *p_vpar )
     p_vpar->pp_vdec[0]->b_error = 0;
     p_vpar->pp_vdec[0]->p_vpar = p_vpar;
 
-#   ifndef SYS_BEOS
+#   if !defined(SYS_BEOS) && !defined(WIN32)
 #       if VDEC_NICE
     /* Re-nice ourself */
     if( nice(VDEC_NICE) == -1 )
index 50fcc1c101fee52155e9751f5512467a26c8b6fd..a6cb2b4ed4222af6ec721b61c4315cf7699d49e3 100644 (file)
@@ -2,7 +2,7 @@
  * vpar_blocks.c : blocks parsing
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: vpar_blocks.c,v 1.79 2001/02/23 17:58:22 massiot Exp $
+ * $Id: vpar_blocks.c,v 1.80 2001/04/28 03:36:25 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Jean-Marc Dressler <polux@via.ecp.fr>
@@ -204,7 +204,8 @@ static lookup_t     pl_dct_dc_chrom_init_table_2[32] =
     };
  
 
-    /* Tables for ac DCT coefficients. There are cut in many parts to save space */
+    /* Tables for ac DCT coefficients. There are cut in many parts to
+     * save space */
     /* Table B-14, DCT coefficients table zero,
      * codes 0100 ... 1xxx (used for first (DC) coefficient)
      */
@@ -2135,3 +2136,4 @@ DECLARE_PICD( vpar_PictureData2IB, 1, I_CODING_TYPE, BOTTOM_FIELD );
 DECLARE_PICD( vpar_PictureData2PB, 1, P_CODING_TYPE, BOTTOM_FIELD );
 DECLARE_PICD( vpar_PictureData2BB, 1, B_CODING_TYPE, BOTTOM_FIELD );
 #endif
+
index c2fa6c75050afe769ca96b3a4e7022558ff37b70..74b2e8dfb708bdc436772938b690a126c48a1d6b 100644 (file)
@@ -2,7 +2,7 @@
  * vpar_headers.c : headers parsing
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: vpar_headers.c,v 1.81 2001/04/06 09:15:48 sam Exp $
+ * $Id: vpar_headers.c,v 1.82 2001/04/28 03:36:26 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Stéphane Borel <stef@via.ecp.fr>
@@ -344,7 +344,7 @@ static void SequenceHeader( vpar_thread_t * p_vpar )
                     p_vpar->pi_default_intra_quant );
     }
 
-    if( GetBits( &p_vpar->bit_stream, 1 ) ) /* load_non_intra_quantizer_matrix */
+    if( GetBits(&p_vpar->bit_stream, 1) ) /* load_non_intra_quantizer_matrix */
     {
         LoadMatrix( p_vpar, &p_vpar->sequence.nonintra_quant );
     }
@@ -381,7 +381,8 @@ static void SequenceHeader( vpar_thread_t * p_vpar )
         p_vpar->sequence.i_chroma_format = GetBits( &p_vpar->bit_stream, 2 );
         p_vpar->sequence.i_width |= GetBits( &p_vpar->bit_stream, 2 ) << 12;
         p_vpar->sequence.i_height |= GetBits( &p_vpar->bit_stream, 2 ) << 12;
-        /* bit_rate_extension, marker_bit, vbv_buffer_size_extension, low_delay */
+        /* bit_rate_extension, marker_bit, vbv_buffer_size_extension,
+         * low_delay */
         RemoveBits( &p_vpar->bit_stream, 22 );
         /* frame_rate_extension_n */
         i_dummy = GetBits( &p_vpar->bit_stream, 2 );
@@ -693,7 +694,7 @@ static void PictureHeader( vpar_thread_t * p_vpar )
     {
         /* This is a new frame. Get a structure from the video_output. */
         while( ( P_picture = vout_CreatePicture( p_vpar->p_vout,
-                                        99+p_vpar->sequence.i_chroma_format, /*XXX??*/
+                              /* XXX */ 99+p_vpar->sequence.i_chroma_format,
                                         p_vpar->sequence.i_width,
                                         p_vpar->sequence.i_height ) )
              == NULL )
@@ -727,7 +728,8 @@ static void PictureHeader( vpar_thread_t * p_vpar )
 
 #ifdef VDEC_SMP
         /* Link referenced pictures for the decoder
-         * They are unlinked in vpar_ReleaseMacroblock() & vpar_DestroyMacroblock() */
+         * They are unlinked in vpar_ReleaseMacroblock() &
+         * vpar_DestroyMacroblock() */
         if( p_vpar->picture.i_coding_type == P_CODING_TYPE ||
             p_vpar->picture.i_coding_type == B_CODING_TYPE )
         {