Provide abs form stdlib.h.

Sponsored by: Netflix
This commit is contained in:
Warner Losh 2018-01-26 17:13:09 +00:00
parent 2b0268cf0d
commit 24dfa658e4
2 changed files with 6 additions and 0 deletions

View File

@ -37,6 +37,11 @@ SRCS+= bcmp.c bcopy.c bzero.c ffs.c fls.c \
qdivrem.c strcat.c strchr.c strcmp.c strcpy.c stpcpy.c stpncpy.c \
strcspn.c strlcat.c strlcpy.c strlen.c strncat.c strncmp.c strncpy.c \
strnlen.c strpbrk.c strrchr.c strsep.c strspn.c strstr.c strtok.c swab.c
# stdlib functions from libc
.PATH: ${LIBC_SRC}/stdlib
SRCS+= abs.c
.if ${MACHINE_CPUARCH} == "arm"
.PATH: ${LIBC_SRC}/arm/gen

View File

@ -347,6 +347,7 @@ extern ev_sethook_t env_noset; /* refuse set operation */
extern ev_unsethook_t env_nounset; /* refuse unset operation */
/* stdlib.h routines */
extern int abs(int a);
extern void abort(void);
/* BCD conversions (undocumented) */