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

- Tried to reduce the number of compiler warnings generated.

- The cross compiler GNUmakefile.os4 variant now also logs all warnings
  and errors to a compiler.log file.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15055 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
Olaf Barthel
2005-10-27 08:58:41 +00:00
parent 937169c0ba
commit 81958fd44b
37 changed files with 110 additions and 102 deletions

View File

@@ -1,5 +1,5 @@
# #
# $Id: GNUmakefile.os4,v 1.83 2005-10-27 08:26:17 obarthel Exp $ # $Id: GNUmakefile.os4,v 1.84 2005-10-27 08:58:41 obarthel Exp $
# #
# :ts=8 # :ts=8
# #
@@ -26,6 +26,7 @@ COPY = cp -a
DELETE = rm -rf DELETE = rm -rf
MAKEDIR = mkdir -p MAKEDIR = mkdir -p
MAKE_OPTS = MAKE_OPTS =
LOG_COMMAND = 2>&1 | tee -a compiler.log
# The following are for the native OS4 compiler # The following are for the native OS4 compiler
#SDK_INCLUDE = /SDK/Include/include_h #SDK_INCLUDE = /SDK/Include/include_h
@@ -37,6 +38,7 @@ MAKE_OPTS =
#DELETE = delete all quiet #DELETE = delete all quiet
#MAKEDIR = makedir all #MAKEDIR = makedir all
#MAKE_OPTS = --jobs=2 #MAKE_OPTS = --jobs=2
#LOG_COMMAND =
MAKE = $(MAKE_COMMAND) -f GNUmakefile.os4 $(MAKE_OPTS) MAKE = $(MAKE_COMMAND) -f GNUmakefile.os4 $(MAKE_OPTS)
@@ -65,39 +67,39 @@ endif
# General build rules for all object files and the individual libraries # General build rules for all object files and the individual libraries
%.o : %.c %.o : %.c
@echo "Compiling $<" @echo "Compiling $<"
@$(CC) -c $(CFLAGS) $< @$(CC) -c $(CFLAGS) $< $(LOG_COMMAND)
$(LIBC_OBJS)/%.o : %.c $(LIBC_OBJS)/%.o : %.c
@echo "Compiling $< [$(TYPE):c]" @echo "Compiling $< [$(TYPE):c]"
@$(CC) -o $(LIBC_OBJS)/$*.o -c $(CFLAGS) $< @$(CC) -o $(LIBC_OBJS)/$*.o -c $(CFLAGS) $< $(LOG_COMMAND)
$(LIBUNIX_OBJS)/%.o : %.c $(LIBUNIX_OBJS)/%.o : %.c
@echo "Compiling $< [$(TYPE):unix]" @echo "Compiling $< [$(TYPE):unix]"
@$(CC) -o $(LIBUNIX_OBJS)/$*.o -c $(CFLAGS) -DUNIX_PATH_SEMANTICS $< @$(CC) -o $(LIBUNIX_OBJS)/$*.o -c $(CFLAGS) -DUNIX_PATH_SEMANTICS $< $(LOG_COMMAND)
$(LIBM_OBJS)/%.o : %.c $(LIBM_OBJS)/%.o : %.c
@echo "Compiling $< [$(TYPE):m]" @echo "Compiling $< [$(TYPE):m]"
@$(CC) -o $(LIBM_OBJS)/$*.o -c $(CFLAGS) $(FLOAT_TYPE) $< @$(CC) -o $(LIBM_OBJS)/$*.o -c $(CFLAGS) $(FLOAT_TYPE) $< $(LOG_COMMAND)
$(LIBNET_OBJS)/%.o : %.c $(LIBNET_OBJS)/%.o : %.c
@echo "Compiling $< [$(TYPE):net]" @echo "Compiling $< [$(TYPE):net]"
@$(CC) -o $(LIBNET_OBJS)/$*.o -c $(CFLAGS) -I$(NET_INCLUDE) -DSOCKET_SUPPORT -DUSERGROUP_SUPPORT $< @$(CC) -o $(LIBNET_OBJS)/$*.o -c $(CFLAGS) -I$(NET_INCLUDE) -DSOCKET_SUPPORT -DUSERGROUP_SUPPORT $< $(LOG_COMMAND)
$(LIBDEBUG_OBJS)/%.o : %.c $(LIBDEBUG_OBJS)/%.o : %.c
@echo "Compiling $< [$(TYPE):debug]" @echo "Compiling $< [$(TYPE):debug]"
@$(CC) -o $(LIBDEBUG_OBJS)/$*.o -c $(CFLAGS) $< @$(CC) -o $(LIBDEBUG_OBJS)/$*.o -c $(CFLAGS) $< $(LOG_COMMAND)
$(LIBAMIGA_OBJS)/%.o : %.c $(LIBAMIGA_OBJS)/%.o : %.c
@echo "Compiling $< [$(TYPE):amiga]" @echo "Compiling $< [$(TYPE):amiga]"
@$(CC) -o $(LIBAMIGA_OBJS)/$*.o -c $(CFLAGS) $< @$(CC) -o $(LIBAMIGA_OBJS)/$*.o -c $(CFLAGS) $< $(LOG_COMMAND)
$(LIBPROFILE_OBJS)/%.o : %.c $(LIBPROFILE_OBJS)/%.o : %.c
@echo "Compiling $< [$(TYPE):profile]" @echo "Compiling $< [$(TYPE):profile]"
@$(CC) -o $(LIBPROFILE_OBJS)/$*.o -c $(CFLAGS) $< @$(CC) -o $(LIBPROFILE_OBJS)/$*.o -c $(CFLAGS) $< $(LOG_COMMAND)
$(LIBPROFILE_OBJS)/%.o : %.S $(LIBPROFILE_OBJS)/%.o : %.S
@echo "Assembling $< [$(TYPE):profile]" @echo "Assembling $< [$(TYPE):profile]"
@$(CC) -o $(LIBPROFILE_OBJS)/$*.o -Wa,-mregnames -c $(CFLAGS) $< @$(CC) -o $(LIBPROFILE_OBJS)/$*.o -Wa,-mregnames -c $(CFLAGS) $< $(LOG_COMMAND)
############################################################################## ##############################################################################
@@ -912,7 +914,9 @@ all: \
# Delete all object files and libraries # Delete all object files and libraries
clean: clean:
-$(DELETE) $(STARTUPS) lib small_data large_data large_data_softfloat baserel -$(DELETE) $(STARTUPS) lib \
small_data large_data large_data_softfloat baserel \
compiler.log
############################################################################## ##############################################################################
@@ -1118,47 +1122,47 @@ $(LIBC_OBJS)/stdlib_red_black.o : stdlib_red_black.c stdlib_memory.h
# or at least those which use memory allocation functionality. # or at least those which use memory allocation functionality.
$(LIBC_OBJS)/stdlib_alloca_debug.o : stdlib_alloca.c $(LIBC_OBJS)/stdlib_alloca_debug.o : stdlib_alloca.c
@echo "Compiling $< [$(TYPE):c debug]" @echo "Compiling $< [$(TYPE):c debug]"
@$(CC) -o $(LIBC_OBJS)/stdlib_alloca_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdlib_alloca.c @$(CC) -o $(LIBC_OBJS)/stdlib_alloca_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdlib_alloca.c $(LOG_COMMAND)
$(LIBC_OBJS)/stdlib_calloc_debug.o : stdlib_calloc.c $(LIBC_OBJS)/stdlib_calloc_debug.o : stdlib_calloc.c
@echo "Compiling $< [$(TYPE):c debug]" @echo "Compiling $< [$(TYPE):c debug]"
@$(CC) -o $(LIBC_OBJS)/stdlib_calloc_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdlib_calloc.c @$(CC) -o $(LIBC_OBJS)/stdlib_calloc_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdlib_calloc.c $(LOG_COMMAND)
$(LIBC_OBJS)/stdlib_free_debug.o : stdlib_free.c $(LIBC_OBJS)/stdlib_free_debug.o : stdlib_free.c
@echo "Compiling $< [$(TYPE):c debug]" @echo "Compiling $< [$(TYPE):c debug]"
@$(CC) -o $(LIBC_OBJS)/stdlib_free_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdlib_free.c @$(CC) -o $(LIBC_OBJS)/stdlib_free_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdlib_free.c $(LOG_COMMAND)
$(LIBC_OBJS)/stdlib_malloc_debug.o : stdlib_malloc.c $(LIBC_OBJS)/stdlib_malloc_debug.o : stdlib_malloc.c
@echo "Compiling $< [$(TYPE):c debug]" @echo "Compiling $< [$(TYPE):c debug]"
@$(CC) -o $(LIBC_OBJS)/stdlib_malloc_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdlib_malloc.c @$(CC) -o $(LIBC_OBJS)/stdlib_malloc_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdlib_malloc.c $(LOG_COMMAND)
$(LIBC_OBJS)/stdlib_realloc_debug.o : stdlib_realloc.c $(LIBC_OBJS)/stdlib_realloc_debug.o : stdlib_realloc.c
@echo "Compiling $< [$(TYPE):c debug]" @echo "Compiling $< [$(TYPE):c debug]"
@$(CC) -o $(LIBC_OBJS)/stdlib_realloc_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdlib_realloc.c @$(CC) -o $(LIBC_OBJS)/stdlib_realloc_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdlib_realloc.c $(LOG_COMMAND)
$(LIBC_OBJS)/stdio_vasprintf_hook_entry_debug.o : stdio_vasprintf_hook_entry.c $(LIBC_OBJS)/stdio_vasprintf_hook_entry_debug.o : stdio_vasprintf_hook_entry.c
@echo "Compiling $< [$(TYPE):c debug]" @echo "Compiling $< [$(TYPE):c debug]"
@$(CC) -o $(LIBC_OBJS)/stdio_vasprintf_hook_entry_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdio_vasprintf_hook_entry.c @$(CC) -o $(LIBC_OBJS)/stdio_vasprintf_hook_entry_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdio_vasprintf_hook_entry.c $(LOG_COMMAND)
$(LIBC_OBJS)/stdio_vasprintf_debug.o : stdio_vasprintf.c $(LIBC_OBJS)/stdio_vasprintf_debug.o : stdio_vasprintf.c
@echo "Compiling $< [$(TYPE):c debug]" @echo "Compiling $< [$(TYPE):c debug]"
@$(CC) -o $(LIBC_OBJS)/stdio_vasprintf_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdio_vasprintf.c @$(CC) -o $(LIBC_OBJS)/stdio_vasprintf_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdio_vasprintf.c $(LOG_COMMAND)
$(LIBM_OBJS)/stdio_vasprintf_debug.o : stdio_vasprintf.c $(LIBM_OBJS)/stdio_vasprintf_debug.o : stdio_vasprintf.c
@echo "Compiling $< [$(TYPE):m debug]" @echo "Compiling $< [$(TYPE):m debug]"
@$(CC) -o $(LIBM_OBJS)/stdio_vasprintf_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG $(FLOAT_TYPE) stdio_vasprintf.c @$(CC) -o $(LIBM_OBJS)/stdio_vasprintf_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG $(FLOAT_TYPE) stdio_vasprintf.c $(LOG_COMMAND)
$(LIBC_OBJS)/string_strdup_debug.o : string_strdup.c $(LIBC_OBJS)/string_strdup_debug.o : string_strdup.c
@echo "Compiling $< [$(TYPE):c debug]" @echo "Compiling $< [$(TYPE):c debug]"
@$(CC) -o $(LIBC_OBJS)/string_strdup_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG string_strdup.c @$(CC) -o $(LIBC_OBJS)/string_strdup_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG string_strdup.c $(LOG_COMMAND)
$(LIBC_OBJS)/unistd_getcwd_debug.o : unistd_getcwd.c $(LIBC_OBJS)/unistd_getcwd_debug.o : unistd_getcwd.c
@echo "Compiling $< [$(TYPE):c debug]" @echo "Compiling $< [$(TYPE):c debug]"
@$(CC) -o $(LIBC_OBJS)/unistd_getcwd_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG unistd_getcwd.c @$(CC) -o $(LIBC_OBJS)/unistd_getcwd_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG unistd_getcwd.c $(LOG_COMMAND)
$(LIBUNIX_OBJS)/unistd_getcwd_debug.o : unistd_getcwd.c $(LIBUNIX_OBJS)/unistd_getcwd_debug.o : unistd_getcwd.c
@echo "Compiling $< [$(TYPE):unix debug]" @echo "Compiling $< [$(TYPE):unix debug]"
@$(CC) -o $(LIBUNIX_OBJS)/unistd_getcwd_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG -DUNIX_PATH_SEMANTICS unistd_getcwd.c @$(CC) -o $(LIBUNIX_OBJS)/unistd_getcwd_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG -DUNIX_PATH_SEMANTICS unistd_getcwd.c $(LOG_COMMAND)
############################################################################## ##############################################################################
@@ -1242,28 +1246,28 @@ $(LIBPROFILE_OBJS)/libprofile.a : $(LIBPROFILE_OBJS) $(foreach file,$(PROFILE_LI
# Individual build rules for the startup code. # Individual build rules for the startup code.
crt0.o : crt0.S crt0.o : crt0.S
@echo "Assembling $<" @echo "Assembling $<"
@$(CC) -Wa,-mregnames -o crt0.o -c crt0.S @$(CC) -Wa,-mregnames -o crt0.o -c crt0.S $(LOG_COMMAND)
small_data/crt0.o : crt0.S small_data/crt0.o : crt0.S
@echo "Assembling $<" @echo "Assembling $<"
@$(CC) -DSMALL_DATA -Wa,-mregnames -o small_data/crt0.o -c crt0.S @$(CC) -DSMALL_DATA -Wa,-mregnames -o small_data/crt0.o -c crt0.S $(LOG_COMMAND)
small_data/crtbegin.o : crtbegin.c small_data/crtbegin.o : crtbegin.c
@echo "Assembling $<" @echo "Assembling $<"
@$(CC) -o small_data/crtbegin.o -c $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(INCLUDES) -msdata=sysv -DSMALL_DATA crtbegin.c @$(CC) -o small_data/crtbegin.o -c $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(INCLUDES) -msdata=sysv -DSMALL_DATA crtbegin.c $(LOG_COMMAND)
small_data/crtend.o : crtend.c small_data/crtend.o : crtend.c
@echo "Assembling $<" @echo "Assembling $<"
@$(CC) -o small_data/crtend.o -c $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(INCLUDES) -msdata=sysv -DSMALL_DATA crtend.c @$(CC) -o small_data/crtend.o -c $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(INCLUDES) -msdata=sysv -DSMALL_DATA crtend.c $(LOG_COMMAND)
baserel/crt0.o : crt0.S baserel/crt0.o : crt0.S
@echo "Assembling $<" @echo "Assembling $<"
@$(CC) -Wa,-mregnames -o baserel/crt0.o -mbaserel -DBASEREL_DATA -c crt0.S @$(CC) -Wa,-mregnames -o baserel/crt0.o -mbaserel -DBASEREL_DATA -c crt0.S $(LOG_COMMAND)
baserel/crtbegin.o : crtbegin.c baserel/crtbegin.o : crtbegin.c
@echo "Assembling $<" @echo "Assembling $<"
@$(CC) -o baserel/crtbegin.o -c $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(INCLUDES) -mbaserel -DBASEREL_DATA crtbegin.c @$(CC) -o baserel/crtbegin.o -c $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(INCLUDES) -mbaserel -DBASEREL_DATA crtbegin.c $(LOG_COMMAND)
baserel/crtend.o : crtend.c baserel/crtend.o : crtend.c
@echo "Assembling $<" @echo "Assembling $<"
@$(CC) -o baserel/crtend.o -c $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(INCLUDES) -mbaserel -DBASEREL_DATA crtend.c @$(CC) -o baserel/crtend.o -c $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(INCLUDES) -mbaserel -DBASEREL_DATA crtend.c $(LOG_COMMAND)

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: amiga_argarrayinit.c,v 1.2 2005-01-02 09:07:06 obarthel Exp $ * $Id: amiga_argarrayinit.c,v 1.3 2005-10-27 08:58:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -61,11 +61,11 @@ struct DiskObject * CXLIB_disko;
STRPTR * STRPTR *
ArgArrayInit(LONG argc, CONST_STRPTR * argv) ArgArrayInit(LONG argc, CONST_STRPTR * argv)
{ {
unsigned char ** result = NULL; STRPTR * result = NULL;
if(argc != 0) /* run from CLI */ if(argc != 0) /* run from CLI */
{ {
int i; LONG i;
if(argc == 1) if(argc == 1)
goto out; /* skip command name */ goto out; /* skip command name */

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: dirent_readdir.c,v 1.7 2005-02-03 16:56:15 obarthel Exp $ * $Id: dirent_readdir.c,v 1.8 2005-10-27 08:58:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -96,7 +96,7 @@ readdir(DIR * directory_pointer)
if(dh->dh_VolumeNode == NULL && NOT IsListEmpty((struct List *)&dh->dh_VolumeList)) if(dh->dh_VolumeNode == NULL && NOT IsListEmpty((struct List *)&dh->dh_VolumeList))
dh->dh_VolumeNode = (struct Node *)dh->dh_VolumeList.mlh_Head; dh->dh_VolumeNode = (struct Node *)dh->dh_VolumeList.mlh_Head;
strcpy(name,"\1:"); /* BSTR for ":" */ strcpy((char *)name,"\1:"); /* BSTR for ":" */
while(result == NULL && dh->dh_VolumeNode != NULL && dh->dh_VolumeNode->ln_Succ != NULL) while(result == NULL && dh->dh_VolumeNode != NULL && dh->dh_VolumeNode->ln_Succ != NULL)
{ {

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_acos.c,v 1.5 2005-02-25 10:14:21 obarthel Exp $ * $Id: math_acos.c,v 1.6 2005-10-27 08:58:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -153,7 +153,7 @@ qS2 = 2.02094576023350569471e+00, /* 0x40002AE5, 0x9C598AC8 */
qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */ qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */
qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */ qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */
INLINE STATIC const double INLINE STATIC double
__acos(double x) __acos(double x)
{ {
double z,p,q,r,w,s,c,df; double z,p,q,r,w,s,c,df;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_asin.c,v 1.5 2005-02-25 10:14:21 obarthel Exp $ * $Id: math_asin.c,v 1.6 2005-10-27 08:58:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -156,7 +156,7 @@ qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */
qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */ qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */
INLINE STATIC const double INLINE STATIC double
__asin(double x) __asin(double x)
{ {
double t,w,p,q,c,r,s; double t,w,p,q,c,r,s;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_atan.c,v 1.3 2005-02-25 10:14:21 obarthel Exp $ * $Id: math_atan.c,v 1.4 2005-10-27 08:58:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -169,7 +169,7 @@ static const double
one = 1.0, one = 1.0,
huge = 1.0e300; huge = 1.0e300;
INLINE STATIC const double INLINE STATIC double
__atan(double x) __atan(double x)
{ {
double w,s1,s2,z; double w,s1,s2,z;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_atan2.c,v 1.6 2005-02-25 10:14:21 obarthel Exp $ * $Id: math_atan2.c,v 1.7 2005-10-27 08:58:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -209,7 +209,7 @@ pi_o_2 = 1.5707963267948965580E+00, /* 0x3FF921FB, 0x54442D18 */
pi = 3.1415926535897931160E+00, /* 0x400921FB, 0x54442D18 */ pi = 3.1415926535897931160E+00, /* 0x400921FB, 0x54442D18 */
pi_lo = 1.2246467991473531772E-16; /* 0x3CA1A626, 0x33145C07 */ pi_lo = 1.2246467991473531772E-16; /* 0x3CA1A626, 0x33145C07 */
INLINE STATIC const double INLINE STATIC double
__atan2(double y,double x) __atan2(double y,double x)
{ {
double z; double z;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_ceil.c,v 1.4 2005-02-25 10:14:21 obarthel Exp $ * $Id: math_ceil.c,v 1.5 2005-10-27 08:58:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -152,7 +152,7 @@ __ceil(double x)
static const double huge = 1.0e300; static const double huge = 1.0e300;
INLINE STATIC const double INLINE STATIC double
__ceil(double x) __ceil(double x)
{ {
int i0,i1,j0; int i0,i1,j0;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_cos.c,v 1.4 2005-02-25 10:14:21 obarthel Exp $ * $Id: math_cos.c,v 1.5 2005-10-27 08:58:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -137,7 +137,7 @@ __cos(double x)
#if defined(PPC_FLOATING_POINT_SUPPORT) #if defined(PPC_FLOATING_POINT_SUPPORT)
INLINE STATIC const double INLINE STATIC double
__cos(double x) __cos(double x)
{ {
double y[2],z=0.0; double y[2],z=0.0;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_cosh.c,v 1.3 2005-02-25 10:14:21 obarthel Exp $ * $Id: math_cosh.c,v 1.4 2005-10-27 08:58:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -139,7 +139,7 @@ __cosh(double x)
static const double one = 1.0, half=0.5, huge = 1.0e300; static const double one = 1.0, half=0.5, huge = 1.0e300;
INLINE STATIC const double INLINE STATIC double
__cosh(double x) __cosh(double x)
{ {
double t,w; double t,w;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_exp.c,v 1.4 2005-02-25 10:14:21 obarthel Exp $ * $Id: math_exp.c,v 1.5 2005-10-27 08:58:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -155,7 +155,7 @@ P3 = 6.61375632143793436117e-05, /* 0x3F11566A, 0xAF25DE2C */
P4 = -1.65339022054652515390e-06, /* 0xBEBBBD41, 0xC5D26BF1 */ P4 = -1.65339022054652515390e-06, /* 0xBEBBBD41, 0xC5D26BF1 */
P5 = 4.13813679705723846039e-08; /* 0x3E663769, 0x72BEA4D0 */ P5 = 4.13813679705723846039e-08; /* 0x3E663769, 0x72BEA4D0 */
INLINE STATIC const double INLINE STATIC double
__exp(double x) __exp(double x)
{ {
double y,hi,lo,c,t; double y,hi,lo,c,t;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_fabs.c,v 1.6 2005-02-25 10:14:21 obarthel Exp $ * $Id: math_fabs.c,v 1.7 2005-10-27 08:58:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -134,7 +134,7 @@ __fabs(double x)
/****************************************************************************/ /****************************************************************************/
INLINE STATIC const double INLINE STATIC double
__fabs(double x) __fabs(double x)
{ {
double res; double res;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_fabsf.c,v 1.1 2005-05-08 08:51:29 obarthel Exp $ * $Id: math_fabsf.c,v 1.2 2005-10-27 08:58:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -108,7 +108,7 @@ __fabsf(float x)
/****************************************************************************/ /****************************************************************************/
INLINE STATIC const float INLINE STATIC float
__fabsf(float number) __fabsf(float number)
{ {
union ieee_single x; union ieee_single x;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_floor.c,v 1.3 2005-02-25 10:14:21 obarthel Exp $ * $Id: math_floor.c,v 1.4 2005-10-27 08:58:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -153,7 +153,8 @@ __floor(double x)
#if defined(PPC_FLOATING_POINT_SUPPORT) #if defined(PPC_FLOATING_POINT_SUPPORT)
static const double huge = 1.0e300; static const double huge = 1.0e300;
INLINE STATIC const double
INLINE STATIC double
__floor(double x) __floor(double x)
{ {
int i0,i1,j0; int i0,i1,j0;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_fmod.c,v 1.5 2005-02-25 10:14:21 obarthel Exp $ * $Id: math_fmod.c,v 1.6 2005-10-27 08:58:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -102,7 +102,7 @@ static const double
one = 1.0, one = 1.0,
Zero[] = {0.0, -0.0,}; Zero[] = {0.0, -0.0,};
INLINE STATIC const double INLINE STATIC double
__fmod(double x,double y) __fmod(double x,double y)
{ {
int n,hx,hy,hz,ix,iy,sx,i; int n,hx,hy,hz,ix,iy,sx,i;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_frexp.c,v 1.4 2005-02-25 10:14:21 obarthel Exp $ * $Id: math_frexp.c,v 1.5 2005-10-27 08:58:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -146,7 +146,7 @@ __frexp(double x,int * nptr)
static const double static const double
two54 = 1.80143985094819840000e+16; /* 0x43500000, 0x00000000 */ two54 = 1.80143985094819840000e+16; /* 0x43500000, 0x00000000 */
INLINE STATIC const double INLINE STATIC double
__frexp(double x,int * eptr) __frexp(double x,int * eptr)
{ {
int hx, ix, lx; int hx, ix, lx;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_hypot.c,v 1.4 2005-10-11 19:05:18 theantony Exp $ * $Id: math_hypot.c,v 1.5 2005-10-27 08:58:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -85,7 +85,7 @@ __hypot(double x,double y)
static const double one = 1.0; static const double one = 1.0;
INLINE STATIC const double INLINE STATIC double
__hypot(double x,double y) __hypot(double x,double y)
{ {
double a=x,b=y,t1,t2,y1,y2,w; double a=x,b=y,t1,t2,y1,y2,w;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_kernel_rem_pio2.c,v 1.3 2005-02-25 10:14:21 obarthel Exp $ * $Id: math_kernel_rem_pio2.c,v 1.4 2005-10-27 08:58:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -329,6 +329,8 @@ int __rem_pio2(double x, double *y)
if(ix>=0x7ff00000) { /* x is inf or NaN */ if(ix>=0x7ff00000) { /* x is inf or NaN */
y[0]=y[1]=x-x; return 0; y[0]=y[1]=x-x; return 0;
} }
/* keep the compiler happy */
z = 0;
/* set z = __scalbn(|x|,ilogb(x)-23) */ /* set z = __scalbn(|x|,ilogb(x)-23) */
GET_LOW_WORD(low,x); GET_LOW_WORD(low,x);
SET_LOW_WORD(z,low); SET_LOW_WORD(z,low);

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_log.c,v 1.7 2005-08-26 12:39:33 obarthel Exp $ * $Id: math_log.c,v 1.8 2005-10-27 08:58:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -150,7 +150,7 @@ Lg6 = 1.531383769920937332e-01, /* 3FC39A09 D078C69F */
Lg7 = 1.479819860511658591e-01, /* 3FC2F112 DF3E5244 */ Lg7 = 1.479819860511658591e-01, /* 3FC2F112 DF3E5244 */
zero = 0.0; zero = 0.0;
INLINE STATIC const double INLINE STATIC double
__log(double x) __log(double x)
{ {
double hfsq,f,s,z,R,w,t1,t2,dk; double hfsq,f,s,z,R,w,t1,t2,dk;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_log10.c,v 1.6 2005-08-26 12:39:33 obarthel Exp $ * $Id: math_log10.c,v 1.7 2005-10-27 08:58:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -144,7 +144,7 @@ log10_2hi = 3.01029995663611771306e-01, /* 0x3FD34413, 0x509F6000 */
log10_2lo = 3.69423907715893078616e-13, /* 0x3D59FEF3, 0x11F12B36 */ log10_2lo = 3.69423907715893078616e-13, /* 0x3D59FEF3, 0x11F12B36 */
zero = 0.0; zero = 0.0;
INLINE STATIC const double INLINE STATIC double
__log10(double x) __log10(double x)
{ {
double y,z; double y,z;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_logb.c,v 1.7 2005-08-26 12:39:33 obarthel Exp $ * $Id: math_logb.c,v 1.8 2005-10-27 08:58:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -70,7 +70,7 @@ __logb(double x)
#if defined(PPC_FLOATING_POINT_SUPPORT) #if defined(PPC_FLOATING_POINT_SUPPORT)
INLINE STATIC const double INLINE STATIC double
__logb(double x) __logb(double x)
{ {
unsigned int lx,ix; unsigned int lx,ix;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_lround.c,v 1.2 2005-10-09 10:38:55 obarthel Exp $ * $Id: math_lround.c,v 1.3 2005-10-27 08:58:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -82,7 +82,7 @@ lround(double x)
result = msw >> (20 - exponent_less_1023); result = msw >> (20 - exponent_less_1023);
} }
} }
else if (exponent_less_1023 < (8 * sizeof (long int)) - 1) else if (exponent_less_1023 < (LONG)(8 * sizeof (long int)) - 1)
{ {
if (exponent_less_1023 >= 52) if (exponent_less_1023 >= 52)
result = ((long int) msw << (exponent_less_1023 - 20)) | (lsw << (exponent_less_1023 - 52)); result = ((long int) msw << (exponent_less_1023 - 20)) | (lsw << (exponent_less_1023 - 52));

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_lroundf.c,v 1.2 2005-10-09 10:38:55 obarthel Exp $ * $Id: math_lroundf.c,v 1.3 2005-10-27 08:58:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -64,7 +64,7 @@ lroundf(float x)
w &= 0x7fffff; w &= 0x7fffff;
w |= 0x800000; w |= 0x800000;
if (exponent_less_127 < (8 * sizeof (long int)) - 1) if (exponent_less_127 < (LONG)(8 * sizeof (long int)) - 1)
{ {
if (exponent_less_127 < 0) if (exponent_less_127 < 0)
return exponent_less_127 < -1 ? 0 : sign; return exponent_less_127 < -1 ? 0 : sign;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_nan.c,v 1.2 2005-05-14 10:52:31 obarthel Exp $ * $Id: math_nan.c,v 1.3 2005-10-27 08:58:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -47,7 +47,7 @@
/****************************************************************************/ /****************************************************************************/
double double
nan(const char * UNUSED tagp) nan(const char * UNUSED unused_tagp)
{ {
union ieee_double x; union ieee_double x;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_nanf.c,v 1.2 2005-05-14 10:52:31 obarthel Exp $ * $Id: math_nanf.c,v 1.3 2005-10-27 08:58:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -47,7 +47,7 @@
/****************************************************************************/ /****************************************************************************/
float float
nanf(const char * UNUSED tagp) nanf(const char * UNUSED unused_tagp)
{ {
union ieee_single x; union ieee_single x;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_pow.c,v 1.6 2005-02-25 10:14:21 obarthel Exp $ * $Id: math_pow.c,v 1.7 2005-10-27 08:58:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -208,7 +208,7 @@ ivln2 = 1.44269504088896338700e+00, /* 0x3FF71547, 0x652B82FE =1/ln2 */
ivln2_h = 1.44269502162933349609e+00, /* 0x3FF71547, 0x60000000 =24b 1/ln2*/ ivln2_h = 1.44269502162933349609e+00, /* 0x3FF71547, 0x60000000 =24b 1/ln2*/
ivln2_l = 1.92596299112661746887e-08; /* 0x3E54AE0B, 0xF85DDF44 =1/ln2 tail*/ ivln2_l = 1.92596299112661746887e-08; /* 0x3E54AE0B, 0xF85DDF44 =1/ln2 tail*/
INLINE STATIC const double INLINE STATIC double
__pow(double x,double y) __pow(double x,double y)
{ {
double z,ax,z_h,z_l,p_h,p_l; double z,ax,z_h,z_l,p_h,p_l;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_sin.c,v 1.3 2005-02-25 10:14:21 obarthel Exp $ * $Id: math_sin.c,v 1.4 2005-10-27 08:58:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -137,7 +137,7 @@ __sin(double x)
#if defined(PPC_FLOATING_POINT_SUPPORT) #if defined(PPC_FLOATING_POINT_SUPPORT)
INLINE STATIC const double INLINE STATIC double
__sin(double x) __sin(double x)
{ {
double y[2],z=0.0; double y[2],z=0.0;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_sinh.c,v 1.3 2005-02-25 10:14:21 obarthel Exp $ * $Id: math_sinh.c,v 1.4 2005-10-27 08:58:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -139,7 +139,7 @@ __sinh(double x)
static const double one = 1.0, shuge = 1.0e307; static const double one = 1.0, shuge = 1.0e307;
INLINE STATIC const double INLINE STATIC double
__sinh(double x) __sinh(double x)
{ {
double t,w,h; double t,w,h;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_sqrt.c,v 1.6 2005-02-25 10:14:21 obarthel Exp $ * $Id: math_sqrt.c,v 1.7 2005-10-27 08:58:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -139,7 +139,7 @@ __sqrt(double x)
static const double one = 1.0, tiny=1.0e-300; static const double one = 1.0, tiny=1.0e-300;
INLINE STATIC const double INLINE STATIC double
__sqrt(double x) __sqrt(double x)
{ {
double z; double z;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_tan.c,v 1.3 2005-02-25 10:14:21 obarthel Exp $ * $Id: math_tan.c,v 1.4 2005-10-27 08:58:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -137,7 +137,7 @@ __tan(double x)
#if defined(PPC_FLOATING_POINT_SUPPORT) #if defined(PPC_FLOATING_POINT_SUPPORT)
INLINE STATIC const double INLINE STATIC double
__tan(double x) __tan(double x)
{ {
double y[2],z=0.0; double y[2],z=0.0;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_tanh.c,v 1.3 2005-02-25 10:14:21 obarthel Exp $ * $Id: math_tanh.c,v 1.4 2005-10-27 08:58:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -139,7 +139,7 @@ __tanh(double x)
static const double one=1.0, two=2.0, tiny = 1.0e-300; static const double one=1.0, two=2.0, tiny = 1.0e-300;
INLINE STATIC const double INLINE STATIC double
__tanh(double x) __tanh(double x)
{ {
double t,z; double t,z;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: socket_ioctl.c,v 1.9 2005-10-09 12:32:18 obarthel Exp $ * $Id: socket_ioctl.c,v 1.10 2005-10-27 08:58:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -91,14 +91,14 @@ ioctl(int sockfd,int request, ... /* char *arg */)
{ {
int * option = (int *)param; int * option = (int *)param;
if(request == FIONBIO) if(request == (unsigned int)FIONBIO)
{ {
if((*option) != 0) if((*option) != 0)
SET_FLAG(fd->fd_Flags,FDF_NON_BLOCKING); SET_FLAG(fd->fd_Flags,FDF_NON_BLOCKING);
else else
CLEAR_FLAG(fd->fd_Flags,FDF_NON_BLOCKING); CLEAR_FLAG(fd->fd_Flags,FDF_NON_BLOCKING);
} }
else if (request == FIOASYNC) else if (request == (unsigned int)FIOASYNC)
{ {
if((*option) != 0) if((*option) != 0)
SET_FLAG(fd->fd_Flags,FDF_ASYNC_IO); SET_FLAG(fd->fd_Flags,FDF_ASYNC_IO);

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: stdio_record_locking.c,v 1.13 2005-04-25 15:39:56 obarthel Exp $ * $Id: stdio_record_locking.c,v 1.14 2005-10-27 08:58:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -462,7 +462,7 @@ create_file_lock_node(struct fd * fd,struct FileLockNode ** result_ptr)
goto out; goto out;
} }
strcpy(fln->fln_FileName,fib->fib_FileName); strcpy((char *)fln->fln_FileName,fib->fib_FileName);
NewList((struct List *)&fln->fln_LockedRegionList); NewList((struct List *)&fln->fln_LockedRegionList);
@@ -523,7 +523,7 @@ find_file_lock_node_by_drawer_and_name(
if(status == LOCK_SAME) if(status == LOCK_SAME)
{ {
if(Stricmp(fln->fln_FileName,file_name) == SAME) if(Stricmp((STRPTR)fln->fln_FileName,file_name) == SAME)
{ {
error = OK; error = OK;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: stdlib_arg.c,v 1.8 2005-07-03 10:36:47 obarthel Exp $ * $Id: stdlib_arg.c,v 1.9 2005-10-27 08:58:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -135,7 +135,7 @@ ARG_CONSTRUCTOR(arg_init)
while(is_space(*arg_str)) while(is_space(*arg_str))
arg_str++; arg_str++;
arg_len = strlen(arg_str); arg_len = strlen((char *)arg_str);
while(arg_len > 0 && is_space(arg_str[arg_len - 1])) while(arg_len > 0 && is_space(arg_str[arg_len - 1]))
arg_len--; arg_len--;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: stdlib_main.c,v 1.27 2005-09-28 10:28:38 obarthel Exp $ * $Id: stdlib_main.c,v 1.28 2005-10-27 08:58:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -501,7 +501,7 @@ _main(void)
tags[i]. ti_Tag = NP_StackSize; tags[i]. ti_Tag = NP_StackSize;
tags[i++]. ti_Data = stack_size; tags[i++]. ti_Data = stack_size;
tags[i]. ti_Tag = NP_Name; tags[i]. ti_Tag = NP_Name;
tags[i++]. ti_Data = (ULONG)(__process_name != NULL ? (UBYTE *)__process_name : FilePart(program_name)); tags[i++]. ti_Data = (ULONG)(__process_name != NULL ? __process_name : FilePart(program_name));
tags[i]. ti_Tag = NP_CommandName; tags[i]. ti_Tag = NP_CommandName;
tags[i++]. ti_Data = (ULONG)FilePart(program_name); tags[i++]. ti_Data = (ULONG)FilePart(program_name);
tags[i]. ti_Tag = NP_Cli; tags[i]. ti_Tag = NP_Cli;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: stdlib_malloc.c,v 1.13 2005-07-03 10:36:47 obarthel Exp $ * $Id: stdlib_malloc.c,v 1.14 2005-10-27 08:58:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -94,7 +94,7 @@ __get_allocation_size(size_t size)
/****************************************************************************/ /****************************************************************************/
void * void *
__allocate_memory(size_t size,BOOL never_free,const char * UNUSED file,int UNUSED line) __allocate_memory(size_t size,BOOL never_free,const char * UNUSED unused_file,int UNUSED unused_line)
{ {
struct MemoryNode * mn; struct MemoryNode * mn;
size_t allocation_size; size_t allocation_size;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: termios_headers.h,v 1.1 2005-06-04 10:46:21 obarthel Exp $ * $Id: termios_headers.h,v 1.2 2005-10-27 08:58:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -51,6 +51,7 @@
extern int __termios_console_hook(struct fd *,struct file_action_message *); extern int __termios_console_hook(struct fd *,struct file_action_message *);
extern int __termios_serial_hook(struct fd *,struct file_action_message *); extern int __termios_serial_hook(struct fd *,struct file_action_message *);
extern struct termios *__get_termios(struct fd *); extern struct termios *__get_termios(struct fd *);
extern int openserial(const char *device_name,int unit,int mode);
/****************************************************************************/ /****************************************************************************/