* Miscellaneous QNX compile fixes.
* Beginning of the mingw32 port by Gildas Bazin <gbazin@netcourrier.com>.
* Added Marcari and Gildas to the AUTHORS file.
(I commited the mingw32 port because it doesn't add any new code outside
the #ifdefs, but we won't tell a word about it for the moment. We don't
really need windows users whining about bugs, do we ?)
# 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
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
D: Minor configure.in and Makefile.in fixes
N: Cyril Deguet
+C: asmax
E: asmax@via.ecp.fr
D: PS input packet allocator
HEAD
- * Changed broadcast handling
+ * Coding style fixes here and there.
+ * Miscellaneous QNX compile fixes.
+ * Beginning of the mingw32 port by Gildas Bazin <gbazin@netcourrier.com>.
+ * Changed broadcast handling.
* Added a vlc-howto in sgml format in the doc directory.
* Fixed the continuous 'seeking position' bug in network mode.
* Support for `ts://foo:42' style input source.
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
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) $@
# 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
# Build environment
#
CC = @CC@
+CFLAGS = @CFLAGS@
SHELL = @SHELL@
+RANLIB = @RANLIB@
#
# Installation environment
#
LIB += @LIB@ -L/usr/local/lib
+ifneq (,$(findstring mingw32,$(SYS)))
+LIB += -lws2_32
+endif
+
#
# Libraries needed by built-in modules
#
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
# 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
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1029: checking for working const" >&5
+echo "configure:1059: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1034 "configure"
+#line 1064 "configure"
#include "confdefs.h"
int main() {
/* Ultrix mips cc rejects this. */
-typedef int charset[2]; const charset x = {0,0};
+typedef int charset[2]; const charset x;
/* SunOS 4.1.1 cc rejects this. */
char const *const *ccp;
char **p;
; return 0; }
EOF
-if { (eval echo configure:1083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
fi
-echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:1104: checking whether byte ordering is bigendian" >&5
+
+if test x${cross_compiling} != xyes; then
+ echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
+echo "configure:1136: checking whether byte ordering is bigendian" >&5
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
cat > conftest.$ac_ext <<EOF
-#line 1111 "configure"
+#line 1143 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
#endif
; return 0; }
EOF
-if { (eval echo configure:1122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
# It does; now see whether it defined to BIG_ENDIAN or not.
cat > conftest.$ac_ext <<EOF
-#line 1126 "configure"
+#line 1158 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
#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
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 1157 "configure"
+#line 1189 "configure"
#include "confdefs.h"
main () {
/* Are we little or big endian? From Harbison&Steele. */
exit (u.c[sizeof (long) - 1] == 1);
}
EOF
-if { (eval echo configure:1170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_bigendian=no
else
fi
+fi
for ac_func in gettimeofday select strerror strtod strtol
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1197: checking for $ac_func" >&5
+echo "configure:1230: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1202 "configure"
+#line 1235 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:1225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
for ac_func in setenv putenv
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1252: checking for $ac_func" >&5
+echo "configure:1285: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1257 "configure"
+#line 1290 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:1280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
done
echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:1305: checking for connect" >&5
+echo "configure:1338: checking for connect" >&5
if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1310 "configure"
+#line 1343 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char connect(); below. */
; return 0; }
EOF
-if { (eval echo configure:1333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_connect=yes"
else
:
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
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1359 "configure"
+#line 1393 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
connect()
; return 0; }
EOF
-if { (eval echo configure:1370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "$ac_t""no" 1>&6
fi
+
fi
echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:1393: checking for gethostbyname" >&5
+echo "configure:1428: checking for gethostbyname" >&5
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1398 "configure"
+#line 1433 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char gethostbyname(); below. */
; return 0; }
EOF
-if { (eval echo configure:1421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_gethostbyname=yes"
else
:
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
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1447 "configure"
+#line 1483 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
gethostbyname()
; return 0; }
EOF
-if { (eval echo configure:1458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "$ac_t""no" 1>&6
fi
+
fi
echo $ac_n "checking for nanosleep""... $ac_c" 1>&6
-echo "configure:1481: checking for nanosleep" >&5
+echo "configure:1518: checking for nanosleep" >&5
if eval "test \"`echo '$''{'ac_cv_func_nanosleep'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1486 "configure"
+#line 1523 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char nanosleep(); below. */
; return 0; }
EOF
-if { (eval echo configure:1509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_nanosleep=yes"
else
:
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
ac_save_LIBS="$LIBS"
LIBS="-lrt $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1535 "configure"
+#line 1573 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
nanosleep()
; return 0; }
EOF
-if { (eval echo configure:1546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
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
ac_save_LIBS="$LIBS"
LIBS="-lposix4 $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1573 "configure"
+#line 1612 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
nanosleep()
; return 0; }
EOF
-if { (eval echo configure:1584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "$ac_t""no" 1>&6
fi
+
fi
+
fi
for ac_func in usleep
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1611: checking for $ac_func" >&5
+echo "configure:1652: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1616 "configure"
+#line 1657 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:1639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
done
echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
-echo "configure:1664: checking for inet_aton" >&5
+echo "configure:1705: checking for inet_aton" >&5
if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1669 "configure"
+#line 1710 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char inet_aton(); below. */
; return 0; }
EOF
-if { (eval echo configure:1692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_inet_aton=yes"
else
:
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
ac_save_LIBS="$LIBS"
LIBS="-lresolv $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1718 "configure"
+#line 1760 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
inet_aton()
; return 0; }
EOF
-if { (eval echo configure:1729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "$ac_t""no" 1>&6
fi
+
fi
for ac_func in vasprintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1754: checking for $ac_func" >&5
+echo "configure:1797: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1759 "configure"
+#line 1802 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:1782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
-echo "configure:1808: checking for getopt_long" >&5
+echo "configure:1851: checking for getopt_long" >&5
if eval "test \"`echo '$''{'ac_cv_func_getopt_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1813 "configure"
+#line 1856 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char getopt_long(); below. */
; return 0; }
EOF
-if { (eval echo configure:1836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_getopt_long=yes"
else
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
ac_save_LIBS="$LIBS"
LIBS="-lgnugetopt $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1866 "configure"
+#line 1909 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
getopt_long()
; return 0; }
EOF
-if { (eval echo configure:1877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1909: checking for $ac_hdr" >&5
+echo "configure:1952: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1914 "configure"
+#line 1957 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1919: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1962: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1948: checking for $ac_func" >&5
+echo "configure:1991: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1953 "configure"
+#line 1996 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:1976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
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
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 2009 "configure"
+#line 2052 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
#include <sys/types.h>
#include <fcntl.h>
#include <sys/mman.h>
-#include <stdlib.h>
-#include <sys/stat.h>
-
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
/* This mess was copied from the GNU getpagesize.h. */
#ifndef HAVE_GETPAGESIZE
+# ifdef HAVE_UNISTD_H
+# include <unistd.h>
+# endif
/* Assume that all systems that can run configure have sys/param.h. */
# ifndef HAVE_SYS_PARAM_H
/*
* 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)
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);
*/
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)
}
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
fi
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:2175: checking return type of signal handlers" >&5
+echo "configure:2215: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2180 "configure"
+#line 2220 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
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
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
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2224 "configure"
+#line 2264 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
dlopen()
; return 0; }
EOF
-if { (eval echo configure:2235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
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
ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2264 "configure"
+#line 2304 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
pow()
; return 0; }
EOF
-if { (eval echo configure:2275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
echo $ac_n "checking for old style FreeBSD -pthread flag""... $ac_c" 1>&6
-echo "configure:2296: checking for old style FreeBSD -pthread flag" >&5
+echo "configure:2336: checking for old style FreeBSD -pthread flag" >&5
cat > conftest.$ac_ext <<EOF
-#line 2298 "configure"
+#line 2338 "configure"
#include "confdefs.h"
#if defined(__FreeBSD_cc_version) && __FreeBSD_cc_version <= 500001
yes
rm -rf conftest*
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:2314: checking for pthread_create in -lpthread" >&5
+echo "configure:2354: checking for pthread_create in -lpthread" >&5
ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lpthread $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2322 "configure"
+#line 2362 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
pthread_create()
; return 0; }
EOF
-if { (eval echo configure:2333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
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
ac_save_LIBS="$LIBS"
LIBS="-lthreads $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2365 "configure"
+#line 2405 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
thread_create()
; return 0; }
EOF
-if { (eval echo configure:2376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
-for ac_hdr in stddef.h
+
+for ac_hdr in stddef.h getopt.h strings.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2402: checking for $ac_hdr" >&5
+echo "configure:2443: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2407 "configure"
+#line 2448 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
fi
done
-for ac_hdr in getopt.h
+for ac_hdr in sys/sockio.h fcntl.h sys/time.h unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2442: checking for $ac_hdr" >&5
+echo "configure:2483: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2447 "configure"
+#line 2488 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2493: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
fi
done
-for ac_hdr in sys/sockio.h
+for ac_hdr in sys/soundcard.h machine/soundcard.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2482: checking for $ac_hdr" >&5
+echo "configure:2523: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2487 "configure"
+#line 2528 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2492: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
fi
done
-for ac_hdr in fcntl.h sys/time.h unistd.h
+for ac_hdr in dlfcn.h image.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2522: checking for $ac_hdr" >&5
+echo "configure:2563: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2527 "configure"
+#line 2568 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2573: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
fi
done
-for ac_hdr in sys/soundcard.h machine/soundcard.h
+for ac_hdr in arpa/inet.h net/if.h netinet/in.h sys/socket.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2562: checking for $ac_hdr" >&5
+echo "configure:2603: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2567 "configure"
+#line 2608 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2613: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
fi
done
-for ac_hdr in dlfcn.h image.h
+for ac_hdr in machine/param.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2602: checking for $ac_hdr" >&5
+echo "configure:2643: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2607 "configure"
+#line 2648 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2612: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2653: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
fi
done
-for ac_hdr in arpa/inet.h net/if.h netinet/in.h sys/socket.h
+
+for ac_hdr in cthreads.h pthread.h kernel/scheduler.h kernel/OS.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2642: checking for $ac_hdr" >&5
+echo "configure:2684: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2647 "configure"
+#line 2689 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2652: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2694: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
fi
done
-for ac_hdr in machine/param.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2682: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2687 "configure"
+
+cat > conftest.$ac_ext <<EOF
+#line 2722 "configure"
#include "confdefs.h"
-#include <$ac_hdr>
+#include <pthread.h>
EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2692: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "pthread_cond_t" >/dev/null 2>&1; then
rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
+
+ cat >> confdefs.h <<\EOF
+#define PTHREAD_COND_T_IN_PTHREAD_H 1
EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-for ac_hdr in cthreads.h pthread.h kernel/scheduler.h kernel/OS.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2723: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2728 "configure"
+fi
+rm -f conftest*
+
+cat > conftest.$ac_ext <<EOF
+#line 2739 "configure"
#include "confdefs.h"
-#include <$ac_hdr>
+#include <strings.h>
EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "strncasecmp" >/dev/null 2>&1; then
rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
+
+ cat >> confdefs.h <<\EOF
+#define STRNCASECMP_IN_STRINGS_H 1
EOF
-
-else
- echo "$ac_t""no" 1>&6
+
+
fi
-done
+rm -f conftest*
save_CFLAGS=$CFLAGS
CFLAGS="${CFLAGS} -Wall -Werror"
echo $ac_n "checking for ntohl in sys/param.h""... $ac_c" 1>&6
-echo "configure:2764: checking for ntohl in sys/param.h" >&5
+echo "configure:2760: checking for ntohl in sys/param.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 2766 "configure"
+#line 2762 "configure"
#include "confdefs.h"
#include <sys/param.h>
void foo() { int meuh; ntohl(meuh); }
; 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
CFLAGS="${CFLAGS} -rdynamic -Wall -Werror"
echo $ac_n "checking if \$CC groks -rdynamic without complaining too much""... $ac_c" 1>&6
-echo "configure:2791: checking if \$CC groks -rdynamic without complaining too much" >&5
+echo "configure:2787: checking if \$CC groks -rdynamic without complaining too much" >&5
cat > conftest.$ac_ext <<EOF
-#line 2793 "configure"
+#line 2789 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:2800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
LCFLAGS="${LCFLAGS} -rdynamic"
echo "$ac_t""yes" 1>&6
CFLAGS=$save_CFLAGS
echo $ac_n "checking for boolean_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:2815: checking for boolean_t in sys/types.h" >&5
+echo "configure:2811: checking for boolean_t in sys/types.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 2817 "configure"
+#line 2813 "configure"
#include "confdefs.h"
#include <sys/types.h>
void quux() { boolean_t foo; }
; 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
fi
rm -f conftest*
echo $ac_n "checking for boolean_t in pthread.h""... $ac_c" 1>&6
-echo "configure:2840: checking for boolean_t in pthread.h" >&5
+echo "configure:2836: checking for boolean_t in pthread.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 2842 "configure"
+#line 2838 "configure"
#include "confdefs.h"
#include <pthread.h>
void quux() { boolean_t foo; }
; 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
rm -f conftest*
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2866: checking for working const" >&5
+echo "configure:2862: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2871 "configure"
+#line 2867 "configure"
#include "confdefs.h"
int main() {
/* Ultrix mips cc rejects this. */
-typedef int charset[2]; const charset x = {0,0};
+typedef int charset[2]; const charset x;
/* SunOS 4.1.1 cc rejects this. */
char const *const *ccp;
char **p;
; return 0; }
EOF
-if { (eval echo configure:2920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2941: checking for ANSI C header files" >&5
+echo "configure:2937: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2946 "configure"
+#line 2942 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2971 "configure"
+#line 2967 "configure"
#include "confdefs.h"
#include <string.h>
EOF
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2989 "configure"
+#line 2985 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
:
else
cat > conftest.$ac_ext <<EOF
-#line 3010 "configure"
+#line 3006 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
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
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:3045: checking for size_t" >&5
+echo "configure:3041: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3050 "configure"
+#line 3046 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:3078: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:3074: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3083 "configure"
+#line 3079 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
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
ARCH=${host_cpu}
BUILTINS="${BUILTINS} es ps ts yuv idct idctclassic motion"
-if test x$host_os = xbeos; then
+case x$host_os in
+ xbeos|xnto-qnx)
ACCEL_PLUGINS="yuvmmx idctmmx motionmmx"
-else
+ ;;
+ xmingw32msvc)
+ ACCEL_PLUGINS="idctmmx idctmmxext motionmmx motionmmxext"
+ ;;
+ *)
ACCEL_PLUGINS="yuvmmx idctmmx idctmmxext motionmmx motionmmxext"
-fi
+ ;;
+esac
for ac_hdr in sys/ioctl.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3126: checking for $ac_hdr" >&5
+echo "configure:3128: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3131 "configure"
+#line 3133 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3136: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3162: checking for $ac_hdr" >&5
+echo "configure:3164: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3167 "configure"
+#line 3169 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
done
cat > conftest.$ac_ext <<EOF
-#line 3199 "configure"
+#line 3201 "configure"
#include "confdefs.h"
#include <linux/cdrom.h>
EOF
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
# 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
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3415: checking for $ac_hdr" >&5
+echo "configure:3417: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3420 "configure"
+#line 3422 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3425: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3427: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3496: checking for $ac_hdr" >&5
+echo "configure:3498: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3501 "configure"
+#line 3503 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3506: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3544: checking for $ac_hdr" >&5
+echo "configure:3546: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3549 "configure"
+#line 3551 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3556: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
# 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
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3708: checking for $ac_hdr" >&5
+echo "configure:3710: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3713 "configure"
+#line 3715 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3770: checking for $ac_hdr" >&5
+echo "configure:3772: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3775 "configure"
+#line 3777 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3780: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
enableval="$enable_alsa"
if test x$enable_alsa = xyes; then ac_safe=`echo "sys/asoundlib.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/asoundlib.h""... $ac_c" 1>&6
-echo "configure:3818: checking for sys/asoundlib.h" >&5
+echo "configure:3820: checking for sys/asoundlib.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3823 "configure"
+#line 3825 "configure"
#include "confdefs.h"
#include <sys/asoundlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
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
ac_save_LIBS="$LIBS"
LIBS="-lasound $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3853 "configure"
+#line 3855 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:3860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
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
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."
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)],
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)
dnl Check for threads library
AC_CHECK_HEADERS(cthreads.h pthread.h kernel/scheduler.h kernel/OS.h)
+dnl Check for misc headers
+AC_EGREP_HEADER(pthread_cond_t,pthread.h,[
+ AC_DEFINE(PTHREAD_COND_T_IN_PTHREAD_H, 1,
+ Define if <pthread.h> defines pthread_cond_t.)
+])
+AC_EGREP_HEADER(strncasecmp,strings.h,[
+ AC_DEFINE(STRNCASECMP_IN_STRINGS_H, 1,
+ Define if <strings.h> defines strncasecmp.)
+])
+
dnl Do a series of bizarre compilation tests
save_CFLAGS=$CFLAGS
AC_MSG_CHECKING([for ntohl in sys/param.h])
AC_TRY_COMPILE([#include <sys/param.h>
void foo() { int meuh; ntohl(meuh); }],,
- AC_DEFINE(NTOHL_IN_SYS_PARAM_H, 1, Define if ntohl is in <sys/param.h>.)
+ AC_DEFINE(NTOHL_IN_SYS_PARAM_H, 1, Define if <sys/param.h> defines ntohl.)
AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
dnl Check for -rdynamic flag
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
[ --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
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."
#include <unixlib.h>
#if HAVE_STRING_H - 0
#include <string.h>
+#ifdef STRNCASECMP_IN_STRINGS_H
+# include <strings.h>
+#endif
#endif
#endif
else
{
if (opterr)
+ {
if (argv[optind - 1][1] == '-')
/* --option */
fprintf(stderr,
fprintf(stderr,
_("%s: option `%c%s' doesn't allow an argument\n"),
argv[0], argv[optind - 1][0], pfound->name);
+ }
nextchar += strlen(nextchar);
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: common.h,v 1.30 2001/04/11 02:01:24 henri Exp $
+ * $Id: common.h,v 1.31 2001/04/28 03:36:25 sam Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
#ifdef NTOHL_IN_SYS_PARAM_H
# include <sys/param.h>
+#elif defined(WIN32)
#else
# include <netinet/in.h>
#endif
* 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 */
/* Define if you have the <stddef.h> header file. */
#undef HAVE_STDDEF_H
+/* Define if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
/* Define if you have the <sys/ioctl.h> header file. */
#undef HAVE_SYS_IOCTL_H
/* getopt support */
#undef HAVE_GETOPT_LONG
-/* Define if ntohl is in <sys/param.h>. */
+/* Define if <pthread.h> defines pthread_cond_t. */
+#undef PTHREAD_COND_T_IN_PTHREAD_H
+
+/* Define if <strings.h> defines strncasecmp. */
+#undef STRNCASECMP_IN_STRINGS_H
+
+/* Define if <sys/param.h> defines ntohl. */
#undef NTOHL_IN_SYS_PARAM_H
/* Define if <sys/types.h> defines boolean_t. */
* input_ext-dec.h: structures exported to the VideoLAN decoders
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: input_ext-dec.h,v 1.29 2001/04/25 10:22:32 massiot Exp $
+ * $Id: input_ext-dec.h,v 1.30 2001/04/28 03:36:25 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Kaempf <maxx@via.ecp.fr>
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;
* modules.h : Module management functions.
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: modules.h,v 1.20 2001/04/15 04:19:57 sam Exp $
+ * $Id: modules.h,v 1.21 2001/04/28 03:36:25 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
+#ifdef WIN32
+#include <sys/types.h> /* off_t */
+#endif
+
/* Number of tries before we unload an unused module */
#define MODULE_HIDE_DELAY 100
* This header provides a portable threads implementation.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: threads.h,v 1.16 2001/03/21 13:42:33 sam Exp $
+ * $Id: threads.h,v 1.17 2001/04/28 03:36:25 sam Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
#include <stdio.h>
-#if defined(HAVE_PTHREAD_H) /* pthreads (Linux & BSD for example) */
+#if defined(PTHREAD_COND_T_IN_PTHREAD_H) /* pthreads (like Linux & BSD) */
#include <pthread.h>
#elif defined(HAVE_CTHREADS_H) /* GNUMach */
#include <cthreads.h>
-#elif defined(HAVE_KERNEL_SCHEDULER_H) && defined(HAVE_KERNEL_OS_H) /* BeOS */
+#elif defined(HAVE_KERNEL_SCHEDULER_H) && defined(HAVE_KERNEL_OS_H) /* BeOS */
#undef MAX
#undef MIN
#include <kernel/OS.h>
#include <kernel/scheduler.h>
#include <byteorder.h>
+
+#elif defined(WIN32) /* Win32 with MinGW32 compiler */
+#include <windows.h>
+#include <process.h>
+
#else
#error no threads available on your system !
#endif
* Types definition
*****************************************************************************/
-#if defined(HAVE_PTHREAD_H)
-
+#if defined(PTHREAD_COND_T_IN_PTHREAD_H)
typedef pthread_t vlc_thread_t;
typedef pthread_mutex_t vlc_mutex_t;
typedef pthread_cond_t vlc_cond_t;
#elif defined(HAVE_CTHREADS_H)
-
typedef cthread_t vlc_thread_t;
-/* those structs are the ones defined in /include/cthreads.h but we need
+/* Those structs are the ones defined in /include/cthreads.h but we need
* to handle (*foo) where foo is a (mutex_t) while they handle (foo) where
* foo is a (mutex_t*) */
typedef struct s_mutex {
} 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 */
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);
* 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
/*****************************************************************************
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)
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
}
*****************************************************************************/
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)
#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
}
*****************************************************************************/
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)
int32 exit_value;
wait_for_thread( thread, &exit_value );
+#elif defined(WIN32)
+ WaitForSingleObject( thread, INFINITE);
+
#endif
}
*****************************************************************************/
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)
#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;
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
}
*****************************************************************************/
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)
#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
}
*****************************************************************************/
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)
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
}
*****************************************************************************/
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
}
*****************************************************************************/
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)
#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
}
*****************************************************************************/
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)
#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
}
*****************************************************************************/
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)
#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 );
vlc_mutex_lock( p_mutex );
return 0;
+#elif defined(WIN32)
+ /* Release the <external_mutex> here and wait for the event
+ * to become signaled, due to <pthread_cond_signal> being
+ * called. */
+ vlc_mutex_unlock( p_mutex );
+
+ WaitForSingleObject( *p_condvar, INFINITE );
+
+ /* Reacquire the mutex before returning. */
+ vlc_mutex_lock( p_mutex );
+ return 0;
+
#endif
}
*****************************************************************************/
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
}
+
/*****************************************************************************
* dvd_udf.c: udf filesystem tools.
- * ---
+ *****************************************************************************
* Mainly used to find asolute logical block adress of *.ifo files. It only
* contains the basic udf handling functions
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
- * $Id: dvd_udf.c,v 1.5 2001/04/15 04:19:57 sam Exp $
+ * $Id: dvd_udf.c,v 1.6 2001/04/28 03:36:25 sam Exp $
*
* Author: Stéphane Borel <stef@via.ecp.fr>
*
#include <stdio.h>
#include <unistd.h>
#include <string.h>
+#ifdef STRNCASECMP_IN_STRINGS_H
+# include <strings.h>
+#endif
#include <fcntl.h>
#include "common.h"
/*****************************************************************************
* 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 )
{
/*****************************************************************************
* 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 )
{
/*****************************************************************************
* 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
/*****************************************************************************
* 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
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];
}
-/******************************************************************************
+/*****************************************************************************
* 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;
return partition.i_start + file.i_location;
}
+
/*****************************************************************************
* 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:
* -dvd_udf to find files
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
- * $Id: input_dvd.c,v 1.50 2001/04/27 19:29:11 massiot Exp $
+ * $Id: input_dvd.c,v 1.51 2001/04/28 03:36:25 sam Exp $
*
* Author: Stéphane Borel <stef@via.ecp.fr>
*
#include <sys/uio.h>
#include <string.h>
+#ifdef STRNCASECMP_IN_STRINGS_H
+# include <strings.h>
+#endif
#include <errno.h>
#include "config.h"
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" );
* fb.c : framebuffer plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
- * $Id: fb.c,v 1.5 2001/03/21 13:42:33 sam Exp $
+ * $Id: fb.c,v 1.6 2001/04/28 03:36:25 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
/*****************************************************************************
* Capabilities defined in the other files.
- ******************************************************************************/
+ *****************************************************************************/
void _M( vout_getfunctions )( function_list_t * p_function_list );
/*****************************************************************************
* ggi.c : GGI plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
- * $Id: ggi.c,v 1.5 2001/03/21 13:42:34 sam Exp $
+ * $Id: ggi.c,v 1.6 2001/04/28 03:36:25 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
/*****************************************************************************
* Capabilities defined in the other files.
- ******************************************************************************/
+ *****************************************************************************/
void _M( vout_getfunctions )( function_list_t * p_function_list );
/*****************************************************************************
* glide.c : 3dfx Glide plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
- * $Id: glide.c,v 1.4 2001/03/21 13:42:34 sam Exp $
+ * $Id: glide.c,v 1.5 2001/04/28 03:36:25 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
/*****************************************************************************
* Capabilities defined in the other files.
- ******************************************************************************/
+ *****************************************************************************/
void _M( vout_getfunctions )( function_list_t * p_function_list );
/*****************************************************************************
* gnome.c : Gnome plugin for vlc
*****************************************************************************
* Copyright (C) 2000 VideoLAN
- * $Id: gnome.c,v 1.6 2001/03/21 13:42:34 sam Exp $
+ * $Id: gnome.c,v 1.7 2001/04/28 03:36:25 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
/*****************************************************************************
* Capabilities defined in the other files.
- ******************************************************************************/
+ *****************************************************************************/
void _M( intf_getfunctions )( function_list_t * p_function_list );
/*****************************************************************************
* gtk.c : Gtk+ plugin for vlc
*****************************************************************************
* Copyright (C) 2000 VideoLAN
- * $Id: gtk.c,v 1.2 2001/03/21 13:42:34 sam Exp $
+ * $Id: gtk.c,v 1.3 2001/04/28 03:36:25 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
/*****************************************************************************
* Capabilities defined in the other files.
- ******************************************************************************/
+ *****************************************************************************/
void _M( intf_getfunctions )( function_list_t * p_function_list );
/*****************************************************************************
* gtk_callbacks.c : Callbacks for the Gtk+ plugin.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
- * $Id: gtk_callbacks.c,v 1.14 2001/04/11 04:31:59 sam Exp $
+ * $Id: gtk_callbacks.c,v 1.15 2001/04/28 03:36:25 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stéphane Borel <stef@via.ecp.fr>
* Preamble
*****************************************************************************/
#include "defs.h"
-
+#include <sys/types.h> /* off_t */
#include <stdlib.h>
#include <gtk/gtk.h>
/*****************************************************************************
* Callbacks
- ******************************************************************************/
+ *****************************************************************************/
void
on_menubar_open_activate (GtkMenuItem *menuitem,
gpointer user_data)
* gtk_playlist.c : Interface for the playlist dialog
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: gtk_playlist.c,v 1.9 2001/04/08 13:09:32 octplane Exp $
+ * $Id: gtk_playlist.c,v 1.10 2001/04/28 03:36:25 sam Exp $
*
* Authors: Pierre Baillet <oct@zoy.org>
*
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 );
}
/*****************************************************************************
- * 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 )
{
/*****************************************************************************
* flushQD: flushes buffered window area
- *****************************************************************************/
+ *****************************************************************************/
void flushQD( vout_thread_t *p_vout )
{
CGrafPtr thePort;
/*****************************************************************************
* BlitToWindow: checks offscreen and blits it to the front
- *****************************************************************************/
+ *****************************************************************************/
void BlitToWindow( vout_thread_t *p_vout, short index )
{
* mga.c : Matrox Graphic Array plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
- * $Id: mga.c,v 1.4 2001/03/21 13:42:34 sam Exp $
+ * $Id: mga.c,v 1.5 2001/04/28 03:36:25 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
/*****************************************************************************
* Capabilities defined in the other files.
- ******************************************************************************/
+ *****************************************************************************/
void _M( vout_getfunctions )( function_list_t * p_function_list );
/*****************************************************************************
* 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:
*
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;
}
* input_ps.c: PS demux and packet management
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: input_ps.c,v 1.19 2001/04/27 23:29:14 stef Exp $
+ * $Id: input_ps.c,v 1.20 2001/04/28 03:36:25 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Cyril Deguet <asmax@via.ecp.fr>
#include <stdlib.h>
#include <string.h>
+#ifdef STRNCASECMP_IN_STRINGS_H
+# include <strings.h>
+#endif
#include <errno.h>
#include <sys/types.h>
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;
}
* input_ts.c: TS demux and netlist management
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: input_ts.c,v 1.15 2001/04/27 16:08:26 sam Exp $
+ * $Id: input_ts.c,v 1.16 2001/04/28 03:36:25 sam Exp $
*
* Authors: Henri Fallon <henri@videolan.org>
*
#include <stdlib.h>
#include <string.h>
+#ifdef STRNCASECMP_IN_STRINGS_H
+# include <strings.h>
+#endif
#include <errno.h>
#include <sys/types.h>
#include <sys/time.h>
+
#ifdef SYS_NTO
#include <sys/select.h>
#endif
+
+#ifndef WIN32
#include <sys/uio.h>
+#endif
+
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
*****************************************************************************/
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 ) )
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 )
{
}
return 0;
}
+
* aout_sdl.c : audio sdl functions library
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: aout_sdl.c,v 1.11 2001/04/26 11:23:16 sam Exp $
+ * $Id: aout_sdl.c,v 1.12 2001/04/28 03:36:25 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
{
SDL_AudioSpec desired, obtained;
- return 0;
/* Start AudioSDL */
if( SDL_Init(SDL_INIT_AUDIO | SDL_INIT_NOPARACHUTE) != 0 )
{
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;
}
/* 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" ) )
* sdl.c : SDL plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
- * $Id: sdl.c,v 1.14 2001/03/21 13:42:34 sam Exp $
+ * $Id: sdl.c,v 1.15 2001/04/28 03:36:25 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Pierre Baillet <oct@zoy.org>
/*****************************************************************************
* 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 );
* vout_sdl.c: SDL video output display method
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: vout_sdl.c,v 1.47 2001/04/11 02:01:24 henri Exp $
+ * $Id: vout_sdl.c,v 1.48 2001/04/28 03:36:25 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Pierre Baillet <oct@zoy.org>
}
/* 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 );
* ncurses.c : NCurses plugin for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: ncurses.c,v 1.3 2001/03/21 13:42:34 sam Exp $
+ * $Id: ncurses.c,v 1.4 2001/04/28 03:36:25 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
/*****************************************************************************
* Capabilities defined in the other files.
- ******************************************************************************/
+ *****************************************************************************/
void _M( intf_getfunctions )( function_list_t * p_function_list );
/*****************************************************************************
* vout_x11.c: X11 video output display method
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: vout_x11.c,v 1.21 2001/04/27 19:29:11 massiot Exp $
+ * $Id: vout_x11.c,v 1.22 2001/04/28 03:36:25 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
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" );
* x11.c : X11 plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
- * $Id: x11.c,v 1.5 2001/03/21 13:42:34 sam Exp $
+ * $Id: x11.c,v 1.6 2001/04/28 03:36:25 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
/*****************************************************************************
* Capabilities defined in the other files.
- ******************************************************************************/
+ *****************************************************************************/
void _M( vout_getfunctions )( function_list_t * p_function_list );
/*****************************************************************************
* xvideo.c : Xvideo plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
- * $Id: xvideo.c,v 1.1 2001/04/01 06:21:44 sam Exp $
+ * $Id: xvideo.c,v 1.2 2001/04/28 03:36:25 sam Exp $
*
* Authors: Shane Harper <shanegh@optusnet.com.au>
*
/*****************************************************************************
* Capabilities defined in the other files.
- ******************************************************************************/
+ *****************************************************************************/
void _M( vout_getfunctions )( function_list_t * p_function_list );
/*****************************************************************************
* transforms_yuvmmx.h: MMX YUV transformation assembly
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: transforms_yuvmmx.h,v 1.3 2001/03/21 13:42:34 sam Exp $
+ * $Id: transforms_yuvmmx.h,v 1.4 2001/04/28 03:36:25 sam Exp $
*
* Authors: Olie Lho <ollie@sis.com.tw>
* Gaël Hendryckx <jimmy@via.ecp.fr>
#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\
"
#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\
*/
#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\
"
#define MMX_YUV_YCBR_422 " \n\
- \n\
punpcklbw %%mm1, %%mm0 \n\
movq %%mm6, %%mm2 \n\
punpckhbw %%mm0, %%mm6 \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\
*/
#define MMX_YUV_GRAY " \n\
- \n\
# convert the luma part \n\
psubusb mmx_10w, %%mm6 \n\
movq %%mm6, %%mm7 \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\
*/
#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\
#pxor %%mm4, %%mm4 # zero mm4 \n\
#movq 8(%0), %%mm6 # Load 8 Y Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 \n\
"
+
* audio_output.c : audio output thread
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: audio_output.c,v 1.56 2001/03/21 13:42:34 sam Exp $
+ * $Id: audio_output.c,v 1.57 2001/04/28 03:36:25 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
*
#include "defs.h"
#include <unistd.h> /* getpid() */
+#ifdef WIN32 /* getpid() for win32 is located in process.h */
+#include <process.h>
+#endif
#include <stdio.h> /* "intf_msg.h" */
#include <stdlib.h> /* calloc(), malloc(), free() */
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 ) )
{
* decoders.
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: input.c,v 1.101 2001/04/27 18:07:56 henri Exp $
+ * $Id: input.c,v 1.102 2001/04/28 03:36:25 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
+#ifdef STRNCASECMP_IN_STRINGS_H
+# include <strings.h>
+#endif
#include <errno.h>
/* Network functions */
-#if !defined( SYS_BEOS ) && !defined( SYS_NTO )
-#include <netdb.h> /* hostent ... */
+#if !defined( SYS_BEOS ) && !defined( SYS_NTO ) && !defined( WIN32 )
+#include <netdb.h> /* hostent ... */
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
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
)
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;
}
-#if !defined( SYS_BEOS ) && !defined( SYS_NTO )
+#if !defined( SYS_BEOS ) && !defined( SYS_NTO ) && !defined( WIN32 )
/*****************************************************************************
* input_NetworkOpen : open a network socket
*****************************************************************************/
* input_clock.c: Clock/System date convertions, stream management
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: input_clock.c,v 1.10 2001/04/26 03:55:44 sam Exp $
+ * $Id: input_clock.c,v 1.11 2001/04/28 03:36:25 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
#include "defs.h"
#include <string.h> /* memcpy(), memset() */
+#include <sys/types.h> /* off_t */
#include "config.h"
#include "common.h"
* input_dec.c: Functions for the management of decoders
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: input_dec.c,v 1.10 2001/04/06 09:15:47 sam Exp $
+ * $Id: input_dec.c,v 1.11 2001/04/28 03:36:25 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
#include <stdlib.h>
#include <string.h> /* memcpy(), memset() */
+#include <sys/types.h> /* off_t */
#include "config.h"
#include "common.h"
* input_ext-dec.c: services to the decoders
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: input_ext-dec.c,v 1.13 2001/04/25 10:22:33 massiot Exp $
+ * $Id: input_ext-dec.c,v 1.14 2001/04/28 03:36:25 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
#include "defs.h"
#include <string.h> /* memcpy(), memset() */
+#include <sys/types.h> /* off_t */
#include "config.h"
#include "common.h"
* input_ext-intf.c: services to the interface
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: input_ext-intf.c,v 1.21 2001/04/27 16:08:26 sam Exp $
+ * $Id: input_ext-intf.c,v 1.22 2001/04/28 03:36:25 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
#include "defs.h"
#include <string.h> /* memcpy(), memset() */
+#include <sys/types.h> /* off_t */
+
+#ifdef WIN32
+#define snprintf _snprintf
+#endif
#include "config.h"
#include "common.h"
* input_netlist.c: netlist management
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: input_netlist.c,v 1.33 2001/04/06 09:15:47 sam Exp $
+ * $Id: input_netlist.c,v 1.34 2001/04/28 03:36:25 sam Exp $
*
* Authors: Henri Fallon <henri@videolan.org>
*
#include <stdlib.h>
#include <string.h> /* memcpy(), memset() */
#include <sys/types.h>
+#ifndef WIN32
#include <sys/uio.h> /* struct iovec */
+#endif
#include <unistd.h>
#include "config.h"
#include "input.h"
#include "input_netlist.h"
+#ifdef WIN32
+struct iovec
+ {
+ void *iov_base; /* Pointer to data. */
+ size_t iov_len; /* Length of data. */
+ };
+#endif
/*****************************************************************************
* Local prototypes
*****************************************************************************/
* input_programs.c: es_descriptor_t, pgrm_descriptor_t management
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: input_programs.c,v 1.51 2001/04/27 19:29:11 massiot Exp $
+ * $Id: input_programs.c,v 1.52 2001/04/28 03:36:25 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
#include <stdlib.h>
#include <string.h> /* memcpy(), memset() */
+#include <sys/types.h> /* off_t */
#include "config.h"
#include "common.h"
* mpeg_system.c: TS, PS and PES management
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: mpeg_system.c,v 1.51 2001/04/17 14:54:54 massiot Exp $
+ * $Id: mpeg_system.c,v 1.52 2001/04/28 03:36:25 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
#include <stdlib.h>
#include <string.h> /* memcpy(), memset() */
+#include <sys/types.h> /* off_t */
#include "config.h"
#include "common.h"
* interface, such as command line.
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: interface.c,v 1.72 2001/04/11 02:01:24 henri Exp $
+ * $Id: interface.c,v 1.73 2001/04/28 03:36:25 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
#include <stdlib.h> /* free(), strtol() */
#include <stdio.h> /* FILE */
#include <string.h> /* strerror() */
+#include <sys/types.h> /* off_t */
#include "config.h"
#include "common.h"
* intf_channels.c: channel handling functions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: intf_channels.c,v 1.2 2001/03/21 13:42:34 sam Exp $
+ * $Id: intf_channels.c,v 1.3 2001/04/28 03:36:25 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
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 )
{
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') )
{
* interface, such as message output. See config.h for output configuration.
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: intf_msg.c,v 1.31 2001/04/27 19:29:11 massiot Exp $
+ * $Id: intf_msg.c,v 1.32 2001/04/28 03:36:25 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
#include "main.h"
+#ifdef WIN32
+#define snprintf _snprintf /* snprintf not defined in mingw32 (bug?) */
+#endif
+
/*****************************************************************************
* intf_msg_item_t
*****************************************************************************
* and spawn threads.
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: main.c,v 1.88 2001/04/27 18:07:56 henri Exp $
+ * $Id: main.c,v 1.89 2001/04/28 03:36:25 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
/*
* 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 );
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
}
/* 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 );
* modules.c : Built-in and plugin modules management functions
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: modules.c,v 1.26 2001/04/20 11:06:48 sam Exp $
+ * $Id: modules.c,v 1.27 2001/04/28 03:36:25 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Ethan C. Baldridge <BaldridgeE@cadmus.com>
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
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.",
*****************************************************************************
* 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 )
{
*****************************************************************************
* 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 * ),
}
/*****************************************************************************
- * 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
* Functions are prototyped in mtime.h.
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: mtime.c,v 1.16 2001/03/21 13:42:34 sam Exp $
+ * $Id: mtime.c,v 1.17 2001/04/28 03:36:25 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
#include <kernel/OS.h>
#endif
+#ifdef WIN32
+#include <windows.h>
+#endif
+
#include "config.h"
#include "common.h"
#include "mtime.h"
*****************************************************************************/
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;
* 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
}
*****************************************************************************/
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();
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 */
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
}
/*****************************************************************************
*****************************************************************************/
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;
* (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
}
+
* netutils.c: various network functions
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: netutils.c,v 1.27 2001/04/27 18:07:57 henri Exp $
+ * $Id: netutils.c,v 1.28 2001/04/28 03:36:25 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Benoit Steiner <benny@via.ecp.fr>
*****************************************************************************/
#include "defs.h"
-#include <netdb.h> /* gethostbyname() */
#include <stdlib.h> /* free(), realloc(), atoi() */
#include <errno.h> /* errno() */
#include <string.h> /* bzero(), bcopy() */
#include <unistd.h> /* gethostname() */
#include <sys/time.h> /* gettimeofday */
+#ifndef WIN32
+#include <netdb.h> /* gethostbyname() */
#include <netinet/in.h> /* BSD: struct in_addr */
#include <sys/socket.h> /* BSD: struct sockaddr */
+#endif
+
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h> /* inet_ntoa(), inet_aton() */
#endif
/* 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 )
{
/* 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. */
* spu_decoder.c : spu decoder thread
*****************************************************************************
* Copyright (C) 2000 VideoLAN
- * $Id: spu_decoder.c,v 1.37 2001/04/25 10:22:33 massiot Exp $
+ * $Id: spu_decoder.c,v 1.38 2001/04/28 03:36:25 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
#include "defs.h"
#include <unistd.h> /* getpid() */
+#ifdef WIN32 /* getpid() for win32 is located in process.h */
+#include <process.h>
+#endif
#include <stdlib.h> /* malloc(), free() */
#include <string.h> /* memcpy(), memset() */
* video_text.c : text manipulation functions
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: video_text.c,v 1.25 2001/04/27 19:29:11 massiot Exp $
+ * $Id: video_text.c,v 1.26 2001/04/28 03:36:25 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
}
/* 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 )
* video_parser.c : video parser thread
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: video_parser.c,v 1.79 2001/04/25 10:22:33 massiot Exp $
+ * $Id: video_parser.c,v 1.80 2001/04/28 03:36:25 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
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 )
* vpar_blocks.c : blocks parsing
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: vpar_blocks.c,v 1.79 2001/02/23 17:58:22 massiot Exp $
+ * $Id: vpar_blocks.c,v 1.80 2001/04/28 03:36:25 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Jean-Marc Dressler <polux@via.ecp.fr>
};
- /* 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)
*/
DECLARE_PICD( vpar_PictureData2PB, 1, P_CODING_TYPE, BOTTOM_FIELD );
DECLARE_PICD( vpar_PictureData2BB, 1, B_CODING_TYPE, BOTTOM_FIELD );
#endif
+
* vpar_headers.c : headers parsing
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: vpar_headers.c,v 1.81 2001/04/06 09:15:48 sam Exp $
+ * $Id: vpar_headers.c,v 1.82 2001/04/28 03:36:26 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Stéphane Borel <stef@via.ecp.fr>
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 );
}
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 );
{
/* 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 )
#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 )
{