From 926bbe1815c86e38722f6b635874bc99981734aa Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Fri, 26 Feb 2016 22:49:18 +0300 Subject: removed boost, boost-build - outdated --- .../boost/files/boost-1.48.0-mpi_python3.patch | 95 ---------------------- 1 file changed, 95 deletions(-) delete mode 100644 dev-libs/boost/files/boost-1.48.0-mpi_python3.patch (limited to 'dev-libs/boost/files/boost-1.48.0-mpi_python3.patch') diff --git a/dev-libs/boost/files/boost-1.48.0-mpi_python3.patch b/dev-libs/boost/files/boost-1.48.0-mpi_python3.patch deleted file mode 100644 index a32eca9..0000000 --- a/dev-libs/boost/files/boost-1.48.0-mpi_python3.patch +++ /dev/null @@ -1,95 +0,0 @@ -https://svn.boost.org/trac/boost/ticket/4657 -https://svn.boost.org/trac/boost/changeset/76290 - ---- libs/mpi/src/python/datatypes.cpp -+++ libs/mpi/src/python/datatypes.cpp -@@ -17,7 +17,9 @@ - - void export_datatypes() - { -+#if PY_MAJOR_VERSION < 3 - register_serialized(long(0), &PyInt_Type); -+#endif - register_serialized(false, &PyBool_Type); - register_serialized(double(0.0), &PyFloat_Type); - } ---- libs/mpi/src/python/py_environment.cpp -+++ libs/mpi/src/python/py_environment.cpp -@@ -11,6 +11,9 @@ - * This file reflects the Boost.MPI "environment" class into Python - * methods at module level. - */ -+ -+#include -+#include - #include - #include - -@@ -50,11 +53,64 @@ - - // If anything changed, convert C-style argc/argv into Python argv - if (mpi_argv != my_argv) -+ { -+#if PY_MAJOR_VERSION >= 3 -+ -+ wchar_t **argv_copy = (wchar_t **)PyMem_Malloc(sizeof(wchar_t*)*mpi_argc); -+ /* We need a second copy, as Python might modify the first one. */ -+ wchar_t **argv_copy2 = (wchar_t **)PyMem_Malloc(sizeof(wchar_t*)*mpi_argc); -+ -+ if (!argv_copy || !argv_copy2) { -+ fprintf(stderr, "out of memory\n"); -+ return false; -+ } -+ -+ std::locale mylocale; -+ mbstate_t mystate; -+ -+ const std::codecvt& myfacet = -+ std::use_facet >(mylocale); -+ -+ for (int i = 0; i < mpi_argc; i++) -+ { -+ size_t length = strlen(mpi_argv[i]); -+ -+ wchar_t *dest = (wchar_t *) PyMem_Malloc(sizeof(wchar_t) * (length + 1)); -+ -+ const char *from_next; -+ wchar_t *to_next; -+ -+ std::codecvt::result myresult = -+ myfacet.out(mystate, -+ mpi_argv[i], mpi_argv[i] + length + 1, from_next, -+ dest, dest+length+1, to_next); -+ -+ if (myresult != std::codecvt::ok ) -+ { -+ fprintf(stderr, "failure translating argv\n"); -+ return 1; -+ } -+ -+ argv_copy2[i] = argv_copy[i] = dest; -+ if (!argv_copy[i]) -+ return false; -+ } -+ -+ PySys_SetArgv(mpi_argc, argv_copy); -+ -+ for (int i = 0; i < mpi_argc; i++) { -+ PyMem_Free(argv_copy2[i]); -+ } -+ PyMem_Free(argv_copy); -+ PyMem_Free(argv_copy2); -+#else - PySys_SetArgv(mpi_argc, mpi_argv); -+#endif -+ } - -- for (int arg = 0; arg < my_argc; ++arg) -- free(my_argv[arg]); -- delete [] my_argv; -+ for (int arg = 0; arg < mpi_argc; ++arg) -+ free(mpi_argv[arg]); -+ delete [] mpi_argv; - - return true; - } -- cgit v1.2.3