This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: m68k problems
- To: egcs-bugs at cygnus dot com
- Subject: Re: m68k problems
- From: "Melissa O'Neill" <oneill at cs dot sfu dot ca>
- Date: Tue, 5 Jan 1999 14:39:37 -0800
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.
>> 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).
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()
{