From: valerino Date: Sat, 22 May 2010 01:02:32 +0000 (+0200) Subject: moved wince related includes and defs to compat.h where possible, removed unused... X-Git-Tag: tor-0.2.2.14-alpha~40^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=076063ca90cc784363127e24a83e38bd54b0e003;p=thirdparty%2Ftor.git moved wince related includes and defs to compat.h where possible, removed unused/redundant wince includes --- 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 #include -#if !defined (WINCE) #include #endif -#endif #ifdef HAVE_UNAME #include 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 #endif +#if defined (WINCE) +#include +#include +#include +#include +#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 +#endif + #include #include #include diff --git a/src/or/main.c b/src/or/main.c index 542383526c..0c3e6d5425 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -24,10 +24,6 @@ #include #endif -#if defined (WINCE) -#include -#endif - void evdns_shutdown(int); /********* PROTOTYPES **********/ diff --git a/src/win32/orconfig.h b/src/win32/orconfig.h index 4915597c01..0a9ecfd224 100644 --- a/src/win32/orconfig.h +++ b/src/win32/orconfig.h @@ -88,11 +88,18 @@ #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