aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorvalerino <valerino@te4i.com>2010-05-22 03:02:32 +0200
committerNick Mathewson <nickm@torproject.org>2010-05-24 11:46:54 -0400
commit076063ca90cc784363127e24a83e38bd54b0e003 (patch)
tree33d780ea00896dc38e9f82dbe4f3dd7a0b08196e /src/common
parent8d31141ccbdbeee9589d04ea99819af7aa35193b (diff)
downloadtor-076063ca90cc784363127e24a83e38bd54b0e003.tar.gz
tor-076063ca90cc784363127e24a83e38bd54b0e003.zip
moved wince related includes and defs to compat.h where possible, removed unused/redundant wince includes
Diffstat (limited to 'src/common')
-rw-r--r--src/common/compat.c2
-rw-r--r--src/common/compat.h16
-rw-r--r--src/common/tortls.c4
3 files changed, 20 insertions, 2 deletions
diff --git a/src/common/compat.c b/src/common/compat.c
index f93a1619ce..066623b832 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -22,10 +22,8 @@
#ifdef MS_WINDOWS
#include <process.h>
#include <windows.h>
-#if !defined (WINCE)
#include <sys/locking.h>
#endif
-#endif
#ifdef HAVE_UNAME
#include <sys/utsname.h>
diff --git a/src/common/compat.h b/src/common/compat.h
index 077256e401..7d59501e2b 100644
--- a/src/common/compat.h
+++ b/src/common/compat.h
@@ -51,6 +51,22 @@
#include <netinet6/in6.h>
#endif
+#if defined (WINCE)
+#include <fcntl.h>
+#include <io.h>
+#include <math.h>
+#include <projects.h>
+#define snprintf _snprintf
+/* this is not exported as W .... */
+#define SHGetPathFromIDListW SHGetPathFromIDList
+/* wcecompat has vasprintf */
+#define HAVE_VASPRINTF
+/* no service here */
+#ifdef NT_SERVICE
+#undef NT_SERVICE
+#endif
+#endif // WINCE
+
#ifndef NULL_REP_IS_ZERO_BYTES
#error "It seems your platform does not represent NULL as zero. We can't cope."
#endif
diff --git a/src/common/tortls.c b/src/common/tortls.c
index 218f110d8c..6732d55b8a 100644
--- a/src/common/tortls.c
+++ b/src/common/tortls.c
@@ -16,6 +16,10 @@
#include "orconfig.h"
+#if defined (WINCE)
+#include <WinSock2.h>
+#endif
+
#include <assert.h>
#include <openssl/ssl.h>
#include <openssl/ssl3.h>