From 0d4b60eeee486676a12f25d2adcb891b29dc69a1 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Wed, 18 Oct 2023 05:17:14 -0700 Subject: [PATCH] Add -include stdio.h to 1987/westley/Makefile Although this is very unlikely(?) nowadays the judges noted that putchar() has to exist and if compilation fails one should include stdio.h. This cannot be done in the file, however, as it would ruin the symmetry (already some of this was messed up due to C standard changes). --- 1987/westley/Makefile | 4 ++-- 1987/westley/README.md | 4 +--- thanks-for-fixes.md | 2 ++ 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/1987/westley/Makefile b/1987/westley/Makefile index f69ac9fb3..c2c2d8377 100644 --- a/1987/westley/Makefile +++ b/1987/westley/Makefile @@ -39,7 +39,7 @@ include ../../var.mk # Common C compiler warnings to silence # CSILENCE= -Wno-for-loop-analysis -Wno-unused-value \ - -Wno-deprecated-non-prototype -Wno-strict-prototypes + -Wno-deprecated-non-prototype -Wno-strict-prototypes -Wno-implicit-int # Common C compiler warning flags # @@ -62,7 +62,7 @@ CDEFINE= # Include files that are needed to compile # -CINCLUDE= +CINCLUDE= -include stdio.h # Optimization # diff --git a/1987/westley/README.md b/1987/westley/README.md index d638e4534..f13e98662 100644 --- a/1987/westley/README.md +++ b/1987/westley/README.md @@ -31,13 +31,11 @@ Use `westley.alt` as you would `westley` above. ## Judges' remarks: `putchar()` must exist in the C library and not just as a macro. -If it fails to compile, add the line: `#include ` at the -top of the program. +If it fails to compile, bug your OS/compiler vendor. Line by line symmetry performed better than any C beautifier. Think of if it as a C ink blot. :-) - ## Author's remarks: No remarks were provided by the author. diff --git a/thanks-for-fixes.md b/thanks-for-fixes.md index 5b4997448..d15e040b9 100644 --- a/thanks-for-fixes.md +++ b/thanks-for-fixes.md @@ -309,6 +309,8 @@ Cody fixed this for modern systems. The problem was `'assignment to cast is illegal, lvalue casts are not supported'`. For the original file see the README.md file. +Cody also added to the Makefile `-include stdio.h` in the nowadays very +unlikely(?) but nevertheless suggested case that `putchar()` is not available. ## [1988/dale](1988/dale/dale.c) ([README.md](1988/dale/README.md]))