# include <linux/magic.h>
#endif
-#if defined( WIN32 )
+#if defined( _WIN32 )
# include <io.h>
# include <ctype.h>
# include <shlwapi.h>
#include <vlc_input.h>
#include <vlc_access.h>
#include <vlc_dialog.h>
-#ifdef WIN32
+#ifdef _WIN32
# include <vlc_charset.h>
#endif
#include <vlc_fs.h>
struct access_sys_t
{
- unsigned int i_nb_reads;
-
int fd;
/* */
bool b_pace_control;
};
-#if !defined (WIN32) && !defined (__OS2__)
+#if !defined (_WIN32) && !defined (__OS2__)
static bool IsRemote (int fd)
{
#if defined (HAVE_FSTATVFS) && defined (MNT_LOCAL)
}
# define IsRemote(fd,path) IsRemote(fd)
-#else /* WIN32 || __OS2__ */
+#else /* _WIN32 || __OS2__ */
static bool IsRemote (const char *path)
{
-# if !defined(__OS2__)
+# if !defined(__OS2__) && !VLC_WINSTORE_APP
wchar_t *wpath = ToWide (path);
bool is_remote = (wpath != NULL && PathIsNetworkPathW (wpath));
free (wpath);
p_access->pf_block = NULL;
p_access->pf_control = FileControl;
p_access->p_sys = p_sys;
- p_sys->i_nb_reads = 0;
p_sys->fd = fd;
if (S_ISREG (st.st_mode) || S_ISBLK (st.st_mode))
p_access->info.i_pos += val;
p_access->info.b_eof = !val;
-
- p_sys->i_nb_reads++;
-
- if (!(p_sys->i_nb_reads % INPUT_FSTAT_NB_READS)
- || (p_access->info.i_pos > p_access->info.i_size))
+ if (p_access->info.i_pos >= p_access->info.i_size)
{
struct stat st;
access_sys_t *p_sys = p_access->p_sys;
int fd = p_sys->fd;
-#if !defined (WIN32) && !defined (__OS2__)
+#if !defined (_WIN32) && !defined (__OS2__)
ssize_t val = net_Read (p_access, fd, NULL, p_buffer, i_len, false);
#else
ssize_t val = read (fd, p_buffer, i_len);