Add minimal libzpaq compilation support.

This commit is contained in:
Con Kolivas 2012-03-16 08:59:04 +11:00
parent 63229baed6
commit dd89bdcf3e
2 changed files with 8 additions and 1 deletions

View file

@ -51,7 +51,9 @@ libtmplrzip_la_SOURCES = \
aes.c \ aes.c \
aes.h \ aes.h \
sha4.c \ sha4.c \
sha4.h sha4.h \
libzpaq/libzpaq.cpp \
libzpaq/libzpaq.h
libtmplrzip_la_LIBADD = lzma/C/liblzma.la libtmplrzip_la_LIBADD = lzma/C/liblzma.la

View file

@ -15,6 +15,7 @@ conforming to the ZPAQ level 2 standard. See http://mattmahoney.net/zpaq/
*/ */
#include "libzpaq.h" #include "libzpaq.h"
#include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <math.h> #include <math.h>
@ -57,6 +58,10 @@ void Writer::write(const char* buf, int n) {
put(U8(buf[i])); put(U8(buf[i]));
} }
void error(const char* msg) {
fprintf(stderr, "zpipe error: %s\n", msg);
exit(1);
}
///////////////////////// allocx ////////////////////// ///////////////////////// allocx //////////////////////
// Allocate newsize > 0 bytes of executable memory and update // Allocate newsize > 0 bytes of executable memory and update