#endif
#endif
-#if defined (WIN32) && !defined (__CYGWIN32__32)
+#if defined (WIN32) && !defined (__CYGWIN32__)
/* It's not Unix, really. See? Capital letters. */
#include <windows.h>
#define getpid() GetCurrentProcessId()
return false;
}
-#if !defined(HAVE_MINGW) && !defined(HAVE___CYGWIN32__)
+#if !defined(HAVE_MINGW) && !defined(HAVE_CYGWIN)
struct stat s;
if(!fstat(fileno(fp), &s)) {
#ifdef HAVE_MINGW
Sleep(1000);
#endif
-#ifdef HAVE___CYGWIN32__
+#ifdef HAVE_CYGWIN
sleep(1);
#endif
execute_script("tinc-up", envp);
}
}
-#if defined(HAVE_MINGW) || defined(HAVE___CYGWIN32__)
-#ifdef HAVE___CYGWIN32__
+#if defined(HAVE_MINGW) || defined(HAVE_CYGWIN)
+#ifdef HAVE_CYGWIN
#include <w32api/windows.h>
#endif
extern bool hex2bin(char *src, char *dst, int length);
extern void bin2hex(char *src, char *dst, int length);
-#ifdef HAVE_MINGW
+#if defined(HAVE_MINGW) || defined(HAVE_CYGWIN)
extern const char *winerror(int);
+#endif
+
+#ifdef HAVE_MINGW
#define strerror(x) ((x)>0?strerror(x):winerror(GetLastError()))
#define sockerrno WSAGetLastError()
#define sockstrerror(x) winerror(x)