+#ifdef __WATCOMC__
+
+// WATCOM-FIXME: C++ of Open Watcom 1.3 doesn't like OnScopeExit() created
+// through template so it must be workarounded with dedicated inlined macro.
+// For compatibility with Watcom compilers wxPrivate::OnScopeExit must be
+// replaced with wxPrivateOnScopeExit but in user code (for everyone who
+// doesn't care about OW compatibility) wxPrivate::OnScopeExit still works.
+
+#define wxPrivateOnScopeExit(guard) \
+ { \
+ if ( !(guard).WasDismissed() ) \
+ { \
+ wxTRY \
+ { \
+ (guard).Execute(); \
+ } \
+ wxCATCH_ALL(;) \
+ } \
+ }
+
+#define wxPrivateUse(n) wxUnusedVar(n)
+
+#else
+
+#if !defined(__GNUC__) || wxCHECK_GCC_VERSION(2, 95)
+// namespace support was first implemented in gcc-2.95,
+// so avoid using it for older versions.