+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.
}
-/* 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;
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);
}
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)
{