mirror of
https://github.com/adtools/clib2.git
synced 2025-12-08 14:59:05 +00:00
- Moved the environment variable cleanup code into a destructor function.
- Fixed a typo in the hstrerror() function. git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14782 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
- Moved the environment variable cleanup code into a destructor function.
|
||||||
|
|
||||||
|
- Fixed a typo in the hstrerror() function.
|
||||||
|
|
||||||
|
|
||||||
c.lib 1.184 (28.11.2004)
|
c.lib 1.184 (28.11.2004)
|
||||||
|
|
||||||
- Added asctime_r(), ctime_r(), gmtime_r(), localtime_r() and strtok_r().
|
- Added asctime_r(), ctime_r(), gmtime_r(), localtime_r() and strtok_r().
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: macros.h,v 1.2 2004-09-29 19:57:57 obarthel Exp $
|
* $Id: macros.h,v 1.3 2004-12-19 16:42:51 obarthel Exp $
|
||||||
*
|
*
|
||||||
* :ts=4
|
* :ts=4
|
||||||
*
|
*
|
||||||
@ -172,7 +172,7 @@
|
|||||||
#define PROFILE_CONSTRUCTOR(name) static void __attribute__((constructor)) name##_ctor(void)
|
#define PROFILE_CONSTRUCTOR(name) static void __attribute__((constructor)) name##_ctor(void)
|
||||||
#define PROFILE_DESTRUCTOR(name) static void __attribute__((destructor)) name##_dtor(void)
|
#define PROFILE_DESTRUCTOR(name) static void __attribute__((destructor)) name##_dtor(void)
|
||||||
#define CONSTRUCTOR_SUCCEED() return
|
#define CONSTRUCTOR_SUCCEED() return
|
||||||
#define CONSTRUCTOR_FAIL() exit(20) /* ZZZ not a nice thing to do; fix the constructor invocation code! */
|
#define CONSTRUCTOR_FAIL() exit(RETURN_FAIL) /* ZZZ not a nice thing to do; fix the constructor invocation code! */
|
||||||
#endif /* __GNUC__ */
|
#endif /* __GNUC__ */
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: socket_hstrerror.c,v 1.2 2004-07-29 08:35:15 obarthel Exp $
|
* $Id: socket_hstrerror.c,v 1.3 2004-12-19 16:42:51 obarthel Exp $
|
||||||
*
|
*
|
||||||
* :ts=4
|
* :ts=4
|
||||||
*
|
*
|
||||||
@ -118,7 +118,7 @@ hstrerror(int error_number)
|
|||||||
|
|
||||||
case 3: /* NO_RECOVERY */
|
case 3: /* NO_RECOVERY */
|
||||||
|
|
||||||
result = "Unknown server error_number";
|
result = "Unknown server error";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: stdlib_headers.h,v 1.2 2004-11-14 11:06:27 obarthel Exp $
|
* $Id: stdlib_headers.h,v 1.3 2004-12-19 16:42:51 obarthel Exp $
|
||||||
*
|
*
|
||||||
* :ts=4
|
* :ts=4
|
||||||
*
|
*
|
||||||
@ -149,18 +149,6 @@ struct MemoryTree
|
|||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
struct LocalVariable
|
|
||||||
{
|
|
||||||
struct LocalVariable * lv_Next;
|
|
||||||
char * lv_Name;
|
|
||||||
};
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
extern struct LocalVariable * NOCOMMON __lv_root;
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
extern unsigned NOCOMMON __random_seed;
|
extern unsigned NOCOMMON __random_seed;
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: stdlib_init_exit.c,v 1.1.1.1 2004-07-26 16:31:57 obarthel Exp $
|
* $Id: stdlib_init_exit.c,v 1.2 2004-12-19 16:42:51 obarthel Exp $
|
||||||
*
|
*
|
||||||
* :ts=4
|
* :ts=4
|
||||||
*
|
*
|
||||||
@ -60,20 +60,6 @@ __stdlib_exit(void)
|
|||||||
}
|
}
|
||||||
#endif /* __MEM_DEBUG */
|
#endif /* __MEM_DEBUG */
|
||||||
|
|
||||||
/* Now for the local variables that may still be set. */
|
|
||||||
if(__lv_root != NULL)
|
|
||||||
{
|
|
||||||
/* ZZZ why is this being done here? */
|
|
||||||
|
|
||||||
do
|
|
||||||
{
|
|
||||||
D(("deleting variable '%s'",__lv_root->lv_Name));
|
|
||||||
|
|
||||||
DeleteVar(__lv_root->lv_Name,0);
|
|
||||||
}
|
|
||||||
while((__lv_root = __lv_root->lv_Next) != NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Clean this up, too, just to be safe. */
|
/* Clean this up, too, just to be safe. */
|
||||||
NewList((struct List *)&__alloca_memory_list);
|
NewList((struct List *)&__alloca_memory_list);
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: stdlib_setenv.c,v 1.2 2004-08-07 09:15:32 obarthel Exp $
|
* $Id: stdlib_setenv.c,v 1.3 2004-12-19 16:42:51 obarthel Exp $
|
||||||
*
|
*
|
||||||
* :ts=4
|
* :ts=4
|
||||||
*
|
*
|
||||||
@ -53,7 +53,36 @@
|
|||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
struct LocalVariable * __lv_root;
|
struct LocalVariable
|
||||||
|
{
|
||||||
|
struct LocalVariable * lv_Next;
|
||||||
|
char * lv_Name;
|
||||||
|
};
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
STATIC struct LocalVariable * __lv_root;
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
CLIB_DESTRUCTOR(__setenv_exit)
|
||||||
|
{
|
||||||
|
ENTER();
|
||||||
|
|
||||||
|
/* Now for the local variables that may still be set. */
|
||||||
|
if(__lv_root != NULL)
|
||||||
|
{
|
||||||
|
do
|
||||||
|
{
|
||||||
|
D(("deleting variable '%s'",__lv_root->lv_Name));
|
||||||
|
|
||||||
|
DeleteVar(__lv_root->lv_Name,0);
|
||||||
|
}
|
||||||
|
while((__lv_root = __lv_root->lv_Next) != NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
LEAVE();
|
||||||
|
}
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user