]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
moved wince related includes and defs to compat.h where possible, removed unused...
authorvalerino <valerino@te4i.com>
Sat, 22 May 2010 01:02:32 +0000 (03:02 +0200)
committerNick Mathewson <nickm@torproject.org>
Mon, 24 May 2010 15:46:54 +0000 (11:46 -0400)
src/common/compat.c
src/common/compat.h
src/common/tortls.c
src/or/main.c
src/win32/orconfig.h

index f93a1619cec5c352cc99244ea9e0071797da2c26..066623b8325b725969243ba427073339162cd10f 100644 (file)
 #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>
index 077256e401d5f516c28eb80a3fb5a5119ee1aa1d..7d59501e2b5953fb910e085c44692bc1804c5012 100644 (file)
 #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
index 218f110d8cc863c4b2408778e9fdd0317deb0ebc..6732d55b8aaaf00dbe1329168aadcfd4d047af5c 100644 (file)
 
 #include "orconfig.h"
 
+#if defined (WINCE)
+#include <WinSock2.h>
+#endif
+
 #include <assert.h>
 #include <openssl/ssl.h>
 #include <openssl/ssl3.h>
index 542383526c7e1c3693f1936582a9ebd68f756697..0c3e6d542505bec9878cdd99c52c4ab63c8b8bea 100644 (file)
 #include <event.h>
 #endif
 
-#if defined (WINCE)
-#include <projects.h>
-#endif
-
 void evdns_shutdown(int);
 
 /********* PROTOTYPES **********/
index 4915597c017a8d2d7fe378dc68fbe50732bd9756..0a9ecfd224a70cdbac37b503296df7ffbcb5ef61 100644 (file)
 #define HAVE_STRING_H
 
 /* Define to 1 if you have the `strlcat' function. */
+#if defined (WINCE)
+#define HAVE_STRLCAT
+#else
 #undef HAVE_STRLCAT
+#endif
 
 /* Define to 1 if you have the `strlcpy' function. */
+#if defined (WINCE)
+#define HAVE_STRLCPY
+#else
 #undef HAVE_STRLCPY
-
+#endif
 /* Define to 1 if you have the `strptime' function. */
 #undef HAVE_STRPTIME