This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[v3] fix duplicate symbol errors in __timepunct



Sorry folks. I forgot to declare specializations for _M_put_helper,
thus the duplicate symbols. Fixed with this.

-benjamin

tested x86/linux

2001-10-19  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/locale_facets.h (__timepunct::_M_put_helper):
	Declare specializations for char, wchar_t.

Index: include/bits/locale_facets.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/locale_facets.h,v
retrieving revision 1.23
diff -c -p -r1.23 locale_facets.h
*** locale_facets.h	2001/10/02 18:44:39	1.23
--- locale_facets.h	2001/10/19 09:18:51
*************** namespace std
*** 1250,1259 ****
--- 1250,1284 ----
    template<typename _CharT>
      locale::id __timepunct<_CharT>::id;
  
+   // Specializations.
    template<> 
      const char*
      __timepunct<char>::_S_timezones[14];
  
+   template<> 
+     void
+     __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc);
+ 
+   template<>
+     void
+     __timepunct<char>::_M_put_helper(char*, size_t, const char*, 
+ 				     const tm*) const;
+ 
+ #ifdef _GLIBCPP_USE_WCHAR_T
+   template<> 
+     const wchar_t*
+     __timepunct<wchar_t>::_S_timezones[14];
+ 
+   template<> 
+     void
+     __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc);
+ 
+   template<>
+     void
+     __timepunct<wchar_t>::_M_put_helper(wchar_t*, size_t, const wchar_t*, 
+ 					const tm*) const;
+ #endif
+ 
    // Generic.
    template<typename _CharT>
      const _CharT* __timepunct<_CharT>::_S_timezones[14];
*************** namespace std
*** 1270,1289 ****
      __timepunct<_CharT>::_M_put_helper(_CharT*, size_t, const _CharT*, 
  				       const tm*) const
      { }
- 
-   template<> 
-     void
-     __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc);
- 
- #ifdef _GLIBCPP_USE_WCHAR_T
-   template<> 
-     const wchar_t*
-     __timepunct<wchar_t>::_S_timezones[14];
- 
-   template<> 
-     void
-     __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc);
- #endif
  
    template<typename _CharT, typename _InIter>
      class time_get : public locale::facet, public time_base
--- 1295,1300 ----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]