Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Sep 2002 22:58:16 -0400
From:      Craig Rodrigues <rodrigc@attbi.com>
To:        ijliao@freebsd.org
Cc:        freebsd-ports@freebsd.org
Subject:   devel/clint fixes for new compiler
Message-ID:  <20020906225816.A11342@attbi.com>

next in thread | raw e-mail | index | archive | help

--ReaqsoxgOBHFXBhH
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi,

I am attaching two patches for the devel/clint port that fix
C++ problems so that it compiles with GCC 3.2.

pkg-plist must be updated with the following patch:


--- pkg-plist.orig	Fri Sep  6 21:42:57 2002
+++ pkg-plist	Fri Sep  6 21:46:22 2002
@@ -7,6 +7,8 @@
 @exec install-info %D/info/clint.info %D/info/dir
 lib/clint/python.a
 lib/clint/python.la
+lib/clint/python.so
+lib/clint/python.so.0
 lib/libpython++.a
 lib/libpython++.la
 lib/libpython++.so


The attached file patch-clint must be added to the files
directory of the port.

-- 
Craig Rodrigues        
http://www.gis.net/~craigr    
rodrigc@attbi.com

--ReaqsoxgOBHFXBhH
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=patch-clint

--- ./lib/python/python.h.orig	Fri Sep  6 21:53:18 2002
+++ ./lib/python/python.h	Fri Sep  6 21:56:38 2002
@@ -12,13 +12,17 @@
 #include "debug.h"
 
 // I hate #define macros, seee if I can remove this
-#define STANDARD_LIBRARY_HAS_ITERATOR_TRAITS 1
+#define STANDARD_LIBRARY_HAS_RANDOM_ACCESS_ITERATOR 1
 #ifdef MS_WIN32
-#  undef STANDARD_LIBRARY_HAS_ITERATOR_TRAITS
-#  define STANDARD_LIBRARY_HAS_ITERATOR_TRAITS 0
+#  undef STANDARD_LIBRARY_HAS_RANDOM_ACCESS_ITERATOR
+#  define STANDARD_LIBRARY_HAS_RANDOM_ACCESS_ITERATOR 0
 #endif
 
-#if STANDARD_LIBRARY_HAS_ITERATOR_TRAITS
+#if defined (__GNUG__) && (__GNUG__ >= 3)
+#  undef STANDARD_LIBRARY_HAS_RANDOM_ACCESS_ITERATOR
+#endif
+
+#if STANDARD_LIBRARY_HAS_RANDOM_ACCESS_ITERATOR
 #  define random_access_iterator_parent(itemtype) std::random_access_iterator<itemtype, int>
 #else
 #  define random_access_iterator_parent(itemtype) std::iterator<std::random_access_iterator_tag,itemtype,int>
--- ./src/input.cc.orig	Fri Sep  6 22:17:58 2002
+++ ./src/input.cc	Fri Sep  6 22:21:11 2002
@@ -70,17 +70,17 @@
    std::string Input::parse_cpp(std::string line) {
       if (line[0] == '#') {
 #ifdef HAVE_SSTREAM
-         istringstream in(line);
+         std::istringstream in(line);
 #else
          istrstream in(line.c_str());
 #endif // HAVE_SSTREAM
          in.get(); // remove '#'
-         string command;
+         std::string command;
          while (isalnum(in.peek()) && not in.eof()){
             command+=in.get();
          }
-         cerr << "line = \"" << line << "\" command = \"" << command << "\" ";
-         if (command == string("include") ) {
+         std::cerr << "line = \"" << line << "\" command = \"" << command << "\" ";
+         if (command == std::string("include") ) {
          } else if ( command == "define" ) {
          } else if ( command == "undef" ) {
          } else if ( command == "if" ) {
@@ -101,7 +101,7 @@
             // Apparently this is valid
             // Ignore this
          } else {
-            cerr << "Unknown preprocessor macro" << endl;
+            std::cerr << "Unknown preprocessor macro" << std::endl;
          }
       }
       return line;

--ReaqsoxgOBHFXBhH--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020906225816.A11342>