Browse Source

Try one more one more time to get tor-ci-windows working

Apparently its mingw headers are missing some stuff.
Nick Mathewson 8 years ago
parent
commit
d18215ed16
2 changed files with 12 additions and 0 deletions
  1. 2 0
      configure.ac
  2. 10 0
      src/common/compat.c

+ 2 - 0
configure.ac

@@ -396,6 +396,7 @@ dnl Check for functions before libevent, since libevent-1.2 apparently
 dnl exports strlcpy without defining it in a header.
 
 AC_CHECK_FUNCS(
+	SecureZeroMemory \
         _NSGetEnviron \
         accept4 \
         backtrace \
@@ -435,6 +436,7 @@ AC_CHECK_FUNCS(
         uname \
 	usleep \
         vasprintf \
+	_getwch \
 	_vscprintf
 )
 

+ 10 - 0
src/common/compat.c

@@ -72,6 +72,16 @@
 #ifdef _WIN32
 #include <conio.h>
 #include <wchar.h>
+/* Some mingw headers lack these. :p */
+#ifndef HAVE__GETWCH
+wint_t _getwch(void);
+#endif
+#ifndef WEOF
+#define WEOF (wchar_t)(0xFFFF)
+#endif
+#ifndef HAVE_SECUREZEROMEMORY
+PVOID SecureZeroMemory(PVOID ptr, SIZE_T cnt);
+#endif
 #elif defined(HAVE_READPASSPHRASE_H)
 #include <readpassphrase.h>
 #else