<p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/20356">View Change</a></p><p>1 comment:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/20356/1/include/osmocom/bsc/gsm_data.h">File include/osmocom/bsc/gsm_data.h:</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.osmocom.org/c/osmo-bsc/+/20356/1/include/osmocom/bsc/gsm_data.h@53">Patch Set #1, Line 53:</a> <code style="font-family:monospace,monospace">struct osmo_sccp_instance;</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">huh, OpenBSD guys despise #include statements? ;) […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">I can explain again: whenever you #include in a .h file, you pull in potential cascades of more #includes and "dependencies", you potentially enlarge the compilation unit for each .o file, and, more critically, you may inadvertently introduce circular includes that break compilation.</p><p style="white-space: pre-wrap; word-wrap: break-word;">So every .h file that avoids an #include by an opaque declaration helps reducing #include chains.<br>It is the .c file's responsibility to #include those headers that are required for that compilation unit.</p><p style="white-space: pre-wrap; word-wrap: break-word;">(Another theoretical argument is that the .c file might want to use a different implementation of that opaque struct, but that doesn't happen in practice, at least nowhere i've been, because that'd be insane.)</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/20356">change 20356</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.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.osmocom.org/c/osmo-bsc/+/20356"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bsc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I12fcb18f6e4380f72929cfe7681bac05330a8c9a </div>
<div style="display:none"> Gerrit-Change-Number: 20356 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </div>
<div style="display:none"> Gerrit-Owner: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: Vadim Yanitskiy <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 07 Oct 2020 12:23:26 +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: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Comment-In-Reply-To: Vadim Yanitskiy <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Comment-In-Reply-To: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>