eio: fix issue on 32bits system.

SVN revision: 57626
This commit is contained in:
Cedric BAIL 2011-03-09 14:53:55 +00:00
parent e8ca19f09c
commit fc2aaf9935
5 changed files with 21 additions and 22 deletions

View File

@ -124,8 +124,8 @@ struct _Eio_Progress
{
Eio_File_Op op; /**< IO type */
off_t current; /**< Current step in the IO operation */
off_t max; /**< Number of step to do to complete this IO */
long long current; /**< Current step in the IO operation */
long long max; /**< Number of step to do to complete this IO */
float percent; /**< Percent done of the IO operation */
const char *source; /**< source of the IO operation */

View File

@ -293,7 +293,7 @@ _eio_dir_recursiv_ls(Ecore_Thread *thread, Eio_Dir_Copy *copy, const char *targe
static Eina_Bool
_eio_dir_init(Ecore_Thread *thread,
off_t *step, off_t *count,
long long *step, long long *count,
int *length_source, int *length_dest,
Eio_Dir_Copy *order,
Eio_File_Progress *progress)
@ -353,7 +353,7 @@ _eio_dir_target(Eio_Dir_Copy *order, char *target, const char *dir, int length_s
static Eina_Bool
_eio_dir_mkdir(Ecore_Thread *thread, Eio_Dir_Copy *order,
off_t *step, off_t count,
long long *step, long long count,
int length_source, int length_dest)
{
const char *dir;
@ -387,7 +387,7 @@ _eio_dir_mkdir(Ecore_Thread *thread, Eio_Dir_Copy *order,
static Eina_Bool
_eio_dir_link(Ecore_Thread *thread, Eio_Dir_Copy *order,
off_t *step, off_t count,
long long *step, long long count,
int length_source, int length_dest)
{
const char *link;
@ -448,7 +448,7 @@ _eio_dir_link(Ecore_Thread *thread, Eio_Dir_Copy *order,
static Eina_Bool
_eio_dir_chmod(Ecore_Thread *thread, Eio_Dir_Copy *order,
off_t *step, off_t count,
long long *step, long long count,
int length_source, int length_dest,
Eina_Bool rmdir_source)
{
@ -514,8 +514,8 @@ _eio_dir_copy_heavy(void *data, Ecore_Thread *thread)
int length_source = 0;
int length_dest = 0;
off_t count;
off_t step;
long long count;
long long step;
/* list all the content that should be copied */
if (!_eio_dir_recursiv_ls(thread, copy, copy->progress.source))
@ -636,8 +636,8 @@ _eio_dir_move_heavy(void *data, Ecore_Thread *thread)
int length_source;
int length_dest;
off_t count;
off_t step;
long long count;
long long step;
/* just try a rename, maybe we are lucky... */
if (rename(move->progress.source, move->progress.dest) == 0)
@ -741,8 +741,8 @@ _eio_dir_rmrf_heavy(void *data, Ecore_Thread *thread)
const char *file = NULL;
const char *dir = NULL;
off_t count;
off_t step;
long long count;
long long step;
/* list all the content that should be moved */
if (!_eio_dir_recursiv_ls(thread, rmrf, rmrf->progress.source))

View File

@ -268,10 +268,10 @@ _eio_file_write(int fd, void *mem, ssize_t length)
#endif
static Eina_Bool
_eio_file_copy_mmap(Ecore_Thread *thread, Eio_File_Progress *op, int in, int out, off_t size)
_eio_file_copy_mmap(Ecore_Thread *thread, Eio_File_Progress *op, int in, int out, long long size)
{
char *m = MAP_FAILED;
off_t i;
long long i;
for (i = 0; i < size; i += EIO_PACKET_SIZE * EIO_PACKET_COUNT)
{
@ -320,11 +320,11 @@ _eio_file_copy_mmap(Ecore_Thread *thread, Eio_File_Progress *op, int in, int out
#ifdef EFL_HAVE_SPLICE
static int
_eio_file_copy_splice(Ecore_Thread *thread, Eio_File_Progress *op, int in, int out, off_t size)
_eio_file_copy_splice(Ecore_Thread *thread, Eio_File_Progress *op, int in, int out, long long size)
{
int result = 0;
off_t count;
off_t i;
long long count;
long long i;
int pipefd[2];
if (pipe(pipefd) < 0)

View File

@ -122,7 +122,7 @@ eio_progress_free(Eio_Progress *data)
}
void
eio_progress_send(Ecore_Thread *thread, Eio_File_Progress *op, off_t current, off_t max)
eio_progress_send(Ecore_Thread *thread, Eio_File_Progress *op, long long current, long long max)
{
Eio_Progress *progress;

View File

@ -9,9 +9,8 @@
# include <features.h>
#endif
#ifndef _FILE_OFFSET_BITS
# define _FILE_OFFSET_BITS 64
#endif
#undef _FILE_OFFSET_BITS
#define _FILE_OFFSET_BITS 64
#include <stdio.h>
#include <string.h>
@ -190,7 +189,7 @@ Eio_Progress *eio_progress_malloc(void);
void eio_progress_free(Eio_Progress *progress);
void eio_progress_send(Ecore_Thread *thread, Eio_File_Progress *op,
off_t current, off_t max);
long long current, long long max);
void eio_progress_cb(Eio_Progress *progress, Eio_File_Progress *op);
Eina_Bool eio_file_copy_do(Ecore_Thread *thread, Eio_File_Progress *copy);