summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-11-02 13:48:29 -0400
committerNick Mathewson <nickm@torproject.org>2012-11-02 13:51:11 -0400
commit9dee6b1dced7c05c1b9e291cad06f646a7397d42 (patch)
treec0b40051a610e764d4fbe5d9373a7f56a5136222 /src
parent05194cce626ee40770ffa1772b78f2b728addf33 (diff)
downloadtor-9dee6b1dced7c05c1b9e291cad06f646a7397d42.tar.gz
tor-9dee6b1dced7c05c1b9e291cad06f646a7397d42.zip
Compile (with warnings) with mingw64
Patch from yayooo for bug 7260, forward-ported to 0.2.4.
Diffstat (limited to 'src')
-rw-r--r--src/common/compat.c2
-rw-r--r--src/common/procmon.c2
-rw-r--r--src/win32/orconfig.h6
3 files changed, 9 insertions, 1 deletions
diff --git a/src/common/compat.c b/src/common/compat.c
index b8674a2f5f..74585cd614 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -425,7 +425,7 @@ tor_vasprintf(char **strp, const char *fmt, va_list args)
else
*strp = strp_tmp;
return r;
-#elif defined(_MSC_VER)
+#elif defined(HAVE__VSCPRINTF)
/* On Windows, _vsnprintf won't tell us the length of the string if it
* overflows, so we need to use _vcsprintf to tell how much to allocate */
int len, r;
diff --git a/src/common/procmon.c b/src/common/procmon.c
index 36b1a48553..3f92c16ee3 100644
--- a/src/common/procmon.c
+++ b/src/common/procmon.c
@@ -25,7 +25,9 @@
#ifdef _WIN32
#include <windows.h>
+#endif
+#if 0 == SIZEOF_PID_T
/* Windows does not define pid_t, but _getpid() returns an int. */
typedef int pid_t;
#endif
diff --git a/src/win32/orconfig.h b/src/win32/orconfig.h
index e4b2df78a9..4055bb07ab 100644
--- a/src/win32/orconfig.h
+++ b/src/win32/orconfig.h
@@ -145,6 +145,9 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
+/* Define to 1 if you have the `_vscprintf' function. */
+#define HAVE__VSCPRINTF 1
+
/* Define to 1 iff NULL is represented by a 0 in memory. */
#define NULL_REP_IS_ZERO_BYTES 1
@@ -190,6 +193,9 @@
/* The size of a `long long', as computed by sizeof. */
#undef SIZEOF_LONG_LONG
+/* The size of `pid_t', as computed by sizeof. */
+#define SIZEOF_PID_T 0
+
/* The size of a `short', as computed by sizeof. */
#define SIZEOF_SHORT 2