Groups | Search | Server Info | Keyboard shortcuts | Login | Register
| Path | csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail |
|---|---|
| From | Andrew Eggenberger <andrew.eggenberger@gmail.com> |
| Newsgroups | gnu.hurd.help |
| Subject | Re: Trouble executing example translator from Hurd Hacking Guide |
| Date | Sun, 28 Jul 2019 04:21:21 -0500 |
| Lines | 29 |
| Approved | help-hurd@gnu.org |
| Message-ID | <mailman.7.1564305683.1985.help-hurd@gnu.org> (permalink) |
| References | <877e84gsx7.fsf@gmail.com> <20190727090956.2b3nk43p42rgcmof@function> <20190727093244.443dqtvyku6yyo2y@function> <877e82cy5q.fsf@gmail.com> |
| NNTP-Posting-Host | lists.gnu.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain |
| X-Trace | usenet.stanford.edu 1564305683 21219 209.51.188.17 (28 Jul 2019 09:21:23 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| Cc | Andrew Eggenberger <andrew.eggenberger@gmail.com>, help-hurd@gnu.org |
| To | bug-hurd@gnu.org |
| Envelope-to | help-hurd@gnu.org |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=ikd0nigFus+ujicCn8CUxEdZx/dTgfbrviZlwC2dJJY=; b=JxeXRQ5p6MbSbdjEx/7iwZzW6/1lbg3nM4TLTY6IdvJabwnNZEtM7xSmXdoIs04xig 1V1CKJAWt2w4DYBf6hopp6GKK1msfRaXrIkWG1in2t1yvi+Rfoa4qxQMvExuK86fowjc lBqXkK4OXb1k7i+ceZjn2NC5XINxIm2ebCBHeayrZdAW2NRRtiCk51XyZuqjgjb53w5o MR/RYd6sxcEyE/lE4TrE/WphB0003PoXgcWO2Ub4lttWl25qYdD87Ajoe3u9zEEfq/5Y 8wwu51/Cg94lOFLzuMBb31begJQQXApgBqohkSnFhqWyLR1eE2wBtDGq6WkSSKNasWin gKsw== |
| X-Google-DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=ikd0nigFus+ujicCn8CUxEdZx/dTgfbrviZlwC2dJJY=; b=Th6cqBTzQkaisF6KCilfKuX9Oc883TxAIQ5Xc9QGochECh+Mte7GFpjV90PAIi4Uqa OthbblgOCrgc9sHpxz/jSd7WbmueflprBelh/sCQPxoa6Ep5toQ5EOVhe/Xc1nn9PRew L4opdv+Yy0CYeyxZnD+2dfAI6CcJjyrSe8waPbA+2XRkQ6Tic+1dlsWJoWTSpT1u8hvx kD6eQjNhfNqyJdPE2rUW6vjnkMQNBrfhibdBv9g46Y3QXx1pYFWtEvriIT6CnhI/m78z 3R1doztO4ui3vUPtufgETlV77XQjAKYbCiSmv8KrSQJiX2MVThFLXURoFJbsPFUTI6e4 zIsg== |
| X-Gm-Message-State | APjAAAURM5/Nea11G532WfLW4wLjqLZ0r2naXSabvkbixcoJpQqVg5+w Cx0coNwWFd5t7ONX/64vpM4Xobo2tFE= |
| X-Google-Smtp-Source | APXvYqyNjc6mKJrNRX7pSFC21vO1tEcGzghKkSmdlMrPEpSaSIa2dnLgjkSlx7OowfN5DXWS8eanRQ== |
| X-Received | by 2002:a05:6638:281:: with SMTP id c1mr6199888jaq.43.1564305678830; Sun, 28 Jul 2019 02:21:18 -0700 (PDT) |
| User-agent | mu4e 1.2.0; emacs 26.2 |
| In-reply-to | <20190727093244.443dqtvyku6yyo2y@function> |
| X-detected-operating-system | by eggs.gnu.org: Genre and OS details not recognized. |
| X-Received-From | 2607:f8b0:4864:20::d30 |
| X-BeenThere | help-hurd@gnu.org |
| X-Mailman-Version | 2.1.23 |
| Precedence | list |
| List-Id | Users list for the GNU Hurd <help-hurd.gnu.org> |
| List-Unsubscribe | <https://lists.gnu.org/mailman/options/help-hurd>, <mailto:help-hurd-request@gnu.org?subject=unsubscribe> |
| List-Archive | <https://lists.gnu.org/archive/html/help-hurd> |
| List-Post | <mailto:help-hurd@gnu.org> |
| List-Help | <mailto:help-hurd-request@gnu.org?subject=help> |
| List-Subscribe | <https://lists.gnu.org/mailman/listinfo/help-hurd>, <mailto:help-hurd-request@gnu.org?subject=subscribe> |
| X-Mailman-Original-Message-ID | <877e82cy5q.fsf@gmail.com> |
| X-Mailman-Original-References | <877e84gsx7.fsf@gmail.com> <20190727090956.2b3nk43p42rgcmof@function> <20190727093244.443dqtvyku6yyo2y@function> |
| Xref | csiph.com gnu.hurd.help:396 |
Show key headers only | View raw
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
Back to gnu.hurd.help | Previous | Next | Find similar
Re: Trouble executing example translator from Hurd Hacking Guide Andrew Eggenberger <andrew.eggenberger@gmail.com> - 2019-07-28 04:21 -0500
csiph-web