help-hurd
[Top][All Lists]
Advanced

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

Re: Trouble executing example translator from Hurd Hacking Guide


From: Andrew Eggenberger
Subject: Re: Trouble executing example translator from Hurd Hacking Guide
Date: Sun, 28 Jul 2019 04:21:21 -0500
User-agent: mu4e 1.2.0; emacs 26.2

Thanks Samuel,

It's working now, with a few small tweaks. Both putting #define
_FILE_OFFSET_BITS 64 and switching the offset type in the read function
to loff_t caused the translator to output what appears to be the
contents of some memory instead of a string of '1's. But compiling with
-D_FILE_OFFSET_BITS=64 worked.  There's also a small bug in the program
itself. Instead of assigning the char '1' in the for loop, it's
assigning the int 1, causing it to output the character with the ascii
code 1.

Samuel Thibault writes:

> Samuel Thibault, le sam. 27 juil. 2019 11:09:56 +0200, a ecrit:
>> The issue here is actually that the source code is missing
>> 
>> #define _FILE_OFFSET_BITS 64
>> 
>> at the very top of the file.
>
> Or you can make the hooks use loff_t instead of off_t.
>
> Samuel


-- 
Andrew Eggenberger



reply via email to

[Prev in Thread] Current Thread [Next in Thread]