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
This commit is contained in:
mazzearos 2012-08-04 07:39:18 +00:00
parent ce8fbe076d
commit d31b865482
2 changed files with 6 additions and 3 deletions

View File

@ -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 *)"";

View File

@ -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