On Thursday 29 May 2014 05:36 AM, Samuel Thibault wrote:
> Subhashish, le Thu 29 May 2014 04:57:55 +0530, a écrit :
>> This makelog[1] indicates that I should #include "vki/vki-gnu.h"[2].
>>
>> Now this vki-gnu.h is supposed to be the gnu/hurd specific kernel
interface
.
.
.
> One thing you need to understand well is that gnumach does *not* provide
> the posix interface, so things like uid_t, pollfd etc. do not make sense
> here :)
>
> Let's take the warnings/error one by one:
>
.
.
... The issue we have is
> that it's not so simple on GNU/hurd, so when one sees for instance:
>
> Int VG_(read) ( Int fd, void* buf, Int count)
> {
> Int ret;
> # if defined(VGO_linux)
> SysRes res = VG_(do_syscall3)(__NR_read, fd, (UWord)buf, count);
> # elif defined(VGO_darwin)
> SysRes res = VG_(do_syscall3)(__NR_read_nocancel, fd, (UWord)buf,
count);
> # else
>
.
.
.
> That's however the eventual target. For now, I'd say in VG_(read) and
> others, add
>
> #elif defined(VGO_gnu)
> vg_assert(0);
>
> before the #else, so that you get to build something, but make sure
.
.
.
> Concerning the original issue, vki_pollfd and alike, for now just
> replicate in vki-gnu.h what you find from /usr/include headers coming
> from the libc0.3-dev package, since that is what the RPC will mostly
> assume.
>
> Samuel
Hello,
In case of
#elif defined(VGO_gnu)
vg_assert(0);
I'm now changing it to
#elif defined(VGO_gnu)
SysRes res;
vg_assert(0);
for the 'return res;' at the end of the modified functions are coming
back to
haunt with reports of the undeclared res-es.
Subhashish