From 38c7d4942e702c56fca4e067f56b8ec9631d4db9 Mon Sep 17 00:00:00 2001
From: Peter Broadbery
Date: Sat, 21 Dec 2024 12:21:21 +0000
Subject: [PATCH 1/2] ccode.c: Remove commented code
---
aldor/aldor/src/ccode.c | 17 -----------------
1 file changed, 17 deletions(-)
diff --git a/aldor/aldor/src/ccode.c b/aldor/aldor/src/ccode.c
index 1ed13be3f..0758e1e77 100644
--- a/aldor/aldor/src/ccode.c
+++ b/aldor/aldor/src/ccode.c
@@ -343,23 +343,6 @@ ccoPr(CCode cco)
/* dump the buffered output and stop the buffering */
-#if 0
- cc += ccoPutsFileOnly("\n#if 0\n");
- cc += ccoPutsFileOnly(BufferOutput);
- cc += ccoPutsFileOnly("\n#endif\n");
-#endif
-#if 0
- if (strcmp(BufferOutput,"extern FiWord fputc();\n") == 0)
- {
- if (wrote_fputc == 0)
- {
- cc += ccoPutsFileOnly("extern int fputc(); /* Signature patched in ccode.c:ccoPr */ \n");
- wrote_fputc = 1;
- }
- }
- else
-#endif
-
if (strcmp(BufferOutput,"extern FiWord fputc();") == 0)
{
if (wrote_fputc == 0)
From 39457545b332ec0943278111887ed3582ebdc7ae Mon Sep 17 00:00:00 2001
From: Peter Broadbery
Date: Sat, 21 Dec 2024 12:58:05 +0000
Subject: [PATCH 2/2] ccode.c: Correct generated fputc, fputs for newer gcc
Note that this is a bit horrible, but a proper fix would mean a better
builtin layer
---
aldor/aldor/src/ccode.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/aldor/aldor/src/ccode.c b/aldor/aldor/src/ccode.c
index 0758e1e77..b90c9c027 100644
--- a/aldor/aldor/src/ccode.c
+++ b/aldor/aldor/src/ccode.c
@@ -347,7 +347,7 @@ ccoPr(CCode cco)
{
if (wrote_fputc == 0)
{
- cc += ccoPutsFileOnly("extern int fputc(); /* Signature patched in ccode.c:ccoPr */");
+ cc += ccoPutsFileOnly("extern int fputc(FiWord, FiWord); /* Signature patched in ccode.c:ccoPr [1]*/");
wrote_fputc = 1;
}
}
@@ -355,13 +355,13 @@ ccoPr(CCode cco)
{
if (wrote_fputc == 0)
{
- cc += ccoPutsFileOnly("extern int fputc(FiWord P0, FiWord P1); /* Signature patched in ccode.c:ccoPr */");
+ cc += ccoPutsFileOnly("extern int fputc(FiWord P0, FiWord P1); /* Signature patched in ccode.c:ccoPr [2] */");
wrote_fputc = 1;
}
}
else if (strcmp(BufferOutput,"extern FiWord fputs();") == 0)
{
- cc += ccoPutsFileOnly("extern int fputs(); /* Signature patched in ccode.c:ccoPr */");
+ cc += ccoPutsFileOnly("extern int fputs(FiWord, FiWord); /* Signature patched in ccode.c:ccoPr [3]*/");
}
else
{