Commit 20823a81 authored by Sam Hocevar's avatar Sam Hocevar

  * VC++/Intel compiler fixes by Jon Lech Johansen <jon-vl@nanocrew.net>.
parent ed87d047
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
#===================# #===================#
HEAD HEAD
* VC++/Intel compiler fixes by Jon Lech Johansen <jon-vl@nanocrew.net>.
* Better gtk-config detection. * Better gtk-config detection.
* Removed duplicate checks in configure.in. * Removed duplicate checks in configure.in.
* Fixed a typo in vlc.spec. * Fixed a typo in vlc.spec.
......
...@@ -4038,11 +4038,12 @@ else ...@@ -4038,11 +4038,12 @@ else
fi fi
SDL_HEADER="SDL/SDL.h" SDL_HEADER="SDL/SDL.h"
if test x${SDL_CONFIG} = xno; then if test x${SDL_CONFIG} = xno
then
# Extract the first word of "sdl11-config", so it can be a program name with args. # Extract the first word of "sdl11-config", so it can be a program name with args.
set dummy sdl11-config; ac_word=$2 set dummy sdl11-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4046: checking for $ac_word" >&5 echo "configure:4047: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_SDL11_CONFIG'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_SDL11_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -4078,11 +4079,12 @@ fi ...@@ -4078,11 +4079,12 @@ fi
SDL_CONFIG=${SDL11_CONFIG} SDL_CONFIG=${SDL11_CONFIG}
SDL_HEADER="SDL11/SDL.h" SDL_HEADER="SDL11/SDL.h"
fi fi
if test x${SDL_CONFIG} = xno; then if test x${SDL_CONFIG} = xno
then
# Extract the first word of "sdl12-config", so it can be a program name with args. # Extract the first word of "sdl12-config", so it can be a program name with args.
set dummy sdl12-config; ac_word=$2 set dummy sdl12-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4086: checking for $ac_word" >&5 echo "configure:4088: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_SDL12_CONFIG'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_SDL12_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -4118,22 +4120,23 @@ fi ...@@ -4118,22 +4120,23 @@ fi
SDL_CONFIG=${SDL12_CONFIG} SDL_CONFIG=${SDL12_CONFIG}
SDL_HEADER="SDL12/SDL.h" SDL_HEADER="SDL12/SDL.h"
fi fi
if test x${SDL_CONFIG} != xno; then if test x${SDL_CONFIG} != xno
then
for ac_hdr in $SDL_HEADER for ac_hdr in $SDL_HEADER
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:4127: checking for $ac_hdr" >&5 echo "configure:4130: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4132 "configure" #line 4135 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:4140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -4162,7 +4165,7 @@ echo "The development package for SDL is not installed. Please install it" ...@@ -4162,7 +4165,7 @@ echo "The development package for SDL is not installed. Please install it"
fi fi
done done
if expr 1.1.5 \> $($SDL_CONFIG --version) >/dev/null if expr 1.1.5 \> `$SDL_CONFIG --version` >/dev/null
then then
echo "You need SDL version 1.1.5 or later." echo "You need SDL version 1.1.5 or later."
exit exit
...@@ -4193,17 +4196,17 @@ if test "${with_directx+set}" = set; then ...@@ -4193,17 +4196,17 @@ if test "${with_directx+set}" = set; then
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:4197: checking for $ac_hdr" >&5 echo "configure:4200: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4202 "configure" #line 4205 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:4210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -4241,17 +4244,17 @@ fi ...@@ -4241,17 +4244,17 @@ fi
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:4245: checking for $ac_hdr" >&5 echo "configure:4248: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4250 "configure" #line 4253 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:4258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -4357,7 +4360,7 @@ then ...@@ -4357,7 +4360,7 @@ then
# Extract the first word of "gtk-config", so it can be a program name with args. # Extract the first word of "gtk-config", so it can be a program name with args.
set dummy gtk-config; ac_word=$2 set dummy gtk-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4361: checking for $ac_word" >&5 echo "configure:4364: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -4402,17 +4405,17 @@ fi ...@@ -4402,17 +4405,17 @@ fi
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:4406: checking for $ac_hdr" >&5 echo "configure:4409: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4411 "configure" #line 4414 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4416: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:4419: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -4463,17 +4466,17 @@ if test x$enable_x11 != xno; then ...@@ -4463,17 +4466,17 @@ if test x$enable_x11 != xno; then
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:4467: checking for $ac_hdr" >&5 echo "configure:4470: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4472 "configure" #line 4475 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:4480: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -4525,17 +4528,17 @@ if test x$enable_xvideo != xno; then ...@@ -4525,17 +4528,17 @@ if test x$enable_xvideo != xno; then
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:4529: checking for $ac_hdr" >&5 echo "configure:4532: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4534 "configure" #line 4537 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4539: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:4542: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -4575,17 +4578,17 @@ if test "${enable_alsa+set}" = set; then ...@@ -4575,17 +4578,17 @@ if test "${enable_alsa+set}" = set; then
then then
ac_safe=`echo "sys/asoundlib.h" | sed 'y%./+-%__p_%'` ac_safe=`echo "sys/asoundlib.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/asoundlib.h""... $ac_c" 1>&6 echo $ac_n "checking for sys/asoundlib.h""... $ac_c" 1>&6
echo "configure:4579: checking for sys/asoundlib.h" >&5 echo "configure:4582: checking for sys/asoundlib.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4584 "configure" #line 4587 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/asoundlib.h> #include <sys/asoundlib.h>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:4592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -4602,7 +4605,7 @@ fi ...@@ -4602,7 +4605,7 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6 echo "$ac_t""yes" 1>&6
echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6 echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
echo "configure:4606: checking for main in -lasound" >&5 echo "configure:4609: checking for main in -lasound" >&5
ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'` ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -4610,14 +4613,14 @@ else ...@@ -4610,14 +4613,14 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lasound $LIBS" LIBS="-lasound $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4614 "configure" #line 4617 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
main() main()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:4621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:4624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
......
...@@ -529,22 +529,25 @@ if test "x$withval" != "xno" ...@@ -529,22 +529,25 @@ if test "x$withval" != "xno"
then then
AC_PATH_PROG(SDL_CONFIG, sdl-config, no) AC_PATH_PROG(SDL_CONFIG, sdl-config, no)
SDL_HEADER="SDL/SDL.h" SDL_HEADER="SDL/SDL.h"
if test x${SDL_CONFIG} = xno; then if test x${SDL_CONFIG} = xno
then
AC_PATH_PROG(SDL11_CONFIG, sdl11-config, no) AC_PATH_PROG(SDL11_CONFIG, sdl11-config, no)
SDL_CONFIG=${SDL11_CONFIG} SDL_CONFIG=${SDL11_CONFIG}
SDL_HEADER="SDL11/SDL.h" SDL_HEADER="SDL11/SDL.h"
fi fi
if test x${SDL_CONFIG} = xno; then if test x${SDL_CONFIG} = xno
then
AC_PATH_PROG(SDL12_CONFIG, sdl12-config, no) AC_PATH_PROG(SDL12_CONFIG, sdl12-config, no)
SDL_CONFIG=${SDL12_CONFIG} SDL_CONFIG=${SDL12_CONFIG}
SDL_HEADER="SDL12/SDL.h" SDL_HEADER="SDL12/SDL.h"
fi fi
if test x${SDL_CONFIG} != xno; then if test x${SDL_CONFIG} != xno
then
AC_CHECK_HEADERS($SDL_HEADER, [], AC_CHECK_HEADERS($SDL_HEADER, [],
[ echo "The development package for SDL is not installed. Please install it" [ echo "The development package for SDL is not installed. Please install it"
echo "and try again." echo "and try again."
exit ]) exit ])
if expr 1.1.5 \> $($SDL_CONFIG --version) >/dev/null if expr 1.1.5 \> `$SDL_CONFIG --version` >/dev/null
then then
echo "You need SDL version 1.1.5 or later." echo "You need SDL version 1.1.5 or later."
exit exit
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* libdvdcss.c: DVD reading library. * libdvdcss.c: DVD reading library.
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * Copyright (C) 1998-2001 VideoLAN
* $Id: libdvdcss.c,v 1.11 2001/07/28 02:17:37 sam Exp $ * $Id: libdvdcss.c,v 1.12 2001/07/30 00:53:04 sam Exp $
* *
* Authors: Stphane Borel <stef@via.ecp.fr> * Authors: Stphane Borel <stef@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -38,8 +38,7 @@ ...@@ -38,8 +38,7 @@
#endif #endif
#if defined( WIN32 ) #if defined( WIN32 )
# include <io.h> # include <io.h> /* read() */
# include "input_iovec.h"
#else #else
# include <sys/uio.h> /* struct iovec */ # include <sys/uio.h> /* struct iovec */
#endif #endif
...@@ -47,6 +46,10 @@ ...@@ -47,6 +46,10 @@
#include "config.h" #include "config.h"
#include "common.h" #include "common.h"
#if defined( WIN32 )
# include "input_iovec.h"
#endif
#include "videolan/dvdcss.h" #include "videolan/dvdcss.h"
#include "libdvdcss.h" #include "libdvdcss.h"
#include "ioctl.h" #include "ioctl.h"
...@@ -807,7 +810,7 @@ static int _win32_dvdcss_aread( int i_fd, void *p_data, int i_blocks ) ...@@ -807,7 +810,7 @@ static int _win32_dvdcss_aread( int i_fd, void *p_data, int i_blocks )
/* transfer the next 64kb (_win32_dvdcss_aread is called recursively) /* transfer the next 64kb (_win32_dvdcss_aread is called recursively)
* We need to check the status of the read on return */ * We need to check the status of the read on return */
if( _win32_dvdcss_aread( i_fd, p_data + 32 * DVDCSS_BLOCK_SIZE, if( _win32_dvdcss_aread( i_fd, (u8*) p_data + 32 * DVDCSS_BLOCK_SIZE,
i_blocks - 32) < 0 ) i_blocks - 32) < 0 )
{ {
return -1; return -1;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions * Collection of useful common types and macros definitions
***************************************************************************** *****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN * Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: common.h,v 1.36 2001/07/08 17:45:51 gbazin Exp $ * $Id: common.h,v 1.37 2001/07/30 00:53:04 sam Exp $
* *
* Authors: Samuel Hocevar <sam@via.ecp.fr> * Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr> * Vincent Seguin <seguin@via.ecp.fr>
...@@ -207,13 +207,11 @@ struct pgrm_descriptor_s; ...@@ -207,13 +207,11 @@ struct pgrm_descriptor_s;
#endif #endif
#if defined( WIN32 ) #if defined( WIN32 )
# ifndef _OFF_T_DEFINED
typedef __int64 off_t; typedef __int64 off_t;
#ifndef snprintf # define _OFF_T_DEFINED
#define snprintf _snprintf /* snprintf not defined in mingw32 (bug?) */ # endif
#endif # ifndef snprintf
# define snprintf _snprintf /* snprintf not defined in mingw32 (bug?) */
# endif
#endif #endif
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* aout_directx.c: Windows DirectX audio output method * aout_directx.c: Windows DirectX audio output method
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: aout_directx.c,v 1.6 2001/07/25 08:41:21 gbazin Exp $ * $Id: aout_directx.c,v 1.7 2001/07/30 00:53:04 sam Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -39,7 +39,11 @@ ...@@ -39,7 +39,11 @@
#include <errno.h> /* ENOMEM */ #include <errno.h> /* ENOMEM */
#include <fcntl.h> /* open(), O_WRONLY */ #include <fcntl.h> /* open(), O_WRONLY */
#include <string.h> /* strerror() */ #include <string.h> /* strerror() */
#include <unistd.h> /* write(), close() */
#ifdef HAVE_UNISTD_H
# include <unistd.h> /* write(), close() */
#endif
#include <stdio.h> /* "intf_msg.h" */ #include <stdio.h> /* "intf_msg.h" */
#include <stdlib.h> /* calloc(), malloc(), free() */ #include <stdlib.h> /* calloc(), malloc(), free() */
...@@ -49,7 +53,11 @@ ...@@ -49,7 +53,11 @@
#include "mtime.h" #include "mtime.h"
#include "tests.h" #include "tests.h"
#include "directx.h" #if defined( _MSC_VER )
# include <dsound.h>
#else
# include "directx.h"
#endif
#include "audio_output.h" /* aout_thread_t */ #include "audio_output.h" /* aout_thread_t */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vout_directx.c: Windows DirectX video output display method * vout_directx.c: Windows DirectX video output display method
***************************************************************************** *****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN * Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: vout_directx.c,v 1.8 2001/07/12 23:06:54 gbazin Exp $ * $Id: vout_directx.c,v 1.9 2001/07/30 00:53:04 sam Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -56,7 +56,12 @@ ...@@ -56,7 +56,12 @@
#include <windows.h> #include <windows.h>
#include <windowsx.h> #include <windowsx.h>
#include <directx.h>
#if defined( _MSC_VER )
# include <ddraw.h>
#else
# include <directx.h>
#endif
#include "config.h" #include "config.h"
#include "common.h" #include "common.h"
...@@ -616,19 +621,19 @@ static void vout_Display( vout_thread_t *p_vout ) ...@@ -616,19 +621,19 @@ static void vout_Display( vout_thread_t *p_vout )
i_image_width/2); i_image_width/2);
#else #else
/* copy Y, we copy two lines at once */ /* copy Y, we copy two lines at once */
memcpy(ddsd.lpSurface + i*2*ddsd.lPitch, memcpy((u8*)ddsd.lpSurface + i*2*ddsd.lPitch,
p_vout->p_rendered_pic->p_y + i*2*i_image_width, p_vout->p_rendered_pic->p_y + i*2*i_image_width,
i_image_width); i_image_width);
memcpy(ddsd.lpSurface + (i*2+1)*ddsd.lPitch, memcpy((u8*)ddsd.lpSurface + (i*2+1)*ddsd.lPitch,
p_vout->p_rendered_pic->p_y + (i*2+1)*i_image_width, p_vout->p_rendered_pic->p_y + (i*2+1)*i_image_width,
i_image_width); i_image_width);
/* then V */ /* then V */
memcpy((ddsd.lpSurface + ddsd.dwHeight * ddsd.lPitch) memcpy(((u8*)ddsd.lpSurface + ddsd.dwHeight * ddsd.lPitch)
+ i * ddsd.lPitch/2, + i * ddsd.lPitch/2,
p_vout->p_rendered_pic->p_v + i*i_image_width/2, p_vout->p_rendered_pic->p_v + i*i_image_width/2,
i_image_width/2); i_image_width/2);
/* and U */ /* and U */
memcpy((ddsd.lpSurface + ddsd.dwHeight * ddsd.lPitch) memcpy(((u8*)ddsd.lpSurface + ddsd.dwHeight * ddsd.lPitch)
+ (ddsd.dwHeight * ddsd.lPitch/4) + (ddsd.dwHeight * ddsd.lPitch/4)
+ i * ddsd.lPitch/2, + i * ddsd.lPitch/2,
p_vout->p_rendered_pic->p_u + i*i_image_width/2, p_vout->p_rendered_pic->p_u + i*i_image_width/2,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vout_events.c: Windows DirectX video output events handler * vout_events.c: Windows DirectX video output events handler
***************************************************************************** *****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN * Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: vout_events.c,v 1.3 2001/07/25 08:41:21 gbazin Exp $ * $Id: vout_events.c,v 1.4 2001/07/30 00:53:04 sam Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -44,7 +44,12 @@ ...@@ -44,7 +44,12 @@
#include <windows.h> #include <windows.h>
#include <windowsx.h> #include <windowsx.h>
#include <directx.h>
#if defined( _MSC_VER )
# include <ddraw.h>
#else
# include <directx.h>
#endif
#include "intf_msg.h" #include "intf_msg.h"
#include "interface.h" #include "interface.h"
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* will only be given back to netlist when refcount is zero. * will only be given back to netlist when refcount is zero.
***************************************************************************** *****************************************************************************
* Copyright (C) 1998, 1999, 2000, 2001 VideoLAN * Copyright (C) 1998, 1999, 2000, 2001 VideoLAN
* $Id: dvd_netlist.c,v 1.12 2001/07/17 09:48:07 massiot Exp $ * $Id: dvd_netlist.c,v 1.13 2001/07/30 00:53:05 sam Exp $
* *
* Authors: Henri Fallon <henri@videolan.org> * Authors: Henri Fallon <henri@videolan.org>
* Stphane Borel <stef@videolan.org> * Stphane Borel <stef@videolan.org>
...@@ -41,8 +41,7 @@ ...@@ -41,8 +41,7 @@
#endif #endif
#if defined( WIN32 ) #if defined( WIN32 )
# include <io.h> # include <io.h> /* read() */
# include "input_iovec.h"
#else #else
# include <sys/uio.h> /* struct iovec */ # include <sys/uio.h> /* struct iovec */
#endif #endif
...@@ -53,6 +52,10 @@ ...@@ -53,6 +52,10 @@
#include "mtime.h" #include "mtime.h"
#include "intf_msg.h" /* intf_*Msg */ #include "intf_msg.h" /* intf_*Msg */
#if defined( WIN32 )
# include "input_iovec.h"
#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"
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* -dvd_udf to find files * -dvd_udf to find files
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * Copyright (C) 1998-2001 VideoLAN
* $Id: input_dvd.c,v 1.81 2001/07/27 01:05:17 sam Exp $ * $Id: input_dvd.c,v 1.82 2001/07/30 00:53:05 sam Exp $
* *
* Author: Stphane Borel <stef@via.ecp.fr> * Author: Stphane Borel <stef@via.ecp.fr>
* *
...@@ -54,8 +54,7 @@ ...@@ -54,8 +54,7 @@
#endif #endif
#if defined( WIN32 ) #if defined( WIN32 )
# include <io.h> # include <io.h> /* read() */
# include "input_iovec.h"
#else #else
# include <sys/uio.h> /* struct iovec */ # include <sys/uio.h> /* struct iovec */
#endif #endif
...@@ -68,6 +67,10 @@ ...@@ -68,6 +67,10 @@
#include "mtime.h" #include "mtime.h"
#include "tests.h" #include "tests.h"
#if defined( WIN32 )
# include "input_iovec.h"
#endif
#include "intf_msg.h" #include "intf_msg.h"
#include "main.h" #include "main.h"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* input_es.c: Elementary Stream demux and packet management * input_es.c: Elementary Stream demux and packet management
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: input_es.c,v 1.8 2001/07/17 09:48:07 massiot Exp $ * $Id: input_es.c,v 1.9 2001/07/30 00:53:05 sam Exp $
* *
* Author: Christophe Massiot <massiot@via.ecp.fr> * Author: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -38,15 +38,12 @@ ...@@ -38,15 +38,12 @@
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
# include <unistd.h> # include <unistd.h>
#elif defined( _MSC_VER ) && defined( _WIN32 )
# include <io.h>
#endif #endif
#include <fcntl.h> #include <fcntl.h>
#if defined( WIN32 ) #if defined( WIN32 )
# include <io.h> # include <io.h> /* read() */
# include "input_iovec.h"
#else #else
# include <sys/uio.h> /* struct iovec */ # include <sys/uio.h> /* struct iovec */
#endif #endif
...@@ -57,6 +54,10 @@ ...@@ -57,6 +54,10 @@
#include "mtime.h" #include "mtime.h"
#include "tests.h" #include "tests.h"
#if defined( WIN32 )
# include "input_iovec.h"
#endif
#include "intf_msg.h" #include "intf_msg.h"
#include "main.h" #include "main.h"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* input_ts.c: TS demux and netlist management * input_ts.c: TS demux and netlist management
***************************************************************************** *****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN * Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: input_ts.c,v 1.30 2001/07/17 09:48:08 massiot Exp $ * $Id: input_ts.c,v 1.31 2001/07/30 00:53:05 sam Exp $
* *
* Authors: Henri Fallon <henri@videolan.org> * Authors: Henri Fallon <henri@videolan.org>
* *
...@@ -58,7 +58,6 @@ ...@@ -58,7 +58,6 @@
#if defined( WIN32 ) #if defined( WIN32 )
# include <io.h> # include <io.h>
# include <winsock2.h> # include <winsock2.h>
# include "input_iovec.h"
#else #else
# include <sys/uio.h> /* struct iovec */ # include <sys/uio.h> /* struct iovec */
#endif #endif
...@@ -69,6 +68,10 @@ ...@@ -69,6 +68,10 @@
#include "mtime.h" #include "mtime.h"
#include "tests.h" #include "tests.h"
#if defined( WIN32 )
# include "input_iovec.h"
#endif
#include "intf_msg.h" #include "intf_msg.h"
#include "stream_control.h" #include "stream_control.h"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* input_netlist.c: netlist management * input_netlist.c: netlist management
***************************************************************************** *****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN * Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: input_netlist.c,v 1.40 2001/07/17 09:48:08 massiot Exp $ * $Id: input_netlist.c,v 1.41 2001/07/30 00:53:05 sam Exp $
* *
* Authors: Henri Fallon <henri@videolan.org> * Authors: Henri Fallon <henri@videolan.org>
* *
...@@ -34,11 +34,10 @@ ...@@ -34,11 +34,10 @@
# include <unistd.h> # include <unistd.h>
#endif #endif
#if !defined( WIN32 ) #if defined( WIN32 )
# include <sys/uio.h> /* struct iovec */ # include <io.h> /* read() */
#else #else
# include <io.h> # include <sys/uio.h> /* struct iovec */
# include "input_iovec.h"
#endif #endif
#include "config.h" #include "config.h"
...@@ -47,6 +46,10 @@ ...@@ -47,6 +46,10 @@
#include "mtime.h" #include "mtime.h"
#include "intf_msg.h" /* intf_*Msg */ #include "intf_msg.h" /* intf_*Msg */
#if defined( WIN32 )
# include "input_iovec.h"
#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 @@
* and spawn threads. * and spawn threads.
***************************************************************************** *****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN * Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: main.c,v 1.108 2001/07/18 14:21:00 massiot Exp $ * $Id: main.c,v 1.109 2001/07/30 00:53:05 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>
...@@ -49,11 +49,13 @@ ...@@ -49,11 +49,13 @@
#endif #endif
#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 )
# include <io.h>
#endif #endif
#include <errno.h> /* ENOMEM */ #include <errno.h> /* ENOMEM */
......
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