VLC_API int vlc_rename( const char *oldpath, const char *newpath );
VLC_API char *vlc_getcwd( void ) VLC_USED;
-#if defined( WIN32 )
+#if defined( _WIN32 )
static inline int vlc_closedir( DIR *dir )
{
_WDIR *wdir = *(_WDIR **)dir;
# define rewinddir vlc_rewinddir
# include <sys/stat.h>
-# ifndef UNDER_CE
-# ifndef stat
-# define stat _stati64
-# endif
+# ifndef stat
+# define stat _stati64
# endif
+# ifndef fstat
+# define fstat _fstati64
+# endif
+# ifndef _MSC_VER
+# undef lseek
+# define lseek _lseeki64
+# endif
+#endif
+
+#ifdef __ANDROID__
+# define lseek lseek64
#endif
struct stat;