diff --git a/library/GNUmakefile.68k b/library/GNUmakefile.68k index d5c694f..b7f335e 100644 --- a/library/GNUmakefile.68k +++ b/library/GNUmakefile.68k @@ -1,5 +1,5 @@ # -# $Id: GNUmakefile.68k,v 1.43 2005-03-12 14:10:09 obarthel Exp $ +# $Id: GNUmakefile.68k,v 1.44 2005-03-18 12:38:20 obarthel Exp $ # # :ts=8 # @@ -326,7 +326,6 @@ C_LIB = \ stdlib_set_process_window.o \ stdlib_shell_escape.o \ stdlib_showerror.o \ - stdlib_socket.o \ stdlib_srand.o \ stdlib_stackargbytes.o \ stdlib_stackcheck.o \ @@ -925,19 +924,19 @@ $(LIBC_OBJS)/stdlib_stacksize.o : stdlib_stacksize.c stdlib_gcc_help.h $(LIBC_OBJS)/stdlib_shell_escape.o : stdlib_shell_escape.c stdlib_gcc_help.h -$(LIBC_OBJS)/stdlib_alloca.o : stdlib_alloca.c stdlib_mem_debug.h +$(LIBC_OBJS)/stdlib_alloca.o : stdlib_alloca.c stdlib_memory.h -$(LIBC_OBJS)/stdlib_calloc.o : stdlib_calloc.c stdlib_mem_debug.h +$(LIBC_OBJS)/stdlib_calloc.o : stdlib_calloc.c stdlib_memory.h -$(LIBC_OBJS)/stdlib_free.o : stdlib_free.c stdlib_mem_debug.h +$(LIBC_OBJS)/stdlib_free.o : stdlib_free.c stdlib_memory.h -$(LIBC_OBJS)/stdlib_init_exit.o : stdlib_init_exit.c stdlib_mem_debug.h +$(LIBC_OBJS)/stdlib_init_exit.o : stdlib_init_exit.c stdlib_memory.h -$(LIBC_OBJS)/stdlib_malloc.o : stdlib_malloc.c stdlib_mem_debug.h +$(LIBC_OBJS)/stdlib_malloc.o : stdlib_malloc.c stdlib_memory.h -$(LIBC_OBJS)/stdlib_realloc.o : stdlib_realloc.c stdlib_mem_debug.h +$(LIBC_OBJS)/stdlib_realloc.o : stdlib_realloc.c stdlib_memory.h -$(LIBC_OBJS)/stdlib_red_black.o : stdlib_red_black.c stdlib_mem_debug.h +$(LIBC_OBJS)/stdlib_red_black.o : stdlib_red_black.c stdlib_memory.h ############################################################################## diff --git a/library/GNUmakefile.os4 b/library/GNUmakefile.os4 index e855baa..581399c 100644 --- a/library/GNUmakefile.os4 +++ b/library/GNUmakefile.os4 @@ -1,5 +1,5 @@ # -# $Id: GNUmakefile.os4,v 1.43 2005-03-11 18:27:26 obarthel Exp $ +# $Id: GNUmakefile.os4,v 1.44 2005-03-18 12:38:21 obarthel Exp $ # # :ts=8 # @@ -324,7 +324,6 @@ C_LIB = \ stdlib_set_process_window.o \ stdlib_shell_escape.o \ stdlib_showerror.o \ - stdlib_socket.o \ stdlib_srand.o \ stdlib_stackargbytes.o \ stdlib_stackcheck.o \ @@ -929,20 +928,20 @@ $(LIBAMIGA_OBJS)/amiga.lib_rev.o : amiga.lib_rev.c amiga.lib_rev.h # Build rules for the debug version of the library which has special # memory allocation debugging code, controlled by the contents of -# the stdlib_mem_debug.h file. -$(LIBC_OBJS)/stdlib_alloca.o : stdlib_alloca.c stdlib_mem_debug.h +# the stdlib_memory.h file. +$(LIBC_OBJS)/stdlib_alloca.o : stdlib_alloca.c stdlib_memory.h -$(LIBC_OBJS)/stdlib_calloc.o : stdlib_calloc.c stdlib_mem_debug.h +$(LIBC_OBJS)/stdlib_calloc.o : stdlib_calloc.c stdlib_memory.h -$(LIBC_OBJS)/stdlib_free.o : stdlib_free.c stdlib_mem_debug.h +$(LIBC_OBJS)/stdlib_free.o : stdlib_free.c stdlib_memory.h -$(LIBC_OBJS)/stdlib_init_exit.o : stdlib_init_exit.c stdlib_mem_debug.h +$(LIBC_OBJS)/stdlib_init_exit.o : stdlib_init_exit.c stdlib_memory.h -$(LIBC_OBJS)/stdlib_malloc.o : stdlib_malloc.c stdlib_mem_debug.h +$(LIBC_OBJS)/stdlib_malloc.o : stdlib_malloc.c stdlib_memory.h -$(LIBC_OBJS)/stdlib_realloc.o : stdlib_realloc.c stdlib_mem_debug.h +$(LIBC_OBJS)/stdlib_realloc.o : stdlib_realloc.c stdlib_memory.h -$(LIBC_OBJS)/stdlib_red_black.o : stdlib_red_black.c stdlib_mem_debug.h +$(LIBC_OBJS)/stdlib_red_black.o : stdlib_red_black.c stdlib_memory.h ############################################################################## diff --git a/library/amiga_createtask.c b/library/amiga_createtask.c index 59522c9..3a9d860 100644 --- a/library/amiga_createtask.c +++ b/library/amiga_createtask.c @@ -1,5 +1,5 @@ /* - * $Id: amiga_createtask.c,v 1.3 2005-01-02 09:07:07 obarthel Exp $ + * $Id: amiga_createtask.c,v 1.4 2005-03-18 12:38:21 obarthel Exp $ * * :ts=4 * @@ -46,6 +46,12 @@ /****************************************************************************/ +#ifndef _STDLIB_PROFILE_H +#include "stdlib_profile.h" +#endif /* _STDLIB_PROFILE_H */ + +/****************************************************************************/ + #include "macros.h" #include "debug.h" diff --git a/library/amiga_dotimer.c b/library/amiga_dotimer.c index b7bb3b1..75ab5d4 100644 --- a/library/amiga_dotimer.c +++ b/library/amiga_dotimer.c @@ -1,5 +1,5 @@ /* - * $Id: amiga_dotimer.c,v 1.3 2005-03-06 09:00:16 obarthel Exp $ + * $Id: amiga_dotimer.c,v 1.4 2005-03-18 12:38:21 obarthel Exp $ * * :ts=4 * @@ -44,6 +44,12 @@ /****************************************************************************/ +#ifndef _STDLIB_PROFILE_H +#include "stdlib_profile.h" +#endif /* _STDLIB_PROFILE_H */ + +/****************************************************************************/ + #include "macros.h" #include "debug.h" diff --git a/library/amiga_rexxvars.c b/library/amiga_rexxvars.c index 3e6010e..9781946 100644 --- a/library/amiga_rexxvars.c +++ b/library/amiga_rexxvars.c @@ -1,5 +1,5 @@ /* - * $Id: amiga_rexxvars.c,v 1.5 2005-03-12 14:10:09 obarthel Exp $ + * $Id: amiga_rexxvars.c,v 1.6 2005-03-18 12:38:21 obarthel Exp $ * * :ts=4 * @@ -34,12 +34,20 @@ /* We don't want to pull in */ #define CLIB_ALIB_PROTOS_H +/****************************************************************************/ + #ifndef _STDLIB_HEADERS_H #include "stdlib_headers.h" #endif /* _STDLIB_HEADERS_H */ /****************************************************************************/ +#ifndef _STDLIB_CONSTRUCTOR_H +#include "stdlib_constructor.h" +#endif /* _STDLIB_CONSTRUCTOR_H */ + +/****************************************************************************/ + #include #include diff --git a/library/changes b/library/changes index 0e064af..91c3b13 100644 --- a/library/changes +++ b/library/changes @@ -96,6 +96,11 @@ - fcntl() did not work for sockets. Fixed. +- Reorganized the local header files, removing redundancies. + +- Dropped unused stub code which is now redundant because of + the constructor/destructor mechanism. + c.lib 1.189 (5.3.2005) diff --git a/library/crtbegin.c b/library/crtbegin.c index 062a7c7..b08a9c8 100644 --- a/library/crtbegin.c +++ b/library/crtbegin.c @@ -1,5 +1,5 @@ /* - * $Id: crtbegin.c,v 1.9 2005-03-11 16:04:50 obarthel Exp $ + * $Id: crtbegin.c,v 1.10 2005-03-18 12:38:22 obarthel Exp $ * * :ts=4 * @@ -10,7 +10,9 @@ /****************************************************************************/ +#ifndef EXEC_TYPES_H #include +#endif /* EXEC_TYPES_H */ /****************************************************************************/ diff --git a/library/ctype_headers.h b/library/ctype_headers.h index 1527f00..cb1bf35 100644 --- a/library/ctype_headers.h +++ b/library/ctype_headers.h @@ -1,5 +1,5 @@ /* - * $Id: ctype_headers.h,v 1.2 2005-01-02 09:07:07 obarthel Exp $ + * $Id: ctype_headers.h,v 1.3 2005-03-18 12:38:22 obarthel Exp $ * * :ts=4 * @@ -48,7 +48,9 @@ /****************************************************************************/ +#ifndef _MACROS_H #include "macros.h" +#endif /* _MACROS_H */ /****************************************************************************/ diff --git a/library/debug_headers.h b/library/debug_headers.h index 788720b..57fcf39 100644 --- a/library/debug_headers.h +++ b/library/debug_headers.h @@ -1,5 +1,5 @@ /* - * $Id: debug_headers.h,v 1.2 2005-01-02 09:07:07 obarthel Exp $ + * $Id: debug_headers.h,v 1.3 2005-03-18 12:38:22 obarthel Exp $ * * :ts=4 * @@ -36,14 +36,15 @@ /****************************************************************************/ +#ifndef EXEC_LIBRARIES_H #include +#endif /* EXEC_LIBRARIES_H */ /****************************************************************************/ #if defined(__SASC) #include -/*#include */ #include LONG RawMayGetChar(VOID); @@ -57,7 +58,11 @@ VOID RawPutChar(UBYTE c); /****************************************************************************/ #if defined(__amigaos4__) + +#ifndef EXEC_EMULATION_H #include +#endif /* EXEC_EMULATION_H */ + #endif /* __amigaos4__ */ /****************************************************************************/ @@ -106,11 +111,13 @@ VOID RawPutChar(UBYTE c); /****************************************************************************/ -#include "debug.h" - -/****************************************************************************/ - +#ifndef _MACROS_H #include "macros.h" +#endif /* _MACROS_H */ + +#ifndef _DEBUG_H +#include "debug.h" +#endif /* _DEBUG_H */ /****************************************************************************/ diff --git a/library/dirent_closedir.c b/library/dirent_closedir.c index a31ad1a..27cd497 100644 --- a/library/dirent_closedir.c +++ b/library/dirent_closedir.c @@ -1,5 +1,5 @@ /* - * $Id: dirent_closedir.c,v 1.11 2005-03-12 14:10:09 obarthel Exp $ + * $Id: dirent_closedir.c,v 1.12 2005-03-18 12:38:22 obarthel Exp $ * * :ts=4 * @@ -31,18 +31,24 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _STDLIB_MEM_DEBUG_H -#include "stdlib_mem_debug.h" -#endif /* _STDLIB_MEM_DEBUG_H */ - -/****************************************************************************/ - #ifndef _DIRENT_HEADERS_H #include "dirent_headers.h" #endif /* _DIRENT_HEADERS_H */ /****************************************************************************/ +#ifndef _STDLIB_MEMORY_H +#include "stdlib_memory.h" +#endif /* _STDLIB_MEMORY_H */ + +/****************************************************************************/ + +#ifndef _STDLIB_CONSTRUCTOR_H +#include "stdlib_constructor.h" +#endif /* _STDLIB_CONSTRUCTOR_H */ + +/****************************************************************************/ + /* The following is not part of the ISO 'C' (1994) standard. */ /****************************************************************************/ diff --git a/library/dirent_headers.h b/library/dirent_headers.h index 508730b..75c76e8 100644 --- a/library/dirent_headers.h +++ b/library/dirent_headers.h @@ -1,5 +1,5 @@ /* - * $Id: dirent_headers.h,v 1.7 2005-02-28 10:07:30 obarthel Exp $ + * $Id: dirent_headers.h,v 1.8 2005-03-18 12:38:22 obarthel Exp $ * * :ts=4 * @@ -48,6 +48,12 @@ /****************************************************************************/ +#ifndef _STDLIB_PROFILE_H +#include "stdlib_profile.h" +#endif /* _STDLIB_PROFILE_H */ + +/****************************************************************************/ + #ifndef _MACROS_H #include "macros.h" #endif /* _MACROS_H */ diff --git a/library/dirent_opendir.c b/library/dirent_opendir.c index 0848752..5fb9f15 100644 --- a/library/dirent_opendir.c +++ b/library/dirent_opendir.c @@ -1,5 +1,5 @@ /* - * $Id: dirent_opendir.c,v 1.8 2005-02-27 21:58:21 obarthel Exp $ + * $Id: dirent_opendir.c,v 1.9 2005-03-18 12:38:22 obarthel Exp $ * * :ts=4 * @@ -37,18 +37,18 @@ /****************************************************************************/ -#ifndef _STDLIB_MEM_DEBUG_H -#include "stdlib_mem_debug.h" -#endif /* _STDLIB_MEM_DEBUG_H */ - -/****************************************************************************/ - #ifndef _DIRENT_HEADERS_H #include "dirent_headers.h" #endif /* _DIRENT_HEADERS_H */ /****************************************************************************/ +#ifndef _STDLIB_MEMORY_H +#include "stdlib_memory.h" +#endif /* _STDLIB_MEMORY_H */ + +/****************************************************************************/ + /* The following is not part of the ISO 'C' (1994) standard. */ /****************************************************************************/ diff --git a/library/fcntl_headers.h b/library/fcntl_headers.h index de10fcd..4ce48c0 100644 --- a/library/fcntl_headers.h +++ b/library/fcntl_headers.h @@ -1,5 +1,5 @@ /* - * $Id: fcntl_headers.h,v 1.3 2005-02-03 16:56:15 obarthel Exp $ + * $Id: fcntl_headers.h,v 1.4 2005-03-18 12:38:22 obarthel Exp $ * * :ts=4 * @@ -48,4 +48,10 @@ /****************************************************************************/ +#ifndef _STDLIB_PROFILE_H +#include "stdlib_profile.h" +#endif /* _STDLIB_PROFILE_H */ + +/****************************************************************************/ + #endif /* _FCNTL_HEADERS_H */ diff --git a/library/fcntl_open.c b/library/fcntl_open.c index 7b2a137..c93f5e7 100644 --- a/library/fcntl_open.c +++ b/library/fcntl_open.c @@ -1,5 +1,5 @@ /* - * $Id: fcntl_open.c,v 1.14 2005-03-04 09:07:09 obarthel Exp $ + * $Id: fcntl_open.c,v 1.15 2005-03-18 12:38:22 obarthel Exp $ * * :ts=4 * @@ -37,18 +37,18 @@ /****************************************************************************/ -#ifndef _STDLIB_MEM_DEBUG_H -#include "stdlib_mem_debug.h" -#endif /* _STDLIB_MEM_DEBUG_H */ - -/****************************************************************************/ - #ifndef _FCNTL_HEADERS_H #include "fcntl_headers.h" #endif /* _FCNTL_HEADERS_H */ /****************************************************************************/ +#ifndef _STDLIB_MEMORY_H +#include "stdlib_memory.h" +#endif /* _STDLIB_MEMORY_H */ + +/****************************************************************************/ + /* The following is not part of the ISO 'C' (1994) standard. */ /****************************************************************************/ diff --git a/library/ftw_ftw.c b/library/ftw_ftw.c index 4445990..ea22b50 100644 --- a/library/ftw_ftw.c +++ b/library/ftw_ftw.c @@ -1,5 +1,5 @@ /* - * $Id: ftw_ftw.c,v 1.2 2005-03-03 10:59:17 obarthel Exp $ + * $Id: ftw_ftw.c,v 1.3 2005-03-18 12:38:22 obarthel Exp $ * * :ts=4 * @@ -45,28 +45,10 @@ /****************************************************************************/ -#include -#include -#include -#include -#include -#include -#include - -/****************************************************************************/ - -#ifndef _DEBUG_H -#include "debug.h" -#endif /* _DEBUG_H */ - #ifndef _FTW_HEADERS_H #include "ftw_headers.h" #endif /* _FTW_HEADERS_H */ -#ifndef _STDLIB_PROTOS_H -#include "stdlib_protos.h" /* get/set errno. */ -#endif /* _STDLIB_PROTOS_H */ - /****************************************************************************/ static int diff --git a/library/ftw_headers.h b/library/ftw_headers.h index 3ab9ab5..4afae92 100644 --- a/library/ftw_headers.h +++ b/library/ftw_headers.h @@ -1,5 +1,5 @@ /* - * $Id: ftw_headers.h,v 1.1 2005-03-02 12:57:53 obarthel Exp $ + * $Id: ftw_headers.h,v 1.2 2005-03-18 12:38:22 obarthel Exp $ * * :ts=4 * @@ -36,11 +36,30 @@ /****************************************************************************/ -#include +#ifndef _STDLIB_HEADERS_H +#include "stdlib_headers.h" +#endif /* _STDLIB_HEADERS_H */ /****************************************************************************/ +#include +#include +#include +#include +#include +#include +#include +#include + +/****************************************************************************/ + +#ifndef _MACROS_H #include "macros.h" +#endif /* _MACROS_H */ + +#ifndef _DEBUG_H +#include "debug.h" +#endif /* _DEBUG_H */ /****************************************************************************/ diff --git a/library/ftw_nftw.c b/library/ftw_nftw.c index 7179799..f625498 100644 --- a/library/ftw_nftw.c +++ b/library/ftw_nftw.c @@ -1,5 +1,5 @@ /* - * $Id: ftw_nftw.c,v 1.2 2005-03-03 10:59:17 obarthel Exp $ + * $Id: ftw_nftw.c,v 1.3 2005-03-18 12:38:22 obarthel Exp $ * * :ts=4 * @@ -44,29 +44,10 @@ /****************************************************************************/ -#include -#include -#include -#include -#include -#include -#include -#include - -/****************************************************************************/ - -#ifndef _DEBUG_H -#include "debug.h" -#endif /* _DEBUG_H */ - #ifndef _FTW_HEADERS_H #include "ftw_headers.h" #endif /* _FTW_HEADERS_H */ -#ifndef _STDLIB_PROTOS_H -#include "stdlib_protos.h" /* get/set errno. */ -#endif /* _STDLIB_PROTOS_H */ - /****************************************************************************/ static int diff --git a/library/locale_headers.h b/library/locale_headers.h index 46d127d..424c80b 100644 --- a/library/locale_headers.h +++ b/library/locale_headers.h @@ -1,5 +1,5 @@ /* - * $Id: locale_headers.h,v 1.6 2005-02-28 10:07:30 obarthel Exp $ + * $Id: locale_headers.h,v 1.7 2005-03-18 12:38:22 obarthel Exp $ * * :ts=4 * @@ -36,13 +36,19 @@ /****************************************************************************/ +#ifndef EXEC_LIBRARIES_H #include +#endif /* EXEC_LIBRARIES_H */ +#ifndef LIBRARIES_LOCALE_H #include +#endif /* LIBRARIES_LOCALE_H */ /****************************************************************************/ +#ifndef PROTO_EXEC_H #include +#endif /* PROTO_EXEC_H */ /****************************************************************************/ @@ -59,8 +65,19 @@ /****************************************************************************/ +#ifndef _STDLIB_PROFILE_H +#include "stdlib_profile.h" +#endif /* _STDLIB_PROFILE_H */ + +/****************************************************************************/ + +#ifndef _MACROS_H #include "macros.h" +#endif /* _MACROS_H */ + +#ifndef _DEBUG_H #include "debug.h" +#endif /* _DEBUG_H */ /****************************************************************************/ diff --git a/library/locale_init_exit.c b/library/locale_init_exit.c index 867d91e..3a2a382 100644 --- a/library/locale_init_exit.c +++ b/library/locale_init_exit.c @@ -1,5 +1,5 @@ /* - * $Id: locale_init_exit.c,v 1.11 2005-03-12 14:10:09 obarthel Exp $ + * $Id: locale_init_exit.c,v 1.12 2005-03-18 12:38:22 obarthel Exp $ * * :ts=4 * @@ -37,7 +37,9 @@ /****************************************************************************/ -#include "stdlib_protos.h" +#ifndef _STDLIB_CONSTRUCTOR_H +#include "stdlib_constructor.h" +#endif /* _STDLIB_CONSTRUCTOR_H */ /****************************************************************************/ diff --git a/library/macros.h b/library/macros.h index 9c8bb61..56e66b7 100644 --- a/library/macros.h +++ b/library/macros.h @@ -1,5 +1,5 @@ /* - * $Id: macros.h,v 1.18 2005-03-12 14:10:09 obarthel Exp $ + * $Id: macros.h,v 1.19 2005-03-18 12:38:22 obarthel Exp $ * * :ts=4 * @@ -86,138 +86,6 @@ /****************************************************************************/ -/* Constructor and destructor functions, as used by the library for data - initialization and cleanup. These particular functions are invoked by - the startup code before and after the main() function is/was called. - How this works is very compiler specific. We support three flavours - below. */ - -/****************************************************************************/ - -#ifdef __SASC - -#define CONSTRUCTOR(name,pri) \ - int __stdargs _STI_##pri##_##name(void); \ - int __stdargs _STI_##pri##_##name(void) - -#define DESTRUCTOR(name,pri) \ - void __stdargs _STD_##pri##_##name(void); \ - void __stdargs _STD_##pri##_##name(void) - -#define CONSTRUCTOR_SUCCEED() \ - return(0) - -#define CONSTRUCTOR_FAIL() \ - return(1) - -#endif /* __SASC */ - -/****************************************************************************/ - -#ifdef __GNUC__ - -#if defined(__amigaos4__) - -#define CONSTRUCTOR(name,pri) \ - STATIC VOID __attribute__((used)) name##_ctor(VOID); \ - STATIC VOID (*__##name##_ctor)(VOID) __attribute__((used,section(".ctors._" #pri))) = name##_ctor; \ - STATIC VOID name##_ctor(VOID) - -#define DESTRUCTOR(name,pri) \ - STATIC VOID __attribute__((used)) name##_dtor(VOID); \ - STATIC VOID (*__##name##_dtor)(VOID) __attribute__((used,section(".dtors._" #pri))) = name##_dtor; \ - STATIC VOID name##_dtor(VOID) - -#else - -#define CONSTRUCTOR(name,pri) \ - asm(".stabs \"___INIT_LIST__\",22,0,0,___ctor_" #name); \ - asm(".stabs \"___INIT_LIST__\",20,0,0," #pri); \ - VOID __ctor_##name##(VOID); \ - VOID __ctor_##name##(VOID) - -#define DESTRUCTOR(name,pri) \ - asm(".stabs \"___EXIT_LIST__\",22,0,0,___dtor_" #name); \ - asm(".stabs \"___EXIT_LIST__\",20,0,0," #pri); \ - VOID __dtor_##name##(VOID); \ - VOID __dtor_##name##(VOID) - -#endif /* __amigaos4__ */ - -#define CONSTRUCTOR_SUCCEED() \ - return - -#define CONSTRUCTOR_FAIL() \ - exit(RETURN_FAIL) - -#endif /* __GNUC__ */ - -/****************************************************************************/ - -/* These macros are for declaring functions to serve as constructors or - destructors. In which order these should be invoked is defined by the - priority, which is a number in the range 0-999. User-supplied - constructor/destructor functions should have priority 0. That way, - the user-supplied constructors will be invoked after the library - constructors and the user-supplied destructors before the library - destructors. */ - -#define STDLIB_CONSTRUCTOR(name) CONSTRUCTOR(name, 1) -#define STDLIB_DESTRUCTOR(name) DESTRUCTOR(name, 1) - -#define STK_CONSTRUCTOR(name) CONSTRUCTOR(name, 2) -#define STK_DESTRUCTOR(name) DESTRUCTOR(name, 2) - -#define STDIO_CONSTRUCTOR(name) CONSTRUCTOR(name, 3) -#define STDIO_DESTRUCTOR(name) DESTRUCTOR(name, 3) - -#define FILE_CONSTRUCTOR(name) CONSTRUCTOR(name, 4) -#define FILE_DESTRUCTOR(name) DESTRUCTOR(name, 4) - -#define MATH_CONSTRUCTOR(name) CONSTRUCTOR(name, 5) -#define MATH_DESTRUCTOR(name) DESTRUCTOR(name, 5) - -#define SOCKET_CONSTRUCTOR(name) CONSTRUCTOR(name, 6) -#define SOCKET_DESTRUCTOR(name) DESTRUCTOR(name, 6) - -#define ARG_CONSTRUCTOR(name) CONSTRUCTOR(name, 7) -#define ARG_DESTRUCTOR(name) DESTRUCTOR(name, 7) - -#define CLIB_CONSTRUCTOR(name) CONSTRUCTOR(name, 8) -#define CLIB_DESTRUCTOR(name) DESTRUCTOR(name, 8) - -#define PROFILE_CONSTRUCTOR(name) CONSTRUCTOR(name, 9) -#define PROFILE_DESTRUCTOR(name) DESTRUCTOR(name, 9) - -/****************************************************************************/ - -/* Magic macros for code profiling, SAS/C style. Normally, you would find - these in , which is SAS/C-specific. */ - -/****************************************************************************/ - -#ifdef __SASC -extern void ASM _PROLOG(REG(a0,char *)); -extern void ASM _EPILOG(REG(a0,char *)); - -#if _PROFILE -#define PROFILE_OFF() _PROLOG(0L) -#define PROFILE_ON() _EPILOG(0L) -#else -#define PROFILE_OFF() ((void)0) -#define PROFILE_ON() ((void)0) -#endif /* _PROFILE */ -#endif /* __SASC */ - -/****************************************************************************/ - -#ifdef __GNUC__ -#define PROFILE_OFF() ((void)0) -#define PROFILE_ON() ((void)0) -#endif /* __GNUC__ */ - -/****************************************************************************/ - /* Special data and function attributes; for OS4 most, if not all of them are in a file called which is pulled in by the header file. */ diff --git a/library/math_headers.h b/library/math_headers.h index 2f016bc..dbcc1a6 100644 --- a/library/math_headers.h +++ b/library/math_headers.h @@ -1,5 +1,5 @@ /* - * $Id: math_headers.h,v 1.6 2005-02-03 16:56:15 obarthel Exp $ + * $Id: math_headers.h,v 1.7 2005-03-18 12:38:22 obarthel Exp $ * * :ts=4 * @@ -43,8 +43,31 @@ /****************************************************************************/ +#ifndef _MACROS_H #include "macros.h" +#endif /* _MACROS_H */ + +#ifndef _DEBUG_H #include "debug.h" +#endif /* _DEBUG_H */ + +/****************************************************************************/ + +#ifndef _MATH_FP_SUPPORT_H +#include "math_fp_support.h" +#endif /* _MATH_FP_SUPPORT_H */ + +/****************************************************************************/ + +#ifndef _STDLIB_HEADERS_H +#include "stdlib_headers.h" +#endif /* _STDLIB_HEADERS_H */ + +/****************************************************************************/ + +#ifndef _STDLIB_PROFILE_H +#include "stdlib_profile.h" +#endif /* _STDLIB_PROFILE_H */ /****************************************************************************/ @@ -52,9 +75,17 @@ /****************************************************************************/ +#ifndef PROTO_MATHIEEESINGBAS_H #include +#endif /* PROTO_MATHIEEESINGBAS_H */ + +#ifndef PROTO_MATHIEEEDOUBBAS_H #include +#endif /* PROTO_MATHIEEEDOUBBAS_H */ + +#ifndef PROTO_MATHIEEEDOUBTRANS_H #include +#endif /* PROTO_MATHIEEEDOUBTRANS_H */ /****************************************************************************/ @@ -186,20 +217,8 @@ extern double __scalbn(double x, int n); /****************************************************************************/ -#ifndef _MATH_FP_SUPPORT_H -#include "math_fp_support.h" -#endif /* _MATH_FP_SUPPORT_H */ - -/****************************************************************************/ - -#ifndef _STDLIB_HEADERS_H -#include "stdlib_headers.h" -#endif /* _STDLIB_HEADERS_H */ - -/****************************************************************************/ - /* math_huge_val.c */ -double __get_huge_val(void); +extern double __get_huge_val(void); /****************************************************************************/ diff --git a/library/math_init_exit.c b/library/math_init_exit.c index 0f27860..b1c1206 100644 --- a/library/math_init_exit.c +++ b/library/math_init_exit.c @@ -1,5 +1,5 @@ /* - * $Id: math_init_exit.c,v 1.13 2005-03-12 14:10:09 obarthel Exp $ + * $Id: math_init_exit.c,v 1.14 2005-03-18 12:38:22 obarthel Exp $ * * :ts=4 * @@ -37,15 +37,21 @@ /****************************************************************************/ -#include "stdlib_protos.h" +#ifndef _STDLIB_CONSTRUCTOR_H +#include "stdlib_constructor.h" +#endif /* _STDLIB_CONSTRUCTOR_H */ /****************************************************************************/ +#ifndef EXEC_EXECBASE_H #include +#endif /* EXEC_EXECBASE_H */ /****************************************************************************/ +#ifndef PROTO_EXEC_H #include +#endif /* PROTO_EXEC_H */ /****************************************************************************/ diff --git a/library/mount_headers.h b/library/mount_headers.h index 007a6b0..8323af2 100644 --- a/library/mount_headers.h +++ b/library/mount_headers.h @@ -1,5 +1,5 @@ /* - * $Id: mount_headers.h,v 1.3 2005-02-03 16:56:15 obarthel Exp $ + * $Id: mount_headers.h,v 1.4 2005-03-18 12:38:22 obarthel Exp $ * * :ts=4 * @@ -48,6 +48,12 @@ /****************************************************************************/ +#ifndef _STDLIB_PROFILE_H +#include "stdlib_profile.h" +#endif /* _STDLIB_PROFILE_H */ + +/****************************************************************************/ + #include /****************************************************************************/ diff --git a/library/sas_profile.c b/library/sas_profile.c index 70f6970..4591cc3 100644 --- a/library/sas_profile.c +++ b/library/sas_profile.c @@ -1,24 +1,39 @@ /* - * $Id: sas_profile.c,v 1.4 2005-03-12 14:10:09 obarthel Exp $ + * $Id: sas_profile.c,v 1.5 2005-03-18 12:38:22 obarthel Exp $ * * :ts=4 * * Adapted from SAS/C runtime library code. */ +#ifndef EXEC_MEMORY_H #include -#include -#include +#endif /* EXEC_MEMORY_H */ +#ifndef EXEC_PORTS_H +#include +#endif /* EXEC_PORTS_H */ + +#ifndef EXEC_DEVICES_H +#include +#endif /* EXEC_DEVICES_H */ + +#ifndef DEVICES_TIMER_H #include +#endif /* DEVICES_TIMER_H */ /****************************************************************************/ #define __NOLIBBASE__ #define __NOGLOBALIFACE__ +#ifndef PROTO_EXEC_H #include +#endif /* PROTO_EXEC_H */ + +#ifndef PROTO_TIMER_H #include +#endif /* PROTO_TIMER_H */ /****************************************************************************/ @@ -26,6 +41,12 @@ extern struct Library * SysBase; /****************************************************************************/ +#ifndef _STDLIB_CONSTRUCTOR_H +#include "stdlib_constructor.h" +#endif /* _STDLIB_CONSTRUCTOR_H */ + +/****************************************************************************/ + #include "macros.h" #include "debug.h" @@ -310,7 +331,6 @@ PROFILE_CONSTRUCTOR(profile_init) __profile_init(); - SHOWVALUE(success); LEAVE(); CONSTRUCTOR_SUCCEED(); diff --git a/library/signal_headers.h b/library/signal_headers.h index 18bdb32..cf285a2 100644 --- a/library/signal_headers.h +++ b/library/signal_headers.h @@ -1,5 +1,5 @@ /* - * $Id: signal_headers.h,v 1.6 2005-01-09 10:10:41 obarthel Exp $ + * $Id: signal_headers.h,v 1.7 2005-03-18 12:38:22 obarthel Exp $ * * :ts=4 * @@ -36,14 +36,23 @@ /****************************************************************************/ +#ifndef EXEC_LIBRARIES_H #include +#endif /* EXEC_LIBRARIES_H */ +#ifndef DOS_DOSEXTENS_H #include +#endif /* DOS_DOSEXTENS_H */ /****************************************************************************/ +#ifndef PROTO_EXEC_H #include +#endif /* PROTO_EXEC_H */ + +#ifndef PROTO_DOS_H #include +#endif /* PROTO_DOS_H */ /****************************************************************************/ @@ -55,8 +64,13 @@ /****************************************************************************/ +#ifndef _MACROS_H #include "macros.h" +#endif /* _MACROS_H */ + +#ifndef _DEBUG_H #include "debug.h" +#endif /* _DEBUG_H */ /****************************************************************************/ diff --git a/library/smakefile b/library/smakefile index ef0dcc8..922fb4e 100644 --- a/library/smakefile +++ b/library/smakefile @@ -1,5 +1,5 @@ # -# $Id: smakefile,v 1.33 2005-03-11 18:27:26 obarthel Exp $ +# $Id: smakefile,v 1.34 2005-03-18 12:38:22 obarthel Exp $ # # :ts=8 # @@ -645,61 +645,61 @@ stdlib_setjmp.o : stdlib_setjmp.asm stdlib_swapstack.o : stdlib_swapstack.asm -stdio_fdhookentry.o : stdio_fdhookentry.c stdlib_mem_debug.h +stdio_fdhookentry.o : stdio_fdhookentry.c stdlib_memory.h -stdio_openiob.o : stdio_openiob.c stdlib_mem_debug.h +stdio_openiob.o : stdio_openiob.c stdlib_memory.h -stdlib_alloca.o : stdlib_alloca.c stdlib_mem_debug.h +stdlib_alloca.o : stdlib_alloca.c stdlib_memory.h -stdlib_calloc.o : stdlib_calloc.c stdlib_mem_debug.h +stdlib_calloc.o : stdlib_calloc.c stdlib_memory.h -stdlib_free.o : stdlib_free.c stdlib_mem_debug.h +stdlib_free.o : stdlib_free.c stdlib_memory.h -stdlib_init_exit.o : stdlib_init_exit.c stdlib_mem_debug.h +stdlib_init_exit.o : stdlib_init_exit.c stdlib_memory.h -stdlib_malloc.o : stdlib_malloc.c stdlib_mem_debug.h +stdlib_malloc.o : stdlib_malloc.c stdlib_memory.h -stdlib_realloc.o : stdlib_realloc.c stdlib_mem_debug.h +stdlib_realloc.o : stdlib_realloc.c stdlib_memory.h -stdlib_red_black.o : stdlib_red_black.c stdlib_mem_debug.h +stdlib_red_black.o : stdlib_red_black.c stdlib_memory.h -dirent_closedir.o : dirent_closedir.c stdlib_mem_debug.h +dirent_closedir.o : dirent_closedir.c stdlib_memory.h -dirent_opendir.o : dirent_opendir.c stdlib_mem_debug.h +dirent_opendir.o : dirent_opendir.c stdlib_memory.h -fcntl_open.o : fcntl_open.c stdlib_mem_debug.h +fcntl_open.o : fcntl_open.c stdlib_memory.h -socket_select.o : socket_select.c stdlib_mem_debug.h +socket_select.o : socket_select.c stdlib_memory.h -stdio_fclose.o : stdio_fclose.c stdlib_mem_debug.h +stdio_fclose.o : stdio_fclose.c stdlib_memory.h -stdio_growfdtable.o : stdio_growfdtable.c stdlib_mem_debug.h +stdio_growfdtable.o : stdio_growfdtable.c stdlib_memory.h -stdio_growiobtable.o : stdio_growiobtable.c stdlib_mem_debug.h +stdio_growiobtable.o : stdio_growiobtable.c stdlib_memory.h -stdio_init_exit.o : stdio_init_exit.c stdlib_mem_debug.h +stdio_init_exit.o : stdio_init_exit.c stdlib_memory.h -stdio_popen.o : stdio_popen.c stdlib_mem_debug.h +stdio_popen.o : stdio_popen.c stdlib_memory.h -stdio_setvbuf.o : stdio_setvbuf.c stdlib_mem_debug.h +stdio_setvbuf.o : stdio_setvbuf.c stdlib_memory.h -stdio_tmpfile.o : stdio_tmpfile.c stdlib_mem_debug.h +stdio_tmpfile.o : stdio_tmpfile.c stdlib_memory.h -stdlib_atexit.o : stdlib_atexit.c stdlib_mem_debug.h +stdlib_atexit.o : stdlib_atexit.c stdlib_memory.h -stdlib_setenv.o : stdlib_setenv.c stdlib_mem_debug.h +stdlib_setenv.o : stdlib_setenv.c stdlib_memory.h -stdlib_arg.o : stdlib_arg.c stdlib_mem_debug.h +stdlib_arg.o : stdlib_arg.c stdlib_memory.h -stdlib_system.o : stdlib_system.c stdlib_mem_debug.h +stdlib_system.o : stdlib_system.c stdlib_memory.h -stdlib_unsetenv.o : stdlib_unsetenv.c stdlib_mem_debug.h +stdlib_unsetenv.o : stdlib_unsetenv.c stdlib_memory.h -unistd_getcwd.o : unistd_getcwd.c stdlib_mem_debug.h +unistd_getcwd.o : unistd_getcwd.c stdlib_memory.h -unistd_unlink.o : unistd_unlink.c stdlib_mem_debug.h +unistd_unlink.o : unistd_unlink.c stdlib_memory.h -unistd_wildcard_expand.o : unistd_wildcard_expand.c stdlib_mem_debug.h +unistd_wildcard_expand.o : unistd_wildcard_expand.c stdlib_memory.h stdlib_main.o : stdlib_main.c @echo "Compiling $<" diff --git a/library/socket_headers.h b/library/socket_headers.h index bea6be8..d5a7028 100644 --- a/library/socket_headers.h +++ b/library/socket_headers.h @@ -1,5 +1,5 @@ /* - * $Id: socket_headers.h,v 1.7 2005-02-20 13:19:40 obarthel Exp $ + * $Id: socket_headers.h,v 1.8 2005-03-18 12:38:23 obarthel Exp $ * * :ts=4 * @@ -54,6 +54,12 @@ /****************************************************************************/ +#ifndef _STDLIB_PROFILE_H +#include "stdlib_profile.h" +#endif /* _STDLIB_PROFILE_H */ + +/****************************************************************************/ + extern struct Library * NOCOMMON __SocketBase; /****************************************************************************/ diff --git a/library/socket_init_exit.c b/library/socket_init_exit.c index 0e18bcc..0fb9bf5 100644 --- a/library/socket_init_exit.c +++ b/library/socket_init_exit.c @@ -1,5 +1,5 @@ /* - * $Id: socket_init_exit.c,v 1.18 2005-03-12 14:10:09 obarthel Exp $ + * $Id: socket_init_exit.c,v 1.19 2005-03-18 12:38:23 obarthel Exp $ * * :ts=4 * @@ -45,7 +45,9 @@ /****************************************************************************/ -#include "stdlib_protos.h" +#ifndef _STDLIB_CONSTRUCTOR_H +#include "stdlib_constructor.h" +#endif /* _STDLIB_CONSTRUCTOR_H */ /****************************************************************************/ diff --git a/library/socket_select.c b/library/socket_select.c index cc53e7f..38fb37a 100644 --- a/library/socket_select.c +++ b/library/socket_select.c @@ -1,5 +1,5 @@ /* - * $Id: socket_select.c,v 1.7 2005-02-28 13:22:53 obarthel Exp $ + * $Id: socket_select.c,v 1.8 2005-03-18 12:38:23 obarthel Exp $ * * :ts=4 * @@ -35,18 +35,18 @@ /****************************************************************************/ -#ifndef _STDLIB_MEM_DEBUG_H -#include "stdlib_mem_debug.h" -#endif /* _STDLIB_MEM_DEBUG_H */ - -/****************************************************************************/ - #ifndef _SOCKET_HEADERS_H #include "socket_headers.h" #endif /* _SOCKET_HEADERS_H */ /****************************************************************************/ +#ifndef _STDLIB_MEMORY_H +#include "stdlib_memory.h" +#endif /* _STDLIB_MEMORY_H */ + +/****************************************************************************/ + STATIC VOID copy_fd_set(fd_set * to,fd_set * from,int num_fds) { diff --git a/library/stat_headers.h b/library/stat_headers.h index 657c105..4b2cf44 100644 --- a/library/stat_headers.h +++ b/library/stat_headers.h @@ -1,5 +1,5 @@ /* - * $Id: stat_headers.h,v 1.4 2005-02-03 16:56:15 obarthel Exp $ + * $Id: stat_headers.h,v 1.5 2005-03-18 12:38:23 obarthel Exp $ * * :ts=4 * @@ -48,6 +48,12 @@ /****************************************************************************/ +#ifndef _STDLIB_PROFILE_H +#include "stdlib_profile.h" +#endif /* _STDLIB_PROFILE_H */ + +/****************************************************************************/ + extern mode_t NOCOMMON __current_umask; /****************************************************************************/ diff --git a/library/stdio_fclose.c b/library/stdio_fclose.c index a17d668..04e4c88 100644 --- a/library/stdio_fclose.c +++ b/library/stdio_fclose.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_fclose.c,v 1.9 2005-03-09 12:06:10 obarthel Exp $ + * $Id: stdio_fclose.c,v 1.10 2005-03-18 12:38:23 obarthel Exp $ * * :ts=4 * @@ -37,18 +37,18 @@ /****************************************************************************/ -#ifndef _STDLIB_MEM_DEBUG_H -#include "stdlib_mem_debug.h" -#endif /* _STDLIB_MEM_DEBUG_H */ - -/****************************************************************************/ - #ifndef _STDIO_HEADERS_H #include "stdio_headers.h" #endif /* _STDIO_HEADERS_H */ /****************************************************************************/ +#ifndef _STDLIB_MEMORY_H +#include "stdlib_memory.h" +#endif /* _STDLIB_MEMORY_H */ + +/****************************************************************************/ + int fclose(FILE *stream) { diff --git a/library/stdio_fdhookentry.c b/library/stdio_fdhookentry.c index 8de90ef..fa31f57 100644 --- a/library/stdio_fdhookentry.c +++ b/library/stdio_fdhookentry.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_fdhookentry.c,v 1.22 2005-03-14 10:03:06 obarthel Exp $ + * $Id: stdio_fdhookentry.c,v 1.23 2005-03-18 12:38:23 obarthel Exp $ * * :ts=4 * @@ -31,12 +31,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _STDLIB_MEM_DEBUG_H -#include "stdlib_mem_debug.h" -#endif /* _STDLIB_MEM_DEBUG_H */ - -/****************************************************************************/ - #ifndef _STDIO_HEADERS_H #include "stdio_headers.h" #endif /* _STDIO_HEADERS_H */ @@ -47,6 +41,12 @@ /****************************************************************************/ +#ifndef _STDLIB_MEMORY_H +#include "stdlib_memory.h" +#endif /* _STDLIB_MEMORY_H */ + +/****************************************************************************/ + #include #include diff --git a/library/stdio_file_init.c b/library/stdio_file_init.c index d07d28f..ffffc00 100644 --- a/library/stdio_file_init.c +++ b/library/stdio_file_init.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_file_init.c,v 1.5 2005-03-12 14:10:09 obarthel Exp $ + * $Id: stdio_file_init.c,v 1.6 2005-03-18 12:38:23 obarthel Exp $ * * :ts=4 * @@ -31,12 +31,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _STDLIB_MEM_DEBUG_H -#include "stdlib_mem_debug.h" -#endif /* _STDLIB_MEM_DEBUG_H */ - -/****************************************************************************/ - #ifndef _STDIO_HEADERS_H #include "stdio_headers.h" #endif /* _STDIO_HEADERS_H */ @@ -47,6 +41,18 @@ /****************************************************************************/ +#ifndef _STDLIB_MEMORY_H +#include "stdlib_memory.h" +#endif /* _STDLIB_MEMORY_H */ + +/****************************************************************************/ + +#ifndef _STDLIB_CONSTRUCTOR_H +#include "stdlib_constructor.h" +#endif /* _STDLIB_CONSTRUCTOR_H */ + +/****************************************************************************/ + static struct MsgPort * old_console_task; static BOOL restore_console_task; diff --git a/library/stdio_growfdtable.c b/library/stdio_growfdtable.c index 151383f..b65d1e2 100644 --- a/library/stdio_growfdtable.c +++ b/library/stdio_growfdtable.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_growfdtable.c,v 1.6 2005-03-11 09:37:29 obarthel Exp $ + * $Id: stdio_growfdtable.c,v 1.7 2005-03-18 12:38:23 obarthel Exp $ * * :ts=4 * @@ -31,18 +31,18 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _STDLIB_MEM_DEBUG_H -#include "stdlib_mem_debug.h" -#endif /* _STDLIB_MEM_DEBUG_H */ - -/****************************************************************************/ - #ifndef _STDIO_HEADERS_H #include "stdio_headers.h" #endif /* _STDIO_HEADERS_H */ /****************************************************************************/ +#ifndef _STDLIB_MEMORY_H +#include "stdlib_memory.h" +#endif /* _STDLIB_MEMORY_H */ + +/****************************************************************************/ + int __grow_fd_table(int max_fd) { diff --git a/library/stdio_growiobtable.c b/library/stdio_growiobtable.c index 87e3447..121fa55 100644 --- a/library/stdio_growiobtable.c +++ b/library/stdio_growiobtable.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_growiobtable.c,v 1.6 2005-03-11 09:37:29 obarthel Exp $ + * $Id: stdio_growiobtable.c,v 1.7 2005-03-18 12:38:23 obarthel Exp $ * * :ts=4 * @@ -31,18 +31,18 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _STDLIB_MEM_DEBUG_H -#include "stdlib_mem_debug.h" -#endif /* _STDLIB_MEM_DEBUG_H */ - -/****************************************************************************/ - #ifndef _STDIO_HEADERS_H #include "stdio_headers.h" #endif /* _STDIO_HEADERS_H */ /****************************************************************************/ +#ifndef _STDLIB_MEMORY_H +#include "stdlib_memory.h" +#endif /* _STDLIB_MEMORY_H */ + +/****************************************************************************/ + int __grow_iob_table(int max_iob) { diff --git a/library/stdio_headers.h b/library/stdio_headers.h index 1cbdfb8..fb15ce9 100644 --- a/library/stdio_headers.h +++ b/library/stdio_headers.h @@ -1,5 +1,5 @@ /* - * $Id: stdio_headers.h,v 1.20 2005-03-12 09:43:48 obarthel Exp $ + * $Id: stdio_headers.h,v 1.21 2005-03-18 12:38:23 obarthel Exp $ * * :ts=4 * @@ -36,28 +36,57 @@ /****************************************************************************/ +#ifndef EXEC_LIBRARIES_H #include +#endif /* EXEC_LIBRARIES_H */ + +#ifndef EXEC_MEMORY_H #include +#endif /* EXEC_MEMORY_H */ +#ifndef DEVICES_TIMER_H #include +#endif /* DEVICES_TIMER_H */ +#ifndef DOS_DOSEXTENS_H #include +#endif /* DOS_DOSEXTENS_H */ + +#ifndef DOS_DOSTAGS_H #include +#endif /* DOS_DOSTAGS_H */ + +#ifndef DOS_DOSASL_H #include +#endif /* DOS_DOSASL_H */ + +#ifndef DOS_RECORD_H #include +#endif /* DOS_RECORD_H */ +#ifndef LIBRARIES_LOCALE_H #include +#endif /* LIBRARIES_LOCALE_H */ +#ifndef UTILITY_HOOKS_H #include +#endif /* UTILITY_HOOKS_H */ /****************************************************************************/ +#ifndef CLIB_ALIB_PROTOS_H #include +#endif /* CLIB_ALIB_PROTOS_H */ /****************************************************************************/ +#ifndef PROTO_EXEC_H #include +#endif /* PROTO_EXEC_H */ + +#ifndef PROTO_DOS_H #include +#endif /* PROTO_DOS_H */ /****************************************************************************/ @@ -81,6 +110,12 @@ /****************************************************************************/ +#if defined(FLOATING_POINT_SUPPORT) +#include +#endif /* FLOATING_POINT_SUPPORT */ + +/****************************************************************************/ + #ifndef _STDLIB_HEADERS_H #include "stdlib_headers.h" #endif /* _STDLIB_HEADERS_H */ @@ -93,21 +128,25 @@ /****************************************************************************/ -#if defined(FLOATING_POINT_SUPPORT) -#include -#endif /* FLOATING_POINT_SUPPORT */ +#ifndef _STDLIB_PROFILE_H +#include "stdlib_profile.h" +#endif /* _STDLIB_PROFILE_H */ /****************************************************************************/ +#ifndef _MACROS_H #include "macros.h" +#endif /* _MACROS_H */ + +#ifndef _DEBUG_H #include "debug.h" +#endif /* _DEBUG_H */ /****************************************************************************/ /* Forward declarations for below... */ struct fd; struct iob; -struct file_action_message; /****************************************************************************/ diff --git a/library/stdio_init_exit.c b/library/stdio_init_exit.c index 76c1567..d7f6fb2 100644 --- a/library/stdio_init_exit.c +++ b/library/stdio_init_exit.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_init_exit.c,v 1.29 2005-03-12 14:10:09 obarthel Exp $ + * $Id: stdio_init_exit.c,v 1.30 2005-03-18 12:38:23 obarthel Exp $ * * :ts=4 * @@ -31,12 +31,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _STDLIB_MEM_DEBUG_H -#include "stdlib_mem_debug.h" -#endif /* _STDLIB_MEM_DEBUG_H */ - -/****************************************************************************/ - #ifndef _STDIO_HEADERS_H #include "stdio_headers.h" #endif /* _STDIO_HEADERS_H */ @@ -47,6 +41,18 @@ /****************************************************************************/ +#ifndef _STDLIB_MEMORY_H +#include "stdlib_memory.h" +#endif /* _STDLIB_MEMORY_H */ + +/****************************************************************************/ + +#ifndef _STDLIB_CONSTRUCTOR_H +#include "stdlib_constructor.h" +#endif /* _STDLIB_CONSTRUCTOR_H */ + +/****************************************************************************/ + /* The file handle table. */ struct iob ** __iob; int __num_iob; diff --git a/library/stdio_openiob.c b/library/stdio_openiob.c index 90f8488..f0622a2 100644 --- a/library/stdio_openiob.c +++ b/library/stdio_openiob.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_openiob.c,v 1.11 2005-03-03 14:20:55 obarthel Exp $ + * $Id: stdio_openiob.c,v 1.12 2005-03-18 12:38:23 obarthel Exp $ * * :ts=4 * @@ -31,18 +31,18 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _STDLIB_MEM_DEBUG_H -#include "stdlib_mem_debug.h" -#endif /* _STDLIB_MEM_DEBUG_H */ - -/****************************************************************************/ - #ifndef _STDIO_HEADERS_H #include "stdio_headers.h" #endif /* _STDIO_HEADERS_H */ /****************************************************************************/ +#ifndef _STDLIB_MEMORY_H +#include "stdlib_memory.h" +#endif /* _STDLIB_MEMORY_H */ + +/****************************************************************************/ + int __open_iob(const char *filename, const char *mode, int file_descriptor, int slot_number) { diff --git a/library/stdio_popen.c b/library/stdio_popen.c index f855dab..34535fa 100644 --- a/library/stdio_popen.c +++ b/library/stdio_popen.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_popen.c,v 1.6 2005-02-28 10:07:31 obarthel Exp $ + * $Id: stdio_popen.c,v 1.7 2005-03-18 12:38:23 obarthel Exp $ * * :ts=4 * @@ -37,18 +37,18 @@ /****************************************************************************/ -#ifndef _STDLIB_MEM_DEBUG_H -#include "stdlib_mem_debug.h" -#endif /* _STDLIB_MEM_DEBUG_H */ - -/****************************************************************************/ - #ifndef _STDIO_HEADERS_H #include "stdio_headers.h" #endif /* _STDIO_HEADERS_H */ /****************************************************************************/ +#ifndef _STDLIB_MEMORY_H +#include "stdlib_memory.h" +#endif /* _STDLIB_MEMORY_H */ + +/****************************************************************************/ + /* The following is not part of the ISO 'C' (1994) standard. */ /****************************************************************************/ diff --git a/library/stdio_record_locking.c b/library/stdio_record_locking.c index d204837..bb59416 100644 --- a/library/stdio_record_locking.c +++ b/library/stdio_record_locking.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_record_locking.c,v 1.6 2005-03-06 09:00:16 obarthel Exp $ + * $Id: stdio_record_locking.c,v 1.7 2005-03-18 12:38:23 obarthel Exp $ * * :ts=4 * @@ -31,12 +31,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _STDLIB_MEM_DEBUG_H -#include "stdlib_mem_debug.h" -#endif /* _STDLIB_MEM_DEBUG_H */ - -/****************************************************************************/ - #ifndef _STDIO_HEADERS_H #include "stdio_headers.h" #endif /* _STDIO_HEADERS_H */ @@ -47,6 +41,12 @@ /****************************************************************************/ +#ifndef _STDLIB_MEMORY_H +#include "stdlib_memory.h" +#endif /* _STDLIB_MEMORY_H */ + +/****************************************************************************/ + #include #include diff --git a/library/stdio_setvbuf.c b/library/stdio_setvbuf.c index f7a2ed2..d4900bd 100644 --- a/library/stdio_setvbuf.c +++ b/library/stdio_setvbuf.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_setvbuf.c,v 1.6 2005-02-27 18:09:11 obarthel Exp $ + * $Id: stdio_setvbuf.c,v 1.7 2005-03-18 12:38:23 obarthel Exp $ * * :ts=4 * @@ -37,18 +37,18 @@ /****************************************************************************/ -#ifndef _STDLIB_MEM_DEBUG_H -#include "stdlib_mem_debug.h" -#endif /* _STDLIB_MEM_DEBUG_H */ - -/****************************************************************************/ - #ifndef _STDIO_HEADERS_H #include "stdio_headers.h" #endif /* _STDIO_HEADERS_H */ /****************************************************************************/ +#ifndef _STDLIB_MEMORY_H +#include "stdlib_memory.h" +#endif /* _STDLIB_MEMORY_H */ + +/****************************************************************************/ + int setvbuf(FILE *stream,char *buf,int bufmode,size_t size) { diff --git a/library/stdio_tmpfile.c b/library/stdio_tmpfile.c index 033e84e..6e2f5a5 100644 --- a/library/stdio_tmpfile.c +++ b/library/stdio_tmpfile.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_tmpfile.c,v 1.3 2005-02-03 16:56:16 obarthel Exp $ + * $Id: stdio_tmpfile.c,v 1.4 2005-03-18 12:38:23 obarthel Exp $ * * :ts=4 * @@ -31,18 +31,18 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _STDLIB_MEM_DEBUG_H -#include "stdlib_mem_debug.h" -#endif /* _STDLIB_MEM_DEBUG_H */ - -/****************************************************************************/ - #ifndef _STDIO_HEADERS_H #include "stdio_headers.h" #endif /* _STDIO_HEADERS_H */ /****************************************************************************/ +#ifndef _STDLIB_MEMORY_H +#include "stdlib_memory.h" +#endif /* _STDLIB_MEMORY_H */ + +/****************************************************************************/ + FILE * tmpfile(void) { diff --git a/library/stdio_vasprintf.c b/library/stdio_vasprintf.c index 35e7d4e..5ec2e90 100644 --- a/library/stdio_vasprintf.c +++ b/library/stdio_vasprintf.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_vasprintf.c,v 1.9 2005-02-28 10:07:31 obarthel Exp $ + * $Id: stdio_vasprintf.c,v 1.10 2005-03-18 12:38:23 obarthel Exp $ * * :ts=4 * @@ -43,6 +43,12 @@ /****************************************************************************/ +#ifndef _STDLIB_MEMORY_H +#include "stdlib_memory.h" +#endif /* _STDLIB_MEMORY_H */ + +/****************************************************************************/ + #ifndef _STDIO_HEADERS_H #include "stdio_headers.h" #endif /* _STDIO_HEADERS_H */ diff --git a/library/stdlib_alloca.c b/library/stdlib_alloca.c index 7829d97..ba8698d 100644 --- a/library/stdlib_alloca.c +++ b/library/stdlib_alloca.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_alloca.c,v 1.5 2005-01-02 09:07:08 obarthel Exp $ + * $Id: stdlib_alloca.c,v 1.6 2005-03-18 12:38:23 obarthel Exp $ * * :ts=4 * @@ -31,18 +31,24 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _STDLIB_MEM_DEBUG_H -#include "stdlib_mem_debug.h" -#endif /* _STDLIB_MEM_DEBUG_H */ - -/****************************************************************************/ - #ifndef _STDLIB_HEADERS_H #include "stdlib_headers.h" #endif /* _STDLIB_HEADERS_H */ /****************************************************************************/ +#ifndef _STDLIB_MEMORY_H +#include "stdlib_memory.h" +#endif /* _STDLIB_MEMORY_H */ + +/****************************************************************************/ + +#ifndef _STDLIB_CONSTRUCTOR_H +#include "stdlib_constructor.h" +#endif /* _STDLIB_CONSTRUCTOR_H */ + +/****************************************************************************/ + #undef alloca extern void * alloca(size_t size); @@ -62,7 +68,7 @@ static struct MinList alloca_memory_list; /****************************************************************************/ -CLIB_DESTRUCTOR(__alloca_exit) +CLIB_DESTRUCTOR(alloca_exit) { ENTER(); diff --git a/library/stdlib_arg.c b/library/stdlib_arg.c index a4ba385..e77ba70 100644 --- a/library/stdlib_arg.c +++ b/library/stdlib_arg.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_arg.c,v 1.5 2005-03-12 14:10:09 obarthel Exp $ + * $Id: stdlib_arg.c,v 1.6 2005-03-18 12:38:23 obarthel Exp $ * * :ts=4 * @@ -35,12 +35,6 @@ /****************************************************************************/ -#ifndef _STDLIB_MEM_DEBUG_H -#include "stdlib_mem_debug.h" -#endif /* _STDLIB_MEM_DEBUG_H */ - -/****************************************************************************/ - #ifndef _STDLIB_HEADERS_H #include "stdlib_headers.h" #endif /* _STDLIB_HEADERS_H */ @@ -51,6 +45,18 @@ /****************************************************************************/ +#ifndef _STDLIB_MEMORY_H +#include "stdlib_memory.h" +#endif /* _STDLIB_MEMORY_H */ + +/****************************************************************************/ + +#ifndef _STDLIB_CONSTRUCTOR_H +#include "stdlib_constructor.h" +#endif /* _STDLIB_CONSTRUCTOR_H */ + +/****************************************************************************/ + #include #include #include @@ -59,10 +65,6 @@ /****************************************************************************/ -#include "macros.h" - -/****************************************************************************/ - char ** __argv; int __argc; diff --git a/library/stdlib_assertion_failure.c b/library/stdlib_assertion_failure.c index b9a8474..7794429 100644 --- a/library/stdlib_assertion_failure.c +++ b/library/stdlib_assertion_failure.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_assertion_failure.c,v 1.7 2005-02-21 16:09:44 obarthel Exp $ + * $Id: stdlib_assertion_failure.c,v 1.8 2005-03-18 12:38:23 obarthel Exp $ * * :ts=4 * @@ -41,12 +41,20 @@ /****************************************************************************/ +#ifndef PROTO_EXEC_H #include +#endif /* PROTO_EXEC_H */ #define __NOLIBBASE__ #define __NOGLOBALIFACE__ + +#ifndef PROTO_INTUITION_H #include +#endif /* PROTO_INTUITION_H */ + +#ifndef PROTO_DOS_H #include +#endif /* PROTO_DOS_H */ /****************************************************************************/ diff --git a/library/stdlib_atexit.c b/library/stdlib_atexit.c index 7a154e3..f1f08ef 100644 --- a/library/stdlib_atexit.c +++ b/library/stdlib_atexit.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_atexit.c,v 1.3 2005-02-03 16:56:16 obarthel Exp $ + * $Id: stdlib_atexit.c,v 1.4 2005-03-18 12:38:23 obarthel Exp $ * * :ts=4 * @@ -37,18 +37,18 @@ /****************************************************************************/ -#ifndef _STDLIB_MEM_DEBUG_H -#include "stdlib_mem_debug.h" -#endif /* _STDLIB_MEM_DEBUG_H */ - -/****************************************************************************/ - #ifndef _STDLIB_HEADERS_H #include "stdlib_headers.h" #endif /* _STDLIB_HEADERS_H */ /****************************************************************************/ +#ifndef _STDLIB_MEMORY_H +#include "stdlib_memory.h" +#endif /* _STDLIB_MEMORY_H */ + +/****************************************************************************/ + struct ExitTrapNode { struct MinNode etn_MinNode; diff --git a/library/stdlib_calloc.c b/library/stdlib_calloc.c index 9f47d0c..706ba3a 100644 --- a/library/stdlib_calloc.c +++ b/library/stdlib_calloc.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_calloc.c,v 1.4 2005-01-02 09:07:08 obarthel Exp $ + * $Id: stdlib_calloc.c,v 1.5 2005-03-18 12:38:23 obarthel Exp $ * * :ts=4 * @@ -31,18 +31,18 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _STDLIB_MEM_DEBUG_H -#include "stdlib_mem_debug.h" -#endif /* _STDLIB_MEM_DEBUG_H */ - -/****************************************************************************/ - #ifndef _STDLIB_HEADERS_H #include "stdlib_headers.h" #endif /* _STDLIB_HEADERS_H */ /****************************************************************************/ +#ifndef _STDLIB_MEMORY_H +#include "stdlib_memory.h" +#endif /* _STDLIB_MEMORY_H */ + +/****************************************************************************/ + #undef calloc /****************************************************************************/ diff --git a/library/stdlib_checkdetach.c b/library/stdlib_checkdetach.c index a726cc3..1f03840 100644 --- a/library/stdlib_checkdetach.c +++ b/library/stdlib_checkdetach.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_checkdetach.c,v 1.2 2005-01-02 09:07:08 obarthel Exp $ + * $Id: stdlib_checkdetach.c,v 1.3 2005-03-18 12:38:23 obarthel Exp $ * * :ts=4 * @@ -31,7 +31,9 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#ifndef EXEC_TYPES_H #include +#endif /* EXEC_TYPES_H */ /****************************************************************************/ diff --git a/library/stdlib_constructor.h b/library/stdlib_constructor.h new file mode 100644 index 0000000..1aaf8ab --- /dev/null +++ b/library/stdlib_constructor.h @@ -0,0 +1,144 @@ +/* + * $Id: stdlib_constructor.h,v 1.1 2005-03-18 12:38:23 obarthel Exp $ + * + * :ts=4 + * + * Portable ISO 'C' (1994) runtime library for the Amiga computer + * Copyright (c) 2002-2005 by Olaf Barthel + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Neither the name of Olaf Barthel nor the names of contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _STDLIB_CONSTRUCTOR_H +#define _STDLIB_CONSTRUCTOR_H + +/****************************************************************************/ + +/* Constructor and destructor functions, as used by the library for data + initialization and cleanup. These particular functions are invoked by + the startup code before and after the main() function is/was called. + How this works is very compiler specific. We support three flavours + below. */ + +/****************************************************************************/ + +#ifdef __SASC + +#define CONSTRUCTOR(name,pri) \ + int __stdargs _STI_##pri##_##name(void); \ + int __stdargs _STI_##pri##_##name(void) + +#define DESTRUCTOR(name,pri) \ + void __stdargs _STD_##pri##_##name(void); \ + void __stdargs _STD_##pri##_##name(void) + +#define CONSTRUCTOR_SUCCEED() \ + return(0) + +#define CONSTRUCTOR_FAIL() \ + return(1) + +#endif /* __SASC */ + +/****************************************************************************/ + +#ifdef __GNUC__ + +#if defined(__amigaos4__) + +#define CONSTRUCTOR(name,pri) \ + STATIC VOID __attribute__((used)) name##_ctor(VOID); \ + STATIC VOID (*__##name##_ctor)(VOID) __attribute__((used,section(".ctors._" #pri))) = name##_ctor; \ + STATIC VOID name##_ctor(VOID) + +#define DESTRUCTOR(name,pri) \ + STATIC VOID __attribute__((used)) name##_dtor(VOID); \ + STATIC VOID (*__##name##_dtor)(VOID) __attribute__((used,section(".dtors._" #pri))) = name##_dtor; \ + STATIC VOID name##_dtor(VOID) + +#else + +#define CONSTRUCTOR(name,pri) \ + asm(".stabs \"___INIT_LIST__\",22,0,0,___ctor_" #name); \ + asm(".stabs \"___INIT_LIST__\",20,0,0," #pri); \ + VOID __ctor_##name##(VOID); \ + VOID __ctor_##name##(VOID) + +#define DESTRUCTOR(name,pri) \ + asm(".stabs \"___EXIT_LIST__\",22,0,0,___dtor_" #name); \ + asm(".stabs \"___EXIT_LIST__\",20,0,0," #pri); \ + VOID __dtor_##name##(VOID); \ + VOID __dtor_##name##(VOID) + +#endif /* __amigaos4__ */ + +#define CONSTRUCTOR_SUCCEED() \ + return + +#define CONSTRUCTOR_FAIL() \ + exit(RETURN_FAIL) + +#endif /* __GNUC__ */ + +/****************************************************************************/ + +/* These macros are for declaring functions to serve as constructors or + destructors. In which order these should be invoked is defined by the + priority, which is a number in the range 0-999. User-supplied + constructor/destructor functions should have priority 0. That way, + the user-supplied constructors will be invoked after the library + constructors and the user-supplied destructors before the library + destructors. */ + +#define STDLIB_CONSTRUCTOR(name) CONSTRUCTOR(name, 1) +#define STDLIB_DESTRUCTOR(name) DESTRUCTOR(name, 1) + +#define STK_CONSTRUCTOR(name) CONSTRUCTOR(name, 2) +#define STK_DESTRUCTOR(name) DESTRUCTOR(name, 2) + +#define STDIO_CONSTRUCTOR(name) CONSTRUCTOR(name, 3) +#define STDIO_DESTRUCTOR(name) DESTRUCTOR(name, 3) + +#define FILE_CONSTRUCTOR(name) CONSTRUCTOR(name, 4) +#define FILE_DESTRUCTOR(name) DESTRUCTOR(name, 4) + +#define MATH_CONSTRUCTOR(name) CONSTRUCTOR(name, 5) +#define MATH_DESTRUCTOR(name) DESTRUCTOR(name, 5) + +#define SOCKET_CONSTRUCTOR(name) CONSTRUCTOR(name, 6) +#define SOCKET_DESTRUCTOR(name) DESTRUCTOR(name, 6) + +#define ARG_CONSTRUCTOR(name) CONSTRUCTOR(name, 7) +#define ARG_DESTRUCTOR(name) DESTRUCTOR(name, 7) + +#define CLIB_CONSTRUCTOR(name) CONSTRUCTOR(name, 8) +#define CLIB_DESTRUCTOR(name) DESTRUCTOR(name, 8) + +#define PROFILE_CONSTRUCTOR(name) CONSTRUCTOR(name, 9) +#define PROFILE_DESTRUCTOR(name) DESTRUCTOR(name, 9) + +/****************************************************************************/ + +#endif /* _STDLIB_CONSTRUCTOR_H */ diff --git a/library/stdlib_detach.c b/library/stdlib_detach.c index 7c0cd5a..b820639 100644 --- a/library/stdlib_detach.c +++ b/library/stdlib_detach.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_detach.c,v 1.2 2005-01-02 09:07:18 obarthel Exp $ + * $Id: stdlib_detach.c,v 1.3 2005-03-18 12:38:23 obarthel Exp $ * * :ts=4 * @@ -31,7 +31,9 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#ifndef EXEC_TYPES_H #include +#endif /* EXEC_TYPES_H */ /****************************************************************************/ diff --git a/library/stdlib_disablerequesters.c b/library/stdlib_disablerequesters.c index ae9affc..c642a4d 100644 --- a/library/stdlib_disablerequesters.c +++ b/library/stdlib_disablerequesters.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_disablerequesters.c,v 1.2 2005-01-02 09:07:18 obarthel Exp $ + * $Id: stdlib_disablerequesters.c,v 1.3 2005-03-18 12:38:24 obarthel Exp $ * * :ts=4 * @@ -31,7 +31,9 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#ifndef EXEC_TYPES_H #include +#endif /* EXEC_TYPES_H */ /****************************************************************************/ diff --git a/library/stdlib_dosbase.c b/library/stdlib_dosbase.c index e063a82..fafca28 100644 --- a/library/stdlib_dosbase.c +++ b/library/stdlib_dosbase.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_dosbase.c,v 1.2 2005-01-02 09:07:18 obarthel Exp $ + * $Id: stdlib_dosbase.c,v 1.3 2005-03-18 12:38:24 obarthel Exp $ * * :ts=4 * @@ -32,7 +32,10 @@ */ #define __NOLIBBASE__ + +#ifndef PROTO_DOS_H #include +#endif /* PROTO_DOS_H */ /****************************************************************************/ diff --git a/library/stdlib_free.c b/library/stdlib_free.c index aa0002b..d839af6 100644 --- a/library/stdlib_free.c +++ b/library/stdlib_free.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_free.c,v 1.8 2005-02-28 10:07:31 obarthel Exp $ + * $Id: stdlib_free.c,v 1.9 2005-03-18 12:38:24 obarthel Exp $ * * :ts=4 * @@ -31,18 +31,18 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _STDLIB_MEM_DEBUG_H -#include "stdlib_mem_debug.h" -#endif /* _STDLIB_MEM_DEBUG_H */ - -/****************************************************************************/ - #ifndef _STDLIB_HEADERS_H #include "stdlib_headers.h" #endif /* _STDLIB_HEADERS_H */ /****************************************************************************/ +#ifndef _STDLIB_MEMORY_H +#include "stdlib_memory.h" +#endif /* _STDLIB_MEMORY_H */ + +/****************************************************************************/ + #undef free #undef __free diff --git a/library/stdlib_headers.h b/library/stdlib_headers.h index 06aac86..655c089 100644 --- a/library/stdlib_headers.h +++ b/library/stdlib_headers.h @@ -1,5 +1,5 @@ /* - * $Id: stdlib_headers.h,v 1.15 2005-03-11 18:27:27 obarthel Exp $ + * $Id: stdlib_headers.h,v 1.16 2005-03-18 12:38:24 obarthel Exp $ * * :ts=4 * @@ -36,8 +36,9 @@ /****************************************************************************/ +#ifndef EXEC_LIBRARIES_H #include -#include +#endif /* EXEC_LIBRARIES_H */ /****************************************************************************/ @@ -49,25 +50,46 @@ /****************************************************************************/ #if (INCLUDE_VERSION >= 50) +#ifndef DOS_ANCHORPATH_H #include +#endif /* DOS_ANCHORPATH_H */ #endif /* (INCLUDE_VERSION >= 50) */ +/****************************************************************************/ + +#ifndef DOS_DOSEXTENS_H #include +#endif /* DOS_DOSEXTENS_H */ + +#ifndef DOS_DOSTAGS_H #include +#endif /* DOS_DOSTAGS_H */ + +#ifndef DOS_DOSASL_H #include +#endif /* DOS_DOSASL_H */ /****************************************************************************/ +#ifndef WORKBENCH_STARTUP_H #include +#endif /* WORKBENCH_STARTUP_H */ /****************************************************************************/ +#ifndef CLIB_ALIB_PROTOS_H #include +#endif /* CLIB_ALIB_PROTOS_H */ /****************************************************************************/ +#ifndef PROTO_EXEC_H #include +#endif /* PROTO_EXEC_H */ + +#ifndef PROTO_DOS_H #include +#endif /* PROTO_DOS_H */ /****************************************************************************/ @@ -96,101 +118,25 @@ /****************************************************************************/ +#ifndef _STDLIB_PROFILE_H +#include "stdlib_profile.h" +#endif /* _STDLIB_PROFILE_H */ + +/****************************************************************************/ + #if defined(FLOATING_POINT_SUPPORT) #include #endif /* FLOATING_POINT_SUPPORT */ /****************************************************************************/ +#ifndef _MACROS_H #include "macros.h" +#endif /* _MACROS_H */ + +#ifndef _DEBUG_H #include "debug.h" - -/****************************************************************************/ - -/* We shuffle things around a bit for the debug code. This works by joining - related code which shares the same name. The debug code symbols also have - to be completely separate from the "regular" code. */ -#if defined(__MEM_DEBUG) - -#define __static - -#define __alloca_cleanup __alloca_cleanup_debug -#define __alloca_exit __alloca_exit_debug - -#define __find_memory_node __find_memory_node_debug -#define __free_memory_node __free_memory_node_debug -#define __force_free __force_free_debug - -#define __get_allocation_size __get_allocation_size_debug -#define __allocate_memory __allocate_memory_debug - -#define __memory_pool __memory_pool_debug -#define __memory_list __memory_list_debug - -#define __vasprintf_hook_entry __vasprintf_hook_entry_debug - -extern void * __alloca(size_t size,const char * file,int line); -extern void * __calloc(size_t num_elements,size_t element_size,const char * file,int line); -extern void __free(void * ptr,const char * file,int line); -extern void * __malloc(size_t size,const char * file,int line); -extern void * __realloc(void *ptr,size_t size,const char * file,int line); -extern char * __strdup(const char *s,const char * file,int line); -extern char * __getcwd(char * buffer,size_t buffer_size,const char *file,int line); - -#else - -#define __static STATIC - -#define __free(mem,file,line) free(mem) -#define __malloc(size,file,line) malloc(size) - -#endif /* __MEM_DEBUG */ - -/****************************************************************************/ - -struct MemoryNode -{ - struct MinNode mn_MinNode; - size_t mn_Size; - - UBYTE mn_NeverFree; - -#ifdef __MEM_DEBUG - UBYTE mn_AlreadyFree; - UBYTE mn_Pad0[2]; - - void * mn_Allocation; - size_t mn_AllocationSize; - - char * mn_FreeFile; - int mn_FreeLine; - - char * mn_File; - int mn_Line; - -#ifdef __USE_MEM_TREES - struct MemoryNode * mn_Left; - struct MemoryNode * mn_Right; - struct MemoryNode * mn_Parent; - UBYTE mn_IsRed; - UBYTE mn_Pad1[3]; -#endif /* __USE_MEM_TREES */ - -#else - UBYTE mn_Pad0[3]; -#endif /* __MEM_DEBUG */ -}; - -#ifdef __USE_MEM_TREES - -struct MemoryTree -{ - struct MemoryNode * mt_Root; - struct MemoryNode mt_RootNode; - struct MemoryNode mt_NullNode; -}; - -#endif /* __USE_MEM_TREES */ +#endif /* _DEBUG_H */ /****************************************************************************/ @@ -198,19 +144,6 @@ extern unsigned int NOCOMMON __random_seed; /****************************************************************************/ -extern struct MemoryTree NOCOMMON __memory_tree; -extern struct MinList NOCOMMON __memory_list; -extern APTR NOCOMMON __memory_pool; - -/****************************************************************************/ - -extern unsigned long NOCOMMON __maximum_memory_allocated; -extern unsigned long NOCOMMON __current_memory_allocated; -extern unsigned long NOCOMMON __maximum_num_memory_chunks_allocated; -extern unsigned long NOCOMMON __current_num_memory_chunks_allocated; - -/****************************************************************************/ - extern jmp_buf NOCOMMON __exit_jmp_buf; extern int NOCOMMON __exit_value; @@ -220,9 +153,9 @@ extern unsigned int NOCOMMON (* __get_default_stack_size)(void); /****************************************************************************/ -extern unsigned int NOCOMMON __stack_size; -extern UBYTE * NOCOMMON __stk_limit; -extern UBYTE * NOCOMMON __base; +extern unsigned int NOCOMMON __stack_size; +extern UBYTE * NOCOMMON __stk_limit; +extern UBYTE * NOCOMMON __base; /****************************************************************************/ @@ -251,33 +184,6 @@ extern int NOCOMMON __argc; /****************************************************************************/ -extern int NOCOMMON __default_pool_size; -extern int NOCOMMON __default_puddle_size; - -/****************************************************************************/ - -#if defined(__THREAD_SAFE) - -/****************************************************************************/ - -extern void __memory_lock(void); -extern void __memory_unlock(void); - -/****************************************************************************/ - -#else - -/****************************************************************************/ - -#define __memory_lock() ((void)0) -#define __memory_unlock() ((void)0) - -/****************************************************************************/ - -#endif /* __THREAD_SAFE */ - -/****************************************************************************/ - #ifndef _STDLIB_PROTOS_H #include "stdlib_protos.h" #endif /* _STDLIB_PROTOS_H */ diff --git a/library/stdlib_init_exit.c b/library/stdlib_init_exit.c index d0f8176..4aa62da 100644 --- a/library/stdlib_init_exit.c +++ b/library/stdlib_init_exit.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_init_exit.c,v 1.10 2005-03-12 14:10:09 obarthel Exp $ + * $Id: stdlib_init_exit.c,v 1.11 2005-03-18 12:38:24 obarthel Exp $ * * :ts=4 * @@ -31,18 +31,24 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _STDLIB_MEM_DEBUG_H -#include "stdlib_mem_debug.h" -#endif /* _STDLIB_MEM_DEBUG_H */ - -/****************************************************************************/ - #ifndef _STDLIB_HEADERS_H #include "stdlib_headers.h" #endif /* _STDLIB_HEADERS_H */ /****************************************************************************/ +#ifndef _STDLIB_MEMORY_H +#include "stdlib_memory.h" +#endif /* _STDLIB_MEMORY_H */ + +/****************************************************************************/ + +#ifndef _STDLIB_CONSTRUCTOR_H +#include "stdlib_constructor.h" +#endif /* _STDLIB_CONSTRUCTOR_H */ + +/****************************************************************************/ + static BOOL free_program_name; /****************************************************************************/ diff --git a/library/stdlib_isresident.c b/library/stdlib_isresident.c index f70b051..2468369 100644 --- a/library/stdlib_isresident.c +++ b/library/stdlib_isresident.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_isresident.c,v 1.2 2005-01-02 09:07:18 obarthel Exp $ + * $Id: stdlib_isresident.c,v 1.3 2005-03-18 12:38:24 obarthel Exp $ * * :ts=4 * @@ -31,7 +31,9 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#ifndef EXEC_TYPES_H #include +#endif /* EXEC_TYPES_H */ /****************************************************************************/ diff --git a/library/stdlib_machine_test.c b/library/stdlib_machine_test.c index d999396..73e5e01 100644 --- a/library/stdlib_machine_test.c +++ b/library/stdlib_machine_test.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_machine_test.c,v 1.4 2005-03-07 16:56:36 obarthel Exp $ + * $Id: stdlib_machine_test.c,v 1.5 2005-03-18 12:38:24 obarthel Exp $ * * :ts=4 * @@ -37,7 +37,9 @@ /****************************************************************************/ +#ifndef EXEC_EXECBASE_H #include +#endif /* EXEC_EXECBASE_H */ /****************************************************************************/ diff --git a/library/stdlib_main.c b/library/stdlib_main.c index 06a2979..e9b2923 100644 --- a/library/stdlib_main.c +++ b/library/stdlib_main.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_main.c,v 1.16 2005-03-11 16:04:51 obarthel Exp $ + * $Id: stdlib_main.c,v 1.17 2005-03-18 12:38:24 obarthel Exp $ * * :ts=4 * @@ -33,13 +33,21 @@ /*#define DEBUG*/ -#include "stdlib_headers.h" -#include "stdio_headers.h" -#include "time_headers.h" +/****************************************************************************/ + +#ifndef EXEC_EXECBASE_H +#include +#endif /* EXEC_EXECBASE_H */ /****************************************************************************/ -#include +#ifndef _STDLIB_HEADERS_H +#include "stdlib_headers.h" +#endif /* _STDLIB_HEADERS_H */ + +#ifndef _STDIO_HEADERS_H +#include "stdio_headers.h" +#endif /* _STDIO_HEADERS_H */ /****************************************************************************/ @@ -51,10 +59,6 @@ /****************************************************************************/ -#include "macros.h" - -/****************************************************************************/ - typedef int (*init_func_ptr)(void); typedef void (*exit_func_ptr)(void); diff --git a/library/stdlib_malloc.c b/library/stdlib_malloc.c index 9adc0f9..cc51791 100644 --- a/library/stdlib_malloc.c +++ b/library/stdlib_malloc.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_malloc.c,v 1.11 2005-03-11 13:23:18 obarthel Exp $ + * $Id: stdlib_malloc.c,v 1.12 2005-03-18 12:38:24 obarthel Exp $ * * :ts=4 * @@ -31,18 +31,18 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _STDLIB_MEM_DEBUG_H -#include "stdlib_mem_debug.h" -#endif /* _STDLIB_MEM_DEBUG_H */ - -/****************************************************************************/ - #ifndef _STDLIB_HEADERS_H #include "stdlib_headers.h" #endif /* _STDLIB_HEADERS_H */ /****************************************************************************/ +#ifndef _STDLIB_MEMORY_H +#include "stdlib_memory.h" +#endif /* _STDLIB_MEMORY_H */ + +/****************************************************************************/ + #undef malloc #undef __malloc diff --git a/library/stdlib_math.c b/library/stdlib_math.c index 10d7a78..854e666 100644 --- a/library/stdlib_math.c +++ b/library/stdlib_math.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_math.c,v 1.3 2005-01-02 09:07:18 obarthel Exp $ + * $Id: stdlib_math.c,v 1.4 2005-03-18 12:38:24 obarthel Exp $ * * :ts=4 * @@ -37,10 +37,6 @@ /****************************************************************************/ -#include "macros.h" - -/****************************************************************************/ - int __math_init(void) { diff --git a/library/stdlib_mem_debug.h b/library/stdlib_mem_debug.h deleted file mode 100644 index 2729084..0000000 --- a/library/stdlib_mem_debug.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * $Id: stdlib_mem_debug.h,v 1.2 2005-01-02 09:07:18 obarthel Exp $ - * - * :ts=4 - * - * Portable ISO 'C' (1994) runtime library for the Amiga computer - * Copyright (c) 2002-2005 by Olaf Barthel - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Neither the name of Olaf Barthel nor the names of contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _STDLIB_MEM_DEBUG_H -#define _STDLIB_MEM_DEBUG_H - -/****************************************************************************/ - -/* - * Uncomment this to build a library which has the memory debugging features - * enabled. - */ -/*#define __MEM_DEBUG */ - -/****************************************************************************/ - -/* - * Uncomment this to see reports of where and how much memory is allocated - * or released. - */ -/*#define __MEM_DEBUG_LOG*/ - -/****************************************************************************/ - -/* - * Uncomment this to speed up memory data maintenance operations when - * the memory debugging mode is enabled. - */ -/*#define __USE_MEM_TREES*/ - -/****************************************************************************/ - -/* - * Memory debugging parameters; note that the head/tail size must be - * multiples of four, or you will break code that depends upon malloc() - * and friends to return long word aligned data structures! Better - * still, there are assert()s in the library which will blow your code - * out of the water if the data returned by malloc() and realloc() is - * not long word aligned... - */ - -#define MALLOC_HEAD_SIZE 512 /* How many bytes to allocate in front of - each memory chunk */ -#define MALLOC_TAIL_SIZE 512 /* How many bytes to allocate behind each - memory chunk */ - -/****************************************************************************/ - -#define MALLOC_NEW_FILL 0xA3 /* The byte value to fill newly created - memory allocations with */ -#define MALLOC_FREE_FILL 0xA5 /* The byte value to fill freed memory - allocations with */ -#define MALLOC_HEAD_FILL 0xA7 /* The byte value to fill the memory in - front of each allocation with */ -#define MALLOC_TAIL_FILL 0xA9 /* The byte value to fill the memory behind - each allocation with */ - -/****************************************************************************/ - -#endif /* _STDLIB_MEM_DEBUG_H */ diff --git a/library/stdlib_memory.h b/library/stdlib_memory.h new file mode 100644 index 0000000..76b5c13 --- /dev/null +++ b/library/stdlib_memory.h @@ -0,0 +1,236 @@ +/* + * $Id: stdlib_memory.h,v 1.1 2005-03-18 12:38:24 obarthel Exp $ + * + * :ts=4 + * + * Portable ISO 'C' (1994) runtime library for the Amiga computer + * Copyright (c) 2002-2005 by Olaf Barthel + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Neither the name of Olaf Barthel nor the names of contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _STDLIB_MEMORY_H +#define _STDLIB_MEMORY_H + +/****************************************************************************/ + +/* + * Uncomment this to build a library which has the memory debugging features + * enabled. + */ +/*#define __MEM_DEBUG */ + +/****************************************************************************/ + +/* + * Uncomment this to see reports of where and how much memory is allocated + * or released. + */ +/*#define __MEM_DEBUG_LOG*/ + +/****************************************************************************/ + +/* + * Uncomment this to speed up memory data maintenance operations when + * the memory debugging mode is enabled. + */ +/*#define __USE_MEM_TREES*/ + +/****************************************************************************/ + +/* + * Memory debugging parameters; note that the head/tail size must be + * multiples of four, or you will break code that depends upon malloc() + * and friends to return long word aligned data structures! Better + * still, there are assert()s in the library which will blow your code + * out of the water if the data returned by malloc() and realloc() is + * not long word aligned... + */ + +#define MALLOC_HEAD_SIZE 512 /* How many bytes to allocate in front of + each memory chunk */ +#define MALLOC_TAIL_SIZE 512 /* How many bytes to allocate behind each + memory chunk */ + +/****************************************************************************/ + +#define MALLOC_NEW_FILL 0xA3 /* The byte value to fill newly created + memory allocations with */ +#define MALLOC_FREE_FILL 0xA5 /* The byte value to fill freed memory + allocations with */ +#define MALLOC_HEAD_FILL 0xA7 /* The byte value to fill the memory in + front of each allocation with */ +#define MALLOC_TAIL_FILL 0xA9 /* The byte value to fill the memory behind + each allocation with */ + +/****************************************************************************/ + +#ifndef EXEC_MEMORY_H +#include +#endif /* EXEC_MEMORY_H */ + +#ifndef EXEC_NODES_H +#include +#endif /* EXEC_NODES_H */ + +/****************************************************************************/ + +#ifndef _MACROS_H +#include "macros.h" +#endif /* _MACROS_H */ + +/****************************************************************************/ + +#include + +/****************************************************************************/ + +/* We shuffle things around a bit for the debug code. This works by joining + related code which shares the same name. The debug code symbols also have + to be completely separate from the "regular" code. */ +#if defined(__MEM_DEBUG) + +#define __static + +#define __alloca_cleanup __alloca_cleanup_debug + +#define __find_memory_node __find_memory_node_debug +#define __free_memory_node __free_memory_node_debug +#define __force_free __force_free_debug + +#define __get_allocation_size __get_allocation_size_debug +#define __allocate_memory __allocate_memory_debug + +#define __memory_pool __memory_pool_debug +#define __memory_list __memory_list_debug + +#define __vasprintf_hook_entry __vasprintf_hook_entry_debug + +extern void * __alloca(size_t size,const char * file,int line); +extern void * __calloc(size_t num_elements,size_t element_size,const char * file,int line); +extern void __free(void * ptr,const char * file,int line); +extern void * __malloc(size_t size,const char * file,int line); +extern void * __realloc(void *ptr,size_t size,const char * file,int line); +extern char * __strdup(const char *s,const char * file,int line); +extern char * __getcwd(char * buffer,size_t buffer_size,const char *file,int line); + +#else + +#define __static STATIC + +#define __free(mem,file,line) free(mem) +#define __malloc(size,file,line) malloc(size) + +#endif /* __MEM_DEBUG */ + +/****************************************************************************/ + +struct MemoryNode +{ + struct MinNode mn_MinNode; + size_t mn_Size; + + UBYTE mn_NeverFree; + +#ifdef __MEM_DEBUG + UBYTE mn_AlreadyFree; + UBYTE mn_Pad0[2]; + + void * mn_Allocation; + size_t mn_AllocationSize; + + char * mn_FreeFile; + int mn_FreeLine; + + char * mn_File; + int mn_Line; + +#ifdef __USE_MEM_TREES + struct MemoryNode * mn_Left; + struct MemoryNode * mn_Right; + struct MemoryNode * mn_Parent; + UBYTE mn_IsRed; + UBYTE mn_Pad1[3]; +#endif /* __USE_MEM_TREES */ + +#else + UBYTE mn_Pad0[3]; +#endif /* __MEM_DEBUG */ +}; + +#ifdef __USE_MEM_TREES + +struct MemoryTree +{ + struct MemoryNode * mt_Root; + struct MemoryNode mt_RootNode; + struct MemoryNode mt_NullNode; +}; + +#endif /* __USE_MEM_TREES */ + +/****************************************************************************/ + +extern struct MemoryTree NOCOMMON __memory_tree; +extern struct MinList NOCOMMON __memory_list; +extern APTR NOCOMMON __memory_pool; + +/****************************************************************************/ + +extern unsigned long NOCOMMON __maximum_memory_allocated; +extern unsigned long NOCOMMON __current_memory_allocated; +extern unsigned long NOCOMMON __maximum_num_memory_chunks_allocated; +extern unsigned long NOCOMMON __current_num_memory_chunks_allocated; + +/****************************************************************************/ + +extern int NOCOMMON __default_pool_size; +extern int NOCOMMON __default_puddle_size; + +/****************************************************************************/ + +#if defined(__THREAD_SAFE) + +/****************************************************************************/ + +extern void __memory_lock(void); +extern void __memory_unlock(void); + +/****************************************************************************/ + +#else + +/****************************************************************************/ + +#define __memory_lock() ((void)0) +#define __memory_unlock() ((void)0) + +/****************************************************************************/ + +#endif /* __THREAD_SAFE */ + +/****************************************************************************/ + +#endif /* _STDLIB_MEMORY_H */ diff --git a/library/stdlib_socket.c b/library/stdlib_profile.h similarity index 58% rename from library/stdlib_socket.c rename to library/stdlib_profile.h index 922a36b..b5133b5 100644 --- a/library/stdlib_socket.c +++ b/library/stdlib_profile.h @@ -1,5 +1,5 @@ /* - * $Id: stdlib_socket.c,v 1.3 2005-01-02 09:07:18 obarthel Exp $ + * $Id: stdlib_profile.h,v 1.1 2005-03-18 12:38:24 obarthel Exp $ * * :ts=4 * @@ -31,14 +31,44 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _STDLIB_HEADERS_H -#include "stdlib_headers.h" -#endif /* _STDLIB_HEADERS_H */ +#ifndef _STDLIB_PROFILE_H +#define _STDLIB_PROFILE_H /****************************************************************************/ -int -__socket_init(void) -{ - return(OK); -} +/* Magic macros for code profiling, SAS/C style. Normally, you would find + these in , which is SAS/C-specific. */ + +/****************************************************************************/ + +#ifdef __SASC + +/****************************************************************************/ + +extern void ASM _PROLOG(REG(a0,char *)); +extern void ASM _EPILOG(REG(a0,char *)); + +#if _PROFILE +#define PROFILE_OFF() _PROLOG(0L) +#define PROFILE_ON() _EPILOG(0L) +#else +#define PROFILE_OFF() ((void)0) +#define PROFILE_ON() ((void)0) +#endif /* _PROFILE */ + +/****************************************************************************/ + +#else + +/****************************************************************************/ + +#define PROFILE_OFF() ((void)0) +#define PROFILE_ON() ((void)0) + +/****************************************************************************/ + +#endif /* __SASC */ + +/****************************************************************************/ + +#endif /* _STDLIB_PROFILE_H */ diff --git a/library/stdlib_protos.h b/library/stdlib_protos.h index 8fe9a12..ab7843b 100644 --- a/library/stdlib_protos.h +++ b/library/stdlib_protos.h @@ -1,5 +1,5 @@ /* - * $Id: stdlib_protos.h,v 1.12 2005-03-07 11:16:43 obarthel Exp $ + * $Id: stdlib_protos.h,v 1.13 2005-03-18 12:38:24 obarthel Exp $ * * :ts=4 * @@ -48,13 +48,13 @@ /****************************************************************************/ -#ifndef _STDLIB_HEADERS_H +#ifndef _STDLIB_MEMORY_H /* Forward declarations */ struct MemoryNode; struct MemoryTree; -#endif /* _STDLIB_HEADERS_H */ +#endif /* _STDLIB_MEMORY_H */ /****************************************************************************/ diff --git a/library/stdlib_realloc.c b/library/stdlib_realloc.c index 3fb0b38..d89fd04 100644 --- a/library/stdlib_realloc.c +++ b/library/stdlib_realloc.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_realloc.c,v 1.5 2005-02-03 16:56:17 obarthel Exp $ + * $Id: stdlib_realloc.c,v 1.6 2005-03-18 12:38:24 obarthel Exp $ * * :ts=4 * @@ -31,18 +31,18 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _STDLIB_MEM_DEBUG_H -#include "stdlib_mem_debug.h" -#endif /* _STDLIB_MEM_DEBUG_H */ - -/****************************************************************************/ - #ifndef _STDLIB_HEADERS_H #include "stdlib_headers.h" #endif /* _STDLIB_HEADERS_H */ /****************************************************************************/ +#ifndef _STDLIB_MEMORY_H +#include "stdlib_memory.h" +#endif /* _STDLIB_MEMORY_H */ + +/****************************************************************************/ + #undef realloc /****************************************************************************/ diff --git a/library/stdlib_red_black.c b/library/stdlib_red_black.c index 17f9641..56dd36f 100644 --- a/library/stdlib_red_black.c +++ b/library/stdlib_red_black.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_red_black.c,v 1.3 2005-02-25 10:14:21 obarthel Exp $ + * $Id: stdlib_red_black.c,v 1.4 2005-03-18 12:38:24 obarthel Exp $ * * :ts=4 * @@ -31,18 +31,18 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _STDLIB_MEM_DEBUG_H -#include "stdlib_mem_debug.h" -#endif /* _STDLIB_MEM_DEBUG_H */ - -/****************************************************************************/ - #ifndef _STDLIB_HEADERS_H #include "stdlib_headers.h" #endif /* _STDLIB_HEADERS_H */ /****************************************************************************/ +#ifndef _STDLIB_MEMORY_H +#include "stdlib_memory.h" +#endif /* _STDLIB_MEMORY_H */ + +/****************************************************************************/ + #if defined(__USE_MEM_TREES) && defined(__MEM_DEBUG) /****************************************************************************/ diff --git a/library/stdlib_setenv.c b/library/stdlib_setenv.c index b3c4940..a38076e 100644 --- a/library/stdlib_setenv.c +++ b/library/stdlib_setenv.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_setenv.c,v 1.7 2005-02-28 10:07:32 obarthel Exp $ + * $Id: stdlib_setenv.c,v 1.8 2005-03-18 12:38:25 obarthel Exp $ * * :ts=4 * @@ -37,18 +37,24 @@ /****************************************************************************/ -#ifndef _STDLIB_MEM_DEBUG_H -#include "stdlib_mem_debug.h" -#endif /* _STDLIB_MEM_DEBUG_H */ - -/****************************************************************************/ - #ifndef _STDLIB_HEADERS_H #include "stdlib_headers.h" #endif /* _STDLIB_HEADERS_H */ /****************************************************************************/ +#ifndef _STDLIB_MEMORY_H +#include "stdlib_memory.h" +#endif /* _STDLIB_MEMORY_H */ + +/****************************************************************************/ + +#ifndef _STDLIB_CONSTRUCTOR_H +#include "stdlib_constructor.h" +#endif /* _STDLIB_CONSTRUCTOR_H */ + +/****************************************************************************/ + /* The following is not part of the ISO 'C' (1994) standard. */ /****************************************************************************/ diff --git a/library/stdlib_shell_escape.c b/library/stdlib_shell_escape.c index b95e501..a83f3ed 100644 --- a/library/stdlib_shell_escape.c +++ b/library/stdlib_shell_escape.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_shell_escape.c,v 1.2 2005-01-02 09:07:18 obarthel Exp $ + * $Id: stdlib_shell_escape.c,v 1.3 2005-03-18 12:38:25 obarthel Exp $ * * :ts=4 * @@ -37,7 +37,9 @@ /****************************************************************************/ +#ifndef EXEC_TYPES_H #include +#endif /* EXEC_TYPES_H */ /****************************************************************************/ diff --git a/library/stdlib_showerror.c b/library/stdlib_showerror.c index 890bbc2..0a4c339 100644 --- a/library/stdlib_showerror.c +++ b/library/stdlib_showerror.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_showerror.c,v 1.10 2005-03-07 14:04:09 obarthel Exp $ + * $Id: stdlib_showerror.c,v 1.11 2005-03-18 12:38:25 obarthel Exp $ * * :ts=4 * @@ -31,22 +31,38 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#ifndef EXEC_LIBRARIES_H #include +#endif /* EXEC_LIBRARIES_H */ +#ifndef INTUITION_INTUITION_H #include +#endif /* INTUITION_INTUITION_H */ +#ifndef DOS_DOS_H #include +#endif /* DOS_DOS_H */ +#ifndef WORKBENCH_STARTUP_H #include +#endif /* WORKBENCH_STARTUP_H */ /****************************************************************************/ +#ifndef PROTO_EXEC_H #include +#endif /* PROTO_EXEC_H */ #define __NOLIBBASE__ #define __NOGLOBALIFACE__ + +#ifndef PROTO_INTUITION_H #include +#endif /* PROTO_INTUITION_H */ + +#ifndef PROTO_DOS_H #include +#endif /* PROTO_DOS_H */ /****************************************************************************/ @@ -54,10 +70,6 @@ /****************************************************************************/ -#include "macros.h" - -/****************************************************************************/ - #ifndef _STDLIB_HEADERS_H #include "stdlib_headers.h" #endif /* _STDLIB_HEADERS_H */ diff --git a/library/stdlib_stack_usage.c b/library/stdlib_stack_usage.c index 611ce44..c2ff250 100644 --- a/library/stdlib_stack_usage.c +++ b/library/stdlib_stack_usage.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_stack_usage.c,v 1.4 2005-03-11 18:27:27 obarthel Exp $ + * $Id: stdlib_stack_usage.c,v 1.5 2005-03-18 12:38:25 obarthel Exp $ * * :ts=4 * @@ -39,10 +39,6 @@ /****************************************************************************/ -#include "macros.h" - -/****************************************************************************/ - static struct StackSwapStruct stack_swap_struct; /****************************************************************************/ diff --git a/library/stdlib_stackargbytes.c b/library/stdlib_stackargbytes.c index cd452f1..68d9e32 100644 --- a/library/stdlib_stackargbytes.c +++ b/library/stdlib_stackargbytes.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_stackargbytes.c,v 1.2 2005-01-02 09:07:18 obarthel Exp $ + * $Id: stdlib_stackargbytes.c,v 1.3 2005-03-18 12:38:25 obarthel Exp $ * * :ts=4 * @@ -31,7 +31,9 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#ifndef EXEC_TYPES_H #include +#endif /* EXEC_TYPES_H */ /****************************************************************************/ diff --git a/library/stdlib_stackcheck.c b/library/stdlib_stackcheck.c index 8fb1f7e..47320ea 100644 --- a/library/stdlib_stackcheck.c +++ b/library/stdlib_stackcheck.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_stackcheck.c,v 1.7 2005-03-12 14:10:09 obarthel Exp $ + * $Id: stdlib_stackcheck.c,v 1.8 2005-03-18 12:38:25 obarthel Exp $ * * :ts=4 * @@ -37,7 +37,9 @@ /****************************************************************************/ -#include "macros.h" +#ifndef _STDLIB_CONSTRUCTOR_H +#include "stdlib_constructor.h" +#endif /* _STDLIB_CONSTRUCTOR_H */ /****************************************************************************/ diff --git a/library/stdlib_stackextension.c b/library/stdlib_stackextension.c index 236937c..05cd4a6 100644 --- a/library/stdlib_stackextension.c +++ b/library/stdlib_stackextension.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_stackextension.c,v 1.10 2005-03-12 14:10:09 obarthel Exp $ + * $Id: stdlib_stackextension.c,v 1.11 2005-03-18 12:38:25 obarthel Exp $ * * :ts=4 * @@ -37,6 +37,18 @@ /****************************************************************************/ +#ifndef _STDLIB_MEMORY_H +#include "stdlib_memory.h" +#endif /* _STDLIB_MEMORY_H */ + +/****************************************************************************/ + +#ifndef _STDLIB_CONSTRUCTOR_H +#include "stdlib_constructor.h" +#endif /* _STDLIB_CONSTRUCTOR_H */ + +/****************************************************************************/ + #if (defined(__GNUC__) && !defined(__PPC__)) /****************************************************************************/ diff --git a/library/stdlib_stackminframe.c b/library/stdlib_stackminframe.c index ede4a43..3f853f2 100644 --- a/library/stdlib_stackminframe.c +++ b/library/stdlib_stackminframe.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_stackminframe.c,v 1.2 2005-01-02 09:07:19 obarthel Exp $ + * $Id: stdlib_stackminframe.c,v 1.3 2005-03-18 12:38:25 obarthel Exp $ * * :ts=4 * @@ -31,7 +31,9 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#ifndef EXEC_TYPES_H #include +#endif /* EXEC_TYPES_H */ /****************************************************************************/ diff --git a/library/stdlib_stacksafezone.c b/library/stdlib_stacksafezone.c index 5ce09fb..c806cbf 100644 --- a/library/stdlib_stacksafezone.c +++ b/library/stdlib_stacksafezone.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_stacksafezone.c,v 1.2 2005-01-02 09:07:19 obarthel Exp $ + * $Id: stdlib_stacksafezone.c,v 1.3 2005-03-18 12:38:25 obarthel Exp $ * * :ts=4 * @@ -31,7 +31,9 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#ifndef EXEC_TYPES_H #include +#endif /* EXEC_TYPES_H */ /****************************************************************************/ diff --git a/library/stdlib_sysbase.c b/library/stdlib_sysbase.c index b3d1bab..7daebd4 100644 --- a/library/stdlib_sysbase.c +++ b/library/stdlib_sysbase.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_sysbase.c,v 1.2 2005-01-02 09:07:19 obarthel Exp $ + * $Id: stdlib_sysbase.c,v 1.3 2005-03-18 12:38:25 obarthel Exp $ * * :ts=4 * @@ -32,7 +32,10 @@ */ #define __NOLIBBASE__ + +#ifndef PROTO_EXEC_H #include +#endif /* PROTO_EXEC_H */ /****************************************************************************/ diff --git a/library/stdlib_system.c b/library/stdlib_system.c index 478b80e..631ae2f 100644 --- a/library/stdlib_system.c +++ b/library/stdlib_system.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_system.c,v 1.4 2005-02-03 16:56:17 obarthel Exp $ + * $Id: stdlib_system.c,v 1.5 2005-03-18 12:38:25 obarthel Exp $ * * :ts=4 * @@ -31,18 +31,18 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _STDLIB_MEM_DEBUG_H -#include "stdlib_mem_debug.h" -#endif /* _STDLIB_MEM_DEBUG_H */ - -/****************************************************************************/ - #ifndef _STDLIB_HEADERS_H #include "stdlib_headers.h" #endif /* _STDLIB_HEADERS_H */ /****************************************************************************/ +#ifndef _STDLIB_MEMORY_H +#include "stdlib_memory.h" +#endif /* _STDLIB_MEMORY_H */ + +/****************************************************************************/ + int system(const char * command) { diff --git a/library/stdlib_unsetenv.c b/library/stdlib_unsetenv.c index 4e4c1dc..ba0d5ee 100644 --- a/library/stdlib_unsetenv.c +++ b/library/stdlib_unsetenv.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_unsetenv.c,v 1.5 2005-02-28 10:07:32 obarthel Exp $ + * $Id: stdlib_unsetenv.c,v 1.6 2005-03-18 12:38:25 obarthel Exp $ * * :ts=4 * @@ -37,18 +37,18 @@ /****************************************************************************/ -#ifndef _STDLIB_MEM_DEBUG_H -#include "stdlib_mem_debug.h" -#endif /* _STDLIB_MEM_DEBUG_H */ - -/****************************************************************************/ - #ifndef _STDLIB_HEADERS_H #include "stdlib_headers.h" #endif /* _STDLIB_HEADERS_H */ /****************************************************************************/ +#ifndef _STDLIB_MEMORY_H +#include "stdlib_memory.h" +#endif /* _STDLIB_MEMORY_H */ + +/****************************************************************************/ + /* The following is not part of the ISO 'C' (1994) standard. */ /****************************************************************************/ diff --git a/library/string_headers.h b/library/string_headers.h index 3c6ca67..4477dfd 100644 --- a/library/string_headers.h +++ b/library/string_headers.h @@ -1,5 +1,5 @@ /* - * $Id: string_headers.h,v 1.4 2005-03-15 11:18:32 obarthel Exp $ + * $Id: string_headers.h,v 1.5 2005-03-18 12:38:25 obarthel Exp $ * * :ts=4 * @@ -52,8 +52,13 @@ /****************************************************************************/ +#ifndef _MACROS_H #include "macros.h" +#endif /* _MACROS_H */ + +#ifndef _DEBUG_H #include "debug.h" +#endif /* _DEBUG_H */ /****************************************************************************/ diff --git a/library/string_strdup.c b/library/string_strdup.c index 8181a29..7f6ed89 100644 --- a/library/string_strdup.c +++ b/library/string_strdup.c @@ -1,5 +1,5 @@ /* - * $Id: string_strdup.c,v 1.6 2005-02-03 16:56:17 obarthel Exp $ + * $Id: string_strdup.c,v 1.7 2005-03-18 12:38:25 obarthel Exp $ * * :ts=4 * @@ -49,6 +49,12 @@ /****************************************************************************/ +#ifndef _STDLIB_MEMORY_H +#include "stdlib_memory.h" +#endif /* _STDLIB_MEMORY_H */ + +/****************************************************************************/ + /* The following is not part of the ISO 'C' (1994) standard. */ /****************************************************************************/ diff --git a/library/strings_headers.h b/library/strings_headers.h index afa711d..66f62c7 100644 --- a/library/strings_headers.h +++ b/library/strings_headers.h @@ -1,5 +1,5 @@ /* - * $Id: strings_headers.h,v 1.2 2005-01-02 09:07:19 obarthel Exp $ + * $Id: strings_headers.h,v 1.3 2005-03-18 12:38:25 obarthel Exp $ * * :ts=4 * @@ -44,8 +44,13 @@ /****************************************************************************/ +#ifndef _MACROS_H #include "macros.h" +#endif /* _MACROS_H */ + +#ifndef _DEBUG_H #include "debug.h" +#endif /* _DEBUG_H */ /****************************************************************************/ diff --git a/library/time_clock.c b/library/time_clock.c index 07b334b..c951fb2 100644 --- a/library/time_clock.c +++ b/library/time_clock.c @@ -1,5 +1,5 @@ /* - * $Id: time_clock.c,v 1.5 2005-03-12 14:10:09 obarthel Exp $ + * $Id: time_clock.c,v 1.6 2005-03-18 12:38:25 obarthel Exp $ * * :ts=4 * @@ -37,6 +37,12 @@ /****************************************************************************/ +#ifndef _STDLIB_CONSTRUCTOR_H +#include "stdlib_constructor.h" +#endif /* _STDLIB_CONSTRUCTOR_H */ + +/****************************************************************************/ + static struct DateStamp start_time; /****************************************************************************/ diff --git a/library/time_gettimeofday.c b/library/time_gettimeofday.c index a0643a0..9595160 100644 --- a/library/time_gettimeofday.c +++ b/library/time_gettimeofday.c @@ -1,5 +1,5 @@ /* - * $Id: time_gettimeofday.c,v 1.7 2005-02-27 21:58:21 obarthel Exp $ + * $Id: time_gettimeofday.c,v 1.8 2005-03-18 12:38:25 obarthel Exp $ * * :ts=4 * @@ -49,7 +49,9 @@ /****************************************************************************/ +#ifndef PROTO_TIMER_H #include +#endif /* PROTO_TIMER_H */ /****************************************************************************/ diff --git a/library/time_headers.h b/library/time_headers.h index 9231d5a..4410be5 100644 --- a/library/time_headers.h +++ b/library/time_headers.h @@ -1,5 +1,5 @@ /* - * $Id: time_headers.h,v 1.9 2005-01-30 09:37:59 obarthel Exp $ + * $Id: time_headers.h,v 1.10 2005-03-18 12:38:25 obarthel Exp $ * * :ts=4 * @@ -36,26 +36,49 @@ /****************************************************************************/ +#ifndef EXEC_LIBRARIES_H #include +#endif /* EXEC_LIBRARIES_H */ + +#ifndef EXEC_DEVICES_H #include +#endif /* EXEC_DEVICES_H */ + +#ifndef EXEC_MEMORY_H #include +#endif /* EXEC_MEMORY_H */ +#ifndef DOS_DOSEXTENS_H #include +#endif /* DOS_DOSEXTENS_H */ +#ifndef DEVICES_TIMER_H #include +#endif /* DEVICES_TIMER_H */ +#ifndef LIBRARIES_LOCALE_H #include +#endif /* LIBRARIES_LOCALE_H */ +#ifndef UTILITY_DATE_H #include +#endif /* UTILITY_DATE_H */ /****************************************************************************/ +#ifndef CLIB_ALIB_PROTOS_H #include +#endif /* CLIB_ALIB_PROTOS_H */ /****************************************************************************/ +#ifndef PROTO_EXEC_H #include +#endif /* PROTO_EXEC_H */ + +#ifndef PROTO_DOS_H #include +#endif /* PROTO_DOS_H */ /****************************************************************************/ @@ -73,17 +96,28 @@ /****************************************************************************/ -#include "macros.h" -#include "debug.h" - -/****************************************************************************/ - #ifndef _MATH_FP_SUPPORT_H #include "math_fp_support.h" #endif /* _MATH_FP_SUPPORT_H */ /****************************************************************************/ +#ifndef _STDLIB_PROFILE_H +#include "stdlib_profile.h" +#endif /* _STDLIB_PROFILE_H */ + +/****************************************************************************/ + +#ifndef _MACROS_H +#include "macros.h" +#endif /* _MACROS_H */ + +#ifndef _DEBUG_H +#include "debug.h" +#endif /* _DEBUG_H */ + +/****************************************************************************/ + /* This is the difference (in seconds) between the Unix epoch (which began on January 1st, 1970) and the AmigaOS epoch (which began eight years later on January 1st 1978). */ diff --git a/library/unistd_chdir_exit.c b/library/unistd_chdir_exit.c index c337e01..6b06faf 100644 --- a/library/unistd_chdir_exit.c +++ b/library/unistd_chdir_exit.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_chdir_exit.c,v 1.4 2005-03-11 13:23:18 obarthel Exp $ + * $Id: unistd_chdir_exit.c,v 1.5 2005-03-18 12:38:25 obarthel Exp $ * * :ts=4 * @@ -37,6 +37,12 @@ /****************************************************************************/ +#ifndef _STDLIB_CONSTRUCTOR_H +#include "stdlib_constructor.h" +#endif /* _STDLIB_CONSTRUCTOR_H */ + +/****************************************************************************/ + /* The following is not part of the ISO 'C' (1994) standard. */ /****************************************************************************/ diff --git a/library/unistd_getcwd.c b/library/unistd_getcwd.c index d979b83..e70035e 100644 --- a/library/unistd_getcwd.c +++ b/library/unistd_getcwd.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_getcwd.c,v 1.7 2005-02-28 10:07:32 obarthel Exp $ + * $Id: unistd_getcwd.c,v 1.8 2005-03-18 12:38:25 obarthel Exp $ * * :ts=4 * @@ -37,24 +37,22 @@ /****************************************************************************/ -#ifndef _STDLIB_MEM_DEBUG_H -#include "stdlib_mem_debug.h" -#endif /* _STDLIB_MEM_DEBUG_H */ - -/****************************************************************************/ - #ifndef _UNISTD_HEADERS_H #include "unistd_headers.h" #endif /* _UNISTD_HEADERS_H */ -/****************************************************************************/ - #ifndef _STDLIB_HEADERS_H #include "stdlib_headers.h" #endif /* _STDLIB_HEADERS_H */ /****************************************************************************/ +#ifndef _STDLIB_MEMORY_H +#include "stdlib_memory.h" +#endif /* _STDLIB_MEMORY_H */ + +/****************************************************************************/ + /* The following is not part of the ISO 'C' (1994) standard. */ /****************************************************************************/ diff --git a/library/unistd_headers.h b/library/unistd_headers.h index 41b1c3c..4aad35c 100644 --- a/library/unistd_headers.h +++ b/library/unistd_headers.h @@ -1,5 +1,5 @@ /* - * $Id: unistd_headers.h,v 1.6 2005-02-03 16:56:17 obarthel Exp $ + * $Id: unistd_headers.h,v 1.7 2005-03-18 12:38:25 obarthel Exp $ * * :ts=4 * @@ -48,6 +48,12 @@ /****************************************************************************/ +#ifndef _STDLIB_PROFILE_H +#include "stdlib_profile.h" +#endif /* _STDLIB_PROFILE_H */ + +/****************************************************************************/ + extern char NOCOMMON __current_path_name[MAXPATHLEN]; /****************************************************************************/ diff --git a/library/unistd_init_exit.c b/library/unistd_init_exit.c index 35ab817..6083a90 100644 --- a/library/unistd_init_exit.c +++ b/library/unistd_init_exit.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_init_exit.c,v 1.10 2005-03-12 14:10:09 obarthel Exp $ + * $Id: unistd_init_exit.c,v 1.11 2005-03-18 12:38:25 obarthel Exp $ * * :ts=4 * @@ -37,7 +37,9 @@ /****************************************************************************/ -#include "stdlib_protos.h" +#ifndef _STDLIB_CONSTRUCTOR_H +#include "stdlib_constructor.h" +#endif /* _STDLIB_CONSTRUCTOR_H */ /****************************************************************************/ diff --git a/library/unistd_time_delay.c b/library/unistd_time_delay.c index d3b0a02..e031041 100644 --- a/library/unistd_time_delay.c +++ b/library/unistd_time_delay.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_time_delay.c,v 1.4 2005-01-30 09:37:59 obarthel Exp $ + * $Id: unistd_time_delay.c,v 1.5 2005-03-18 12:38:25 obarthel Exp $ * * :ts=4 * @@ -37,7 +37,9 @@ /****************************************************************************/ +#ifndef PROTO_TIMER_H #include +#endif /* PROTO_TIMER_H */ /****************************************************************************/ diff --git a/library/unistd_timer.c b/library/unistd_timer.c index 54bf818..2269ade 100644 --- a/library/unistd_timer.c +++ b/library/unistd_timer.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_timer.c,v 1.6 2005-03-12 14:10:09 obarthel Exp $ + * $Id: unistd_timer.c,v 1.7 2005-03-18 12:38:25 obarthel Exp $ * * :ts=4 * @@ -41,6 +41,12 @@ /****************************************************************************/ +#ifndef _STDLIB_CONSTRUCTOR_H +#include "stdlib_constructor.h" +#endif /* _STDLIB_CONSTRUCTOR_H */ + +/****************************************************************************/ + /* The following is not part of the ISO 'C' (1994) standard. */ /****************************************************************************/ diff --git a/library/unistd_unlink.c b/library/unistd_unlink.c index 93cd9f0..846cb28 100644 --- a/library/unistd_unlink.c +++ b/library/unistd_unlink.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_unlink.c,v 1.5 2005-02-28 10:07:32 obarthel Exp $ + * $Id: unistd_unlink.c,v 1.6 2005-03-18 12:38:25 obarthel Exp $ * * :ts=4 * @@ -37,18 +37,18 @@ /****************************************************************************/ -#ifndef _STDLIB_MEM_DEBUG_H -#include "stdlib_mem_debug.h" -#endif /* _STDLIB_MEM_DEBUG_H */ - -/****************************************************************************/ - #ifndef _UNISTD_HEADERS_H #include "unistd_headers.h" #endif /* _UNISTD_HEADERS_H */ /****************************************************************************/ +#ifndef _STDLIB_MEMORY_H +#include "stdlib_memory.h" +#endif /* _STDLIB_MEMORY_H */ + +/****************************************************************************/ + /* The following is not part of the ISO 'C' (1994) standard. */ /****************************************************************************/ diff --git a/library/unistd_wildcard_expand.c b/library/unistd_wildcard_expand.c index e642b06..b86681a 100644 --- a/library/unistd_wildcard_expand.c +++ b/library/unistd_wildcard_expand.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_wildcard_expand.c,v 1.10 2005-03-03 09:32:09 obarthel Exp $ + * $Id: unistd_wildcard_expand.c,v 1.11 2005-03-18 12:38:25 obarthel Exp $ * * :ts=4 * @@ -31,23 +31,27 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _STDLIB_MEM_DEBUG_H -#include "stdlib_mem_debug.h" -#endif /* _STDLIB_MEM_DEBUG_H */ - -/****************************************************************************/ - #ifndef _STDLIB_HEADERS_H #include "stdlib_headers.h" #endif /* _STDLIB_HEADERS_H */ /****************************************************************************/ -#include "stdlib_protos.h" +#ifndef _STDLIB_MEMORY_H +#include "stdlib_memory.h" +#endif /* _STDLIB_MEMORY_H */ /****************************************************************************/ +#ifndef _STDLIB_CONSTRUCTOR_H +#include "stdlib_constructor.h" +#endif /* _STDLIB_CONSTRUCTOR_H */ + +/****************************************************************************/ + +#ifndef CLIB_ALIB_PROTOS_H #include +#endif /* CLIB_ALIB_PROTOS_H */ /****************************************************************************/ diff --git a/library/usergroup_headers.h b/library/usergroup_headers.h index 51b25d0..68afbfa 100644 --- a/library/usergroup_headers.h +++ b/library/usergroup_headers.h @@ -1,5 +1,5 @@ /* - * $Id: usergroup_headers.h,v 1.5 2005-01-02 09:07:19 obarthel Exp $ + * $Id: usergroup_headers.h,v 1.6 2005-03-18 12:38:25 obarthel Exp $ * * :ts=4 * @@ -42,6 +42,18 @@ /****************************************************************************/ +#ifndef _STDLIB_HEADERS_H +#include "stdlib_headers.h" +#endif /* _STDLIB_HEADERS_H */ + +/****************************************************************************/ + +#ifndef _STDLIB_PROFILE_H +#include "stdlib_profile.h" +#endif /* _STDLIB_PROFILE_H */ + +/****************************************************************************/ + extern struct Library * NOCOMMON __UserGroupBase; /****************************************************************************/ diff --git a/library/usergroup_init_exit.c b/library/usergroup_init_exit.c index 9b45b5e..b4ff709 100644 --- a/library/usergroup_init_exit.c +++ b/library/usergroup_init_exit.c @@ -1,5 +1,5 @@ /* - * $Id: usergroup_init_exit.c,v 1.9 2005-03-12 14:10:09 obarthel Exp $ + * $Id: usergroup_init_exit.c,v 1.10 2005-03-18 12:38:25 obarthel Exp $ * * :ts=4 * @@ -41,7 +41,9 @@ /****************************************************************************/ -#include "stdlib_protos.h" +#ifndef _STDLIB_CONSTRUCTOR_H +#include "stdlib_constructor.h" +#endif /* _STDLIB_CONSTRUCTOR_H */ /****************************************************************************/ diff --git a/library/utime_utime.c b/library/utime_utime.c index 5e82538..c7d9791 100644 --- a/library/utime_utime.c +++ b/library/utime_utime.c @@ -1,5 +1,5 @@ /* - * $Id: utime_utime.c,v 1.7 2005-02-28 10:07:32 obarthel Exp $ + * $Id: utime_utime.c,v 1.8 2005-03-18 12:38:25 obarthel Exp $ * * :ts=4 * @@ -51,6 +51,12 @@ /****************************************************************************/ +#ifndef _STDLIB_PROFILE_H +#include "stdlib_profile.h" +#endif /* _STDLIB_PROFILE_H */ + +/****************************************************************************/ + /* The following is not part of the ISO 'C' (1994) standard. */ /****************************************************************************/ diff --git a/library/utsname_uname.c b/library/utsname_uname.c index 236e8fc..b3a11ce 100644 --- a/library/utsname_uname.c +++ b/library/utsname_uname.c @@ -1,5 +1,5 @@ /* - * $Id: utsname_uname.c,v 1.2 2005-03-02 14:47:10 obarthel Exp $ + * $Id: utsname_uname.c,v 1.3 2005-03-18 12:38:25 obarthel Exp $ * * :ts=4 * @@ -49,10 +49,6 @@ #include "stdlib_headers.h" #endif /* _STDLIB_HEADERS_H */ -#ifndef _DEBUG_H -#include "debug.h" -#endif /* _DEBUG_H */ - /****************************************************************************/ #define OSNAME "AmigaOS"