From patchwork Tue Oct 14 11:54:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max X-Patchwork-Id: 399455 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ganesha.gnumonks.org (ganesha.gnumonks.org [IPv6:2001:780:45:1d:225:90ff:fe52:c662]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3A13814014D for ; Tue, 14 Oct 2014 22:56:08 +1100 (EST) Received: from localhost ([127.0.0.1] helo=ganesha.gnumonks.org) by ganesha.gnumonks.org with esmtp (Exim 4.72) (envelope-from ) id 1Xe0hh-0002tM-KW; Tue, 14 Oct 2014 13:55:49 +0200 Received: from hylle05.itea.ntnu.no ([2001:700:300:3::225]) by ganesha.gnumonks.org with esmtp (Exim 4.72) (envelope-from ) id 1Xe0gw-0002tC-Hp for openbsc@lists.osmocom.org; Tue, 14 Oct 2014 13:55:06 +0200 Received: from localhost (localhost [127.0.0.1]) by hylle05.itea.ntnu.no (Postfix) with ESMTP id DD585914FC6 for ; Tue, 14 Oct 2014 13:55:01 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at hylle05.itea.ntnu.no Received: from alumnimail.it.ntnu.no (alumnimail.it.ntnu.no [129.241.18.22]) by hylle05.itea.ntnu.no (Postfix) with ESMTP id 5382A91497D for ; Tue, 14 Oct 2014 13:54:57 +0200 (CEST) Received: from localhost (nat.sec.t-labs.tu-berlin.de [130.149.230.1]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: suraev) by alumnimail.it.ntnu.no (Postfix) with ESMTPSA id 0CD98580416 for ; Tue, 14 Oct 2014 13:54:57 +0200 (CEST) From: Max Suraev To: openbsc@lists.osmocom.org Subject: [PATCH] Use normal talloc instead of libosmocore copy Date: Tue, 14 Oct 2014 13:54:47 +0200 Message-Id: <1413287687-24807-1-git-send-email-max.suraev@fairwaves.co> X-Mailer: git-send-email 1.9.1 X-Spam-Score: 0.0 (/) X-BeenThere: openbsc@lists.osmocom.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Development of the OpenBSC GSM base station controller List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openbsc-bounces@lists.osmocom.org Errors-To: openbsc-bounces@lists.osmocom.org Signed-off-by: Max Suraev --- configure.ac | 1 + src/Makefile.am | 2 ++ src/bitvector.cpp | 2 +- src/bts.cpp | 2 +- src/gprs_bssgp_pcu.h | 2 +- src/gprs_debug.cpp | 2 +- src/openbts_sock.cpp | 2 +- src/pcu_l1_if.cpp | 2 +- src/sba.cpp | 2 +- src/sysmo_l1_fwd.c | 2 +- src/sysmo_l1_hw.c | 2 +- src/sysmo_l1_if.c | 2 +- src/sysmo_sock.cpp | 2 +- src/ta.cpp | 2 +- src/tbf.cpp | 2 +- src/tbf_dl.cpp | 2 +- src/tbf_ul.cpp | 2 +- tests/Makefile.am | 13 +++++++++---- tests/alloc/AllocTest.cpp | 2 +- tests/emu/pcu_emu.cpp | 2 +- tests/rlcmac/RLCMACTest.cpp | 1 + tests/tbf/TbfTest.cpp | 2 +- tests/types/TypesTest.cpp | 2 +- 23 files changed, 32 insertions(+), 23 deletions(-) diff --git a/configure.ac b/configure.ac index 3b2f380..c72cb4b 100644 --- a/configure.ac +++ b/configure.ac @@ -26,6 +26,7 @@ PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.3.9) PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty) PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 0.3.3) PKG_CHECK_MODULES(LIBOSMOGB, libosmogb >= 0.5.1.4) +PKG_CHECK_MODULES(LIBTALLOC, talloc >= 2.0.1) AC_MSG_CHECKING([whether to enable sysmocom-bts hardware support]) AC_ARG_ENABLE(sysmocom-bts, diff --git a/src/Makefile.am b/src/Makefile.am index d1ed701..8c625ed 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -112,6 +112,7 @@ osmo_pcu_LDADD = \ $(LIBOSMOGB_LIBS) \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ + $(LIBTALLOC_LIBS) \ $(COMMON_LA) if ENABLE_SYSMODSP @@ -120,6 +121,7 @@ osmo_pcu_remote_LDADD = \ $(LIBOSMOGB_LIBS) \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ + $(LIBTALLOC_LIBS) \ $(COMMON_LA) endif diff --git a/src/bitvector.cpp b/src/bitvector.cpp index 43feebc..bc1bcb0 100644 --- a/src/bitvector.cpp +++ b/src/bitvector.cpp @@ -27,7 +27,7 @@ #include extern "C" { -#include +#include } void *bv_tall_ctx; diff --git a/src/bts.cpp b/src/bts.cpp index b660014..d18361e 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -30,7 +30,7 @@ #include extern "C" { - #include + #include #include } diff --git a/src/gprs_bssgp_pcu.h b/src/gprs_bssgp_pcu.h index 32b6728..a05ef75 100644 --- a/src/gprs_bssgp_pcu.h +++ b/src/gprs_bssgp_pcu.h @@ -23,7 +23,7 @@ extern "C" { -#include +#include #include #include #include diff --git a/src/gprs_debug.cpp b/src/gprs_debug.cpp index 6f9e310..aa8864e 100644 --- a/src/gprs_debug.cpp +++ b/src/gprs_debug.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/openbts_sock.cpp b/src/openbts_sock.cpp index 2d9cae4..50880f3 100644 --- a/src/openbts_sock.cpp +++ b/src/openbts_sock.cpp @@ -27,7 +27,7 @@ #include #include extern "C" { -#include +#include #include #include #include diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp index 0cb79eb..2a81584 100644 --- a/src/pcu_l1_if.cpp +++ b/src/pcu_l1_if.cpp @@ -27,7 +27,7 @@ #include #include extern "C" { -#include +#include #include #include } diff --git a/src/sba.cpp b/src/sba.cpp index 6eec235..a0e1506 100644 --- a/src/sba.cpp +++ b/src/sba.cpp @@ -25,7 +25,7 @@ #include extern "C" { -#include +#include } #include diff --git a/src/sysmo_l1_fwd.c b/src/sysmo_l1_fwd.c index 535a7f0..0336889 100644 --- a/src/sysmo_l1_fwd.c +++ b/src/sysmo_l1_fwd.c @@ -32,7 +32,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/sysmo_l1_hw.c b/src/sysmo_l1_hw.c index 8351d68..9190a51 100644 --- a/src/sysmo_l1_hw.c +++ b/src/sysmo_l1_hw.c @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/sysmo_l1_if.c b/src/sysmo_l1_if.c index 4274e77..fa3a983 100644 --- a/src/sysmo_l1_if.c +++ b/src/sysmo_l1_if.c @@ -1,6 +1,7 @@ #include #include +#include #include #include @@ -8,7 +9,6 @@ #include #include -#include #include #include #include diff --git a/src/sysmo_sock.cpp b/src/sysmo_sock.cpp index 951653e..9b97190 100644 --- a/src/sysmo_sock.cpp +++ b/src/sysmo_sock.cpp @@ -26,7 +26,7 @@ #include #include extern "C" { -#include +#include #include #include } diff --git a/src/ta.cpp b/src/ta.cpp index 0bc1d66..428f084 100644 --- a/src/ta.cpp +++ b/src/ta.cpp @@ -23,7 +23,7 @@ #include extern "C" { - #include + #include } #include diff --git a/src/tbf.cpp b/src/tbf.cpp index 2afe257..a688421 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -30,7 +30,7 @@ extern "C" { #include -#include +#include } #include diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 8de3b2b..369a5cb 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -29,7 +29,7 @@ extern "C" { #include -#include +#include } #include diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index 3ab71f0..a5a0d2f 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -30,7 +30,7 @@ extern "C" { #include -#include +#include } #include diff --git a/tests/Makefile.am b/tests/Makefile.am index e84f17d..84039a2 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -7,6 +7,7 @@ rlcmac_RLCMACTest_SOURCES = rlcmac/RLCMACTest.cpp rlcmac_RLCMACTest_LDADD = \ $(top_builddir)/src/libgprs.la \ $(LIBOSMOCORE_LIBS) \ + $(LIBTALLOC_LIBS) \ $(COMMON_LA) alloc_AllocTest_SOURCES = alloc/AllocTest.cpp @@ -15,15 +16,17 @@ alloc_AllocTest_LDADD = \ $(LIBOSMOGB_LIBS) \ $(LIBOSMOGSM_LIBS) \ $(LIBOSMOCORE_LIBS) \ + $(LIBTALLOC_LIBS) \ $(COMMON_LA) tbf_TbfTest_SOURCES = tbf/TbfTest.cpp tbf_TbfTest_LDADD = \ + $(top_builddir)/src/libgprs.la \ $(LIBOSMOGB_LIBS) \ $(LIBOSMOGSM_LIBS) \ $(LIBOSMOCORE_LIBS) \ - $(COMMON_LA) \ - $(top_builddir)/src/libgprs.la + $(LIBTALLOC_LIBS) \ + $(COMMON_LA) emu_pcu_emu_SOURCES = emu/pcu_emu.cpp emu/test_replay_gprs_attach.cpp \ emu/openbsc_clone.c emu/openbsc_clone.h emu/gprs_tests.h \ @@ -33,15 +36,17 @@ emu_pcu_emu_LDADD = \ $(LIBOSMOGB_LIBS) \ $(LIBOSMOGSM_LIBS) \ $(LIBOSMOCORE_LIBS) \ + $(LIBTALLOC_LIBS) \ $(COMMON_LA) types_TypesTest_SOURCES = types/TypesTest.cpp types_TypesTest_LDADD = \ + $(top_builddir)/src/libgprs.la \ $(LIBOSMOGB_LIBS) \ $(LIBOSMOGSM_LIBS) \ $(LIBOSMOCORE_LIBS) \ - $(COMMON_LA) \ - $(top_builddir)/src/libgprs.la + $(LIBTALLOC_LIBS) \ + $(COMMON_LA) # The `:;' works around a Bash 3.2 bug when the output is not writeable. diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp index d711ad8..012bb47 100644 --- a/tests/alloc/AllocTest.cpp +++ b/tests/alloc/AllocTest.cpp @@ -28,8 +28,8 @@ extern "C" { #include #include -#include #include +#include } /* globals used by the code */ diff --git a/tests/emu/pcu_emu.cpp b/tests/emu/pcu_emu.cpp index ed0abbe..0a9ecbd 100644 --- a/tests/emu/pcu_emu.cpp +++ b/tests/emu/pcu_emu.cpp @@ -20,7 +20,7 @@ */ extern "C" { -#include +#include #include } diff --git a/tests/rlcmac/RLCMACTest.cpp b/tests/rlcmac/RLCMACTest.cpp index 66bc53c..987d3e9 100644 --- a/tests/rlcmac/RLCMACTest.cpp +++ b/tests/rlcmac/RLCMACTest.cpp @@ -28,6 +28,7 @@ extern "C" { extern const struct log_info gprs_log_info; #include "pcu_vty.h" +#include #include #include #include diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index 0811520..c62a74c 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -27,8 +27,8 @@ extern "C" { #include #include -#include #include +#include } void *tall_pcu_ctx; diff --git a/tests/types/TypesTest.cpp b/tests/types/TypesTest.cpp index 8a464b1..9ceae77 100644 --- a/tests/types/TypesTest.cpp +++ b/tests/types/TypesTest.cpp @@ -28,8 +28,8 @@ extern "C" { #include #include -#include #include +#include } #define OSMO_ASSERT_STR_EQ(a, b) \