X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=mech_eap%2Futil_shib.cpp;h=875c9a5195ebdafcad659c88ec4cf03c4b1dd79c;hb=6055f4f86d19a9df7ac06317b3aacf3c38cab559;hp=f919fc0065f1592717aaf96c5d8f0f5061a66867;hpb=4e20a5ed5168ddffadfc8442ce0db000ea6214e0;p=mech_eap.git diff --git a/mech_eap/util_shib.cpp b/mech_eap/util_shib.cpp index f919fc0..875c9a5 100644 --- a/mech_eap/util_shib.cpp +++ b/mech_eap/util_shib.cpp @@ -66,6 +66,7 @@ #include #include +#include using namespace shibsp; using namespace shibresolver; @@ -78,6 +79,14 @@ using namespace opensaml; using namespace xercesc; #endif +// Use unique_ptr where available; auto_ptr otherwise. +#if __cplusplus > 199711L +#define UNIQUE_OR_AUTO_PTR unique_ptr +#else +#define UNIQUE_OR_AUTO_PTR auto_ptr +#endif + + gss_eap_shib_attr_provider::gss_eap_shib_attr_provider(void) { m_initialized = false; @@ -123,7 +132,7 @@ gss_eap_shib_attr_provider::initWithGssContext(const gss_eap_attr_ctx *manager, if (!gss_eap_attr_provider::initWithGssContext(manager, gssCred, gssCtx)) return false; - unique_ptr resolver(ShibbolethResolver::create()); + UNIQUE_OR_AUTO_PTR resolver(ShibbolethResolver::create()); /* * For now, leave ApplicationID defaulted.