* m32c/sbrk.c (sbrk): Change to take ptrdiff_t, not int.

This commit is contained in:
DJ Delorie 2009-07-08 20:54:19 +00:00
parent 97bef5b7fd
commit fe589604cb
2 changed files with 13 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2009-07-08 DJ Delorie <dj@redhat.com>
* m32c/sbrk.c (sbrk): Change to take ptrdiff_t, not int.
2009-07-01 Anthony Green <green@moxielogic.com>
* moxie/crt0.S (_start): Clear BSS at startup. Register _fini()

View File

@ -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;