Commit d0102803 authored by Geoffroy Couprie's avatar Geoffroy Couprie

WinCE: more missing functions fixes

parent 07faebaf
......@@ -281,4 +281,12 @@ typedef void *locale_t;
#define N_(str) gettext_noop (str)
#define gettext_noop(str) (str)
#ifdef UNDER_CE
static inline void rewind ( FILE *stream )
{
fseek(stream, 0L, SEEK_SET);
clearerr(stream);
}
#endif
#endif /* !LIBVLC_FIXUPS_H */
......@@ -35,7 +35,7 @@
*/
#if defined( UNDER_CE )
/* WinCE API */
# include <errno.h> /* WinCE API */
#elif defined( WIN32 )
# include <process.h> /* Win32 API */
# include <errno.h>
......
......@@ -82,6 +82,9 @@ static const char *GetDir( bool b_appdata, bool b_common_appdata )
wchar_t wdir[MAX_PATH];
# if defined (UNDER_CE)
/*There are some errors in cegcc headers*/
#undef SHGetSpecialFolderPath
BOOL WINAPI SHGetSpecialFolderPath(HWND,LPWSTR,int,BOOL);
if( SHGetSpecialFolderPath( NULL, wdir, CSIDL_APPDATA, 1 ) )
# else
/* Get the "Application Data" folder for the current user */
......
......@@ -258,7 +258,11 @@ void *vlc_wopendir( const wchar_t *wpath )
if( !p_dir )
return NULL;
p_dir->p_real_dir = NULL;
# if defined(UNDER_CE)
p_dir->i_drives = NULL;
# elif
p_dir->i_drives = GetLogicalDrives();
#endif
return (void *)p_dir;
}
......@@ -303,6 +307,10 @@ struct _wdirent *vlc_wreaddir( void *_p_dir )
/* Drive letters mode */
i_drives = p_dir->i_drives;
#ifdef UNDER_CE
swprintf( p_dir->dd_dir.d_name, L"\\");
p_dir->dd_dir.d_namlen = wcslen(p_dir->dd_dir.d_name);
#else
if ( !i_drives )
return NULL; /* end */
......@@ -315,6 +323,7 @@ struct _wdirent *vlc_wreaddir( void *_p_dir )
swprintf( p_dir->dd_dir.d_name, L"%c:\\", 'A' + i );
p_dir->dd_dir.d_namlen = wcslen(p_dir->dd_dir.d_name);
p_dir->i_drives &= ~(1UL << i);
#endif
return &p_dir->dd_dir;
}
......
......@@ -2060,7 +2060,7 @@ static int ConsoleWidth( void )
i_width = 80;
pclose( file );
}
#else
#elif !defined (UNDER_CE)
CONSOLE_SCREEN_BUFFER_INFO buf;
if (GetConsoleScreenBufferInfo (GetStdHandle (STD_OUTPUT_HANDLE), &buf))
......
......@@ -243,6 +243,10 @@ block_t *block_mmap_Alloc (void *addr, size_t length)
#ifdef WIN32
#ifdef UNDER_CE
#define _get_osfhandle(a) ((long) (a))
#endif
static
ssize_t pread (int fd, void *buf, size_t count, off_t offset)
{
......
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