Fix 2005/giljade to work with 64 and 32-bit
The problem was due to sizes so the long * is now an int *. I have no idea what made me think of it other than on a hunch (and based on my previous suspicions). Format fix README.md as well. Update bugs.md. Added an INABIAF as well as change the status of the program not working on some platforms to a known bug. This is to due with clang's deficiency in not allowing the args of main() to be different. Believe it or not some of the problem appears to be more than two spaces in the program (other than where it originally was). Added alt code - the original that will not compile with clang but with the 64-bit fix. This is because the fix for clang breaks the self-test feature of the program. Maybe the clang fix should be the alt code. I don't know. Updated .gitignore. Of course the above fix to the code and the adding of the alt code means that the Makefile was also updated.
This commit is contained in:
1 parent
5dc92c162d
commit
f7f0ca7500
6 files changed
+195
-86
No files matched your search
+10
-7
@@ -42,7 +42,8 @@ CSILENCE= -Wno-bitwise-conditional-parentheses -Wno-bitwise-op-parentheses \
|
||||
-Wno-builtin-requires-header -Wno-empty-body -Wno-error \
|
||||
-Wno-implicit-function-declaration -Wno-extra-semi -Wno-implicit-int \
|
||||
-Wno-logical-op-parentheses -Wno-return-type -Wno-shift-op-parentheses \
|
||||
-Wno-unused-value -Wno-incompatible-pointer-types -Wno-int-conversion
|
||||
-Wno-unused-value -Wno-incompatible-pointer-types -Wno-int-conversion \
|
||||
-Wno-parentheses -Wno-misleading-indentation
|
||||
|
||||
# Common C compiler warning flags
|
||||
#
|
||||
@@ -57,7 +58,7 @@ CSTD= -std=gnu99
|
||||
# Some entries require 32-bitness: ARCH= -m32
|
||||
# Some entries require 64-bitness: ARCH= -m64
|
||||
#
|
||||
ARCH= -m32
|
||||
ARCH=
|
||||
|
||||
# Defines that are needed to compile
|
||||
#
|
||||
@@ -65,7 +66,7 @@ CDEFINE=
|
||||
|
||||
# Include files that are needed to compile
|
||||
#
|
||||
CINCLUDE= -include stdio.h
|
||||
CINCLUDE= -include stdio.h -include string.h -include unistd.h -include stdlib.h
|
||||
|
||||
# Optimization
|
||||
#
|
||||
@@ -89,7 +90,7 @@ ifeq ($(CC),clang)
|
||||
#
|
||||
CSILENCE+= -Wno-comma -Wno-format-nonliteral -Wno-missing-prototypes \
|
||||
-Wno-missing-variable-declarations -Wno-poison-system-directories \
|
||||
-Wno-strict-prototypes
|
||||
-Wno-strict-prototypes -Wno-parentheses -Wno-misleading-indentation
|
||||
#
|
||||
CWARN+= -Weverything
|
||||
#
|
||||
@@ -117,8 +118,8 @@ OBJ= ${PROG}.o
|
||||
DATA=
|
||||
TARGET= ${PROG}
|
||||
#
|
||||
ALT_OBJ=
|
||||
ALT_TARGET=
|
||||
ALT_OBJ= ${PROG}.alt.o
|
||||
ALT_TARGET= ${PROG}.alt
|
||||
|
||||
|
||||
#################
|
||||
@@ -133,7 +134,6 @@ all: data ${TARGET}
|
||||
supernova deep_magic magic charon pluto
|
||||
|
||||
${PROG}: ${PROG}.c
|
||||
@echo "NOTE: this entry requires 32-bit architecture in order to run properly"
|
||||
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||
|
||||
# alternative executable
|
||||
@@ -141,6 +141,9 @@ ${PROG}: ${PROG}.c
|
||||
alt: data ${ALT_TARGET}
|
||||
@${TRUE}
|
||||
|
||||
${PROG}.alt: ${PROG}.alt.c
|
||||
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||
|
||||
# data files
|
||||
#
|
||||
data: ${DATA}
|
||||
|
||||
Reference in new issue
Block a user