Index: inc/rtl/instance.hxx =================================================================== RCS file: /cvs/porting/sal/inc/rtl/instance.hxx,v retrieving revision 1.8 diff -u -r1.8 instance.hxx --- openoffice.org.orig/sal/inc/rtl/instance.hxx 8 Sep 2005 14:37:41 -0000 1.8 +++ openoffice.org/sal/inc/rtl/instance.hxx 13 Jul 2006 11:00:59 -0000 @@ -43,6 +43,10 @@ #include "osl/getglobalmutex.hxx" #endif +#if defined (_MSC_VER) || defined ( GCC ) +#define NOT_CLASSMEMBER_INSTANCE +#endif + namespace { /** A non-broken version of the double-checked locking pattern. @@ -286,9 +290,9 @@ public: static inline Inst * create(InstCtor aInstCtor, GuardCtor aGuardCtor) { -#if defined _MSC_VER +#if defined NOT_CLASSMEMBER_INSTANCE static Inst * m_pInstance = 0; -#endif // _MSC_VER +#endif // NOT_CLASSMEMBER_INSTANCE Inst * p = m_pInstance; if (!p) { @@ -309,9 +313,9 @@ static inline Inst * create(InstCtor aInstCtor, GuardCtor aGuardCtor, DataCtor aDataCtor) { -#if defined _MSC_VER +#if defined NOT_CLASSMEMBER_INSTANCE static Inst * m_pInstance = 0; -#endif // _MSC_VER +#endif // NOT_CLASSMEMBER_INSTANCE Inst * p = m_pInstance; if (!p) { @@ -331,19 +335,19 @@ } private: -#if !defined _MSC_VER +#if !defined NOT_CLASSMEMBER_INSTANCE static Inst * m_pInstance; -#endif // _MSC_VER +#endif // NOT_CLASSMEMBER_INSTANCE }; -#if !defined _MSC_VER +#if !defined NOT_CLASSMEMBER_INSTANCE template< typename Inst, typename InstCtor, typename Guard, typename GuardCtor, typename Data, typename DataCtor > Inst * rtl_Instance< Inst, InstCtor, Guard, GuardCtor, Data, DataCtor >::m_pInstance = 0; -#endif // _MSC_VER +#endif // NOT_CLASSMEMBER_INSTANCE }