Commit 171d858e authored by Gildas Bazin's avatar Gildas Bazin

* ALL: another bunch of fixes for the MSVC build.
parent 7211d64e
......@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: vlc_common.h,v 1.55 2003/02/28 04:31:24 ipkiss Exp $
* $Id: vlc_common.h,v 1.56 2003/03/03 16:49:14 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
......@@ -610,8 +610,17 @@ typedef __int64 off_t;
# define off_t unsigned __int64
# endif
# ifdef lseek
# undef lseek
# define lseek _lseeki64
# endif
# ifndef O_NONBLOCK
# define O_NONBLOCK 0
# endif
# ifndef alloca
# define alloca _alloca
# endif
/* These two are not defined in mingw32 (bug?) */
......
......@@ -2,7 +2,7 @@
* dec_dummy.c: dummy decoder plugin for vlc.
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: decoder.c,v 1.4 2002/11/18 18:05:13 sam Exp $
* $Id: decoder.c,v 1.5 2003/03/03 16:49:14 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -29,6 +29,8 @@
#ifdef HAVE_UNISTD_H
# include <unistd.h> /* write(), close() */
#elif defined( WIN32 ) && !defined( UNDER_CE )
# include <io.h>
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h> /* open() */
......
......@@ -49,8 +49,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib netapi32.lib winmm.lib /nologo /subsystem:console /machine:I386
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /entry:mainCRTStartup
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib netapi32.lib winmm.lib /nologo /subsystem:windows /machine:I386 /entry:mainCRTStartup
!ELSEIF "$(CFG)" == "vlc - Win32 Debug"
......@@ -73,8 +73,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib netapi32.lib winmm.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept /entry:mainCRTStartup
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib netapi32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept /entry:mainCRTStartup
# SUBTRACT LINK32 /pdb:none
!ENDIF
......
......@@ -2,7 +2,7 @@
* modules.c : Builtin and plugin modules management functions
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: modules.c,v 1.114 2003/02/18 22:40:39 ipkiss Exp $
* $Id: modules.c,v 1.115 2003/03/03 16:49:14 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Ethan C. Baldridge <BaldridgeE@cadmus.com>
......@@ -565,7 +565,7 @@ static void AllocateAllPlugins( vlc_object_t *p_this )
path[ sizeof(path)/sizeof(char*) - 2 ] = config_GetPsz( p_this,
"plugin-path" );
#if defined( WIN32 ) && !defined( UNDER_CE )
#if defined( WIN32 ) && !defined( UNDER_CE ) && !defined( _MSC_VER )
/* If there is no 'plugins' nor 'modules' subdirectory, the user may have
* screwed up the unzipping stage, so we look into '.' instead */
if( !opendir( "plugins" ) && !opendir( "modules" )
......@@ -642,8 +642,12 @@ static void AllocateAllPlugins( vlc_object_t *p_this )
static void AllocatePluginDir( vlc_object_t *p_this, const MYCHAR *psz_dir,
int i_maxdepth )
{
#if defined( UNDER_CE ) || defined( _MSC_VER )
#ifdef UNDER_CE
MYCHAR psz_path[MAX_PATH + 256];
#else
char psz_path[MAX_PATH + 256];
#endif
WIN32_FIND_DATA finddata;
HANDLE handle;
unsigned int rc;
......@@ -659,7 +663,7 @@ static void AllocatePluginDir( vlc_object_t *p_this, const MYCHAR *psz_dir,
return;
}
#ifdef UNDER_CE
#if defined( UNDER_CE ) || defined( _MSC_VER )
rc = GetFileAttributes( psz_dir );
if( !(rc & FILE_ATTRIBUTE_DIRECTORY) )
{
......@@ -668,7 +672,11 @@ static void AllocatePluginDir( vlc_object_t *p_this, const MYCHAR *psz_dir,
}
/* Parse all files in the directory */
#ifdef UNDER_CE
swprintf( psz_path, L"%s\\*.*", psz_dir );
#else
sprintf( psz_path, "%s\\*.*", psz_dir );
#endif
handle = FindFirstFile( psz_path, &finddata );
if( handle == INVALID_HANDLE_VALUE )
{
......@@ -679,15 +687,33 @@ static void AllocatePluginDir( vlc_object_t *p_this, const MYCHAR *psz_dir,
/* Parse the directory and try to load all files it contains. */
do
{
#ifdef UNDER_CE
unsigned int i_len = wcslen( finddata.cFileName );
swprintf( psz_path, L"%s\\%s", psz_dir, finddata.cFileName );
#else
unsigned int i_len = strlen( finddata.cFileName );
/* Skip ".", ".." and anything starting with "." */
if( !*finddata.cFileName || *finddata.cFileName == '.' )
{
if( !FindNextFile( handle, &finddata ) ) break;
continue;
}
sprintf( psz_path, "%s\\%s", psz_dir, finddata.cFileName );
#endif
if( GetFileAttributes( psz_path ) & FILE_ATTRIBUTE_DIRECTORY )
{
AllocatePluginDir( p_this, psz_path, i_maxdepth - 1 );
}
else if( i_len > strlen( LIBEXT ) )
else if( i_len > strlen( LIBEXT )
#ifdef UNDER_CE
)
#else
/* We only load files ending with LIBEXT */
&& !strncasecmp( psz_path + strlen( psz_path)
- strlen( LIBEXT ),
LIBEXT, strlen( LIBEXT ) ) )
#endif
{
AllocatePluginFile( p_this, psz_path );
}
......
#! /bin/sh
## toolbox for the VLC media player
## $Id: toolbox,v 1.10 2003/03/01 19:25:13 gbazin Exp $
## $Id: toolbox,v 1.11 2003/03/03 16:49:14 gbazin Exp $
##
## Authors: Samuel Hocevar <sam@zoy.org>
......@@ -118,7 +118,7 @@ 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}
# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\\".\\" /D DATA_PATH=\\"share\\"${M}
# End Source File${M}
EOF
done
......@@ -134,7 +134,7 @@ EOF
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}
# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\\".\\" /D DATA_PATH=\\"share\\"${M}
!IF "\$(CFG)" == "libvlc - Win32 (WCE MIPS) Release"${M}
# PROP Output_Dir "MIPSRel\\${subdir}"${M}
# PROP Intermediate_Dir "MIPSRel\\${subdir}"${M}
......@@ -172,7 +172,7 @@ EOF
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}
# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\\".\\" /D DATA_PATH=\\"share\\"${M}
!IF "\$(CFG)" == "libvlc - Win32 Release"${M}
# PROP Output_Dir "Release\\${subdir}"${M}
# PROP Intermediate_Dir "Release\\${subdir}"${M}
......
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