1
0
mirror of https://github.com/adtools/clib2.git synced 2025-12-08 14:59:05 +00:00

- Fixed the SAS/C destructor function prototypes and verified

that the constructors/destructors are called in the proper
  order, too.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14884 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
Olaf Barthel
2005-03-11 18:27:27 +00:00
parent 419172fb0e
commit 08cc54d3fa
22 changed files with 71 additions and 57 deletions

View File

@ -1,5 +1,5 @@
#
# $Id: GNUmakefile.68k,v 1.41 2005-03-11 13:23:17 obarthel Exp $
# $Id: GNUmakefile.68k,v 1.42 2005-03-11 18:27:26 obarthel Exp $
#
# :ts=8
#
@ -12,7 +12,7 @@ RANLIB = ranlib
COPY = copy clone buf=0
DELETE = delete all quiet
MAKEDIR = makedir
MAKE = make -f GNUmakefile.68k
MAKE = $(MAKE_COMMAND) -f GNUmakefile.68k
##############################################################################

View File

@ -1,5 +1,5 @@
#
# $Id: GNUmakefile.os4,v 1.42 2005-03-11 13:23:18 obarthel Exp $
# $Id: GNUmakefile.os4,v 1.43 2005-03-11 18:27:26 obarthel Exp $
#
# :ts=8
#
@ -27,7 +27,7 @@ MAKEDIR = mkdir
# DELETE = delete all quiet
# MAKEDIR = makedir
MAKE = make -f GNUmakefile.os4
MAKE = $(MAKE_COMMAND) -f GNUmakefile.os4
##############################################################################

View File

@ -1,5 +1,5 @@
/*
* $Id: amiga_rexxvars.c,v 1.3 2005-01-09 10:10:40 obarthel Exp $
* $Id: amiga_rexxvars.c,v 1.4 2005-03-11 18:27:26 obarthel Exp $
*
* :ts=4
*
@ -60,7 +60,7 @@ static struct RexxSysIFace * IRexxSys;
/****************************************************************************/
CLIB_CONSTRUCTOR(__rexxvars_init)
CLIB_CONSTRUCTOR(rexxvars_init)
{
ENTER();
@ -85,7 +85,7 @@ CLIB_CONSTRUCTOR(__rexxvars_init)
/****************************************************************************/
CLIB_DESTRUCTOR(__rexxvars_exit)
CLIB_DESTRUCTOR(rexxvars_exit)
{
ENTER();

View File

@ -70,6 +70,10 @@
setjmp(). This is now done within stdlib_main.c prior to
calling the destructor function invocation code.
- Fixed the SAS/C destructor function prototypes and verified
that the constructors/destructors are called in the proper
order, too.
c.lib 1.189 (5.3.2005)

View File

@ -1,5 +1,5 @@
/*
* $Id: dirent_closedir.c,v 1.9 2005-03-11 13:23:18 obarthel Exp $
* $Id: dirent_closedir.c,v 1.10 2005-03-11 18:27:26 obarthel Exp $
*
* :ts=4
*
@ -82,7 +82,7 @@ __dirent_unlock(void)
/****************************************************************************/
CLIB_CONSTRUCTOR(__dirent_init)
CLIB_CONSTRUCTOR(dirent_init)
{
BOOL success = FALSE;
@ -112,7 +112,7 @@ CLIB_CONSTRUCTOR(__dirent_init)
/****************************************************************************/
CLIB_DESTRUCTOR(__dirent_exit)
CLIB_DESTRUCTOR(dirent_exit)
{
ENTER();

View File

@ -1,5 +1,5 @@
/*
* $Id: locale_init_exit.c,v 1.9 2005-03-11 13:23:18 obarthel Exp $
* $Id: locale_init_exit.c,v 1.10 2005-03-11 18:27:26 obarthel Exp $
*
* :ts=4
*
@ -214,7 +214,7 @@ __locale_unlock(void)
/****************************************************************************/
CLIB_DESTRUCTOR(__locale_exit_destructor)
CLIB_DESTRUCTOR(locale_exit)
{
ENTER();
@ -232,7 +232,7 @@ CLIB_DESTRUCTOR(__locale_exit_destructor)
/****************************************************************************/
CLIB_CONSTRUCTOR(__locale_init_constructor)
CLIB_CONSTRUCTOR(locale_init)
{
BOOL success = FALSE;
int i;

View File

@ -1,5 +1,5 @@
/*
* $Id: macros.h,v 1.16 2005-03-11 13:23:18 obarthel Exp $
* $Id: macros.h,v 1.17 2005-03-11 18:27:26 obarthel Exp $
*
* :ts=4
*
@ -101,8 +101,8 @@
int __stdargs _STI_##pri##_##name(void)
#define DESTRUCTOR(name,pri) \
int __stdargs _STD_##pri##_##name(void); \
int __stdargs _STD_##pri##_##name(void)
void __stdargs _STD_##pri##_##name(void); \
void __stdargs _STD_##pri##_##name(void)
#define CONSTRUCTOR_SUCCEED() \
return(0)

View File

@ -1,5 +1,5 @@
/*
* $Id: math_init_exit.c,v 1.11 2005-03-11 13:23:18 obarthel Exp $
* $Id: math_init_exit.c,v 1.12 2005-03-11 18:27:26 obarthel Exp $
*
* :ts=4
*
@ -71,7 +71,7 @@ double __huge_val;
/****************************************************************************/
MATH_DESTRUCTOR(__math_exit)
MATH_DESTRUCTOR(math_exit)
{
#if defined(IEEE_FLOATING_POINT_SUPPORT)
{
@ -98,7 +98,7 @@ MATH_DESTRUCTOR(__math_exit)
/****************************************************************************/
MATH_CONSTRUCTOR(__math_init)
MATH_CONSTRUCTOR(math_init)
{
BOOL success = FALSE;

View File

@ -1,5 +1,5 @@
#
# $Id: smakefile,v 1.32 2005-03-11 09:37:29 obarthel Exp $
# $Id: smakefile,v 1.33 2005-03-11 18:27:26 obarthel Exp $
#
# :ts=8
#
@ -427,13 +427,9 @@ STDLIB_OBJ = \
stdlib_shell_escape.o \
stdlib_showerror.o \
stdlib_srand.o \
stdlib_stackcheck.o \
stdlib_stackoverflow.o \
stdlib_stackargbytes.o \
stdlib_stacksafezone.o \
stdlib_stacksize.o \
stdlib_stack_usage.o \
stdlib_arg.o \
stdlib_stack_usage.o \
stdlib_stacksize.o \
stdlib_strtod.o \
stdlib_strtol.o \
stdlib_strtoul.o \

View File

@ -1,5 +1,5 @@
/*
* $Id: socket_init_exit.c,v 1.16 2005-03-11 13:23:18 obarthel Exp $
* $Id: socket_init_exit.c,v 1.17 2005-03-11 18:27:26 obarthel Exp $
*
* :ts=4
*
@ -92,7 +92,7 @@ int h_errno;
/****************************************************************************/
SOCKET_DESTRUCTOR(__socket_exit)
SOCKET_DESTRUCTOR(socket_exit)
{
/* Disable ^C checking. */
if(__SocketBase != NULL)
@ -134,7 +134,7 @@ SOCKET_DESTRUCTOR(__socket_exit)
/****************************************************************************/
SOCKET_CONSTRUCTOR(__socket_init)
SOCKET_CONSTRUCTOR(socket_init)
{
struct TagItem tags[5];
BOOL success = FALSE;

View File

@ -1,5 +1,5 @@
/*
* $Id: stdio_file_init.c,v 1.3 2005-03-11 13:23:18 obarthel Exp $
* $Id: stdio_file_init.c,v 1.4 2005-03-11 18:27:27 obarthel Exp $
*
* :ts=4
*
@ -196,7 +196,7 @@ wb_file_init(void)
/****************************************************************************/
FILE_CONSTRUCTOR(__stdio_file_init)
FILE_CONSTRUCTOR(stdio_file_init)
{
struct SignalSemaphore * stdio_lock;
struct SignalSemaphore * fd_lock;

View File

@ -1,5 +1,5 @@
/*
* $Id: stdio_init_exit.c,v 1.27 2005-03-11 13:23:18 obarthel Exp $
* $Id: stdio_init_exit.c,v 1.28 2005-03-11 18:27:27 obarthel Exp $
*
* :ts=4
*
@ -99,7 +99,7 @@ __close_all_files(void)
/****************************************************************************/
STDIO_DESTRUCTOR(__stdio_exit)
STDIO_DESTRUCTOR(stdio_exit)
{
__close_all_files();
@ -108,7 +108,7 @@ STDIO_DESTRUCTOR(__stdio_exit)
/****************************************************************************/
STDIO_CONSTRUCTOR(__stdio_init)
STDIO_CONSTRUCTOR(stdio_init)
{
const int num_standard_files = (STDERR_FILENO - STDIN_FILENO + 1);

View File

@ -1,5 +1,5 @@
/*
* $Id: stdlib_arg.c,v 1.3 2005-03-11 13:23:18 obarthel Exp $
* $Id: stdlib_arg.c,v 1.4 2005-03-11 18:27:27 obarthel Exp $
*
* :ts=4
*
@ -110,7 +110,7 @@ is_final_quote_character(const unsigned char * str)
/****************************************************************************/
ARG_CONSTRUCTOR(__arg_init)
ARG_CONSTRUCTOR(arg_init)
{
BOOL success = FALSE;

View File

@ -1,5 +1,5 @@
/*
* $Id: stdlib_headers.h,v 1.14 2005-03-11 09:37:29 obarthel Exp $
* $Id: stdlib_headers.h,v 1.15 2005-03-11 18:27:27 obarthel Exp $
*
* :ts=4
*
@ -226,6 +226,11 @@ extern UBYTE * NOCOMMON __base;
/****************************************************************************/
extern ULONG NOCOMMON __stk_extensions;
extern ULONG NOCOMMON __stk_maxsize;
/****************************************************************************/
extern ULONG NOCOMMON __stk_argbytes;
extern ULONG NOCOMMON __stk_safezone;
extern ULONG NOCOMMON __stk_size;

View File

@ -1,5 +1,5 @@
/*
* $Id: stdlib_init_exit.c,v 1.8 2005-03-11 13:23:18 obarthel Exp $
* $Id: stdlib_init_exit.c,v 1.9 2005-03-11 18:27:27 obarthel Exp $
*
* :ts=4
*
@ -51,7 +51,7 @@ char * __program_name;
/****************************************************************************/
STDLIB_DESTRUCTOR(__stdlib_exit)
STDLIB_DESTRUCTOR(stdlib_exit)
{
__memory_exit();
@ -64,7 +64,7 @@ STDLIB_DESTRUCTOR(__stdlib_exit)
/****************************************************************************/
STDLIB_CONSTRUCTOR(__stdlib_init)
STDLIB_CONSTRUCTOR(stdlib_init)
{
BOOL success = FALSE;

View File

@ -1,5 +1,5 @@
/*
* $Id: stdlib_stack_usage.c,v 1.3 2005-03-11 09:37:29 obarthel Exp $
* $Id: stdlib_stack_usage.c,v 1.4 2005-03-11 18:27:27 obarthel Exp $
*
* :ts=4
*
@ -47,6 +47,15 @@ static struct StackSwapStruct stack_swap_struct;
/****************************************************************************/
#if defined(__SASC)
ULONG __stk_extensions; /* number of stack extensions performed */
ULONG __stk_maxsize; /* maximum amount of memory allocated for stack extension */
#endif /* __SASC */
/****************************************************************************/
#define STACK_FILL_COOKIE 0xA1
/****************************************************************************/

View File

@ -1,5 +1,5 @@
/*
* $Id: stdlib_stackcheck.c,v 1.5 2005-03-11 13:23:18 obarthel Exp $
* $Id: stdlib_stackcheck.c,v 1.6 2005-03-11 18:27:27 obarthel Exp $
*
* :ts=4
*
@ -115,7 +115,7 @@ UBYTE * __base;
/****************************************************************************/
STK_CONSTRUCTOR(__stk_init)
STK_CONSTRUCTOR(stk_init)
{
struct Task * this_task = FindTask(NULL);
ULONG lower = (ULONG)this_task->tc_SPLower;

View File

@ -1,5 +1,5 @@
/*
* $Id: stdlib_stackextension.c,v 1.8 2005-03-11 13:23:18 obarthel Exp $
* $Id: stdlib_stackextension.c,v 1.9 2005-03-11 18:27:27 obarthel Exp $
*
* :ts=4
*
@ -282,7 +282,7 @@ ULONG __stk_size;
/****************************************************************************/
STK_CONSTRUCTOR(__stk_init)
STK_CONSTRUCTOR(stk_init)
{
struct Task *task = FindTask(NULL);
@ -300,7 +300,7 @@ STK_CONSTRUCTOR(__stk_init)
/****************************************************************************/
/* Free all spare stackframes */
STK_DESTRUCTOR(__stk_exit)
STK_DESTRUCTOR(stk_exit)
{
if(__memory_pool == NULL)
{

View File

@ -1,5 +1,5 @@
/*
* $Id: time_clock.c,v 1.3 2005-01-02 09:07:19 obarthel Exp $
* $Id: time_clock.c,v 1.4 2005-03-11 18:27:27 obarthel Exp $
*
* :ts=4
*
@ -41,7 +41,7 @@ static struct DateStamp start_time;
/****************************************************************************/
CLIB_CONSTRUCTOR(init_start_time)
CLIB_CONSTRUCTOR(clock_init)
{
/* Remember when this program was started. */
DateStamp(&start_time);

View File

@ -1,5 +1,5 @@
/*
* $Id: unistd_init_exit.c,v 1.8 2005-03-11 13:23:18 obarthel Exp $
* $Id: unistd_init_exit.c,v 1.9 2005-03-11 18:27:27 obarthel Exp $
*
* :ts=4
*
@ -46,7 +46,7 @@ struct MinList __unlink_list;
/****************************************************************************/
CLIB_CONSTRUCTOR(__unistd_init)
CLIB_CONSTRUCTOR(unistd_init)
{
ENTER();
@ -59,7 +59,7 @@ CLIB_CONSTRUCTOR(__unistd_init)
/****************************************************************************/
CLIB_DESTRUCTOR(__unistd_exit)
CLIB_DESTRUCTOR(unistd_exit)
{
ENTER();

View File

@ -1,5 +1,5 @@
/*
* $Id: unistd_timer.c,v 1.4 2005-03-11 13:23:18 obarthel Exp $
* $Id: unistd_timer.c,v 1.5 2005-03-11 18:27:27 obarthel Exp $
*
* :ts=4
*
@ -59,7 +59,7 @@ struct TimerIFace * __ITimer;
/****************************************************************************/
CLIB_CONSTRUCTOR(__timer_init)
CLIB_CONSTRUCTOR(timer_init)
{
BOOL success = FALSE;
@ -112,7 +112,7 @@ CLIB_CONSTRUCTOR(__timer_init)
/****************************************************************************/
CLIB_DESTRUCTOR(__timer_exit)
CLIB_DESTRUCTOR(timer_exit)
{
ENTER();

View File

@ -1,5 +1,5 @@
/*
* $Id: usergroup_init_exit.c,v 1.7 2005-03-11 13:23:18 obarthel Exp $
* $Id: usergroup_init_exit.c,v 1.8 2005-03-11 18:27:27 obarthel Exp $
*
* :ts=4
*
@ -60,7 +60,7 @@ struct UserGroupIFace * __IUserGroup;
/****************************************************************************/
CLIB_DESTRUCTOR(__usergroup_exit)
CLIB_DESTRUCTOR(usergroup_exit)
{
ENTER();
@ -85,7 +85,7 @@ CLIB_DESTRUCTOR(__usergroup_exit)
/****************************************************************************/
CLIB_CONSTRUCTOR(__usergroup_init)
CLIB_CONSTRUCTOR(usergroup_init)
{
struct TagItem tags[2];
BOOL success = FALSE;