<p> Attention is currently required from: Joshua Colp, George Joseph, Kevin Harwell, Philip Prindeville. </p>
<p><a href="https://gerrit.asterisk.org/c/asterisk/+/16621">View Change</a></p><p>1 comment:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="null">Patchset:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/16621?tab=comments">Patch Set #4:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">I'm inclined to agree. There are two paths forward: […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Hi all,</p><p style="white-space: pre-wrap; word-wrap: break-word;">I don't think there is a need to remove the use of PRIdN macros. But PRIdN macros do not have a relation to time_t. So using them for time_t is not the right way in my opinion.</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">a) time_t may be long or long long. But time_t may also be unsigned or float.<br> - Does PRIdN approach take care of this? No.<br> - Does "cast to (long long) and use %lld" approach take care of this? Yes.</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">b) Checking for __USE_TIME_BITS64 is also not portable. libcs may or may not declare it. Right now glibc does not declare it, yet its "arc" target, which is a 32 bit target, is already y2038 safe, it's using 64 bit time_t (long long).<br> - Does PRIdN approach take care of this? No.<br> - Does "cast to (long long) and use %lld" approach take care of this? Yes.</pre><p style="white-space: pre-wrap; word-wrap: break-word;">In 2013 OpenBSD discussed the y2038 issue at a convention (slides: [1]). Under "Simple instructions for conversions", "Systematic conversions" and "Userland audit" they suggest (long long) casts and %lld.</p><p style="white-space: pre-wrap; word-wrap: break-word;">These slides were then discussed further (see [2]). When it came to printing time_t, the way I read it, the consensus was again to use casts to (long long) and %lld.</p><p style="white-space: pre-wrap; word-wrap: break-word;">[1] https://www.openbsd.org/papers/eurobsdcon_2013_time_t/<br>[2] https://news.ycombinator.com/item?id=6466428</p><p style="white-space: pre-wrap; word-wrap: break-word;">Kind regards,<br>Sebastian</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/16621">change 16621</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/16621"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ic8d61b26033f5c486b917e738c9608b0923a844e </div>
<div style="display:none"> Gerrit-Change-Number: 16621 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </div>
<div style="display:none"> Gerrit-Owner: Sebastian Kemper <sebastian_ml@gmx.net> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Reviewer: Philip Prindeville <philipp@redfish-solutions.com> </div>
<div style="display:none"> Gerrit-Reviewer: Sean Bright <sean@seanbright.com> </div>
<div style="display:none"> Gerrit-CC: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-CC: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Attention: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Attention: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Attention: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Attention: Philip Prindeville <philipp@redfish-solutions.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Sat, 26 Feb 2022 10:10:29 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Comment-In-Reply-To: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Comment-In-Reply-To: Philip Prindeville <philipp@redfish-solutions.com> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>