commit 7b0485dbb280ed30959634c523f302bceb8a8d97
Author: Georg Baum <[email protected]>
Date:   Sun May 10 10:01:33 2015 +0200

    Remove gcc 3 traces
    
    We claim that gcc 4.x is needed in INSTALL, so it does not make sense to 
keep
    this old stuff. Instead, I made configure output an error if gcc is too old.

diff --git a/config/lyxinclude.m4 b/config/lyxinclude.m4
index f343fbe..c9cb11d 100644
--- a/config/lyxinclude.m4
+++ b/config/lyxinclude.m4
@@ -293,10 +293,7 @@ if test x$GXX = xyes; then
   dnl Warnings are for preprocessor too
   if test x$enable_warnings = xyes ; then
       case $gxx_version in
-          3.1*|3.2*|3.3*)
-              AM_CPPFLAGS="$AM_CPPFLAGS -Wall -W"
-              ;;
-          3.4*|4.0*|4.1*|4.2*|4.3*|4.4*|4.5*|4.6*|4.7*|4.8*|clang)
+          4.0*|4.1*|4.2*|4.3*|4.4*|4.5*|4.6*|4.7*|4.8*|clang)
               AM_CPPFLAGS="$AM_CPPFLAGS -Wall -Wextra"
               ;;
           *)
@@ -305,15 +302,13 @@ if test x$GXX = xyes; then
       esac
   fi
   case $gxx_version in
-      3.1*)    AM_CXXFLAGS="$AM_CXXFLAGS -finline-limit=500";;
-      3.2*|3.3*) ;;
+      2.*|3.*) AC_ERROR([gcc 4.x is required]);;
       *)  test $enable_pch = yes && lyx_pch_comp=yes ;;
   esac
   if test x$enable_stdlib_debug = xyes ; then
     dnl FIXME: for clang/libc++, one should define _LIBCPP_DEBUG2=0
     dnl See 
http://clang-developers.42468.n3.nabble.com/libc-debug-mode-td3336742.html
     case $gxx_version in
-      3.1*|3.2*|3.3*) ;;
       *)
         lyx_flags="$lyx_flags stdlib-debug"
        AC_DEFINE(_GLIBCXX_DEBUG, 1, [libstdc++ debug mode])
@@ -323,20 +318,16 @@ if test x$GXX = xyes; then
   fi
   if test x$enable_concept_checks = xyes ; then
     case $gxx_version in
-      3.3*)
+      4.*)
         lyx_flags="$lyx_flags concept-checks"
        dnl FIXME check whether this makes sense with clang/libc++
-        AC_DEFINE(_GLIBCPP_CONCEPT_CHECKS, 1, [libstdc++ concept checking])
-       ;;
-      3.4*|4.*)
-        lyx_flags="$lyx_flags concept-checks"
        AC_DEFINE(_GLIBCXX_CONCEPT_CHECKS, 1, [libstdc++ concept checking])
        ;;
     esac
   fi
   if test x$enable_cxx11 = xyes ; then
     case $gxx_version in
-      3.*|4.0*|4.1*|4.2*) AC_ERROR([There is no C++11 support in gcc 3.x]);;
+      4.0*|4.1*|4.2*) AC_ERROR([There is no C++11 support in gcc 4.2 or 
older]);;
       4.3*|4.4*|4.5*|4.6*)
         lyx_flags="$lyx_flags c++11-mode"
        AM_CXXFLAGS="$AM_CXXFLAGS -std=gnu++0x";;
@@ -354,7 +345,7 @@ if test x$GXX = xyes; then
       dnl <regex> in gcc is unusable in versions less than 4.9.0
       dnl see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53631
       case $gxx_version in
-        3.*|4.0*|4.1*|4.2*|4.3*|4.4*|4.5*|4.6*|4.7*|4.8*) ;;
+        4.0*|4.1*|4.2*|4.3*|4.4*|4.5*|4.6*|4.7*|4.8*) ;;
        *) lyx_flags="$lyx_flags stdregex"
           lyx_std_regex=yes
            ;;
diff --git a/src/support/docstream.cpp b/src/support/docstream.cpp
index 34008cb..f6548e1 100644
--- a/src/support/docstream.cpp
+++ b/src/support/docstream.cpp
@@ -451,17 +451,6 @@ bool codecvt<lyx::char_type, char, 
mbstate_t>::do_always_noconv() const throw()
        return true;
 }
 
-#if __GNUC__ == 3 && __GNUC_MINOR__ < 4
-
-template<>
-int codecvt<lyx::char_type, char, mbstate_t>::do_length(
-       mbstate_t const &, const char *, const char *, size_t) const
-{
-       return 1;
-}
-
-#else
-
 template<>
 int codecvt<lyx::char_type, char, mbstate_t>::do_length(
        mbstate_t &, const char *, const char *, size_t) const
@@ -469,8 +458,6 @@ int codecvt<lyx::char_type, char, mbstate_t>::do_length(
        return 1;
 }
 
-#endif
-
 template<>
 int codecvt<lyx::char_type, char, mbstate_t>::do_max_length() const throw()
 {
diff --git a/src/support/docstring.h b/src/support/docstring.h
index 096bc00..2c2901b 100644
--- a/src/support/docstring.h
+++ b/src/support/docstring.h
@@ -93,121 +93,4 @@ docstring & operator+=(docstring & l, char r);
 
 } // namespace lyx
 
-
-#if ! defined(USE_WCHAR_T) && defined(__GNUC__) && defined(__GNUC_MINOR__) && 
__GNUC__ == 3 && __GNUC_MINOR__ < 4
-// Missing char_traits methods in gcc 3.3 and older. Taken from gcc 4.2svn.
-namespace std {
-
-template<typename T> void
-char_traits<T>::assign(char_type & c1, char_type const & c2)
-{
-       c1 = c2;
-}
-
-
-template<typename T> bool
-char_traits<T>::eq(char_type const & c1, char_type const & c2)
-{
-       return c1 == c2;
-}
-
-
-template<typename T> bool
-char_traits<T>::lt(char_type const & c1, char_type const & c2)
-{
-       return c1 < c2;
-}
-
-
-template<typename T> int
-char_traits<T>::compare(char_type const * s1, char_type const * s2, 
std::size_t n)
-{
-       for (std::size_t i = 0; i < n; ++i)
-               if (lt(s1[i], s2[i]))
-                       return -1;
-               else if (lt(s2[i], s1[i]))
-                       return 1;
-       return 0;
-}
-
-
-template<typename T> std::size_t
-char_traits<T>::length(char_type const * p)
-{
-       std::size_t i = 0;
-       while (!eq(p[i], char_type()))
-               ++i;
-       return i;
-}
-
-
-template<typename T> typename char_traits<T>::char_type const *
-char_traits<T>::find(char_type const * s, size_t n, char_type const & a)
-{
-       for (std::size_t i = 0; i < n; ++i)
-               if (eq(s[i], a))
-                       return s + i;
-       return 0;
-}
-
-
-template<typename T> typename char_traits<T>::char_type *
-char_traits<T>::move(char_type * s1, char_type const * s2, std::size_t n)
-{
-       return static_cast<T *>(std::memmove(s1, s2, n * sizeof(char_type)));
-}
-
-
-template<typename T> typename char_traits<T>::char_type *
-char_traits<T>::copy(char_type * s1, char_type const * s2, std::size_t n)
-{
-       std::copy(s2, s2 + n, s1);
-       return s1;
-}
-
-
-template<typename T> typename char_traits<T>::char_type *
-char_traits<T>::assign(char_type * s, std::size_t n, char_type a)
-{
-       std::fill_n(s, n, a);
-       return s;
-}
-
-
-template<typename T> typename char_traits<T>::char_type
-char_traits<T>::to_char_type(int_type const & c)
-{
-       return static_cast<char_type>(c);
-}
-
-
-template<typename T> typename char_traits<T>::int_type
-char_traits<T>::to_int_type(char_type const & c)
-{
-       return static_cast<int_type>(c);
-}
-
-
-template<typename T> bool
-char_traits<T>::eq_int_type(int_type const & c1, int_type const & c2)
-{
-       return c1 == c2;
-}
-
-
-template<typename T> typename char_traits<T>::int_type
-char_traits<T>::eof()
-{
-       return static_cast<int_type>(EOF);
-}
-
-
-template<typename T> typename char_traits<T>::int_type
-char_traits<T>::not_eof(int_type const & c)
-{
-       return !eq_int_type(c, eof()) ? c : to_int_type(char_type());
-}
-
-}
-#endif
 #endif

Reply via email to