From 7e840acd19600dca0efb7e424769bc057503b02d Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Sat, 5 Oct 2002 19:31:43 +0000 Subject: [PATCH] Repair AIX build [SVN r15740] --- build/Jamfile | 5 +---- src/aix_init_module.cpp | 18 ++++-------------- 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/build/Jamfile b/build/Jamfile index b7f197b6..b5f45314 100644 --- a/build/Jamfile +++ b/build/Jamfile @@ -20,10 +20,7 @@ if [ check-python-config ] if $(UNIX) && ( $(OS) = AIX ) { - bpl-linkflags = "-e initlibboost_python" - "-e initlibboost_python_debug" - "-e initlibboost_python_pydebug" - ; + bpl-linkflags = "-e initlibboost_python" ; } dll boost_python diff --git a/src/aix_init_module.cpp b/src/aix_init_module.cpp index 93c710ec..3eb9f097 100644 --- a/src/aix_init_module.cpp +++ b/src/aix_init_module.cpp @@ -26,17 +26,7 @@ namespace static PyMethodDef initial_methods[] = { { 0, 0, 0, 0 } }; extern "C" void initlibboost_python() { - Py_InitModule("libbboost_python", initial_methods); - } - - extern "C" void initlibboost_python_debug() - { - Py_InitModule("libbboost_python_debug", initial_methods); - } - - extern "C" void initlibboost_python_pydebug() - { - Py_InitModule("libbboost_python_pydebug", initial_methods); + Py_InitModule("libboost_python", initial_methods); } struct find_and_open_file @@ -115,7 +105,7 @@ void aix_init_module( static bool initialized; if (!initialized) { - char const* const name = "libbpl.so"; + char const* const name = "libboost_python.so"; find_and_open_file dynlib("LIBPATH", name); if (dynlib.fp == 0) { @@ -123,8 +113,8 @@ void aix_init_module( return; } - std::string::size_type pos = pos = dynlib.filename.find_first_of(".so",0); - if (pos == std::string::npos) + std::string::size_type pos = pos = dynlib.filename.rfind(".so"); + if (pos != dynlib.filename.size() - 3) { fprintf(stderr, "dynamic library %s must end with .so\n", dynlib.filename.c_str()); return;