forked from len0rd/rockbox
Fix __PCTOOL__ dependencies on SIMULATOR
* filesize() is not POSIX, so it doesn't need stubbing or redirecting * make the various directory functions use the sim_ versions for PCTOOL * PCTOOL needs generic byteswap functions * fix the database makefile to not use -DSIMULATOR anymore Change-Id: Ic6abc4f662830b85626c751a472fa4a03e844871
This commit is contained in:
parent
f7a4ee2ddc
commit
c6d20104eb
5 changed files with 5 additions and 5 deletions
|
@ -191,6 +191,8 @@ enum {
|
||||||
#elif defined(HAVE_SDL) /* SDL build */
|
#elif defined(HAVE_SDL) /* SDL build */
|
||||||
#include "system-sdl.h"
|
#include "system-sdl.h"
|
||||||
#define NEED_GENERIC_BYTESWAPS
|
#define NEED_GENERIC_BYTESWAPS
|
||||||
|
#elif defined(__PCTOOL__)
|
||||||
|
#define NEED_GENERIC_BYTESWAPS
|
||||||
#endif
|
#endif
|
||||||
#include "bitswap.h"
|
#include "bitswap.h"
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ struct dirinfo {
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "file.h"
|
#include "file.h"
|
||||||
|
|
||||||
#if (CONFIG_PLATFORM & (PLATFORM_SDL|PLATFORM_MAEMO|PLATFORM_PANDORA))
|
#if (CONFIG_PLATFORM & (PLATFORM_SDL|PLATFORM_MAEMO|PLATFORM_PANDORA)) || defined(__PCTOOL__)
|
||||||
# define dirent_uncached sim_dirent
|
# define dirent_uncached sim_dirent
|
||||||
# define DIR_UNCACHED SIM_DIR
|
# define DIR_UNCACHED SIM_DIR
|
||||||
# define opendir_uncached sim_opendir
|
# define opendir_uncached sim_opendir
|
||||||
|
|
|
@ -47,7 +47,6 @@ extern int app_creat(const char *name, mode_t mode);
|
||||||
extern int app_remove(const char* pathname);
|
extern int app_remove(const char* pathname);
|
||||||
extern int app_rename(const char* path, const char* newname);
|
extern int app_rename(const char* path, const char* newname);
|
||||||
# if (CONFIG_PLATFORM & (PLATFORM_SDL|PLATFORM_MAEMO|PLATFORM_PANDORA))
|
# if (CONFIG_PLATFORM & (PLATFORM_SDL|PLATFORM_MAEMO|PLATFORM_PANDORA))
|
||||||
# define filesize(x) sim_filesize(x)
|
|
||||||
# define fsync(x) sim_fsync(x)
|
# define fsync(x) sim_fsync(x)
|
||||||
# define ftruncate(x,y) sim_ftruncate(x,y)
|
# define ftruncate(x,y) sim_ftruncate(x,y)
|
||||||
# define lseek(x,y,z) sim_lseek(x,y,z)
|
# define lseek(x,y,z) sim_lseek(x,y,z)
|
||||||
|
@ -60,7 +59,6 @@ extern int app_rename(const char* path, const char* newname);
|
||||||
# define creat(x,m) sim_creat(x,m)
|
# define creat(x,m) sim_creat(x,m)
|
||||||
# define remove(x) sim_remove(x)
|
# define remove(x) sim_remove(x)
|
||||||
# define rename(x,y) sim_rename(x,y)
|
# define rename(x,y) sim_rename(x,y)
|
||||||
# define filesize(x) sim_filesize(x)
|
|
||||||
# define fsync(x) sim_fsync(x)
|
# define fsync(x) sim_fsync(x)
|
||||||
# define ftruncate(x,y) sim_ftruncate(x,y)
|
# define ftruncate(x,y) sim_ftruncate(x,y)
|
||||||
# define lseek(x,y,z) sim_lseek(x,y,z)
|
# define lseek(x,y,z) sim_lseek(x,y,z)
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
# $Id: checkwps.make 22680 2009-09-11 17:58:17Z gevaerts $
|
# $Id: checkwps.make 22680 2009-09-11 17:58:17Z gevaerts $
|
||||||
#
|
#
|
||||||
|
|
||||||
DBDEFINES=-g -DDEBUG -D__PCTOOL__ -DSIMULATOR
|
DBDEFINES=-g -DDEBUG -D__PCTOOL__
|
||||||
CFLAGS+=$(DBDEFINES)
|
CFLAGS+=$(DBDEFINES)
|
||||||
|
|
||||||
createsrc = $(shell cat $(1) > $(3); echo "\#if CONFIG_CODEC == SWCODEC" >> $(3); \
|
createsrc = $(shell cat $(1) > $(3); echo "\#if CONFIG_CODEC == SWCODEC" >> $(3); \
|
||||||
|
|
|
@ -517,7 +517,7 @@ long sim_lseek(int fildes, long offset, int whence)
|
||||||
return lseek(fildes, offset, whence);
|
return lseek(fildes, offset, whence);
|
||||||
}
|
}
|
||||||
|
|
||||||
long sim_filesize(int fd)
|
long filesize(int fd)
|
||||||
{
|
{
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
return _filelength(fd);
|
return _filelength(fd);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue