summaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authordannysmith <dannysmith@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-15 04:05:02 +0000
committerdannysmith <dannysmith@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-15 04:05:02 +0000
commitb3a6bae777111a70c65beff6946a75b7bf3b718b (patch)
tree4d7427e41aeb0edf46a140b03aa8960772732118 /libgfortran
parentdd2b35f146936bf0f8f723813df6cefc7bd0b92f (diff)
downloadgcc-b3a6bae777111a70c65beff6946a75b7bf3b718b.tar.gz
* io/write.c (itoa) : Rename back to gfc_itoa.
(write_i): Adjust call to write_decimal. (write_integer): Use gfc_itoa. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146079 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ChangeLog6
-rw-r--r--libgfortran/io/write.c13
2 files changed, 15 insertions, 4 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index b3fb58cb338..e0b9a2c7a52 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,9 @@
+2009-04-15 Danny Smith <dannysmith@clear.net.nz>
+
+ * io/write.c (itoa) : Rename back to gfc_itoa.
+ (write_i): Adjust call to write_decimal.
+ (write_integer): Use gfc_itoa.
+
2009-04-10 Janne Blomqvist <jb@gcc.gnu.org>
* io/io.h (move_pos_offset): Remove prototype.
diff --git a/libgfortran/io/write.c b/libgfortran/io/write.c
index 00c7208c94c..b6d6e687736 100644
--- a/libgfortran/io/write.c
+++ b/libgfortran/io/write.c
@@ -707,10 +707,15 @@ btoa (GFC_UINTEGER_LARGEST n, char *buffer, size_t len)
}
-/* itoa()-- Integer to decimal conversion. */
+/* gfc_itoa()-- Integer to decimal conversion.
+ The itoa function is a widespread non-standard extension to standard
+ C, often declared in <stdlib.h>. Even though the itoa defined here
+ is a static function we take care not to conflict with any prior
+ non-static declaration. Hence the 'gfc_' prefix, which is normally
+ reserved for functions with external linkage. */
static const char *
-itoa (GFC_INTEGER_LARGEST n, char *buffer, size_t len)
+gfc_itoa (GFC_INTEGER_LARGEST n, char *buffer, size_t len)
{
int negative;
char *p;
@@ -747,7 +752,7 @@ itoa (GFC_INTEGER_LARGEST n, char *buffer, size_t len)
void
write_i (st_parameter_dt *dtp, const fnode *f, const char *p, int len)
{
- write_decimal (dtp, f, p, len, (void *) itoa);
+ write_decimal (dtp, f, p, len, (void *) gfc_itoa);
}
@@ -862,7 +867,7 @@ write_integer (st_parameter_dt *dtp, const char *source, int length)
int width;
char itoa_buf[GFC_ITOA_BUF_SIZE];
- q = itoa (extract_int (source, length), itoa_buf, sizeof (itoa_buf));
+ q = gfc_itoa (extract_int (source, length), itoa_buf, sizeof (itoa_buf));
switch (length)
{