mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Fix DJGPP build
GCC with the -std=c11 defines __STRICT_ANSI__. DJGPP checks if __STRICT_ANSI__ is defined and if so doesn't define some things mandated by POSIX such as struct stat, PATH_MAX, and others. The -std=gnu11 option does not define this macro, so use it instead. _DEFAULT_SOURCE isn't needed as no GNU nor BSD-specific functions are used. Remove it. Fix the last two occurrences of incorrect format specifiers for standard fixed-width integer types.
This commit is contained in:
4
Makefile
4
Makefile
@@ -34,8 +34,8 @@ WARNFLAGS := -Wall
|
|||||||
# Overridable CFLAGS
|
# Overridable CFLAGS
|
||||||
CFLAGS := -O3
|
CFLAGS := -O3
|
||||||
# Non-overridable CFLAGS
|
# Non-overridable CFLAGS
|
||||||
REALCFLAGS := ${CFLAGS} ${WARNFLAGS} -std=c11 -D_POSIX_C_SOURCE=200809L \
|
REALCFLAGS := ${CFLAGS} ${WARNFLAGS} -std=gnu11 -D_POSIX_C_SOURCE=200809L \
|
||||||
-D_DEFAULT_SOURCE -Iinclude
|
-Iinclude
|
||||||
# Overridable LDFLAGS
|
# Overridable LDFLAGS
|
||||||
LDFLAGS :=
|
LDFLAGS :=
|
||||||
# Non-overridable LDFLAGS
|
# Non-overridable LDFLAGS
|
||||||
|
|||||||
@@ -1108,10 +1108,10 @@ popc : T_POP_POPC { charmap_Pop(); }
|
|||||||
printt : T_POP_PRINTT string { printf("%s", $2); }
|
printt : T_POP_PRINTT string { printf("%s", $2); }
|
||||||
;
|
;
|
||||||
|
|
||||||
printv : T_POP_PRINTV const { printf("$%X", $2); }
|
printv : T_POP_PRINTV const { printf("$%" PRIX32, $2); }
|
||||||
;
|
;
|
||||||
|
|
||||||
printi : T_POP_PRINTI const { printf("%d", $2); }
|
printi : T_POP_PRINTI const { printf("%" PRId32, $2); }
|
||||||
;
|
;
|
||||||
|
|
||||||
printf : T_POP_PRINTF const { math_Print($2); }
|
printf : T_POP_PRINTF const { math_Print($2); }
|
||||||
|
|||||||
Reference in New Issue
Block a user