[openib-general] Re: [PATCH] OpenSM - complib fix for branch

Hal Rosenstock halr at voltaire.com
Wed Apr 5 03:58:51 PDT 2006


Hi Yael,

On Wed, 2006-04-05 at 02:24, Yael Kalka wrote:
> Hi Hal,
> 
> I saw that the complib patch (removal of constructor and destructor
> attribute), wasn't fully added to the branch. 
> Attached is a patch for the branch.

Is this needed for 1.0 ? Is this safe to add ? Was there more to it than
just this ? 

-- Hal

> Thanks,
> Yael
> 
> Signed-off-by:  Yael Kalka <yael at mellanox.co.il>
> 
> Index: complib/cl_complib.c
> ===================================================================
> --- complib/cl_complib.c	(revision 6203)
> +++ complib/cl_complib.c	(working copy)
> @@ -65,7 +65,6 @@ __cl_timer_prov_destroy( void );
>  cl_spinlock_t cl_atomic_spinlock;
>  
>  void
> -__attribute (( constructor ))
>  complib_init(void)
>  {
>  	cl_status_t	status = CL_SUCCESS;
> @@ -90,14 +89,6 @@ complib_init(void)
>  }
>  
>  void
> -__attribute (( destructor ))
> -complib_fini(void)
> -{
> -  __cl_timer_prov_destroy();
> -  __cl_user_syshelper_exit();
> -}
> -
> -void
>  complib_exit(void)
>  {
>    __cl_timer_prov_destroy();
> Index: opensm/main.c
> ===================================================================
> --- opensm/main.c	(revision 6203)
> +++ opensm/main.c	(working copy)
> @@ -44,9 +44,6 @@
>   *
>   * $Revision: 1.23 $
>   */
> -#ifdef __WIN__
> -#pragma warning(disable : 4996)
> -#endif
>  
>  #if HAVE_CONFIG_H
>  #  include <config.h>
> @@ -557,9 +554,7 @@ main(
>        {  NULL,            0, NULL,  0 }  /* Required at the end of the array */
>      };
>  
> -#ifdef __WIN__
>  	complib_init();
> -#endif
>  
>    /* Make sure that the opensm and complib were compiled using 
>       same modes (debug/free) */
> 




More information about the general mailing list