diff --git a/library/GNUmakefile.68k b/library/GNUmakefile.68k index 76f8c66..bb3db0b 100644 --- a/library/GNUmakefile.68k +++ b/library/GNUmakefile.68k @@ -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 ############################################################################## diff --git a/library/GNUmakefile.os4 b/library/GNUmakefile.os4 index da10277..e855baa 100644 --- a/library/GNUmakefile.os4 +++ b/library/GNUmakefile.os4 @@ -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 ############################################################################## diff --git a/library/amiga_rexxvars.c b/library/amiga_rexxvars.c index 4850894..d7023e9 100644 --- a/library/amiga_rexxvars.c +++ b/library/amiga_rexxvars.c @@ -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(); diff --git a/library/changes b/library/changes index 187b73d..c15710d 100644 --- a/library/changes +++ b/library/changes @@ -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) diff --git a/library/dirent_closedir.c b/library/dirent_closedir.c index 47ae1aa..747471e 100644 --- a/library/dirent_closedir.c +++ b/library/dirent_closedir.c @@ -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(); diff --git a/library/locale_init_exit.c b/library/locale_init_exit.c index 132158e..dffaa9d 100644 --- a/library/locale_init_exit.c +++ b/library/locale_init_exit.c @@ -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; diff --git a/library/macros.h b/library/macros.h index 7c97ca4..2a9bb09 100644 --- a/library/macros.h +++ b/library/macros.h @@ -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) diff --git a/library/math_init_exit.c b/library/math_init_exit.c index fa27ddc..3fab9de 100644 --- a/library/math_init_exit.c +++ b/library/math_init_exit.c @@ -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; diff --git a/library/smakefile b/library/smakefile index 0396680..ef0dcc8 100644 --- a/library/smakefile +++ b/library/smakefile @@ -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 \ diff --git a/library/socket_init_exit.c b/library/socket_init_exit.c index 68a5efa..bc157af 100644 --- a/library/socket_init_exit.c +++ b/library/socket_init_exit.c @@ -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; diff --git a/library/stdio_file_init.c b/library/stdio_file_init.c index 8027257..14b89f8 100644 --- a/library/stdio_file_init.c +++ b/library/stdio_file_init.c @@ -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; diff --git a/library/stdio_init_exit.c b/library/stdio_init_exit.c index 3e3ee07..3a3718e 100644 --- a/library/stdio_init_exit.c +++ b/library/stdio_init_exit.c @@ -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); diff --git a/library/stdlib_arg.c b/library/stdlib_arg.c index 5fed7ed..74e66ce 100644 --- a/library/stdlib_arg.c +++ b/library/stdlib_arg.c @@ -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; diff --git a/library/stdlib_headers.h b/library/stdlib_headers.h index d9dd97f..06aac86 100644 --- a/library/stdlib_headers.h +++ b/library/stdlib_headers.h @@ -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; diff --git a/library/stdlib_init_exit.c b/library/stdlib_init_exit.c index 1d0aa9d..b00350d 100644 --- a/library/stdlib_init_exit.c +++ b/library/stdlib_init_exit.c @@ -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; diff --git a/library/stdlib_stack_usage.c b/library/stdlib_stack_usage.c index b504b91..611ce44 100644 --- a/library/stdlib_stack_usage.c +++ b/library/stdlib_stack_usage.c @@ -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 /****************************************************************************/ diff --git a/library/stdlib_stackcheck.c b/library/stdlib_stackcheck.c index 7b32927..872d908 100644 --- a/library/stdlib_stackcheck.c +++ b/library/stdlib_stackcheck.c @@ -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; diff --git a/library/stdlib_stackextension.c b/library/stdlib_stackextension.c index eea125e..1c633f0 100644 --- a/library/stdlib_stackextension.c +++ b/library/stdlib_stackextension.c @@ -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) { diff --git a/library/time_clock.c b/library/time_clock.c index a1a7dc6..a9b8b97 100644 --- a/library/time_clock.c +++ b/library/time_clock.c @@ -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); diff --git a/library/unistd_init_exit.c b/library/unistd_init_exit.c index 31f4d1c..02f9ab6 100644 --- a/library/unistd_init_exit.c +++ b/library/unistd_init_exit.c @@ -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(); diff --git a/library/unistd_timer.c b/library/unistd_timer.c index ee92fad..0257f19 100644 --- a/library/unistd_timer.c +++ b/library/unistd_timer.c @@ -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(); diff --git a/library/usergroup_init_exit.c b/library/usergroup_init_exit.c index 43a4d34..5043786 100644 --- a/library/usergroup_init_exit.c +++ b/library/usergroup_init_exit.c @@ -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;