Commit 618d5b81 authored by Steve Lhomme's avatar Steve Lhomme
Browse files

* libdvdcss: MSVC7 compilation fixes (shouldn't break mingw32)

parent fb0405cc
......@@ -46,11 +46,11 @@
#if defined( WIN32 )
#ifndef PATH_MAX
# define PATH_MAX MAX_PATH
#endif
# ifndef PATH_MAX
# define PATH_MAX MAX_PATH
# endif
#define lseek _lseeki64
# define lseek64 _lseeki64
/* several type definitions */
# if defined( __MINGW32__ )
......@@ -77,5 +77,9 @@ typedef __int64 off_t;
# define snprintf _snprintf /* snprintf not defined in mingw32 (bug?) */
# endif
#else
# define lseek64 lseek
#endif
......@@ -318,8 +318,8 @@ typedef struct _SCSI_PASS_THROUGH_DIRECT
* win32 aspi specific
*****************************************************************************/
typedef WINAPI DWORD (*GETASPI32SUPPORTINFO)(VOID);
typedef WINAPI DWORD (*SENDASPI32COMMAND)(LPVOID);
typedef DWORD (CALLBACK *GETASPI32SUPPORTINFO)(VOID);
typedef DWORD (CALLBACK *SENDASPI32COMMAND)(LPVOID);
#define WIN2K ( GetVersion() < 0x80000000 )
#define ASPI_HAID 0
......
......@@ -78,6 +78,19 @@ struct dvdcss_s
* Functions used across the library
*****************************************************************************/
#define print_error(dvdcss,msg) _print_error(dvdcss,msg)
#if defined( _MSC_VER )
#include <stdarg.h>
__forceinline void print_debug(dvdcss_t dvdcss, const char *msg,...)
{
va_list args;
fprintf( stderr, "libdvdcss debug: " );
va_start( args, msg );
vfprintf( stderr, msg, args );
va_end( args );
fprintf( stderr, "\n" );
}
#else
#define print_debug(dvdcss,msg,args...) \
if( dvdcss->b_debug ) \
{ \
......@@ -85,6 +98,7 @@ struct dvdcss_s
fprintf( stderr, msg, ##args ); \
fprintf( stderr, "\n" ); \
}
#endif
void _print_error ( dvdcss_t, char * );
Supports Markdown
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