Error message:
gost12sum.c(13,10): fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory
gost12sum.c(80,23): warning C4013: 'getopt' undefined; assuming extern returning int
test_keyexpimp.c(7,10): fatal error C1083: Cannot open include file: 'arpa/inet.h': No such file or directory
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
**********************************************************************/
#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
+# include <io.h>
+#endif
#include <string.h>
#include "gosthash2012.h"
#define BUF_SIZE 262144
* Contents licensed under the terms of the OpenSSL license
* See https://www.openssl.org/source/license.html for details
*/
-#include <arpa/inet.h>
+#ifdef _MSC_VER
+# include <Winsock2.h>
+#else
+# include <arpa/inet.h>
+#endif
#include <string.h>
#include <stdio.h>
#include <string.h>