Commit b6e3b72ead288e0dbf99f11c96ad6263471fdc86

Stefan Reinauer 2023-02-11T15:28:13

Merge pull request #14 from fweimer-rh/c99 toke/Makefile: Declare return type of main in GCC flag probe

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/toke/Makefile b/toke/Makefile
index 0b9c928..4f56f67 100644
--- a/toke/Makefile
+++ b/toke/Makefile
@@ -41,7 +41,7 @@ LDFLAGS =
 # CFLAGS  := $(CFLAGS) -g
 
 # for gcc 4. remove if you fixed the code.
-_GCC4_CFLAGS=$(shell echo 'main(int argc, char **argv){return 0;}' > .test.c;   \
+_GCC4_CFLAGS=$(shell echo 'int main(int argc, char **argv){return 0;}' > .test.c;   \
 		$(CC) -Wno-pointer-sign -c .test.c -o .test.o > /dev/null 2>&1 \
 		&& echo -Wno-pointer-sign; rm .test.c .test.o )
 CFLAGS  := $(CFLAGS) $(_GCC4_CFLAGS)