summaryrefslogtreecommitdiff
path: root/examples/APG/Logging/Trace_Return.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/APG/Logging/Trace_Return.cpp')
-rw-r--r--examples/APG/Logging/Trace_Return.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/examples/APG/Logging/Trace_Return.cpp b/examples/APG/Logging/Trace_Return.cpp
index d466abc43c1..1bb32a03456 100644
--- a/examples/APG/Logging/Trace_Return.cpp
+++ b/examples/APG/Logging/Trace_Return.cpp
@@ -1,17 +1,19 @@
// $Id$
-#if defined (__GNUC__) && (__GNUC__ >= 3 || __GNUC_MINOR__ > 95)
+#include "Trace.h"
+
+#if defined (__GNUC__) && (__GNUC__ >= 3 || __GNUC_MINOR__ > 95) && \
+ (!defined (VXWORKS) || !(__GNUC__ == 2 && __GNUC_MINOR__ == 96))
// The DEBUG stuff only works with g++ 2.96 and later.
+// But not with VxWorks g++ 2.96.
// Listing 1 code/ch03
-#include "Trace.h"
-
void foo (void);
int ACE_TMAIN (int, ACE_TCHAR *[])
{
- TRACE (ACE_TEXT ("main"));
-
+ TRACE ("main");
+
MY_DEBUG (ACE_TEXT ("Hi Mom\n"));
foo ();
MY_DEBUG (ACE_TEXT ("Goodnight\n"));
@@ -21,7 +23,7 @@ int ACE_TMAIN (int, ACE_TCHAR *[])
void foo (void)
{
- TRACE (ACE_TEXT ("foo"));
+ TRACE ("foo");
MY_DEBUG (ACE_TEXT ("Howdy Pardner\n"));
TRACE_RETURN_VOID ();
}
@@ -30,7 +32,7 @@ void foo (void)
#else
#include <stdio.h>
-int main (int, char *[])
+int ACE_TMAIN (int, ACE_TCHAR *[])
{
puts ("This example only works on g++ 2.96 and later.\n");
return 0;