replace fpos_t with long since old versions of clang and gcc seem claim
that fpos_t and long are not convertible
This commit is contained in:
parent
31adf248af
commit
8709ada140
|
@ -37,7 +37,7 @@ typedef struct {
|
|||
void *cookie;
|
||||
int (*read)(void *, char *, int);
|
||||
int (*write)(void *, const char *, int);
|
||||
fpos_t (*seek)(void *, fpos_t, int);
|
||||
long (*seek)(void *, long, int);
|
||||
int (*close)(void *);
|
||||
} vtable;
|
||||
} pic_file;
|
||||
|
@ -62,7 +62,7 @@ int pic_setvbuf(pic_file *, char *, int, size_t);
|
|||
int pic_fflush(pic_file *);
|
||||
int pic_ffill(pic_file *);
|
||||
|
||||
pic_file *pic_funopen(void *cookie, int (*read)(void *, char *, int), int (*write)(void *, const char *, int), fpos_t (*seek)(void *, fpos_t, int), int (*close)(void *));
|
||||
pic_file *pic_funopen(void *cookie, int (*read)(void *, char *, int), int (*write)(void *, const char *, int), long (*seek)(void *, long, int), int (*close)(void *));
|
||||
|
||||
/* file access */
|
||||
pic_file *pic_fopen(const char *, const char *);
|
||||
|
|
|
@ -95,7 +95,7 @@ pic_file *
|
|||
pic_funopen(void *cookie,
|
||||
int (*read)(void *, char *, int),
|
||||
int (*write)(void *, const char *, int),
|
||||
fpos_t (*seek)(void *, fpos_t, int),
|
||||
long (*seek)(void *, long, int),
|
||||
int (*close)(void *))
|
||||
{
|
||||
pic_file *file;
|
||||
|
@ -134,10 +134,10 @@ file_write(void *cookie, const char *ptr, int size)
|
|||
return fwrite(ptr, 1, size, (FILE *)cookie);
|
||||
}
|
||||
|
||||
static fpos_t
|
||||
file_seek(void *cookie, fpos_t pos, int whence)
|
||||
static long
|
||||
file_seek(void *cookie, long pos, int whence)
|
||||
{
|
||||
return fseek((FILE *)cookie, (long)pos, whence);
|
||||
return fseek((FILE *)cookie, pos, whence);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
Loading…
Reference in New Issue