Oui je viens de zieuter les sources, et apriori rien ne l'empeche de marcher
Bon... Going to recompile a68k
(au passage, pour PreOS, shrink.c, le
#include <malloc.h> n'est pas platform free)
C'est moi ou :
iBookG4:~/Desktop/a68k godzil$ make
gcc -funsigned-char -fno-exceptions -D__NOPROTO -Os -s -c A68kmain.c -o A68kmain.o
In file included from A68kmain.c:25:
A68kdef.h:38: error: conflicting types for 'open'
A68kdef.h:38: note: a parameter list with an ellipsis can't match an empty parameter name list declaration
/usr/include/sys/fcntl.h:392: error: previous declaration of 'open' was here
A68kdef.h:38: error: conflicting types for 'creat'
A68kdef.h:38: note: an argument type that has a default promotion can't match an empty parameter name list declaration
/usr/include/sys/fcntl.h:393: error: previous declaration of 'creat' was here
In file included from A68kdef.h:42,
from A68kmain.c:25:
/usr/include/unistd.h:441: error: conflicting types for 'read'
A68kdef.h:38: error: previous declaration of 'read' was here
/usr/include/unistd.h:477: error: conflicting types for 'write'
A68kdef.h:38: error: previous declaration of 'write' was here
make: *** [A68kmain.o] Error 1
Super pour que ça compile il faut :
#include <stdio.h>
#include <ctype.h>
[b]//[/b]#include <fcntl.h>
#include <stdlib.h> /* now for all compilers - v.2.71.F3d, Kevin Kofler */
#include <string.h> /* now for all compilers - v.2.71.F3d, Kevin Kofler */
#include "protos.h"
/* Now including most header files in all compilers - v.2.71.F3d, Kevin Kofler */
#ifdef __SASC
/* #include <stdlib.h> */ /* now for all compilers - v.2.71.F3d, Kevin Kofler */
#include <stddef.h>
/* #include <string.h>
#include <fcntl.h> */
#else
/* extern char *malloc(); */ /* (2.71.F3d) should be declared in stdlib.h */
extern int open(), creat(), read(), write(), close(), unlink();
#if defined(__MACH__) && defined(__APPLE__) /* Darwin / OS X */
/* On Darwin, the implicit declaration below won't work, so we need to include
<unistd.h>. - v.2.71.F3j, Kevin Kofler (reported by Christian Walther) */
[b]//[/b]#include <unistd.h>
#else /* not Darwin / OS X */
extern long lseek();
#endif
commenter 2 lignes d'includes (et surtout le second, et je SUIS sous Darwin/OS X

)
Et bien sur, ça compile a68k, mais il ne marche plus derrière
Suffit de commenter la ligne
extern int open(), creat(), read(), write(), close(), unlink(); pour que la ça daigne marcher

(et décomenter les deux lignes plus haut

)
Je vois vraiment pas l'interet (d'ailleurs) de déclarer des fonctions qui sont déja déclaré dans un header inclus quelques lignes au dessus
Et Boom
Apres un remplacement de sld.asm, j'ai enfin un pedrom-89.tib pret a VTIser (pour voir si j'ai pas tout foiré

) (faut now que je boot mon pc pour avoir accès a VTI
(edit: pour ceux qui n'ont pas suivit, ce post a été posté en au moins 42 edits

)