From 576d029ece8fe9fc891ad7b50658b39178a40ead Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Sat, 5 Mar 2005 21:48:58 +0000 Subject: Simulator: sim_rename() must not use off_t in the argument for the same reason as sim_lseek(). Removed parentheses around system function names as the function name mangling is done differently with the new build system. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6145 a1c6a512-1295-4272-9138-f99709370657 --- uisimulator/common/io.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'uisimulator/common/io.c') diff --git a/uisimulator/common/io.c b/uisimulator/common/io.c index d85cf680ab..5db5f52880 100644 --- a/uisimulator/common/io.c +++ b/uisimulator/common/io.c @@ -140,7 +140,7 @@ struct sim_dirent *sim_readdir(MYDIR *dir) void sim_closedir(MYDIR *dir) { free(dir->name); - (closedir)(dir->dir); + closedir(dir->dir); free(dir); } @@ -155,9 +155,9 @@ int sim_open(const char *name, int o) debugf("We open the real file '%s'\n", buffer); #ifdef WIN32 - return (open)(buffer, opts); + return open(buffer, opts); #else - return (open)(buffer, opts, 0666); + return open(buffer, opts, 0666); #endif } fprintf(stderr, "WARNING, bad file name lacks slash: %s\n", @@ -173,7 +173,7 @@ int sim_creat(const char *name, mode_t mode) sprintf(buffer, "%s%s", SIMULATOR_ARCHOS_ROOT, name); debugf("We create the real file '%s'\n", buffer); - return (creat)(buffer, 0666); + return creat(buffer, 0666); } fprintf(stderr, "WARNING, bad file name lacks slash: %s\n", name); @@ -190,9 +190,9 @@ int sim_mkdir(const char *name, mode_t mode) debugf("We create the real directory '%s'\n", buffer); #ifdef WIN32 /* since we build with -DNOCYGWIN we have the plain win32 version */ - return (mkdir)(buffer); + return mkdir(buffer); #else - return (mkdir)(buffer, 0666); + return mkdir(buffer, 0666); #endif } @@ -203,9 +203,9 @@ int sim_rmdir(const char *name) sprintf(buffer, "%s%s", SIMULATOR_ARCHOS_ROOT, name); debugf("We remove the real directory '%s'\n", buffer); - return (rmdir)(buffer); + return rmdir(buffer); } - return (rmdir)(name); + return rmdir(name); } int sim_remove(const char *name) @@ -216,9 +216,9 @@ int sim_remove(const char *name) sprintf(buffer, "%s%s", SIMULATOR_ARCHOS_ROOT, name); debugf("We remove the real file '%s'\n", buffer); - return (remove)(buffer); + return remove(buffer); } - return (remove)(name); + return remove(name); } int sim_rename(const char *oldpath, const char* newpath) @@ -231,7 +231,7 @@ int sim_rename(const char *oldpath, const char* newpath) sprintf(buffer2, "%s%s", SIMULATOR_ARCHOS_ROOT, newpath); debugf("We rename the real file '%s' to '%s'\n", buffer1, buffer2); - return (rename)(buffer1, buffer2); + return rename(buffer1, buffer2); } return -1; } @@ -373,7 +373,8 @@ void ldebugf(const char* file, int line, const char *fmt, ...) #endif -int sim_ftruncate(int fd, off_t length) +/* rockbox off_t may be different from system off_t */ +int sim_ftruncate(int fd, long length) { #ifdef WIN32 return _chsize(fd, length); -- cgit v1.2.3