From nobody Sun Oct 01 01:50:29 2023 X-Original-To: freebsd-questions@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 4Ryn9806zwz4w6b5 for ; Sun, 1 Oct 2023 01:50:36 +0000 (UTC) (envelope-from mirror176@hotmail.com) Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04olkn2010.outbound.protection.outlook.com [40.92.47.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "DigiCert Cloud Services CA-1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ryn966mswz4S7T for ; Sun, 1 Oct 2023 01:50:34 +0000 (UTC) (envelope-from mirror176@hotmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=hotmail.com header.s=selector1 header.b=DVsT5tnZ; spf=pass (mx1.freebsd.org: domain of mirror176@hotmail.com designates 40.92.47.10 as permitted sender) smtp.mailfrom=mirror176@hotmail.com; dmarc=pass (policy=none) header.from=hotmail.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bZwERMLTjNDc7SiczHk+biiiGraDOCcpgXpKuAJXKtnYnjWrbEv9lAH1EnYgKKambwTo21X7hw65SVIGip9T5KsTFgl9zoga8Dhk1MPsZTmS4REStYcCGx0sOB+hWIoSHIoSql4/b+cxWGsjcfiKGicrC3xx++fVLIC+a0L2GBaow4DSKorVwfvU71MWDCGvlvwL7rw0zOCBhVtMWH1xRfjGqYT/pj9FKAsw0Gg/k42vc//u6yVxcueryc52aUxSdubJSSn4cBEEkcrVQPfVuv5Pia2HjXIAPRoLvR1Pe5UsIyy7VNKlmzUSdq58HJ8LEvIFwWoMXfz8/JG1FeTqhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=KAd5QYglm5ZRph5o2K4CCOJAKa7TAUBHhY+i4VC2deI=; b=RkCBZN0dNYoBME0IsPIrqg6BNb/DiSW/knFzdbM0krFia3Hj5w20VRJL/MtoOw+4oBb6axjAeIAADzPa0MaObTR5vWtI453G3agFEz4k+1JYD/HDfz068pT0qIRP6WZlCIXvjC579SCSmVZ4tXOIMZWd/NTvSfEUbKYgUj/SsB5xO/E3pplWc1o5UsNdd5YK+BG4nhvYXQREMAPFAzuAT1UPgdEr3A9PAdA0GK8v2cuZBn8J5xDjvaDXPdcqqEo+UrbYeoWEzZcoF8tKxK9lfLargiK8BveX9UegVuMaJR+NPIo4NfYPZF/C6NDl4edC3kB4mIbJvvOYoop+Ki3YVg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KAd5QYglm5ZRph5o2K4CCOJAKa7TAUBHhY+i4VC2deI=; b=DVsT5tnZllugGDs3mkz1OHAJmnkElHgJBMaemQ8PpPGhwLDrKn8E8aVbz68/nm0QMNCbrphqC1+uIBCJZorkfP31qgZelpcPFppMBfdlEuEPZpk5sAFfc3muSjDP8HDjJrINRBVZWXBDPOdoMzslV0xYD31dsuVZJqFX2Qq12mP9rODMZ09UoaVys3mLM3ojpMjcpprXblBa1gyO2cqlaDc7mpm34onom1FxyITYoEQ2oZH82wdAOTGvOyBhc2DoCCkcGMoDCu+qvOStdz2r5YcERz239nxf5C2IRbI/s1d7qybvIA2VA5MKc+pt9Rd7h63jMYTYPcuIeGFZPa92IQ== Received: from CO1PR11MB4770.namprd11.prod.outlook.com (2603:10b6:303:94::19) by CO1PR11MB4769.namprd11.prod.outlook.com (2603:10b6:303:95::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.20; Sun, 1 Oct 2023 01:50:32 +0000 Received: from CO1PR11MB4770.namprd11.prod.outlook.com ([fe80::4ed5:6fd:4aee:7ea8]) by CO1PR11MB4770.namprd11.prod.outlook.com ([fe80::4ed5:6fd:4aee:7ea8%5]) with mapi id 15.20.6813.017; Sun, 1 Oct 2023 01:50:32 +0000 Message-ID: Date: Sat, 30 Sep 2023 18:50:29 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Subject: st_* variables of ctim vs ctime vs ctimespec; is there a history & recommended use? Content-Language: en-US References: To: freebsd-questions@freebsd.org From: "Edward Sanford Sutton, III" In-Reply-To: X-Forwarded-Message-Id: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TMN: [cxeFd3vZ5w279ihm7LbKRA0C+9w6/zms] X-ClientProxiedBy: BLAPR05CA0024.namprd05.prod.outlook.com (2603:10b6:208:36e::20) To CO1PR11MB4770.namprd11.prod.outlook.com (2603:10b6:303:94::19) X-Microsoft-Original-Message-ID: List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PR11MB4770:EE_|CO1PR11MB4769:EE_ X-MS-Office365-Filtering-Correlation-Id: 10a3e0ae-c3ec-45d8-775b-08dbc220cc0a X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QSGekhZcMGmpFxOoLnDqGlLl250gV5IsV7Yrah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Y0pYRTBHUHhCU05mL0FaY0xvZGUrMENOUklFaW02cU5TZnFtRjM0eXVh?= =?utf-8?B?a2VNMnJYeFlYYlovZFlWc0FmQksxODJmaEZWSFZST2JsejAvUUkwMlJRQ2VE?= =?utf-8?B?dUdPQTVHTTNDWW5vOElrdXZOWFFZLzRnNXdjNHRmeGY5MGw0U0VjQ2gzMzdY?= =?utf-8?B?anRYY1N0K0RBMFZRMFByUmRpQUVUcGkwTTFEQ0QzNHpaQ3NKUzRVaWxOQmZK?= =?utf-8?B?azlOYXpPTmFCTitPYjl5NytnOUJGUjFNYU9rZE5hcDBpdXlybTBxV3FDS3Yx?= =?utf-8?B?cnNGL2hzTTFqZWV0ZjNpUzRXcDlUamVwbS9FRi96NnBxR3Z0Z2x4OGlnV2pt?= =?utf-8?Q?lvPbev2PSYO3zAxqJeeqQ3JK1Px8Vc5NbKOtrrW/6LUc=3D?= X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-e8f36.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 10a3e0ae-c3ec-45d8-775b-08dbc220cc0a X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB4770.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Oct 2023 01:50:32.4575 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR11MB4769 X-Spamd-Bar: - X-Spamd-Result: default: False [-1.50 / 15.00]; FORGED_MUA_THUNDERBIRD_MSGID_UNKNOWN(2.50)[]; ARC_ALLOW(-1.00)[microsoft.com:s=arcselector9901:i=1]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.995]; DMARC_POLICY_ALLOW(-0.50)[hotmail.com,none]; R_SPF_ALLOW(-0.20)[+ip4:40.92.0.0/16:c]; R_DKIM_ALLOW(-0.20)[hotmail.com:s=selector1]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_LAST(0.00)[]; MLMMJ_DEST(0.00)[freebsd-questions@freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[40.92.47.10:from]; RCPT_COUNT_ONE(0.00)[1]; FREEMAIL_FROM(0.00)[hotmail.com]; DWL_DNSWL_NONE(0.00)[hotmail.com:dkim]; RWL_MAILSPIKE_POSSIBLE(0.00)[40.92.47.10:from]; DKIM_TRACE(0.00)[hotmail.com:+]; TO_DN_NONE(0.00)[]; FROM_HAS_DN(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[hotmail.com]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:8075, ipnet:40.80.0.0/12, country:US]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4Ryn966mswz4S7T After recently finding stat(1) EXAMPLES error (I filed under PR274189 with patch and reasoning), I was trying to learn the meanings of these variables which lead me through reading stat(2) (found by `man lstat`) which says it uses st_mtim and provides both st_mtime and st_mtimespec for compatibility. I didn't find any listed reason for the compatibility otherwise and wondered if that is documented somewhere. Is there a recommended 'choice' for compatibility that users should know to use for code portability or is that documented somewhere else inside/outside the FreeBSD project that you can point me to? I also presume that 'compatibility' should be clarified in our copies of the NetBSD program's documentation unless the two projects use the same variables. Does stat(1) use of st_mtime stat(2) saying st_mtim have connection to causing more of these variants or does it use the variant due to being a tool pulled in from NetBSD or was it a decision of separating programmers and users interfaces with the system? My apologies if I should have sent this to a different mailing list but I have not seen one with a programming focus and this topic seemed mixed as it began by my reading up on /bin/stat to use the tool in userland. Thank you, Edward Sanford Sutton, III