fix build for big-endian targets

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13638 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Marcoen Hirschberg 2007-06-16 18:40:07 +00:00
parent 2175d1edf6
commit e097b5fd62
2 changed files with 5 additions and 3 deletions

View file

@ -95,9 +95,7 @@ long read_string(int fd, char* buf, long buf_size, int eos, long size)
}
/* Read an unsigned 32-bit integer from a big-endian file. */
#ifdef ROCKBOX_BIG_ENDIAN
#define read_uint32be(fd,buf) read((fd), (buf), 4)
#else
#ifdef ROCKBOX_LITTLE_ENDIAN
int read_uint32be(int fd, unsigned int* buf)
{
size_t n;

View file

@ -35,7 +35,11 @@ bool read_vorbis_tags(int fd, struct mp3entry *id3,
bool skip_id3v2(int fd, struct mp3entry *id3);
long read_string(int fd, char* buf, long buf_size, int eos, long size);
#ifdef ROCKBOX_BIG_ENDIAN
#define read_uint32be(fd,buf) read((fd), (buf), 4)
#else
int read_uint32be(int fd, unsigned int* buf);
#endif
unsigned long get_long_le(void* buf);
unsigned short get_short_le(void* buf);
unsigned long get_long_be(void* buf);