This is the mail archive of the
ecos-discuss@sourceware.cygnus.com
mailing list for the eCos project.
abs() defined in two places
- To: ecos-discuss at sourceware dot cygnus dot com
- Subject: [ECOS] abs() defined in two places
- From: Grant Edwards <grante at visi dot com>
- Date: Mon, 3 Apr 2000 11:39:36 -0500
It looks like my installation of the 1.3.1 headers are defining abs()
in two places: stdlib.h and libkern.h.
------------------------------testit.c------------------------------
#include <stdlib.h>
#include <network.h>
int j;
--------------------------------------------------------------------
$make
arm-elf-gcc -g -mcpu=arm7tdmi -mbig-endian -c -o testit.o -fverbose-asm -Wa,-ahlsn=testit.lst -O0 -D__ECOS -I../ecos/include -Wall testit.c
In file included from ../ecos/include/machine/param.h:91,
from ../ecos/include/sys/param.h:166,
from ../ecos/include/network.h:60,
from testit.c:2:
../ecos/include/lib/libkern/libkern.h:113: warning: static declaration for abs' follows non-static
arm-elf-gcc -g -mcpu=arm7tdmi -mbig-endian -Wl,-Map,testit.map -nostartfiles -L../ecos/lib -o testit testit.o -Ttarget.ld -nostdlib
I thought maybe I had my CFLAGS set wrong, but from looking at the include
files, I can't see anything obvious. (The program works fine, I'm just trying
to get rid of all of the compiler warnings.)
--
Grant Edwards
grante@visi.com