Commit 5f3fd465 authored by Brad King's avatar Brad King
Browse files

Remove support for pre-C++98 STL

Drop "kwsys/stl/*" and "kwsys_stl::" and use the standard headers and
namespace instead.  Drop the now-unused KWSYS_STL_HAVE_STD check.

Change-Id: I6105fd32cd8f0e487e03f58927976e824a53f0d8
parent 2a581c30
......@@ -342,14 +342,9 @@ ENDIF()
# capabilities and parent project's request. Enforce 0/1 as only
# possible values for configuration into Configure.hxx.
KWSYS_PLATFORM_CXX_TEST(KWSYS_STL_HAVE_STD
"Checking whether STL classes are in std namespace" DIRECT)
KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_CSTDDEF
"Checking whether header cstddef is available" DIRECT)
SET(KWSYS_PLATFORM_CXX_TEST_DEFINES
-DKWSYS_STL_HAVE_STD=${KWSYS_STL_HAVE_STD})
KWSYS_PLATFORM_CXX_TEST(KWSYS_STL_HAS_ITERATOR_TRAITS
"Checking whether stl has iterator_traits" DIRECT)
IF(KWSYS_STL_HAS_ITERATOR_TRAITS)
......@@ -769,41 +764,6 @@ IF(KWSYS_INSTALL_DOC_DIR)
ENDIF()
#-----------------------------------------------------------------------------
# Create STL header wrappers to block warnings in the STL headers and
# give standard names by which they may be included.
FOREACH(header
algorithm
deque
exception
functional
iterator
list
map
memory
new
numeric
queue
set
stack
stdexcept
string
utility
vector
)
# Configure the header wrapper.
SET(KWSYS_STL_HEADER "${header}")
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/kwsys_stl.hxx.in
${KWSYS_HEADER_DIR}/stl/${header}
@ONLY IMMEDIATE)
# Create an install target for the header wrapper.
IF(KWSYS_INSTALL_INCLUDE_DIR)
INSTALL(FILES ${KWSYS_HEADER_DIR}/stl/${header}
DESTINATION ${KWSYS_INSTALL_INCLUDE_DIR}/${KWSYS_NAMESPACE}/stl
${KWSYS_INSTALL_INCLUDE_OPTIONS})
ENDIF()
ENDFOREACH()
# Provide cstddef header.
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/kwsys_cstddef.hxx.in
${KWSYS_HEADER_DIR}/cstddef
......
......@@ -15,18 +15,16 @@
#include KWSYS_HEADER(Configure.hxx)
#include KWSYS_HEADER(String.hxx)
#include KWSYS_HEADER(stl/vector)
#include KWSYS_HEADER(stl/map)
#include KWSYS_HEADER(stl/set)
// Work-around CMake dependency scanning limitation. This must
// duplicate the above list of headers.
#if 0
# include "CommandLineArguments.hxx.in"
# include "Configure.hxx.in"
# include "kwsys_stl.hxx.in"
#endif
#include <vector>
#include <map>
#include <set>
#include <sstream>
#include <iostream>
......@@ -66,11 +64,11 @@ struct CommandLineArgumentsCallbackStructure
};
class CommandLineArgumentsVectorOfStrings :
public kwsys_stl::vector<kwsys::String> {};
public std::vector<kwsys::String> {};
class CommandLineArgumentsSetOfStrings :
public kwsys_stl::set<kwsys::String> {};
public std::set<kwsys::String> {};
class CommandLineArgumentsMapOfStrucs :
public kwsys_stl::map<kwsys::String,
public std::map<kwsys::String,
CommandLineArgumentsCallbackStructure> {};
class CommandLineArgumentsInternal
......@@ -151,8 +149,8 @@ void CommandLineArguments::ProcessArgument(const char* arg)
//----------------------------------------------------------------------------
bool CommandLineArguments::GetMatchedArguments(
kwsys_stl::vector<kwsys_stl::string>* matches,
const kwsys_stl::string& arg)
std::vector<std::string>* matches,
const std::string& arg)
{
matches->clear();
CommandLineArguments::Internal::CallbacksMap::iterator it;
......@@ -183,15 +181,15 @@ bool CommandLineArguments::GetMatchedArguments(
//----------------------------------------------------------------------------
int CommandLineArguments::Parse()
{
kwsys_stl::vector<kwsys_stl::string>::size_type cc;
kwsys_stl::vector<kwsys_stl::string> matches;
std::vector<std::string>::size_type cc;
std::vector<std::string> matches;
if ( this->StoreUnusedArgumentsFlag )
{
this->Internals->UnusedArguments.clear();
}
for ( cc = 0; cc < this->Internals->Argv.size(); cc ++ )
{
const kwsys_stl::string& arg = this->Internals->Argv[cc];
const std::string& arg = this->Internals->Argv[cc];
CommandLineArguments_DEBUG("Process argument: " << arg);
this->Internals->LastArgument = cc;
if ( this->GetMatchedArguments(&matches, arg) )
......@@ -213,7 +211,7 @@ int CommandLineArguments::Parse()
// additional value
CommandLineArgumentsCallbackStructure *cs
= &this->Internals->Callbacks[matches[maxidx]];
const kwsys_stl::string& sarg = matches[maxidx];
const std::string& sarg = matches[maxidx];
if ( cs->Argument != sarg )
{
abort();
......@@ -266,7 +264,7 @@ int CommandLineArguments::Parse()
CommandLineArguments_DEBUG("This is a multi argument: " << arg);
for (cc++; cc < this->Internals->Argv.size(); ++ cc )
{
const kwsys_stl::string& marg = this->Internals->Argv[cc];
const std::string& marg = this->Internals->Argv[cc];
CommandLineArguments_DEBUG(" check multi argument value: " << marg);
if ( this->GetMatchedArguments(&matches, marg) )
{
......@@ -429,13 +427,13 @@ CommandLineArgumentsAddArgumentMacro(BOOL, bool)
CommandLineArgumentsAddArgumentMacro(INT, int)
CommandLineArgumentsAddArgumentMacro(DOUBLE, double)
CommandLineArgumentsAddArgumentMacro(STRING, char*)
CommandLineArgumentsAddArgumentMacro(STL_STRING, kwsys_stl::string)
CommandLineArgumentsAddArgumentMacro(STL_STRING, std::string)
CommandLineArgumentsAddArgumentMacro(VECTOR_BOOL, kwsys_stl::vector<bool>)
CommandLineArgumentsAddArgumentMacro(VECTOR_INT, kwsys_stl::vector<int>)
CommandLineArgumentsAddArgumentMacro(VECTOR_DOUBLE, kwsys_stl::vector<double>)
CommandLineArgumentsAddArgumentMacro(VECTOR_STRING, kwsys_stl::vector<char*>)
CommandLineArgumentsAddArgumentMacro(VECTOR_STL_STRING, kwsys_stl::vector<kwsys_stl::string>)
CommandLineArgumentsAddArgumentMacro(VECTOR_BOOL, std::vector<bool>)
CommandLineArgumentsAddArgumentMacro(VECTOR_INT, std::vector<int>)
CommandLineArgumentsAddArgumentMacro(VECTOR_DOUBLE, std::vector<double>)
CommandLineArgumentsAddArgumentMacro(VECTOR_STRING, std::vector<char*>)
CommandLineArgumentsAddArgumentMacro(VECTOR_STL_STRING, std::vector<std::string>)
//----------------------------------------------------------------------------
#define CommandLineArgumentsAddBooleanArgumentMacro(type, ctype) \
......@@ -450,7 +448,7 @@ CommandLineArgumentsAddBooleanArgumentMacro(BOOL, bool)
CommandLineArgumentsAddBooleanArgumentMacro(INT, int)
CommandLineArgumentsAddBooleanArgumentMacro(DOUBLE, double)
CommandLineArgumentsAddBooleanArgumentMacro(STRING, char*)
CommandLineArgumentsAddBooleanArgumentMacro(STL_STRING, kwsys_stl::string)
CommandLineArgumentsAddBooleanArgumentMacro(STL_STRING, std::string)
//----------------------------------------------------------------------------
void CommandLineArguments::SetClientData(void* client_data)
......@@ -522,7 +520,7 @@ void CommandLineArguments::GenerateHelp()
// Collapse all arguments into the map of vectors of all arguments that do
// the same thing.
CommandLineArguments::Internal::CallbacksMap::iterator it;
typedef kwsys_stl::map<CommandLineArguments::Internal::String,
typedef std::map<CommandLineArguments::Internal::String,
CommandLineArguments::Internal::SetOfStrings > MapArgs;
MapArgs mp;
MapArgs::iterator mpit, smpit;
......@@ -679,7 +677,7 @@ void CommandLineArguments::GenerateHelp()
//----------------------------------------------------------------------------
void CommandLineArguments::PopulateVariable(
bool* variable, const kwsys_stl::string& value)
bool* variable, const std::string& value)
{
if ( value == "1" || value == "ON" || value == "on" || value == "On" ||
value == "TRUE" || value == "true" || value == "True" ||
......@@ -695,7 +693,7 @@ void CommandLineArguments::PopulateVariable(
//----------------------------------------------------------------------------
void CommandLineArguments::PopulateVariable(
int* variable, const kwsys_stl::string& value)
int* variable, const std::string& value)
{
char* res = 0;
*variable = static_cast<int>(strtol(value.c_str(), &res, 10));
......@@ -707,7 +705,7 @@ void CommandLineArguments::PopulateVariable(
//----------------------------------------------------------------------------
void CommandLineArguments::PopulateVariable(
double* variable, const kwsys_stl::string& value)
double* variable, const std::string& value)
{
char* res = 0;
*variable = strtod(value.c_str(), &res);
......@@ -719,7 +717,7 @@ void CommandLineArguments::PopulateVariable(
//----------------------------------------------------------------------------
void CommandLineArguments::PopulateVariable(
char** variable, const kwsys_stl::string& value)
char** variable, const std::string& value)
{
if ( *variable )
{
......@@ -732,14 +730,14 @@ void CommandLineArguments::PopulateVariable(
//----------------------------------------------------------------------------
void CommandLineArguments::PopulateVariable(
kwsys_stl::string* variable, const kwsys_stl::string& value)
std::string* variable, const std::string& value)
{
*variable = value;
}
//----------------------------------------------------------------------------
void CommandLineArguments::PopulateVariable(
kwsys_stl::vector<bool>* variable, const kwsys_stl::string& value)
std::vector<bool>* variable, const std::string& value)
{
bool val = false;
if ( value == "1" || value == "ON" || value == "on" || value == "On" ||
......@@ -753,7 +751,7 @@ void CommandLineArguments::PopulateVariable(
//----------------------------------------------------------------------------
void CommandLineArguments::PopulateVariable(
kwsys_stl::vector<int>* variable, const kwsys_stl::string& value)
std::vector<int>* variable, const std::string& value)
{
char* res = 0;
variable->push_back(static_cast<int>(strtol(value.c_str(), &res, 10)));
......@@ -765,7 +763,7 @@ void CommandLineArguments::PopulateVariable(
//----------------------------------------------------------------------------
void CommandLineArguments::PopulateVariable(
kwsys_stl::vector<double>* variable, const kwsys_stl::string& value)
std::vector<double>* variable, const std::string& value)
{
char* res = 0;
variable->push_back(strtod(value.c_str(), &res));
......@@ -777,7 +775,7 @@ void CommandLineArguments::PopulateVariable(
//----------------------------------------------------------------------------
void CommandLineArguments::PopulateVariable(
kwsys_stl::vector<char*>* variable, const kwsys_stl::string& value)
std::vector<char*>* variable, const std::string& value)
{
char* var = new char[ value.size() + 1 ];
strcpy(var, value.c_str());
......@@ -786,8 +784,8 @@ void CommandLineArguments::PopulateVariable(
//----------------------------------------------------------------------------
void CommandLineArguments::PopulateVariable(
kwsys_stl::vector<kwsys_stl::string>* variable,
const kwsys_stl::string& value)
std::vector<std::string>* variable,
const std::string& value)
{
variable->push_back(value);
}
......@@ -808,7 +806,7 @@ bool CommandLineArguments::PopulateVariable(CommandLineArgumentsCallbackStructur
CommandLineArguments_DEBUG("Set argument: " << cs->Argument << " to " << value);
if ( cs->Variable )
{
kwsys_stl::string var = "1";
std::string var = "1";
if ( value )
{
var = value;
......@@ -825,25 +823,25 @@ bool CommandLineArguments::PopulateVariable(CommandLineArgumentsCallbackStructur
this->PopulateVariable(static_cast<char**>(cs->Variable), var);
break;
case CommandLineArguments::STL_STRING_TYPE:
this->PopulateVariable(static_cast<kwsys_stl::string*>(cs->Variable), var);
this->PopulateVariable(static_cast<std::string*>(cs->Variable), var);
break;
case CommandLineArguments::BOOL_TYPE:
this->PopulateVariable(static_cast<bool*>(cs->Variable), var);
break;
case CommandLineArguments::VECTOR_BOOL_TYPE:
this->PopulateVariable(static_cast<kwsys_stl::vector<bool>*>(cs->Variable), var);
this->PopulateVariable(static_cast<std::vector<bool>*>(cs->Variable), var);
break;
case CommandLineArguments::VECTOR_INT_TYPE:
this->PopulateVariable(static_cast<kwsys_stl::vector<int>*>(cs->Variable), var);
this->PopulateVariable(static_cast<std::vector<int>*>(cs->Variable), var);
break;
case CommandLineArguments::VECTOR_DOUBLE_TYPE:
this->PopulateVariable(static_cast<kwsys_stl::vector<double>*>(cs->Variable), var);
this->PopulateVariable(static_cast<std::vector<double>*>(cs->Variable), var);
break;
case CommandLineArguments::VECTOR_STRING_TYPE:
this->PopulateVariable(static_cast<kwsys_stl::vector<char*>*>(cs->Variable), var);
this->PopulateVariable(static_cast<std::vector<char*>*>(cs->Variable), var);
break;
case CommandLineArguments::VECTOR_STL_STRING_TYPE:
this->PopulateVariable(static_cast<kwsys_stl::vector<kwsys_stl::string>*>(cs->Variable), var);
this->PopulateVariable(static_cast<std::vector<std::string>*>(cs->Variable), var);
break;
default:
std::cerr << "Got unknown variable type: \"" << cs->VariableType << "\"" << std::endl;
......
......@@ -15,13 +15,8 @@
#include <@KWSYS_NAMESPACE@/Configure.h>
#include <@KWSYS_NAMESPACE@/Configure.hxx>
#include <@KWSYS_NAMESPACE@/stl/string>
#include <@KWSYS_NAMESPACE@/stl/vector>
/* Define this macro temporarily to keep the code readable. */
#if !defined (KWSYS_NAMESPACE) && !@KWSYS_NAMESPACE@_NAME_IS_KWSYS
# define kwsys_stl @KWSYS_NAMESPACE@_stl
#endif
#include <string>
#include <vector>
namespace @KWSYS_NAMESPACE@
{
......@@ -155,7 +150,7 @@ public:
void AddArgument(const char* argument, ArgumentTypeEnum type,
char** variable, const char* help);
void AddArgument(const char* argument, ArgumentTypeEnum type,
kwsys_stl::string* variable, const char* help);
std::string* variable, const char* help);
/**
* Add handler for argument which is going to set the variable to the
......@@ -163,15 +158,15 @@ public:
* appropriate type. This will handle the multi argument values.
*/
void AddArgument(const char* argument, ArgumentTypeEnum type,
kwsys_stl::vector<bool>* variable, const char* help);
std::vector<bool>* variable, const char* help);
void AddArgument(const char* argument, ArgumentTypeEnum type,
kwsys_stl::vector<int>* variable, const char* help);
std::vector<int>* variable, const char* help);
void AddArgument(const char* argument, ArgumentTypeEnum type,
kwsys_stl::vector<double>* variable, const char* help);
std::vector<double>* variable, const char* help);
void AddArgument(const char* argument, ArgumentTypeEnum type,
kwsys_stl::vector<char*>* variable, const char* help);
std::vector<char*>* variable, const char* help);
void AddArgument(const char* argument, ArgumentTypeEnum type,
kwsys_stl::vector<kwsys_stl::string>* variable, const char* help);
std::vector<std::string>* variable, const char* help);
/**
* Add handler for boolean argument. The argument does not take any option
......@@ -187,7 +182,7 @@ public:
void AddBooleanArgument(const char* argument,
char** variable, const char* help);
void AddBooleanArgument(const char* argument,
kwsys_stl::string* variable, const char* help);
std::string* variable, const char* help);
/**
* Set the callbacks for error handling.
......@@ -243,28 +238,28 @@ protected:
void AddArgument(const char* argument, ArgumentTypeEnum type,
VariableTypeEnum vtype, void* variable, const char* help);
bool GetMatchedArguments(kwsys_stl::vector<kwsys_stl::string>* matches,
const kwsys_stl::string& arg);
bool GetMatchedArguments(std::vector<std::string>* matches,
const std::string& arg);
//! Populate individual variables
bool PopulateVariable(CommandLineArgumentsCallbackStructure* cs,
const char* value);
//! Populate individual variables of type ...
void PopulateVariable(bool* variable, const kwsys_stl::string& value);
void PopulateVariable(int* variable, const kwsys_stl::string& value);
void PopulateVariable(double* variable, const kwsys_stl::string& value);
void PopulateVariable(char** variable, const kwsys_stl::string& value);
void PopulateVariable(kwsys_stl::string* variable, const kwsys_stl::string& value);
void PopulateVariable(kwsys_stl::vector<bool>* variable, const kwsys_stl::string& value);
void PopulateVariable(kwsys_stl::vector<int>* variable, const kwsys_stl::string& value);
void PopulateVariable(kwsys_stl::vector<double>* variable, const kwsys_stl::string& value);
void PopulateVariable(kwsys_stl::vector<char*>* variable, const kwsys_stl::string& value);
void PopulateVariable(kwsys_stl::vector<kwsys_stl::string>* variable, const kwsys_stl::string& value);
void PopulateVariable(bool* variable, const std::string& value);
void PopulateVariable(int* variable, const std::string& value);
void PopulateVariable(double* variable, const std::string& value);
void PopulateVariable(char** variable, const std::string& value);
void PopulateVariable(std::string* variable, const std::string& value);
void PopulateVariable(std::vector<bool>* variable, const std::string& value);
void PopulateVariable(std::vector<int>* variable, const std::string& value);
void PopulateVariable(std::vector<double>* variable, const std::string& value);
void PopulateVariable(std::vector<char*>* variable, const std::string& value);
void PopulateVariable(std::vector<std::string>* variable, const std::string& value);
typedef CommandLineArgumentsInternal Internal;
Internal* Internals;
kwsys_stl::string Help;
std::string Help;
unsigned int LineLength;
......@@ -273,11 +268,6 @@ protected:
} // namespace @KWSYS_NAMESPACE@
/* Undefine temporary macro. */
#if !defined (KWSYS_NAMESPACE) && !@KWSYS_NAMESPACE@_NAME_IS_KWSYS
# undef kwsys_stl
#endif
#endif
......
......@@ -15,19 +15,9 @@
/* Include C configuration. */
#include <@KWSYS_NAMESPACE@/Configure.h>
/* Whether STL is in std namespace. */
#define @KWSYS_NAMESPACE@_STL_HAVE_STD @KWSYS_STL_HAVE_STD@
/* Whether wstring is available. */
#define @KWSYS_NAMESPACE@_STL_HAS_WSTRING @KWSYS_STL_HAS_WSTRING@
/* Define the stl namespace macro. */
#if @KWSYS_NAMESPACE@_STL_HAVE_STD
# define @KWSYS_NAMESPACE@_stl std
#else
# define @KWSYS_NAMESPACE@_stl
#endif
/* Whether the cstddef header is available. */
#define @KWSYS_NAMESPACE@_CXX_HAS_CSTDDEF @KWSYS_CXX_HAS_CSTDDEF@
......@@ -95,11 +85,9 @@
access to the macros without a configured namespace. */
#if defined(KWSYS_NAMESPACE)
# if !@KWSYS_NAMESPACE@_NAME_IS_KWSYS
# define kwsys_stl @KWSYS_NAMESPACE@_stl
# define kwsys @KWSYS_NAMESPACE@
# endif
# define KWSYS_NAME_IS_KWSYS @KWSYS_NAMESPACE@_NAME_IS_KWSYS
# define KWSYS_STL_HAVE_STD @KWSYS_NAMESPACE@_STL_HAVE_STD
# define KWSYS_STAT_HAS_ST_MTIM @KWSYS_NAMESPACE@_STAT_HAS_ST_MTIM
# define KWSYS_CXX_HAS_CSTDDEF @KWSYS_NAMESPACE@_CXX_HAS_CSTDDEF
# define KWSYS_CXX_NULL_TEMPLATE_ARGS @KWSYS_NAMESPACE@_CXX_NULL_TEMPLATE_ARGS
......
......@@ -16,19 +16,17 @@
#include KWSYS_HEADER(Encoding.hxx)
#include KWSYS_HEADER(stl/string)
#include KWSYS_HEADER(stl/vector)
// Work-around CMake dependency scanning limitation. This must
// duplicate the above list of headers.
#if 0
# include "Directory.hxx.in"
# include "Configure.hxx.in"
# include "Encoding.hxx.in"
# include "kwsys_stl.hxx.in"
# include "kwsys_stl_vector.hxx.in"
#endif
#include <string>
#include <vector>
namespace KWSYS_NAMESPACE
{
......@@ -37,10 +35,10 @@ class DirectoryInternals
{
public:
// Array of Files
kwsys_stl::vector<kwsys_stl::string> Files;
std::vector<std::string> Files;
// Path to Open'ed directory
kwsys_stl::string Path;
std::string Path;
};
//----------------------------------------------------------------------------
......@@ -102,7 +100,7 @@ void Directory::Clear()
namespace KWSYS_NAMESPACE
{
bool Directory::Load(const kwsys_stl::string& name)
bool Directory::Load(const std::string& name)
{
this->Clear();
#if _MSC_VER < 1300
......@@ -152,7 +150,7 @@ bool Directory::Load(const kwsys_stl::string& name)
return _findclose(srchHandle) != -1;
}
unsigned long Directory::GetNumberOfFilesInDirectory(const kwsys_stl::string& name)
unsigned long Directory::GetNumberOfFilesInDirectory(const std::string& name)
{
#if _MSC_VER < 1300
long srchHandle;
......@@ -219,7 +217,7 @@ unsigned long Directory::GetNumberOfFilesInDirectory(const kwsys_stl::string& na
namespace KWSYS_NAMESPACE
{
bool Directory::Load(const kwsys_stl::string& name)
bool Directory::Load(const std::string& name)
{
this->Clear();
......@@ -239,7 +237,7 @@ bool Directory::Load(const kwsys_stl::string& name)
return 1;
}
unsigned long Directory::GetNumberOfFilesInDirectory(const kwsys_stl::string& name)
unsigned long Directory::GetNumberOfFilesInDirectory(const std::string& name)
{
DIR* dir = opendir(name.c_str());
......
......@@ -13,12 +13,7 @@
#define @KWSYS_NAMESPACE@_Directory_hxx
#include <@KWSYS_NAMESPACE@/Configure.h>
#include <@KWSYS_NAMESPACE@/stl/string>
/* Define these macros temporarily to keep the code readable. */
#if !defined (KWSYS_NAMESPACE) && !@KWSYS_NAMESPACE@_NAME_IS_KWSYS
# define kwsys_stl @KWSYS_NAMESPACE@_stl
#endif
#include <string>
namespace @KWSYS_NAMESPACE@
{
......@@ -44,7 +39,7 @@ public:
* in that directory. 0 is returned if the directory can not be
* opened, 1 if it is opened.
*/
bool Load(const kwsys_stl::string&);
bool Load(const std::string&);
/**
* Return the number of files in the current directory.
......@@ -55,7 +50,7 @@ public:
* Return the number of files in the specified directory.
* A higher performance static method.
*/
static unsigned long GetNumberOfFilesInDirectory(const kwsys_stl::string&);
static unsigned long GetNumberOfFilesInDirectory(const std::string&);
/**
* Return the file at the given index, the indexing is 0 based
......@@ -83,9 +78,4 @@ private:
} // namespace @KWSYS_NAMESPACE@
/* Undefine temporary macros. */
#if !defined (KWSYS_NAMESPACE) && !@KWSYS_NAMESPACE@_NAME_IS_KWSYS
# undef kwsys_stl
#endif
#endif
......@@ -40,7 +40,7 @@ namespace KWSYS_NAMESPACE
{
//----------------------------------------------------------------------------
DynamicLoader::LibraryHandle DynamicLoader::OpenLibrary(const kwsys_stl::string& libname )
DynamicLoader::LibraryHandle DynamicLoader::OpenLibrary(const std::string& libname )
{
return shl_load(libname.c_str(), BIND_DEFERRED | DYNAMIC_PATH, 0L);
}
......@@ -57,7 +57,7 @@ int DynamicLoader::CloseLibrary(DynamicLoader::LibraryHandle lib)
//----------------------------------------------------------------------------
DynamicLoader::SymbolPointer
DynamicLoader::GetSymbolAddress(DynamicLoader::LibraryHandle lib, const kwsys_stl::string& sym)
DynamicLoader::GetSymbolAddress(DynamicLoader::LibraryHandle lib, const std::string& sym)
{
void* addr;
int status;
......@@ -115,7 +115,7 @@ namespace KWSYS_NAMESPACE
{
//----------------------------------------------------------------------------
DynamicLoader::LibraryHandle DynamicLoader::OpenLibrary(const kwsys_stl::string& libname )
DynamicLoader::LibraryHandle DynamicLoader::OpenLibrary(const std::string& libname )
{
NSObjectFileImageReturnCode rc;
NSObjectFileImage image = 0;
......@@ -146,7 +146,7 @@ int DynamicLoader::CloseLibrary( DynamicLoader::LibraryHandle lib)
//----------------------------------------------------------------------------
DynamicLoader::SymbolPointer DynamicLoader::GetSymbolAddress(
DynamicLoader::LibraryHandle lib, const kwsys_stl::string& sym)
DynamicLoader::LibraryHandle lib, const std::string& sym)
{
void *result=0;
// Need to prepend symbols with '_' on Apple-gcc compilers
......@@ -187,7 +187,7 @@ namespace KWSYS_NAMESPACE
{
//----------------------------------------------------------------------------
DynamicLoader::LibraryHandle DynamicLoader::OpenLibrary(const kwsys_stl::string& libname)
DynamicLoader::LibraryHandle DynamicLoader::OpenLibrary(const std::string& libname)
{
DynamicLoader::LibraryHandle lh;
int length = MultiByteToWideChar(CP_UTF8, 0, libname.c_str(), -1, NULL, 0);
......@@ -207,7 +207,7 @@ int DynamicLoader::CloseLibrary(DynamicLoader::LibraryHandle lib)
//----------------------------------------------------------------------------
DynamicLoader::SymbolPointer DynamicLoader::GetSymbolAddress(
DynamicLoader::LibraryHandle lib, const kwsys_stl::string& sym)
DynamicLoader::LibraryHandle lib, const std::string& sym)
{
// TODO: The calling convention affects the name of the symbol. We
// should have a tool to help get the symbol with the desired
......@@ -302,7 +302,7 @@ namespace KWSYS_NAMESPACE
static image_id last_dynamic_err = B_OK;
//----------------------------------------------------------------------------
DynamicLoader::LibraryHandle DynamicLoader::OpenLibrary(const kwsys_stl::string& libname )
DynamicLoader::LibraryHandle DynamicLoader::OpenLibrary(const std::string& libname )
{
// image_id's are integers, errors are negative. Add one just in case we
// get a valid image_id of zero (is that even possible?).
......@@ -340,7 +340,7 @@ int DynamicLoader::CloseLibrary(DynamicLoader::LibraryHandle lib)
//----------------------------------------------------------------------------
DynamicLoader::SymbolPointer DynamicLoader::GetSymbolAddress(
DynamicLoader::LibraryHandle lib, const kwsys_stl::string& sym)
DynamicLoader::LibraryHandle lib, const std::string& sym)
{
// Hack to cast pointer-to-data to pointer-to-function.
union
......@@ -393,7 +393,7 @@ namespace KWSYS_NAMESPACE
{
//----------------------------------------------------------------------------
DynamicLoader::LibraryHandle DynamicLoader::OpenLibrary(const kwsys_stl::string& libname )