diff --git a/test_programs/GNUmakefile.os4 b/test_programs/GNUmakefile.os4 index 66f714e..1502340 100644 --- a/test_programs/GNUmakefile.os4 +++ b/test_programs/GNUmakefile.os4 @@ -1,5 +1,5 @@ # -# $Id: GNUmakefile.os4,v 1.7 2005-05-17 19:15:32 obarthel Exp $ +# $Id: GNUmakefile.os4,v 1.8 2005-05-18 07:22:51 obarthel Exp $ # # :ts=8 # @@ -21,20 +21,20 @@ WARNINGS = \ -Wall -W -Wshadow -Wpointer-arith -Wsign-compare -Wmissing-prototypes \ -Wundef -Wbad-function-cast -Wmissing-declarations -Wconversion -INCLUDE = -I../library/include -I$(V)/include +INCLUDE = -I$(V)/include -I../library/include LIB = -L../library/lib #OPTIONS = -DNDEBUG -fno-builtin -DNO_INLINE_STDARG -DIEEE_FLOATING_POINT_SUPPORT #OPTIONS = -D__MEM_DEBUG -fno-builtin -#OPTIONS = -DDEBUG -D__MEM_DEBUG -DNO_INLINE_STDARG -fno-builtin - OPTIMIZE = -O + OPTIONS = -DDEBUG -DNO_INLINE_STDARG -fno-builtin +#OPTIMIZE = -O #OPTIMIZE = -O2 -fomit-frame-pointer -#DEBUG = -g2 +DEBUG = -ggdb CFLAGS = $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(CODE_TYPE) $(INCLUDE) $(LIB) ############################################################################## -LIBS = -lm -lc +LIBS = -lm -lc -ldebug -lgcc ############################################################################## @@ -99,4 +99,4 @@ fstat_stdout_test : fstat_stdout_test.o simple_sprintf : simple_sprintf.o @echo "Linking $@" - $(CC) -nostdlib $(CFLAGS) -o $@ simple_sprintf.o -lc -Wl,--cref,-M,-Map=$@.map + $(CC) -nostdlib $(CFLAGS) -o $@ simple_sprintf.o -lc -lgcc -Wl,--cref,-M,-Map=$@.map diff --git a/test_programs/simple_sprintf.c b/test_programs/simple_sprintf.c index e9b536a..9919c0f 100644 --- a/test_programs/simple_sprintf.c +++ b/test_programs/simple_sprintf.c @@ -1,5 +1,5 @@ /* - * $Id: simple_sprintf.c,v 1.1 2005-05-17 19:15:32 obarthel Exp $ + * $Id: simple_sprintf.c,v 1.2 2005-05-18 07:22:52 obarthel Exp $ * * :ts=4 */ @@ -54,14 +54,18 @@ _start(void) SysBase = *(struct Library **)4; + #if defined(__amigaos4__) + { + IExec = (struct ExecIFace *)((struct ExecBase *)SysBase)->MainInterface; + } + #endif /* __amigaos4__ */ + DOSBase = OpenLibrary("dos.library",37); if(DOSBase == NULL) goto out; #if defined(__amigaos4__) { - IExec = (struct ExecIFace *)((struct ExecBase *)SysBase)->MainInterface; - IDOS = (struct DOSIFace *)GetInterface(DOSBase, "main", 1, 0); if(IDOS == NULL) goto out; @@ -70,7 +74,7 @@ _start(void) sprintf(string,"a %s c\n","b"); - Write(Output(),string,strlen(string)); + Write(Output(),string,(LONG)strlen(string)); out: diff --git a/test_programs/test.c b/test_programs/test.c index 74e3594..0a62c5f 100644 --- a/test_programs/test.c +++ b/test_programs/test.c @@ -1,11 +1,14 @@ /* - * $Id: test.c,v 1.4 2005-01-30 10:23:26 obarthel Exp $ + * $Id: test.c,v 1.5 2005-05-18 07:22:52 obarthel Exp $ * * :ts=4 */ /****************************************************************************/ +#define __USE_INLINE__ +#include + #include #include #include @@ -49,6 +52,8 @@ destructor_test2(void) void __attribute__ ((destructor)) destructor_test3(void) { + DebugPrintF("__iob = 0x%08lx\n",__iob); + fprintf(stderr,"destructor #3 called\n"); }