X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=gost12sum.c;h=f643b8bbf407ac39db738914b9c559cd170ea694;hb=08515dc5a74c62d082e6f7f745fac2000f26614a;hp=4936d7e4b27217edeafd4ac3e1f6cae20d86be83;hpb=3786731e6b3f845ac4d63caf1089d28a37f1d0ae;p=openssl-gost%2Fengine.git diff --git a/gost12sum.c b/gost12sum.c index 4936d7e..f643b8b 100644 --- a/gost12sum.c +++ b/gost12sum.c @@ -10,7 +10,16 @@ **********************************************************************/ #include #include -#include +#ifdef _MSC_VER +# include "getopt.h" +# ifndef PATH_MAX +# define PATH_MAX _MAX_PATH +# endif +# include +typedef SSIZE_T ssize_t; +#else +# include +#endif #include #include #ifdef _WIN32 @@ -215,7 +224,7 @@ int hash_stream(gost_hash_ctx * ctx, int fd, char *sum) { unsigned char buffer[BUF_SIZE]; ssize_t bytes; - size_t i; + size_t i; start_hash12(ctx); while ((bytes = read(fd, buffer, BUF_SIZE)) > 0) { @@ -260,7 +269,7 @@ int get_line(FILE *f, char *hash, char *filename, int verbose) return 1; nextline: if (verbose) - printf("%s\n", filename); + printf("%s\n", filename); } return 0; }