diff options
author | William R. Otte <wotte@dre.vanderbilt.edu> | 2008-05-31 01:12:22 +0000 |
---|---|---|
committer | William R. Otte <wotte@dre.vanderbilt.edu> | 2008-05-31 01:12:22 +0000 |
commit | 16ddf67b511f7668f9fd5a8e9c242291cdeb72cb (patch) | |
tree | 182c4459c36803c468b8202539fea6780bf882a1 | |
parent | 247c9f0ffe4d2b3ed2303181368249dbb5bb9f97 (diff) | |
download | ATCD-16ddf67b511f7668f9fd5a8e9c242291cdeb72cb.tar.gz |
ChangeLogTag: Sat May 31 01:10:02 UTC 2008 William R. Otte <wotte@dre.vanderbilt.edu>
-rw-r--r-- | TAO/ChangeLog | 12 | ||||
-rw-r--r-- | TAO/TAO_IDL/contrib/mcpp/configed.H | 4 | ||||
-rw-r--r-- | TAO/TAO_IDL/contrib/mcpp/noconfig.H | 8 | ||||
-rw-r--r-- | TAO/TAO_IDL/contrib/mcpp/system.cpp | 6 | ||||
-rw-r--r-- | TAO/TAO_IDL/driver/drv_mcpp_preproc.cpp | 31 |
5 files changed, 53 insertions, 8 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index b75ade313c8..7d7847d976a 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,15 @@ +Sat May 31 01:10:02 UTC 2008 William R. Otte <wotte@dre.vanderbilt.edu> + + * TAO_IDL/contrib/mcpp/configed.H: + * TAO_IDL/contrib/mcpp/noconfig.H: + * TAO_IDL/contrib/mcpp/system.cpp: + + Changes to make generated output more similar to that of GCC. + + * TAO_IDL/driver/drv_mcpp_preproc.cpp: + + Fixed a bug which resulted in includes not being properly generated. + Fri May 30 23:32:47 UTC 2008 J.T. Conklin <jtc@acorntoolworks.com> * orbsvcs/orbsvcs/Log/LogNotification.cpp: diff --git a/TAO/TAO_IDL/contrib/mcpp/configed.H b/TAO/TAO_IDL/contrib/mcpp/configed.H index 22b27ecd348..059688770d9 100644 --- a/TAO/TAO_IDL/contrib/mcpp/configed.H +++ b/TAO/TAO_IDL/contrib/mcpp/configed.H @@ -201,8 +201,8 @@ #if COMPILER == INDEPENDENT /* specifications of compiler-independent-build */ -#define LINE_PREFIX "#line " -#define STD_LINE_PREFIX TRUE /* Output #line by C source format */ +#define LINE_PREFIX "# " +#define STD_LINE_PREFIX FALSE /* Output #line by C source format */ #define HAVE_DIGRAPHS TRUE /* Output digraphs as it is */ #define SEARCH_INIT SOURCE /* Include directory relative to source */ #define SJIS_IS_ESCAPE_FREE TRUE /* Do not treat SJIS specially */ diff --git a/TAO/TAO_IDL/contrib/mcpp/noconfig.H b/TAO/TAO_IDL/contrib/mcpp/noconfig.H index 15623d3a62a..35fb6c8a1a3 100644 --- a/TAO/TAO_IDL/contrib/mcpp/noconfig.H +++ b/TAO/TAO_IDL/contrib/mcpp/noconfig.H @@ -210,8 +210,8 @@ #if COMPILER == INDEPENDENT /* specifications of compiler-independent build */ -#define LINE_PREFIX "#line " -#define STD_LINE_PREFIX TRUE /* Output #line by C source format */ +#define LINE_PREFIX "# " +#define STD_LINE_PREFIX FALSE /* Output #line by C source format */ #define HAVE_DIGRAPHS TRUE /* Output digraphs as it is */ #define SEARCH_INIT SOURCE /* Include directory relative to source */ #define SJIS_IS_ESCAPE_FREE TRUE /* Do not treat SJIS specially */ @@ -262,8 +262,8 @@ #endif #ifndef LINE_PREFIX -#define LINE_PREFIX "#line " -#define STD_LINE_PREFIX TRUE /* C source format */ +#define LINE_PREFIX "# " +#define STD_LINE_PREFIX FALSE /* C source format */ #else #ifndef STD_LINE_PREFIX #define STD_LINE_PREFIX FALSE /* Compiler-dependent format */ diff --git a/TAO/TAO_IDL/contrib/mcpp/system.cpp b/TAO/TAO_IDL/contrib/mcpp/system.cpp index b8e67c31a11..3d9679570cf 100644 --- a/TAO/TAO_IDL/contrib/mcpp/system.cpp +++ b/TAO/TAO_IDL/contrib/mcpp/system.cpp @@ -1921,7 +1921,6 @@ static char * norm_path( static size_t mingw_dir_len; #endif #endif - ACE_OS::strcpy( slbuf1, dir); /* Include directory */ len = ACE_OS::strlen( slbuf1); if (len && slbuf1[ len - 1] != PATH_DELIM) { @@ -2538,7 +2537,10 @@ int do_include( int token_type; char * fname; int delim; /* " or <, > */ - + + // WO: sharp here to capture line info from includer + sharp (); + if ((delim = skip_ws()) == '\n') { /* No argument */ cerror( no_name, 0, 0L, 0); return FALSE; diff --git a/TAO/TAO_IDL/driver/drv_mcpp_preproc.cpp b/TAO/TAO_IDL/driver/drv_mcpp_preproc.cpp index 31a8c223b17..b6d42ebaecb 100644 --- a/TAO/TAO_IDL/driver/drv_mcpp_preproc.cpp +++ b/TAO/TAO_IDL/driver/drv_mcpp_preproc.cpp @@ -904,6 +904,34 @@ DRV_stripped_name (char *fn) return n; } +static void +DRV_check_file_for_includes (const char *filename) +{ + FILE * const fin = ACE_OS::fopen (filename, "r"); + if (fin == 0) + { + ACE_ERROR ((LM_ERROR, + "%s%s", + idl_global->prog_name (), + ": cannot open input file\n")); + + throw Bailout (); + } + + while (DRV_get_line (fin)) + { + DRV_convert_includes (drv_line); + + // We really need to know whether this line is a "#include + // ...". If so, we would like to separate the "file name" and + // keep that in the idl_global. We need them to produce + // "#include's in the stubs and skeletons. + DRV_check_for_include (drv_line); + } + + ACE_OS::fclose(fin); +} + // Pass input through preprocessor. void DRV_pre_proc (const char *myfile) @@ -956,6 +984,9 @@ DRV_pre_proc (const char *myfile) ACE_OS::close (tf_fd); + // + + DRV_check_file_for_includes (myfile); #if defined (ACE_OPENVMS) { |