[openbeos] compilation problem with Haiku

Hello,

        I am trying to get haiku to compile but I am having a problem with 
the gensyscall tool.

        The error generated is:

Link objects/x86.R1/tools/gensyscalls/gensyscallinfos
objects/x86.R1/tools/gensyscalls/
gensyscallinfos.o(.gnu.linkonce.t.__ls__H3ZcZt18string_char_traits1ZcZt
24__default_alloc_template2b0i0_R7ostreamRCt12basic_string3ZX01ZX11ZX21
_R7ostream+0x3f): In function `ostream & operator<<<char, 
string_char_traits<char>, __default_alloc_template<false, 0> >(ostream 
&, basic_string<char, string_char_traits<char>, 
__default_alloc_template<false, 0> > const &)':
: undefined reference to `ostream::write(char const *, long)'
collect2: ld returned 1 exit status

Looking at our version of stdc++.r4 the ostream::write is defined with 
streamsize as the type which resolves to unsigned long so the error is 
to be expected for the basic function.

So I would expect a converter function in iostream.h to handle this 
type.

I am using the following gcc version on R5 Pro
Reading specs from /boot/develop/tools/gnupro/lib/gcc-lib/i586-pc-beos/
2.95.3-beos-041202/specs
gcc version 2.95.3-beos-041202

I tried to add the definition line to iostream.h 

ostream& write(const char *s, long n);

and implement it in iostream.cc as
return write((const char*)s, (streamsize)n);

but that gave me errors in fstream.cc saying that it was already 
defined.
In file included from /boot/home/Programming/haiku-anon/headers/cpp/
fstream.h:30,
                 from /boot/home/Programming/haiku-anon/src/libs/stdc++
/fstream.cc:34:
/boot/home/Programming/haiku-anon/headers/cpp/iostream.h:78: 
`ostream::write(const char *, long int)' has already been declared in 
`ostream'

So am I missing something in my build environment?

Cheers
David

--
Am I ranting?  I hope so.  My ranting gets raves.

Other related posts: