<p>Harald Welte <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/11120">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">build: move include/{mtp,sccp} to include/osmocom/<br><br>Anywhere else in the Osmocom code base, we arrange headers in<br>include/osmocom/foo/ and pass -I ${root_srcdir}/include/.<br>This way including an osmocom header always has the format<br>  #include <osmocom/foo/bar.h><br>whether we are including from the local source tree or from $prefix.<br><br>For some reason not clear to me, the mtp and sccp folders, even though they are<br>being installed to $prefix/include/osmocom/, were kept *next* to the osmocom/<br>dir, instead of inside it. Fix that weird situation.<br><br>The motivation is that I wanted to use a definition from sccp_types.h in a<br>public-API header. That is impossible if it requires<br>  #include <sccp/sccp_types.h><br>in a local build, but<br>  #include <osmocom/sccp/sccp_types.h><br>for any other source tree using libosmo-sccp. After this patch, both are<br>identical and including works without quirks. (The other patch that needed this<br>has changed in the meantime on and no longer needs this, but this still makes<br>sense for future hacking.)<br><br>The installed result does not change, since both mtp/*.h and sccp/*.h have<br>always been installed to $prefix/include/osmocom/{mtp,sccp}/. This merely<br>changes their position in the source tree.<br><br>The most curious situation before this is that any patch #including<br><osmocom/sccp/sccp_types.h> might not get a notice that the header didn't<br>exist, but might instead include an older system-installed file.<br><br>Change-Id: I1209a4ecf9f692a8030b5c93cd281fc9dd58d105<br>---<br>M configure.ac<br>M include/Makefile.am<br>M include/osmocom/Makefile.am<br>R include/osmocom/mtp/Makefile.am<br>R include/osmocom/mtp/mtp_level3.h<br>R include/osmocom/mtp/mtp_pcap.h<br>R include/osmocom/sccp/Makefile.am<br>R include/osmocom/sccp/sccp.h<br>R include/osmocom/sccp/sccp_types.h<br>M src/mtp_pcap.c<br>M src/sccp.c<br>M src/sccp2sua.c<br>M src/sccp_sclc.c<br>M src/sccp_scoc.c<br>M src/sccp_scrc.c<br>M tests/mtp/mtp_parse_test.c<br>M tests/sccp/sccp_test.c<br>17 files changed, 12 insertions(+), 12 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/configure.ac b/configure.ac</span><br><span>index 7dfb266..acef6f6 100644</span><br><span>--- a/configure.ac</span><br><span>+++ b/configure.ac</span><br><span>@@ -136,9 +136,9 @@</span><br><span>     libosmo-sccp.pc</span><br><span>     libosmo-mtp.pc</span><br><span>     libosmo-xua.pc</span><br><span style="color: hsl(0, 100%, 40%);">-    include/sccp/Makefile</span><br><span style="color: hsl(0, 100%, 40%);">-    include/mtp/Makefile</span><br><span>     include/osmocom/Makefile</span><br><span style="color: hsl(120, 100%, 40%);">+    include/osmocom/sccp/Makefile</span><br><span style="color: hsl(120, 100%, 40%);">+    include/osmocom/mtp/Makefile</span><br><span>     include/osmocom/sigtran/Makefile</span><br><span>     include/Makefile</span><br><span>     src/Makefile</span><br><span>diff --git a/include/Makefile.am b/include/Makefile.am</span><br><span>index 7cd4b57..3578a80 100644</span><br><span>--- a/include/Makefile.am</span><br><span>+++ b/include/Makefile.am</span><br><span>@@ -1 +1 @@</span><br><span style="color: hsl(0, 100%, 40%);">-SUBDIRS = sccp mtp osmocom</span><br><span style="color: hsl(120, 100%, 40%);">+SUBDIRS = osmocom</span><br><span>diff --git a/include/osmocom/Makefile.am b/include/osmocom/Makefile.am</span><br><span>index 7e86a4b..c4535f3 100644</span><br><span>--- a/include/osmocom/Makefile.am</span><br><span>+++ b/include/osmocom/Makefile.am</span><br><span>@@ -1 +1 @@</span><br><span style="color: hsl(0, 100%, 40%);">-SUBDIRS = sigtran</span><br><span style="color: hsl(120, 100%, 40%);">+SUBDIRS = mtp sccp sigtran</span><br><span>diff --git a/include/mtp/Makefile.am b/include/osmocom/mtp/Makefile.am</span><br><span>similarity index 100%</span><br><span>rename from include/mtp/Makefile.am</span><br><span>rename to include/osmocom/mtp/Makefile.am</span><br><span>diff --git a/include/mtp/mtp_level3.h b/include/osmocom/mtp/mtp_level3.h</span><br><span>similarity index 100%</span><br><span>rename from include/mtp/mtp_level3.h</span><br><span>rename to include/osmocom/mtp/mtp_level3.h</span><br><span>diff --git a/include/mtp/mtp_pcap.h b/include/osmocom/mtp/mtp_pcap.h</span><br><span>similarity index 100%</span><br><span>rename from include/mtp/mtp_pcap.h</span><br><span>rename to include/osmocom/mtp/mtp_pcap.h</span><br><span>diff --git a/include/sccp/Makefile.am b/include/osmocom/sccp/Makefile.am</span><br><span>similarity index 100%</span><br><span>rename from include/sccp/Makefile.am</span><br><span>rename to include/osmocom/sccp/Makefile.am</span><br><span>diff --git a/include/sccp/sccp.h b/include/osmocom/sccp/sccp.h</span><br><span>similarity index 100%</span><br><span>rename from include/sccp/sccp.h</span><br><span>rename to include/osmocom/sccp/sccp.h</span><br><span>diff --git a/include/sccp/sccp_types.h b/include/osmocom/sccp/sccp_types.h</span><br><span>similarity index 100%</span><br><span>rename from include/sccp/sccp_types.h</span><br><span>rename to include/osmocom/sccp/sccp_types.h</span><br><span>diff --git a/src/mtp_pcap.c b/src/mtp_pcap.c</span><br><span>index e83e6f7..a59efc5 100644</span><br><span>--- a/src/mtp_pcap.c</span><br><span>+++ b/src/mtp_pcap.c</span><br><span>@@ -22,7 +22,7 @@</span><br><span>  *</span><br><span>  */</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#include <mtp/mtp_pcap.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <osmocom/mtp/mtp_pcap.h></span><br><span> </span><br><span> #include <sys/time.h></span><br><span> </span><br><span>diff --git a/src/sccp.c b/src/sccp.c</span><br><span>index a15a84b..8c3641c 100644</span><br><span>--- a/src/sccp.c</span><br><span>+++ b/src/sccp.c</span><br><span>@@ -31,7 +31,7 @@</span><br><span> #include <osmocom/core/logging.h></span><br><span> #include <osmocom/gsm/tlv.h></span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#include <sccp/sccp.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <osmocom/sccp/sccp.h></span><br><span> </span><br><span> // Unassigned debug area</span><br><span> static int DSCCP = 0;</span><br><span>diff --git a/src/sccp2sua.c b/src/sccp2sua.c</span><br><span>index 2f5b687..f68f9a9 100644</span><br><span>--- a/src/sccp2sua.c</span><br><span>+++ b/src/sccp2sua.c</span><br><span>@@ -27,7 +27,7 @@</span><br><span> #include <string.h></span><br><span> #include <errno.h></span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#include <sccp/sccp.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <osmocom/sccp/sccp.h></span><br><span> #include <osmocom/core/linuxlist.h></span><br><span> #include <osmocom/core/logging.h></span><br><span> #include <osmocom/sigtran/sccp_sap.h></span><br><span>diff --git a/src/sccp_sclc.c b/src/sccp_sclc.c</span><br><span>index e4dbae6..db67660 100644</span><br><span>--- a/src/sccp_sclc.c</span><br><span>+++ b/src/sccp_sclc.c</span><br><span>@@ -56,7 +56,7 @@</span><br><span> </span><br><span> #include <osmocom/sigtran/sccp_sap.h></span><br><span> #include <osmocom/sigtran/protocol/sua.h></span><br><span style="color: hsl(0, 100%, 40%);">-#include <sccp/sccp_types.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <osmocom/sccp/sccp_types.h></span><br><span> </span><br><span> #include "xua_internal.h"</span><br><span> #include "sccp_internal.h"</span><br><span>diff --git a/src/sccp_scoc.c b/src/sccp_scoc.c</span><br><span>index 8138e43..fbbad49 100644</span><br><span>--- a/src/sccp_scoc.c</span><br><span>+++ b/src/sccp_scoc.c</span><br><span>@@ -56,7 +56,7 @@</span><br><span> </span><br><span> #include <osmocom/sigtran/sccp_sap.h></span><br><span> #include <osmocom/sigtran/protocol/sua.h></span><br><span style="color: hsl(0, 100%, 40%);">-#include <sccp/sccp_types.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <osmocom/sccp/sccp_types.h></span><br><span> </span><br><span> #include "xua_internal.h"</span><br><span> #include "sccp_internal.h"</span><br><span>diff --git a/src/sccp_scrc.c b/src/sccp_scrc.c</span><br><span>index 9005dc7..db49299 100644</span><br><span>--- a/src/sccp_scrc.c</span><br><span>+++ b/src/sccp_scrc.c</span><br><span>@@ -25,7 +25,7 @@</span><br><span> #include <osmocom/core/logging.h></span><br><span> #include <osmocom/core/msgb.h></span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#include <sccp/sccp_types.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <osmocom/sccp/sccp_types.h></span><br><span> #include <osmocom/sigtran/osmo_ss7.h></span><br><span> #include <osmocom/sigtran/sccp_sap.h></span><br><span> #include <osmocom/sigtran/sccp_helpers.h></span><br><span>diff --git a/tests/mtp/mtp_parse_test.c b/tests/mtp/mtp_parse_test.c</span><br><span>index 75650a3..92c34ca 100644</span><br><span>--- a/tests/mtp/mtp_parse_test.c</span><br><span>+++ b/tests/mtp/mtp_parse_test.c</span><br><span>@@ -1,5 +1,5 @@</span><br><span> /* MTP Layer3 parsing tests */</span><br><span style="color: hsl(0, 100%, 40%);">-#include <mtp/mtp_level3.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <osmocom/mtp/mtp_level3.h></span><br><span> </span><br><span> #include <arpa/inet.h></span><br><span> </span><br><span>diff --git a/tests/sccp/sccp_test.c b/tests/sccp/sccp_test.c</span><br><span>index ed485bc..ba9ff7a 100644</span><br><span>--- a/tests/sccp/sccp_test.c</span><br><span>+++ b/tests/sccp/sccp_test.c</span><br><span>@@ -31,7 +31,7 @@</span><br><span> #include <osmocom/core/msgb.h></span><br><span> #include <osmocom/core/utils.h></span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#include <sccp/sccp.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <osmocom/sccp/sccp.h></span><br><span> </span><br><span> #define MIN(x, y) ((x) < (y) ? (x) : (y))</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/11120">change 11120</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/11120"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmo-sccp </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I1209a4ecf9f692a8030b5c93cd281fc9dd58d105 </div>
<div style="display:none"> Gerrit-Change-Number: 11120 </div>
<div style="display:none"> Gerrit-PatchSet: 6 </div>
<div style="display:none"> Gerrit-Owner: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>
<div style="display:none"> Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>