- From: Tomas Kukosa <tomas.kukosa AT anfdata.cz>
- To: discussion AT sctp.de
- Subject: Re: [SCTP-Discussion] SCTP code in solaris
- Date: Thu Apr 26 08:54:01 2001
- List-id: SCTP Discussions <discussion.sctp.de>
- Organization: ANF DATA
 
Hi,
  timerXXX macros are defined in <sys/time.h> on the Linux. In the
SCTPlib some of them are defined in the "timer_list.h" for SOLARIS. But
not all of necessary macros are defined there. It should work properly
with attached code fragment.
  You are right, g_list functions are part of glib. You can find glib
source (glib-1.2.10.tar.gz) on the www.gtk.org site.
  Regards,
    Tom
-------------- fragment of "timer_list.h" -----------------------
#if defined(SOLARIS) || defined(VXWORKS)
#define timerclear(tvp)         ((tvp)->tv_sec = (tvp)->tv_usec = 0)
#define timercmp(a, b, CMP)                                                   
\
  (((a)->tv_sec == (b)->tv_sec) ?                                             
\
   ((a)->tv_usec CMP (b)->tv_usec) :                                          
\
   ((a)->tv_sec CMP (b)->tv_sec))
#endif
#define timeradd(a, b, result) \
  do
{                                                                       
\
    (result)->tv_sec = (a)->tv_sec +
(b)->tv_sec;                             \
    (result)->tv_usec = (a)->tv_usec +
(b)->tv_usec;                          \
    if ((result)->tv_usec >=
1000000)                                         \
     
{                                                                      
\
       
++(result)->tv_sec;                                                   \
        (result)->tv_usec -=
1000000;                                         \
     
}                                                                      
\
  } while (0)
#define timersub(a, b,
result)                                                \
  do
{                                                                       
\
    (result)->tv_sec = (a)->tv_sec -
(b)->tv_sec;                             \
    (result)->tv_usec = (a)->tv_usec -
(b)->tv_usec;                          \
    if ((result)->tv_usec < 0)
{                                              \
     
--(result)->tv_sec;                                                    
\
      (result)->tv_usec +=
1000000;                                           \
   
}                                                                        
\
  } while (0)
#endif
-----------------------------------------------------------------------
prashant kerur wrote:
>
 
>
 hi ,
>
 
>
 We  have SCTP version 7 code. We want to use in Sun solaris os.
>
 But while make we are getting some undefined references
>
 (timeradd,timerdelete,g_list functions) becz we think that those functions 
>
 are
>
 in glib library.
>
 
>
 So, please tell me how can we able to use SCTP code in solaris.
>
 
>
 Thanks,
>
 
>
 Regards,
>
 
>
 Prashant  & Rajesh
>
 
>
 _______________________________________________
>
 discussion mailing list
>
 discussion AT sctp.de
>
 http://www.sctp.de/mailman/listinfo/discussion
Archive powered by MHonArc 2.6.19+.