From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-b4-smtp.messagingengine.com (fhigh-b4-smtp.messagingengine.com [202.12.124.155]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7337B3E123C for ; Fri, 10 Apr 2026 18:10:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.155 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775844654; cv=none; b=lT4O2AZgbXhpyOzOs/qhAjcJ26Z/iqGPPZlJgyu+tq7WYVWBUm2WKvi1EjECBrB8indEA3Q9A8eJX3XrkDiZU00Zd0rdm4iYc6kYeWw9E4FM+PR0BJlRRvdLrBy/j29urPhNBh67rC7h2cD3Il+mN7v5dr10eOF7OJQNatkz8Bg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775844654; c=relaxed/simple; bh=UxFrID2WlgWEvWYJSu19EEElBEWdGOf/rGjHl6Kza6Q=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=GH13Wa8oCQuYCBYBXpzxtVsRLnAI21G2fRD3YVClcxT6LKyZXUFHeIQEHJLoqy7/KHobBItvMPwJVlfJZ1+oDkoR5yfn4X0ddclyCbrNSeU+LuseVuIynzNbjsgtNY9NaqJpTTabVlRFN56UaLXexrKh+AQ3UZ6ntYBFuO33gnY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com; spf=pass smtp.mailfrom=pobox.com; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b=KFEzu56Y; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=DXGZzHex; arc=none smtp.client-ip=202.12.124.155 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pobox.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b="KFEzu56Y"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="DXGZzHex" Received: from phl-compute-11.internal (phl-compute-11.internal [10.202.2.51]) by mailfhigh.stl.internal (Postfix) with ESMTP id F23917A006C; Fri, 10 Apr 2026 14:10:50 -0400 (EDT) Received: from phl-frontend-01 ([10.202.2.160]) by phl-compute-11.internal (MEProxy); Fri, 10 Apr 2026 14:10:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pobox.com; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1775844650; x=1775931050; bh=uiou12cAoK 0jH0w0RV1i0UY/LpLIeIYz5jhCKLTXUGk=; b=KFEzu56Yc1WKXbrZJPDBvK81cr 9jfjStlCxOt3+PjXhTKVDA0c7H6+KInrkvMttyNdvhbW8Se7udbeRDaKIfX3sDIS IeZWuvnqqZyqeNKGZlKoEcb/IN721Z9NNVZoxfW++H1zzn9UDGjdH+Fadwdmcnm8 Xvv6XDZAwh23Cmh5dhSEuLk+HjxvR8AOOIirfQ5SZ6Enj5rE6gNb5HGjwbVX7967 ECH9jszYyer96h1SWuuMzDdXZqVweP7OFFcaW/U9a2D/mbsgT3+YMMqwQsLuHgzQ kovvWz0reT9UGPAPmFTDPSYzQG1EArqvm2qGVAPe7tumnri/4z2PaudSBlng== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1775844650; x=1775931050; bh=uiou12cAoK0jH0w0RV1i0UY/LpLIeIYz5jh CKLTXUGk=; b=DXGZzHexebk0rNzpLBu3qAvWkZvoJ0pfQagHFM1QPbnMxBLCUll +jLkKPzSwDmIu8F0Ajrvz/LyDxwBeiu7hdQvkSkh8dYSudsIVVJPVs72yKkjEyzU FHX+/+5WzrDJhUlPoHomsa4qN0c3l1ZEYQ7HeESU7wpKkuqVSezqegqbNa2KqY9v DvMknwx2BJv2j2pEQdPalLg7pc+HqaViVGZOF7jjrpkh0eFasi+2Z/dRQf1yaj4G rtA6kqcS8spieG+s+/1yCXtoP4MZeBKz61bE+2r/gFxzysLMGVPkRwUUqsKVCuCp RFdM0ggHmFtWI2+TeXaYMZmhdT7AkggAZBg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdeftddtlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefhvfevufgjfhffkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhnihhoucev ucfjrghmrghnohcuoehgihhtshhtvghrsehpohgsohigrdgtohhmqeenucggtffrrghtth gvrhhnpeefveetteejheeugeffledvteeiveffueefjeelueffteeigffgfedthfefieeg ieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehgih htshhtvghrsehpohgsohigrdgtohhmpdhnsggprhgtphhtthhopeelpdhmohguvgepshhm thhpohhuthdprhgtphhtthhopehgihhtsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtg hpthhtoheplhhorhgvnhiiohdrphgvghhorhgrrhhivddttddvsehgmhgrihhlrdgtohhm pdhrtghpthhtohepmhgvsehtthgrhihlohhrrhdrtghomhdprhgtphhtthhopehpshesph hkshdrihhmpdhrtghpthhtohepshhtohhlvggvsehgmhgrihhlrdgtohhmpdhrtghpthht ohepnhgvfihrvghnsehgmhgrihhlrdgtohhmpdhrtghpthhtohepshhunhhshhhinhgvse hsuhhnshhhihhnvggtohdrtghomhdprhgtphhtthhopegtrghtsehmrghlohhnrdguvghv pdhrtghpthhtohepghhithhsthgvrhesphhosghogidrtghomh X-ME-Proxy: Feedback-ID: if26b431b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 10 Apr 2026 14:10:50 -0400 (EDT) From: Junio C Hamano To: git@vger.kernel.org Cc: LorenzoPegorari , Taylor Blau , Patrick Steinhardt , Derrick Stolee , Elijah Newren , Eric Sunshine , Tian Yuchen Subject: [PATCH] CodingGuidelines: st_mtimespec vs st_mtim vs st_mtime In-Reply-To: (Junio C. Hamano's message of "Fri, 10 Apr 2026 09:01:16 -0700") References: <34c4e793113f22c393a6196d6e99a96d78cc3ab9.1775832056.git.lorenzo.pegorari2002@gmail.com> Date: Fri, 10 Apr 2026 11:10:48 -0700 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Most unfortunately macOS does not support st_[amc]tim for timestamps down to nanosecond resolution as POSIX systems. Signed-off-by: Junio C Hamano --- Documentation/CodingGuidelines | 6 ++++++ 1 file changed, 6 insertions(+) diff --git c/Documentation/CodingGuidelines w/Documentation/CodingGuidelines index 4992e52093..4e54139fd7 100644 --- c/Documentation/CodingGuidelines +++ w/Documentation/CodingGuidelines @@ -693,6 +693,12 @@ For C programs: char *dogs[] = ...; walk_all_dogs(dogs); + - For file timestamps, do not use "st_mtim" (and other timestamp + members in "struct stat") unconditionally; not everybody is POSIX + (grep for USE_ST_TIMESPEC). If you only need timestamp in whole + second resolution, "st_mtime" should work fine everywhere. + + For Perl programs: - Most of the C guidelines above apply.