Boost logo

Boost Users :

From: Steven Solie (ssolie_at_[hidden])
Date: 2002-03-24 12:29:28


('binary' encoding is not supported, stored as-is) I've started porting Boost 1.27.0 to AmigaOS for use in a project of
mine and I have a few additions and diffs to contribute. I've
created a platform file so other AmigaOS users can at least start
using the Boost out of the box.

1) boost/config/platform/amigaos.h

// (C) Copyright Boost.org 2001. Permission to copy, use, modify, sell and
// distribute this software is granted provided this copyright notice appears
// in all copies. This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.

// See http://www.boost.org for most recent version.

#define BOOST_PLATFORM "AmigaOS"

#define BOOST_DISABLE_THREADS
#define BOOST_NO_CWCHAR
#define BOOST_NO_CWCTYPE
#define BOOST_NO_STD_WSTRING
#define BOOST_NO_SWPRINTF
#define BOOST_NO_INTRINSIC_WCHAR_T

2) boost/config/select_platform_config.hpp
*** select_platform_config.hpp Thu Feb 07 08:26:04 2002
--- GG:boost/boost/config/select_platform_config.hpp Sat Mar 23 21:54:42 2002
***************
*** 52,57 ****
--- 52,61 ----
  // IBM
  # define BOOST_PLATFORM_CONFIG "boost/config/platform/aix.hpp"
  
+ #elif defined(__amigaos__)
+ // AmigaOS
+ # define BOOST_PLATFORM_CONFIG "boost/config/platform/amigaos.hpp"
+
  #else
  
  # if defined(unix) \

3) libs/graph/test/isomorphism.cpp

*** isomorphism.cpp Sun Mar 24 08:23:13 2002
--- Code:Projects/Tests/GCC/boost/isomorphism.cpp Sun Mar 24 10:09:38 2002
***************
*** 36,71 ****
  
  using namespace boost;
  
- // Verify that the given mapping iso_map from the vertices of g1 to the
- // vertices of g2 describes an isomorphism.
- // Note: this could be made much faster by specializing based on the graph
- // concepts modeled, but since we're verifying an O(n^(lg n)) algorithm,
- // O(n^4) won't hurt us.
- template<typename Graph1, typename Graph2, typename IsoMap>
- inline bool verify_isomorphism(const Graph1& g1, const Graph2& g2,
- IsoMap iso_map)
- {
- if (num_vertices(g1) != num_vertices(g2) || num_edges(g1) != num_edges(g2))
- return false;
-
- for (typename graph_traits<Graph1>::edge_iterator e1 = edges(g1).first;
- e1 != edges(g1).second; ++e1) {
- bool found_edge = false;
- for (typename graph_traits<Graph2>::edge_iterator e2 = edges(g2).first;
- e2 != edges(g2).second && !found_edge; ++e2) {
- if (source(*e2, g2) == get(iso_map, source(*e1, g1)) &&
- target(*e2, g2) == get(iso_map, target(*e1, g1))) {
- found_edge = true;
- }
- }
-
- if (!found_edge)
- return false;
- }
-
- return true;
- }
-
  template <typename Generator>
  struct random_functor {
    random_functor(Generator& g) : g(g) { }
--- 36,41 ----

4) boost/property_map.hpp

*** property_map.hpp Thu Feb 07 08:25:53 2002
--- GG:boost/boost/property_map.hpp Sun Mar 24 07:55:02 2002
***************
*** 7,12 ****
--- 7,13 ----
  #ifndef BOOST_PROPERTY_MAP_HPP
  #define BOOST_PROPERTY_MAP_HPP
  
+ #include <cassert>
  #include <iterator>
  #include <boost/config.hpp>
  #include <boost/pending/cstddef.hpp>

5) boost/graph/vector_as_graph.hpp

*** vector_as_graph.hpp Thu Feb 07 08:26:31 2002
--- GG:boost/boost/graph/vector_as_graph.hpp Sun Mar 24 08:51:08 2002
***************
*** 35,40 ****
--- 35,41 ----
  #ifndef BOOST_VECTOR_AS_GRAPH_HPP
  #define BOOST_VECTOR_AS_GRAPH_HPP
  
+ #include <cassert>
  #include <utility>
  #include <vector>
  #include <boost/iterator.hpp>

So far, I've only tested the following libraries:
 graph - some minor fixes needed
 random - no changes required
 shared_ptr - no changes required

NOTE:
 I'm using GCC 2.95.3 and STLport 4.5.3 (SGI I/O streams) as a base
 on AmigaOS 3.9 with Boing Bag 2.

Enjoy!


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net