Changes required for Amiga port. Some of these patches involve commenting out code and will need to be changed to #ifndef AMIGA etc.
These are for the OS4 clib2-based port, further changes are necessary for newlib.
Logged In: YES
File Added: debugger_commandl.l.diff
File Added: utils.c.diff
patch for compat/getopt.c
File Added: compat_getopt.c.diff
patch for compat/getopt.h
File Added: compat_getopt.h.diff
patch for debugger/commandl.l
debugger/commandl.l change has only been tested as far as compiling.
Logged In: YES
Why do you comment out libgen,h in utils.c? Shouldn't the configure check have found that there were no libgen.h?
I think that was a bit of commenting out that should have been reversed, as libgen.h is available and the code compiles with the header.
I have spotted a temp dir path in the same file that needs fixing (quick hack - new diff attached), but I can't test any fix as I have no idea when fuse needs the temp directory.
patch for utils.c
I've applied utils.c, we use the temp path when converting .scl TR-DOS images for use in Fuse. More to come.
I've applied the debugger part, what's the problem with getopt? I take it you have getopt, but not getopt_long?
I've just reverted the changes back to the original, and it is compiling. I'm sure that was one of the first changes I made so I'm not sure what is going on here. For now, I would leave it alone as it seems to be working.
Looks like the getopt problem only shows up when you try and compile something other than getopt.c :)
SDK:clib2/lib/libc.a(unistd_getopt.o)(.sdata+0x0): multiple definition of `optind'
compat/libcompat.a(getopt.o)(.sdata+0x8):/Files/Projects/fuse/fuse-0.8.0/compat/getopt.c:313: first defined here
SDK:clib2/lib/libc.a(unistd_getopt.o)(.sdata+0x4): multiple definition of `opterr'
compat/libcompat.a(getopt.o)(.sdata+0x4):/Files/Projects/fuse/fuse-0.8.0/compat/getopt.c:316: first defined here
SDK:clib2/lib/libc.a(unistd_getopt.o)(.text+0x0): In function `getopt':
: multiple definition of `getopt'
compat/libcompat.a(getopt.o)(.text+0xe98):/Files/Projects/fuse/fuse-0.8.0/compat/getopt.c:1204: first defined here
gcc:ppc-amigaos/bin/ld: Warning: size of symbol `getopt' changed from 16 in SDK:clib2/lib/libc.a(unistd_getopt.o) to 680 in SDK:clib2/lib/libc.a(unistd_getopt.o)
SDK:clib2/lib/libc.a(unistd_getopt.o)(.sbss+0x4): multiple definition of `optopt'
compat/libcompat.a(getopt.o)(.sdata+0x0):/Files/Projects/fuse/fuse-0.8.0/compat/getopt.c:313: first defined here
could you let us know what the value of HAVE_GETOPT_LONG is in config.h and attach your config.log? It looks like you have getopt but not getopt_long and the code may not be looking for that case? I think the simplest thing may be to redefine the built-in optind, getopt, opterr and optopt if we don't have getopt_long.
It's not defined. config.log attached.
/* Define to 1 if you have the `getopt_long' function. */
/* #undef HAVE_GETOPT_LONG */
File Added: config.log
I think the getopt problem is related to this one <http://osdir.com/ml/lib.gnulib.bugs/2004-06/msg00038.html>.
It seem that uClibc uses GNU getopt but not getopt_long leading to the multiple definition, and I think that you are using a similar C library on the Amiga and getting a related problem.
There seems to be a newer version of the replacement routines in gnulib, which seem to try harder not to clash with the built-in getopt, they seem to require gettext though.
Maybe we should just omit getopt_long support for amiga?
Sounds easiest, if it's not needed.
This is a enhancement patch for libspectrum 0.3.0. It enables the Amiga version to decompress files with xfdmaster.library.
File Added: libspectrum.c.diff
libspectrum: libspectrum.h.in (header changes needed for libspectrum.c patch)
File Added: libspectrum.h.in.diff
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.