Fix 2005/giljade/giljade.alt.c

In order to not require being compiled as 32-bit the 'long*E' has to be
a 'int*E'. This version works fine and I wonder if it should be the main
version with alt being for clang that does not work fully: not sure.

Updated bugs.md with more information (what I came up with yesterday and
today).

As a new issue was opened in the mkiocccentry repo I will be doing less
here for a while most likely but there probably will still be some
commits. I felt however that this was a needed commit to make as it was
left unfinished yesterday. I actually can provide a bit more information
on this entry but for now it'll suffice. The additional information has
to do with what system() is passed.
This commit is contained in:
Cody Boone Ferguson committed 2023-05-25 05:15:02 -07:00
1 parent 5881f728f5
commit c5230a9a66
3 files changed
+86 -25

No files matched your search

+14 -11
View File
@@ -16,27 +16,30 @@ make
./giljade
```
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this for modern
systems. The problem that was showing up is that with either optimising or
anything but 32-bit was used it would not work. The optimising cannot be used
still but it now works with both 32-bit and 64-bit. The problem was the size of
`int` and `long` being different now. Instead of `long *E` it is now `int *E`.
This solves the problem for both 32-bit and 64-bit as long as optimising is
disabled. Tested under linux (32-bit, 64-bit) and macOS (arm64). Thank you Cody
for your assistance!
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) partly (see below)
fixed this for modern systems. The problem that was showing up is that with
either optimising or anything but 32-bit was used it would not work. The
optimising cannot be used still but it now works with both 32-bit and 64-bit.
The problem was the size of `int` and `long` being different now. Instead of
`long *E` it is now `int *E`. This solves the problem for both 32-bit and
64-bit as long as optimising is disabled. Tested under linux (32-bit, 64-bit)
and macOS (arm64). Thank you Cody for your assistance!
NOTE: the self-test feature no longer works due to the fix for clang (which
requires the first arg of `main()` to be an `int` and the second arg to be `char
**`). Believe it having more than two spaces in the code, except where the
original code has them, appears to be part of the problem but it's not the full
story. If you have a compiler that doesn't have this deficiency (e.g. gcc) you
can use the alternate code described below.
original code has them, might be part of the problem but it's not the full
story. If you have a compiler that doesn't have this defect (e.g. gcc) you
can use the alternate code described below. See also [bugs.md](/bugs.md).
### INABIAF - it's not a bug it's a feature! :-)
If the program source file is not lying in the same directory this program will
very likely crash or do something strange.
This entry requires that both `sed` and `cc` are in the path.
## Try:
```sh