CVS: msp430-libc4/src/stdlib _init_section__.c,1.1.1.1,1.2 itoa.c,1.2,1.3 ltoa.c,1.2,1.3 ultoa.c,1.2,1.3 utoa.c,1.2,1.3
Peter <[email protected]>
| Newsgroups | gmane.comp.hardware.texas-instruments.msp430.gcc.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/mspgcc/msp430-libc4/src/stdlib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14802/src/stdlib
Modified Files:
_init_section__.c itoa.c ltoa.c ultoa.c utoa.c
Log Message:
changes for gcc-4.0.2
Index: _init_section__.c
===================================================================
RCS file: /cvsroot/mspgcc/msp430-libc4/src/stdlib/_init_section__.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -w -d -r1.1.1.1 -r1.2
--- _init_section__.c 29 Aug 2005 16:48:48 -0000 1.1.1.1
+++ _init_section__.c 28 Jan 2006 10:13:33 -0000 1.2
@@ -33,30 +33,31 @@
int _init_section__(int section)
{
- uint16_t start, stop, size, stack, ret = 0;
- void *from, *where;
+ uint16_t size, stack, ret = 0;
+ void *start, *stop;
+ char *from, *where;
if(section == MSP430_SECTION_BSS)
{
- (uint16_t *)start = &__bss_start;
- (uint16_t *)stop = &__bss_end;
+ start = &__bss_start;
+ stop = &__bss_end;
bzero(&__bss_start,stop-start);
return ret;
}
else if(section == MSP430_SECTION_DATA)
{
- (uint16_t *)start = &__data_start_rom;
- (uint16_t *)stop = &_edata;
- from = (void *)&_etext;
- where = (void *)&__data_start;
+ start = &__data_start_rom;
+ stop = &_edata;
+ from = (char *)&_etext;
+ where = (char *)&__data_start;
size = ret = stop - start;
}
else if(section == MSP430_SECTION_NOINIT)
{
- (uint16_t *)start = &__noinit_start_rom;
- (uint16_t *)stop = &__noinit_end_rom;
- from = (void *)&__noinit_start_rom;
- where = (void *)&__bss_end;
+ start = &__noinit_start_rom;
+ stop = &__noinit_end_rom;
+ from = (char *)&__noinit_start_rom;
+ where = (char *)&__bss_end;
size = ret = stop - start;
}
else
@@ -69,7 +70,7 @@
while(size--)
{
- *((char *)where)++ = *((char *)from)++;
+ *where++ = *from++;
}
return ret;
Index: itoa.c
===================================================================
RCS file: /cvsroot/mspgcc/msp430-libc4/src/stdlib/itoa.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -d -r1.2 -r1.3
--- itoa.c 31 Aug 2005 11:41:26 -0000 1.2
+++ itoa.c 28 Jan 2006 10:13:33 -0000 1.3
@@ -24,12 +24,12 @@
//construct a backward string of the number.
do {
digit = (unsigned int)num % radix;
+ num = (unsigned int)num / radix;
if (digit < 10)
temp[temp_loc++] = digit + '0';
else
temp[temp_loc++] = digit - 10 + 'A';
- ((unsigned int)num) /= radix;
- } while ((unsigned int)num > 0);
+ } while (num != 0);
//now add the sign for radix 10
if (radix == 10 && sign) {
Index: ltoa.c
===================================================================
RCS file: /cvsroot/mspgcc/msp430-libc4/src/stdlib/ltoa.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -d -r1.2 -r1.3
--- ltoa.c 31 Aug 2005 11:41:26 -0000 1.2
+++ ltoa.c 28 Jan 2006 10:13:33 -0000 1.3
@@ -28,7 +28,7 @@
temp[temp_loc++] = digit + '0';
else
temp[temp_loc++] = digit - 10 + 'A';
- ((unsigned long)num) /= radix;
+ num = (unsigned long)num / radix;
} while ((unsigned long)num > 0);
//now add the sign for radix 10
Index: ultoa.c
===================================================================
RCS file: /cvsroot/mspgcc/msp430-libc4/src/stdlib/ultoa.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -d -r1.2 -r1.3
--- ultoa.c 31 Aug 2005 11:41:26 -0000 1.2
+++ ultoa.c 28 Jan 2006 10:13:33 -0000 1.3
@@ -21,8 +21,8 @@
temp[temp_loc++] = digit + '0';
else
temp[temp_loc++] = digit - 10 + 'A';
- ((unsigned long)num) /= radix;
- } while ((unsigned long)num > 0);
+ num = (unsigned long)num / radix;
+ } while (num != 0);
temp_loc--;
Index: utoa.c
===================================================================
RCS file: /cvsroot/mspgcc/msp430-libc4/src/stdlib/utoa.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -d -r1.2 -r1.3
--- utoa.c 31 Aug 2005 11:41:26 -0000 1.2
+++ utoa.c 28 Jan 2006 10:13:33 -0000 1.3
@@ -21,8 +21,8 @@
temp[temp_loc++] = digit + '0';
else
temp[temp_loc++] = digit - 10 + 'A';
- ((unsigned int)num) /= radix;
- } while ((unsigned int)num > 0);
+ num = (unsigned int)num / radix;
+ } while (num != 0);
temp_loc--;
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642