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 C81513858D28 for ; Mon, 1 May 2023 13:45:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C81513858D28 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 1ptTqK-0001g1-Bt; Mon, 01 May 2023 09:45:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Subject:To:From:Date:in-reply-to: references; bh=XnRlgVyD4F2LFYqPEZJ8Gha7Arx4jxF5YCGYT9k/Dkw=; b=g1ouXX6OS4Q8lr V78SGriSU5vXgLlDkIUt+FzPRxqXacDnZmwXv6HXggkkfWDufagziPUde6vmRViFRhl/37OZuMsIe eB/2Gqy/dhkAfkse7nh4EAy0bEsVswPx+RVBuY80JOx4xruM1wj3l9LhT9ZNPCd2VQj4N6+K51pIU bCepo8yBDEd/bpbBo9t5qWHS0hVSSBTIgvN2UTpdfxG2DH7UkGkavL+dGQsA7MBoqFyhQQUe1OUhZ LqrP4c2cXRz1QOoP1TH7PmNy+SaCxlnQYfW3sYLHo52+LdYjW3jF0HzpdWb7/sVBn7ZeuF5p6gwkm QCqXu2ou2xkNN6NbhKqw==; 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 From: Samuel Thibault 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-Type: multipart/mixed; boundary="bqcbem4ecsl7rj4d" 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 List-Id: --bqcbem4ecsl7rj4d Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --bqcbem4ecsl7rj4d Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=patch 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 --bqcbem4ecsl7rj4d--