Fix 1984/decot to not require -traditional-cpp
This was fun to fix. What prompted me to do so is that I noticed that the patch from Yusuke Endoh actually doesn't work in fedora linux. It never worked with clang as it required -traditional-cpp and also had non-standard second and third args type to main (not a char ** but implicit int). No more. This entry now works with both linux and macOS! I was able to remove all the macros as they were problematic and not needed. The code that used them was updated to be what was necessary. Add to Makefile inclusion of stdio.h and math.h (printf, floor). Some systems require -lm so that was also added to the Makefile. Very little else was required to make it work. The decot.alt.c is the version patched by Yusuke but fixed by me to compile with fedora's gcc. Removed this entry from bugs.md.
This commit is contained in:
1 parent
7832ef5e46
commit
606e01cb78
5 files changed
+97
-56
No files matched your search
@@ -245,19 +245,6 @@ this in the [README.md](1984/anonymous/README.md) file. Can you fix this? We
|
||||
welcome your help!
|
||||
|
||||
|
||||
## [1984/decot](1984/decot/decot.c) ([README.md](1984/decot/README.md))
|
||||
## STATUS: requires a compiler supporting `-traditional-cpp` - alternate code requested
|
||||
|
||||
This entry needs a compiler that support `-traditional-cpp`. `gcc`
|
||||
supports this but `clang` does not. Please be advised that `gcc` under macOS is
|
||||
actually gcc if it looks like it's gcc (two different binaries).
|
||||
|
||||
If you do wish to provide an alternate version of the program that does not need
|
||||
compiler supporting `-traditional-cpp` you are welcome to submit such code via a [GitHub pull request](https://github.com/ioccc-src/temp-test-ioccc/pulls) and we will be happy to credit you in the entry's _README.md_ file.
|
||||
|
||||
|
||||
# 1984
|
||||
|
||||
|
||||
# 1985
|
||||
|
||||
|
||||
Reference in new issue
Block a user