Commit f84729fc authored by Gildas Bazin's avatar Gildas Bazin

* A few fixes for the Win32 build.
parent 0cbc9445
This diff is collapsed.
...@@ -30,6 +30,9 @@ AC_PROG_MAKE_SET ...@@ -30,6 +30,9 @@ AC_PROG_MAKE_SET
AC_PROG_CC AC_PROG_CC
AC_PROG_CPP AC_PROG_CPP
dnl Find the right ranlib, even when cross-compiling
AC_CHECK_TOOL(RANLIB, ranlib, :)
dnl Gettext stuff dnl Gettext stuff
ALL_LINGUAS="de fr ru" ALL_LINGUAS="de fr ru"
...@@ -1038,13 +1041,13 @@ then ...@@ -1038,13 +1041,13 @@ then
then then
AC_CHECK_HEADERS(directx.h, AC_CHECK_HEADERS(directx.h,
[ PLUGINS="${PLUGINS} directx" [ PLUGINS="${PLUGINS} directx"
LIB_DIRECTX="-lgdi32 -ldxguid" ]) LIB_DIRECTX="-lgdi32" ])
else else
AC_MSG_CHECKING(for directX headers in ${withval}) AC_MSG_CHECKING(for directX headers in ${withval})
if test -f ${withval}/include/directx.h if test -f ${withval}/include/directx.h
then then
PLUGINS="${PLUGINS} directx" PLUGINS="${PLUGINS} directx"
LIB_DIRECTX="-L${withval}/lib -lgdi32 -ldxguid" LIB_DIRECTX="-L${withval}/lib -lgdi32"
INCLUDE="${INCLUDE} -I${withval}/include" INCLUDE="${INCLUDE} -I${withval}/include"
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
else else
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* ioctl.c: DVD ioctl replacement function * ioctl.c: DVD ioctl replacement function
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: ioctl.c,v 1.19 2001/12/30 07:09:54 sam Exp $ * $Id: ioctl.c,v 1.20 2002/01/13 18:13:07 gbazin Exp $
* *
* Authors: Markus Kuespert <ltlBeBoy@beosmail.com> * Authors: Markus Kuespert <ltlBeBoy@beosmail.com>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -531,8 +531,7 @@ int ioctl_ReadTitleKey( int i_fd, int *pi_agid, int i_pos, u8 *p_key ) ...@@ -531,8 +531,7 @@ int ioctl_ReadTitleKey( int i_fd, int *pi_agid, int i_pos, u8 *p_key )
key->SessionId = *pi_agid; key->SessionId = *pi_agid;
key->KeyType = DvdTitleKey; key->KeyType = DvdTitleKey;
key->KeyFlags = 0; key->KeyFlags = 0;
#warning "Fix ReadTitleKey for WIN32!" key->Parameters.TitleOffset.QuadPart = i_pos;
//key->Parameters.TitleOffset = i_pos; // is this ok?
i_ret = DeviceIoControl( (HANDLE) i_fd, IOCTL_DVD_READ_KEY, key, i_ret = DeviceIoControl( (HANDLE) i_fd, IOCTL_DVD_READ_KEY, key,
key->KeyLength, key, key->KeyLength, &tmp, NULL ) ? 0 : -1; key->KeyLength, key, key->KeyLength, &tmp, NULL ) ? 0 : -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.67 2002/01/09 02:01:14 sam Exp $ * $Id: common.h,v 1.68 2002/01/13 18:13:07 gbazin 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>
...@@ -286,6 +286,7 @@ struct probedata_s; ...@@ -286,6 +286,7 @@ struct probedata_s;
* byte orders other than little and big endians are not supported, but only * byte orders other than little and big endians are not supported, but only
* the VAX seems to have such exotic properties - note that these 'functions' * the VAX seems to have such exotic properties - note that these 'functions'
* needs <netinet/in.h> or the local equivalent. */ * needs <netinet/in.h> or the local equivalent. */
#if !defined( WIN32 )
#if WORDS_BIGENDIAN #if WORDS_BIGENDIAN
# define hton16 htons # define hton16 htons
# define hton32 htonl # define hton32 htonl
...@@ -306,6 +307,7 @@ struct probedata_s; ...@@ -306,6 +307,7 @@ struct probedata_s;
# define ntoh32 ntohl # define ntoh32 ntohl
# define ntoh64 hton64 # define ntoh64 hton64
#endif #endif
#endif /* !defined( WIN32 ) */
/* Macros with automatic casts */ /* Macros with automatic casts */
#define U64_AT(p) ( ntoh64 ( *( (u64 *)(p) ) ) ) #define U64_AT(p) ( ntoh64 ( *( (u64 *)(p) ) ) )
...@@ -343,13 +345,6 @@ struct probedata_s; ...@@ -343,13 +345,6 @@ struct probedata_s;
* ourselves. ( several plugins use them and it is too much hassle to link * ourselves. ( several plugins use them and it is too much hassle to link
* winsock with each of them ;-) * winsock with each of them ;-)
*/ */
# undef ntoh32(x)
# undef ntoh16(x)
# undef ntoh64(x)
# undef hton32(x)
# undef hton16(x)
# undef hton64(x)
# ifdef WORDS_BIGENDIAN # ifdef WORDS_BIGENDIAN
# define ntoh32(x) (x) # define ntoh32(x) (x)
# define ntoh16(x) (x) # define ntoh16(x) (x)
...@@ -363,7 +358,7 @@ struct probedata_s; ...@@ -363,7 +358,7 @@ struct probedata_s;
# define ntoh64(x) __bswap_32 (x) # define ntoh64(x) __bswap_32 (x)
# define hton32(x) __bswap_32 (x) # define hton32(x) __bswap_32 (x)
# define hton16(x) __bswap_16 (x) # define hton16(x) __bswap_16 (x)
# define hton64(x) __bswap_32 (x) # define hton64(x) __bswap_64 (x)
# endif # endif
/* win32, cl and icl support */ /* win32, cl and icl support */
...@@ -401,6 +396,10 @@ typedef __int64 off_t; ...@@ -401,6 +396,10 @@ typedef __int64 off_t;
# define stat _stati64 # define stat _stati64
# endif # endif
# ifndef O_NONBLOCK
# define O_NONBLOCK 0
# endif
# ifndef snprintf # ifndef snprintf
# define snprintf _snprintf /* snprintf not defined in mingw32 (bug?) */ # define snprintf _snprintf /* snprintf not defined in mingw32 (bug?) */
# endif # endif
......
...@@ -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.54 2001/12/30 07:09:56 sam Exp $ * $Id: netutils.c,v 1.55 2002/01/13 18:13:07 gbazin 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>
...@@ -67,6 +67,7 @@ ...@@ -67,6 +67,7 @@
#if defined( WIN32 ) /* tools to get the MAC adress from */ #if defined( WIN32 ) /* tools to get the MAC adress from */
#include <windows.h> /* the interface under Windows */ #include <windows.h> /* the interface under Windows */
#include <stdio.h> #include <stdio.h>
#include <nb30.h>
#endif #endif
#ifdef HAVE_NET_IF_H #ifdef HAVE_NET_IF_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