summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam R. Otte <wotte@dre.vanderbilt.edu>2008-06-16 19:04:18 +0000
committerWilliam R. Otte <wotte@dre.vanderbilt.edu>2008-06-16 19:04:18 +0000
commit1742fa2cb78260781c1e771aeb7c6adab8e18995 (patch)
tree7ee69b29fb0e7fb7fb751173297bc8dddbf2599f
parentdf26d9c293d2eb6d0991e13174f314c0e4bd9554 (diff)
downloadATCD-1742fa2cb78260781c1e771aeb7c6adab8e18995.tar.gz
ChangeLogTag: Mon Jun 16 18:50:55 UTC 2008 William R. Otte <wotte@dre.vanderbilt.edu>
-rw-r--r--TAO/ChangeLog10
-rw-r--r--TAO/MPC/config/tao_idl_mcpp.mpb3
-rw-r--r--TAO/TAO_IDL/contrib/mcpp/main.cpp15
-rw-r--r--TAO/TAO_IDL/contrib/mcpp/noconfig.H7
-rw-r--r--TAO/TAO_IDL/contrib/mcpp/support.cpp4
-rw-r--r--TAO/TAO_IDL/contrib/mcpp/system.cpp11
6 files changed, 41 insertions, 9 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 39653649d44..ea806157c32 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,13 @@
+Mon Jun 16 18:50:55 UTC 2008 William R. Otte <wotte@dre.vanderbilt.edu>
+
+ * MPC/config/tao_idl_mcpp.mpb:
+ * TAO_IDL/contrib/mcpp/main.cpp:
+ * TAO_IDL/contrib/mcpp/noconfig.H:
+ * TAO_IDL/contrib/mcpp/support.cpp:
+ * TAO_IDL/contrib/mcpp/system.cpp:
+
+ Fixes for mcpp on Windows.
+
Mon Jun 16 18:13:21 UTC 2008 Abdullah Sowayan <abdullah.sowayan@lmco.com>
* examples/mfc/Resource.h:
diff --git a/TAO/MPC/config/tao_idl_mcpp.mpb b/TAO/MPC/config/tao_idl_mcpp.mpb
index 07b264b9041..d1135106360 100644
--- a/TAO/MPC/config/tao_idl_mcpp.mpb
+++ b/TAO/MPC/config/tao_idl_mcpp.mpb
@@ -1,6 +1,7 @@
// $Id$
feature(mcpp) : mcpp {
- macros += USE_MCPP_BUFFER_LEXING
+ macros += USE_MCPP_BUFFER_LEXING ACE_USE
+ macros += ACE_USING_MCPP_PREPROCESSOR
Source_Files {
$(TAO_ROOT)/TAO_IDL/driver/drv_mcpp_preproc.cpp
}
diff --git a/TAO/TAO_IDL/contrib/mcpp/main.cpp b/TAO/TAO_IDL/contrib/mcpp/main.cpp
index d3d8aa5d791..51ca172d0d6 100644
--- a/TAO/TAO_IDL/contrib/mcpp/main.cpp
+++ b/TAO/TAO_IDL/contrib/mcpp/main.cpp
@@ -222,10 +222,10 @@
int has_pragma = FALSE;
/* File pointers for input and output. */
- FILE * fp_in; /* Input stream to preprocess */
- FILE * fp_out; /* Output stream preprocessed */
- FILE * fp_err; /* Diagnostics stream */
- FILE * fp_debug; /* Debugging information stream */
+ FILE * fp_in = 0; /* Input stream to preprocess */
+ FILE * fp_out = 0; /* Output stream preprocessed */
+ FILE * fp_err = 0; /* Diagnostics stream */
+ FILE * fp_debug = 0; /* Debugging information stream */
/* Variables on multi-byte character encodings. */
int mbchar = MBCHAR; /* Encoding of multi-byte char */
@@ -334,7 +334,7 @@ int main
char * in_file = 0;
char * out_file = 0;
- if (setjmp( error_exit) == -1)
+ if (setjmp( error_exit) != 0)
{
ACE_DEBUG ((LM_DEBUG, "setjmp failed\n"));
goto fatal_error_exit;
@@ -433,7 +433,10 @@ fatal_error_exit:
return IO_ERROR;
}
- ACE_OS::fclose (fp_out);
+ if (fp_out != 0)
+ {
+ ACE_OS::fclose (fp_out);
+ }
return IO_SUCCESS; /* No errors or -E option set */
}
diff --git a/TAO/TAO_IDL/contrib/mcpp/noconfig.H b/TAO/TAO_IDL/contrib/mcpp/noconfig.H
index 35fb6c8a1a3..2c74fbc24b0 100644
--- a/TAO/TAO_IDL/contrib/mcpp/noconfig.H
+++ b/TAO/TAO_IDL/contrib/mcpp/noconfig.H
@@ -13,9 +13,14 @@
* 'Target' means the O.S. and the compiler to which cpp is implemented.
* 'Host' means the O.S. and the compiler with which cpp is compiled.
*/
+#include "ace/config.h"
/* Define target operating-system. */
-#define SYSTEM SYS_FREEBSD
+#ifdef ACE_WIN32
+#define SYSTEM SYS_WIN
+#else
+#define SYSTEM SYS_UNIX
+#endif
/* Define target compiler. */
#ifndef COMPILER
diff --git a/TAO/TAO_IDL/contrib/mcpp/support.cpp b/TAO/TAO_IDL/contrib/mcpp/support.cpp
index 44a8760df32..311faa6f45b 100644
--- a/TAO/TAO_IDL/contrib/mcpp/support.cpp
+++ b/TAO/TAO_IDL/contrib/mcpp/support.cpp
@@ -712,7 +712,9 @@ char * scan_quote(
const char * const unterm_char
= "Unterminated character constant %s%.0ld%s";
const char * skip;
+#if MBCHAR
size_t len;
+#endif
int c;
char * out_p = out;
@@ -802,7 +804,9 @@ escape:
"Illegal control character %.0s0lx%02x in quotation" /* _W1_ */
, 0, (long) c, 0);
*out_p++ = c;
+#if MBCHAR
chk_limit:
+#endif
if (out_end < out_p) {
*out_end = EOS;
cfatal( "Too long quotation", 0, 0L, 0); /* _F_ */
diff --git a/TAO/TAO_IDL/contrib/mcpp/system.cpp b/TAO/TAO_IDL/contrib/mcpp/system.cpp
index bb547cfaca5..8cd7d0779ec 100644
--- a/TAO/TAO_IDL/contrib/mcpp/system.cpp
+++ b/TAO/TAO_IDL/contrib/mcpp/system.cpp
@@ -19,7 +19,7 @@
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+v * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
@@ -49,6 +49,7 @@
#include "ace/OS_NS_ctype.h"
#include "ace/OS_NS_time.h"
#include "ace/OS_NS_stdlib.h"
+#include "ace/Log_Msg.h"
#undef OUT
@@ -87,6 +88,7 @@ extern char * optarg;
#define OBJEXT "obj"
#elif 1
/* Add here appropriate definitions for other systems. */
+#error "Bad SYS_FAMILY"
#endif
#endif
@@ -612,6 +614,7 @@ plus:
case 'F':
if (str_eq( optarg, "l")) { /* -Fl */
if (preinc_end >= &preinclude[ NPREINCLUDE]) {
+ ACE_ERROR ((LM_ERROR, "Too many -Fl options\n"));
mcpp_fputs( "Too many -Fl options.\n", ERR);
longjmp( error_exit, -1);
}
@@ -627,11 +630,13 @@ plus:
if (str_eq( optarg, "nclude")) { /* -include */
if (preinc_end >= &preinclude[ NPREINCLUDE]) {
mcpp_fputs( "Too many -include options.\n", ERR);
+ ACE_ERROR((LM_ERROR, "Too many -include options\n"));
longjmp( error_exit, -1);
}
*preinc_end++ = argv[ optind++];
} else if (str_eq( optarg, "system")) { /* -isystem */
if (sysdir_end >= &sysdir[ NSYSDIR]) {
+ ACE_ERROR ((LM_ERROR, "Too many -isystem options\n"));
mcpp_fputs( "Too many -isystem options.\n", ERR);
longjmp( error_exit, -1);
}
@@ -1338,7 +1343,11 @@ static void usage(
mes[ 1] = argv0;
#endif
while (*mpp)
+ {
+ ACE_ERROR ((LM_ERROR, "%s\n", *mpp));
mcpp_fputs( *mpp++, ERR);
+ }
+
longjmp( error_exit, -1);
}