Commit 3fba5141 authored by Gildas Bazin's avatar Gildas Bazin

* modules/control/hotkeys.c, rc, modules/demux/mp4, modules/access/mms: portability fixes.

parent 2049498b
...@@ -26,14 +26,17 @@ ...@@ -26,14 +26,17 @@
* Preamble * Preamble
*****************************************************************************/ *****************************************************************************/
#include <stdlib.h> #include <stdlib.h>
#include <sys/time.h> #include <vlc/vlc.h>
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#endif
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>
#include <vlc/vlc.h>
#include <vlc/input.h> #include <vlc/input.h>
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
......
...@@ -313,8 +313,8 @@ static void Run( intf_thread_t *p_intf ) ...@@ -313,8 +313,8 @@ static void Run( intf_thread_t *p_intf )
} }
else if( i_action == ACTIONID_FULLSCREEN && p_vout ) else if( i_action == ACTIONID_FULLSCREEN && p_vout )
{ {
var_Get( p_vout, "fullscreen", &val ); var_Get( p_vout, "fullscreen", &val ); val.b_bool = !val.b_bool;
var_Set( p_vout, "fullscreen", (vlc_value_t)!val.b_bool ); var_Set( p_vout, "fullscreen", val );
} }
else if( i_action == ACTIONID_PLAY ) else if( i_action == ACTIONID_PLAY )
{ {
......
...@@ -1158,7 +1158,7 @@ vlc_bool_t ReadCommand( intf_thread_t *p_intf, char *p_buffer, int *pi_size ) ...@@ -1158,7 +1158,7 @@ vlc_bool_t ReadCommand( intf_thread_t *p_intf, char *p_buffer, int *pi_size )
while( !p_intf->b_die && *pi_size < MAX_LINE_LENGTH && while( !p_intf->b_die && *pi_size < MAX_LINE_LENGTH &&
(i_read = net_ReadNonBlock( p_intf, p_intf->p_sys->i_socket == -1 ? (i_read = net_ReadNonBlock( p_intf, p_intf->p_sys->i_socket == -1 ?
STDIN_FILENO : p_intf->p_sys->i_socket, 0 /*STDIN_FILENO*/ : p_intf->p_sys->i_socket,
p_buffer + *pi_size, 1, INTF_IDLE_SLEEP ) ) > 0 ) p_buffer + *pi_size, 1, INTF_IDLE_SLEEP ) ) > 0 )
{ {
if( p_buffer[ *pi_size ] == '\r' || p_buffer[ *pi_size ] == '\n' ) if( p_buffer[ *pi_size ] == '\r' || p_buffer[ *pi_size ] == '\n' )
......
...@@ -42,6 +42,9 @@ ...@@ -42,6 +42,9 @@
#endif #endif
#ifdef WIN32 #ifdef WIN32
# if !defined( UNDER_CE )
# include <direct.h>
# endif
# include <tchar.h> # include <tchar.h>
# include <shlobj.h> # include <shlobj.h>
# include <windows.h> # include <windows.h>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* drms.h : DRMS * drms.h : DRMS
***************************************************************************** *****************************************************************************
* Copyright (C) 2004 VideoLAN * Copyright (C) 2004 VideoLAN
* $Id: drms.h,v 1.2 2004/01/09 04:37:43 jlj Exp $ * $Id$
* *
* Author: Jon Lech Johansen <jon-vl@nanocrew.net> * Author: Jon Lech Johansen <jon-vl@nanocrew.net>
* *
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* drmstables.h : AES/Rijndael block cipher and miscellaneous tables * drmstables.h : AES/Rijndael block cipher and miscellaneous tables
***************************************************************************** *****************************************************************************
* Copyright (C) 2004 VideoLAN * Copyright (C) 2004 VideoLAN
* $Id: drmstables.h,v 1.3 2004/01/18 01:21:33 sam Exp $ * $Id$
* *
* Author: Jon Lech Johansen <jon-vl@nanocrew.net> * Author: Jon Lech Johansen <jon-vl@nanocrew.net>
* *
......
...@@ -145,7 +145,7 @@ static void MP4_ConvertDate2Str( char *psz, uint64_t i_date ) ...@@ -145,7 +145,7 @@ static void MP4_ConvertDate2Str( char *psz, uint64_t i_date )
int i_sec; int i_sec;
/* date begin at 1 jan 1904 */ /* date begin at 1 jan 1904 */
i_date += ((1904U * 365) + 17) * 24 * 60 * 60; i_date += ((I64C(1904) * 365) + 17) * 24 * 60 * 60;
i_day = i_date / ( 60*60*24); i_day = i_date / ( 60*60*24);
i_hour = ( i_date /( 60*60 ) ) % 60; i_hour = ( i_date /( 60*60 ) ) % 60;
...@@ -1891,14 +1891,13 @@ static void MP4_FreeBox_cmvd( MP4_Box_t *p_box ) ...@@ -1891,14 +1891,13 @@ static void MP4_FreeBox_cmvd( MP4_Box_t *p_box )
static int MP4_ReadBox_cmov( MP4_Stream_t *p_stream, MP4_Box_t *p_box ) static int MP4_ReadBox_cmov( MP4_Stream_t *p_stream, MP4_Box_t *p_box )
{ {
MP4_Stream_t *p_stream_memory;
MP4_Box_t *p_dcom; MP4_Box_t *p_dcom;
MP4_Box_t *p_cmvd; MP4_Box_t *p_cmvd;
#ifdef HAVE_ZLIB_H #ifdef HAVE_ZLIB_H
MP4_Stream_t *p_stream_memory;
z_stream z_data; z_stream z_data;
#endif
uint8_t *p_data; uint8_t *p_data;
#endif
int i_result; int i_result;
......
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