summaryrefslogtreecommitdiffstats
path: root/uisimulator
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-03-05 21:48:58 +0000
committerJens Arnold <amiconn@rockbox.org>2005-03-05 21:48:58 +0000
commit576d029ece8fe9fc891ad7b50658b39178a40ead (patch)
tree9a01bc6fd0edea539fb4c97e1cc9b94a0a77bb3c /uisimulator
parent72975faf053be9e5d0dae5b594f8642216f11259 (diff)
downloadrockbox-576d029ece8fe9fc891ad7b50658b39178a40ead.tar.gz
rockbox-576d029ece8fe9fc891ad7b50658b39178a40ead.zip
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
Diffstat (limited to 'uisimulator')
-rw-r--r--uisimulator/common/io.c25
1 files changed, 13 insertions, 12 deletions
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);