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
## ##
...@@ -298,7 +479,7 @@ EOF ...@@ -298,7 +479,7 @@ EOF
-e 's#_("--")#"--"#' \ -e 's#_("--")#"--"#' \
-e 's#_("/dev/dvd")#"/dev/dvd"#' \ -e 's#_("/dev/dvd")#"/dev/dvd"#' \
-e 's#_(\("./."\))#\1#' \ -e 's#_(\("./."\))#\1#' \
< modules/gui/gtk/$file >> /tmp/$$.$file.bak < modules/gui/gtk/$file >> /tmp/$$.$file.bak
mv -f /tmp/$$.$file.bak modules/gui/gtk/$file mv -f /tmp/$$.$file.bak modules/gui/gtk/$file
fi fi
done done
...@@ -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)
# include <sys/time.h> # ifdef HAVE_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 * );
*****************************************************************************/