X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=0002-build-fgetc-returns-int-not-char.patch;fp=0002-build-fgetc-returns-int-not-char.patch;h=0000000000000000000000000000000000000000;hb=b397e49f0f30ea1a1377538130c49300068ba417;hp=2dd6e23df67f1ada885ec1e7fda51febfe0dc2f9;hpb=c2f2a9079751562684fb235722b52cb49d30b6aa;p=fedora-riscv.git diff --git a/0002-build-fgetc-returns-int-not-char.patch b/0002-build-fgetc-returns-int-not-char.patch deleted file mode 100644 index 2dd6e23..0000000 --- a/0002-build-fgetc-returns-int-not-char.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 8217b4c4c44f666adf413ab3a0a21503a6f35a3e Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Wed, 10 Aug 2016 15:01:31 +0100 -Subject: [PATCH 2/3] build: fgetc returns int, not char. - -Returning the value into a char is a mistake on all platforms, but is -particularly bad on RISC-V. On that platform (like ARM) char is -unsigned. Therefore EOF (-1) is returned as 255, and the subsequent -test 'c == EOF' ('255 == -1') fails causing an infinite loop. - -Signed-off-by: Richard W.M. Jones ---- - build/parseSpec.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/build/parseSpec.c b/build/parseSpec.c -index 85b0ba3..28f00bc 100644 ---- a/build/parseSpec.c -+++ b/build/parseSpec.c -@@ -323,7 +323,7 @@ retry: - - /* Make sure we have something in the read buffer */ - if (!(ofi->readPtr && *(ofi->readPtr))) { -- char c; -+ int c; - int i = 0; - - while((c = fgetc(ofi->fp)) != EOF) { --- -2.7.4 -