Commit be8ca6e9 authored by Sam Hocevar's avatar Sam Hocevar

* ALL: WinCE compilation fixes (mostly nonexistent headers). A lot of

    work is still needed for missing functions. I only touched libvlc for
    the moment, plugins will come in a long long while.
  * ./bootstrap: moved MSVC project files generation here; use --update-msvc.
parent 74e8f4f6
...@@ -276,73 +276,25 @@ EXTRA_DIST += \ ...@@ -276,73 +276,25 @@ EXTRA_DIST += \
msvc/vlc.dsw \ msvc/vlc.dsw \
msvc/vlc.dsp.in \ msvc/vlc.dsp.in \
msvc/vlc.dsp.out \ msvc/vlc.dsp.out \
msvc/vlc.vcp \
msvc/vlc.vcw \
msvc/vlc.vcp.in \
msvc/vlc.vcp.out \
msvc/config.h \ msvc/config.h \
msvc/modules_builtin_msvc.h \ msvc/modules_builtin_msvc.h \
$(NULL) $(NULL)
# show-vlc-sources: FORCE
# rule to rebuild vlc.dsp - not for the faint of heart @echo X: $(vlc_SOURCES)
#
update-vlc.dsp: FORCE show-libvlc-sources: FORCE
rm -f msvc/vlc.dsp @echo X: $(SOURCES_libvlc_common) $(SOURCES_libvlc_win32) $(SOURCES_libvlc_dirent) $(SOURCES_libvlc_getopt) $(SOURCES_libvlc_strndup)
# Top of the project file
cat msvc/vlc.dsp.in > msvc/vlc.dsp show-libvlc-headers: FORCE
# The source files @echo X: $(HEADERS_include) $(HEADERS_include_built)
echo '# Begin Group "Source Files" ' >> msvc/vlc.dsp
echo '# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" ' >> msvc/vlc.dsp show-libvlc-pkg-headers: FORCE
echo '# Begin Group "vlc" ' >> msvc/vlc.dsp @echo X: $(dist_pkginclude_HEADERS)
for file in $(vlc_SOURCES) ; do \
echo '# Begin Source File ' >> msvc/vlc.dsp ; \
echo $$file | sed -e 's%/%\\%g' -e 's%.*%SOURCE="..\\&" %' >> msvc/vlc.dsp ; \
echo '# End Source File ' >> msvc/vlc.dsp ; \
done ; \
echo '# End Group ' >> msvc/vlc.dsp
echo '# Begin Group "libvlc" ' >> msvc/vlc.dsp
for file in `for i in $(SOURCES_libvlc) $(OPT_SOURCES_libvlc_win32) $(OPT_SOURCES_libvlc_dirent) $(OPT_SOURCES_libvlc_getopt) ; do echo $$i ; done | grep -v "/.*/"` ; do \
echo '# Begin Source File ' >> msvc/vlc.dsp ; \
echo $$file | sed -e 's%/%\\%g' -e 's%.*%SOURCE="..\\&" %' >> msvc/vlc.dsp ; \
echo '# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\"plugins\" /D DATA_PATH=\"share\" ' >> msvc/vlc.dsp ; \
echo '# End Source File ' >> msvc/vlc.dsp ; \
done ; \
for subdir in `for i in $(SOURCES_libvlc) $(OPT_SOURCES_libvlc_win32) $(OPT_SOURCES_libvlc_dirent) $(OPT_SOURCES_libvlc_getopt) ; do echo $$i ; done | grep "/.*/" | cut -f2 -d/ | sort | uniq` ; do \
echo '# Begin Group "'$$subdir'" ' >> msvc/vlc.dsp ; \
for file in `for i in $(SOURCES_libvlc) $(OPT_SOURCES_libvlc_win32) $(OPT_SOURCES_libvlc_dirent) $(OPT_SOURCES_libvlc_getopt) ; do echo $$i ; done | grep "/$$subdir/"` ; do \
echo '# Begin Source File ' >> msvc/vlc.dsp ; \
echo $$file | sed -e 's%/%\\%g' -e 's%.*%SOURCE="..\\&" %' >> msvc/vlc.dsp ; \
echo '# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\"plugins\" /D DATA_PATH=\"share\" ' >> msvc/vlc.dsp ; \
echo '!IF "$$(CFG)" == "vlc - Win32 Release" ' >> msvc/vlc.dsp ; \
echo '# PROP Intermediate_Dir "Release\'$$subdir'"' >> msvc/vlc.dsp ; \
echo '# PROP Output_Dir "Release\'$$subdir'"' >> msvc/vlc.dsp ; \
echo '!ELSEIF "$$(CFG)" == "vlc - Win32 Debug" ' >> msvc/vlc.dsp ; \
echo '# PROP Intermediate_Dir "Debug\'$$subdir'"' >> msvc/vlc.dsp ; \
echo '# PROP Output_Dir "Debug\'$$subdir'"' >> msvc/vlc.dsp ; \
echo '!ENDIF ' >> msvc/vlc.dsp ; \
echo '# End Source File ' >> msvc/vlc.dsp ; \
done ; \
echo '# End Group ' >> msvc/vlc.dsp ; \
done
echo '# End Group ' >> msvc/vlc.dsp
echo '# End Group ' >> msvc/vlc.dsp
# The modules
echo 'no modules yet'
# The headers
echo '# Begin Group "Header Files" ' >> msvc/vlc.dsp
echo '# PROP Default_Filter "h;hpp;hxx;hm;inl" ' >> msvc/vlc.dsp
for file in $(HEADERS_include) $(HEADERS_include_built) ; do \
echo '# Begin Source File ' >> msvc/vlc.dsp ; \
echo $$file | sed -e 's%/%\\%g' -e 's%.*%SOURCE="..\\&" %' >> msvc/vlc.dsp ; \
echo '# End Source File ' >> msvc/vlc.dsp ; \
done
echo '# Begin Group "vlc" ' >> msvc/vlc.dsp
for file in $(dist_pkginclude_HEADERS) ; do \
echo '# Begin Source File ' >> msvc/vlc.dsp ; \
echo $$file | sed -e 's%/%\\%g' -e 's%.*%SOURCE="..\\&" %' >> msvc/vlc.dsp ; \
echo '# End Source File ' >> msvc/vlc.dsp ; \
done
echo '# End Group ' >> msvc/vlc.dsp
echo '# End Group ' >> msvc/vlc.dsp
# Bottom of the project file - handles resource files too
cat msvc/vlc.dsp.out >> msvc/vlc.dsp
############################################################################### ###############################################################################
# Building libvlc # Building libvlc
...@@ -361,64 +313,64 @@ lib_libvlc_pic_a_CFLAGS = $(CPPFLAGS_pic) -D__VLC__ $(CFLAGS_pic) @CFLAGS_vlc@ ...@@ -361,64 +313,64 @@ lib_libvlc_pic_a_CFLAGS = $(CPPFLAGS_pic) -D__VLC__ $(CFLAGS_pic) @CFLAGS_vlc@
lib_libvlc_pic_a_CXXFLAGS = $(CPPFLAGS_pic) -D__VLC__ $(CXXFLAGS_pic) lib_libvlc_pic_a_CXXFLAGS = $(CPPFLAGS_pic) -D__VLC__ $(CXXFLAGS_pic)
if HAVE_BEOS if HAVE_BEOS
SOURCES_libvlc_beos = $(OPT_SOURCES_libvlc_beos) OPT_SOURCES_libvlc_beos = $(SOURCES_libvlc_beos)
endif endif
if HAVE_DARWIN if HAVE_DARWIN
SOURCES_libvlc_darwin = $(OPT_SOURCES_libvlc_darwin) OPT_SOURCES_libvlc_darwin = $(SOURCES_libvlc_darwin)
endif endif
if HAVE_WIN32 if HAVE_WIN32
SOURCES_libvlc_win32 = $(OPT_SOURCES_libvlc_win32) OPT_SOURCES_libvlc_win32 = $(SOURCES_libvlc_win32)
endif endif
if BUILD_DIRENT if BUILD_DIRENT
SOURCES_libvlc_dirent = $(OPT_SOURCES_libvlc_dirent) OPT_SOURCES_libvlc_dirent = $(SOURCES_libvlc_dirent)
endif endif
if BUILD_GETOPT if BUILD_GETOPT
SOURCES_libvlc_getopt = $(OPT_SOURCES_libvlc_getopt) OPT_SOURCES_libvlc_getopt = $(SOURCES_libvlc_getopt)
endif endif
if BUILD_STRNDUP if BUILD_STRNDUP
SOURCES_libvlc_strndup = $(OPT_SOURCES_libvlc_strndup) OPT_SOURCES_libvlc_strndup = $(SOURCES_libvlc_strndup)
endif endif
if BUILD_MOZILLA if BUILD_MOZILLA
LIBRARIES_libvlc_pic = lib/libvlc_pic.a LIBRARIES_libvlc_pic = lib/libvlc_pic.a
endif endif
EXTRA_DIST += \ EXTRA_DIST += \
$(OPT_SOURCES_libvlc_beos) \ $(SOURCES_libvlc_beos) \
$(OPT_SOURCES_libvlc_darwin) \ $(SOURCES_libvlc_darwin) \
$(OPT_SOURCES_libvlc_win32) \ $(SOURCES_libvlc_win32) \
$(OPT_SOURCES_libvlc_dirent) \ $(SOURCES_libvlc_dirent) \
$(OPT_SOURCES_libvlc_getopt) \ $(SOURCES_libvlc_getopt) \
$(OPT_SOURCES_libvlc_strndup) \ $(SOURCES_libvlc_strndup) \
$(NULL) $(NULL)
OPT_SOURCES_libvlc_beos = \ SOURCES_libvlc_beos = \
src/misc/beos_specific.cpp \ src/misc/beos_specific.cpp \
$(NULL) $(NULL)
OPT_SOURCES_libvlc_darwin = \ SOURCES_libvlc_darwin = \
src/misc/darwin_specific.c \ src/misc/darwin_specific.c \
$(NULL) $(NULL)
OPT_SOURCES_libvlc_win32 = \ SOURCES_libvlc_win32 = \
src/misc/win32_specific.c \ src/misc/win32_specific.c \
$(NULL) $(NULL)
OPT_SOURCES_libvlc_dirent = \ SOURCES_libvlc_dirent = \
src/extras/dirent.c \ src/extras/dirent.c \
src/extras/dirent.h \ src/extras/dirent.h \
$(NULL) $(NULL)
OPT_SOURCES_libvlc_getopt = \ SOURCES_libvlc_getopt = \
src/extras/getopt.c \ src/extras/getopt.c \
src/extras/getopt.h \ src/extras/getopt.h \
src/extras/getopt1.c \ src/extras/getopt1.c \
$(NULL) $(NULL)
OPT_SOURCES_libvlc_strndup = \ SOURCES_libvlc_strndup = \
src/extras/strndup.c src/extras/strndup.c
$(NULL) $(NULL)
SOURCES_libvlc = \ SOURCES_libvlc_common = \
src/libvlc.c \ src/libvlc.c \
src/libvlc.h \ src/libvlc.h \
src/interface/interface.c \ src/interface/interface.c \
...@@ -453,17 +405,21 @@ SOURCES_libvlc = \ ...@@ -453,17 +405,21 @@ SOURCES_libvlc = \
src/misc/configuration.c \ src/misc/configuration.c \
src/misc/netutils.c \ src/misc/netutils.c \
src/misc/iso_lang.c \ src/misc/iso_lang.c \
src/misc/iso-639.def \ src/misc/iso-639_def.h \
src/misc/messages.c \ src/misc/messages.c \
src/misc/objects.c \ src/misc/objects.c \
src/misc/variables.c \ src/misc/variables.c \
src/misc/error.c \ src/misc/error.c \
$(SOURCES_libvlc_beos) \ $(NULL)
$(SOURCES_libvlc_darwin) \
$(SOURCES_libvlc_win32) \ SOURCES_libvlc = \
$(SOURCES_libvlc_dirent) \ $(SOURCES_libvlc_common) \
$(SOURCES_libvlc_getopt) \ $(OPT_SOURCES_libvlc_beos) \
$(SOURCES_libvlc_strndup) \ $(OPT_SOURCES_libvlc_darwin) \
$(OPT_SOURCES_libvlc_win32) \
$(OPT_SOURCES_libvlc_dirent) \
$(OPT_SOURCES_libvlc_getopt) \
$(OPT_SOURCES_libvlc_strndup) \
$(NULL) $(NULL)
############################################################################### ###############################################################################
......
#! /bin/sh #! /bin/sh
## bootstrap file for vlc, the VideoLAN Client ## bootstrap file for vlc, the VideoLAN Client
## $Id: bootstrap,v 1.24 2002/11/09 16:34:52 sam Exp $ ## $Id: bootstrap,v 1.25 2002/11/10 18:04:22 sam Exp $
## ##
## Authors: Samuel Hocevar <sam@zoy.org> ## Authors: Samuel Hocevar <sam@zoy.org>
...@@ -15,18 +15,199 @@ export LANG ...@@ -15,18 +15,199 @@ export LANG
### argument check ### argument check
### ###
do_po=no do_po=no
do_msvc=no
while test $# -gt 0; do while test $# -gt 0; do
case "$1" in case "$1" in
--update-msvc)
do_msvc=yes
;;
--update-po) --update-po)
do_po=yes do_po=yes
;; ;;
*) *)
echo "unknown option $1" echo "$0: unknown option $1"
echo "recognized flags are --update-msvc and --update-po"
exit 1
;; ;;
esac esac
shift shift
done done
##
## Update the MSVC project files
##
if test "$do_msvc" = "no"
then
echo "not updating MSVC project file. use --update-msvc to force doing it."
else
if test ! -f Makefile
then
echo "no Makefile found, did you run ./configure?"
exit 1
fi
# The evil ^M
M=' '
# Sources that get built under Win32
VLC_SOURCES=`make show-vlc-sources | grep '^X: ' | cut -b3-`
LIBVLC_SOURCES=`make show-libvlc-sources | grep '^X: ' | cut -b3-`
LIBVLC_HEADERS=`make show-libvlc-headers | grep '^X: ' | cut -b3-`
LIBVLC_PKG_HEADERS=`make show-libvlc-pkg-headers | grep '^X: ' | cut -b3-`
for target in msvc/vlc.vcp msvc/vlc.dsp
do
rm -f ${target}
# Top of the project file
cat ${target}.in > ${target}
# The source files
cat >> ${target} << EOF
# Begin Group "Source Files"${M}
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"${M}
# Begin Group "vlc"${M}
EOF
for file in ${VLC_SOURCES}
do
cat >> ${target} << EOF
# Begin Source File${M}
SOURCE="..\\`echo $file | sed -e 's%/%\\\\%g'`"${M}
# End Source File${M}
EOF
done
cat >> ${target} << EOF
# End Group${M}
# Begin Group "libvlc"${M}
EOF
for file in `for i in ${LIBVLC_SOURCES} ; do echo $i ; done | grep -v "/.*/"`
do
cat >> ${target} << EOF
# Begin Source File${M}
SOURCE="..\\`echo $file | sed -e 's%/%\\\\%g'`"${M}
# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\\"plugins\\" /D DATA_PATH=\\"share\\"${M}
# End Source File${M}
EOF
done
for subdir in `for i in ${LIBVLC_SOURCES} ; do echo $i ; done | grep "/.*/" | cut -f2 -d/ | sort | uniq`
do
cat >> ${target} << EOF
# Begin Group "${subdir}"${M}
EOF
for file in `for i in ${LIBVLC_SOURCES} ; do echo $i ; done | grep "/${subdir}/"`
do
if test "${target}" = "msvc/vlc.vcp"
then
cat >> ${target} << EOF
# Begin Source File${M}
SOURCE="..\\`echo $file | sed -e 's%/%\\\\%g'`"${M}
# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\\"plugins\\" /D DATA_PATH=\\"share\\"${M}
!IF "\$(CFG)" == "vlc - Win32 (WCE MIPS) Release"${M}
# PROP Intermediate_Dir "Release\\${subdir}"${M}
# PROP Output_Dir "Release\\${subdir}"${M}
!ELSEIF "\$(CFG)" == "vlc - Win32 (WCE MIPS) Debug"${M}
# PROP Intermediate_Dir "Debug\\${subdir}"${M}
# PROP Output_Dir "Debug\\${subdir}"${M}
!ELSEIF "\$(CFG)" == "vlc - Win32 (WCE SH4) Release"${M}
# PROP Intermediate_Dir "Release\\${subdir}"${M}
# PROP Output_Dir "Release\\${subdir}"${M}
!ELSEIF "\$(CFG)" == "vlc - Win32 (WCE SH4) Debug"${M}
# PROP Intermediate_Dir "Debug\\${subdir}"${M}
# PROP Output_Dir "Debug\\${subdir}"${M}
!ELSEIF "\$(CFG)" == "vlc - Win32 (WCE SH3) Release"${M}
# PROP Intermediate_Dir "Release\\${subdir}"${M}
# PROP Output_Dir "Release\\${subdir}"${M}
!ELSEIF "\$(CFG)" == "vlc - Win32 (WCE SH3) Debug"${M}
# PROP Intermediate_Dir "Debug\\${subdir}"${M}
# PROP Output_Dir "Debug\\${subdir}"${M}
!ELSEIF "\$(CFG)" == "vlc - Win32 (WCE ARM) Release"${M}
# PROP Intermediate_Dir "Release\\${subdir}"${M}
# PROP Output_Dir "Release\\${subdir}"${M}
!ELSEIF "\$(CFG)" == "vlc - Win32 (WCE ARM) Debug"${M}
# PROP Intermediate_Dir "Debug\\${subdir}"${M}
# PROP Output_Dir "Debug\\${subdir}"${M}
!ELSEIF "\$(CFG)" == "vlc - Win32 (WCE x86em) Release"${M}
# PROP Intermediate_Dir "Release\\${subdir}"${M}
# PROP Output_Dir "Release\\${subdir}"${M}
!ELSEIF "\$(CFG)" == "vlc - Win32 (WCE x86em) Debug"${M}
# PROP Intermediate_Dir "Debug\\${subdir}"${M}
# PROP Output_Dir "Debug\\${subdir}"${M}
!ENDIF${M}
# End Source File${M}
EOF
else
cat >> ${target} << EOF
# Begin Source File${M}
SOURCE="..\\`echo $file | sed -e 's%/%\\\\%g'`"${M}
# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\\"plugins\\" /D DATA_PATH=\\"share\\"${M}
!IF "\$(CFG)" == "vlc - Win32 Release"${M}
# PROP Intermediate_Dir "Release\\${subdir}"${M}
# PROP Output_Dir "Release\\${subdir}"${M}
!ELSEIF "\$(CFG)" == "vlc - Win32 Debug"${M}
# PROP Intermediate_Dir "Debug\\${subdir}"${M}
# PROP Output_Dir "Debug\\${subdir}"${M}
!ENDIF${M}
# End Source File${M}
EOF
fi
done
cat >> ${target} << EOF
# End Group${M}
EOF
done
cat >> ${target} << EOF
# End Group${M}
# End Group${M}
EOF
# The modules
echo 'no modules yet'
# The headers
cat >> ${target} << EOF
# Begin Group "Header Files"${M}
# PROP Default_Filter "h;hpp;hxx;hm;inl"${M}
EOF
for file in ${LIBVLC_HEADERS}
do
cat >> ${target} << EOF
# Begin Source File${M}
SOURCE="..\\`echo $file | sed -e 's%/%\\\\%g'`"${M}
# End Source File${M}
EOF
done
cat >> ${target} << EOF
# Begin Group "vlc"${M}
EOF
for file in ${LIBVLC_PKG_HEADERS}
do
cat >> ${target} << EOF
# Begin Source File${M}
SOURCE="..\\`echo $file | sed -e 's%/%\\\\%g'`"${M}
# End Source File${M}
EOF
done
cat >> ${target} << EOF
# End Group${M}
# End Group${M}
EOF
# Bottom of the project file - handles resource files too
cat ${target}.out >> ${target}
done
exit 0
fi
##
## Update the potfiles because no one ever does it
##
if test "$do_po" = "no"
then
echo "not updating potfiles. use --update-po to force doing it."
else
cd po
make update-po 2>&1 | grep '^[^:]*:$' | cut -f1 -d: | tr '\n' ' ' | sed 's/ $//'
cd ..
exit 0
fi
## ##
## Check that our tools don't suck ## Check that our tools don't suck
## ##
...@@ -311,23 +492,6 @@ then ...@@ -311,23 +492,6 @@ then
mv -f /tmp/$$.$file.bak modules/gui/gtk/$file mv -f /tmp/$$.$file.bak modules/gui/gtk/$file
fi fi
##
## Don't update the MSVC project file
##
echo "not updating MSVC project file. run 'make update-vlc.dsp' for this."
##
## Update the potfiles because no one ever does it
##
if test "$do_po" = "no"
then
echo "not updating potfiles. use --update-po to force doing it."
else
cd po
make update-po 2>&1 | grep '^[^:]*:$' | cut -f1 -d: | tr '\n' ' ' | sed 's/ $//'
cd ..
fi
## ##
## Tell the user about gettext and sed ## Tell the user about gettext and sed
## ##
......
...@@ -316,8 +316,8 @@ AC_EGREP_HEADER(strncasecmp,strings.h,[ ...@@ -316,8 +316,8 @@ AC_EGREP_HEADER(strncasecmp,strings.h,[
Define if <strings.h> defines strncasecmp.)]) Define if <strings.h> defines strncasecmp.)])
dnl Check for headers dnl Check for headers
AC_CHECK_HEADERS(stdint.h getopt.h strings.h inttypes.h sys/int_types.h) AC_CHECK_HEADERS(signal.h time.h errno.h stdint.h getopt.h strings.h inttypes.h sys/int_types.h)
AC_CHECK_HEADERS(sys/sockio.h fcntl.h sys/types.h sys/time.h sys/times.h sys/ioctl.h) AC_CHECK_HEADERS(sys/sockio.h fcntl.h sys/types.h sys/time.h sys/times.h sys/ioctl.h sys/stat.h)
AC_CHECK_HEADERS(dlfcn.h image.h) AC_CHECK_HEADERS(dlfcn.h image.h)
AC_CHECK_HEADERS(arpa/inet.h net/if.h netinet/in.h sys/socket.h) AC_CHECK_HEADERS(arpa/inet.h net/if.h netinet/in.h sys/socket.h)
AC_CHECK_HEADERS(machine/param.h sys/shm.h) AC_CHECK_HEADERS(machine/param.h sys/shm.h)
......
...@@ -354,3 +354,16 @@ the Boston strangler is to the woman home alone. ...@@ -354,3 +354,16 @@ the Boston strangler is to the woman home alone.
-- #videolan -- #videolan
% %
<Meuuh> at the salsa lesson tonight, a girl told me that she was very happy to dance with me
<Meuuh> do you think it means something ?
<Dnumgis> Probably that she finally found someone that was worse at dancing
than she
-- #videolan
%
<hal_3k> damn
<hal_3k> why didn't you use LGPL?
<sam> why don't you use GPL?
-- #videolan
%
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* Declaration and extern access to global program object. * Declaration and extern access to global program object.
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000, 2001, 2002 VideoLAN * Copyright (C) 1999, 2000, 2001, 2002 VideoLAN
* $Id: main.h,v 1.49 2002/10/14 16:46:55 sam Exp $ * $Id: main.h,v 1.50 2002/11/10 18:04:22 sam Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* *
...@@ -57,7 +57,7 @@ struct libvlc_t ...@@ -57,7 +57,7 @@ struct libvlc_t
/* Arch-specific variables */ /* Arch-specific variables */
#if defined( SYS_BEOS ) #if defined( SYS_BEOS )
vlc_object_t * p_appthread; vlc_object_t * p_appthread;
#elif defined( WIN32 ) #elif defined( WIN32 ) && !defined( UNDER_CE )
SIGNALOBJECTANDWAIT SignalObjectAndWait; SIGNALOBJECTANDWAIT SignalObjectAndWait;
vlc_bool_t b_fast_mutex; vlc_bool_t b_fast_mutex;
int i_win9x_cv; int i_win9x_cv;
...@@ -83,8 +83,13 @@ struct vlc_t ...@@ -83,8 +83,13 @@ struct vlc_t
/* Fast memcpy plugin used */ /* Fast memcpy plugin used */
module_t * p_memcpy_module; module_t * p_memcpy_module;
#if defined( WIN32 )
void* ( __cdecl *pf_memcpy ) ( void *, const void *, size_t );
void* ( __cdecl *pf_memset ) ( void *, int, size_t );
#else
void* ( *pf_memcpy ) ( void *, const void *, size_t ); void* ( *pf_memcpy ) ( void *, const void *, size_t );
void* ( *pf_memset ) ( void *, int, size_t ); void* ( *pf_memset ) ( void *, int, size_t );
#endif
/* Shared data - these structures are accessed directly from p_vlc by /* Shared data - these structures are accessed directly from p_vlc by
* several modules */ * several modules */
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* This header provides portable declarations for mutexes & conditions * This header provides portable declarations for mutexes & conditions
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2002 VideoLAN * Copyright (C) 1999, 2002 VideoLAN
* $Id: vlc_threads.h,v 1.16 2002/10/28 22:31:50 gbazin Exp $ * $Id: vlc_threads.h,v 1.17 2002/11/10 18:04:22 sam Exp $
* *
* Authors: Jean-Marc Dressler <polux@via.ecp.fr> * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr> * Samuel Hocevar <sam@via.ecp.fr>
...@@ -28,7 +28,9 @@ ...@@ -28,7 +28,9 @@
#include <stdio.h> #include <stdio.h>
#if defined(GPROF) || defined(DEBUG) #if defined(GPROF) || defined(DEBUG)
# ifdef HAVE_SYS_TIME_H
# include <sys/time.h> # include <sys/time.h>
# endif
#endif #endif
#if defined( PTH_INIT_IN_PTH_H ) /* GNU Pth */ #if defined( PTH_INIT_IN_PTH_H ) /* GNU Pth */
...@@ -37,8 +39,12 @@ ...@@ -37,8 +39,12 @@
#elif defined( ST_INIT_IN_ST_H ) /* State threads */ #elif defined( ST_INIT_IN_ST_H ) /* State threads */
# include <st.h> # include <st.h>
#elif defined( WIN32 ) /* Win32 API */ #elif defined( WIN32 )
# include <process.h> # if defined( UNDER_CE )
/* WinCE API */
# else
# include <process.h> /* Win32 API */
# endif
#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) /* pthreads (like Linux & BSD) */ #elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) /* pthreads (like Linux & BSD) */
# include <pthread.h> # include <pthread.h>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* This header provides a portable threads implementation. * This header provides a portable threads implementation.
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2002 VideoLAN * Copyright (C) 1999, 2002 VideoLAN
* $Id: vlc_threads_funcs.h,v 1.7 2002/10/27 17:23:17 titer Exp $ * $Id: vlc_threads_funcs.h,v 1.8 2002/11/10 18:04:22 sam Exp $
* *
* Authors: Jean-Marc Dressler <polux@via.ecp.fr> * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr> * Samuel Hocevar <sam@via.ecp.fr>
...@@ -232,6 +232,7 @@ static inline int __vlc_cond_signal( char * psz_file, int i_line, ...@@ -232,6 +232,7 @@ static inline int __vlc_cond_signal( char * psz_file, int i_line,
{ {
PulseEvent( p_condvar->event ); PulseEvent( p_condvar->event );
} }
# ifndef UNDER_CE
else if( p_condvar->i_win9x_cv == 1 ) else if( p_condvar->i_win9x_cv == 1 )
{ {
/* Wait for the gate to be open */ /* Wait for the gate to be open */
...@@ -263,6 +264,7 @@ static inline int __vlc_cond_signal( char * psz_file, int i_line, ...@@ -263,6 +264,7 @@ static inline int __vlc_cond_signal( char * psz_file, int i_line,
WaitForSingleObject( p_condvar->event, INFINITE ); WaitForSingleObject( p_condvar->event, INFINITE );
} }
} }
# endif
return 0; return 0;
#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) #elif defined( PTHREAD_COND_T_IN_PTHREAD_H )
...@@ -366,6 +368,7 @@ static inline int __vlc_cond_broadcast( char * psz_file, int i_line, ...@@ -366,6 +368,7 @@ static inline int __vlc_cond_broadcast( char * psz_file, int i_line,
PulseEvent( p_condvar->event ); PulseEvent( p_condvar->event );
} }
} }
# ifndef UNDER_CE
else if( p_condvar->i_win9x_cv == 1 ) else if( p_condvar->i_win9x_cv == 1 )
{ {
/* Wait for the gate to be open */ /* Wait for the gate to be open */
...@@ -399,6 +402,7 @@ static inline int __vlc_cond_broadcast( char * psz_file, int i_line, ...@@ -399,6 +402,7 @@ static inline int __vlc_cond_broadcast( char * psz_file, int i_line,
WaitForSingleObject( p_condvar->event, INFINITE ); WaitForSingleObject( p_condvar->event, INFINITE );
} }
} }
# endif
return 0; return 0;
#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) #elif defined( PTHREAD_COND_T_IN_PTHREAD_H )
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* test4.c : Miscellaneous stress tests module for vlc * test4.c : Miscellaneous stress tests module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: test4.c,v 1.3 2002/10/17 13:15:30 sam Exp $ * $Id: test4.c,v 1.4 2002/11/10 18:04:22 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -41,6 +41,8 @@ ...@@ -41,6 +41,8 @@
/***************************************************************************** /*****************************************************************************
* Local prototypes. * Local prototypes.
*****************************************************************************/ *****************************************************************************/
static int Foo ( vlc_object_t *, char *, char * );
static int Callback ( vlc_object_t *, char *, char * ); static int Callback ( vlc_object_t *, char *, char * );
static int MyCallback( vlc_object_t *, char const *, static int MyCallback( vlc_object_t *, char const *,
vlc_value_t, vlc_value_t, void * ); vlc_value_t, vlc_value_t, void * );
...@@ -56,6 +58,8 @@ static int Signal ( vlc_object_t *, char *, char * ); ...@@ -56,6 +58,8 @@ static int Signal ( vlc_object_t *, char *, char * );
*****************************************************************************/ *****************************************************************************/
vlc_module_begin(); vlc_module_begin();
set_description( _("Miscellaneous stress tests") ); set_description( _("Miscellaneous stress tests") );
var_Create( p_module->p_libvlc, "foo-test", VLC_VAR_COMMAND );
var_Set( p_module->p_libvlc, "foo-test", (vlc_value_t)(void*)Foo );
var_Create( p_module->p_libvlc, "callback-test", VLC_VAR_COMMAND ); var_Create( p_module->p_libvlc, "callback-test", VLC_VAR_COMMAND );
var_Set( p_module->p_libvlc, "callback-test", (vlc_value_t)(void*)Callback ); var_Set( p_module->p_libvlc, "callback-test", (vlc_value_t)(void*)Callback );
var_Create( p_module->p_libvlc, "stress-test", VLC_VAR_COMMAND ); var_Create( p_module->p_libvlc, "stress-test", VLC_VAR_COMMAND );
...@@ -64,6 +68,56 @@ vlc_module_begin(); ...@@ -64,6 +68,56 @@ vlc_module_begin();
var_Set( p_module->p_libvlc, "signal", (vlc_value_t)(void*)Signal ); var_Set( p_module->p_libvlc, "signal", (vlc_value_t)(void*)Signal );
vlc_module_end(); vlc_module_end();
/*****************************************************************************
* Foo: put anything here
*****************************************************************************/
static int Foo( vlc_object_t *p_this, char *psz_cmd, char *psz_arg )
{
vlc_value_t val;
int i, i_vals;
vlc_value_t *p_vals;
var_Create( p_this, "honk", VLC_VAR_STRING | VLC_VAR_ISLIST );
val.psz_string = "foo";
var_Change( p_this, "honk", VLC_VAR_ADDCHOICE, &val );
val.psz_string = "bar";
var_Change( p_this, "honk", VLC_VAR_ADDCHOICE, &val );
val.psz_string = "baz";
var_Change( p_this, "honk", VLC_VAR_ADDCHOICE, &val );
var_Change( p_this, "honk", VLC_VAR_SETDEFAULT, &val );
var_Get( p_this, "honk", &val ); printf( "value: %s\n", val.psz_string );
val.psz_string = "foo";
var_Set( p_this, "honk", val );
var_Get( p_this, "honk", &val ); printf( "value: %s\n", val.psz_string );
val.psz_string = "blork";
var_Set( p_this, "honk", val );
var_Get( p_this, "honk", &val ); printf( "value: %s\n", val.psz_string );
val.psz_string = "baz";
var_Change( p_this, "honk", VLC_VAR_DELCHOICE, &val );
var_Get( p_this, "honk", &val ); printf( "value: %s\n", val.psz_string );
var_Change( p_this, "honk", VLC_VAR_GETLIST, &val );
i_vals = ((vlc_value_t*)val.p_address)[0].i_int;
p_vals = &((vlc_value_t*)val.p_address)[1];
for( i = 0 ; i < i_vals ; i++ )
{
printf( "value %i: %s\n", i, p_vals[i].psz_string );
}
var_Change( p_this, "honk", VLC_VAR_FREELIST, &val );
var_Destroy( p_this, "honk" );
return VLC_SUCCESS;
}
/***************************************************************************** /*****************************************************************************
* Callback: test callback functions * Callback: test callback functions
*****************************************************************************/ *****************************************************************************/
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* ggi.c : GGI plugin for vlc * ggi.c : GGI plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * Copyright (C) 2000, 2001 VideoLAN
* $Id: ggi.c,v 1.1 2002/08/13 11:59:36 sam Exp $ * $Id: ggi.c,v 1.2 2002/11/10 18:04:22 sam Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -273,6 +273,7 @@ static int Manage( vout_thread_t *p_vout ) ...@@ -273,6 +273,7 @@ static int Manage( vout_thread_t *p_vout )
struct timeval tv = { 0, 1000 }; /* 1 millisecond */ struct timeval tv = { 0, 1000 }; /* 1 millisecond */
gii_event_mask mask; gii_event_mask mask;
gii_event event; gii_event event;
vlc_value_t val;
mask = emKeyboard | emPtrButtonPress | emPtrButtonRelease; mask = emKeyboard | emPtrButtonPress | emPtrButtonRelease;
...@@ -291,7 +292,6 @@ static int Manage( vout_thread_t *p_vout ) ...@@ -291,7 +292,6 @@ static int Manage( vout_thread_t *p_vout )
case 'q': case 'q':
case 'Q': case 'Q':
case GIIUC_Escape: case GIIUC_Escape:
/* FIXME pass message ! */
p_vout->p_vlc->b_die = 1; p_vout->p_vlc->b_die = 1;
break; break;
...@@ -304,6 +304,11 @@ static int Manage( vout_thread_t *p_vout ) ...@@ -304,6 +304,11 @@ static int Manage( vout_thread_t *p_vout )
switch( event.pbutton.button ) switch( event.pbutton.button )
{ {
case GII_PBUTTON_LEFT:
val.b_bool = VLC_TRUE;
var_Set( p_vout, "mouse-clicked", val );
break;
case GII_PBUTTON_RIGHT: case GII_PBUTTON_RIGHT:
{ {
intf_thread_t *p_intf; intf_thread_t *p_intf;
......
...@@ -181,7 +181,7 @@ SOURCE="..\src\audio_output\intf.c" ...@@ -181,7 +181,7 @@ SOURCE="..\src\audio_output\intf.c"
# End Group # End Group
# Begin Group "extras" # Begin Group "extras"
# Begin Source File # Begin Source File
SOURCE="..\src\extras\strndup.c" SOURCE="..\src\extras\dirent.c"
# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\"plugins\" /D DATA_PATH=\"share\" # ADD CPP /D "__VLC__" /D PLUGIN_PATH=\"plugins\" /D DATA_PATH=\"share\"
!IF "$(CFG)" == "vlc - Win32 Release" !IF "$(CFG)" == "vlc - Win32 Release"
# PROP Intermediate_Dir "Release\extras" # PROP Intermediate_Dir "Release\extras"
...@@ -192,7 +192,7 @@ SOURCE="..\src\extras\strndup.c" ...@@ -192,7 +192,7 @@ SOURCE="..\src\extras\strndup.c"
!ENDIF !ENDIF
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE="..\src\extras\dirent.c" SOURCE="..\src\extras\dirent.h"
# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\"plugins\" /D DATA_PATH=\"share\" # ADD CPP /D "__VLC__" /D PLUGIN_PATH=\"plugins\" /D DATA_PATH=\"share\"
!IF "$(CFG)" == "vlc - Win32 Release" !IF "$(CFG)" == "vlc - Win32 Release"
# PROP Intermediate_Dir "Release\extras" # PROP Intermediate_Dir "Release\extras"
...@@ -203,7 +203,7 @@ SOURCE="..\src\extras\dirent.c" ...@@ -203,7 +203,7 @@ SOURCE="..\src\extras\dirent.c"
!ENDIF !ENDIF
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE="..\src\extras\dirent.h" SOURCE="..\src\extras\getopt.c"
# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\"plugins\" /D DATA_PATH=\"share\" # ADD CPP /D "__VLC__" /D PLUGIN_PATH=\"plugins\" /D DATA_PATH=\"share\"
!IF "$(CFG)" == "vlc - Win32 Release" !IF "$(CFG)" == "vlc - Win32 Release"
# PROP Intermediate_Dir "Release\extras" # PROP Intermediate_Dir "Release\extras"
...@@ -214,7 +214,7 @@ SOURCE="..\src\extras\dirent.h" ...@@ -214,7 +214,7 @@ SOURCE="..\src\extras\dirent.h"
!ENDIF !ENDIF
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE="..\src\extras\getopt.c" SOURCE="..\src\extras\getopt.h"
# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\"plugins\" /D DATA_PATH=\"share\" # ADD CPP /D "__VLC__" /D PLUGIN_PATH=\"plugins\" /D DATA_PATH=\"share\"
!IF "$(CFG)" == "vlc - Win32 Release" !IF "$(CFG)" == "vlc - Win32 Release"
# PROP Intermediate_Dir "Release\extras" # PROP Intermediate_Dir "Release\extras"
...@@ -225,7 +225,7 @@ SOURCE="..\src\extras\getopt.c" ...@@ -225,7 +225,7 @@ SOURCE="..\src\extras\getopt.c"
!ENDIF !ENDIF
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE="..\src\extras\getopt.h" SOURCE="..\src\extras\getopt1.c"
# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\"plugins\" /D DATA_PATH=\"share\" # ADD CPP /D "__VLC__" /D PLUGIN_PATH=\"plugins\" /D DATA_PATH=\"share\"
!IF "$(CFG)" == "vlc - Win32 Release" !IF "$(CFG)" == "vlc - Win32 Release"
# PROP Intermediate_Dir "Release\extras" # PROP Intermediate_Dir "Release\extras"
...@@ -236,7 +236,7 @@ SOURCE="..\src\extras\getopt.h" ...@@ -236,7 +236,7 @@ SOURCE="..\src\extras\getopt.h"
!ENDIF !ENDIF
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE="..\src\extras\getopt1.c" SOURCE="..\src\extras\strndup.c"
# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\"plugins\" /D DATA_PATH=\"share\" # ADD CPP /D "__VLC__" /D PLUGIN_PATH=\"plugins\" /D DATA_PATH=\"share\"
!IF "$(CFG)" == "vlc - Win32 Release" !IF "$(CFG)" == "vlc - Win32 Release"
# PROP Intermediate_Dir "Release\extras" # PROP Intermediate_Dir "Release\extras"
......
This diff is collapsed.
This diff is collapsed.
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# Begin Source File
SOURCE=..\share\vlc_wince_rc.rc
!IF "$(CFG)" == "vlc - Win32 (WCE MIPS) Release"
!ELSEIF "$(CFG)" == "vlc - Win32 (WCE MIPS) Debug"
!ELSEIF "$(CFG)" == "vlc - Win32 (WCE SH4) Release"
!ELSEIF "$(CFG)" == "vlc - Win32 (WCE SH4) Debug"
!ELSEIF "$(CFG)" == "vlc - Win32 (WCE SH3) Release"
!ELSEIF "$(CFG)" == "vlc - Win32 (WCE SH3) Debug"
!ELSEIF "$(CFG)" == "vlc - Win32 (WCE ARM) Release"
!ELSEIF "$(CFG)" == "vlc - Win32 (WCE ARM) Debug"
!ELSEIF "$(CFG)" == "vlc - Win32 (WCE x86em) Release"
!ELSEIF "$(CFG)" == "vlc - Win32 (WCE x86em) Debug"
!ENDIF
# End Source File
# End Group
# End Target
# End Project
...@@ -9,22 +9,37 @@ ...@@ -9,22 +9,37 @@
* Significantly revised and rewinddir, seekdir and telldir added by Colin * Significantly revised and rewinddir, seekdir and telldir added by Colin
* Peters <colin@fu.is.saga-u.ac.jp> * Peters <colin@fu.is.saga-u.ac.jp>
* *
* $Revision: 1.2 $ * $Revision: 1.3 $
* $Author: sam $ * $Author: sam $
* $Date: 2002/11/09 17:44:09 $ * $Date: 2002/11/10 18:04:23 $
* *
*/ */
#include "config.h"
#include <stdlib.h> #include <stdlib.h>
#include <errno.h> #ifdef HAVE_ERRNO_H
# include <errno.h>
#else
static int errno;
/* FIXME: anything clever to put here? */
# define EFAULT 12
# define ENOTDIR 12
# define ENOENT 12
# define ENOMEM 12
# define EINVAL 12
#endif
#include <string.h> #include <string.h>
#include <io.h> #ifndef UNDER_CE
#include <direct.h> # include <io.h>
#include "dirent.h" # include <direct.h>
#endif
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#include <windows.h> /* for GetFileAttributes */ #include <windows.h> /* for GetFileAttributes */
#include "dirent.h"
#define SUFFIX "*" #define SUFFIX "*"
#define SLASH "\\" #define SLASH "\\"
...@@ -71,7 +86,19 @@ opendir (const CHAR *szPath) ...@@ -71,7 +86,19 @@ opendir (const CHAR *szPath)
} }
/* Make an absolute pathname. */ /* Make an absolute pathname. */
#if defined( UNDER_CE )
if (szPath[0] == '\\' || szPath[0] == '/')
{
snprintf (szFullPath, MAX_PATH, "%s", szPath);
szFullPath[0] = '\\';
}
else
{
snprintf (szFullPath, MAX_PATH, "\\%s", szPath );
}
#else
_fullpath (szFullPath, szPath, MAX_PATH); _fullpath (szFullPath, szPath, MAX_PATH);
#endif
/* Allocate enough space to store DIR structure and the complete /* Allocate enough space to store DIR structure and the complete
* directory path given. */ * directory path given. */
...@@ -100,7 +127,7 @@ opendir (const CHAR *szPath) ...@@ -100,7 +127,7 @@ opendir (const CHAR *szPath)
strcat (nd->dd_name, SUFFIX); strcat (nd->dd_name, SUFFIX);
/* Initialize handle to -1 so that a premature closedir doesn't try /* Initialize handle to -1 so that a premature closedir doesn't try
* to call _findclose on it. */ * to call FindClose on it. */
nd->dd_handle = -1; nd->dd_handle = -1;
/* Initialize the status. */ /* Initialize the status. */
...@@ -112,7 +139,7 @@ opendir (const CHAR *szPath) ...@@ -112,7 +139,7 @@ opendir (const CHAR *szPath)
nd->dd_dir.d_ino = 0; nd->dd_dir.d_ino = 0;
nd->dd_dir.d_reclen = 0; nd->dd_dir.d_reclen = 0;
nd->dd_dir.d_namlen = 0; nd->dd_dir.d_namlen = 0;
nd->dd_dir.d_name = nd->dd_dta.name; nd->dd_dir.d_name = nd->dd_dta.cFileName;
return nd; return nd;
} }
...@@ -136,7 +163,7 @@ readdir (DIR * dirp) ...@@ -136,7 +163,7 @@ readdir (DIR * dirp)
return (struct dirent *) 0; return (struct dirent *) 0;
} }
if (dirp->dd_dir.d_name != dirp->dd_dta.name) if (dirp->dd_dir.d_name != dirp->dd_dta.cFileName)
{ {
/* The structure does not seem to be set up correctly. */ /* The structure does not seem to be set up correctly. */
errno = EINVAL; errno = EINVAL;
...@@ -153,7 +180,7 @@ readdir (DIR * dirp) ...@@ -153,7 +180,7 @@ readdir (DIR * dirp)
{ {
/* We haven't started the search yet. */ /* We haven't started the search yet. */
/* Start the search */ /* Start the search */
dirp->dd_handle = _findfirst (dirp->dd_name, &(dirp->dd_dta)); dirp->dd_handle = FindFirstFile (dirp->dd_name, &(dirp->dd_dta));
if (dirp->dd_handle == -1) if (dirp->dd_handle == -1)
{ {
...@@ -169,10 +196,10 @@ readdir (DIR * dirp) ...@@ -169,10 +196,10 @@ readdir (DIR * dirp)
else else
{ {
/* Get the next search entry. */ /* Get the next search entry. */
if (_findnext (dirp->dd_handle, &(dirp->dd_dta))) if (FindNextFile (dirp->dd_handle, &(dirp->dd_dta)))
{ {
/* We are off the end or otherwise error. */ /* We are off the end or otherwise error. */
_findclose (dirp->dd_handle); FindClose (dirp->dd_handle);
dirp->dd_handle = -1; dirp->dd_handle = -1;
dirp->dd_stat = -1; dirp->dd_stat = -1;
} }
...@@ -218,7 +245,7 @@ closedir (DIR * dirp) ...@@ -218,7 +245,7 @@ closedir (DIR * dirp)
if (dirp->dd_handle != -1) if (dirp->dd_handle != -1)
{ {
rc = _findclose (dirp->dd_handle); rc = FindClose (dirp->dd_handle);
} }
/* Delete the dir structure. */ /* Delete the dir structure. */
...@@ -246,7 +273,7 @@ rewinddir (DIR * dirp) ...@@ -246,7 +273,7 @@ rewinddir (DIR * dirp)
if (dirp->dd_handle != -1) if (dirp->dd_handle != -1)
{ {
_findclose (dirp->dd_handle); FindClose (dirp->dd_handle);
} }
dirp->dd_handle = -1; dirp->dd_handle = -1;
...@@ -303,7 +330,7 @@ seekdir (DIR * dirp, long lPos) ...@@ -303,7 +330,7 @@ seekdir (DIR * dirp, long lPos)
/* Seek past end. */ /* Seek past end. */
if (dirp->dd_handle != -1) if (dirp->dd_handle != -1)
{ {
_findclose (dirp->dd_handle); FindClose (dirp->dd_handle);
} }
dirp->dd_handle = -1; dirp->dd_handle = -1;
dirp->dd_stat = -1; dirp->dd_stat = -1;
......
...@@ -15,9 +15,9 @@ ...@@ -15,9 +15,9 @@
* DISCLAIMED. This includeds but is not limited to warranties of * DISCLAIMED. This includeds but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* *
* $Revision: 1.1 $ * $Revision: 1.2 $
* $Author: sam $ * $Author: sam $
* $Date: 2002/11/09 16:34:52 $ * $Date: 2002/11/10 18:04:23 $
* *
*/ */
...@@ -26,7 +26,9 @@ ...@@ -26,7 +26,9 @@
#ifndef _DIRENT_H_ #ifndef _DIRENT_H_
#define _DIRENT_H_ #define _DIRENT_H_
#ifndef UNDER_CE
#include <io.h> #include <io.h>
#endif
#ifndef RC_INVOKED #ifndef RC_INVOKED
...@@ -51,7 +53,7 @@ struct dirent ...@@ -51,7 +53,7 @@ struct dirent
typedef struct typedef struct
{ {
/* disk transfer area for this dir */ /* disk transfer area for this dir */
struct _finddata_t dd_dta; WIN32_FIND_DATA dd_dta;
/* dirent struct to return from dir (NOTE: this makes this thread /* dirent struct to return from dir (NOTE: this makes this thread
* safe as long as only one thread uses a particular DIR struct at * safe as long as only one thread uses a particular DIR struct at
...@@ -102,7 +104,7 @@ struct _wdirent ...@@ -102,7 +104,7 @@ struct _wdirent
typedef struct typedef struct
{ {
/* disk transfer area for this dir */ /* disk transfer area for this dir */
struct _wfinddata_t dd_dta; WIN32_FIND_DATA dd_dta;
/* dirent struct to return from dir (NOTE: this makes this thread /* dirent struct to return from dir (NOTE: this makes this thread
* safe as long as only one thread uses a particular DIR struct at * safe as long as only one thread uses a particular DIR struct at
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* decoders. * decoders.
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2002 VideoLAN * Copyright (C) 1998-2002 VideoLAN
* $Id: input.c,v 1.213 2002/10/08 16:02:05 sam Exp $ * $Id: input.c,v 1.214 2002/11/10 18:04:23 sam Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -27,14 +27,20 @@ ...@@ -27,14 +27,20 @@
* Preamble * Preamble
*****************************************************************************/ *****************************************************************************/
#include <stdlib.h> #include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <vlc/vlc.h> #include <vlc/vlc.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
#ifdef HAVE_FCNTL_H
# include <fcntl.h>
#endif
#include <string.h> #include <string.h>
#include <errno.h>
#ifdef HAVE_SYS_TIMES_H #ifdef HAVE_SYS_TIMES_H
# include <sys/times.h> # include <sys/times.h>
...@@ -161,7 +167,7 @@ input_thread_t *__input_CreateThread( vlc_object_t *p_parent, ...@@ -161,7 +167,7 @@ input_thread_t *__input_CreateThread( vlc_object_t *p_parent,
if( vlc_thread_create( p_input, "input", RunThread, if( vlc_thread_create( p_input, "input", RunThread,
VLC_THREAD_PRIORITY_INPUT, VLC_TRUE ) ) VLC_THREAD_PRIORITY_INPUT, VLC_TRUE ) )
{ {
msg_Err( p_input, "cannot create input thread (%s)", strerror(errno) ); msg_Err( p_input, "cannot create input thread" );
free( p_input ); free( p_input );
return NULL; return NULL;
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* input_clock.c: Clock/System date convertions, stream management * input_clock.c: Clock/System date convertions, stream management
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: input_clock.c,v 1.32 2002/06/01 12:32:01 sam Exp $ * $Id: input_clock.c,v 1.33 2002/11/10 18:04:23 sam Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -25,10 +25,13 @@ ...@@ -25,10 +25,13 @@
* Preamble * Preamble
*****************************************************************************/ *****************************************************************************/
#include <string.h> /* memcpy(), memset() */ #include <string.h> /* memcpy(), memset() */
#include <sys/types.h> /* off_t */
#include <vlc/vlc.h> #include <vlc/vlc.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h> /* off_t */
#endif
#include "stream_control.h" #include "stream_control.h"
#include "input_ext-intf.h" #include "input_ext-intf.h"
#include "input_ext-dec.h" #include "input_ext-dec.h"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* input_dec.c: Functions for the management of decoders * input_dec.c: Functions for the management of decoders
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: input_dec.c,v 1.49 2002/10/29 13:22:48 sam Exp $ * $Id: input_dec.c,v 1.50 2002/11/10 18:04:23 sam Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -26,10 +26,13 @@ ...@@ -26,10 +26,13 @@
*****************************************************************************/ *****************************************************************************/
#include <stdlib.h> #include <stdlib.h>
#include <string.h> /* memcpy(), memset() */ #include <string.h> /* memcpy(), memset() */
#include <sys/types.h> /* off_t */
#include <vlc/vlc.h> #include <vlc/vlc.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h> /* off_t */
#endif
#include "stream_control.h" #include "stream_control.h"
#include "input_ext-dec.h" #include "input_ext-dec.h"
#include "input_ext-intf.h" #include "input_ext-intf.h"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* input_ext-dec.c: services to the decoders * input_ext-dec.c: services to the decoders
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * Copyright (C) 1998-2001 VideoLAN
* $Id: input_ext-dec.c,v 1.39 2002/10/27 16:58:12 gbazin Exp $ * $Id: input_ext-dec.c,v 1.40 2002/11/10 18:04:23 sam Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -25,10 +25,13 @@ ...@@ -25,10 +25,13 @@
* Preamble * Preamble
*****************************************************************************/ *****************************************************************************/
#include <string.h> /* memcpy(), memset() */ #include <string.h> /* memcpy(), memset() */
#include <sys/types.h> /* off_t */
#include <vlc/vlc.h> #include <vlc/vlc.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h> /* off_t */
#endif
#include "stream_control.h" #include "stream_control.h"
#include "input_ext-dec.h" #include "input_ext-dec.h"
#include "input_ext-intf.h" #include "input_ext-intf.h"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* input_ext-intf.c: services to the interface * input_ext-intf.c: services to the interface
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * Copyright (C) 1998-2001 VideoLAN
* $Id: input_ext-intf.c,v 1.41 2002/11/08 10:26:53 gbazin Exp $ * $Id: input_ext-intf.c,v 1.42 2002/11/10 18:04:23 sam Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -25,10 +25,13 @@ ...@@ -25,10 +25,13 @@
* Preamble * Preamble
*****************************************************************************/ *****************************************************************************/
#include <string.h> /* memcpy(), memset() */ #include <string.h> /* memcpy(), memset() */
#include <sys/types.h> /* off_t */
#include <vlc/vlc.h> #include <vlc/vlc.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h> /* off_t */
#endif
#include "stream_control.h" #include "stream_control.h"
#include "input_ext-dec.h" #include "input_ext-dec.h"
#include "input_ext-intf.h" #include "input_ext-intf.h"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* input_ext-plugins.c: useful functions for access and demux plug-ins * input_ext-plugins.c: useful functions for access and demux plug-ins
***************************************************************************** *****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN * Copyright (C) 2001, 2002 VideoLAN
* $Id: input_ext-plugins.c,v 1.19 2002/10/26 15:24:19 gbazin Exp $ * $Id: input_ext-plugins.c,v 1.20 2002/11/10 18:04:23 sam Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -25,51 +25,42 @@ ...@@ -25,51 +25,42 @@
* Preamble * Preamble
*****************************************************************************/ *****************************************************************************/
#include <stdlib.h> #include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <string.h> #include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <vlc/vlc.h> #include <vlc/vlc.h>
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
#ifdef HAVE_ERRNO_H
# include <errno.h>
#endif
#ifdef HAVE_FCNTL_H
# include <fcntl.h>
#endif
#ifdef HAVE_SYS_TIME_H #ifdef HAVE_SYS_TIME_H
# include <sys/time.h> # include <sys/time.h>
#endif #endif
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
# include <unistd.h> # include <unistd.h>
#elif defined( _MSC_VER ) && defined( _WIN32 ) #elif defined( _MSC_VER ) && defined( _WIN32 ) && !defined( UNDER_CE )
# include <io.h> # include <io.h>
#endif #endif
#ifdef WIN32 #ifdef UNDER_CE
# include <winsock2.h> /* No network support */
# include <ws2tcpip.h> #elif defined( WIN32 )
#elif !defined( SYS_BEOS ) && !defined( SYS_NTO )
# include <netdb.h> /* hostent ... */
# include <sys/socket.h>
# include <netinet/in.h>
# ifdef HAVE_ARPA_INET_H
# include <arpa/inet.h> /* inet_ntoa(), inet_aton() */
# endif
#endif
#ifdef WIN32
# include <winsock2.h> # include <winsock2.h>
# include <ws2tcpip.h> # include <ws2tcpip.h>
#elif !defined( SYS_BEOS ) && !defined( SYS_NTO ) #elif !defined( SYS_BEOS ) && !defined( SYS_NTO )
# include <netdb.h> /* hostent ... */ # include <sys/types.h>
# include <sys/socket.h> # include <sys/socket.h> /* recv() */
# include <netinet/in.h>
# ifdef HAVE_ARPA_INET_H
# include <arpa/inet.h> /* inet_ntoa(), inet_aton() */
# endif
#endif #endif
#include "stream_control.h" #include "stream_control.h"
#include "input_ext-intf.h" #include "input_ext-intf.h"
#include "input_ext-dec.h" #include "input_ext-dec.h"
...@@ -132,13 +123,13 @@ void * __input_BuffersInit( vlc_object_t *p_this ) ...@@ -132,13 +123,13 @@ void * __input_BuffersInit( vlc_object_t *p_this )
if( p_buffers == NULL ) if( p_buffers == NULL )
{ {
return( NULL ); return NULL;
} }
memset( p_buffers, 0, sizeof( input_buffers_t ) ); memset( p_buffers, 0, sizeof( input_buffers_t ) );
vlc_mutex_init( p_this, &p_buffers->lock ); vlc_mutex_init( p_this, &p_buffers->lock );
return( p_buffers ); return p_buffers;
} }
/***************************************************************************** /*****************************************************************************
...@@ -257,7 +248,7 @@ data_buffer_t * input_NewBuffer( input_buffers_t * p_buffers, size_t i_size ) ...@@ -257,7 +248,7 @@ data_buffer_t * input_NewBuffer( input_buffers_t * p_buffers, size_t i_size )
p_buf = NewBuffer( p_buffers, i_size ); p_buf = NewBuffer( p_buffers, i_size );
vlc_mutex_unlock( &p_buffers->lock ); vlc_mutex_unlock( &p_buffers->lock );
return( p_buf ); return p_buf;
} }
/***************************************************************************** /*****************************************************************************
...@@ -338,7 +329,7 @@ data_packet_t * input_ShareBuffer( input_buffers_t * p_buffers, ...@@ -338,7 +329,7 @@ data_packet_t * input_ShareBuffer( input_buffers_t * p_buffers,
p_data = ShareBuffer( p_buffers, p_buf ); p_data = ShareBuffer( p_buffers, p_buf );
vlc_mutex_unlock( &p_buffers->lock ); vlc_mutex_unlock( &p_buffers->lock );
return( p_data ); return p_data;
} }
/***************************************************************************** /*****************************************************************************
...@@ -354,7 +345,7 @@ static inline data_packet_t * NewPacket( input_buffers_t * p_buffers, ...@@ -354,7 +345,7 @@ static inline data_packet_t * NewPacket( input_buffers_t * p_buffers,
if( p_buf == NULL ) if( p_buf == NULL )
{ {
return( NULL ); return NULL;
} }
p_data = ShareBuffer( p_buffers, p_buf ); p_data = ShareBuffer( p_buffers, p_buf );
...@@ -362,7 +353,7 @@ static inline data_packet_t * NewPacket( input_buffers_t * p_buffers, ...@@ -362,7 +353,7 @@ static inline data_packet_t * NewPacket( input_buffers_t * p_buffers,
{ {
ReleaseBuffer( p_buffers, p_buf ); ReleaseBuffer( p_buffers, p_buf );
} }
return( p_data ); return p_data;
} }
data_packet_t * input_NewPacket( input_buffers_t * p_buffers, size_t i_size ) data_packet_t * input_NewPacket( input_buffers_t * p_buffers, size_t i_size )
...@@ -373,7 +364,7 @@ data_packet_t * input_NewPacket( input_buffers_t * p_buffers, size_t i_size ) ...@@ -373,7 +364,7 @@ data_packet_t * input_NewPacket( input_buffers_t * p_buffers, size_t i_size )
p_data = NewPacket( p_buffers, i_size ); p_data = NewPacket( p_buffers, i_size );
vlc_mutex_unlock( &p_buffers->lock ); vlc_mutex_unlock( &p_buffers->lock );
return( p_data ); return p_data;
} }
/***************************************************************************** /*****************************************************************************
...@@ -442,7 +433,7 @@ static inline pes_packet_t * NewPES( input_buffers_t * p_buffers ) ...@@ -442,7 +433,7 @@ static inline pes_packet_t * NewPES( input_buffers_t * p_buffers )
p_pes->i_pes_size = 0; p_pes->i_pes_size = 0;
p_pes->i_nb_data = 0; p_pes->i_nb_data = 0;
return( p_pes ); return p_pes;
} }
pes_packet_t * input_NewPES( input_buffers_t * p_buffers ) pes_packet_t * input_NewPES( input_buffers_t * p_buffers )
...@@ -453,7 +444,7 @@ pes_packet_t * input_NewPES( input_buffers_t * p_buffers ) ...@@ -453,7 +444,7 @@ pes_packet_t * input_NewPES( input_buffers_t * p_buffers )
p_pes = NewPES( p_buffers ); p_pes = NewPES( p_buffers );
vlc_mutex_unlock( &p_buffers->lock ); vlc_mutex_unlock( &p_buffers->lock );
return( p_pes ); return p_pes;
} }
/***************************************************************************** /*****************************************************************************
...@@ -549,7 +540,7 @@ ssize_t input_FillBuffer( input_thread_t * p_input ) ...@@ -549,7 +540,7 @@ ssize_t input_FillBuffer( input_thread_t * p_input )
p_input->p_current_data = (byte_t *)p_buf + sizeof(data_buffer_t); p_input->p_current_data = (byte_t *)p_buf + sizeof(data_buffer_t);
p_input->p_last_data = p_input->p_current_data + i_remains + i_ret; p_input->p_last_data = p_input->p_current_data + i_remains + i_ret;
return( (ssize_t)i_remains + i_ret ); return (ssize_t)i_remains + i_ret;
} }
/***************************************************************************** /*****************************************************************************
...@@ -566,7 +557,7 @@ ssize_t input_Peek( input_thread_t * p_input, byte_t ** pp_byte, size_t i_size ) ...@@ -566,7 +557,7 @@ ssize_t input_Peek( input_thread_t * p_input, byte_t ** pp_byte, size_t i_size )
if( i_size == -1 ) if( i_size == -1 )
{ {
return( -1 ); return -1;
} }
else if( i_ret < i_size ) else if( i_ret < i_size )
{ {
...@@ -574,7 +565,7 @@ ssize_t input_Peek( input_thread_t * p_input, byte_t ** pp_byte, size_t i_size ) ...@@ -574,7 +565,7 @@ ssize_t input_Peek( input_thread_t * p_input, byte_t ** pp_byte, size_t i_size )
} }
} }
*pp_byte = p_input->p_current_data; *pp_byte = p_input->p_current_data;
return( i_size ); return i_size;
} }
/***************************************************************************** /*****************************************************************************
...@@ -591,7 +582,7 @@ ssize_t input_SplitBuffer( input_thread_t * p_input, ...@@ -591,7 +582,7 @@ ssize_t input_SplitBuffer( input_thread_t * p_input,
if( i_ret == -1 ) if( i_ret == -1 )
{ {
return( -1 ); return -1;
} }
else if( i_ret < i_size ) else if( i_ret < i_size )
{ {
...@@ -618,7 +609,7 @@ ssize_t input_SplitBuffer( input_thread_t * p_input, ...@@ -618,7 +609,7 @@ ssize_t input_SplitBuffer( input_thread_t * p_input,
p_input->stream.p_selected_area->i_tell += i_size; p_input->stream.p_selected_area->i_tell += i_size;
vlc_mutex_unlock( &p_input->stream.stream_lock ); vlc_mutex_unlock( &p_input->stream.stream_lock );
return( i_size ); return i_size;
} }
/***************************************************************************** /*****************************************************************************
...@@ -627,11 +618,11 @@ ssize_t input_SplitBuffer( input_thread_t * p_input, ...@@ -627,11 +618,11 @@ ssize_t input_SplitBuffer( input_thread_t * p_input,
int input_AccessInit( input_thread_t * p_input ) int input_AccessInit( input_thread_t * p_input )
{ {
p_input->p_method_data = input_BuffersInit( p_input ); p_input->p_method_data = input_BuffersInit( p_input );
if( p_input->p_method_data == NULL ) return( -1 ); if( p_input->p_method_data == NULL ) return -1;
p_input->p_data_buffer = NULL; p_input->p_data_buffer = NULL;
p_input->p_current_data = NULL; p_input->p_current_data = NULL;
p_input->p_last_data = NULL; p_input->p_last_data = NULL;
return( 0 ); return 0;
} }
/***************************************************************************** /*****************************************************************************
...@@ -693,7 +684,7 @@ void __input_FDNetworkClose( vlc_object_t * p_this ) ...@@ -693,7 +684,7 @@ void __input_FDNetworkClose( vlc_object_t * p_this )
msg_Info( p_input, "closing network `%s/%s://%s'", msg_Info( p_input, "closing network `%s/%s://%s'",
p_input->psz_access, p_input->psz_demux, p_input->psz_name ); p_input->psz_access, p_input->psz_demux, p_input->psz_name );
#ifdef WIN32 #if defined( WIN32 ) && !defined( UNDER_CE )
closesocket( p_access_data->i_handle ); closesocket( p_access_data->i_handle );
#else #else
close( p_access_data->i_handle ); close( p_access_data->i_handle );
...@@ -713,10 +704,14 @@ ssize_t input_FDRead( input_thread_t * p_input, byte_t * p_buffer, size_t i_len ...@@ -713,10 +704,14 @@ ssize_t input_FDRead( input_thread_t * p_input, byte_t * p_buffer, size_t i_len
if( i_ret < 0 ) if( i_ret < 0 )
{ {
#ifdef HAVE_ERRNO_H
msg_Err( p_input, "read failed (%s)", strerror(errno) ); msg_Err( p_input, "read failed (%s)", strerror(errno) );
#else
msg_Err( p_input, "read failed" );
#endif
} }
return( i_ret ); return i_ret;
} }
/***************************************************************************** /*****************************************************************************
...@@ -724,6 +719,10 @@ ssize_t input_FDRead( input_thread_t * p_input, byte_t * p_buffer, size_t i_len ...@@ -724,6 +719,10 @@ ssize_t input_FDRead( input_thread_t * p_input, byte_t * p_buffer, size_t i_len
*****************************************************************************/ *****************************************************************************/
static inline int NetworkSelect( input_thread_t * p_input ) static inline int NetworkSelect( input_thread_t * p_input )
{ {
#ifdef UNDER_CE
return -1;
#else
input_socket_t * p_access_data = (input_socket_t *)p_input->p_access_data; input_socket_t * p_access_data = (input_socket_t *)p_input->p_access_data;
struct timeval timeout; struct timeval timeout;
fd_set fds; fd_set fds;
...@@ -746,7 +745,9 @@ static inline int NetworkSelect( input_thread_t * p_input ) ...@@ -746,7 +745,9 @@ static inline int NetworkSelect( input_thread_t * p_input )
msg_Err( p_input, "network select error (%s)", strerror(errno) ); msg_Err( p_input, "network select error (%s)", strerror(errno) );
} }
return( i_ret ); return i_ret;
#endif
} }
/***************************************************************************** /*****************************************************************************
...@@ -756,6 +757,10 @@ static inline int NetworkSelect( input_thread_t * p_input ) ...@@ -756,6 +757,10 @@ static inline int NetworkSelect( input_thread_t * p_input )
ssize_t input_FDNetworkRead( input_thread_t * p_input, byte_t * p_buffer, ssize_t input_FDNetworkRead( input_thread_t * p_input, byte_t * p_buffer,
size_t i_len ) size_t i_len )
{ {
#ifdef UNDER_CE
return -1;
#else
if( NetworkSelect( p_input ) > 0 ) if( NetworkSelect( p_input ) > 0 )
{ {
input_socket_t * p_access_data input_socket_t * p_access_data
...@@ -775,10 +780,12 @@ ssize_t input_FDNetworkRead( input_thread_t * p_input, byte_t * p_buffer, ...@@ -775,10 +780,12 @@ ssize_t input_FDNetworkRead( input_thread_t * p_input, byte_t * p_buffer,
msg_Err( p_input, "recv failed (%s)", strerror(errno) ); msg_Err( p_input, "recv failed (%s)", strerror(errno) );
} }
return( i_ret ); return i_ret;
} }
return( 0 ); return 0;
#endif
} }
/***************************************************************************** /*****************************************************************************
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* input_info.c: Convenient functions to handle the input info structures * input_info.c: Convenient functions to handle the input info structures
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * Copyright (C) 1998-2001 VideoLAN
* $Id: input_info.c,v 1.7 2002/11/09 16:34:53 sam Exp $ * $Id: input_info.c,v 1.8 2002/11/10 18:04:23 sam Exp $
* *
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no> * Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
* *
...@@ -25,12 +25,13 @@ ...@@ -25,12 +25,13 @@
* Preamble * Preamble
*****************************************************************************/ *****************************************************************************/
#include <stdlib.h> #include <stdlib.h>
#include <sys/types.h> #include <string.h>
#include <vlc/vlc.h> #include <vlc/vlc.h>
#include <string.h> #ifdef HAVE_SYS_TYPES_H
#include <errno.h> # include <sys/types.h> /* off_t */
#endif
#include "stream_control.h" #include "stream_control.h"
#include "input_ext-intf.h" #include "input_ext-intf.h"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* input_programs.c: es_descriptor_t, pgrm_descriptor_t management * input_programs.c: es_descriptor_t, pgrm_descriptor_t management
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2002 VideoLAN * Copyright (C) 1999-2002 VideoLAN
* $Id: input_programs.c,v 1.96 2002/11/05 18:25:43 gbazin Exp $ * $Id: input_programs.c,v 1.97 2002/11/10 18:04:23 sam Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -26,10 +26,13 @@ ...@@ -26,10 +26,13 @@
*****************************************************************************/ *****************************************************************************/
#include <stdlib.h> #include <stdlib.h>
#include <string.h> /* memcpy(), memset() */ #include <string.h> /* memcpy(), memset() */
#include <sys/types.h> /* off_t */
#include <vlc/vlc.h> #include <vlc/vlc.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h> /* off_t */
#endif
#include "stream_control.h" #include "stream_control.h"
#include "input_ext-intf.h" #include "input_ext-intf.h"
#include "input_ext-dec.h" #include "input_ext-dec.h"
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* interface, such as command line. * interface, such as command line.
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * Copyright (C) 1998-2001 VideoLAN
* $Id: interface.c,v 1.100 2002/10/11 22:32:56 sam Exp $ * $Id: interface.c,v 1.101 2002/11/10 18:04:23 sam Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* *
...@@ -26,11 +26,9 @@ ...@@ -26,11 +26,9 @@
/***************************************************************************** /*****************************************************************************
* Preamble * Preamble
*****************************************************************************/ *****************************************************************************/
#include <errno.h> /* ENOMEM */
#include <stdlib.h> /* free(), strtol() */ #include <stdlib.h> /* free(), strtol() */
#include <stdio.h> /* FILE */ #include <stdio.h> /* FILE */
#include <string.h> /* strerror() */ #include <string.h> /* strerror() */
#include <sys/types.h> /* off_t */
#include <vlc/vlc.h> #include <vlc/vlc.h>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* intf_eject.c: CD/DVD-ROM ejection handling functions * intf_eject.c: CD/DVD-ROM ejection handling functions
***************************************************************************** *****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN * Copyright (C) 2001, 2002 VideoLAN
* $Id: intf_eject.c,v 1.15 2002/06/01 18:04:49 sam Exp $ * $Id: intf_eject.c,v 1.16 2002/11/10 18:04:23 sam Exp $
* *
* Author: Julien Blache <jb@technologeek.org> for the Linux part * Author: Julien Blache <jb@technologeek.org> for the Linux part
* with code taken from the Linux "eject" command * with code taken from the Linux "eject" command
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
# include <scsi/scsi_ioctl.h> # include <scsi/scsi_ioctl.h>
#endif #endif
#ifdef WIN32 #if defined( WIN32 ) && !defined( UNDER_CE )
# include <windows.h> # include <windows.h>
# include <stdio.h> # include <stdio.h>
# include <winioctl.h> # include <winioctl.h>
...@@ -156,6 +156,11 @@ int __intf_Eject( vlc_object_t *p_this, const char *psz_device ) ...@@ -156,6 +156,11 @@ int __intf_Eject( vlc_object_t *p_this, const char *psz_device )
#elif defined(WIN32) #elif defined(WIN32)
#if defined(UNDER_CE)
msg_Warn( p_this, "CD-Rom ejection unsupported on this platform" );
i_ret = -1;
#else
HANDLE h_drive ; HANDLE h_drive ;
TCHAR psz_drive_id[8] ; TCHAR psz_drive_id[8] ;
DWORD dw_access_flags = GENERIC_READ ; DWORD dw_access_flags = GENERIC_READ ;
...@@ -215,6 +220,8 @@ int __intf_Eject( vlc_object_t *p_this, const char *psz_device ) ...@@ -215,6 +220,8 @@ int __intf_Eject( vlc_object_t *p_this, const char *psz_device )
CloseHandle (h_drive) ; CloseHandle (h_drive) ;
return (i_ret) ; return (i_ret) ;
} }
#endif /* UNDER_CE */
#else /* WIN32 */ #else /* WIN32 */
int i_fd; int i_fd;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* libvlc.c: main libvlc source * libvlc.c: main libvlc source
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2002 VideoLAN * Copyright (C) 1998-2002 VideoLAN
* $Id: libvlc.c,v 1.44 2002/11/09 17:44:08 sam Exp $ * $Id: libvlc.c,v 1.45 2002/11/10 18:04:23 sam Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -33,20 +33,22 @@ ...@@ -33,20 +33,22 @@
/***************************************************************************** /*****************************************************************************
* Preamble * Preamble
*****************************************************************************/ *****************************************************************************/
#include <errno.h> /* ENOMEM */ #include <vlc/vlc.h>
#ifdef HAVE_ERRNO_H
# include <errno.h> /* ENOMEM */
#endif
#include <stdio.h> /* sprintf() */ #include <stdio.h> /* sprintf() */
#include <string.h> /* strerror() */ #include <string.h> /* strerror() */
#include <stdlib.h> /* free() */ #include <stdlib.h> /* free() */
#include <vlc/vlc.h>
#ifndef WIN32 #ifndef WIN32
# include <netinet/in.h> /* BSD: struct in_addr */ # include <netinet/in.h> /* BSD: struct in_addr */
#endif #endif
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
# include <unistd.h> # include <unistd.h>
#elif defined( _MSC_VER ) && defined( _WIN32 ) #elif defined( _MSC_VER ) && defined( _WIN32 ) && !defined( UNDER_CE )
# include <io.h> # include <io.h>
#endif #endif
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* configuration.c management of the modules configuration * configuration.c management of the modules configuration
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: configuration.c,v 1.42 2002/11/09 17:44:09 sam Exp $ * $Id: configuration.c,v 1.43 2002/11/10 18:04:23 sam Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -26,7 +26,9 @@ ...@@ -26,7 +26,9 @@
#include <stdio.h> /* sprintf() */ #include <stdio.h> /* sprintf() */
#include <stdlib.h> /* free(), strtol() */ #include <stdlib.h> /* free(), strtol() */
#include <string.h> /* strdup() */ #include <string.h> /* strdup() */
#include <errno.h> /* errno */ #ifdef HAVE_ERRNO_H
# include <errno.h> /* errno */
#endif
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
# include <unistd.h> /* getuid() */ # include <unistd.h> /* getuid() */
...@@ -44,8 +46,12 @@ ...@@ -44,8 +46,12 @@
#include <pwd.h> /* getpwuid() */ #include <pwd.h> /* getpwuid() */
#endif #endif
#include <sys/stat.h> #if defined( HAVE_SYS_STAT_H )
#include <sys/types.h> # include <sys/stat.h>
#endif
#if defined( HAVE_SYS_TYPES_H )
# include <sys/types.h>
#endif
/***************************************************************************** /*****************************************************************************
* config_GetInt: get the value of an int variable * config_GetInt: get the value of an int variable
...@@ -681,16 +687,25 @@ int __config_SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name ) ...@@ -681,16 +687,25 @@ int __config_SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name )
} }
sprintf( psz_filename, "%s/" CONFIG_DIR, psz_homedir ); sprintf( psz_filename, "%s/" CONFIG_DIR, psz_homedir );
#ifndef WIN32 #ifdef HAVE_ERRNO_H
if( mkdir( psz_filename, 0755 ) && errno != EEXIST ) # if defined( WIN32 )
#else
if( mkdir( psz_filename ) && errno != EEXIST ) if( mkdir( psz_filename ) && errno != EEXIST )
#endif # else
if( mkdir( psz_filename, 0755 ) && errno != EEXIST )
# endif
{ {
msg_Err( p_this, "could not create %s (%s)", msg_Err( p_this, "could not create %s (%s)",
psz_filename, strerror(errno) ); psz_filename, strerror(errno) );
} }
#else
if( mkdir( psz_filename ) )
{
msg_Err( p_this, "could not create %s", psz_filename );
}
#endif
strcat( psz_filename, "/" CONFIG_FILE ); strcat( psz_filename, "/" CONFIG_FILE );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* cpu.c: CPU detection code * cpu.c: CPU detection code
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2002 VideoLAN * Copyright (C) 1998-2002 VideoLAN
* $Id: cpu.c,v 1.7 2002/10/03 13:21:55 sam Exp $ * $Id: cpu.c,v 1.8 2002/11/10 18:04:24 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* Christophe Massiot <massiot@via.ecp.fr> * Christophe Massiot <massiot@via.ecp.fr>
...@@ -26,11 +26,13 @@ ...@@ -26,11 +26,13 @@
/***************************************************************************** /*****************************************************************************
* Preamble * Preamble
*****************************************************************************/ *****************************************************************************/
#include <signal.h> /* SIGHUP, SIGINT, SIGKILL */
#include <setjmp.h> /* longjmp, setjmp */
#include <vlc/vlc.h> #include <vlc/vlc.h>
#ifdef HAVE_SIGNAL_H
# include <signal.h> /* SIGHUP, SIGINT, SIGKILL */
# include <setjmp.h> /* longjmp, setjmp */
#endif
#ifdef SYS_DARWIN #ifdef SYS_DARWIN
# include <mach/mach.h> /* AltiVec detection */ # include <mach/mach.h> /* AltiVec detection */
# include <mach/mach_error.h> /* some day the header files||compiler * # include <mach/mach_error.h> /* some day the header files||compiler *
...@@ -43,16 +45,20 @@ ...@@ -43,16 +45,20 @@
/***************************************************************************** /*****************************************************************************
* Local prototypes * Local prototypes
*****************************************************************************/ *****************************************************************************/
#ifdef HAVE_SIGNAL_H
static void SigHandler ( int ); static void SigHandler ( int );
#endif
/***************************************************************************** /*****************************************************************************
* Global variables - they're needed for signal handling * Global variables - they're needed for signal handling
*****************************************************************************/ *****************************************************************************/
#ifdef HAVE_SIGNAL_H
static jmp_buf env; static jmp_buf env;
static int i_illegal; static int i_illegal;
#if defined( __i386__ ) #if defined( __i386__ )
static char *psz_capability; static char *psz_capability;
#endif #endif
#endif
/***************************************************************************** /*****************************************************************************
* CPUCapabilities: get the CPU capabilities * CPUCapabilities: get the CPU capabilities
...@@ -112,7 +118,8 @@ u32 CPUCapabilities( void ) ...@@ -112,7 +118,8 @@ u32 CPUCapabilities( void )
: "a" ( a ) \ : "a" ( a ) \
: "cc" ); : "cc" );
# if defined( CAN_COMPILE_SSE ) || defined ( CAN_COMPILE_3DNOW ) # if defined( CAN_COMPILE_SSE ) || defined ( CAN_COMPILE_3DNOW ) \
&& defined( HAVE_SIGNAL_H )
void (*pf_sigill) (int) = signal( SIGILL, SigHandler ); void (*pf_sigill) (int) = signal( SIGILL, SigHandler );
# endif # endif
...@@ -137,7 +144,8 @@ u32 CPUCapabilities( void ) ...@@ -137,7 +144,8 @@ u32 CPUCapabilities( void )
if( i_eax == i_ebx ) if( i_eax == i_ebx )
{ {
# if defined( CAN_COMPILE_SSE ) || defined ( CAN_COMPILE_3DNOW ) # if defined( CAN_COMPILE_SSE ) || defined ( CAN_COMPILE_3DNOW ) \
&& defined( HAVE_SIGNAL_H )
signal( SIGILL, pf_sigill ); signal( SIGILL, pf_sigill );
# endif # endif
return i_capabilities; return i_capabilities;
...@@ -150,7 +158,8 @@ u32 CPUCapabilities( void ) ...@@ -150,7 +158,8 @@ u32 CPUCapabilities( void )
if( !i_eax ) if( !i_eax )
{ {
# if defined( CAN_COMPILE_SSE ) || defined ( CAN_COMPILE_3DNOW ) # if defined( CAN_COMPILE_SSE ) || defined ( CAN_COMPILE_3DNOW ) \
&& defined( HAVE_SIGNAL_H )
signal( SIGILL, pf_sigill ); signal( SIGILL, pf_sigill );
# endif # endif
return i_capabilities; return i_capabilities;
...@@ -168,7 +177,8 @@ u32 CPUCapabilities( void ) ...@@ -168,7 +177,8 @@ u32 CPUCapabilities( void )
if( ! (i_edx & 0x00800000) ) if( ! (i_edx & 0x00800000) )
{ {
# if defined( CAN_COMPILE_SSE ) || defined ( CAN_COMPILE_3DNOW ) # if defined( CAN_COMPILE_SSE ) || defined ( CAN_COMPILE_3DNOW ) \
&& defined( HAVE_SIGNAL_H )
signal( SIGILL, pf_sigill ); signal( SIGILL, pf_sigill );
# endif # endif
return i_capabilities; return i_capabilities;
...@@ -203,7 +213,8 @@ u32 CPUCapabilities( void ) ...@@ -203,7 +213,8 @@ u32 CPUCapabilities( void )
if( i_eax < 0x80000001 ) if( i_eax < 0x80000001 )
{ {
# if defined( CAN_COMPILE_SSE ) || defined ( CAN_COMPILE_3DNOW ) # if defined( CAN_COMPILE_SSE ) || defined ( CAN_COMPILE_3DNOW ) \
&& defined( HAVE_SIGNAL_H )
signal( SIGILL, pf_sigill ); signal( SIGILL, pf_sigill );
# endif # endif
return i_capabilities; return i_capabilities;
...@@ -236,14 +247,15 @@ u32 CPUCapabilities( void ) ...@@ -236,14 +247,15 @@ u32 CPUCapabilities( void )
i_capabilities |= CPU_CAPABILITY_MMXEXT; i_capabilities |= CPU_CAPABILITY_MMXEXT;
} }
# if defined( CAN_COMPILE_SSE ) || defined ( CAN_COMPILE_3DNOW ) # if defined( CAN_COMPILE_SSE ) || defined ( CAN_COMPILE_3DNOW ) \
&& defined( HAVE_SIGNAL_H )
signal( SIGILL, pf_sigill ); signal( SIGILL, pf_sigill );
# endif # endif
return i_capabilities; return i_capabilities;
#elif defined( __powerpc__ ) #elif defined( __powerpc__ )
# ifdef CAN_COMPILE_ALTIVEC # ifdef CAN_COMPILE_ALTIVEC && defined( HAVE_SIGNAL_H )
void (*pf_sigill) (int) = signal( SIGILL, SigHandler ); void (*pf_sigill) (int) = signal( SIGILL, SigHandler );
i_capabilities |= CPU_CAPABILITY_FPU; i_capabilities |= CPU_CAPABILITY_FPU;
...@@ -286,6 +298,7 @@ u32 CPUCapabilities( void ) ...@@ -286,6 +298,7 @@ u32 CPUCapabilities( void )
* This function is called when an illegal instruction signal is received by * This function is called when an illegal instruction signal is received by
* the program. We use this function to test OS and CPU capabilities * the program. We use this function to test OS and CPU capabilities
*****************************************************************************/ *****************************************************************************/
#if defined( HAVE_SIGNAL_H )
static void SigHandler( int i_signal ) static void SigHandler( int i_signal )
{ {
/* Acknowledge the signal received */ /* Acknowledge the signal received */
...@@ -307,4 +320,5 @@ static void SigHandler( int i_signal ) ...@@ -307,4 +320,5 @@ static void SigHandler( int i_signal )
longjmp( env, 1 ); longjmp( env, 1 );
} }
#endif
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* iso_lang.c: function to decode language code (in dvd or a52 for instance). * iso_lang.c: function to decode language code (in dvd or a52 for instance).
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * Copyright (C) 1998-2001 VideoLAN
* $Id: iso_lang.c,v 1.6 2002/06/01 12:32:01 sam Exp $ * $Id: iso_lang.c,v 1.7 2002/11/10 18:04:24 sam Exp $
* *
* Author: Stphane Borel <stef@via.ecp.fr> * Author: Stphane Borel <stef@via.ecp.fr>
* Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr> * Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
static const iso639_lang_t p_languages[] = static const iso639_lang_t p_languages[] =
{ {
#include "iso-639.def" #include "iso-639_def.h"
{ NULL, NULL, NULL, NULL, NULL } { NULL, NULL, NULL, NULL, NULL }
}; };
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* modules, especially intf modules. See config.h for output configuration. * modules, especially intf modules. See config.h for output configuration.
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2002 VideoLAN * Copyright (C) 1998-2002 VideoLAN
* $Id: messages.c,v 1.20 2002/11/08 10:26:53 gbazin Exp $ * $Id: messages.c,v 1.21 2002/11/10 18:04:24 sam Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -27,8 +27,6 @@ ...@@ -27,8 +27,6 @@
/***************************************************************************** /*****************************************************************************
* Preamble * Preamble
*****************************************************************************/ *****************************************************************************/
#include <errno.h> /* errno */
#include <fcntl.h> /* O_CREAT, O_TRUNC, O_WRONLY, O_SYNC */
#include <stdio.h> /* required */ #include <stdio.h> /* required */
#include <stdarg.h> /* va_list for BSD */ #include <stdarg.h> /* va_list for BSD */
#include <stdlib.h> /* malloc() */ #include <stdlib.h> /* malloc() */
...@@ -36,6 +34,14 @@ ...@@ -36,6 +34,14 @@
#include <vlc/vlc.h> #include <vlc/vlc.h>
#ifdef HAVE_FCNTL_H
# include <fcntl.h> /* O_CREAT, O_TRUNC, O_WRONLY, O_SYNC */
#endif
#ifdef HAVE_ERRNO_H
# include <errno.h> /* errno */
#endif
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
#include <unistd.h> /* close(), write() */ #include <unistd.h> /* close(), write() */
#endif #endif
...@@ -248,8 +254,12 @@ static void QueueMsg( vlc_object_t *p_this, int i_type, const char *psz_module, ...@@ -248,8 +254,12 @@ static void QueueMsg( vlc_object_t *p_this, int i_type, const char *psz_module,
if( psz_str == NULL ) if( psz_str == NULL )
{ {
#ifdef HAVE_ERRNO_H
fprintf( stderr, "main warning: can't store message (%s): ", fprintf( stderr, "main warning: can't store message (%s): ",
strerror(errno) ); strerror(errno) );
#else
fprintf( stderr, "main warning: can't store message: " );
#endif
vfprintf( stderr, psz_format, args ); vfprintf( stderr, psz_format, args );
fprintf( stderr, "\n" ); fprintf( stderr, "\n" );
return; return;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* modules.c : Builtin and plugin modules management functions * modules.c : Builtin and plugin modules management functions
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: modules.c,v 1.101 2002/11/09 17:44:09 sam Exp $ * $Id: modules.c,v 1.102 2002/11/10 18:04:24 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* Ethan C. Baldridge <BaldridgeE@cadmus.com> * Ethan C. Baldridge <BaldridgeE@cadmus.com>
...@@ -41,8 +41,12 @@ ...@@ -41,8 +41,12 @@
# include "../extras/dirent.h" # include "../extras/dirent.h"
#endif #endif
#include <sys/types.h> #ifdef HAVE_SYS_TYPES_H
#include <sys/stat.h> # include <sys/types.h>
#endif
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
# include <unistd.h> # include <unistd.h>
#endif #endif
...@@ -620,7 +624,9 @@ static void AllocatePluginDir( vlc_object_t *p_this, const char *psz_dir, ...@@ -620,7 +624,9 @@ static void AllocatePluginDir( vlc_object_t *p_this, const char *psz_dir,
/* Parse the directory and try to load all files it contains. */ /* Parse the directory and try to load all files it contains. */
while( (file = readdir( dir )) ) while( (file = readdir( dir )) )
{ {
#ifndef UNDER_CE
struct stat statbuf; struct stat statbuf;
#endif
unsigned int i_len; unsigned int i_len;
/* Skip ".", ".." and anything starting with "." */ /* Skip ".", ".." and anything starting with "." */
...@@ -634,7 +640,11 @@ static void AllocatePluginDir( vlc_object_t *p_this, const char *psz_dir, ...@@ -634,7 +640,11 @@ static void AllocatePluginDir( vlc_object_t *p_this, const char *psz_dir,
psz_file = malloc( i_dirlen + 1 /* / */ + i_len + 1 /* \0 */ ); psz_file = malloc( i_dirlen + 1 /* / */ + i_len + 1 /* \0 */ );
sprintf( psz_file, "%s/%s", psz_dir, file->d_name ); sprintf( psz_file, "%s/%s", psz_dir, file->d_name );
#ifdef UNDER_CE
if( GetFileAttributes( psz_file ) & FILE_ATTRIBUTE_DIRECTORY )
#else
if( !stat( psz_file, &statbuf ) && statbuf.st_mode & S_IFDIR ) if( !stat( psz_file, &statbuf ) && statbuf.st_mode & S_IFDIR )
#endif
{ {
AllocatePluginDir( p_this, psz_file, i_maxdepth - 1 ); AllocatePluginDir( p_this, psz_file, i_maxdepth - 1 );
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* netutils.c: various network functions * netutils.c: various network functions
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: netutils.c,v 1.74 2002/10/05 19:26:23 jlj Exp $ * $Id: netutils.c,v 1.75 2002/11/10 18:04:24 sam Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* Benoit Steiner <benny@via.ecp.fr> * Benoit Steiner <benny@via.ecp.fr>
...@@ -31,14 +31,17 @@ ...@@ -31,14 +31,17 @@
* Preamble * Preamble
*****************************************************************************/ *****************************************************************************/
#include <stdlib.h> /* free(), realloc(), atoi() */ #include <stdlib.h> /* free(), realloc(), atoi() */
#include <errno.h> /* errno() */
#include <string.h> /* memset() */ #include <string.h> /* memset() */
#include <vlc/vlc.h> #include <vlc/vlc.h>
#ifdef HAVE_ERRNO_H
# include <errno.h> /* errno() */
#endif
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
# include <unistd.h> /* gethostname() */ # include <unistd.h> /* gethostname() */
#elif defined( _MSC_VER ) && defined( _WIN32 ) #elif defined( _MSC_VER ) && defined( _WIN32 ) && !defined( UNDER_CE )
# include <io.h> # include <io.h>
#endif #endif
...@@ -46,7 +49,9 @@ ...@@ -46,7 +49,9 @@
#include <sys/time.h> /* gettimeofday */ #include <sys/time.h> /* gettimeofday */
#endif #endif
#ifdef WIN32 #if defined( UNDER_CE )
/* No real network support */
#elif defined( WIN32 )
# include <winsock2.h> # include <winsock2.h>
#else #else
# include <netdb.h> /* hostent ... */ # include <netdb.h> /* hostent ... */
...@@ -67,10 +72,11 @@ ...@@ -67,10 +72,11 @@
#include <IOKit/network/IOEthernetController.h> #include <IOKit/network/IOEthernetController.h>
#endif #endif
#if defined( WIN32 ) /* tools to get the MAC adress from */ #if defined( WIN32 ) && !defined( UNDER_CE )
#include <windows.h> /* the interface under Windows */ /* tools to get the MAC adress from the interface under Windows */
#include <stdio.h> # include <windows.h>
#include <nb30.h> # include <stdio.h>
# include <nb30.h>
#endif #endif
#ifdef HAVE_NET_IF_H #ifdef HAVE_NET_IF_H
...@@ -107,7 +113,7 @@ static int GetMacAddress ( vlc_object_t *, int i_fd, char *psz_mac ); ...@@ -107,7 +113,7 @@ static int GetMacAddress ( vlc_object_t *, int i_fd, char *psz_mac );
#ifdef SYS_DARWIN #ifdef SYS_DARWIN
static int GetNetIntfCtrl ( const char *psz_interface, static int GetNetIntfCtrl ( const char *psz_interface,
io_object_t *ctrl_service ); io_object_t *ctrl_service );
#elif defined( WIN32 ) #elif defined( WIN32 ) && !defined( UNDER_CE )
static int GetAdapterInfo ( int i_adapter, char *psz_string ); static int GetAdapterInfo ( int i_adapter, char *psz_string );
#endif #endif
...@@ -120,7 +126,7 @@ static int GetAdapterInfo ( int i_adapter, char *psz_string ); ...@@ -120,7 +126,7 @@ static int GetAdapterInfo ( int i_adapter, char *psz_string );
*****************************************************************************/ *****************************************************************************/
int __network_ChannelCreate( vlc_object_t *p_this ) int __network_ChannelCreate( vlc_object_t *p_this )
{ {
#if !defined( SYS_LINUX ) && !defined( WIN32 ) #if !defined( SYS_LINUX ) && !( defined( WIN32 ) && !defined( UNDER_CE ) )
msg_Err( p_this, "VLAN-based channels are not supported " msg_Err( p_this, "VLAN-based channels are not supported "
"on this architecture" ); "on this architecture" );
#endif #endif
...@@ -157,6 +163,7 @@ int __network_ChannelJoin( vlc_object_t *p_this, int i_channel ) ...@@ -157,6 +163,7 @@ int __network_ChannelJoin( vlc_object_t *p_this, int i_channel )
#define VLCS_VERSION 13 #define VLCS_VERSION 13
#define MESSAGE_LENGTH 256 #define MESSAGE_LENGTH 256
#if defined( SYS_LINUX ) || ( defined( WIN32 ) && !defined( UNDER_CE ) )
module_t * p_network; module_t * p_network;
char * psz_network = NULL; char * psz_network = NULL;
network_socket_t socket_desc; network_socket_t socket_desc;
...@@ -288,12 +295,13 @@ int __network_ChannelJoin( vlc_object_t *p_this, int i_channel ) ...@@ -288,12 +295,13 @@ int __network_ChannelJoin( vlc_object_t *p_this, int i_channel )
} }
/* Close the socket and return nicely */ /* Close the socket and return nicely */
#ifndef WIN32 # if defined( WIN32 )
close( i_fd );
#else
closesocket( i_fd ); closesocket( i_fd );
#endif # else
close( i_fd );
# endif
#endif
return 0; return 0;
} }
...@@ -380,7 +388,7 @@ static int GetMacAddress( vlc_object_t *p_this, int i_fd, char *psz_mac ) ...@@ -380,7 +388,7 @@ static int GetMacAddress( vlc_object_t *p_this, int i_fd, char *psz_mac )
return( 0 ); return( 0 );
#elif defined( WIN32 ) #elif defined( WIN32 ) && !defined( UNDER_CE )
int i, i_ret = -1; int i, i_ret = -1;
/* Get adapter list - support for more than one adapter */ /* Get adapter list - support for more than one adapter */
...@@ -457,7 +465,7 @@ static int GetNetIntfCtrl( const char *psz_interface, ...@@ -457,7 +465,7 @@ static int GetNetIntfCtrl( const char *psz_interface,
return( 0 ); return( 0 );
} }
#elif defined( WIN32 ) #elif defined( WIN32 ) && !defined( UNDER_CE )
/***************************************************************************** /*****************************************************************************
* GetAdapterInfo : gets some informations about the interface using NETBIOS * GetAdapterInfo : gets some informations about the interface using NETBIOS
*****************************************************************************/ *****************************************************************************/
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* threads.c : threads implementation for the VideoLAN client * threads.c : threads implementation for the VideoLAN client
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000, 2001, 2002 VideoLAN * Copyright (C) 1999, 2000, 2001, 2002 VideoLAN
* $Id: threads.c,v 1.23 2002/10/16 10:31:58 sam Exp $ * $Id: threads.c,v 1.24 2002/11/10 18:04:24 sam Exp $
* *
* Authors: Jean-Marc Dressler <polux@via.ecp.fr> * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -99,6 +99,9 @@ int __vlc_threads_init( vlc_object_t *p_this ) ...@@ -99,6 +99,9 @@ int __vlc_threads_init( vlc_object_t *p_this )
#elif defined( ST_INIT_IN_ST_H ) #elif defined( ST_INIT_IN_ST_H )
i_ret = st_init(); i_ret = st_init();
#elif defined( UNDER_CE )
/* Nothing to initialize */
#elif defined( WIN32 ) #elif defined( WIN32 )
/* Dynamically get the address of SignalObjectAndWait */ /* Dynamically get the address of SignalObjectAndWait */
if( GetVersion() < 0x80000000 ) if( GetVersion() < 0x80000000 )
...@@ -258,6 +261,7 @@ int __vlc_mutex_init( vlc_object_t *p_this, vlc_mutex_t *p_mutex ) ...@@ -258,6 +261,7 @@ int __vlc_mutex_init( vlc_object_t *p_this, vlc_mutex_t *p_mutex )
* function and have a 100% correct vlc_cond_wait() implementation. * function and have a 100% correct vlc_cond_wait() implementation.
* As this function is not available on Win9x, we can use the faster * As this function is not available on Win9x, we can use the faster
* CriticalSections */ * CriticalSections */
# if !defined( UNDER_CE )
if( p_this->p_libvlc->SignalObjectAndWait && if( p_this->p_libvlc->SignalObjectAndWait &&
!p_this->p_libvlc->b_fast_mutex ) !p_this->p_libvlc->b_fast_mutex )
{ {
...@@ -266,6 +270,7 @@ int __vlc_mutex_init( vlc_object_t *p_this, vlc_mutex_t *p_mutex ) ...@@ -266,6 +270,7 @@ int __vlc_mutex_init( vlc_object_t *p_this, vlc_mutex_t *p_mutex )
return ( p_mutex->mutex != NULL ? 0 : 1 ); return ( p_mutex->mutex != NULL ? 0 : 1 );
} }
else else
# endif
{ {
p_mutex->mutex = NULL; p_mutex->mutex = NULL;
InitializeCriticalSection( &p_mutex->csection ); InitializeCriticalSection( &p_mutex->csection );
...@@ -391,6 +396,7 @@ int __vlc_cond_init( vlc_object_t *p_this, vlc_cond_t *p_condvar ) ...@@ -391,6 +396,7 @@ int __vlc_cond_init( vlc_object_t *p_this, vlc_cond_t *p_condvar )
/* Initialize counter */ /* Initialize counter */
p_condvar->i_waiting_threads = 0; p_condvar->i_waiting_threads = 0;
# if !defined( UNDER_CE )
/* Misc init */ /* Misc init */
p_condvar->i_win9x_cv = p_this->p_libvlc->i_win9x_cv; p_condvar->i_win9x_cv = p_this->p_libvlc->i_win9x_cv;
p_condvar->SignalObjectAndWait = p_this->p_libvlc->SignalObjectAndWait; p_condvar->SignalObjectAndWait = p_this->p_libvlc->SignalObjectAndWait;
...@@ -398,6 +404,7 @@ int __vlc_cond_init( vlc_object_t *p_this, vlc_cond_t *p_condvar ) ...@@ -398,6 +404,7 @@ int __vlc_cond_init( vlc_object_t *p_this, vlc_cond_t *p_condvar )
if( (p_condvar->SignalObjectAndWait && !p_this->p_libvlc->b_fast_mutex) if( (p_condvar->SignalObjectAndWait && !p_this->p_libvlc->b_fast_mutex)
|| p_condvar->i_win9x_cv == 0 ) || p_condvar->i_win9x_cv == 0 )
{ {
# endif
/* Create an auto-reset event. */ /* Create an auto-reset event. */
p_condvar->event = CreateEvent( NULL, /* no security */ p_condvar->event = CreateEvent( NULL, /* no security */
FALSE, /* auto-reset event */ FALSE, /* auto-reset event */
...@@ -406,6 +413,7 @@ int __vlc_cond_init( vlc_object_t *p_this, vlc_cond_t *p_condvar ) ...@@ -406,6 +413,7 @@ int __vlc_cond_init( vlc_object_t *p_this, vlc_cond_t *p_condvar )
p_condvar->semaphore = NULL; p_condvar->semaphore = NULL;
return !p_condvar->event; return !p_condvar->event;
# if !defined( UNDER_CE )
} }
else else
{ {
...@@ -425,6 +433,7 @@ int __vlc_cond_init( vlc_object_t *p_this, vlc_cond_t *p_condvar ) ...@@ -425,6 +433,7 @@ int __vlc_cond_init( vlc_object_t *p_this, vlc_cond_t *p_condvar )
return !p_condvar->semaphore || !p_condvar->event; return !p_condvar->semaphore || !p_condvar->event;
} }
# endif
#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) #elif defined( PTHREAD_COND_T_IN_PTHREAD_H )
return pthread_cond_init( &p_condvar->cond, NULL ); return pthread_cond_init( &p_condvar->cond, NULL );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* win32_specific.c: Win32 specific features * win32_specific.c: Win32 specific features
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: win32_specific.c,v 1.18 2002/11/08 10:26:53 gbazin Exp $ * $Id: win32_specific.c,v 1.19 2002/11/10 18:04:24 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* Gildas Bazin <gbazin@netcourrier.com> * Gildas Bazin <gbazin@netcourrier.com>
...@@ -21,20 +21,22 @@ ...@@ -21,20 +21,22 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/ *****************************************************************************/
#include <errno.h> /* ENOMEM */
#include <string.h> /* strdup() */ #include <string.h> /* strdup() */
#include <stdlib.h> /* free() */ #include <stdlib.h> /* free() */
#include <fcntl.h>
#include <winsock2.h>
#include <vlc/vlc.h> #include <vlc/vlc.h>
#if !defined( UNDER_CE )
# include <fcntl.h>
# include <winsock2.h>
#endif
/***************************************************************************** /*****************************************************************************
* system_Init: initialize winsock and misc other things. * system_Init: initialize winsock and misc other things.
*****************************************************************************/ *****************************************************************************/
void system_Init( vlc_t *p_this, int *pi_argc, char *ppsz_argv[] ) void system_Init( vlc_t *p_this, int *pi_argc, char *ppsz_argv[] )
{ {
#if !defined( UNDER_CE )
WSADATA Data; WSADATA Data;
int i_err; int i_err;
...@@ -48,6 +50,7 @@ void system_Init( vlc_t *p_this, int *pi_argc, char *ppsz_argv[] ) ...@@ -48,6 +50,7 @@ void system_Init( vlc_t *p_this, int *pi_argc, char *ppsz_argv[] )
/* Set the default file-translation mode */ /* Set the default file-translation mode */
_fmode = _O_BINARY; _fmode = _O_BINARY;
#endif
} }
/***************************************************************************** /*****************************************************************************
...@@ -55,6 +58,7 @@ void system_Init( vlc_t *p_this, int *pi_argc, char *ppsz_argv[] ) ...@@ -55,6 +58,7 @@ void system_Init( vlc_t *p_this, int *pi_argc, char *ppsz_argv[] )
*****************************************************************************/ *****************************************************************************/
void system_Configure( vlc_t *p_this ) void system_Configure( vlc_t *p_this )
{ {
#if !defined( UNDER_CE )
p_this->p_libvlc->b_fast_mutex = config_GetInt( p_this, "fast-mutex" ); p_this->p_libvlc->b_fast_mutex = config_GetInt( p_this, "fast-mutex" );
p_this->p_libvlc->i_win9x_cv = config_GetInt( p_this, "win9x-cv-method" ); p_this->p_libvlc->i_win9x_cv = config_GetInt( p_this, "win9x-cv-method" );
...@@ -73,6 +77,7 @@ void system_Configure( vlc_t *p_this ) ...@@ -73,6 +77,7 @@ void system_Configure( vlc_t *p_this )
} }
else else
msg_Dbg( p_this, "raised process priority" ); msg_Dbg( p_this, "raised process priority" );
#endif
} }
/***************************************************************************** /*****************************************************************************
...@@ -80,5 +85,7 @@ void system_Configure( vlc_t *p_this ) ...@@ -80,5 +85,7 @@ void system_Configure( vlc_t *p_this )
*****************************************************************************/ *****************************************************************************/
void system_End( vlc_t *p_this ) void system_End( vlc_t *p_this )
{ {
#if !defined( UNDER_CE )
WSACleanup(); WSACleanup();
#endif
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* playlist.c : Playlist management functions * playlist.c : Playlist management functions
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: playlist.c,v 1.16 2002/10/31 11:16:29 sam Exp $ * $Id: playlist.c,v 1.17 2002/11/10 18:04:24 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include <stdlib.h> /* free(), strtol() */ #include <stdlib.h> /* free(), strtol() */
#include <stdio.h> /* sprintf() */ #include <stdio.h> /* sprintf() */
#include <string.h> /* strerror() */ #include <string.h> /* strerror() */
#include <errno.h> /* ENOMEM */
#include <vlc/vlc.h> #include <vlc/vlc.h>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* stream_output.c : stream output module * stream_output.c : stream output module
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: stream_output.c,v 1.3 2002/08/14 10:18:40 ipkiss Exp $ * $Id: stream_output.c,v 1.4 2002/11/10 18:04:24 sam Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
/***************************************************************************** /*****************************************************************************
* Preamble * Preamble
*****************************************************************************/ *****************************************************************************/
#include <errno.h> /* ENOMEM */
#include <stdlib.h> /* free() */ #include <stdlib.h> /* free() */
#include <stdio.h> /* sprintf() */ #include <stdio.h> /* sprintf() */
#include <string.h> /* strerror() */ #include <string.h> /* strerror() */
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* thread, and destroy a previously oppened video output thread. * thread, and destroy a previously oppened video output thread.
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * Copyright (C) 2000-2001 VideoLAN
* $Id: video_output.c,v 1.195 2002/11/08 10:26:54 gbazin Exp $ * $Id: video_output.c,v 1.196 2002/11/10 18:04:24 sam Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* *
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
/***************************************************************************** /*****************************************************************************
* Preamble * Preamble
*****************************************************************************/ *****************************************************************************/
#include <errno.h> /* ENOMEM */
#include <stdlib.h> /* free() */ #include <stdlib.h> /* free() */
#include <vlc/vlc.h> #include <vlc/vlc.h>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* video_text.c : text manipulation functions * video_text.c : text manipulation functions
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: video_text.c,v 1.37 2002/08/08 00:35:11 sam Exp $ * $Id: video_text.c,v 1.38 2002/11/10 18:04:24 sam Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -25,21 +25,23 @@ ...@@ -25,21 +25,23 @@
/***************************************************************************** /*****************************************************************************
* Preamble * Preamble
*****************************************************************************/ *****************************************************************************/
#include <errno.h> /* errno */
#include <stdlib.h> /* free() */ #include <stdlib.h> /* free() */
#include <stdio.h> /* sprintf() */ #include <stdio.h> /* sprintf() */
#include <string.h> /* strerror() */ #include <string.h> /* strerror() */
#include <fcntl.h> /* open() */
#include <vlc/vlc.h> #include <vlc/vlc.h>
#ifdef HAVE_UNISTD_H #ifdef HAVE_ERRNO_H
# include <unistd.h> /* read(), close() */ # include <errno.h> /* errno */
#elif defined( _MSC_VER ) && defined( _WIN32 ) #endif
# include <io.h>
#ifdef HAVE_FCNTL_H
# include <fcntl.h> /* open() */
#endif #endif
#if defined( WIN32 ) #ifdef HAVE_UNISTD_H
# include <unistd.h> /* read(), close() */
#elif defined( WIN32 ) && !defined( UNDER_CE )
# include <io.h> # include <io.h>
#endif #endif
...@@ -253,7 +255,9 @@ vout_font_t *vout_LoadFont( vout_thread_t *p_vout, const char *psz_name ) ...@@ -253,7 +255,9 @@ vout_font_t *vout_LoadFont( vout_thread_t *p_vout, const char *psz_name )
} }
/* Open file */ /* Open file */
#ifndef UNDER_CE /* FIXME */
i_file = open( psz_file, O_RDONLY ); i_file = open( psz_file, O_RDONLY );
#endif
free( psz_file ); free( psz_file );
if( i_file != -1 ) if( i_file != -1 )
...@@ -264,7 +268,11 @@ vout_font_t *vout_LoadFont( vout_thread_t *p_vout, const char *psz_name ) ...@@ -264,7 +268,11 @@ vout_font_t *vout_LoadFont( vout_thread_t *p_vout, const char *psz_name )
if( i_file == -1 ) if( i_file == -1 )
{ {
#ifdef HAVE_ERRNO_H
msg_Err( p_vout, "cannot open '%s' (%s)", psz_name, strerror(errno) ); msg_Err( p_vout, "cannot open '%s' (%s)", psz_name, strerror(errno) );
#else
msg_Err( p_vout, "cannot open '%s'", psz_name );
#endif
return( NULL ); return( NULL );
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vout_pictures.c : picture management functions * vout_pictures.c : picture management functions
***************************************************************************** *****************************************************************************
* Copyright (C) 2000 VideoLAN * Copyright (C) 2000 VideoLAN
* $Id: vout_pictures.c,v 1.29 2002/08/21 15:10:33 sam Exp $ * $Id: vout_pictures.c,v 1.30 2002/11/10 18:04:24 sam Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
/***************************************************************************** /*****************************************************************************
* Preamble * Preamble
*****************************************************************************/ *****************************************************************************/
#include <errno.h> /* ENOMEM */
#include <stdlib.h> /* free() */ #include <stdlib.h> /* free() */
#include <stdio.h> /* sprintf() */ #include <stdio.h> /* sprintf() */
#include <string.h> /* strerror() */ #include <string.h> /* strerror() */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vout_subpictures.c : subpicture management functions * vout_subpictures.c : subpicture management functions
***************************************************************************** *****************************************************************************
* Copyright (C) 2000 VideoLAN * Copyright (C) 2000 VideoLAN
* $Id: vout_subpictures.c,v 1.16 2002/11/06 18:07:56 sam Exp $ * $Id: vout_subpictures.c,v 1.17 2002/11/10 18:04:24 sam Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
/***************************************************************************** /*****************************************************************************
* Preamble * Preamble
*****************************************************************************/ *****************************************************************************/
#include <errno.h> /* ENOMEM */
#include <stdlib.h> /* free() */ #include <stdlib.h> /* free() */
#include <stdio.h> /* sprintf() */ #include <stdio.h> /* sprintf() */
#include <string.h> /* strerror() */ #include <string.h> /* strerror() */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vlc.c: the vlc player * vlc.c: the vlc player
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * Copyright (C) 1998-2001 VideoLAN
* $Id: vlc.c,v 1.15 2002/10/14 16:46:55 sam Exp $ * $Id: vlc.c,v 1.16 2002/11/10 18:04:23 sam Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -24,11 +24,16 @@ ...@@ -24,11 +24,16 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/ *****************************************************************************/
#include <signal.h> /* SIGHUP, SIGINT, SIGKILL */ #include "config.h"
#include <stdio.h> /* fprintf() */ #include <stdio.h> /* fprintf() */
#include <stdlib.h> /* putenv(), strtol(), */ #include <stdlib.h> /* putenv(), strtol(), */
#include <signal.h> /* SIGHUP, SIGINT, SIGKILL */ #ifdef HAVE_SIGNAL_H
#include <time.h> /* time() */ # include <signal.h> /* SIGHUP, SIGINT, SIGKILL */
#endif
#ifdef HAVE_TIME_H
# include <time.h> /* time() */
#endif
#include <vlc/vlc.h> #include <vlc/vlc.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment