OSDN Git Service

* m32c/sbrk.c (sbrk): Change to take ptrdiff_t, not int.
authordj <dj>
Wed, 8 Jul 2009 20:54:19 +0000 (20:54 +0000)
committerdj <dj>
Wed, 8 Jul 2009 20:54:19 +0000 (20:54 +0000)
libgloss/ChangeLog
libgloss/m32c/sbrk.c

index cc9cfd3..bb30152 100644 (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()
index 69375aa..8db42a9 100644 (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;