From patchwork Mon May 1 13:45:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 68601 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6D3F13858C39 for ; Mon, 1 May 2023 13:45:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6D3F13858C39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1682948750; bh=XnRlgVyD4F2LFYqPEZJ8Gha7Arx4jxF5YCGYT9k/Dkw=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=m8Dr1qa8eDdQjCT4cirg1JhCooQNEJeSylugnuOgEsspWPpPBefdAja40+55P1gL6 q0E3yITFwg/+xWEJGTlUrKWFiORtBAekCoCaQ3voRqjlBGfhTuOslJyKFStEpJ4laP /Qz60bgLWjPyZNoi2rJrcrAQK2v0VhN0HREs3H2s= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id C81513858D28 for ; Mon, 1 May 2023 13:45:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C81513858D28 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 1ptTqK-0001g1-Bt; Mon, 01 May 2023 09:45:28 -0400 Received: from [2a01:cb19:4a:a400:de41:a9ff:fe47:ec49] (helo=begin) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ptTqJ-00063P-TO; Mon, 01 May 2023 09:45:27 -0400 Received: from samy by begin with local (Exim 4.96) (envelope-from ) id 1ptTqI-00G9v1-1W; Mon, 01 May 2023 15:45:26 +0200 Date: Mon, 1 May 2023 15:45:26 +0200 To: libc-alpha@sourceware.org, bug-hurd@gnu.org Subject: [RFC, hurd 64bit]: st_dev type Message-ID: <20230501134526.727cicipy7pkutv6@begin> Mail-Followup-To: libc-alpha@sourceware.org, bug-hurd@gnu.org MIME-Version: 1.0 Content-Disposition: inline Organization: I am not organized User-Agent: NeoMutt/20170609 (1.8.3) X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Samuel Thibault via Libc-alpha From: Samuel Thibault Reply-To: Samuel Thibault Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" Hello, Since we are creating a new ABI, it's time to take care of types :) I have fixed a few cases that had been identified on hurd 32bit, so that hurd 64bit doesn't get affected. There is however one case which remains problematic: stat.st_dev, which the standars say to have type dev_t, is #defined to st_fsid on Hurd, since the pid of the translator is what is representative of the device number. It happens that dev_t is 32bit (__U32_TYPE) and fsid_t is 64bit (__UQUAD_TYPE), see BZ 23084. Perhaps we should just make dev_t UWORD_TYPE, so it becomes 64bit on Hurd 64bit, as the attached patch does? (it is UQUAD or 64bit on Linux ports) I have only checked what is tested by the testsuite, we should probably carefully review all types exposed by libc with hurd-specific definitions. Samuel diff --git a/sysdeps/mach/hurd/bits/typesizes.h b/sysdeps/mach/hurd/bits/typesizes.h index 7b95bb0b91..646ee934bb 100644 --- a/sysdeps/mach/hurd/bits/typesizes.h +++ b/sysdeps/mach/hurd/bits/typesizes.h @@ -26,7 +26,7 @@ /* See for the meaning of these macros. This file exists so that need not vary across different GNU platforms. */ -#define __DEV_T_TYPE __U32_TYPE +#define __DEV_T_TYPE __UWORD_TYPE #define __UID_T_TYPE __U32_TYPE #define __GID_T_TYPE __U32_TYPE #define __INO_T_TYPE __ULONGWORD_TYPE