From b323311644f0f6aa3636e9cfb59ab8006d33b1bb Mon Sep 17 00:00:00 2001 From: parsons Date: Wed, 11 Jun 2003 17:12:19 +0000 Subject: ChangeLogTag: Wed Jun 11 12:07:33 2003 Jeff Parsons --- TAO/ChangeLog | 10 ++++++++++ TAO/TAO_IDL/driver/drv_preproc.cpp | 21 +++++++++++++++++++-- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 628259b8fc9..57f9e827269 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,13 @@ +Wed Jun 11 12:07:33 2003 Jeff Parsons + + * TAO_IDL/driver/drv_preproc.cpp (DRV_cpp_init): + + Added code to strip a trailing '/' if it appears in a fetched + environment string. Appends to these strings always include + a leading '/', and some compilers choke on the resulting "//" + separator. Thanks to D.J. Dwyer for + tracking down the source of the problem. + Wed Jun 11 11:44:21 2003 Balachandran Natarajan * tao/Buffering_Constraint_Policy.cpp: diff --git a/TAO/TAO_IDL/driver/drv_preproc.cpp b/TAO/TAO_IDL/driver/drv_preproc.cpp index 8fc36c6f2dd..c973a1cf314 100644 --- a/TAO/TAO_IDL/driver/drv_preproc.cpp +++ b/TAO/TAO_IDL/driver/drv_preproc.cpp @@ -306,19 +306,36 @@ DRV_cpp_init (void) ACE_OS::strcat (option, TAO_IDL_INCLUDE_DIR); #else - const char* TAO_ROOT = ACE_OS::getenv ("TAO_ROOT"); + char* TAO_ROOT = ACE_OS::getenv ("TAO_ROOT"); + size_t len = 0; if (TAO_ROOT != 0) { + len = ACE_OS::strlen (TAO_ROOT); + + // Some compilers choke on "//" separators. + if (TAO_ROOT[len - 1] == '/') + { + TAO_ROOT[len - 1] = '\0'; + } + ACE_OS::strcat (option, TAO_ROOT); ACE_OS::strcat (option, "/tao"); } else { - const char* ACE_ROOT = ACE_OS::getenv ("ACE_ROOT"); + char* ACE_ROOT = ACE_OS::getenv ("ACE_ROOT"); if (ACE_ROOT != 0) { + len = ACE_OS::strlen (ACE_ROOT); + + // Some compilers choke on "//" separators. + if (ACE_ROOT[len - 1] == '/') + { + ACE_ROOT[len - 1] = '\0'; + } + ACE_OS::strcat (option, ACE_ROOT); ACE_OS::strcat (option, "/TAO/tao"); } -- cgit v1.2.1