From d31b865482414b157e7382d2c2a21e72180d4c2e Mon Sep 17 00:00:00 2001 From: mazzearos Date: Sat, 4 Aug 2012 07:39:18 +0000 Subject: [PATCH] Fixed RealPath() for AROS. Because we are building GrafX2 without Unix support we must use the "Amiga" way of defining the current path. Reverted setup.h. I had drawn wrong conclusions because of the buggy RealPath(). git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1978 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- src/realpath.c | 7 ++++++- src/setup.h | 2 -- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/realpath.c b/src/realpath.c index 361f4317..16b3a829 100644 --- a/src/realpath.c +++ b/src/realpath.c @@ -47,7 +47,12 @@ // If resolved_path is null, it is allocated. char *Realpath(const char *_path, char *resolved_path) { - int fd = open(".", O_RDONLY), l; + #if defined(__AROS__) + int fd = open("", O_RDONLY); // GrafX2 is compiled without Unix support + #else + int fd = open(".", O_RDONLY); + #endif + int l; char current_dir_path[PATH_MAX]; char path[PATH_MAX], lnk[PATH_MAX], *tmp = (char *)""; diff --git a/src/setup.h b/src/setup.h index 762a617b..369ac7ce 100644 --- a/src/setup.h +++ b/src/setup.h @@ -73,8 +73,6 @@ void Set_config_directory(const char * program_dir, char * config_dir); /// Name of the subdirectory containing scripts #if defined (__MINT__) #define SCRIPTS_SUBDIRECTORY "SCRIPTS" -#elif defined(__AROS__) - #define SCRIPTS_SUBDIRECTORY "share/grafx2/scripts" #else #define SCRIPTS_SUBDIRECTORY "scripts" #endif