From c4b04508bbfee4a62d6d6a79b1292a6bf7c60e99 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Tue, 2 Apr 2024 15:43:41 +0200 Subject: [PATCH 1/2] Use taox11 version of pre/post to reduce dependency on ACE * tao/x11/post.h: * tao/x11/pre.h: Added. * bin/MPC/config/ridl_base_defaults.mpb: * tao/x11/PolicyC.h: * tao/x11/dynamic_any/dynany_impl.h: * tao/x11/pi/policyfactory_manager.h: * tao/x11/portable_server/sarg_traits_t.h: * tao/x11/portable_server/servant_proxy.h: --- bin/MPC/config/ridl_base_defaults.mpb | 4 ++-- tao/x11/PolicyC.h | 4 ++-- tao/x11/dynamic_any/dynany_impl.h | 3 --- tao/x11/pi/policyfactory_manager.h | 4 ++-- tao/x11/portable_server/sarg_traits_t.h | 5 ----- tao/x11/portable_server/servant_proxy.h | 6 ------ tao/x11/post.h | 8 ++++++++ tao/x11/pre.h | 8 ++++++++ 8 files changed, 22 insertions(+), 20 deletions(-) create mode 100644 tao/x11/post.h create mode 100644 tao/x11/pre.h diff --git a/bin/MPC/config/ridl_base_defaults.mpb b/bin/MPC/config/ridl_base_defaults.mpb index ca84be97..36cc95f8 100644 --- a/bin/MPC/config/ridl_base_defaults.mpb +++ b/bin/MPC/config/ridl_base_defaults.mpb @@ -37,7 +37,7 @@ project: taox11_basedefaults, taobaseidldefaults { after -= TAO_IDL_EXE idlflags -= $(TAO_IDLFLAGS) idlflags -= -Sa -St - idlflags += -Wb,pre_include=ace/pre.h \ - -Wb,post_include=ace/post.h -I$(TAOX11_ROOT) + idlflags += -Wb,pre_include=tao/x11/pre.h \ + -Wb,post_include=tao/x11/post.h -I$(TAOX11_ROOT) idlflags += $(RIDLCFLAGS) -Sci -Ssi -Sa -St } diff --git a/tao/x11/PolicyC.h b/tao/x11/PolicyC.h index 18ef06e2..a4a8c9bf 100644 --- a/tao/x11/PolicyC.h +++ b/tao/x11/PolicyC.h @@ -18,7 +18,7 @@ #ifndef __RIDL_POLICYC_H_INCLUDED__ #define __RIDL_POLICYC_H_INCLUDED__ -#include /**/ "ace/pre.h" +#include /**/ "tao/x11/pre.h" #include "tao/x11/stddef.h" #include "tao/x11/basic_traits.h" @@ -518,7 +518,7 @@ TAOX11_Export std::ostream& operator<< ( #include "PolicyP.h" #endif -#include /**/ "ace/post.h" +#include /**/ "tao/x11/post.h" #endif // __RIDL_POLICYC_H_INCLUDED__ diff --git a/tao/x11/dynamic_any/dynany_impl.h b/tao/x11/dynamic_any/dynany_impl.h index bc1b3119..0f0c8afd 100644 --- a/tao/x11/dynamic_any/dynany_impl.h +++ b/tao/x11/dynamic_any/dynany_impl.h @@ -12,8 +12,6 @@ #pragma once -#include /**/ "ace/pre.h" - #include "tao/x11/dynamic_any/dyn_common.h" #if defined (_MSC_VER) @@ -85,5 +83,4 @@ namespace TAOX11_NAMESPACE # pragma warning(pop) #endif /* _MSC_VER */ -#include /**/ "ace/post.h" #endif /* TAOX11_DYNANY_I_H */ diff --git a/tao/x11/pi/policyfactory_manager.h b/tao/x11/pi/policyfactory_manager.h index 2a3e4cec..c78b24a9 100644 --- a/tao/x11/pi/policyfactory_manager.h +++ b/tao/x11/pi/policyfactory_manager.h @@ -11,7 +11,7 @@ #pragma once -#include /**/ "ace/pre.h" +#include /**/ "tao/x11/pre.h" #include "ace/Service_Config.h" #include "tao/x11/pi/taox11_pi_export.h" @@ -48,7 +48,7 @@ namespace TAOX11_NAMESPACE #endif -#include /**/ "ace/post.h" +#include /**/ "tao/x11/post.h" #endif /* TAOX11_POLICYFACTORY_MANAGER_INCLUDED */ diff --git a/tao/x11/portable_server/sarg_traits_t.h b/tao/x11/portable_server/sarg_traits_t.h index a6944c3b..1a6c92e4 100644 --- a/tao/x11/portable_server/sarg_traits_t.h +++ b/tao/x11/portable_server/sarg_traits_t.h @@ -12,8 +12,6 @@ #pragma once -#include /**/ "ace/pre.h" - #include "tao/x11/stddef.h" namespace TAOX11_NAMESPACE::PS @@ -29,7 +27,4 @@ namespace TAOX11_NAMESPACE::PS }; } // namespace TAOX11_NAMESPACE::PS - -#include /**/ "ace/post.h" - #endif /* TAOX11_SARG_TRAITS_T_H */ diff --git a/tao/x11/portable_server/servant_proxy.h b/tao/x11/portable_server/servant_proxy.h index 7128d4d6..ac846ccc 100644 --- a/tao/x11/portable_server/servant_proxy.h +++ b/tao/x11/portable_server/servant_proxy.h @@ -12,10 +12,6 @@ #pragma once -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" - #include "tao/x11/tao_corba.h" #include "tao/PortableServer/PortableServer.h" #include "tao/PortableServer/Servant_Base.h" @@ -90,6 +86,4 @@ namespace TAOX11_NAMESPACE { }; } // namespace TAOX11_NAMESPACE -#include /**/ "ace/post.h" - #endif // TAOX11_SERVANT_PROXY_H_INCLUDED diff --git a/tao/x11/post.h b/tao/x11/post.h new file mode 100644 index 00000000..8cc2c37b --- /dev/null +++ b/tao/x11/post.h @@ -0,0 +1,8 @@ +/** + * @file post.h + * @author Johnny Willemsen + * + * @brief Restore possible alignment rules + * + * @copyright Copyright (c) Remedy IT Expertise BV + */ diff --git a/tao/x11/pre.h b/tao/x11/pre.h new file mode 100644 index 00000000..30ef6524 --- /dev/null +++ b/tao/x11/pre.h @@ -0,0 +1,8 @@ +/** + * @file pre.h + * @author Johnny Willemsen + * + * @brief Set possible alignment rules + * + * @copyright Copyright (c) Remedy IT Expertise BV + */ From df99636e91f66bd4f488d9cb467fd1b22cecaab1 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Tue, 2 Apr 2024 15:57:33 +0200 Subject: [PATCH 2/2] More pre/post include changes * docs/src/compilation.adoc: * tests/ami_test/ami_collocation/ami_test_i.h: * tests/ami_test/multiple_idl_ami/hello2.h: --- docs/src/compilation.adoc | 8 ++++---- tests/ami_test/ami_collocation/ami_test_i.h | 10 ++-------- tests/ami_test/multiple_idl_ami/hello2.h | 3 --- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/docs/src/compilation.adoc b/docs/src/compilation.adoc index e7a885af..ca809c8b 100644 --- a/docs/src/compilation.adoc +++ b/docs/src/compilation.adoc @@ -17,8 +17,8 @@ command line options should be used when invoking the RIDL compiler. + Command line options: + ----------------------------------- - -Wb,pre_include=ace/pre.h - -Wb,post_include=ace/post.h + -Wb,pre_include=tao/x11/pre.h + -Wb,post_include=tao/x11/post.h -I$TAOX11_ROOT -Sci -Ssi @@ -47,8 +47,8 @@ When a client needs to use <>, the following command line options should be applied to the RIDL compiler: ----------------------------------- - -Wb,pre_include=ace/pre.h - -Wb,post_include=ace/post.h + -Wb,pre_include=tao/x11/pre.h + -Wb,post_include=tao/x11/post.h -I$TAOX11_ROOT -Sci -Ssi diff --git a/tests/ami_test/ami_collocation/ami_test_i.h b/tests/ami_test/ami_collocation/ami_test_i.h index 123513ec..377d062b 100644 --- a/tests/ami_test/ami_collocation/ami_test_i.h +++ b/tests/ami_test/ami_collocation/ami_test_i.h @@ -9,8 +9,6 @@ #ifndef TAOX11_AMI_TEST_I_H #define TAOX11_AMI_TEST_I_H -#include /**/ "ace/pre.h" - #include "testlib/taox11_testlog.h" #include "ami_testS.h" @@ -29,12 +27,8 @@ class AMI_TEST_Export AMI_Test_i private: int32_t in_l_last_; - - const std::string in_str_; - - const std::string in_str_last_; + std::string const in_str_; + std::string const in_str_last_; }; -#include /**/ "ace/post.h" #endif /* TAOX11_AMI_TEST_I_H */ - diff --git a/tests/ami_test/multiple_idl_ami/hello2.h b/tests/ami_test/multiple_idl_ami/hello2.h index a479174d..1cf3f5e2 100644 --- a/tests/ami_test/multiple_idl_ami/hello2.h +++ b/tests/ami_test/multiple_idl_ami/hello2.h @@ -9,8 +9,6 @@ #ifndef TAOX11_HELLO2_H #define TAOX11_HELLO2_H -#include /**/ "ace/pre.h" - #include "testlib/taox11_testlog.h" #include "hello2S.h" @@ -44,6 +42,5 @@ class Hello : IDL::traits::ref_type orb_; IDL::traits::ref_type poa_; }; -#include /**/ "ace/post.h" #endif /* TAOX11_HELLO2_H */