Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-kde
Path: blob/main/benchmarks/bonnie++/files/patch-getc_putc.cpp
16461 views
1
--- getc_putc.cpp.orig 2018-09-15 07:00:31 UTC
2
+++ getc_putc.cpp
3
@@ -206,7 +206,7 @@ int main(int argc, char *argv[])
4
return 1;
5
}
6
fflush(NULL);
7
- TEST_FUNC_READ("getc()", if( (c = getc(fp)) == EOF), res[Getc]);
8
+ TEST_FUNC_READ("getc()", int tmp = getc(fp); c = (char)tmp; if (tmp == EOF), res[Getc]);
9
if(fseek(fp, 0, SEEK_SET) != 0)
10
{
11
fprintf(stderr, "Can't seek.\n");
12
@@ -221,7 +221,7 @@ int main(int argc, char *argv[])
13
return 1;
14
}
15
fflush(NULL);
16
- TEST_FUNC_READ("getc_unlocked()", if( (c = getc_unlocked(fp)) == EOF), res[GetcUnlocked]);
17
+ TEST_FUNC_READ("getc_unlocked()", int tmp = getc_unlocked(fp); c = (char)tmp; if (tmp == EOF), res[GetcUnlocked]);
18
19
if(!quiet)
20
printf("done\n");
21
22