From 939916bda1113594cc5bafd64548e9bddc2174ec Mon Sep 17 00:00:00 2001 From: parsons Date: Wed, 17 Aug 2005 13:29:11 +0000 Subject: ChangeLogTag: Wed Aug 17 13:27:16 UTC 2005 Jeff Parsons --- TAO/ChangeLog | 8 ++++++++ TAO/TAO_IDL/be/be_codegen.cpp | 18 +++++++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 457ec6f512c..01d1b611343 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,11 @@ +Wed Aug 17 13:27:16 UTC 2005 Jeff Parsons + + * TAO_IDL/be/be_codegen.cpp: + + In generating the include of *C.h in *A.h, added generation + of the prefix "tao/" if we are processing a .pidl file, since + in that case, the *A.h file will not be in the same directory. + Wed Aug 17 12:39:12 UTC 2005 Johnny Willemsen * TAO_IDL/be/be_visitor_operation/ami_handler_reply_stub_operation_cs.cpp: diff --git a/TAO/TAO_IDL/be/be_codegen.cpp b/TAO/TAO_IDL/be/be_codegen.cpp index 86b26ddc674..2153596ddb1 100644 --- a/TAO/TAO_IDL/be/be_codegen.cpp +++ b/TAO/TAO_IDL/be/be_codegen.cpp @@ -784,9 +784,21 @@ TAO_CodeGen::start_anyop_header (const char *fname) << "\""; } + char *tao_prefix = ""; + ACE_CString pidl_checker (idl_global->filename ()->get_string ()); + bool got_pidl = + (pidl_checker.substr (pidl_checker.length () - 5) == ".pidl"); + + // If we're here and we have a .pidl file, we need to generate + // the *A.h include from the AnyTypeCode library. + if (got_pidl) + { + tao_prefix = "tao/"; + } + // Generate the include statement for the client header. We just // need to put only the base names. Path info is not required. - *this->anyop_header_ << "\n#include \"" + *this->anyop_header_ << "\n#include \"" << tao_prefix << be_global->be_get_client_hdr_fname () << "\""; @@ -807,7 +819,7 @@ TAO_CodeGen::start_anyop_header (const char *fname) ACE_CString pidl_checker (idl_name); bool got_pidl = - (pidl_checker.find (".pidl") != ACE_SString::npos); + (pidl_checker.substr (pidl_checker.length () - 5) == ".pidl"); // If we're here and we have a .pidl file, we need to generate // the *A.h include from the AnyTypeCode library. @@ -1542,7 +1554,7 @@ TAO_CodeGen::gen_stub_hdr_includes (void) ACE_CString pidl_checker (idl_name); bool got_pidl = - (pidl_checker.find (".pidl") != ACE_SString::npos); + (pidl_checker.substr (pidl_checker.length () - 5) == ".pidl"); // If we're here and we have a .pidl file, we need to generate // the *A.h include from the AnyTypeCode library. -- cgit v1.2.1