diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 1998-12-04 22:20:20 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 1998-12-04 22:20:20 +0000 |
commit | 8e81f662a9455eed22b9145361593596a124383b (patch) | |
tree | da03466bf6e4e82df883b16c5fe5d7bafd2d8c48 /TAO/TAO_IDL | |
parent | 447c4cb21176a82a7267394dc0c073de63b6b731 (diff) | |
download | ATCD-8e81f662a9455eed22b9145361593596a124383b.tar.gz |
Added support for hardcoding a gperf default path other than
$ACE_ROOT/bin/gperf.
Diffstat (limited to 'TAO/TAO_IDL')
-rw-r--r-- | TAO/TAO_IDL/util/utl_global.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/TAO/TAO_IDL/util/utl_global.cpp b/TAO/TAO_IDL/util/utl_global.cpp index c11ca55bf30..de4a0ac5b10 100644 --- a/TAO/TAO_IDL/util/utl_global.cpp +++ b/TAO/TAO_IDL/util/utl_global.cpp @@ -124,8 +124,11 @@ IDL_GlobalData::IDL_GlobalData (void) exception_support_ (I_FALSE), opt_tc_ (I_FALSE) { - // Path for the perfect hash generator(gperf) program. Default - // is $ACE_ROOT/bin/gperf. + + // Path for the perfect hash generator(gperf) program. + // Default is $ACE_ROOT/bin/gperf unless ACE_GPERF is defined. + // Use ACE_GPERF if $ACE_ROOT hasn't been set or won't be set + // in the environment. // Form the absolute pathname. char* ace_root = ACE_OS::getenv ("ACE_ROOT"); if (ace_root == 0) @@ -135,7 +138,18 @@ IDL_GlobalData::IDL_GlobalData (void) // the perfect hasher and at that time, we can switch over to some // other scheme. { +#if defined (ACE_GPERF) + // The actual gperf program must be included in the definition of + // ACE_GPERF, not just the directory in which it is located. + const char ace_gperf[] = ACE_GPERF; + ACE_NEW (this->gperf_path_, + char [ACE_OS::strlen (ace_gperf) + 1]); + ACE_OS::sprintf (this->gperf_path_, + "%s", + ace_gperf); +#else this->gperf_path_ = 0; +#endif } else { |