Index: opendiameter-cplusplus/include/framework.h =================================================================== --- opendiameter-cplusplus.orig/include/framework.h +++ opendiameter-cplusplus/include/framework.h @@ -41,6 +41,9 @@ #include #include #include +#if defined(__clang__) +#define ACE_LACKS_INLINE_FUNCTIONS +#endif #include #include #include @@ -244,21 +247,6 @@ class AAA_Job unsigned weight; }; -/*! jobHandle Handle to a Job - - This class provides a "handle" to a job, providing a safe way for - memory deallocation when an exception occurs in the constructor of - a class which generates a job object. -*/ -template -class AAA_JobHandle : public boost::shared_ptr -{ - public: - AAA_JobHandle(JOB* job) : boost::shared_ptr(job, AAA_JobDeleter()) {} - - JOB& Job() { return (JOB&)*boost::shared_ptr::get(); } -}; - /*! jobDeleter A class to delete a job This class is used for deleting a job. This class is used in @@ -275,6 +263,21 @@ class AAA_JobDeleter const unsigned maxNumPriority = 3; const unsigned maxMaxWeight = 3; +/*! jobHandle Handle to a Job + + This class provides a "handle" to a job, providing a safe way for + memory deallocation when an exception occurs in the constructor of + a class which generates a job object. +*/ +template +class AAA_JobHandle : public boost::shared_ptr +{ + public: + AAA_JobHandle(JOB* job) : boost::shared_ptr(job, AAA_JobDeleter()) {} + + JOB& Job() { return (JOB&)*boost::shared_ptr::get(); } +}; + /*! queueJob Job with Queue This class defines a job with a single FIFO queue to store objects @@ -342,7 +345,7 @@ template g(lock); + AAA_ScopeLock g(lock); (void)g; // In the case where one or more threads can enter here // simultaneously (this is the case when Dequeue is called by a @@ -401,7 +404,7 @@ template g(lock); + AAA_ScopeLock g(lock); (void)g; // In the case where one or more threads can enter here // simultaneously (this is the case when Dequeue is called by a // task), conditional mutex is needed to avoid possible blocking @@ -470,7 +473,7 @@ template g(lock); + AAA_ScopeLock g(lock); (void)g; int totalRemove=0; for (unsigned i=0; i g(lock); + AAA_ScopeLock g(lock); (void)g; for (unsigned i=0; i #include #include Index: opendiameter-cplusplus/libeap/eapcore/eap_peerfsm.cxx =================================================================== --- opendiameter-cplusplus.orig/libeap/eapcore/eap_peerfsm.cxx +++ opendiameter-cplusplus/libeap/eapcore/eap_peerfsm.cxx @@ -35,6 +35,9 @@ // eap_peerfsm.cxx: Peer state machine // Written by Yoshihiro Ohba +#if defined(__clang__) +#define ACE_LACKS_INLINE_FUNCTIONS +#endif #include #include #include Index: opendiameter-cplusplus/include/aaa_parser_api.h =================================================================== --- opendiameter-cplusplus.orig/include/aaa_parser_api.h +++ opendiameter-cplusplus/include/aaa_parser_api.h @@ -828,9 +828,11 @@ class AAAAvpContainerWidget * * AAAParser is a template class for generic parser. */ +template class AAAParser; + template + class DICTDATA> class AAAParser { public: Index: opendiameter-cplusplus/libeap/include/eap_parser.hxx =================================================================== --- opendiameter-cplusplus.orig/libeap/include/eap_parser.hxx +++ opendiameter-cplusplus/libeap/include/eap_parser.hxx @@ -37,15 +37,12 @@ #include "eap.hxx" #include "eap_log.hxx" -/// A parser to parse EAP header (i.e., Code, Identifier and Length fields). -typedef AAAParser EapHeaderParser; - /// Use this function to convert raw EAP header data to /// application-specific EAP header data. As a result of calling this /// function, the read pointer of the message block points to /// the end of EAP header. template<> inline void -EapHeaderParser::parseRawToApp() +AAAParser::parseRawToApp() { EapHeader *header = getAppData(); AAAMessageBlock *buffer = getRawData(); @@ -71,7 +68,7 @@ EapHeaderParser::parseRawToApp() /// As a result of calling this function, the write pointer /// of the message block points to the end of EAP header. template<> inline void -EapHeaderParser::parseAppToRaw() +AAAParser::parseAppToRaw() { EapHeader *header = getAppData(); AAAMessageBlock *buffer = getRawData(); @@ -90,14 +87,14 @@ EapHeaderParser::parseAppToRaw() } /// A parser to parse EAP header (i.e., Code, Identifier and Length fields). -typedef AAAParser EapRequestParser; +typedef AAAParser EapHeaderParser; /// Use this function to convert raw EAP request payload data to /// application-specific payload data. As a result of calling this /// function, the read pointer of the message block points to /// the end of payload. template<> inline void -EapRequestParser::parseRawToApp() +AAAParser::parseRawToApp() { EapPayload *payload = getAppData(); AAAMessageBlock *buffer = getRawData(); @@ -133,7 +130,7 @@ EapRequestParser::parseRawToApp() /// parser can calculate the PDU length by using /// ACE_Message_Block::wr_ptr() - ACE_Message_Block::base(). template<> inline void -EapRequestParser::parseAppToRaw() +AAAParser::parseAppToRaw() { //EapPayload *payload = getAppData(); AAAMessageBlock *buffer = getRawData(); @@ -162,6 +159,8 @@ EapRequestParser::parseAppToRaw() } } +/// A parser to parse EAP header (i.e., Code, Identifier and Length fields). +typedef AAAParser EapRequestParser; /// A base class parser for EAP response type data of any Type class EAP_EXPORTS EapResponseParser: public EapRequestParser {}; @@ -184,15 +183,12 @@ public: NakType type; }; -/// Nak parser -typedef AAAParser EapNakParser; - /// Use this function to convert raw EAP Nak response payload data /// (data following the Type field) to application-specific payload /// data. As a result of calling this function, the read pointer of /// the message block points to the end of payload. template<> inline void -EapNakParser::parseRawToApp() +AAAParser::parseRawToApp() { EapNakDict *d = getDictData(); EapNak *nak = getAppData(); @@ -247,7 +243,7 @@ EapNakParser::parseRawToApp() /// the PDU length by using ACE_Message_Block::wr_ptr() - /// ACE_Message_Block::base(). template<> inline void -EapNakParser::parseAppToRaw() +AAAParser::parseAppToRaw() { EapNakDict *d = getDictData(); EapNak *nak = getAppData(); @@ -303,9 +299,8 @@ EapNakParser::parseAppToRaw() } } -/// Request/Identity parser -typedef AAAParser -EapRequestIdentityParser; +/// Nak parser +typedef AAAParser EapNakParser; /// Use this function to convert raw EAP Identity request/response /// payload data (data following the Type field) to @@ -313,7 +308,7 @@ EapRequestIdentityParser; /// function, the read pointer of the message block points to the /// end of payload. template<> inline void -EapRequestIdentityParser::parseRawToApp() +AAAParser::parseRawToApp() { AAAMessageBlock *msg = getRawData(); EapIdentity *identity = getAppData(); @@ -339,7 +334,7 @@ EapRequestIdentityParser::parseRawToApp( /// calculate the PDU length by using ACE_Message_Block::wr_ptr() - /// ACE_Message_Block::base(). template<> inline void -EapRequestIdentityParser::parseAppToRaw() +AAAParser::parseAppToRaw() { AAAMessageBlock *msg = getRawData(); EapIdentity *identity = getAppData(); @@ -363,20 +358,19 @@ EapRequestIdentityParser::parseAppToRaw( msg->copy(str.data(), str.size()); } +/// Request/Identity parser +typedef AAAParser EapRequestIdentityParser; + /// Request/Notification parser class EAP_EXPORTS EapResponseIdentityParser: public EapRequestIdentityParser {}; -/// Request/Identity parser -typedef AAAParser -EapRequestNotificationParser; - /// Use this function to convert raw EAP Notification request/response /// payload data (data following the Type field) to /// application-specific payload data. As a result of calling this /// function, the read pointer of the message block points to the /// end of payload. template<> inline void -EapRequestNotificationParser::parseRawToApp() +AAAParser::parseRawToApp() { AAAMessageBlock *msg = getRawData(); EapNotification *notification = getAppData(); @@ -403,7 +397,7 @@ EapRequestNotificationParser::parseRawTo /// that the parser can calculate the PDU length by using /// ACE_Message_Block::wr_ptr() - ACE_Message_Block::base(). template<> inline void -EapRequestNotificationParser::parseAppToRaw() +AAAParser::parseAppToRaw() { AAAMessageBlock *msg = getRawData(); EapNotification *notification = getAppData(); @@ -428,20 +422,19 @@ EapRequestNotificationParser::parseAppTo msg->copy(str.data(), str.size()); } +/// Request/Identity parser +typedef AAAParser EapRequestNotificationParser; + /// Response/Notification parser class EAP_EXPORTS EapResponseNotificationParser: public EapRequestIdentityParser {}; -/// Request/MD5-Challenge parser -typedef AAAParser -EapRequestMD5ChallengeParser; - /// Use this function to convert raw EAP MD5-Challenge request data /// (data following the Type field) to application-specific payload /// data. As a result of calling this function, the read pointer of /// the message block points to the end of payload. template<> inline void -EapRequestMD5ChallengeParser::parseRawToApp() +AAAParser::parseRawToApp() { AAAMessageBlock *msg = getRawData(); EapMD5Challenge *md5Challenge = getAppData(); @@ -476,7 +469,7 @@ EapRequestMD5ChallengeParser::parseRawTo /// that the parser can calculate the PDU length by using /// ACE_Message_Block::wr_ptr() - ACE_Message_Block::base(). template<> inline void -EapRequestMD5ChallengeParser::parseAppToRaw() +AAAParser::parseAppToRaw() { AAAMessageBlock *msg = getRawData(); EapMD5Challenge *md5Challenge = getAppData(); @@ -509,6 +502,9 @@ EapRequestMD5ChallengeParser::parseAppTo } /// Request/MD5-Challenge parser +typedef AAAParser EapRequestMD5ChallengeParser; + +/// Request/MD5-Challenge parser class EAP_EXPORTS EapResponseMD5ChallengeParser : public EapRequestMD5ChallengeParser {};