From fe589604cb1ed4667e3a217ea1a1c69374b8d9b1 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Wed, 8 Jul 2009 20:54:19 +0000 Subject: * m32c/sbrk.c (sbrk): Change to take ptrdiff_t, not int. --- libgloss/m32c/sbrk.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'libgloss/m32c') diff --git a/libgloss/m32c/sbrk.c b/libgloss/m32c/sbrk.c index 69375aa42..8db42a9e6 100644 --- a/libgloss/m32c/sbrk.c +++ b/libgloss/m32c/sbrk.c @@ -32,8 +32,16 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. extern void _set_heaptop(void *ptr); +/* Normally these would be in unistd.h but we don't rely on that being + available during this build. */ +#if defined(__r8c_cpu__) || defined(__m16c_cpu__) +#define PTRDIFF_T int +#else +#define PTRDIFF_T long +#endif + char * -sbrk(int adj) +sbrk(PTRDIFF_T adj) { extern char end; static char *heap = &end; -- cgit v1.2.3