From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by sourceware.org (Postfix) with ESMTPS id CF6403858D32 for ; Sun, 12 Feb 2023 15:16:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CF6403858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-x630.google.com with SMTP id w5so11164912plg.8 for ; Sun, 12 Feb 2023 07:16:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=I+QPH1lp0X7vXhWexO0OmOiddcY4C1nQbAdiZbyipek=; b=gX9kDtXH3TxSoPXkjAEd/KQixEQfYFYJMn1JjpIG9cEcUZ8rmIF+cqHbCwXuPSeY6C fNx+ziwrjG7JJKPhHdzptTsP0n69T+Qpp6rQVO4bAWGWHYAFtkbLXLn4MpA1p0eXw87o XL53UlX8ilYrv0PzYI5nqQMkfPiOBEYIkK8L8OmocJ/LSSssBmYXOPaty85wPs6Bqo5x LUgtXRK2WkeUovyi0tTf4qoe6HaGWmMg1r/SiYeeKpOp8ksDa8iTrS+dufYDvMrX7g1n nkvQ+OtSUwrUy6kHWH/RqvPuw0/cStgmQPq9AwLO4xIXa3dLoYXThpFzGNZX7gcotIHY X6yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=I+QPH1lp0X7vXhWexO0OmOiddcY4C1nQbAdiZbyipek=; b=Bio5bnRS/QyflXpYm8r9mv4MIyNLm8FVDhgB4xJi+YUgECPAChSyAZqG63UqymINQU ZNQTExV9OZcb1oF1CbfzzQ5gpgY863xh6UXEN9NF+qx8bAVs5048ocW7eHsS7t0N9R7b Z8sD9h02mJXvMXyP949uRhnkRgN6o7x44Bp5gX7Ban7Jz+UvqWO+Nq2l6mNCxyaYKzgF aZn99WqEaZZT2xRysix3ZG9JJN3rcEpzw/XHiOTjJXxptnzTMAU5n/idktoo67gXunEb WM5qj+JnZhqOYwEpJWqx8XVwdwVysElwfQD5Myh9YQoRsZoitFfUWe326VYoxGwn51W4 41Dw== X-Gm-Message-State: AO0yUKW9C9ucNerfl7lBgl1GrWuJoSq1o4uc9FOykou8+zj0SLdTRTUs O/rhGvJo4HJyFzBV/hpBBaORrdwYzWXUWlDO/Uev2TWR3+XFlw== X-Google-Smtp-Source: AK7set8bk2OJ2WpFwDu4x4K+WdgZIlldSZY2zqOLGiCYfBe/FIk6vdILl9iaNOkNK7yPoV3I6yZ/bbMgb7tr2NG5xqw= X-Received: by 2002:a17:902:d2d0:b0:192:ba7a:2be4 with SMTP id n16-20020a170902d2d000b00192ba7a2be4mr4966494plc.27.1676214968815; Sun, 12 Feb 2023 07:16:08 -0800 (PST) MIME-Version: 1.0 References: <20230212111044.610942-1-bugaevc@gmail.com> <20230212111044.610942-7-bugaevc@gmail.com> <20230212150011.sjntfvmkxzuu6iqt@begin> In-Reply-To: <20230212150011.sjntfvmkxzuu6iqt@begin> From: Sergey Bugaev Date: Sun, 12 Feb 2023 18:15:57 +0300 Message-ID: Subject: Re: [RFC PATCH hurd 6/12] hurd: Fix modes_t and speeds_t types on 64-bit To: Samuel Thibault Cc: bug-hurd@gnu.org, libc-alpha@sourceware.org, =?UTF-8?B?RmzDoXZpbyBDcnV6?= Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Sun, Feb 12, 2023 at 6:00 PM Samuel Thibault wrote: > We don't need these to be 64bits, 32bit will be completely large enough. > > Which issue did you actually encounter? Well, these MIG definitions need to match the ones in C/glibc. In hurd/ioctl_types.h (in the Hurd tree) there is typedef tcflag_t modes_t[4]; typedef speed_t speeds_t[2]; and then in bits/termios.h (in the glibc tree) /* Type of terminal control flag masks. */ typedef unsigned long int tcflag_t; /* Type of control characters. */ typedef unsigned char cc_t; /* Type of baud rate specifiers. */ typedef long int speed_t; which is why I changed the MIG ones to long. We could do it the other way around, make our own bits/termios.h and define them as fixed-size 32 bit ints. Sergey