summaryrefslogtreecommitdiff
path: root/src/input/libdvdnav/dvd_reader.c
diff options
context:
space:
mode:
authorMichael Roitzsch <mroi@users.sourceforge.net>2004-03-16 11:43:38 +0000
committerMichael Roitzsch <mroi@users.sourceforge.net>2004-03-16 11:43:38 +0000
commit50a26e7dabcb36c002f8527c8364c67439adbb11 (patch)
treed79ee798b6681d0fc8e8a3c93c845d34cfdb92e4 /src/input/libdvdnav/dvd_reader.c
parentb323267b7a8f5592c66158376a1ce25e2bdfefd5 (diff)
downloadxine-lib-50a26e7dabcb36c002f8527c8364c67439adbb11.tar.gz
xine-lib-50a26e7dabcb36c002f8527c8364c67439adbb11.tar.bz2
sync to latest libdvdnav
* fixes a menu problem (German RC2 of "Anatomie", chapter menu) * addresses some compilation problems on Windows (Could someone try cygwin, mingw builds, please? It should work with the standalone libdvdnav, but who knows if the integration breaks anything...) * turns some abort()s into assert(0)s, where we really can try to continue CVS patchset: 6269 CVS date: 2004/03/16 11:43:38
Diffstat (limited to 'src/input/libdvdnav/dvd_reader.c')
-rw-r--r--src/input/libdvdnav/dvd_reader.c25
1 files changed, 20 insertions, 5 deletions
diff --git a/src/input/libdvdnav/dvd_reader.c b/src/input/libdvdnav/dvd_reader.c
index b173a130e..185143604 100644
--- a/src/input/libdvdnav/dvd_reader.c
+++ b/src/input/libdvdnav/dvd_reader.c
@@ -31,6 +31,22 @@
#include <unistd.h>
#include <limits.h>
#include <dirent.h>
+
+/* misc win32 helpers */
+#ifdef WIN32
+/* replacement gettimeofday implementation */
+#include <sys/timeb.h>
+static inline int gettimeofday( struct timeval *tv, void *tz )
+{
+ struct timeb t;
+ ftime( &t );
+ tv->tv_sec = t.time;
+ tv->tv_usec = t.millitm * 1000;
+ return 0;
+}
+#include <io.h> /* read() */
+#define lseek64 _lseeki64
+#endif
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__bsdi__)|| defined(__DARWIN__)
#define SYS_BSD 1
@@ -52,10 +68,6 @@
#define DEFAULT_UDF_CACHE_LEVEL 1
-#ifdef _MSC_VER
-#define fchdir chdir
-#endif
-
struct dvd_reader_s {
/* Basic information. */
int isImageFile;
@@ -387,6 +399,9 @@ dvd_reader_t *DVDOpen( const char *ppath )
return 0;
}
+#ifndef WIN32 /* don't have fchdir, and getcwd( NULL, ... ) is strange */
+ /* Also WIN32 does not have symlinks, so we don't need this bit of code. */
+
/* Resolve any symlinks and get the absolut dir name. */
{
char *new_path;
@@ -403,7 +418,7 @@ dvd_reader_t *DVDOpen( const char *ppath )
}
}
}
-
+#endif
/**
* If we're being asked to open a directory, check if that directory
* is the mountpoint for a DVD-ROM which we can use instead.