Port-amiga archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: NetBSD 9.3 and Amiga loadbsd



Roc Vallès wrote:

> does not support the flag for using the serial port
> as console. Dug a little deeper by asking around (on IRC), and I found
> the reason is that nobody had built it for years (to the point of
> syntax errors sleeping undetected for years in the main C source
> file),

I have a LoadBSD 3.1 (with latest patches from Gunther Nikl) sitting on my
A3000's hard disk, which I successfully compiled with gcc V2.95.3 in 2015.

Just repeated the compilation today, and there is not a single warning.


> I did manage to coerce it to build and make it so others can build it,
> too: https://github.com/rvalles/netbsd_amiga_loadbsd_pleasebuild

This one doesn't build with my A3000's gcc-installation:

gcc -m68020 -Wa,-m68030 -D_STANDALONE -I./include -O2 -fomit-frame-pointer
-msmall-code   -c loadbsd.c -o loadbsd.o
In file included from loadbsd.c:50:
include/inttypes.h:6: warning: useless keyword or type name in empty
declaration
include/inttypes.h:6: warning: empty declaration
include/inttypes.h:7: warning: useless keyword or type name in empty
declaration
include/inttypes.h:7: warning: empty declaration
include/inttypes.h:8: warning: useless keyword or type name in empty
declaration
include/inttypes.h:8: warning: empty declaration
include/inttypes.h:9: warning: useless keyword or type name in empty
declaration
include/inttypes.h:9: warning: empty declaration
loadbsd.c: In function `_Vdomessage':
loadbsd.c:893: parse error before `85'
loadbsd.c: At top level:
loadbsd.c:907: warning: type mismatch with previous implicit declaration
loadbsd.c:598: warning: previous implicit declaration of `err'
loadbsd.c:907: warning: `err' was previously implicitly declared to return
`int'


1. The inttypes.h warnings are caused by the double definition of uint8_t,
uint16_t, etc., in your local inttypes.h. Don't know why your compiler
doesn't define these types with <sys/types.h> - even V2.95.3 did.

2. The parse error in line 893 is caused by
    int sys_nerr = 0; //FIXME
Not sure why you added that line. Maybe because your removed <err.h>?
Deleting it fixes the error for me, but it might be better to remove lines
899-901 instead, in case you had problems with sys_nerr?

3. If you delete the include for <err.h>, then there is no prototype for
err(), which causes the following warnings (907,598). Solution: add the
prototype on top of the source, or move the err-function before main().

-- 
Frank Wille



Home | Main Index | Thread Index | Old Index