[ACE6] tao_idl Improvements#1366
Conversation
Use conventional HTML, non breaking dashs, remove some outdated information.
Make it easier to read and edit by replacing tabs with spaces.
This is a backport of the same commit in DOCGroup#1357, but with copy preprocessor input method being the default. Fixes an issue that came up in OpenDDS/OpenDDS#2161. To make behavior of `#include ".."` consistent with C and C++, change how `tao_idl` calls the C preprocessor by default in most cases from making a copy of the IDL file to using the IDL file directly.
| @@ -0,0 +1,7 @@ | |||
| project(*): taoidldefaults { | |||
There was a problem hiding this comment.
| project(*): taoidldefaults { | |
| project: taoidldefaults { |
| `#include ".."` consistent with C and C++. This is not enabled by default | ||
| like it is in TAO 3, though. For details, see the `--preprocessor-input` | ||
| argument in `docs/compiler.html`. |
There was a problem hiding this comment.
I don't know if the TAO 3 note is needed here. The scope of this section is TAO 2.
There was a problem hiding this comment.
Maybe, but it is a behavior difference between the two, so I feel like it has to be mentioned somewhere.
There was a problem hiding this comment.
Does it require time travel to have TAO 2 know what TAO 3 does?
| } | ||
| else | ||
| { | ||
| i++; |
| { | ||
| ACE_ERROR ((LM_ERROR, ACE_TEXT ("Use \"guess\", \"direct-with-e\", ") | ||
| ACE_TEXT ("\"direct-without-e\", \"direct-gcc\", or \"copy\".\n"), | ||
| av[i])); |
There was a problem hiding this comment.
Is there supposed to be a %C or similar in the format string?
There was a problem hiding this comment.
No, it's a old typo I copied from the code for --unknown-annotations. I will fix both.
| if (!input) return 0; | ||
| const size_t size = ACE_OS::strlen (input); | ||
| char *output = 0; | ||
| ACE_NEW_RETURN (output, char [size], 0); |
There was a problem hiding this comment.
| ACE_NEW_RETURN (output, char [size], 0); | |
| ACE_NEW_RETURN (output, char[size], 0); |
| // Decide how files will be passed to the preprocessor | ||
| if (idl_global->preprocessor_input_ == IDL_GlobalData::PreprocessorInputGuess) | ||
| { | ||
| const char * const cpp_name = tolower (our_basename (FE_get_cpp_loc_from_env ())); |
There was a problem hiding this comment.
| const char * const cpp_name = tolower (our_basename (FE_get_cpp_loc_from_env ())); | |
| const char *const cpp_name = tolower (our_basename (FE_get_cpp_loc_from_env ())); |
| if (idl_global->preprocessor_input_ == IDL_GlobalData::PreprocessorInputGuess) | ||
| { | ||
| const char * const cpp_name = tolower (our_basename (FE_get_cpp_loc_from_env ())); | ||
| const char * method = "copy"; |
There was a problem hiding this comment.
| const char * method = "copy"; | |
| const char *method = "copy"; |
| { | ||
| // Child terminated normally? | ||
| if (WEXITSTATUS ((status)) != 0) | ||
| const ACE_exitcode narrowed_status = WEXITSTATUS ((status)); |
There was a problem hiding this comment.
| const ACE_exitcode narrowed_status = WEXITSTATUS ((status)); | |
| ACE_exitcode const narrowed_status = WEXITSTATUS ((status)); |
|
See my comments of #1357, why not set the preprocessor handling through config*.h files instead of guessing it in tao_idl. |
Backport of the appropriate features of #1357 to TAO 2.
__TAO_IDL_IDL_VERSION.__TAO_IDLIDL preprocessor macro.idl2jni, which is atao_idl-derived compiler, can't properly handle relative includes becausetao_idlmakes a temporary copy that is passed to the preprocessor. Unlike in tao_idl Improvements #1357guessis not the default for--preprocessor-input, butcopyis, which is the current behavior.