Skip to content

Instantly share code, notes, and snippets.

@pencilcheck
Created March 5, 2012 13:20
Show Gist options
  • Save pencilcheck/1978280 to your computer and use it in GitHub Desktop.
Save pencilcheck/1978280 to your computer and use it in GitHub Desktop.
#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;
}
@skull-squadron
Copy link

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

@pencilcheck
Copy link
Author

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