*** pgadmin/include/pgscript/stack.hh.orig	2009-03-12 11:49:00.000000000 +0100
--- pgadmin/include/pgscript/stack.hh	2009-09-09 16:59:36.293620606 +0200
***************
*** 35,40 ****
--- 35,47 ----
  #ifndef BISON_STACK_HH
  # define BISON_STACK_HH
  
+ #if defined(__SUNPRO_CC)
+ #ifdef _T
+ #undef _T
+ #define _T_is_defined
+ #endif
+ #endif /*__SUNPRO_CC */
+ 
  #include <deque>
  
  namespace pgscript
***************
*** 126,129 ****
--- 133,149 ----
    };
  }
  
+ #if defined(__SUNPRO_CC)
+ #ifdef _T_is_defined
+ #undef _T_is_defined
+ /* we need to define it back only if _T already was defined. */
+ #if !wxUSE_UNICODE
+ #define _T(x) x
+ #else /* Unicode */
+ /* use wxCONCAT_HELPER so that x could be expanded if it's a macro */
+ #define _T(x) wxCONCAT_HELPER(L, x)
+ #endif /* ASCII/Unicode */
+ #endif /* T_is_defined */
+ #endif /*__SUNPRO_CC */
+ 
  #endif // not BISON_STACK_HH
