+# ifndef __SMARTPHONE__
+# define __SMARTPHONE__
+# endif
+# ifndef __WXWINCE__
+# define __WXWINCE__
+# endif
+#endif
+
+/* detect PocketPC */
+#if defined( WIN32_PLATFORM_PSPC )
+# ifndef __POCKETPC__
+# define __POCKETPC__
+# endif
+# ifndef __WXWINCE__
+# define __WXWINCE__
+# endif
+#endif
+
+/* detect Standard WinCE SDK */
+#if defined( WCE_PLATFORM_STANDARDSDK )
+# ifndef __WINCE_STANDARDSDK__
+# define __WINCE_STANDARDSDK__
+# endif
+# ifndef __WXWINCE__
+# define __WXWINCE__
+# endif
+#endif
+
+#if defined(_WIN32_WCE) && !defined(WIN32_PLATFORM_WFSP) && !defined(WIN32_PLATFORM_PSPC)
+# if (_WIN32_WCE >= 400)
+# ifndef __WINCE_NET__
+# define __WINCE_NET__
+# endif
+# elif (_WIN32_WCE >= 200)
+# ifndef __HANDHELDPC__
+# define __HANDHELDPC__
+# endif
+# endif
+# ifndef __WXWINCE__
+# define __WXWINCE__
+# endif