m68k problems
Manfred Hollstein
manfred@s-direktnet.de
Wed Jan 6 07:16:00 GMT 1999
On Tue, 5 January 1999, 14:39:37, oneill@cs.sfu.ca wrote:
> Jeff Law wrote:
> >>> I just checked in a fix to reload which should fix your m68k problems.
>
> and Toon replied:
> >> Thanks, I just completed a 3-stage bootstrap,
>
> Ditto for me, building 19990103. Very nice to finally have snapshots working
> building again.
I didn't bootstrap my m68k-motorola-sysv, but built a cross compiler
successfully.
>
> >> except for the following problem: On m68k-next-nextstep3, I got
> >>
> >> .../libio/filebuf.cc:118: implicit declaration of int open(...)
> >>
> >> [ I skipped this with make -k ... because I do not need it, but it might
> >> be worth looking into - Melissa ? ]
> >>
> >> This is probably a header issue.
>
> ... to which Jeff Law replied:
> > Definitely a header issue. I'm a little surprised fixproto didn't fix
> > this problem. It may be related to the weird locations of header
> > files on NeXT systems.
>
> I ran into the same problem. My bandaid was a quick hack to filebuf.cc (enclosed).
I got the same problem, too. "fixproto" doesn't add the missing prototypes
(as Jeff had expected) to <fcntl.h>, because /usr/include/fcntl.h on this
particular system simply contains:
/* Some comment */
#include <sys/fcntl.h>
Obviously, nothing needs to be fixed, hence fixincludes doesn't leave a file
"fcntl.h" around, which fixproto then could add missing prototypes to. I have
no clue, how we could/should fix this properly. A possibly hack would be to
make fixincludes add missing "extern ..." declarations, which could then be
protoized by fixproto; but I don't feel, this is the proper way to go...?!
>
> NEXTSTEP declares open in bsd/libc.h (included with #include <libc.h>), on
> the following line:
>
> extern int creat(const char *, int), open(const char *, int, ...);
>
> The more typical location is in fcntl.h, and indeed NeXT's bsd/sys/fcntl.h
> (eventually included by #include <fcntl.h>) does defined it, but only
> if _POSIX_SOURCE is defined, something one should almost never do, since
> NEXTSTEP's Posix support isn't up to much.
>
> Melissa.
>
> P.S. Sanity check
> #include <blink>
> /* ^-------- you see should the word `blink' here, in angle brackets */
> #include </blink>
>
> Enc.
>
> --- libio/filebuf.cc.orig Tue Feb 24 12:09:49 1998
> +++ libio/filebuf.cc Tue Jan 5 01:10:57 1999
> @@ -30,6 +30,12 @@
> #include <fcntl.h>
> #include <errno.h>
> #include "builtinbuf.h"
> +#ifdef NeXT
> +extern "C" {
> +extern int open(const char *, int, int);
> +}
> +#endif
> +
>
> void filebuf::init()
> {
>
More information about the Gcc-bugs
mailing list