Created
March 5, 2012 13:20
-
-
Save pencilcheck/1978280 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <librsync.h> | |
int | |
main() | |
{ | |
FILE *base, *sig; | |
base = fopen("oldfile", "rb"); | |
sig = fopen("sigfile", "wb"); | |
if (rs_sig_file(base, sig, RS_DEFAULT_BLOCK_LEN, RS_DEFAULT_STRONG_LEN, NULL) == RS_DONE) | |
return -1; | |
else | |
return 0; | |
} |
I see no errors and sigfile has something in it, that's my best guess for working state :P
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Confirmed: rs_sig_file in either arg seg faults. fopen does not. No confidence of actually working (needs more testing). Update: works on both gcc-4.2 and llvm-gcc