Enough to build

This commit is contained in:
simon.kagstrom 2009-05-09 07:52:53 +00:00
parent 6abc038d08
commit 3b0bd617bf
5 changed files with 29 additions and 3 deletions

View File

@ -26,7 +26,8 @@ SRCS := $(wildcard $(SRC_DIR)/*.c $(SRC_DIR)/gfxdep/*.c $(SRC_DIR)/joydep/*.c $(
SRCS := $(filter-out src/compemu_raw_x86.c src/compemu_fpp.c src/compemu_support.c src/svgancui.c src/build68k.c src/catweasel.c \ SRCS := $(filter-out src/compemu_raw_x86.c src/compemu_fpp.c src/compemu_support.c src/svgancui.c src/build68k.c src/catweasel.c \
src/cdrom.c src/blkdev-libscg.c src/blkdev.c src/blitops.c src/akiko.c src/filesys_bootrom.c \ src/cdrom.c src/blkdev-libscg.c src/blkdev.c src/blitops.c src/akiko.c src/filesys_bootrom.c \
src/genblitter.c src/gencomp.c src/gencpu.c src/genlinetoscr.c src/compemu.c src/compstbl.c \ src/filesys.c src/fsdb.c src/fsdb_unix.c src/hardfile_unix.c src/genblitter.c src/gencomp.c src/gencpu.c \
src/hardfile.c src/genlinetoscr.c src/compemu.c src/compstbl.c \
src/readdisk.c src/gengenblitter.c src/scsiemul.c src/tui.c src/linetoscr.c, $(SRCS)) src/readdisk.c src/gengenblitter.c src/scsiemul.c src/tui.c src/linetoscr.c, $(SRCS))
# Library object files. # Library object files.
@ -76,7 +77,7 @@ COMMON_FLAGS := -g -O2 -mrvl -Wall $(MACHDEP)
INCLUDES := -Isrc/md-generic/ -Isrc/include -Isrc -I$(DEVKITPRO)/libogc/include -I$(DEVKITPRO)/libogc/include/SDL INCLUDES := -Isrc/md-generic/ -Isrc/include -Isrc -I$(DEVKITPRO)/libogc/include -I$(DEVKITPRO)/libogc/include/SDL
DEFINES := -DGEKKO -DFPUEMU -DCPUEMU_0 -DCPUEMU_5 -DCPUEMU_6 -DAGA \ DEFINES := -DGEKKO -DFPUEMU -DCPUEMU_0 -DCPUEMU_5 -DCPUEMU_6 -DAGA \
-DAUTOCONFIG -DFILESYS -DSUPPORT_THREADS -DUSE_SDL -DFDI2RAW -DDEBUGGER -DSAVESTATE \ -DAUTOCONFIG -DFILESYS -DSUPPORT_THREADS -DUSE_SDL -DFDI2RAW -DDEBUGGER -DSAVESTATE \
-DENFORCER -DACTION_REPLAY -DENFORCER -DACTION_REPLAY -UFILESYS
CFLAGS := $(COMMON_FLAGS) $(INCLUDES) $(DEFINES) CFLAGS := $(COMMON_FLAGS) $(INCLUDES) $(DEFINES)
# Test link flags. # Test link flags.

View File

@ -59,6 +59,20 @@
#define DUMPLOCK(u,x) #define DUMPLOCK(u,x)
#endif #endif
#if defined(GEKKOb)
#define R_OK 1
static int wii_access (const char *pathname, int mode)
{
struct stat st;
if (stat(pathname, &st) < 0)
return -1;
if (mode == R_OK && !S_ISDIR(st))
return 0;
return -1;
}
#define access wii_access
#endif
static void aino_test (a_inode *aino) static void aino_test (a_inode *aino)
{ {

View File

@ -135,10 +135,19 @@ char *fsdb_create_unique_nname (a_inode *base, const char *suggestion)
for (;;) { for (;;) {
int i; int i;
char *p = build_nname (base->nname, tmp); char *p = build_nname (base->nname, tmp);
#if !defined(GEKKOb)
if (access (p, R_OK) < 0 && errno == ENOENT) { if (access (p, R_OK) < 0 && errno == ENOENT) {
printf ("unique name: %s\n", p); printf ("unique name: %s\n", p);
return p; return p;
} }
#else
struct stat st;
if (stat(p, &st) < 0) {
printf ("unique name: %s\n", p);
return p;
}
#endif
free (p); free (p);
/* tmpnam isn't reentrant and I don't really want to hack configure /* tmpnam isn't reentrant and I don't really want to hack configure

View File

@ -795,7 +795,9 @@ void real_main (int argc, char **argv)
{ {
show_version (); show_version ();
#if defined(FILESYS)
currprefs.mountinfo = changed_prefs.mountinfo = &options_mountinfo; currprefs.mountinfo = changed_prefs.mountinfo = &options_mountinfo;
#endif
restart_program = 1; restart_program = 1;
#ifdef _WIN32 #ifdef _WIN32
sprintf (restart_config, "%sConfigurations\\", start_path); sprintf (restart_config, "%sConfigurations\\", start_path);

View File

@ -35,7 +35,7 @@ static RETSIGTYPE sigbrkhandler (int foo)
void setup_brkhandler (void) void setup_brkhandler (void)
{ {
#if defined(__unix) && !defined(__NeXT__) #if defined(__unix) && !defined(__NeXT__) && !defined(GEKKO)
struct sigaction sa; struct sigaction sa;
sa.sa_handler = sigbrkhandler; sa.sa_handler = sigbrkhandler;
sa.sa_flags = 0; sa.sa_flags = 0;