Patch from begasus to allow building under haiku and beos. The program is crashing when you launch it (segmentation violation).

I'm not sure the way to get the program directory we use is ok for beos, but the official way of doing that is using C++ code.
Maybe it's time to switch to some more unix way to store the config files...

This should also fix watcom build (very untested as i'm using mingw to cross compile windows builds now)
Also added begasus to the credits screen.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@325 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Adrien Destugues
2008-11-05 18:59:55 +00:00
parent b11d9e3ff9
commit 3422eeff46
10 changed files with 75 additions and 21 deletions

10
main.c
View File

@@ -51,12 +51,16 @@
#ifndef __linux__
#ifndef __amigaos4__
#ifndef __BEOS__
#ifndef __HAIKU__
#include <windows.h>
#include <shlwapi.h>
#define chdir(dir) SetCurrentDirectory(dir)
#define M_PI 3.14159265358979323846
#endif
#endif
#endif
#endif
#ifdef __macosx__
#import <corefoundation/corefoundation.h>
@@ -223,7 +227,7 @@ void Analyse_de_la_ligne_de_commande(int argc,char * argv[])
// On récupère le chemin complet du paramètre
// Et on découpe ce chemin en répertoire(path) + fichier(.ext)
#if defined(__linux__) || defined(__amigaos4__)
#if defined(__linux__) || defined(__amigaos4__) || defined(__BEOS__) || defined(__HAIKU__)
Buffer=realpath(argv[Indice],NULL);
#else
Buffer = malloc(TAILLE_CHEMIN_FICHIER);
@@ -233,9 +237,13 @@ void Analyse_de_la_ligne_de_commande(int argc,char * argv[])
Extraire_nom_fichier(Principal_Nom_fichier, Buffer);
#ifndef __linux__
#ifndef __amigaos4__
#ifndef __BEOS__
#ifndef __HAIKU__
free(Buffer);
#endif
#endif
#endif
#endif
chdir(Principal_Repertoire_fichier);
}
else