diff options
-rw-r--r-- | ChangeLog | 15 | ||||
-rw-r--r-- | ace/Global_Macros.h | 14 | ||||
-rw-r--r-- | ace/config-all.h | 38 | ||||
-rw-r--r-- | ace/config-lite.h | 7 | ||||
-rw-r--r-- | examples/ASX/Event_Server/Event_Server/Options.cpp | 3 | ||||
-rw-r--r-- | examples/ASX/UPIPE_Event_Server/Options.cpp | 3 |
6 files changed, 59 insertions, 21 deletions
diff --git a/ChangeLog b/ChangeLog index 9e6e039f6bd..6cd7e9505be 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +Sun Jan 25 20:46:03 UTC 2004 Don Hinton <dhinton@dre.vanderbilt.edu> + + * ace/Global_Macros.h: + * ace/config-lite.h: + * ace/config-all.h: + Moved the ACE_TRACE defines from Global_Macros.h to config-all. + and ACE_OS_TRACE from config-lite.h to config-all.h, and added + ACE_OS_NTRACE to config-all.h with the same symantics. Thanks + to Johnny Willemsen <jwillemsen@remedy.nl> for motivating this + change. + + * examples/ASX/Event_Server/Event_Server/Options.cpp: + * examples/ASX/UPIPE_Event_Server/Options.cpp: + Added #include OS_NS_strings.h if ACE_HAS_TRACE is defined. + Sun Jan 25 15:55:13 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl> * ace/OS_NS_stdio.h: diff --git a/ace/Global_Macros.h b/ace/Global_Macros.h index 0811f951faa..0354eb48ba9 100644 --- a/ace/Global_Macros.h +++ b/ace/Global_Macros.h @@ -139,20 +139,6 @@ friend class ace_dewarn_gplusplus // ---------------------------------------------------------------- -# define ACE_TRACE_IMPL(X) ACE_Trace ____ (ACE_LIB_TEXT (X), __LINE__, ACE_LIB_TEXT (__FILE__)) - -# if (ACE_NTRACE == 1) -# define ACE_TRACE(X) -# else -# if !defined (ACE_HAS_TRACE) -# define ACE_HAS_TRACE -# endif /* ACE_HAS_TRACE */ -# define ACE_TRACE(X) ACE_TRACE_IMPL(X) -# include "ace/Trace.h" -# endif /* ACE_NTRACE */ - -// ---------------------------------------------------------------- - // Convenient macro for testing for deadlock, as well as for detecting // when mutexes fail. #define ACE_GUARD_ACTION(MUTEX, OBJ, LOCK, ACTION, REACTION) \ diff --git a/ace/config-all.h b/ace/config-all.h index e7b673a5b46..8955a5153b2 100644 --- a/ace/config-all.h +++ b/ace/config-all.h @@ -63,6 +63,44 @@ // Keep this at the bottom of the file. It contains the main macros. #include "ace/OS_main.h" +// ---------------------------------------------------------------- + +# define ACE_TRACE_IMPL(X) ACE_Trace ____ (ACE_LIB_TEXT (X), __LINE__, ACE_LIB_TEXT (__FILE__)) + +// By default tracing is turned off. +#if !defined (ACE_NTRACE) +# define ACE_NTRACE 1 +#endif /* ACE_NTRACE */ + +#if (ACE_NTRACE == 1) +# define ACE_TRACE(X) +#else +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define ACE_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Global_Macros.h" +# include "ace/Trace.h" +#endif /* ACE_NTRACE */ + +// By default we perform no tracing on the OS layer, otherwise the +// coupling between the OS layer and Log_Msg is too tight. But the +// application can override the default if they wish to. +#if !defined (ACE_OS_NTRACE) +# define ACE_OS_NTRACE 1 +#endif /* ACE_OS_NTRACE */ + +#if (ACE_OS_NTRACE == 1) +# define ACE_OS_TRACE(X) +#else +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define ACE_OS_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Global_Macros.h" +# include "ace/Trace.h" +#endif /* ACE_OS_NTRACE */ + #include /**/ "ace/post.h" #endif /* ACE_CONFIG_ALL_H */ diff --git a/ace/config-lite.h b/ace/config-lite.h index 9350baeefcb..96f57b55449 100644 --- a/ace/config-lite.h +++ b/ace/config-lite.h @@ -37,13 +37,6 @@ # endif /* ACE_HAS_XTI */ #endif /* ACE_HAS_TLI */ -// By default we perform no tracing on the OS layer, otherwise the -// coupling between the OS layer and Log_Msg is too tight. But the -// application can override the default if they wish to. -# if !defined(ACE_OS_TRACE) -# define ACE_OS_TRACE(X) -# endif /* ACE_OS_TRACE */ - #define ACE_BITS_PER_ULONG (8 * sizeof (u_long)) #if !defined (ACE_OSTREAM_TYPE) diff --git a/examples/ASX/Event_Server/Event_Server/Options.cpp b/examples/ASX/Event_Server/Event_Server/Options.cpp index d35c10b6387..c3c2258eeb3 100644 --- a/examples/ASX/Event_Server/Event_Server/Options.cpp +++ b/examples/ASX/Event_Server/Event_Server/Options.cpp @@ -4,6 +4,9 @@ #include "ace/Thread.h" #include "ace/Log_Msg.h" #include "ace/OS_NS_stdio.h" +#if defined (ACE_HAS_TRACE) +# include "ace/OS_NS_strings.h" +#endif /* ACE_HAS_TRACE */ #include "Options.h" diff --git a/examples/ASX/UPIPE_Event_Server/Options.cpp b/examples/ASX/UPIPE_Event_Server/Options.cpp index c61582af61c..bb7bb3e962d 100644 --- a/examples/ASX/UPIPE_Event_Server/Options.cpp +++ b/examples/ASX/UPIPE_Event_Server/Options.cpp @@ -4,6 +4,9 @@ #include "ace/Log_Msg.h" #include "ace/OS_NS_Thread.h" #include "ace/OS_NS_stdio.h" +#if defined (ACE_HAS_TRACE) +# include "ace/OS_NS_strings.h" +#endif /* ACE_HAS_TRACE */ #include "Options.h" |