[llvm-commits] CVS: llvm-test/MultiSource/Benchmarks/MiBench/security-rijndael/aesxam.c
Anton Korobeynikov
asl at math.spbu.ru
Thu Jan 11 16:11:43 PST 2007
Changes in directory llvm-test/MultiSource/Benchmarks/MiBench/security-rijndael:
aesxam.c updated: 1.1 -> 1.2
---
Log message:
fpost_t is opaque type. It's long only on few systems. Use ftell()
instead to get file length.
---
Diffs of the changes: (+2 -2)
aesxam.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
Index: llvm-test/MultiSource/Benchmarks/MiBench/security-rijndael/aesxam.c
diff -u llvm-test/MultiSource/Benchmarks/MiBench/security-rijndael/aesxam.c:1.1 llvm-test/MultiSource/Benchmarks/MiBench/security-rijndael/aesxam.c:1.2
--- llvm-test/MultiSource/Benchmarks/MiBench/security-rijndael/aesxam.c:1.1 Tue Jan 9 17:57:18 2007
+++ llvm-test/MultiSource/Benchmarks/MiBench/security-rijndael/aesxam.c Thu Jan 11 18:11:28 2007
@@ -97,12 +97,12 @@
int encfile(FILE *fin, FILE *fout, aes *ctx, char* fn)
{ char inbuf[16], outbuf[16];
- fpos_t flen;
+ long flen;
unsigned long i=0, l=0;
fillrand(outbuf, 16); /* set an IV for CBC mode */
fseek(fin, 0, SEEK_END); /* get the length of the file */
- fgetpos(fin, &flen); /* and then reset to start */
+ flen = ftell(fin); /* and then reset to start */
fseek(fin, 0, SEEK_SET);
fwrite(outbuf, 1, 16, fout); /* write the IV to the output */
fillrand(inbuf, 1); /* make top 4 bits of a byte random */
More information about the llvm-commits
mailing list