mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-25 18:22:59 +02:00
add std::string SharedLibrary::prefix() for building library name that
complies with Cygwin standard. Signed-off-by: FrancisANDRE <zosrothko@orange.fr>
This commit is contained in:
@@ -118,6 +118,12 @@ public:
|
|||||||
/// specified in a call to load() or the
|
/// specified in a call to load() or the
|
||||||
/// constructor.
|
/// constructor.
|
||||||
|
|
||||||
|
static std::string prefix();
|
||||||
|
/// Returns the platform-specific filename prefix
|
||||||
|
/// for shared libraries.
|
||||||
|
/// Most platforms would return an empty string, but
|
||||||
|
/// on Cygwin, the "cyg" prefix will be returned.
|
||||||
|
|
||||||
static std::string suffix();
|
static std::string suffix();
|
||||||
/// Returns the platform-specific filename suffix
|
/// Returns the platform-specific filename suffix
|
||||||
/// for shared libraries (including the period).
|
/// for shared libraries (including the period).
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ protected:
|
|||||||
bool isLoadedImpl() const;
|
bool isLoadedImpl() const;
|
||||||
void* findSymbolImpl(const std::string& name);
|
void* findSymbolImpl(const std::string& name);
|
||||||
const std::string& getPathImpl() const;
|
const std::string& getPathImpl() const;
|
||||||
|
static std::string prefixImpl();
|
||||||
static std::string suffixImpl();
|
static std::string suffixImpl();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ protected:
|
|||||||
bool isLoadedImpl() const;
|
bool isLoadedImpl() const;
|
||||||
void* findSymbolImpl(const std::string& name);
|
void* findSymbolImpl(const std::string& name);
|
||||||
const std::string& getPathImpl() const;
|
const std::string& getPathImpl() const;
|
||||||
|
static std::string prefixImpl();
|
||||||
static std::string suffixImpl();
|
static std::string suffixImpl();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ protected:
|
|||||||
bool isLoadedImpl() const;
|
bool isLoadedImpl() const;
|
||||||
void* findSymbolImpl(const std::string& name);
|
void* findSymbolImpl(const std::string& name);
|
||||||
const std::string& getPathImpl() const;
|
const std::string& getPathImpl() const;
|
||||||
|
static std::string prefixImpl();
|
||||||
static std::string suffixImpl();
|
static std::string suffixImpl();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ protected:
|
|||||||
bool isLoadedImpl() const;
|
bool isLoadedImpl() const;
|
||||||
void* findSymbolImpl(const std::string& name);
|
void* findSymbolImpl(const std::string& name);
|
||||||
const std::string& getPathImpl() const;
|
const std::string& getPathImpl() const;
|
||||||
|
static std::string prefixImpl();
|
||||||
static std::string suffixImpl();
|
static std::string suffixImpl();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ protected:
|
|||||||
bool isLoadedImpl() const;
|
bool isLoadedImpl() const;
|
||||||
void* findSymbolImpl(const std::string& name);
|
void* findSymbolImpl(const std::string& name);
|
||||||
const std::string& getPathImpl() const;
|
const std::string& getPathImpl() const;
|
||||||
|
static std::string prefixImpl();
|
||||||
static std::string suffixImpl();
|
static std::string suffixImpl();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ protected:
|
|||||||
bool isLoadedImpl() const;
|
bool isLoadedImpl() const;
|
||||||
void* findSymbolImpl(const std::string& name);
|
void* findSymbolImpl(const std::string& name);
|
||||||
const std::string& getPathImpl() const;
|
const std::string& getPathImpl() const;
|
||||||
|
static std::string prefixImpl();
|
||||||
static std::string suffixImpl();
|
static std::string suffixImpl();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -104,6 +104,12 @@ const std::string& SharedLibrary::getPath() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
std::string SharedLibrary::prefix()
|
||||||
|
{
|
||||||
|
return prefixImpl();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
std::string SharedLibrary::suffix()
|
std::string SharedLibrary::suffix()
|
||||||
{
|
{
|
||||||
return suffixImpl();
|
return suffixImpl();
|
||||||
|
|||||||
@@ -83,6 +83,12 @@ const std::string& SharedLibraryImpl::getPathImpl() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
std::string SharedLibraryImpl::prefixImpl()
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
std::string SharedLibraryImpl::suffixImpl()
|
std::string SharedLibraryImpl::suffixImpl()
|
||||||
{
|
{
|
||||||
#if defined(_DEBUG)
|
#if defined(_DEBUG)
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
|
|
||||||
// Note: cygwin is missing RTLD_LOCAL, set it to 0
|
// Note: cygwin is missing RTLD_LOCAL, set it to 0
|
||||||
#if defined(__CYGWIN__) && !defined(RTLD_LOCAL)
|
#if POCO_OS == POCO_OS_CYGWIN && !defined(RTLD_LOCAL)
|
||||||
#define RTLD_LOCAL 0
|
#define RTLD_LOCAL 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -99,21 +99,31 @@ const std::string& SharedLibraryImpl::getPathImpl() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
std::string SharedLibraryImpl::prefixImpl()
|
||||||
|
{
|
||||||
|
#if POCO_OS == POCO_OS_CYGWIN
|
||||||
|
return "cyg";
|
||||||
|
#else
|
||||||
|
return "";
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
std::string SharedLibraryImpl::suffixImpl()
|
std::string SharedLibraryImpl::suffixImpl()
|
||||||
{
|
{
|
||||||
#if defined(__APPLE__)
|
#if POCO_OS == POCO_OS_MAC_OS_X
|
||||||
#if defined(_DEBUG)
|
#if defined(_DEBUG)
|
||||||
return "d.dylib";
|
return "d.dylib";
|
||||||
#else
|
#else
|
||||||
return ".dylib";
|
return ".dylib";
|
||||||
#endif
|
#endif
|
||||||
#elif defined(hpux) || defined(_hpux)
|
#elif POCO_OS == POCO_OS_HPUX
|
||||||
#if defined(_DEBUG)
|
#if defined(_DEBUG)
|
||||||
return "d.sl";
|
return "d.sl";
|
||||||
#else
|
#else
|
||||||
return ".sl";
|
return ".sl";
|
||||||
#endif
|
#endif
|
||||||
#elif defined(__CYGWIN__)
|
#elif POCO_OS == POCO_OS_CYGWIN
|
||||||
#if defined(_DEBUG)
|
#if defined(_DEBUG)
|
||||||
return "d.dll";
|
return "d.dll";
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -106,6 +106,12 @@ const std::string& SharedLibraryImpl::getPathImpl() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
std::string SharedLibraryImpl::prefixImpl()
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
std::string SharedLibraryImpl::suffixImpl()
|
std::string SharedLibraryImpl::suffixImpl()
|
||||||
{
|
{
|
||||||
#if defined(_DEBUG)
|
#if defined(_DEBUG)
|
||||||
|
|||||||
@@ -128,6 +128,12 @@ const std::string& SharedLibraryImpl::getPathImpl() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
std::string SharedLibraryImpl::prefixImpl()
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
std::string SharedLibraryImpl::suffixImpl()
|
std::string SharedLibraryImpl::suffixImpl()
|
||||||
{
|
{
|
||||||
return ".out";
|
return ".out";
|
||||||
|
|||||||
@@ -87,6 +87,12 @@ const std::string& SharedLibraryImpl::getPathImpl() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
std::string SharedLibraryImpl::prefixImpl()
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
std::string SharedLibraryImpl::suffixImpl()
|
std::string SharedLibraryImpl::suffixImpl()
|
||||||
{
|
{
|
||||||
#if defined(_DEBUG)
|
#if defined(_DEBUG)
|
||||||
|
|||||||
@@ -98,6 +98,12 @@ const std::string& SharedLibraryImpl::getPathImpl() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
std::string SharedLibraryImpl::prefixImpl()
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
std::string SharedLibraryImpl::suffixImpl()
|
std::string SharedLibraryImpl::suffixImpl()
|
||||||
{
|
{
|
||||||
#if defined(_DEBUG)
|
#if defined(_DEBUG)
|
||||||
|
|||||||
Reference in New Issue
Block a user