From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bruno Haible Newsgroups: gmane.comp.lib.gnulib.bugs,gmane.emacs.devel Subject: Re: boot-time: straighten code Date: Mon, 14 Aug 2023 15:51:08 +0200 Message-ID: <3585595.R9S75c37gh@nimes> References: <4536176.VaOIPsP7d9@nimes> <24890014.SdqpYfVjV2@nimes> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30092"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Paul Eggert , bug-gnulib@gnu.org, Emacs-devel@gnu.org To: Andreas Schwab Original-X-From: bug-gnulib-bounces+gnu-bug-gnulib=m.gmane-mx.org@gnu.org Mon Aug 14 15:51:35 2023 Return-path: Envelope-to: gnu-bug-gnulib@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qVXyo-0007cm-F3 for gnu-bug-gnulib@m.gmane-mx.org; Mon, 14 Aug 2023 15:51:34 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qVXye-0002mm-55; Mon, 14 Aug 2023 09:51:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qVXyW-0002kL-DE; Mon, 14 Aug 2023 09:51:17 -0400 Original-Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.216]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qVXyU-0005iA-9O; Mon, 14 Aug 2023 09:51:16 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1692021069; cv=none; d=strato.com; s=strato-dkim-0002; b=kJirWOxmUE+M5Lc31PE6nEvgob6nAJlk1zDHNiMrg3KukRY9A60KH5ETTL/EYTCFee YBW4rmPWbg600o6JprymBlr/PS92yjyBI1XCxJrh+I7ogsbEECAlZAH7XrGV442rb7QN 2SqaFSqxSBRLTdYQynNYd+lZjz63yi6L6uwVEFf+YjUSiEvy0CM+RLW4ke5THb2OVtZA 0Z1XXqmYOSa5lx2omGhAZrQuBo6qgJrgfOg4Qx4A82dQYtFLqRISuq8HpfjSeHSOYgY7 1AT5/W1V584OOnjLpR6fMBY+r6K1iwVieDB5dNgu7M507lLiDaDmxuw1hEgOQqiO/gxv NbhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1692021069; s=strato-dkim-0002; d=strato.com; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=aQ12bz56OMgzH0VWXBhn2fPFTgOVDSxCnkrt8wvdVsk=; b=gkfoaoXwfmS4cy4ed68y564vtwNbCyFg1hHOGgJGuvjJrCJfDit54V6TDKbyfNZqXT QnT8EHAVDGt0x8VoPlbM5lnnxeafi2K7J6fYUhALlzHm+G9f3kfFYdOE/o6XIKKAC05n J0v/v5Vmmy8ubEXi8627RgqLLaNk7/td3Era/n8732uzIkQSEwgY1LH/7/QT7B1na9LC 1R/IyM/V3tmPcJrxKT4JeTIGCE57hEqIEWVZxF6j5ijFmEt0YaGgY1Ft+LtBVT9cl6LK ScPSQ6idJENu9AEDhSgf/ATwLc/nee6wmyVea/hESD5kaW3uss2suX3dGUd66/AH/fVr 5YZA== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1692021069; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=aQ12bz56OMgzH0VWXBhn2fPFTgOVDSxCnkrt8wvdVsk=; b=KBbSASpTxf/0avzRAPBzm4XzniW7uoJ8MYqiEFZ9a25b9RkpvUFO6/QnGHDg6DOfzm 7BZa8geRSz9WvU/Jxfcu4KB7HIvNmlT1ksrR1Wc2P+Q5ia5YCUYCkNIS4iZogl8dAL1T yqOlT15IUvRz1vqJ8Hdkr6zK4kznuaFvBkPm5d8AgxPp01DIAlV2+nTOuzmV87lNRhLv Lxrt6URTJcpX5yXnK7TO4/Fq0pe1gpcrM2Y7CiyFG0z+nkQGJ/ZfZmLnqlHKOAjo+tI5 Ji9WAPgjNqLS3+fnY4bDAteHy+Z3OEVfQkBtehjLAr8JkQnvqHy3oOqKHy45EbQp2pzi 6Kug== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1692021069; s=strato-dkim-0003; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=aQ12bz56OMgzH0VWXBhn2fPFTgOVDSxCnkrt8wvdVsk=; b=K2wo5DsxnqV6gxRieMiaWeX/YdwgS0r7QBW6cr8tcRUr249EF8XjWgesTz3kkvr5Rd hve04CDumKbbPhJpHoCQ== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH0WWb0LN8XZoH94zq68+3cfpOS2fWDGOgxOcu1B5qnjc7VLcorpA==" Original-Received: from nimes.localnet by smtp.strato.de (RZmta 49.6.6 AUTH) with ESMTPSA id x129eaz7EDp8TNW (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 14 Aug 2023 15:51:08 +0200 (CEST) In-Reply-To: Received-SPF: none client-ip=81.169.146.216; envelope-from=bruno@clisp.org; helo=mo4-p00-ob.smtp.rzone.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+gnu-bug-gnulib=m.gmane-mx.org@gnu.org Original-Sender: bug-gnulib-bounces+gnu-bug-gnulib=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.comp.lib.gnulib.bugs:48192 gmane.emacs.devel:308734 Archived-At: Andreas Schwab wrote: > > char ut_host[__UT_HOSTSIZE]; /* Hostname for remote login. */ > > That's still using reserved symbols. Fixed through the patch below. But that is just a workaround. Is someone among the glibc people looking at the original glibc bug https://sourceware.org/bugzilla/show_bug.cgi?id=30701 ? 2023-08-14 Bruno Haible readutmp, boot-time: Don't use __UT_* symbols (regression 2023-08-11). * lib/readutmp.h (_GL_UT_USER_SIZE, _GL_UT_ID_SIZE, _GL_UT_LINE_SIZE, _GL_UT_HOST_SIZE): New macros. (struct utmpx32): Use them. diff --git a/lib/readutmp.h b/lib/readutmp.h index 1fbe29d86f..3ddecf3727 100644 --- a/lib/readutmp.h +++ b/lib/readutmp.h @@ -136,14 +136,18 @@ enum { UT_HOST_SIZE = -1 }; /* This is a near-copy of glibc's struct utmpx, which stops working after the year 2038. Unlike the glibc version, struct utmpx32 describes the file format even if time_t is 64 bits. */ +#define _GL_UT_USER_SIZE sizeof (((struct utmpx *) 0)->ut_user) +#define _GL_UT_ID_SIZE sizeof (((struct utmpx *) 0)->ut_id) +#define _GL_UT_LINE_SIZE sizeof (((struct utmpx *) 0)->ut_line) +#define _GL_UT_HOST_SIZE sizeof (((struct utmpx *) 0)->ut_host) struct utmpx32 { short int ut_type; /* Type of login. */ pid_t ut_pid; /* Process ID of login process. */ - char ut_line[__UT_LINESIZE]; /* Devicename. */ - char ut_id[4]; /* Inittab ID. */ - char ut_user[__UT_NAMESIZE]; /* Username. */ - char ut_host[__UT_HOSTSIZE]; /* Hostname for remote login. */ + char ut_line[_GL_UT_LINE_SIZE]; /* Devicename. */ + char ut_id[_GL_UT_ID_SIZE]; /* Inittab ID. */ + char ut_user[_GL_UT_USER_SIZE]; /* Username. */ + char ut_host[_GL_UT_HOST_SIZE]; /* Hostname for remote login. */ struct __exit_status ut_exit; /* Exit status of a process marked as DEAD_PROCESS. */ /* The fields ut_session and ut_tv must be the same size when compiled