diff options
author | Rocky Bernstein <rockyb@users.sourceforge.net> | 2004-02-19 02:50:24 +0000 |
---|---|---|
committer | Rocky Bernstein <rockyb@users.sourceforge.net> | 2004-02-19 02:50:24 +0000 |
commit | 5cb036aff44c2ff274ec38b28382245c5f695689 (patch) | |
tree | b55f5f42c0cf359faddca2c2724bd41e626f8cdf /src/input | |
parent | 8aec8d2b5344d4f748755cfb328fd811a8bfc526 (diff) | |
download | xine-lib-5cb036aff44c2ff274ec38b28382245c5f695689.tar.gz xine-lib-5cb036aff44c2ff274ec38b28382245c5f695689.tar.bz2 |
Mandrake patches from
http://cvs.mandrakesoft.com/cgi-bin/cvsweb.cgi/SPECS/xine-lib/
via Goetz Waschk who reports:
The amd64 patch (xine-lib-1-rc0a-amd64.patch) sets some conservative
CFLAGS for amd64,
the lib64 patch (xine-lib-1-rc0a-lib64.patch) replaces hardcoded
/lib to support the lib64 library dir on amd64,
the directfb patch (xine-lib-1-rc2-no-directfb.patch) adds a
configure option to disable directfb,
the linuxfb patch (xine-lib-1-rc3a-no-linuxfb.patch) does the same
for linux framebuffer and
the 64bit fixes patch (xine-lib-1-rc3-64bit-fixes.patch) doesn't
apply at the moment against the CVS -- demux_ogg.c was not applied.
it includes some 64 bit pointer and other fixes for 64bit architectures.
from Gwenole Beauchesne
I haven't tested other than apply and compile.
CVS patchset: 6174
CVS date: 2004/02/19 02:50:24
Diffstat (limited to 'src/input')
-rw-r--r-- | src/input/libdvdnav/dvd_reader.c | 10 | ||||
-rw-r--r-- | src/input/libdvdnav/dvd_udf.c | 14 | ||||
-rw-r--r-- | src/input/libdvdnav/read_cache.c | 6 |
3 files changed, 15 insertions, 15 deletions
diff --git a/src/input/libdvdnav/dvd_reader.c b/src/input/libdvdnav/dvd_reader.c index a96801c9d..b173a130e 100644 --- a/src/input/libdvdnav/dvd_reader.c +++ b/src/input/libdvdnav/dvd_reader.c @@ -1020,7 +1020,7 @@ ssize_t DVDReadBytes( dvd_file_t *dvd_file, void *data, size_t byte_size ) ( ( ( seek_byte + byte_size ) % DVD_VIDEO_LB_LEN ) ? 1 : 0 ); secbuf_base = (unsigned char *) malloc( numsec * DVD_VIDEO_LB_LEN + 2048 ); - secbuf = (unsigned char *)(((uintptr_t)secbuf_base & ~2047) + 2048); + secbuf = (unsigned char *)(((uintptr_t)secbuf_base & ~((uintptr_t)2047)) + 2048); if( !secbuf_base ) { fprintf( stderr, "libdvdread: Can't allocate memory " "for file read!\n" ); @@ -1074,7 +1074,7 @@ int DVDDiscID( dvd_reader_t *dvd, unsigned char *discid ) ssize_t bytes_read; size_t file_size = dvd_file->filesize * DVD_VIDEO_LB_LEN; char *buffer_base = malloc( file_size + 2048 ); - char *buffer = (unsigned char *)(((uintptr_t)buffer_base & ~2047) + 2048); + char *buffer = (unsigned char *)(((uintptr_t)buffer_base & ~((uintptr_t)2047)) + 2048); if( buffer_base == NULL ) { fprintf( stderr, "libdvdread: DVDDiscId, failed to " @@ -1083,8 +1083,8 @@ int DVDDiscID( dvd_reader_t *dvd, unsigned char *discid ) } bytes_read = DVDReadBytes( dvd_file, buffer, file_size ); if( bytes_read != file_size ) { - fprintf( stderr, "libdvdread: DVDDiscId read returned %d bytes" - ", wanted %d\n", bytes_read, file_size ); + fprintf( stderr, "libdvdread: DVDDiscId read returned %zd bytes" + ", wanted %zd\n", bytes_read, file_size ); DVDCloseFile( dvd_file ); free( buffer_base ); return -1; @@ -1119,7 +1119,7 @@ int DVDISOVolumeInfo( dvd_reader_t *dvd, } buffer_base = malloc( DVD_VIDEO_LB_LEN + 2048 ); - buffer = (unsigned char *)(((uintptr_t)buffer_base & ~2047) + 2048); + buffer = (unsigned char *)(((uintptr_t)buffer_base & ~((uintptr_t)2047)) + 2048); if( buffer_base == NULL ) { fprintf( stderr, "libdvdread: DVDISOVolumeInfo, failed to " diff --git a/src/input/libdvdnav/dvd_udf.c b/src/input/libdvdnav/dvd_udf.c index d7adac891..8932bfcb9 100644 --- a/src/input/libdvdnav/dvd_udf.c +++ b/src/input/libdvdnav/dvd_udf.c @@ -489,7 +489,7 @@ static int UDFMapICB( dvd_reader_t *device, struct AD ICB, uint8_t *FileType, struct Partition *partition, struct AD *File ) { uint8_t LogBlock_base[DVD_VIDEO_LB_LEN + 2048]; - uint8_t *LogBlock = (uint8_t *)(((uintptr_t)LogBlock_base & ~2047) + 2048); + uint8_t *LogBlock = (uint8_t *)(((uintptr_t)LogBlock_base & ~((uintptr_t)2047)) + 2048); uint32_t lbnum; uint16_t TagID; struct icbmap tmpmap; @@ -534,7 +534,7 @@ static int UDFScanDir( dvd_reader_t *device, struct AD Dir, char *FileName, { char filename[ MAX_UDF_FILE_NAME_LEN ]; uint8_t directory_base[ 2 * DVD_VIDEO_LB_LEN + 2048]; - uint8_t *directory = (uint8_t *)(((uintptr_t)directory_base & ~2047) + 2048); + uint8_t *directory = (uint8_t *)(((uintptr_t)directory_base & ~((uintptr_t)2047)) + 2048); uint32_t lbnum; uint16_t TagID; uint8_t filechar; @@ -556,7 +556,7 @@ static int UDFScanDir( dvd_reader_t *device, struct AD Dir, char *FileName, if((cached_dir_base = malloc(dir_lba * DVD_VIDEO_LB_LEN + 2048)) == NULL) { return 0; } - cached_dir = (uint8_t *)(((uintptr_t)cached_dir_base & ~2047) + 2048); + cached_dir = (uint8_t *)(((uintptr_t)cached_dir_base & ~((uintptr_t)2047)) + 2048); if( DVDReadLBUDF( device, lbnum, dir_lba, cached_dir, 0) <= 0 ) { free(cached_dir_base); cached_dir = NULL; @@ -647,7 +647,7 @@ static int UDFGetAVDP( dvd_reader_t *device, struct avdp_t *avdp) { uint8_t Anchor_base[ DVD_VIDEO_LB_LEN + 2048 ]; - uint8_t *Anchor = (uint8_t *)(((uintptr_t)Anchor_base & ~2047) + 2048); + uint8_t *Anchor = (uint8_t *)(((uintptr_t)Anchor_base & ~((uintptr_t)2047)) + 2048); uint32_t lbnum, MVDS_location, MVDS_length; uint16_t TagID; uint32_t lastsector; @@ -719,7 +719,7 @@ static int UDFFindPartition( dvd_reader_t *device, int partnum, struct Partition *part ) { uint8_t LogBlock_base[ DVD_VIDEO_LB_LEN + 2048 ]; - uint8_t *LogBlock = (uint8_t *)(((uintptr_t)LogBlock_base & ~2047) + 2048); + uint8_t *LogBlock = (uint8_t *)(((uintptr_t)LogBlock_base & ~((uintptr_t)2047)) + 2048); uint32_t lbnum, MVDS_location, MVDS_length; uint16_t TagID; int i, volvalid; @@ -782,7 +782,7 @@ uint32_t UDFFindFile( dvd_reader_t *device, char *filename, uint32_t *filesize ) { uint8_t LogBlock_base[ DVD_VIDEO_LB_LEN + 2048 ]; - uint8_t *LogBlock = (uint8_t *)(((uintptr_t)LogBlock_base & ~2047) + 2048); + uint8_t *LogBlock = (uint8_t *)(((uintptr_t)LogBlock_base & ~((uintptr_t)2047)) + 2048); uint32_t lbnum; uint16_t TagID; struct Partition partition; @@ -927,7 +927,7 @@ static int UDFGetDescriptor( dvd_reader_t *device, int id, static int UDFGetPVD(dvd_reader_t *device, struct pvd_t *pvd) { uint8_t pvd_buf_base[DVD_VIDEO_LB_LEN + 2048]; - uint8_t *pvd_buf = (uint8_t *)(((uintptr_t)pvd_buf_base & ~2047) + 2048); + uint8_t *pvd_buf = (uint8_t *)(((uintptr_t)pvd_buf_base & ~((uintptr_t)2047)) + 2048); if(GetUDFCache(device, PVDCache, 0, pvd)) { return 1; diff --git a/src/input/libdvdnav/read_cache.c b/src/input/libdvdnav/read_cache.c index 70685e2bd..c17e38634 100644 --- a/src/input/libdvdnav/read_cache.c +++ b/src/input/libdvdnav/read_cache.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: read_cache.c,v 1.10 2003/08/25 14:32:37 mroi Exp $ + * $Id: read_cache.c,v 1.11 2004/02/19 02:50:25 rockyb Exp $ * */ @@ -448,7 +448,7 @@ void dvdnav_pre_cache_blocks(read_cache_t *self, int sector, size_t block_count) self->chunk[use].cache_buffer_base = realloc(self->chunk[use].cache_buffer_base, block_count * DVD_VIDEO_LB_LEN + ALIGNMENT); self->chunk[use].cache_buffer = - (uint8_t *)(((uintptr_t)self->chunk[use].cache_buffer_base & ~(ALIGNMENT - 1)) + ALIGNMENT); + (uint8_t *)(((uintptr_t)self->chunk[use].cache_buffer_base & ~((uintptr_t)(ALIGNMENT - 1))) + ALIGNMENT); dprintf("pre_cache DVD read realloc happened\n"); self->chunk[use].cache_malloc_size = block_count; } else { @@ -466,7 +466,7 @@ void dvdnav_pre_cache_blocks(read_cache_t *self, int sector, size_t block_count) self->chunk[i].cache_buffer_base = malloc((block_count > 500 ? block_count : 500) * DVD_VIDEO_LB_LEN + ALIGNMENT); self->chunk[i].cache_buffer = - (uint8_t *)(((uintptr_t)self->chunk[i].cache_buffer_base & ~(ALIGNMENT - 1)) + ALIGNMENT); + (uint8_t *)(((uintptr_t)self->chunk[i].cache_buffer_base & ~((uintptr_t)(ALIGNMENT - 1))) + ALIGNMENT); self->chunk[i].cache_malloc_size = block_count > 500 ? block_count : 500; dprintf("pre_cache DVD read malloc %d blocks\n", (block_count > 500 ? block_count : 500 )); |