diff --git a/TAO/NEWS b/TAO/NEWS
index 48d15915bc3ae..6067925465c5f 100644
--- a/TAO/NEWS
+++ b/TAO/NEWS
@@ -1,3 +1,16 @@
+USER VISIBLE CHANGES BETWEEN TAO-2.5.12 and TAO-2.5.13
+======================================================
+
+. TAO IDL:
+
+ . Version of IDL specification being used is available as the
+ `__TAO_IDL_IDL_VERSION` preprocessor macro.
+
+ . Added `--preprocessor-input` option to `tao_idl` to make behavior of
+ `#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`.
+
USER VISIBLE CHANGES BETWEEN TAO-2.5.11 and TAO-2.5.12
======================================================
diff --git a/TAO/TAO_IDL/driver/drv_args.cpp b/TAO/TAO_IDL/driver/drv_args.cpp
index f2ef45176faf0..50509703deb16 100644
--- a/TAO/TAO_IDL/driver/drv_args.cpp
+++ b/TAO/TAO_IDL/driver/drv_args.cpp
@@ -84,7 +84,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
extern long DRV_nfiles;
extern char *DRV_files[];
-void process_long_option(long ac, char **av, long &i);
+void process_long_option (long ac, char **av, long &i);
// Push a file into the list of files to be processed
void
@@ -124,46 +124,42 @@ DRV_usage (void)
ACE_TEXT ("%C: usage: %C [[flag|file] ...] [-- file ...]\n"),
idl_global->prog_name (),
idl_global->prog_name ()));
-
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("Legal flags:\n")
- ACE_TEXT (" -h | --help | -u\tPrint this list and exit successfully\n")
- ACE_TEXT (" -A...\t\t\tlocal implementation-specific escape\n")
- ACE_TEXT (" -Cw\t\t\tWarning if identifier spellings differ ")
- ACE_TEXT ("only in case (default is error)\n")
- ACE_TEXT (" -Ce\t\t\tError if identifier spellings differ ")
- ACE_TEXT ("only in case (default)\n")
- ACE_TEXT (" -ae\t\t\tError if anonymous type is seen ")
- ACE_TEXT ("(default)\n")
- ACE_TEXT (" -aw\t\t\tWarning if anonymous type is seen ")
- ACE_TEXT ("(default is error)\n")
- ACE_TEXT (" -as\t\t\tSilences the anonymous type diagnostic ")
- ACE_TEXT ("(default is error)\n")
- ACE_TEXT (" -d | --dump\t\tPrints a dump of the AST and exits\n")
- ACE_TEXT (" -Dname[=value]\t\tdefines name for preprocessor\n")
- ACE_TEXT (" -E\t\t\truns preprocessor only, prints on stdout\n")
- ACE_TEXT (" -Idir\t\t\tincludes dir in search path for preprocessor\n")
- ACE_TEXT (" -t\t\t\tTemporary directory to be used")
- ACE_TEXT (" by the IDL compiler.\n")
- ACE_TEXT (" -Uname\t\t\tundefines name for preprocessor\n")
- ACE_TEXT (" -v\t\t\ttraces compilation stages\n")
- ACE_TEXT (" -V | --version\t\tprints version info then exits\n")
- ACE_TEXT (" -w\t\t\tsuppresses IDL compiler warning messages\n")
- ACE_TEXT (" -Wp,
-
-
-
- Because TAO_IDL doesn't have any code to implement a preprocessor, it has
to use an external one. For convenience, it uses a built-in name for an external
preprocessor to call. During compilation, this is how that default is set: And the same behavior occurs for the TAO_IDL_PREPROCESSOR_ARGS and
-ACE_CC_PREPROCESSOR_ARGS macros. And the same behavior occurs for the Case 1 is used by the Makefile on most machines to specify the preprocessor.
Case 2 is used on Windows and platforms that need special arguments passed
to the preprocessor (MVS, HPUX, etc.). And case 3 isn't used at all,
but is included as a default case. Since the default preprocessor may not always work when TAO_IDL is moved to
+ Since the default preprocessor may not always work when TAO_IDL is moved to
another machine or used in cross-compilation, it can be overridden at runtime
-by setting the environment variables TAO_IDL_PREPROCESSOR and
-TAO_IDL_PREPROCESSOR_ARGS.
-
-TAO IDL Compiler User's Guide
+TAO IDL Compiler User's Guide
- Scope
This document describes the options and features of
+Scope
+This document describes the options and features of
TAO IDL compiler. It is not a reference manual or tutorial on OMG
IDL. For more information on OMG IDL see the
@@ -27,8 +51,8 @@ Scope
This document describes the options and features of
available in the OCI TAO
Developer's Guide.Optional CIAO Functionality
+
+Optional CIAO Functionality
For users of the Component Integrated ACE ORB
( CIAO), it is
@@ -40,50 +64,50 @@ Optional CIAO Functionality
by additional functionality in the TAO IDL compiler. All the additional files
generated and command line options used are described below.
-Generated Files
+
+Generated Files
-The IDL compiler generates up to 16 files from each .idl file. The
+The IDL compiler generates up to 16 files from each .idl file. The
file names are obtained by taking the IDL basename and
appending the following suffixes (see the list of TAO's IDL compiler
options on how to get different suffixes for
these files:)
-
-TAO's IDL compiler creates separate *.inl and *S_T.*
+TAO's IDL compiler creates separate *C.h,
+ *C.inl, and *C.cpp. Pure client applications
only need to #include and link with these files.
- #include and link
- with these files. Generation of these files may be suppressed with the -SS option.
- *S.h, and
+ *S.cpp. Servers need to #include and link
+ with these files. Generation of these files may be suppressed with the ‑SS option.
+ *S_T.h, S_T.inl,
+ and *S_T.cpp. Some C++ compilers do not like template
and non-template code in the same files, so TAO's IDL compiler
generates these files separately. These files define tie classes,
used to enable servant inheritance trees, and are not generated by
default.
- *A.h,
+ and *A.cpp. Optionally generated files containing
typecode and Any insertion/extraction operator definitions.
This option enables the contents of these files to remain
unlinked if not used.
- *_svnt.h,
+ and *_svnt.cpp. Optionally generated files, containing component
and home servant implementations, as well as factory functions to create
components and homes.
- *E.idl.
IDL file containing local interfaces used for component and home
executors, optionally generated.
- *_exec.h,
+ and *_exec.cpp. Optionally generated files containing executor implementation classes
with empty function bodies for facet, supported and inherited operations,
as well as factory functions to create component and home executors.
- *_conn.h,
+ and *_conn.cpp. Optionally generated files containing connector implementation classes
with complete function bodies. The function implementations are specialized
for DDS at present, but will be configurable to other connection mechanisms
in the future.
- *_export.h.
Optionally generated files defining export/import macros as well as
corresponding macros related to singletons and tracing, all in terms of
existing ACE macros. Note that, while these files must have the
@@ -91,71 +115,76 @@ Generated Files
from the IDL filename, as is the stem of the other file groups above.
There can be as many as 4 of these files per build, for stub, skeleton,
servant, and executor export macros, and they may also be generated by
- the Perl script generate_export_file.pl, located in
- $ACE_ROOT/bin.
+ the Perl script generate_export_file.pl, located in
+ $ACE_ROOT/bin.
*.inl and *S_T.*
files to improve the performance of the generated code. For example,
-the *.inl files enable you to compile with inlining enabled or
+the *.inl files enable you to compile with inlining enabled or
not, which is useful for trading-off compile-time and run-time
-performance. Fortunately, you need to #include only the
-client stubs declared in the *C.h file and the skeletons in
-the *S.h file in your code. Inline files are not generated
+performance. Fortunately, you need to #include only the
+client stubs declared in the *C.h file and the skeletons in
+the *S.h file in your code. Inline files are not generated
for CIAO servant or executor implementation code.
-
Variable
- Usage
-
- TAO_IDL_PREPROCESSOR
- Used to override the program name of the preprocessor that TAO_IDL
- uses.
-
-
+ TAO_IDL_PREPROCESSOR_ARGS
- Used to override the flags passed to the preprocessor that TAO_IDL
+
+Environment Variables
+
+
+
+
+
+ Variable
+ Usage
+
+
+
+ TAO_IDL_PREPROCESSORUsed to override the program name of the preprocessor that TAO_IDL
+ uses.
+
+
+ TAO_IDL_PREPROCESSOR_ARGSUsed to override the flags passed to the preprocessor that TAO_IDL
uses. This can be used to alter the default options for the
preprocessor and specify things like include directories and how
- the preprocessor is invoked. Two flags that will always be passed to
- the preprocessor are -DIDL and -I..
-
- TAO_ROOT
- Used to determine where orb.idl is located.
-
- ACE_ROOT
- Used to determine where orb.idl is located.
-
-
-CIAO_ROOT
- Used to determine where
+ the preprocessor is invoked.
- Components.idl is located.
+
+
+ TAO_ROOTUsed to determine where
+ orb.idl is located.
+
+
+ ACE_ROOTUsed to determine where
+ gperf is located.
+
+
+ CIAO_ROOTUsed to determine where
+ Components.idl is located.
-
+
+
-TAO_IDL_PREPROCESSOR is defined, then it will use that.ACE_CC_PREPROCESSOR is defined, then it will use that.ccTAO_IDL_PREPROCESSOR_ARGS and
+ACE_CC_PREPROCESSOR_ARGS macros.TAO_IDL_PREPROCESSOR and
+TAO_IDL_PREPROCESSOR_ARGS.
In previous versions, the environment variables CPP_LOCATION and TAO_IDL_DEFAULT_CPP_FLAGS were used for this purpose. Both will still work, @@ -169,8 +198,47 @@
-
The preprocessor macros available in IDL include all the ones built-in to
+the preprocessor when it's being used for C/C++. In addition to the ones
+built-in to the preprocessor, the following are also defined by
+tao_idl:
| Name | +Description | +
|---|---|
__TAO_IDL |
+
+ The version of ACE that It's also possible to include |
+
__TAO_IDL_IDL_VERSION |
+ Version of the IDL specification the compiler that can be changed using
+ --idl-version. Note that this
+ doesn't mean that the compiler will support all those features of the
+ IDL spec version. The format is the same as __TAO_IDL,
+ which is three one-byte fields in a hex format. For example IDL version 3
+ is 0x030000.
+ |
+
ACE_HAS_GPERF when building ACE and TAO.
- This macro has been defined for the platforms where gperf
+ ACE_HAS_GPERF when building ACE and TAO.
+ This macro has been defined for the platforms where gperf
has been tested, which includes most platforms
- that ACE runs on. + that ACE runs on.
gperf in $ACE_ROOT/apps/gperf. This build
+ gperf in $ACE_ROOT/apps/gperf. This build
also leaves a copy/link of the ace_gperf program at the $ACE_ROOT/bin
- directory.+ directory.
+
$ACE_ROOT appropriately or add
+ $ACE_ROOT/bin to your search path.-g option for the TAO IDL compiler or set
- your search path accordingly to install ace_gperf in a
- directory other than $ACE_ROOT/bin.
+ ‑g option for the TAO IDL compiler or set
+ your search path accordingly to install ace_gperf in a
+ directory other than $ACE_ROOT/bin.
-
-
-
TAO_IDL can generate collocated stubs using two different collocation
strategies. It also allows you to suppress/enable the generation of
the stubs of a particular strategy. To gain great flexibility at
run-time, you can generate stubs for both collocation strategies
-(using both '-Gp' and '-Gd' flags at the same time) and defer the
+(using both '‑Gp' and '‑Gd' flags at the same time) and defer the
determination of collocation strategy until run-time. On the other
hand, if you want to minimize the footprint of your program, you might
want to pre-determine the collocation strategy you want and only
generate the right collocated stubs (or not generating any at all using
-both '-Sp' and '-Sd' flags at the same time if
+both '‑Sp' and '‑Sd' flags at the same time if
it's a pure client.) See our collocation
paper for a detail discussion on the collocation support in
-TAO.
+TAO.
--
+TAO's IDL compiler invokes your C (or C++) preprocessor to resolve included IDL files. It receives the common -options for preprocessors (such as -D or -I). It -also receives other options that are specific to it.
+options for preprocessors (such as ‑D or ‑I). It
+also receives other options that are specific to it.