Commit f6431603 authored by Arturo Espinosa's avatar Arturo Espinosa
Browse files

Proper prototypes and typecasts for 64-bit archs, from Tim Mooney

parent adcb3171
......@@ -100,7 +100,7 @@ open3_wrap (const char *pathname, int flags, mode_t mode)
return open (pathname, flags, mode);
}
static size_t
static ssize_t
read_wrap (int fd, void *buf, size_t count)
{
return read (fd, buf, count);
......@@ -118,7 +118,7 @@ fstat_wrap (int filedes, struct stat *buf)
return fstat (filedes, buf);
}
static int
static ssize_t
write_wrap (int fd, const void *buf, size_t count)
{
return write (fd, buf, count);
......@@ -1437,7 +1437,7 @@ ms_ole_open_vfs (MsOle **f, const char *name, gboolean try_mmap,
(*f)->ole_mmap = TRUE;
(*f)->mem = mmap (0, (*f)->length, prot, MAP_SHARED, file, 0);
if (!(*f)->mem || (*f)->mem == MAP_FAILED) {
if (!(*f)->mem || (caddr_t)(*f)->mem == (caddr_t)MAP_FAILED) {
g_warning ("I can't mmap that file, falling back to slower method");
(*f)->ole_mmap = FALSE;
(*f)->mem = g_new (guint8, BB_BLOCK_SIZE);
......@@ -1546,7 +1546,7 @@ ms_ole_create_vfs (MsOle **f, const char *name, gboolean try_mmap,
(*f)->ole_mmap = TRUE;
(*f)->mem = mmap (0, (*f)->length, PROT_READ|PROT_WRITE,
MAP_SHARED, file, 0);
if (!(*f)->mem || (*f)->mem == MAP_FAILED) {
if (!(*f)->mem || (caddr_t)(*f)->mem == (caddr_t)MAP_FAILED) {
g_warning ("I can't mmap that file, falling back to slower method");
(*f)->ole_mmap = FALSE;
(*f)->mem = g_new (guint8, BB_BLOCK_SIZE);
......
......@@ -142,7 +142,7 @@ extern MsOleErr ms_ole_stream_duplicate (MsOleStream ** const copy,
struct _MsOleSysWrappers {
int (*open2) (const char *pathname, int flags);
int (*open3) (const char *pathname, int flags, mode_t mode);
size_t (*read) (int fd, void *buf, size_t count);
ssize_t (*read) (int fd, void *buf, size_t count);
int (*close) (int fd);
int (*fstat) (int filedes, struct stat *buf);
ssize_t (*write) (int fd, const void *buf, size_t count);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment