Re-enable Win32 support.
Rename _MSCVER #ifdef into _WIN32 #ifdef.
This commit is contained in:
parent
97d57e391f
commit
29f7064ed0
@ -1,9 +1,9 @@
|
|||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
/* $RCSfile: libnode.c,v $ */
|
/* $RCSfile: libnode.c,v $ */
|
||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
/* $Revision: 2.14 $ */
|
/* $Revision: 2.15 $ */
|
||||||
/* $Name: $ */
|
/* $Name: $ */
|
||||||
/* $Date: 2005/01/11 20:57:04 $ */
|
/* $Date: 2005/01/19 23:59:41 $ */
|
||||||
/* $Author: agibert $ */
|
/* $Author: agibert $ */
|
||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -34,7 +34,7 @@
|
|||||||
#include <libnode.h>
|
#include <libnode.h>
|
||||||
|
|
||||||
#ifdef _LIBVER_SUPPORT
|
#ifdef _LIBVER_SUPPORT
|
||||||
VER_INFO_EXPORT( libnode, "$Revision: 2.14 $", "$Name: $", __FILE__, "$Author: agibert $")
|
VER_INFO_EXPORT( libnode, "$Revision: 2.15 $", "$Name: $", __FILE__, "$Author: agibert $")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ NDT_Status ND_Default_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT
|
|||||||
|
|
||||||
Command_Name = "NDD_CMD_MANAGER_VERSION";
|
Command_Name = "NDD_CMD_MANAGER_VERSION";
|
||||||
|
|
||||||
*Version_Name_Ptr = "$Revision: 2.14 $ $Name: $ $Date: 2005/01/11 20:57:04 $ $Author: agibert $";
|
*Version_Name_Ptr = "$Revision: 2.15 $ $Name: $ $Date: 2005/01/19 23:59:41 $ $Author: agibert $";
|
||||||
|
|
||||||
return( NDS_OK);
|
return( NDS_OK);
|
||||||
}
|
}
|
||||||
@ -369,7 +369,7 @@ NDT_Status ND_OpenStruct_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id,
|
|||||||
|
|
||||||
Command_Name = "NDD_CMD_MANAGER_VERSION";
|
Command_Name = "NDD_CMD_MANAGER_VERSION";
|
||||||
|
|
||||||
*Version_Name_Ptr = "$Revision: 2.14 $ $Name: $ $Date: 2005/01/11 20:57:04 $ $Author: agibert $";
|
*Version_Name_Ptr = "$Revision: 2.15 $ $Name: $ $Date: 2005/01/19 23:59:41 $ $Author: agibert $";
|
||||||
|
|
||||||
return( NDS_OK);
|
return( NDS_OK);
|
||||||
}
|
}
|
||||||
@ -604,6 +604,7 @@ NDT_Status ND_Library_Open_I( int Debug_Mode)
|
|||||||
ND_Library_StdErr_Set_I( stderr);
|
ND_Library_StdErr_Set_I( stderr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(_WIN32)
|
||||||
if( ( NDG_Base.DL_Ptr = dlopen( NULL, ( RTLD_NOW | RTLD_GLOBAL))) == NULL)
|
if( ( NDG_Base.DL_Ptr = dlopen( NULL, ( RTLD_NOW | RTLD_GLOBAL))) == NULL)
|
||||||
{
|
{
|
||||||
sprintf( NDG_Base.Err_String, "Error ND_Library_Open: can't dlopen [%s]", dlerror());
|
sprintf( NDG_Base.Err_String, "Error ND_Library_Open: can't dlopen [%s]", dlerror());
|
||||||
@ -611,6 +612,7 @@ NDT_Status ND_Library_Open_I( int Debug_Mode)
|
|||||||
|
|
||||||
return( NDS_KO);
|
return( NDS_KO);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return( NDS_OK);
|
return( NDS_OK);
|
||||||
}
|
}
|
||||||
@ -679,6 +681,7 @@ NDT_Status ND_Library_Close_I( void)
|
|||||||
|
|
||||||
NDG_Base.Symbol_First_Ptr = (NDT_Symbol *)NULL;
|
NDG_Base.Symbol_First_Ptr = (NDT_Symbol *)NULL;
|
||||||
|
|
||||||
|
#if !defined(_WIN32)
|
||||||
if( dlclose( NDG_Base.DL_Ptr) != 0)
|
if( dlclose( NDG_Base.DL_Ptr) != 0)
|
||||||
{
|
{
|
||||||
sprintf( NDG_Base.Err_String, "Error ND_Library_Open: can't dlclose [%s]", dlerror());
|
sprintf( NDG_Base.Err_String, "Error ND_Library_Open: can't dlclose [%s]", dlerror());
|
||||||
@ -686,6 +689,7 @@ NDT_Status ND_Library_Close_I( void)
|
|||||||
|
|
||||||
return( NDS_KO);
|
return( NDS_KO);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
NDG_Base.Open_Status = NDD_FALSE;
|
NDG_Base.Open_Status = NDD_FALSE;
|
||||||
|
|
||||||
@ -928,6 +932,16 @@ NDT_Status ND_DataStruct_Open_I( NDT_Root **Root_Ptr_Ptr, NDT_Index_Nb Index_N
|
|||||||
|
|
||||||
/* Valeurs par défaut des fonctions d'allocation et de désallocation */
|
/* Valeurs par défaut des fonctions d'allocation et de désallocation */
|
||||||
|
|
||||||
|
#if defined(_WIN32)
|
||||||
|
if( ( Manager_Name != NULL) && ( Manager_Ptr == NULL))
|
||||||
|
{
|
||||||
|
sprintf( NDG_Base.Err_String, "Error ND_DataStruct_Open_I: no symbol lookup support, Manager_Ptr shouldn't be NULL");
|
||||||
|
ND_Error_Print();
|
||||||
|
|
||||||
|
return( NDS_ERRAPI);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if( ( Manager_Name != NULL) || ( Manager_Ptr != NULL))
|
if( ( Manager_Name != NULL) || ( Manager_Ptr != NULL))
|
||||||
{
|
{
|
||||||
Real_Manager_Name = Manager_Name;
|
Real_Manager_Name = Manager_Name;
|
||||||
@ -939,6 +953,16 @@ NDT_Status ND_DataStruct_Open_I( NDT_Root **Root_Ptr_Ptr, NDT_Index_Nb Index_N
|
|||||||
Real_Manager_Ptr = ND_Default_Manager;
|
Real_Manager_Ptr = ND_Default_Manager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(_WIN32)
|
||||||
|
if( ( Allocator_Name != NULL) && ( Allocator_Ptr == NULL))
|
||||||
|
{
|
||||||
|
sprintf( NDG_Base.Err_String, "Error ND_DataStruct_Open_I: no symbol lookup support, Allocator_Ptr shouldn't be NULL");
|
||||||
|
ND_Error_Print();
|
||||||
|
|
||||||
|
return( NDS_ERRAPI);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if( ( Allocator_Name != NULL) || ( Allocator_Ptr != NULL))
|
if( ( Allocator_Name != NULL) || ( Allocator_Ptr != NULL))
|
||||||
{
|
{
|
||||||
Real_Allocator_Name = Allocator_Name;
|
Real_Allocator_Name = Allocator_Name;
|
||||||
@ -950,6 +974,16 @@ NDT_Status ND_DataStruct_Open_I( NDT_Root **Root_Ptr_Ptr, NDT_Index_Nb Index_N
|
|||||||
Real_Allocator_Ptr = ND_Default_Allocator;
|
Real_Allocator_Ptr = ND_Default_Allocator;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(_WIN32)
|
||||||
|
if( ( Desallocator_Name != NULL) && ( Desallocator_Ptr == NULL))
|
||||||
|
{
|
||||||
|
sprintf( NDG_Base.Err_String, "Error ND_DataStruct_Open_I: no symbol lookup support, Desallocator_Ptr shouldn't be NULL");
|
||||||
|
ND_Error_Print();
|
||||||
|
|
||||||
|
return( NDS_ERRAPI);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if( ( Desallocator_Name != NULL) || ( Desallocator_Ptr != NULL))
|
if( ( Desallocator_Name != NULL) || ( Desallocator_Ptr != NULL))
|
||||||
{
|
{
|
||||||
Real_Desallocator_Name = Desallocator_Name;
|
Real_Desallocator_Name = Desallocator_Name;
|
||||||
@ -4119,6 +4153,7 @@ NDT_Status ND_Desallocator_Exec_C( void *Ptr, NDT_Desallocator_Name Desallocat
|
|||||||
|
|
||||||
NDT_Status ND_Symbol_Find( void **Ptr_Ptr, const char *Symbol_Name)
|
NDT_Status ND_Symbol_Find( void **Ptr_Ptr, const char *Symbol_Name)
|
||||||
{
|
{
|
||||||
|
#if !defined(_WIN32)
|
||||||
NDT_Symbol *Symbol_Ptr;
|
NDT_Symbol *Symbol_Ptr;
|
||||||
|
|
||||||
|
|
||||||
@ -4166,6 +4201,7 @@ NDT_Status ND_Symbol_Find( void **Ptr_Ptr, const char *Symbol_Name)
|
|||||||
|
|
||||||
NDG_Base.Symbol_First_Ptr = Symbol_Ptr;
|
NDG_Base.Symbol_First_Ptr = Symbol_Ptr;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return( NDS_OK);
|
return( NDS_OK);
|
||||||
}
|
}
|
||||||
@ -5619,7 +5655,7 @@ void ND_Tree_Link_Recursive_Check( NDT_Node *Node_Ptr, int *Nb_Detected_Ptr,
|
|||||||
|
|
||||||
NDT_Status ND_Address_Check( void *Address)
|
NDT_Status ND_Address_Check( void *Address)
|
||||||
{
|
{
|
||||||
#if !defined(_MSC_VER)
|
#if !defined(_WIN32)
|
||||||
NDT_Status status;
|
NDT_Status status;
|
||||||
int rc;
|
int rc;
|
||||||
int test;
|
int test;
|
||||||
@ -5748,7 +5784,7 @@ void ND_Signal_Trap( int Sig_Num)
|
|||||||
{
|
{
|
||||||
NDG_Base.Sig_Trapped = Sig_Num;
|
NDG_Base.Sig_Trapped = Sig_Num;
|
||||||
|
|
||||||
#if !defined(_MSC_VER)
|
#if !defined(_WIN32)
|
||||||
siglongjmp( NDG_Base.SigLongJmp_Env, 1);
|
siglongjmp( NDG_Base.SigLongJmp_Env, 1);
|
||||||
#else
|
#else
|
||||||
longjmp( NDG_Base.SigLongJmp_Env, 1);
|
longjmp( NDG_Base.SigLongJmp_Env, 1);
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
/* $RCSfile: libnode.h,v $ */
|
/* $RCSfile: libnode.h,v $ */
|
||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
/* $Revision: 2.8 $ */
|
/* $Revision: 2.9 $ */
|
||||||
/* $Name: $ */
|
/* $Name: $ */
|
||||||
/* $Date: 2005/01/11 20:57:04 $ */
|
/* $Date: 2005/01/19 23:59:42 $ */
|
||||||
/* $Author: agibert $ */
|
/* $Author: agibert $ */
|
||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -87,7 +87,7 @@ typedef struct NDT_Base
|
|||||||
char Err_String[512];
|
char Err_String[512];
|
||||||
FILE *Err_Stream;
|
FILE *Err_Stream;
|
||||||
int Sig_Trapped;
|
int Sig_Trapped;
|
||||||
#if !defined(_MSC_VER)
|
#if !defined(_WIN32)
|
||||||
sigjmp_buf SigLongJmp_Env;
|
sigjmp_buf SigLongJmp_Env;
|
||||||
#else
|
#else
|
||||||
jmp_buf SigLongJmp_Env;
|
jmp_buf SigLongJmp_Env;
|
||||||
|
Loading…
Reference in New Issue
Block a user