<p>Alexander Traud <strong>posted comments</strong> on this change.</p><p><a href="https://gerrit.asterisk.org/8061">View Change</a></p><p>Patch set 1:</p><p style="white-space: pre-wrap; word-wrap: break-word;">Actually, an answer was not planned. I hoped for an independent third opinion.</p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">None of the Asterisk headers are general purpose.</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">You never know where your headers end-up. Actually in Ubuntu, the Asterisk headers are placed in the general purpose include directory, see <https://packages.ubuntu.com/xenial-updates/asterisk-dev>. Furthermore, external modules exist already which use these headers, for example my very own audio codecs. I see no reason, why Asterisk should not be a role model here.</p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">We require GCC extensions.</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">That is OK. However, with 4x4 underscores, that SNMP module builds even without GCC extensions. I see no reason why Asterisk should limit a possible broader compatibility artificially.</p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">Something is disabling GCC extensions and that is the actual bug.</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">I disagree, see above. It is another bug.</p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">We use typeof in 94 lines of header files, none of them currently use __typeof__.</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">As explained, these are DEFINEs which are not unfolded within the headers itself. I tested this by including various other headers. I found only the changed DEFINE. That is affected because it is unfolded within another header. Yes, this makes this change awkward, yes. If you like, for consistency, I change all typeof to __typeof__ in the header files. I prefer that actually.</p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">__typeof__ is less readable.</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">Form follows function.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Again, I want to iterate that these 4x4 missing underscores prevent Asterisk to be made (!) on FreeBSD 11. Of course, I could report this to the maintainer of that port in FreeBSD. However, I doubt this is going to trickle into FreeBSD soon. Of course, the user could go for<br>pkg delete net-snmp<br>Of course, the user could find that other culprit <https://svnweb.freebsd.org/ports/head/net-mgmt/net-snmp/?view=log> and built that port himself.</p><p style="white-space: pre-wrap; word-wrap: break-word;">On the other hand, 4x4 underscores allow not only Asterisk to be built on FreeBSD with the current SNMP port, but even lower the requirements of external modules, for those using the header files in future.</p><ul style="list-style: none; padding-left: 20px;"></ul><p>To view, visit <a href="https://gerrit.asterisk.org/8061">change 8061</a>. To unsubscribe, 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/8061"/><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-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I0d7a2c62ed256cca19a50340e3c337567ac78e58 </div>
<div style="display:none"> Gerrit-Change-Number: 8061 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Alexander Traud <pabstraud@compuserve.com> </div>
<div style="display:none"> Gerrit-Reviewer: Alexander Traud <pabstraud@compuserve.com> </div>
<div style="display:none"> Gerrit-Reviewer: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Matthew Fredrickson <creslin@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Sat, 17 Feb 2018 16:08:56 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>