2.4.0-test10-pre6: Use of abs()

Horst von Brand
2000-10-28T20:38:26Z

Red Hat 7.0, i686, gcc-20001027 (Yes, I know. Just to flush out bugs on
both sides).

abs() is used at least in:

arch/i386/kernel/time.c
drivers/md/raid1.c
drivers/sound/sb_ess.c

gcc warns about use of a non-declared function each time.

No definition for the function is to be found (grep over all include/ comes
up clean, except for extern definitions in asm-{mips,ppc}; ditto for lib/).
Presumably gcc is using a builtin (it doesn't show up in System.map). Is
this the desired state of affairs? Should a include/linux/stdlib.h be
added, containing (for now, to be expanded later as needed, like
include/linux/stddef.h):

#ifndef _LINUX_STDLIB_H
#define _LINUX_STDLIB_H

extern int abs(int);

#endif
--
Horst von Brand vonbrand@sleipnir.valparaiso.cl
Casilla 9G, Vin~a del Mar, Chile +56 32 672616