From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 9D1CF3858D1E for ; Sun, 12 Feb 2023 15:22:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9D1CF3858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pREBt-0008Nh-1x; Sun, 12 Feb 2023 10:22:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=In-Reply-To:MIME-Version:References:Subject:To:From: Date; bh=D4QGkne/5yBkWKFk5p02dy6x6kex0ud11V8gWPfMNto=; b=V+MZwNtyYHWgGWTL1A9l 9Uy/D3yj8WroLIJ7jbo3M6ebJsHUjR37p//CYJ+FCbwRSYW/8d/oIb41PLLSipYjeLXgSDWbuct7c BziRFpP/+KRyd4nPi8HQcR+66RMdzwPj0kfgrXDJOS/RanbN04nwbey2/k6Df+c16Dsb73fvgdp1b 5cucdQApmR4iHyVHv2ufQ3cmuUU+3OGTRqZXOZRQm+9U+QLQBPE32PWCfZFpvcoUIlYeJkThPlA2X 2RaOe8NCZ3qKIZWZOrzdGPCYXc7w/fS7wZ74qg1iXGZiEfBMglJiNS8fnNe7JXaJAUneT56GSF71/ KQiAu9KyfbHXYQ==; Received: from lfbn-bor-1-1163-184.w92-158.abo.wanadoo.fr ([92.158.138.184] helo=begin) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pREBs-0008FT-PG; Sun, 12 Feb 2023 10:22:56 -0500 Received: from samy by begin with local (Exim 4.96) (envelope-from ) id 1pREBq-004pIX-0N; Sun, 12 Feb 2023 16:22:54 +0100 Date: Sun, 12 Feb 2023 16:22:54 +0100 From: Samuel Thibault To: Sergey Bugaev Cc: bug-hurd@gnu.org, libc-alpha@sourceware.org, =?utf-8?Q?Fl=C3=A1vio?= Cruz Subject: Re: [RFC PATCH hurd 6/12] hurd: Fix modes_t and speeds_t types on 64-bit Message-ID: <20230212152254.y7mxeu5vxh7lzetx@begin> Mail-Followup-To: Sergey Bugaev , bug-hurd@gnu.org, libc-alpha@sourceware.org, =?utf-8?Q?Fl=C3=A1vio?= Cruz References: <20230212111044.610942-1-bugaevc@gmail.com> <20230212111044.610942-7-bugaevc@gmail.com> <20230212150011.sjntfvmkxzuu6iqt@begin> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: I am not organized User-Agent: NeoMutt/20170609 (1.8.3) X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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: Sergey Bugaev, le dim. 12 févr. 2023 18:15:57 +0300, a ecrit: > 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. I'd rather say drop the "long" part, to avoid having to pull the stdint.h header in. Nowadays' BSD headers just use the int type, notably. Samuel