From nobody Mon Sep 30 01:36:40 2024 X-Original-To: standards@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH3Zc5xHtz5XWcT for ; Mon, 30 Sep 2024 01:36:40 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH3Zc1PWtz4vYc for ; Mon, 30 Sep 2024 01:36:40 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727660200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PGCNc8C5RqFw0fTlpz55QpZZDOOtEvuykdR7Xn3GgNA=; b=ubsF7IK+v0hbOvEgFKC22ktL3vuf90Guha12MGbpjW08j003b2TaZ76r7s3L65u0X33Uy8 4gdktsC8+YG6uyyswRnDSGdrSIqxqzsR5oBPbheZfjFTBmpNu+0gN2PhxjY52ifdDHlW0K Wkq8yrkSnK678s5IiGF6eiaFLpZYOdBXu3RhcHLqikcH/5FNAlsC+giOK0L1JkVBJMQ8cG FpC79OgAYrFuJq4DX3CZWDfsorAZkPnlWwVGihLBQAya3a7hXFmrn82WlgMmHKPFPTv7a2 WnGFNYzKiqaoPQmshlFsZpMbGyHb/CQkyOYl4/VQc9vi6dfTIh1JX8lv192mCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727660200; a=rsa-sha256; cv=none; b=hkRZz0qizwSFhDCgW/b82eX7gAaz9rC05AXldHknjzCcTVc5uWRMMlEc3XDGkbcgXq+Ynq kyzFrpaRPGVG5UVYpmPeHIOTH0SPOaxRLDVhskf6ccbxX2sUnwGoH0S7yryXyNN9cZkWSF BZ5mlkWNWs8Qsy9LE1afkFuZNw07LTZT2tX0geN1qpexS9lNOZjFilPRXxRMNnmSS2pKYA 3kpzT2zUUO4/3knqTPzL2mYf1UOF4YY6DNJEbk6KycsjEEeBI3ftu9hQGWH5TQ6OlHRg7Y OLkEGXNnpI9rL0s6y1a/oqdt6emMcDHMsGV/BHtox89UxwYysxJMV5xgyCTG3Q== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH3Zc0tnszYR8 for ; Mon, 30 Sep 2024 01:36:40 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 48U1adfF022221 for ; Mon, 30 Sep 2024 01:36:39 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 48U1adrH022220 for standards@FreeBSD.org; Mon, 30 Sep 2024 01:36:39 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: standards@FreeBSD.org Subject: [Bug 281768] [PATCH] stdio.h: don't expose rsize_t unless __EXT1_VISIBLE Date: Mon, 30 Sep 2024 01:36:40 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: gperciva@tarsnap.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: standards@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Standards compliance List-Archive: https://lists.freebsd.org/archives/freebsd-standards List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-standards@freebsd.org Sender: owner-freebsd-standards@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D281768 Bug ID: 281768 Summary: [PATCH] stdio.h: don't expose rsize_t unless __EXT1_VISIBLE Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: standards Assignee: standards@FreeBSD.org Reporter: gperciva@tarsnap.com Created attachment 253899 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D253899&action= =3Dedit stdio.h: don't expose rsize_t unless __EXT1_VISIBLE should not unconditionally declare rsize_t; this patch fixes that= by wrapping the typedef inside an `#if __EXT1_VISIBLE`, which is how it's done= in , , and . In C99, rsize_t is not a reserved identifier. (POSIX reserves *_t, but in = C99, there's no global *_t reservation; only int*_t and uint*_t in .) As such, technically speaking this should compile: ``` $ cat conflict.c=20 #include typedef int rsize_t; $ c99 -c conflict.c=20 conflict.c:2:13: error: typedef redefinition with different types ('int' vs 'size_t' (aka 'unsigned long')) 2 | typedef int rsize_t; | ^ /usr/include/stdio.h:55:16: note: previous definition is here 55 | typedef size_t rsize_t; | ^ 1 error generated. ``` Related history: - Problematic commit: =20 https://github.com/freebsd/freebsd-src/commit/c13559d31e90a8c405771be36ab9c= cfa41d4ebd6 - Good example: adding `typedef size_t rsize_t;` to and as part of memset_s addition https://reviews.freebsd.org/D9903 --=20 You are receiving this mail because: You are the assignee for the bug.=