From 0a4aeaa67cae0699195b135dcc65ce5b0ee5fdc4 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Sat, 28 Apr 2001 03:36:26 +0000 Subject: [PATCH] * Coding style fixes here and there. * Miscellaneous QNX compile fixes. * Beginning of the mingw32 port by Gildas Bazin . * 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 ?) --- AUTHORS | 10 + ChangeLog | 5 +- Makefile | 4 +- Makefile.opts.in | 10 +- configure | 523 ++++++++++++++++---------------- configure.in | 65 ++-- extras/GNUgetopt/getopt.c | 5 + include/common.h | 3 +- include/config.h.in | 2 +- include/defs.h.in | 11 +- include/input_ext-dec.h | 4 +- include/modules.h | 6 +- include/threads.h | 221 +++++++++++--- plugins/dvd/dvd_udf.c | 33 +- plugins/dvd/input_dvd.c | 10 +- plugins/fb/fb.c | 4 +- plugins/ggi/ggi.c | 4 +- plugins/glide/glide.c | 4 +- plugins/gnome/gnome.c | 4 +- plugins/gtk/gtk.c | 4 +- plugins/gtk/gtk_callbacks.c | 6 +- plugins/gtk/gtk_playlist.c | 6 +- plugins/macosx/vout_macosx.c | 7 +- plugins/mga/mga.c | 4 +- plugins/mpeg/input_es.c | 6 +- plugins/mpeg/input_ps.c | 9 +- plugins/mpeg/input_ts.c | 17 +- plugins/sdl/aout_sdl.c | 6 +- plugins/sdl/sdl.c | 4 +- plugins/sdl/vout_sdl.c | 10 +- plugins/text/ncurses.c | 4 +- plugins/x11/vout_x11.c | 5 +- plugins/x11/x11.c | 4 +- plugins/x11/xvideo.c | 4 +- plugins/yuv/transforms_yuvmmx.h | 12 +- src/audio_output/audio_output.c | 9 +- src/input/input.c | 18 +- src/input/input_clock.c | 3 +- src/input/input_dec.c | 3 +- src/input/input_ext-dec.c | 3 +- src/input/input_ext-intf.c | 7 +- src/input/input_netlist.c | 11 +- src/input/input_programs.c | 3 +- src/input/mpeg_system.c | 3 +- src/interface/interface.c | 3 +- src/interface/intf_channels.c | 10 +- src/interface/intf_msg.c | 6 +- src/interface/main.c | 12 +- src/misc/modules.c | 14 +- src/misc/mtime.c | 80 +++-- src/misc/netutils.c | 13 +- src/spu_decoder/spu_decoder.c | 5 +- src/video_output/video_text.c | 6 +- src/video_parser/video_parser.c | 4 +- src/video_parser/vpar_blocks.c | 6 +- src/video_parser/vpar_headers.c | 12 +- 56 files changed, 796 insertions(+), 471 deletions(-) diff --git a/AUTHORS b/AUTHORS index 4a0585cfc6..f60ecb3c59 100644 --- 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 diff --git a/ChangeLog b/ChangeLog index 0f40191a5e..a96b9948fa 100644 --- 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 . + * 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. diff --git a/Makefile b/Makefile index f79a6b9aa5..6740d6b5cc 100644 --- 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) $@ diff --git a/Makefile.opts.in b/Makefile.opts.in index d36fe45ed6..15ad43d14f 100644 --- a/Makefile.opts.in +++ b/Makefile.opts.in @@ -13,13 +13,13 @@ # 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 # diff --git a/configure b/configure index 9641ddb93a..135a196ef7 100755 --- 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 <&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 < #include @@ -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 < #include @@ -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 <&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 <&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 <&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 <&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 <&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 <&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 <&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 <&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 <&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 <&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 <&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 <&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 <&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 <&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 <&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 <&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 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 <&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 < #include #include -#include -#include - -#ifdef HAVE_UNISTD_H -# include -#endif /* This mess was copied from the GNU getpagesize.h. */ #ifndef HAVE_GETPAGESIZE +# ifdef HAVE_UNISTD_H +# include +# 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 < #include @@ -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 <&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 <&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 <&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 <&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 <&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 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 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 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 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 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 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 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 < conftest.$ac_ext < +#include 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 <> 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 < conftest.$ac_ext < +#include 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 <> 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 < 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 <&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 < 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 < 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 <&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 < #include @@ -2950,7 +2946,7 @@ else #include 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 @@ -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 @@ -3006,7 +3002,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #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 < #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 < #include @@ -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 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 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 @@ -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 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 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 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 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 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 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 <&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." diff --git a/configure.in b/configure.in index 0fa2af7d13..8b9ca2e2a6 100644 --- a/configure.in +++ b/configure.in @@ -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 defines pthread_cond_t.) +]) +AC_EGREP_HEADER(strncasecmp,strings.h,[ + AC_DEFINE(STRNCASECMP_IN_STRINGS_H, 1, + Define if 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 void foo() { int meuh; ntohl(meuh); }],, - AC_DEFINE(NTOHL_IN_SYS_PARAM_H, 1, Define if ntohl is in .) + AC_DEFINE(NTOHL_IN_SYS_PARAM_H, 1, Define if 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." diff --git a/extras/GNUgetopt/getopt.c b/extras/GNUgetopt/getopt.c index 0f41fb6923..3462a3e0ab 100644 --- a/extras/GNUgetopt/getopt.c +++ b/extras/GNUgetopt/getopt.c @@ -75,6 +75,9 @@ #include #if HAVE_STRING_H - 0 #include +#ifdef STRNCASECMP_IN_STRINGS_H +# include +#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); diff --git a/include/common.h b/include/common.h index 04b8c86de7..fafb4a7249 100644 --- a/include/common.h +++ b/include/common.h @@ -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 * Vincent Seguin @@ -142,6 +142,7 @@ struct data_packet_s; #ifdef NTOHL_IN_SYS_PARAM_H # include +#elif defined(WIN32) #else # include #endif diff --git a/include/config.h.in b/include/config.h.in index 56e98f1a8f..4025bd6ea0 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -451,7 +451,7 @@ * 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 */ diff --git a/include/defs.h.in b/include/defs.h.in index 4a17a5dbee..9caa9fed28 100644 --- a/include/defs.h.in +++ b/include/defs.h.in @@ -109,6 +109,9 @@ /* Define if you have the header file. */ #undef HAVE_STDDEF_H +/* Define if you have the header file. */ +#undef HAVE_STRINGS_H + /* Define if you have the header file. */ #undef HAVE_SYS_IOCTL_H @@ -133,7 +136,13 @@ /* getopt support */ #undef HAVE_GETOPT_LONG -/* Define if ntohl is in . */ +/* Define if defines pthread_cond_t. */ +#undef PTHREAD_COND_T_IN_PTHREAD_H + +/* Define if defines strncasecmp. */ +#undef STRNCASECMP_IN_STRINGS_H + +/* Define if defines ntohl. */ #undef NTOHL_IN_SYS_PARAM_H /* Define if defines boolean_t. */ diff --git a/include/input_ext-dec.h b/include/input_ext-dec.h index d1e022d57d..d79a742263 100644 --- a/include/input_ext-dec.h +++ b/include/input_ext-dec.h @@ -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 * Michel Kaempf @@ -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; diff --git a/include/modules.h b/include/modules.h index 3224c49a88..728cc32d4c 100644 --- a/include/modules.h +++ b/include/modules.h @@ -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 * @@ -21,6 +21,10 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. *****************************************************************************/ +#ifdef WIN32 +#include /* off_t */ +#endif + /* Number of tries before we unload an unused module */ #define MODULE_HIDE_DELAY 100 diff --git a/include/threads.h b/include/threads.h index 1bc62cc4c7..bf67af4f19 100644 --- a/include/threads.h +++ b/include/threads.h @@ -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 * Samuel Hocevar @@ -25,18 +25,23 @@ #include -#if defined(HAVE_PTHREAD_H) /* pthreads (Linux & BSD for example) */ +#if defined(PTHREAD_COND_T_IN_PTHREAD_H) /* pthreads (like Linux & BSD) */ #include #elif defined(HAVE_CTHREADS_H) /* GNUMach */ #include -#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 #include #include + +#elif defined(WIN32) /* Win32 with MinGW32 compiler */ +#include +#include + #else #error no threads available on your system ! #endif @@ -71,17 +76,15 @@ * 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 here and wait for the event + * to become signaled, due to 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 } + diff --git a/plugins/dvd/dvd_udf.c b/plugins/dvd/dvd_udf.c index 3211960cb1..50d2ef78e3 100644 --- a/plugins/dvd/dvd_udf.c +++ b/plugins/dvd/dvd_udf.c @@ -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 * @@ -43,6 +43,9 @@ #include #include #include +#ifdef STRNCASECMP_IN_STRINGS_H +# include +#endif #include #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; } + diff --git a/plugins/dvd/input_dvd.c b/plugins/dvd/input_dvd.c index 520abbb099..2dbd2366d3 100644 --- a/plugins/dvd/input_dvd.c +++ b/plugins/dvd/input_dvd.c @@ -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 * @@ -51,6 +51,9 @@ #include #include +#ifdef STRNCASECMP_IN_STRINGS_H +# include +#endif #include #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" ); diff --git a/plugins/fb/fb.c b/plugins/fb/fb.c index 97521df4c6..a2f157d495 100644 --- a/plugins/fb/fb.c +++ b/plugins/fb/fb.c @@ -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 * @@ -51,7 +51,7 @@ MODULE_CONFIG_END /***************************************************************************** * Capabilities defined in the other files. - ******************************************************************************/ + *****************************************************************************/ void _M( vout_getfunctions )( function_list_t * p_function_list ); /***************************************************************************** diff --git a/plugins/ggi/ggi.c b/plugins/ggi/ggi.c index 2af618b654..d6dad64b70 100644 --- a/plugins/ggi/ggi.c +++ b/plugins/ggi/ggi.c @@ -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 * @@ -51,7 +51,7 @@ MODULE_CONFIG_END /***************************************************************************** * Capabilities defined in the other files. - ******************************************************************************/ + *****************************************************************************/ void _M( vout_getfunctions )( function_list_t * p_function_list ); /***************************************************************************** diff --git a/plugins/glide/glide.c b/plugins/glide/glide.c index bde18a23dd..86c255a0d7 100644 --- a/plugins/glide/glide.c +++ b/plugins/glide/glide.c @@ -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 * @@ -51,7 +51,7 @@ MODULE_CONFIG_END /***************************************************************************** * Capabilities defined in the other files. - ******************************************************************************/ + *****************************************************************************/ void _M( vout_getfunctions )( function_list_t * p_function_list ); /***************************************************************************** diff --git a/plugins/gnome/gnome.c b/plugins/gnome/gnome.c index 67c42de36b..700ff98bcf 100644 --- a/plugins/gnome/gnome.c +++ b/plugins/gnome/gnome.c @@ -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 * @@ -48,7 +48,7 @@ MODULE_CONFIG_END /***************************************************************************** * Capabilities defined in the other files. - ******************************************************************************/ + *****************************************************************************/ void _M( intf_getfunctions )( function_list_t * p_function_list ); /***************************************************************************** diff --git a/plugins/gtk/gtk.c b/plugins/gtk/gtk.c index 48298ba74c..f6ea542fc0 100644 --- a/plugins/gtk/gtk.c +++ b/plugins/gtk/gtk.c @@ -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 * @@ -48,7 +48,7 @@ MODULE_CONFIG_END /***************************************************************************** * Capabilities defined in the other files. - ******************************************************************************/ + *****************************************************************************/ void _M( intf_getfunctions )( function_list_t * p_function_list ); /***************************************************************************** diff --git a/plugins/gtk/gtk_callbacks.c b/plugins/gtk/gtk_callbacks.c index 4acfd9f9c4..e32e8340a2 100644 --- a/plugins/gtk/gtk_callbacks.c +++ b/plugins/gtk/gtk_callbacks.c @@ -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 * Stéphane Borel @@ -29,7 +29,7 @@ * Preamble *****************************************************************************/ #include "defs.h" - +#include /* off_t */ #include #include @@ -58,7 +58,7 @@ /***************************************************************************** * Callbacks - ******************************************************************************/ + *****************************************************************************/ void on_menubar_open_activate (GtkMenuItem *menuitem, gpointer user_data) diff --git a/plugins/gtk/gtk_playlist.c b/plugins/gtk/gtk_playlist.c index 9b3b6c04f5..e87c4e30ab 100644 --- a/plugins/gtk/gtk_playlist.c +++ b/plugins/gtk/gtk_playlist.c @@ -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 * @@ -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 ); diff --git a/plugins/macosx/vout_macosx.c b/plugins/macosx/vout_macosx.c index 7690712af1..5a88ca9b1f 100644 --- a/plugins/macosx/vout_macosx.c +++ b/plugins/macosx/vout_macosx.c @@ -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 ) { diff --git a/plugins/mga/mga.c b/plugins/mga/mga.c index fc0c7d6df5..e5938c0a7d 100644 --- a/plugins/mga/mga.c +++ b/plugins/mga/mga.c @@ -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 * @@ -51,7 +51,7 @@ MODULE_CONFIG_END /***************************************************************************** * Capabilities defined in the other files. - ******************************************************************************/ + *****************************************************************************/ void _M( vout_getfunctions )( function_list_t * p_function_list ); /***************************************************************************** diff --git a/plugins/mpeg/input_es.c b/plugins/mpeg/input_es.c index e971328350..c3d3341d14 100644 --- a/plugins/mpeg/input_es.c +++ b/plugins/mpeg/input_es.c @@ -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; } diff --git a/plugins/mpeg/input_ps.c b/plugins/mpeg/input_ps.c index c04de149c1..ce10c6b527 100644 --- a/plugins/mpeg/input_ps.c +++ b/plugins/mpeg/input_ps.c @@ -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 * Cyril Deguet @@ -32,6 +32,9 @@ #include #include +#ifdef STRNCASECMP_IN_STRINGS_H +# include +#endif #include #include @@ -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; } diff --git a/plugins/mpeg/input_ts.c b/plugins/mpeg/input_ts.c index 0ed311ea89..5f5ee9c0a2 100644 --- a/plugins/mpeg/input_ts.c +++ b/plugins/mpeg/input_ts.c @@ -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 * @@ -31,14 +31,22 @@ #include #include +#ifdef STRNCASECMP_IN_STRINGS_H +# include +#endif #include #include #include + #ifdef SYS_NTO #include #endif + +#ifndef WIN32 #include +#endif + #include #include #include @@ -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; } + diff --git a/plugins/sdl/aout_sdl.c b/plugins/sdl/aout_sdl.c index cd17ca4b2c..0431be21e6 100644 --- a/plugins/sdl/aout_sdl.c +++ b/plugins/sdl/aout_sdl.c @@ -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 * Samuel Hocevar @@ -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" ) ) diff --git a/plugins/sdl/sdl.c b/plugins/sdl/sdl.c index 69f6109c2b..5ecb714569 100644 --- a/plugins/sdl/sdl.c +++ b/plugins/sdl/sdl.c @@ -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 * Pierre Baillet @@ -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 ); diff --git a/plugins/sdl/vout_sdl.c b/plugins/sdl/vout_sdl.c index b0bf0f7514..e588042c0f 100644 --- a/plugins/sdl/vout_sdl.c +++ b/plugins/sdl/vout_sdl.c @@ -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 * Pierre Baillet @@ -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 ); diff --git a/plugins/text/ncurses.c b/plugins/text/ncurses.c index 13884015bc..a65531d5a7 100644 --- a/plugins/text/ncurses.c +++ b/plugins/text/ncurses.c @@ -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 * @@ -48,7 +48,7 @@ MODULE_CONFIG_END /***************************************************************************** * Capabilities defined in the other files. - ******************************************************************************/ + *****************************************************************************/ void _M( intf_getfunctions )( function_list_t * p_function_list ); /***************************************************************************** diff --git a/plugins/x11/vout_x11.c b/plugins/x11/vout_x11.c index ebf6a51553..47c7c40c11 100644 --- a/plugins/x11/vout_x11.c +++ b/plugins/x11/vout_x11.c @@ -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 * Samuel Hocevar @@ -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" ); diff --git a/plugins/x11/x11.c b/plugins/x11/x11.c index 57f6dbbb29..d56e7e9e6a 100644 --- a/plugins/x11/x11.c +++ b/plugins/x11/x11.c @@ -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 * @@ -51,7 +51,7 @@ MODULE_CONFIG_END /***************************************************************************** * Capabilities defined in the other files. - ******************************************************************************/ + *****************************************************************************/ void _M( vout_getfunctions )( function_list_t * p_function_list ); /***************************************************************************** diff --git a/plugins/x11/xvideo.c b/plugins/x11/xvideo.c index 898ca3ff4f..d0f9f94113 100644 --- a/plugins/x11/xvideo.c +++ b/plugins/x11/xvideo.c @@ -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 * @@ -51,7 +51,7 @@ MODULE_CONFIG_END /***************************************************************************** * Capabilities defined in the other files. - ******************************************************************************/ + *****************************************************************************/ void _M( vout_getfunctions )( function_list_t * p_function_list ); /***************************************************************************** diff --git a/plugins/yuv/transforms_yuvmmx.h b/plugins/yuv/transforms_yuvmmx.h index b4aedb4932..a2727f9a6f 100644 --- a/plugins/yuv/transforms_yuvmmx.h +++ b/plugins/yuv/transforms_yuvmmx.h @@ -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 * Gaël Hendryckx @@ -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\ " + diff --git a/src/audio_output/audio_output.c b/src/audio_output/audio_output.c index fd22828aa4..de60d0348b 100644 --- a/src/audio_output/audio_output.c +++ b/src/audio_output/audio_output.c @@ -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 * @@ -39,6 +39,9 @@ #include "defs.h" #include /* getpid() */ +#ifdef WIN32 /* getpid() for win32 is located in process.h */ +#include +#endif #include /* "intf_msg.h" */ #include /* 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 ) ) { diff --git a/src/input/input.c b/src/input/input.c index 106f6ea778..e923239acc 100644 --- a/src/input/input.c +++ b/src/input/input.c @@ -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 * @@ -34,12 +34,15 @@ #include #include #include +#ifdef STRNCASECMP_IN_STRINGS_H +# include +#endif #include /* Network functions */ -#if !defined( SYS_BEOS ) && !defined( SYS_NTO ) -#include /* hostent ... */ +#if !defined( SYS_BEOS ) && !defined( SYS_NTO ) && !defined( WIN32 ) +#include /* hostent ... */ #include #include #include @@ -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 *****************************************************************************/ diff --git a/src/input/input_clock.c b/src/input/input_clock.c index 8073397bba..20b4d74531 100644 --- a/src/input/input_clock.c +++ b/src/input/input_clock.c @@ -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 * @@ -27,6 +27,7 @@ #include "defs.h" #include /* memcpy(), memset() */ +#include /* off_t */ #include "config.h" #include "common.h" diff --git a/src/input/input_dec.c b/src/input/input_dec.c index 20e6a2edc2..5079ed51fc 100644 --- a/src/input/input_dec.c +++ b/src/input/input_dec.c @@ -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 * @@ -28,6 +28,7 @@ #include #include /* memcpy(), memset() */ +#include /* off_t */ #include "config.h" #include "common.h" diff --git a/src/input/input_ext-dec.c b/src/input/input_ext-dec.c index 62fd9904dd..7be8abbed3 100644 --- a/src/input/input_ext-dec.c +++ b/src/input/input_ext-dec.c @@ -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 * @@ -27,6 +27,7 @@ #include "defs.h" #include /* memcpy(), memset() */ +#include /* off_t */ #include "config.h" #include "common.h" diff --git a/src/input/input_ext-intf.c b/src/input/input_ext-intf.c index 2cd82879ab..fdb0ad7d39 100644 --- a/src/input/input_ext-intf.c +++ b/src/input/input_ext-intf.c @@ -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 * @@ -27,6 +27,11 @@ #include "defs.h" #include /* memcpy(), memset() */ +#include /* off_t */ + +#ifdef WIN32 +#define snprintf _snprintf +#endif #include "config.h" #include "common.h" diff --git a/src/input/input_netlist.c b/src/input/input_netlist.c index abf3866ea5..a685c7b324 100644 --- a/src/input/input_netlist.c +++ b/src/input/input_netlist.c @@ -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 * @@ -29,7 +29,9 @@ #include #include /* memcpy(), memset() */ #include +#ifndef WIN32 #include /* struct iovec */ +#endif #include #include "config.h" @@ -45,6 +47,13 @@ #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 *****************************************************************************/ diff --git a/src/input/input_programs.c b/src/input/input_programs.c index 9c78a2f235..82356a85cc 100644 --- a/src/input/input_programs.c +++ b/src/input/input_programs.c @@ -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 * @@ -28,6 +28,7 @@ #include #include /* memcpy(), memset() */ +#include /* off_t */ #include "config.h" #include "common.h" diff --git a/src/input/mpeg_system.c b/src/input/mpeg_system.c index 118158ee35..fd80efd493 100644 --- a/src/input/mpeg_system.c +++ b/src/input/mpeg_system.c @@ -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 * Michel Lespinasse @@ -32,6 +32,7 @@ #include #include /* memcpy(), memset() */ +#include /* off_t */ #include "config.h" #include "common.h" diff --git a/src/interface/interface.c b/src/interface/interface.c index c23091cef9..2541507934 100644 --- a/src/interface/interface.c +++ b/src/interface/interface.c @@ -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 * @@ -32,6 +32,7 @@ #include /* free(), strtol() */ #include /* FILE */ #include /* strerror() */ +#include /* off_t */ #include "config.h" #include "common.h" diff --git a/src/interface/intf_channels.c b/src/interface/intf_channels.c index 9295914470..5f3002c6c7 100644 --- a/src/interface/intf_channels.c +++ b/src/interface/intf_channels.c @@ -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 * @@ -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') ) { diff --git a/src/interface/intf_msg.c b/src/interface/intf_msg.c index 40866681e1..b55bf3cf31 100644 --- a/src/interface/intf_msg.c +++ b/src/interface/intf_msg.c @@ -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 * @@ -47,6 +47,10 @@ #include "main.h" +#ifdef WIN32 +#define snprintf _snprintf /* snprintf not defined in mingw32 (bug?) */ +#endif + /***************************************************************************** * intf_msg_item_t ***************************************************************************** diff --git a/src/interface/main.c b/src/interface/main.c index 5a7e23aec5..7679075a13 100644 --- a/src/interface/main.c +++ b/src/interface/main.c @@ -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 * Samuel Hocevar @@ -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 ); diff --git a/src/misc/modules.c b/src/misc/modules.c index e29f96ebe7..50b9dd8667 100644 --- a/src/misc/modules.c +++ b/src/misc/modules.c @@ -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 * Ethan C. Baldridge @@ -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 diff --git a/src/misc/mtime.c b/src/misc/mtime.c index 79a0331c4f..5b02400d9f 100644 --- a/src/misc/mtime.c +++ b/src/misc/mtime.c @@ -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 * @@ -40,6 +40,10 @@ #include #endif +#ifdef WIN32 +#include +#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 } + diff --git a/src/misc/netutils.c b/src/misc/netutils.c index 70decac2c6..bf73a854db 100644 --- a/src/misc/netutils.c +++ b/src/misc/netutils.c @@ -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 * Benoit Steiner @@ -28,15 +28,18 @@ *****************************************************************************/ #include "defs.h" -#include /* gethostbyname() */ #include /* free(), realloc(), atoi() */ #include /* errno() */ #include /* bzero(), bcopy() */ #include /* gethostname() */ #include /* gettimeofday */ +#ifndef WIN32 +#include /* gethostbyname() */ #include /* BSD: struct in_addr */ #include /* BSD: struct sockaddr */ +#endif + #ifdef HAVE_ARPA_INET_H #include /* 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. */ diff --git a/src/spu_decoder/spu_decoder.c b/src/spu_decoder/spu_decoder.c index 775cec5b67..def2f546a9 100644 --- a/src/spu_decoder/spu_decoder.c +++ b/src/spu_decoder/spu_decoder.c @@ -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 * @@ -27,6 +27,9 @@ #include "defs.h" #include /* getpid() */ +#ifdef WIN32 /* getpid() for win32 is located in process.h */ +#include +#endif #include /* malloc(), free() */ #include /* memcpy(), memset() */ diff --git a/src/video_output/video_text.c b/src/video_output/video_text.c index fcd4bc4b8a..f94efbd3b8 100644 --- a/src/video_output/video_text.c +++ b/src/video_output/video_text.c @@ -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 * Samuel Hocevar @@ -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 ) diff --git a/src/video_parser/video_parser.c b/src/video_parser/video_parser.c index 0ca6a621b5..7f324eec24 100644 --- a/src/video_parser/video_parser.c +++ b/src/video_parser/video_parser.c @@ -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 * Samuel Hocevar @@ -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 ) diff --git a/src/video_parser/vpar_blocks.c b/src/video_parser/vpar_blocks.c index 50fcc1c101..a6cb2b4ed4 100644 --- a/src/video_parser/vpar_blocks.c +++ b/src/video_parser/vpar_blocks.c @@ -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 * Jean-Marc Dressler @@ -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 + diff --git a/src/video_parser/vpar_headers.c b/src/video_parser/vpar_headers.c index c2fa6c7505..74b2e8dfb7 100644 --- a/src/video_parser/vpar_headers.c +++ b/src/video_parser/vpar_headers.c @@ -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 * Stéphane Borel @@ -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 ) { -- 2.39.2