Groups | Search | Server Info | Keyboard shortcuts | Login | Register


Groups > gnu.hurd.help > #398

Re: Trouble executing example translator from Hurd Hacking Guide

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:48:41 -0500
Lines 32
Approved help-hurd@gnu.org
Message-ID <mailman.12.1564307323.1985.help-hurd@gnu.org> (permalink)
References <877e84gsx7.fsf@gmail.com> <20190727090956.2b3nk43p42rgcmof@function> <20190727093244.443dqtvyku6yyo2y@function> <877e82cy5q.fsf@gmail.com> <20190728093313.s5zyy7sfotaybj5l@function> <875znmcww6.fsf@gmail.com>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain
X-Trace usenet.stanford.edu 1564307324 21876 209.51.188.17 (28 Jul 2019 09:48:44 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=vJwTAFCEbeQuG5Mv2UaQ2q81e9Kr0UMqLg4wy9hvsFs=; b=PWvIiKRe8HMrazh/4rfGZwPpypcQAd8UXHP00AZqooZX3PoHR6Dr2IuAdAw6qzdKvy Ix+JFqogIkQW7LQHo6lsPB4Bz/CiGsWGh6smotqUi+kQ+UZJLBinYlcgkFaxcQD/7oVw kzqE1dsR0WDzd5J6nmSN10Td1OFF/je9spHbwWZoPtTs93pSCU2GXEV3m9L9VYzXyh+1 SqYTZHfqjgUakYBmYdYWUr3W/Zv9lTHcNYnIgnt/jo0OMzy0TBeTZLXy2YdO6kd14NCl MpaHp1JXPB8WAQRKxVgqLD++yTwwA49GBgfHJIpgQYZdeIZNUqdv1N+yO9At9wc6zQbK QDSg==
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=vJwTAFCEbeQuG5Mv2UaQ2q81e9Kr0UMqLg4wy9hvsFs=; b=E3yLbW4jr5MYqj6R9IuFmKw0N+OJrdoSEybwaMyOlZHc+UjRhVLzPmq4f8i3ijEzEy 6aQBICxVsk4sNxCSAcK73cb+EmWx9FwQLux3bs8oHCygtBLqsYC/iaBwUV9Pt+wKkAzj F3I8qV7G7FB0mvlHc9glfEJQBJrOO2el6U25wSVitnV9cJvwjEJH7zC/+GPtTmUQ7k0K 6Oza8kddpqKopwaccV9GzYf4MNBp5sxpDla3jpSDf8r6deHnpUXBSZx7kdj7t1K3cPqm h1XyEmJThtU/5QPB0l9GjlRypOkyZ2khUJ3xakHH20jTY7aBjBi+WAdO9o1b6qioNzxH /vpw==
X-Gm-Message-State APjAAAXu3TXlE8pe3CPOSMLJeaM5XT4gddjLqyK2qPWgKpVrCD/OvvWe JX4ECIyKq+buW3731E/ZDGkQum5rV10=
X-Google-Smtp-Source APXvYqxUiZUc3j5aREYuISG9B4sgfDfteHROOTHNJn/M1U7B1aiNa5iweLdCSBk9aC1KoGMlXcm0nA==
X-Received by 2002:a5d:9749:: with SMTP id c9mr31402312ioo.258.1564307318026; Sun, 28 Jul 2019 02:48:38 -0700 (PDT)
User-agent mu4e 1.2.0; emacs 26.2
In-reply-to <20190728093313.s5zyy7sfotaybj5l@function>
X-detected-operating-system by eggs.gnu.org: Genre and OS details not recognized.
X-Received-From 2607:f8b0:4864:20::d41
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 <875znmcww6.fsf@gmail.com>
X-Mailman-Original-References <877e84gsx7.fsf@gmail.com> <20190727090956.2b3nk43p42rgcmof@function> <20190727093244.443dqtvyku6yyo2y@function> <877e82cy5q.fsf@gmail.com> <20190728093313.s5zyy7sfotaybj5l@function>
Xref csiph.com gnu.hurd.help:398

Show key headers only | View raw


Thank you. Yes, I misunderstood. All three methods work (independently) now.

Samuel Thibault writes:

> Hello,
>
> Andrew Eggenberger, le dim. 28 juil. 2019 04:21:21 -0500, a ecrit:
>> It's working now,
>
> Good :)
>
>> Both putting #define _FILE_OFFSET_BITS 64 and switching the offset
>> type in the read function to loff_t
>
> ? Only one of the two should be needed. Note that the #define needs to
> be very first, before #includes, since it's driving what includes are
> supposed to do.
>
>> 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.
>
> AIUI that was the purpose, but apparently it would be less surprising to
> emit '1' chars, so I changed that too.
>
> Samuel


-- 
Andrew Eggenberger

Back to gnu.hurd.help | Previous | Next | Find similar


Thread

Re: Trouble executing example translator from Hurd Hacking Guide Andrew Eggenberger <andrew.eggenberger@gmail.com> - 2019-07-28 04:48 -0500

csiph-web