< Previous by Date Date Index Next by Date >
  Thread Index  

[reSIProcate] Patches required for Solaris 8/9 build


Title: Message
Hi,
As promised, here is a list of changes that are required to build libresiprocate and libresiprocatedum on Solaris using the Sun C++ (v5.6) compiler.
 
I've attached the diffs. Is someone available to submit these changes and verify they do not break linux or windows builds? In summary the changes are:
 
resiprocate/Helper.cxx
==========================================================
wants make_pair args to match template args
 
resiprocate/TransportSelector.cxx
==========================================================
added netdb.h (which defines addrinfo)
 
resiprocate/os/Log.hxx
==========================================================
removed comma to remove compile warning
 
resiprocate/os/Log.cxx:
==========================================================
tstamp is a defined macro in sys/time.h on solaris. Since this variable was only used for WIN32, I moved it down in to the WIN32 instructions. I renamed the variable just in case it gets moved out.
 
resiprocate/os/HeapInstanceCounter.hxx
==========================================================
provided a dummy prototype for the RESIP_HeadCount. This gets rid of empty declarations when the count is not used
 
dum/ServerAuthManager.cxx, hxx
==========================================================
implemented missing constructor and destructor
 
dum/ServerSubscription.cxx
==========================================================
insert couldn't find a "less"operator for Data, I think this is because all of Data's comparison operators require const Data.
 
dum/ClientAuthManager.hxx
==========================================================
Moved CompareAuth into public section so it can be accessible by AuthState
 
autotools/sip/resiprocate/dum/Makefile.am
==========================================================
add missing files
 
Thanks,

Elizabeth Clark                                
Bridgewater Systems Corporation               
Phone :  (613) 591-9104 x2776
E-mail :
mailto:elizabeth@xxxxxxxxxxxxxxxxxxxxxx

 

 
Index: resiprocate/Helper.cxx
===================================================================
--- resiprocate/Helper.cxx      (revision 3840)
+++ resiprocate/Helper.cxx      (working copy)
@@ -1036,7 +1036,7 @@
    }
 
    return std::make_pair(pair.substr(2*saltBytes, pos), // strip out the salt
-                         pair.substr(pos+sep.size()).c_str());
+                         pair.substr(pos+sep.size()));
 }
 #endif
 Helper::ContentsSecAttrs::ContentsSecAttrs()
Index: resiprocate/TransportSelector.cxx
===================================================================
--- resiprocate/TransportSelector.cxx   (revision 3840)
+++ resiprocate/TransportSelector.cxx   (working copy)
@@ -6,6 +6,7 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <arpa/inet.h>
+#include <netdb.h>
 #endif
 
 #include "resiprocate/NameAddr.hxx"
Index: resiprocate/os/Log.cxx
===================================================================
--- resiprocate/os/Log.cxx      (revision 3840)
+++ resiprocate/os/Log.cxx      (working copy)
@@ -187,8 +187,8 @@
         << pfile << ":" << line;
 #else   
    char buffer[256];
-   Data tstamp(Data::Borrow, buffer, sizeof(buffer));
 #if defined( WIN32 )
+   Data tstampbuf(Data::Borrow, buffer, sizeof(buffer));
    const char* file = pfile + strlen(pfile);
    while (file != pfile &&
           *file != '\\')
@@ -200,7 +200,7 @@
       ++file;
    }
    strm << _descriptions[level+1] << DELIM
-        << timestamp(tstamp) << DELIM  
+        << timestamp(tstampbuf) << DELIM  
         << _appName << DELIM
         << subsystem << DELIM 
         << GetCurrentThreadId() << DELIM
Index: resiprocate/os/Log.hxx
===================================================================
--- resiprocate/os/Log.hxx      (revision 3840)
+++ resiprocate/os/Log.hxx      (working copy)
@@ -28,7 +28,7 @@
          Syslog, 
          File, 
          Cerr,
-         VSDebugWindow,   // Use only for Visual Studio Debug Window logging - 
WIN32 must be defined
+         VSDebugWindow   // Use only for Visual Studio Debug Window logging - 
WIN32 must be defined
       } Type;
       
       typedef enum 
Index: resiprocate/os/HeapInstanceCounter.hxx
===================================================================
--- resiprocate/os/HeapInstanceCounter.hxx      (revision 3840)
+++ resiprocate/os/HeapInstanceCounter.hxx      (working copy)
@@ -37,7 +37,7 @@
           resip::HeapInstanceCounter::deallocate(addr, typeid(type_));         
 \
       }
 #else
-#define RESIP_HeapCount(type_)
+#define RESIP_HeapCount(type_) __dUmMy()
 #endif // RESIP_HEAP_COUNT
 
 namespace resip
Index: resiprocate/dum/ServerAuthManager.cxx
===================================================================
--- resiprocate/dum/ServerAuthManager.cxx       (revision 3840)
+++ resiprocate/dum/ServerAuthManager.cxx       (working copy)
@@ -5,6 +5,15 @@
 
 using namespace resip;
 
+ServerAuthManager::ServerAuthManager(Profile& profile)
+   : mProfile(profile)
+{
+}
+
+ServerAuthManager::~ServerAuthManager()
+{
+}
+
 bool 
 ServerAuthManager::handle(const SipMessage& response)
 {
Index: resiprocate/dum/ServerSubscription.cxx
===================================================================
--- resiprocate/dum/ServerSubscription.cxx      (revision 3840)
+++ resiprocate/dum/ServerSubscription.cxx      (working copy)
@@ -28,7 +28,7 @@
 {
    mLastRequest = req;
    Data key = getEventType() + getDocumentKey();
-   mDum.mServerSubscriptions.insert(std::make_pair(key, this));
+   mDum.mServerSubscriptions.insert(std::make_pair<const 
Data,ServerSubscription*>(key,this));
 }
 
 ServerSubscription::~ServerSubscription()
Index: resiprocate/dum/ClientAuthManager.hxx
===================================================================
--- resiprocate/dum/ClientAuthManager.hxx       (revision 3840)
+++ resiprocate/dum/ClientAuthManager.hxx       (working copy)
@@ -21,10 +21,6 @@
       // return true if request is authorized
       bool handle(SipMessage& origRequest, const SipMessage& response);
       void addAuthentication(SipMessage& origRequest);
-      
-   private:
-      friend class DialogSet;
-      void dialogSetDestroyed(const DialogSetId& dsId);      
 
       class CompareAuth  : public std::binary_function<const Auth&, const 
Auth&, bool>
       {
@@ -40,6 +36,10 @@
          Failed
       } State;      
 
+   private:
+      friend class DialogSet;
+      void dialogSetDestroyed(const DialogSetId& dsId);      
+
       class AuthState
       {
          public:     
Index: resiprocate/dum/ServerAuthManager.hxx
===================================================================
--- resiprocate/dum/ServerAuthManager.hxx       (revision 3840)
+++ resiprocate/dum/ServerAuthManager.hxx       (working copy)
@@ -11,6 +11,8 @@
    public:
       ServerAuthManager(Profile& profile);
 
+      virtual ~ServerAuthManager();
+
       // return true if request is authorized
       bool handle(const SipMessage& request);
       
Index: autotools/sip/resiprocate/dum/Makefile.am
===================================================================
--- autotools/sip/resiprocate/dum/Makefile.am   (revision 3840)
+++ autotools/sip/resiprocate/dum/Makefile.am   (working copy)
@@ -8,18 +8,23 @@
 libresipdum_la_SOURCES = \
        AppDialog.cxx \
        AppDialogSet.cxx \
+        AppDialogSetFactory.cxx \
        BaseCreator.cxx \
+        BaseSubscription.cxx \
        BaseUsage.cxx \
        ClientAuthManager.cxx \
        ClientInviteSession.cxx \
        ClientOutOfDialogReq.cxx \
+        ClientPagerMessage.cxx \
        ClientPublication.cxx \
        ClientRegistration.cxx \
        ClientSubscription.cxx \
+        DefaultServerReferHandler.cxx \
        Dialog.cxx \
        DialogId.cxx \
        DialogSet.cxx \
        DialogSetId.cxx \
+        DialogUsage.cxx \
        DialogUsageManager.cxx \
        DumTimeout.cxx \
        HandleException.cxx \
@@ -29,17 +34,23 @@
        InviteSessionCreator.cxx \
        InviteSessionHandler.cxx \
        MergedRequestKey.cxx \
+        NonDialogUsage.cxx \
        OutOfDialogReqCreator.cxx \
+        PagerMessageCreator.cxx \
        Profile.cxx \
        PublicationCreator.cxx \
+        RedirectManager.cxx \
        RegistrationCreator.cxx \
        ServerAuthManager.cxx \
        ServerInviteSession.cxx \
        ServerOutOfDialogReq.cxx \
+        ServerPagerMessage.cxx \
        ServerPublication.cxx \
        ServerRegistration.cxx \
        ServerSubscription.cxx \
        SubscriptionCreator.cxx \
+        SubscriptionHandler.cxx \
+        SubscriptionState.cxx \
        UInt64Hash.cxx