1988/dale requires -traditional-cpp to compile
Thus one can now enjoy it as long as they have a compiler that supports it. Unfortunately clang does not but gcc does.
This commit is contained in:
1 parent
9cf605973f
commit
e08059faaa
2 files changed
+7
-19
No files matched your search
+4
-4
@@ -170,6 +170,9 @@ TARGET= ${PROG}
|
|||||||
ALT_OBJ=
|
ALT_OBJ=
|
||||||
ALT_TARGET=
|
ALT_TARGET=
|
||||||
|
|
||||||
|
# FORCE use of -traditional-cpp
|
||||||
|
#
|
||||||
|
CFLAGS+= -traditional-cpp
|
||||||
|
|
||||||
#################
|
#################
|
||||||
# build the entry
|
# build the entry
|
||||||
@@ -183,6 +186,7 @@ all: data ${TARGET}
|
|||||||
supernova deep_magic magic charon pluto
|
supernova deep_magic magic charon pluto
|
||||||
|
|
||||||
${PROG}: ${PROG}.c
|
${PROG}: ${PROG}.c
|
||||||
|
@echo "NOTE: this entry requires a compiler that supports -traditional-cpp."
|
||||||
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||||
|
|
||||||
# alternative executable
|
# alternative executable
|
||||||
@@ -190,10 +194,6 @@ ${PROG}: ${PROG}.c
|
|||||||
alt: data ${ALT_TARGET}
|
alt: data ${ALT_TARGET}
|
||||||
@${TRUE}
|
@${TRUE}
|
||||||
|
|
||||||
${PROG}.orig: ${PROG}.orig.c
|
|
||||||
@echo "NOTE: The original source might not compile using modern compilers."
|
|
||||||
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
|
||||||
|
|
||||||
# data files
|
# data files
|
||||||
#
|
#
|
||||||
data: ${DATA}
|
data: ${DATA}
|
||||||
|
|||||||
+3
-15
@@ -16,24 +16,12 @@ NOTE: for modern compilers we had to change the C pre-processor lines like:
|
|||||||
#define _ define
|
#define _ define
|
||||||
-#_ foo bar
|
-#_ foo bar
|
||||||
|
|
||||||
to be
|
to be:
|
||||||
|
|
||||||
#define foo bar
|
#define foo bar
|
||||||
|
|
||||||
Even so this entry will not compile under macOS. If we change the
|
Even so this entry requires a compiler that supports the `-traditional-cpp`
|
||||||
|
option.
|
||||||
|
|
||||||
#define a(x)get/***/x/***/id())
|
|
||||||
|
|
||||||
to
|
|
||||||
|
|
||||||
|
|
||||||
#define a(x)get/***/##x##/***/id())
|
|
||||||
|
|
||||||
it almost works under macOS but there will still be a compilation error. There
|
|
||||||
need not be any other changes under linux.
|
|
||||||
|
|
||||||
NOTE: this program will likely dump core.
|
|
||||||
|
|
||||||
## Try:
|
## Try:
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user