From 04ae0c123631de45f72f6304b87c21aaf3ef61dd Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Mon, 27 Feb 2023 08:44:49 -0800 Subject: [PATCH] Make 1984/decot compile under linux This will not compile with clang which is actually what gcc is under macOS. Unfortunately clang does not support -traditional-cpp which this entry requires for modern systems. We would like to thank Yusuke Endoh for the patch to get this to compile with gcc. Thank you very much Yusuke! --- 1984/decot/Makefile | 5 +++-- 1984/decot/README.md | 9 ++++++++- 1984/decot/decot.c | 3 +-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/1984/decot/Makefile b/1984/decot/Makefile index 864a2b759..45376730b 100644 --- a/1984/decot/Makefile +++ b/1984/decot/Makefile @@ -104,7 +104,7 @@ ARCH= # Defines that are needed to compile # -CDEFINE= +CDEFINE= -traditional-cpp #CDEFINE= -DIOCCC=26 # Include files that are needed to compile @@ -195,7 +195,8 @@ all: ${DATA} ${TARGET} supernova deep_magic magic charon pluto ${PROG}: ${PROG}.c - @echo "NOTE: This entry may not compile when using modern compilers." + @echo "NOTE: This entry will not compile when using clang because it does not support" + @echo " -traditional-cpp but it should compile with gcc." ${CC} ${CFLAGS} $< -o $@ ${LIBS} # alternative executable diff --git a/1984/decot/README.md b/1984/decot/README.md index 4df2ea516..df7199c96 100644 --- a/1984/decot/README.md +++ b/1984/decot/README.md @@ -10,7 +10,13 @@ NOTE: This entry may not compile when using modern compilers. ## Judges' comments: -Some new compilers disliked line 15 of the source, so we changed it from: +NOTE: On modern systems this entry requires the option `-traditional-cpp` which +clang does not support. We thank Yusuke Endoh for his patch which allows the +entry to compile under gcc! Please be advised that gcc under macOS is actually +clang so this will not compile with the default gcc under macOS. + +Some new (in 1984) compilers disliked line 15 of the source, so we changed it +from: for(signal=0;*k * x * __FILE__ *i;) do { @@ -22,6 +28,7 @@ This program prints out a string of garbage. The judges also offer this one comment: understand comments! + Copyright (c) 1984, Landon Curt Noll. All Rights Reserved. Permission for personal, educational or non-profit use is granted provided this this copyright and notice are included in its entirety diff --git a/1984/decot/decot.c b/1984/decot/decot.c index 031519b57..61b97e3f6 100644 --- a/1984/decot/decot.c +++ b/1984/decot/decot.c @@ -3,7 +3,6 @@ #define char k['a'] #define union static struct -extern int floor; double (x1, y1) b, char x {sizeof( double(%s,%D)(*)()) @@ -24,7 +23,7 @@ _O: while (!(char < xO));/*} ; }