summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-06-11 17:12:19 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-06-11 17:12:19 +0000
commitb323311644f0f6aa3636e9cfb59ab8006d33b1bb (patch)
tree9aad4d5a8569d78b2d9c485be7b261ba71d37a1b
parent104a177a751554fa8554325059d43549e710effd (diff)
downloadATCD-b323311644f0f6aa3636e9cfb59ab8006d33b1bb.tar.gz
ChangeLogTag: Wed Jun 11 12:07:33 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r--TAO/ChangeLog10
-rw-r--r--TAO/TAO_IDL/driver/drv_preproc.cpp21
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 <j.parsons@vanderbilt.edu>
+
+ * 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 <dj_dwyer@yahoo.com> for
+ tracking down the source of the problem.
+
Wed Jun 11 11:44:21 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu>
* 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");
}