aboutsummaryrefslogtreecommitdiff
path: root/gost12sum.c
diff options
context:
space:
mode:
authorDmitry Ryazantsev <dimitriy.ryazantcev@gmail.com>2018-01-09 16:04:55 +0200
committerDmitry Ryazantsev <dimitriy.ryazantcev@gmail.com>2018-01-10 15:27:25 +0200
commit9d0a4584f65d09d396e2dd655f7ae390ac64d60e (patch)
tree4d581f6a7c8a106073f4c411c58f8326f4de7882 /gost12sum.c
parent2c5c85adf6abc27fd5894c0a82587bc6fbdfb170 (diff)
downloadgost-engine-9d0a4584f65d09d396e2dd655f7ae390ac64d60e.zip
gost-engine-9d0a4584f65d09d396e2dd655f7ae390ac64d60e.tar.gz
gost-engine-9d0a4584f65d09d396e2dd655f7ae390ac64d60e.tar.bz2
Fix MSVS2017 build errors.
Also add missing getopt.h header for gostsum and gost12sum tools build in MSVS (borrowed from https://github.com/skandhurkat/Getopt-for-Visual-Studio).
Diffstat (limited to 'gost12sum.c')
-rw-r--r--gost12sum.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gost12sum.c b/gost12sum.c
index 4936d7e..15e2941 100644
--- a/gost12sum.c
+++ b/gost12sum.c
@@ -10,7 +10,16 @@
**********************************************************************/
#include <stdio.h>
#include <stdlib.h>
+#ifdef _MSC_VER
+#include "getopt.h"
+# ifndef PATH_MAX
+# define PATH_MAX _MAX_PATH
+# endif
+#include <BaseTsd.h>
+typedef SSIZE_T ssize_t;
+#else
#include <unistd.h>
+#endif
#include <limits.h>
#include <fcntl.h>
#ifdef _WIN32