This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch] ../../../src/libgfortran/io/write.c:713: error: conflicting types for 'itoa'

This change
2009-04-08  Janne Blomqvist  <>
        * io/write.c (itoa): Move from runtime/error.c:gfc_itoa, rename,
        make static.

breaks gfortran build on on mingw32.
mingw32 declares an external function 'itoa'  with conficting
prototype in <stdlib.h>

Renaming  itoa back to gfc_itoa and adjusting callers  fixes.


2009-04-13  Danny Smith  <>

 	* io/write.c (itoa) : Rename back to gfc_itoa.
	(write_i): Adjust call to write_decimal.
	(write_integer):  Use gfc_itoa.

Index: io/write.c
--- io/write.c	(revision 145949)
+++ io/write.c	(working copy)
@@ -707,10 +707,10 @@

-/* itoa()-- Integer to decimal conversion. */
+/* gfc_itoa()-- Integer to decimal conversion. */

 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 +747,7 @@
 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 +862,7 @@
   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)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]