Don't define functions called itoa(), because this causes problems on platforms
authorDavid Given <dg@cowlark.com>
Sun, 23 Jul 2017 19:19:07 +0000 (21:19 +0200)
committerDavid Given <dg@cowlark.com>
Sun, 23 Jul 2017 19:19:07 +0000 (21:19 +0200)
that define itoa() in their libcs.

lang/basic/src/basic.lex
lang/basic/src/bem.h
lang/basic/src/gencode.c
lang/basic/src/util.c
lang/occam/comp/em.c

index 4eb9e16..3ee185e 100644 (file)
@@ -522,7 +522,7 @@ scanstring()
                yylval.integer= genemlabel();
                C_rom_dlb((label)i,(arith)0);
                C_rom_icon("9999",(arith)BEMINTSIZE);
-               C_rom_icon(itoa(length),(arith)BEMINTSIZE);
+               C_rom_icon(myitoa(length),(arith)BEMINTSIZE);
        }
 #ifdef YYDEBUG
        if (yydebug) print("STRVALUE found\n");
index deb6eb4..d49523c 100644 (file)
@@ -71,7 +71,7 @@ extern int    dataused;
 extern Linerecord *currline;
 
 
-extern char *itoa();
+extern char *myitoa();
 extern char *salloc();
 
 extern char *strcpy();
index 8fb611d..710de16 100644 (file)
@@ -670,7 +670,7 @@ gendata()
        C_df_dnam("datfdes");
        C_rom_dnam("datfname",(arith)0);
        C_rom_cst((arith)1);
-       C_rom_cst((arith)(itoa(strlen(datfname))));
+       C_rom_cst((arith)(myitoa(strlen(datfname))));
        C_df_dnam("dattdes");
        C_rom_dnam("dattyp",(arith)0);
        C_rom_cst((arith)1);
index ff98cf8..a85339b 100644 (file)
@@ -69,7 +69,7 @@ illegalcmd()
 
 
 
-char *itoa(i)
+char *myitoa(i)
 int i;
 {
        static char buf[30];
index ecd7798..6058173 100644 (file)
@@ -355,7 +355,7 @@ void zgt(lab) int lab;              {       C_zgt((label) lab); }
 void zlt(lab) int lab;         {       C_zlt((label) lab); }
 void zne(lab) int lab;         {       C_zne((label) lab); }
 
-char *itoa(i) long i;
+char *myitoa(i) long i;
 {
        static char a[sizeof(long)*3];
        sprint(a, "%ld", i);
@@ -364,7 +364,7 @@ char *itoa(i) long i;
 
 void rom(size, c) int size; long c;
 {
-       C_rom_icon(itoa(c), (arith) size);
+       C_rom_icon(myitoa(c), (arith) size);
 }
 
 void lin()