# HG changeset patch # User jcdutton # Date 1074726665 0 # Node ID 8b5edf44e384b88e757fcb2472f857778984f85d # Parent eef7478ffd4552743f0138a92606385f62480e71 Remove all occurances to off64_t and lseek64 It is not needed because we define _FILE_OFFSET_BITS=64. Integrate patch from Derk-Jan Hartman with some minor changes. diff -r eef7478ffd45 -r 8b5edf44e384 vm/vm.c --- a/vm/vm.c Wed Jan 21 22:51:49 2004 +0000 +++ b/vm/vm.c Wed Jan 21 23:11:05 2004 +0000 @@ -44,14 +44,8 @@ #ifdef _MSC_VER #include /* read() */ -#define lseek64 lseek #endif /* _MSC_VER */ -#ifdef __CYGWIN__ -# define off64_t off_t -# define lseek64 lseek -#endif - /* #define STRICT */ @@ -132,22 +126,21 @@ #endif static void dvd_read_name(char *name, const char *device) { + /* Because we are compiling with _FILE_OFFSET_BITS=64 + * all off_t are 64bit. + */ + off_t off; int fd, i; -#if !defined(__FreeBSD__) && !defined(WIN32) - off64_t off; -#else - off_t off; -#endif uint8_t data[DVD_VIDEO_LB_LEN]; /* Read DVD name */ fd = open(device, O_RDONLY | O_EXCL); if (fd > 0) { - off = lseek64( fd, 32 * (int64_t) DVD_VIDEO_LB_LEN, SEEK_SET ); - if( off == ( 32 * (int64_t) DVD_VIDEO_LB_LEN ) ) { + off = lseek( fd, 32 * (off_t) DVD_VIDEO_LB_LEN, SEEK_SET ); + if( off == ( 32 * (off_t) DVD_VIDEO_LB_LEN ) ) { off = read( fd, data, DVD_VIDEO_LB_LEN ); close(fd); - if (off == ( (int64_t) DVD_VIDEO_LB_LEN )) { + if (off == ( (off_t) DVD_VIDEO_LB_LEN )) { fprintf(MSG_OUT, "libdvdnav: DVD Title: "); for(i=25; i < 73; i++ ) { if((data[i] == 0)) break;