From 259ca4539ee8f4a54e1caa97bcfd000c442ab0d6 Mon Sep 17 00:00:00 2001 From: Aditya Upadhyay Date: Thu, 20 Jul 2017 13:33:28 +0530 Subject: [PATCH 1/6] importing of imaxabs inttypes method from FreeBSD. --- newlib/libc/stdlib/Makefile.am | 6 ++---- newlib/libc/stdlib/imaxabs.c | 5 ++--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/newlib/libc/stdlib/Makefile.am b/newlib/libc/stdlib/Makefile.am index 6cca5f005..d97b0250c 100644 --- a/newlib/libc/stdlib/Makefile.am +++ b/newlib/libc/stdlib/Makefile.am @@ -34,7 +34,6 @@ GENERAL_SOURCES = \ getenv_r.c \ itoa.c \ imaxabs.c \ - imaxdiv.c \ labs.c \ ldiv.c \ ldtoa.c \ @@ -59,7 +58,6 @@ GENERAL_SOURCES = \ sb_charsets.c \ strtod.c \ strtodg.c \ - strtoimax.c \ strtol.c \ strtorx.c \ strtoul.c \ @@ -70,8 +68,8 @@ GENERAL_SOURCES = \ wcstombs.c \ wcstombs_r.c \ wctomb.c \ - wctomb_r.c - + wctomb_r.c \ + if HAVE_LONG_DOUBLE GENERAL_SOURCES += \ strtold.c \ diff --git a/newlib/libc/stdlib/imaxabs.c b/newlib/libc/stdlib/imaxabs.c index 0c76e0cbe..e43864606 100644 --- a/newlib/libc/stdlib/imaxabs.c +++ b/newlib/libc/stdlib/imaxabs.c @@ -25,11 +25,10 @@ */ #include -__FBSDID("$FreeBSD$"); +__FBSDID("$FreeBSD: head/lib/libc/stdlib/imaxabs.c 86368 2001-11-15 02:05:03Z mike $"); -#include #include - +#include intmax_t imaxabs(intmax_t j) { -- 2.11.0