Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2009-07-09 00:54:19 +0400
committerDJ Delorie <dj@redhat.com>2009-07-09 00:54:19 +0400
commitfe589604cb1ed4667e3a217ea1a1c69374b8d9b1 (patch)
tree451957e17aad824ee3665d255ec28fe731eae194 /libgloss
parent97bef5b7fd4a21a3655870220fb0886cea3f3f42 (diff)
* m32c/sbrk.c (sbrk): Change to take ptrdiff_t, not int.
Diffstat (limited to 'libgloss')
-rw-r--r--libgloss/ChangeLog4
-rw-r--r--libgloss/m32c/sbrk.c10
2 files changed, 13 insertions, 1 deletions
diff --git a/libgloss/ChangeLog b/libgloss/ChangeLog
index cc9cfd312..bb30152c7 100644
--- a/libgloss/ChangeLog
+++ b/libgloss/ChangeLog
@@ -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()
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;