/// $LinkerFlags: -llber -lldap_r
+/// $PackageInfo: require_system("arch") libldap
/// $PackageInfo: require_system("centos") openldap-devel
/// $PackageInfo: require_system("debian") libldap2-dev
/// $PackageInfo: require_system("ubuntu") libldap2-dev
// Ignore OpenLDAP deprecation warnings on OS X Yosemite and newer.
#if defined __APPLE__
+# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
#include <ldap.h>
+#ifdef __APPLE__
+# pragma GCC diagnostic pop
+#endif
+
#ifdef _WIN32
# pragma comment(lib, "libldap_r.lib")
# pragma comment(lib, "liblber.lib")
, con(NULL), config(tag), last_connect(0)
{
std::string scope = config->getString("searchscope");
- if (scope == "base")
+ if (stdalgo::string::equalsci(scope, "base"))
searchscope = LDAP_SCOPE_BASE;
- else if (scope == "onelevel")
+ else if (stdalgo::string::equalsci(scope, "onelevel"))
searchscope = LDAP_SCOPE_ONELEVEL;
else
searchscope = LDAP_SCOPE_SUBTREE;
{
const reference<ConfigTag>& tag = i->second;
- if (tag->getString("module") != "ldap")
+ if (!stdalgo::string::equalsci(tag->getString("module"), "ldap"))
continue;
std::string id = tag->getString("id");
Version GetVersion() CXX11_OVERRIDE
{
- return Version("LDAP support", VF_VENDOR);
+ return Version("Provides LDAP support", VF_VENDOR);
}
};