shithub: rgbds

Download patch

ref: 663f0ca3b0994c6fa4ceec2a552a6f1f90e086ad
parent: 71fa62c9d1da8cebd7dae821072d0ff2cdd78edd
parent: f88d9e728d9db5f396ac1ef2ae09af8212c37f43
author: Eldred Habert <[email protected]>
date: Thu May 21 18:37:24 EDT 2020

Merge pull request #522 from JL2210/djgpp

Fix DJGPP build

--- a/Makefile
+++ b/Makefile
@@ -34,8 +34,8 @@
 # Overridable CFLAGS
 CFLAGS		:= -O3
 # Non-overridable CFLAGS
-REALCFLAGS	:= ${CFLAGS} ${WARNFLAGS} -std=c11 -D_POSIX_C_SOURCE=200809L \
-		   -D_DEFAULT_SOURCE -Iinclude
+REALCFLAGS	:= ${CFLAGS} ${WARNFLAGS} -std=gnu11 -D_POSIX_C_SOURCE=200809L \
+		   -Iinclude
 # Overridable LDFLAGS
 LDFLAGS		:=
 # Non-overridable LDFLAGS
--- a/src/asm/asmy.y
+++ b/src/asm/asmy.y
@@ -1108,10 +1108,10 @@
 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); }