Change in libosmo-sccp[master]: build: move include/{mtp, sccp} to include/osmocom/

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Sun Oct 21 12:57:02 UTC 2018


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/11120 )

Change subject: build: move include/{mtp,sccp} to include/osmocom/
......................................................................

build: move include/{mtp,sccp} to include/osmocom/

Anywhere else in the Osmocom code base, we arrange headers in
include/osmocom/foo/ and pass -I ${root_srcdir}/include/.
This way including an osmocom header always has the format
  #include <osmocom/foo/bar.h>
whether we are including from the local source tree or from $prefix.

For some reason not clear to me, the mtp and sccp folders, even though they are
being installed to $prefix/include/osmocom/, were kept *next* to the osmocom/
dir, instead of inside it. Fix that weird situation.

The motivation is that I wanted to use a definition from sccp_types.h in a
public-API header. That is impossible if it requires
  #include <sccp/sccp_types.h>
in a local build, but
  #include <osmocom/sccp/sccp_types.h>
for any other source tree using libosmo-sccp. After this patch, both are
identical and including works without quirks. (The other patch that needed this
has changed in the meantime on and no longer needs this, but this still makes
sense for future hacking.)

The installed result does not change, since both mtp/*.h and sccp/*.h have
always been installed to $prefix/include/osmocom/{mtp,sccp}/. This merely
changes their position in the source tree.

The most curious situation before this is that any patch #including
<osmocom/sccp/sccp_types.h> might not get a notice that the header didn't
exist, but might instead include an older system-installed file.

Change-Id: I1209a4ecf9f692a8030b5c93cd281fc9dd58d105
---
M configure.ac
M include/Makefile.am
M include/osmocom/Makefile.am
R include/osmocom/mtp/Makefile.am
R include/osmocom/mtp/mtp_level3.h
R include/osmocom/mtp/mtp_pcap.h
R include/osmocom/sccp/Makefile.am
R include/osmocom/sccp/sccp.h
R include/osmocom/sccp/sccp_types.h
M src/mtp_pcap.c
M src/sccp.c
M src/sccp2sua.c
M src/sccp_sclc.c
M src/sccp_scoc.c
M src/sccp_scrc.c
M tests/mtp/mtp_parse_test.c
M tests/sccp/sccp_test.c
17 files changed, 12 insertions(+), 12 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/configure.ac b/configure.ac
index 7dfb266..acef6f6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -136,9 +136,9 @@
     libosmo-sccp.pc
     libosmo-mtp.pc
     libosmo-xua.pc
-    include/sccp/Makefile
-    include/mtp/Makefile
     include/osmocom/Makefile
+    include/osmocom/sccp/Makefile
+    include/osmocom/mtp/Makefile
     include/osmocom/sigtran/Makefile
     include/Makefile
     src/Makefile
diff --git a/include/Makefile.am b/include/Makefile.am
index 7cd4b57..3578a80 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -1 +1 @@
-SUBDIRS = sccp mtp osmocom
+SUBDIRS = osmocom
diff --git a/include/osmocom/Makefile.am b/include/osmocom/Makefile.am
index 7e86a4b..c4535f3 100644
--- a/include/osmocom/Makefile.am
+++ b/include/osmocom/Makefile.am
@@ -1 +1 @@
-SUBDIRS = sigtran
+SUBDIRS = mtp sccp sigtran
diff --git a/include/mtp/Makefile.am b/include/osmocom/mtp/Makefile.am
similarity index 100%
rename from include/mtp/Makefile.am
rename to include/osmocom/mtp/Makefile.am
diff --git a/include/mtp/mtp_level3.h b/include/osmocom/mtp/mtp_level3.h
similarity index 100%
rename from include/mtp/mtp_level3.h
rename to include/osmocom/mtp/mtp_level3.h
diff --git a/include/mtp/mtp_pcap.h b/include/osmocom/mtp/mtp_pcap.h
similarity index 100%
rename from include/mtp/mtp_pcap.h
rename to include/osmocom/mtp/mtp_pcap.h
diff --git a/include/sccp/Makefile.am b/include/osmocom/sccp/Makefile.am
similarity index 100%
rename from include/sccp/Makefile.am
rename to include/osmocom/sccp/Makefile.am
diff --git a/include/sccp/sccp.h b/include/osmocom/sccp/sccp.h
similarity index 100%
rename from include/sccp/sccp.h
rename to include/osmocom/sccp/sccp.h
diff --git a/include/sccp/sccp_types.h b/include/osmocom/sccp/sccp_types.h
similarity index 100%
rename from include/sccp/sccp_types.h
rename to include/osmocom/sccp/sccp_types.h
diff --git a/src/mtp_pcap.c b/src/mtp_pcap.c
index e83e6f7..a59efc5 100644
--- a/src/mtp_pcap.c
+++ b/src/mtp_pcap.c
@@ -22,7 +22,7 @@
  *
  */
 
-#include <mtp/mtp_pcap.h>
+#include <osmocom/mtp/mtp_pcap.h>
 
 #include <sys/time.h>
 
diff --git a/src/sccp.c b/src/sccp.c
index a15a84b..8c3641c 100644
--- a/src/sccp.c
+++ b/src/sccp.c
@@ -31,7 +31,7 @@
 #include <osmocom/core/logging.h>
 #include <osmocom/gsm/tlv.h>
 
-#include <sccp/sccp.h>
+#include <osmocom/sccp/sccp.h>
 
 // Unassigned debug area
 static int DSCCP = 0;
diff --git a/src/sccp2sua.c b/src/sccp2sua.c
index 2f5b687..f68f9a9 100644
--- a/src/sccp2sua.c
+++ b/src/sccp2sua.c
@@ -27,7 +27,7 @@
 #include <string.h>
 #include <errno.h>
 
-#include <sccp/sccp.h>
+#include <osmocom/sccp/sccp.h>
 #include <osmocom/core/linuxlist.h>
 #include <osmocom/core/logging.h>
 #include <osmocom/sigtran/sccp_sap.h>
diff --git a/src/sccp_sclc.c b/src/sccp_sclc.c
index e4dbae6..db67660 100644
--- a/src/sccp_sclc.c
+++ b/src/sccp_sclc.c
@@ -56,7 +56,7 @@
 
 #include <osmocom/sigtran/sccp_sap.h>
 #include <osmocom/sigtran/protocol/sua.h>
-#include <sccp/sccp_types.h>
+#include <osmocom/sccp/sccp_types.h>
 
 #include "xua_internal.h"
 #include "sccp_internal.h"
diff --git a/src/sccp_scoc.c b/src/sccp_scoc.c
index 8138e43..fbbad49 100644
--- a/src/sccp_scoc.c
+++ b/src/sccp_scoc.c
@@ -56,7 +56,7 @@
 
 #include <osmocom/sigtran/sccp_sap.h>
 #include <osmocom/sigtran/protocol/sua.h>
-#include <sccp/sccp_types.h>
+#include <osmocom/sccp/sccp_types.h>
 
 #include "xua_internal.h"
 #include "sccp_internal.h"
diff --git a/src/sccp_scrc.c b/src/sccp_scrc.c
index 9005dc7..db49299 100644
--- a/src/sccp_scrc.c
+++ b/src/sccp_scrc.c
@@ -25,7 +25,7 @@
 #include <osmocom/core/logging.h>
 #include <osmocom/core/msgb.h>
 
-#include <sccp/sccp_types.h>
+#include <osmocom/sccp/sccp_types.h>
 #include <osmocom/sigtran/osmo_ss7.h>
 #include <osmocom/sigtran/sccp_sap.h>
 #include <osmocom/sigtran/sccp_helpers.h>
diff --git a/tests/mtp/mtp_parse_test.c b/tests/mtp/mtp_parse_test.c
index 75650a3..92c34ca 100644
--- a/tests/mtp/mtp_parse_test.c
+++ b/tests/mtp/mtp_parse_test.c
@@ -1,5 +1,5 @@
 /* MTP Layer3 parsing tests */
-#include <mtp/mtp_level3.h>
+#include <osmocom/mtp/mtp_level3.h>
 
 #include <arpa/inet.h>
 
diff --git a/tests/sccp/sccp_test.c b/tests/sccp/sccp_test.c
index ed485bc..ba9ff7a 100644
--- a/tests/sccp/sccp_test.c
+++ b/tests/sccp/sccp_test.c
@@ -31,7 +31,7 @@
 #include <osmocom/core/msgb.h>
 #include <osmocom/core/utils.h>
 
-#include <sccp/sccp.h>
+#include <osmocom/sccp/sccp.h>
 
 #define MIN(x, y) ((x) < (y) ? (x) : (y))
 

-- 
To view, visit https://gerrit.osmocom.org/11120
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I1209a4ecf9f692a8030b5c93cd281fc9dd58d105
Gerrit-Change-Number: 11120
Gerrit-PatchSet: 6
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181021/2bb36cb2/attachment.htm>


More information about the gerrit-log mailing list