summaryrefslogtreecommitdiffstats
path: root/thirdparties/wince/include/wcecompat
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparties/wince/include/wcecompat')
-rw-r--r--thirdparties/wince/include/wcecompat/_time.h62
-rw-r--r--thirdparties/wince/include/wcecompat/assert.h44
-rw-r--r--thirdparties/wince/include/wcecompat/conio.h44
-rw-r--r--thirdparties/wince/include/wcecompat/ctype.h90
-rw-r--r--thirdparties/wince/include/wcecompat/errno.h98
-rw-r--r--thirdparties/wince/include/wcecompat/fcntl.h47
-rw-r--r--thirdparties/wince/include/wcecompat/float.h330
-rw-r--r--thirdparties/wince/include/wcecompat/io.h57
-rw-r--r--thirdparties/wince/include/wcecompat/limits.h95
-rw-r--r--thirdparties/wince/include/wcecompat/malloc.h59
-rw-r--r--thirdparties/wince/include/wcecompat/math.h95
-rw-r--r--thirdparties/wince/include/wcecompat/memory.h44
-rw-r--r--thirdparties/wince/include/wcecompat/process.h40
-rw-r--r--thirdparties/wince/include/wcecompat/setjmp.h69
-rw-r--r--thirdparties/wince/include/wcecompat/signal.h26
-rw-r--r--thirdparties/wince/include/wcecompat/stdarg.h78
-rw-r--r--thirdparties/wince/include/wcecompat/stddef.h86
-rw-r--r--thirdparties/wince/include/wcecompat/stdio.h171
-rw-r--r--thirdparties/wince/include/wcecompat/stdlib.h131
-rw-r--r--thirdparties/wince/include/wcecompat/string.h101
-rw-r--r--thirdparties/wince/include/wcecompat/sys/stat.h91
-rw-r--r--thirdparties/wince/include/wcecompat/sys/timeb.h52
-rw-r--r--thirdparties/wince/include/wcecompat/sys/types.h32
-rw-r--r--thirdparties/wince/include/wcecompat/winsock_extras.h41
24 files changed, 1983 insertions, 0 deletions
diff --git a/thirdparties/wince/include/wcecompat/_time.h b/thirdparties/wince/include/wcecompat/_time.h
new file mode 100644
index 0000000..83edf8b
--- /dev/null
+++ b/thirdparties/wince/include/wcecompat/_time.h
@@ -0,0 +1,62 @@
+/* wcecompat: Windows CE C Runtime Library "compatibility" library.
+ *
+ * Copyright (C) 2001-2002 Essemer Pty Ltd. All rights reserved.
+ * http://www.essemer.com.au/
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+#ifndef __wcecompat__TIME_H__
+#define __wcecompat__TIME_H__
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#include <stdlib.h> // time_t defined there
+//typedef int time_t;
+
+typedef unsigned long clock_t;
+#define CLOCKS_PER_SEC (1000)
+
+time_t time(time_t* t);
+clock_t __cdecl clock(void);
+
+struct tm
+{
+ int tm_sec;
+ int tm_min;
+ int tm_hour;
+ int tm_mday;
+ int tm_mon;
+ int tm_year;
+ int tm_wday;
+ int tm_yday;
+ int tm_isdst;
+};
+
+struct tm* localtime(const time_t* clock);
+struct tm * __cdecl gmtime(const time_t *clock);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif // __wcecompat__TIME_H__
diff --git a/thirdparties/wince/include/wcecompat/assert.h b/thirdparties/wince/include/wcecompat/assert.h
new file mode 100644
index 0000000..336cc3c
--- /dev/null
+++ b/thirdparties/wince/include/wcecompat/assert.h
@@ -0,0 +1,44 @@
+/* wcecompat: Windows CE C Runtime Library "compatibility" library.
+ *
+ * Copyright (C) 2001-2002 Essemer Pty Ltd. All rights reserved.
+ * http://www.essemer.com.au/
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+#ifndef __wcecompat__ASSERT_H__
+#define __wcecompat__ASSERT_H__
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#ifdef NDEBUG
+#define assert(exp) ((void)0)
+#else
+void _assert(void*, void*, unsigned);
+#define assert(exp) (void)( (exp) || (_assert(#exp, __FILE__, __LINE__), 0) )
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif // __wcecompat__ASSERT_H__
diff --git a/thirdparties/wince/include/wcecompat/conio.h b/thirdparties/wince/include/wcecompat/conio.h
new file mode 100644
index 0000000..3e9ab8c
--- /dev/null
+++ b/thirdparties/wince/include/wcecompat/conio.h
@@ -0,0 +1,44 @@
+/* wcecompat: Windows CE C Runtime Library "compatibility" library.
+ *
+ * Copyright (C) 2001-2002 Essemer Pty Ltd. All rights reserved.
+ * http://www.essemer.com.au/
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+#ifndef __wcecompat__CONIO_H__
+#define __wcecompat__CONIO_H__
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+int __cdecl _kbhit(void);
+int __cdecl _readch(void);
+int __cdecl _getch(void);
+
+#define kbhit _kbhit
+#define readch _readch
+#define getch _getch
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif // __wcecompat__CONIO_H__
diff --git a/thirdparties/wince/include/wcecompat/ctype.h b/thirdparties/wince/include/wcecompat/ctype.h
new file mode 100644
index 0000000..f79497b
--- /dev/null
+++ b/thirdparties/wince/include/wcecompat/ctype.h
@@ -0,0 +1,90 @@
+/* wcecompat: Windows CE C Runtime Library "compatibility" library.
+ *
+ * Copyright (C) 2001-2002 Essemer Pty Ltd. All rights reserved.
+ * http://www.essemer.com.au/
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+#ifndef __wcecompat__CTYPE_H__
+#define __wcecompat__CTYPE_H__
+
+#include "stddef.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern _CRTIMP const unsigned short _ctype[];
+extern _CRTIMP const unsigned short *_pctype;
+extern _CRTIMP const wctype_t *_pwctype;
+
+#define _UPPER 0x1 /* upper case letter */
+#define _LOWER 0x2 /* lower case letter */
+#define _DIGIT 0x4 /* digit[0-9] */
+#define _SPACE 0x8 /* tab, carriage return, newline, */
+#define _PUNCT 0x10 /* punctuation character */
+#define _CONTROL 0x20 /* control character */
+#define _BLANK 0x40 /* space char */
+#define _HEX 0x80 /* hexadecimal digit */
+#define _ALPHA (0x0100|_UPPER|_LOWER) /* alphabetic character */
+
+// character classification function prototypes
+#ifdef _WIN32_WCE_EMULATION
+_CRTIMP int __cdecl iswctype(wint_t, wctype_t);
+_CRTIMP wchar_t __cdecl towupper(wchar_t);
+_CRTIMP wchar_t __cdecl towlower(wchar_t);
+#else
+_CRTIMP int iswctype(wint_t, wctype_t);
+_CRTIMP wchar_t towupper(wchar_t);
+_CRTIMP wchar_t towlower(wchar_t);
+#endif
+
+// the character classification macro definitions
+_CRTIMP int __cdecl _isctype(int, int);
+#define isalpha(_c) ( _isctype(_c,_ALPHA) )
+#define isupper(_c) ( _isctype(_c,_UPPER) )
+#define islower(_c) ( _isctype(_c,_LOWER) )
+#define isdigit(_c) ( _isctype(_c,_DIGIT) )
+#define isxdigit(_c) ( _isctype(_c,_HEX) )
+#define isspace(_c) ( _isctype(_c,_SPACE) )
+#define ispunct(_c) ( _isctype(_c,_PUNCT) )
+#define isalnum(_c) ( _isctype(_c,_ALPHA|_DIGIT) )
+#define isprint(_c) ( _isctype(_c,_BLANK|_PUNCT|_ALPHA|_DIGIT) )
+#define isgraph(_c) ( _isctype(_c,_PUNCT|_ALPHA|_DIGIT) )
+#define iscntrl(_c) ( _isctype(_c,_CONTROL) )
+#define __isascii(_c) ((unsigned)(_c) < 0x80)
+#define isascii __isascii
+
+#define iswalpha(_c) ( iswctype(_c,_ALPHA) )
+#define iswupper(_c) ( iswctype(_c,_UPPER) )
+#define iswlower(_c) ( iswctype(_c,_LOWER) )
+#define iswdigit(_c) ( iswctype(_c,_DIGIT) )
+#define iswxdigit(_c) ( iswctype(_c,_HEX) )
+#define iswspace(_c) ( iswctype(_c,_SPACE) )
+#define iswpunct(_c) ( iswctype(_c,_PUNCT) )
+#define iswalnum(_c) ( iswctype(_c,_ALPHA|_DIGIT) )
+#define iswprint(_c) ( iswctype(_c,_BLANK|_PUNCT|_ALPHA|_DIGIT) )
+#define iswgraph(_c) ( iswctype(_c,_PUNCT|_ALPHA|_DIGIT) )
+#define iswcntrl(_c) ( iswctype(_c,_CONTROL) )
+#define iswascii(_c) ( (unsigned)(_c) < 0x80 )
+#define isleadbyte(_c) ( IsDBCSLeadByte(_c))
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __wcecompat__CTYPE_H__ */
diff --git a/thirdparties/wince/include/wcecompat/errno.h b/thirdparties/wince/include/wcecompat/errno.h
new file mode 100644
index 0000000..d5697f0
--- /dev/null
+++ b/thirdparties/wince/include/wcecompat/errno.h
@@ -0,0 +1,98 @@
+/*
+ * errno.h
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is a part of the mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within the package.
+ *
+ * Error numbers and access to error reporting.
+ *
+ */
+
+//#ifdef __COREDLL__
+//# include_next <errno.h>
+//#else /* __COREDLL__ */
+
+#ifndef _ERRNO_H_
+#define _ERRNO_H_
+
+/* All the headers include this file. */
+//#include <_mingw.h>
+
+/*
+ * Error numbers.
+ * TODO: Can't be sure of some of these assignments, I guessed from the
+ * names given by strerror and the defines in the Cygnus errno.h. A lot
+ * of the names from the Cygnus errno.h are not represented, and a few
+ * of the descriptions returned by strerror do not obviously match
+ * their error naming.
+ */
+#define EPERM 1 /* Operation not permitted */
+#define ENOFILE 2 /* No such file or directory */
+#define ENOENT 2
+#define ESRCH 3 /* No such process */
+#define EINTR 4 /* Interrupted function call */
+#define EIO 5 /* Input/output error */
+#define ENXIO 6 /* No such device or address */
+#define E2BIG 7 /* Arg list too long */
+#define ENOEXEC 8 /* Exec format error */
+#define EBADF 9 /* Bad file descriptor */
+#define ECHILD 10 /* No child processes */
+#define EAGAIN 11 /* Resource temporarily unavailable */
+#define ENOMEM 12 /* Not enough space */
+#define EACCES 13 /* Permission denied */
+#define EFAULT 14 /* Bad address */
+/* 15 - Unknown Error */
+#define EBUSY 16 /* strerror reports "Resource device" */
+#define EEXIST 17 /* File exists */
+#define EXDEV 18 /* Improper link (cross-device link?) */
+#define ENODEV 19 /* No such device */
+#define ENOTDIR 20 /* Not a directory */
+#define EISDIR 21 /* Is a directory */
+#define EINVAL 22 /* Invalid argument */
+#define ENFILE 23 /* Too many open files in system */
+#define EMFILE 24 /* Too many open files */
+#define ENOTTY 25 /* Inappropriate I/O control operation */
+/* 26 - Unknown Error */
+#define EFBIG 27 /* File too large */
+#define ENOSPC 28 /* No space left on device */
+#define ESPIPE 29 /* Invalid seek (seek on a pipe?) */
+#define EROFS 30 /* Read-only file system */
+#define EMLINK 31 /* Too many links */
+#define EPIPE 32 /* Broken pipe */
+#define EDOM 33 /* Domain error (math functions) */
+#define ERANGE 34 /* Result too large (possibly too small) */
+/* 35 - Unknown Error */
+#define EDEADLOCK 36 /* Resource deadlock avoided (non-Cyg) */
+#define EDEADLK 36
+/* 37 - Unknown Error */
+#define ENAMETOOLONG 38 /* Filename too long (91 in Cyg?) */
+#define ENOLCK 39 /* No locks available (46 in Cyg?) */
+#define ENOSYS 40 /* Function not implemented (88 in Cyg?) */
+#define ENOTEMPTY 41 /* Directory not empty (90 in Cyg?) */
+#define EILSEQ 42 /* Illegal byte sequence */
+
+/*
+ * NOTE: ENAMETOOLONG and ENOTEMPTY conflict with definitions in the
+ * sockets.h header provided with windows32api-0.1.2.
+ * You should go and put an #if 0 ... #endif around the whole block
+ * of errors (look at the comment above them).
+ */
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern int errno;
+int* __cdecl _errno(void);
+
+#define errno (*_errno())
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* Not _ERRNO_H_ */
+
+//#endif /* Not __COREDLL__ */ \ No newline at end of file
diff --git a/thirdparties/wince/include/wcecompat/fcntl.h b/thirdparties/wince/include/wcecompat/fcntl.h
new file mode 100644
index 0000000..1fd4968
--- /dev/null
+++ b/thirdparties/wince/include/wcecompat/fcntl.h
@@ -0,0 +1,47 @@
+/* wcecompat: Windows CE C Runtime Library "compatibility" library.
+ *
+ * Copyright (C) 2001-2002 Essemer Pty Ltd. All rights reserved.
+ * http://www.essemer.com.au/
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+#ifndef __wcecompat__FCNTL_H__
+#define __wcecompat__FCNTL_H__
+
+
+#define _O_RDONLY 0x0000
+#define _O_WRONLY 0x0001
+#define _O_RDWR 0x0002
+#define _O_APPEND 0x0008
+#define _O_CREAT 0x0100
+#define _O_TRUNC 0x0200
+#define _O_EXCL 0x0400
+#define _O_TEXT 0x4000
+#define _O_BINARY 0x8000
+
+#define O_RDONLY _O_RDONLY
+#define O_WRONLY _O_WRONLY
+#define O_RDWR _O_RDWR
+#define O_APPEND _O_APPEND
+#define O_CREAT _O_CREAT
+#define O_TRUNC _O_TRUNC
+#define O_EXCL _O_EXCL
+#define O_TEXT _O_TEXT
+#define O_BINARY _O_BINARY
+
+
+#endif // __wcecompat__FCNTL_H__
diff --git a/thirdparties/wince/include/wcecompat/float.h b/thirdparties/wince/include/wcecompat/float.h
new file mode 100644
index 0000000..6c82c28
--- /dev/null
+++ b/thirdparties/wince/include/wcecompat/float.h
@@ -0,0 +1,330 @@
+/* wcecompat: Windows CE C Runtime Library "compatibility" library.
+ *
+ * Copyright (C) 2001-2002 Essemer Pty Ltd. All rights reserved.
+ * http://www.essemer.com.au/
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+#ifndef __wcecompat__FLOAT_H__
+#define __wcecompat__FLOAT_H__
+
+#include "stddef.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define DBL_DIG 15 /* # of decimal digits of precision */
+#define DBL_EPSILON 2.2204460492503131e-016 /* smallest such that 1.0+DBL_EPSILON != 1.0 */
+#define DBL_MANT_DIG 53 /* # of bits in mantissa */
+#define DBL_MAX 1.7976931348623158e+308 /* max value */
+#define DBL_MAX_10_EXP 308 /* max decimal exponent */
+#define DBL_MAX_EXP 1024 /* max binary exponent */
+#define DBL_MIN 2.2250738585072014e-308 /* min positive value */
+#define DBL_MIN_10_EXP (-307) /* min decimal exponent */
+#define DBL_MIN_EXP (-1021) /* min binary exponent */
+#define _DBL_RADIX 2 /* exponent radix */
+#define _DBL_ROUNDS 1 /* addition rounding: near */
+
+#define FLT_DIG 6 /* # of decimal digits of precision */
+#define FLT_EPSILON 1.192092896e-07F /* smallest such that 1.0+FLT_EPSILON != 1.0 */
+#define FLT_GUARD 0
+#define FLT_MANT_DIG 24 /* # of bits in mantissa */
+#define FLT_MAX 3.402823466e+38F /* max value */
+#define FLT_MAX_10_EXP 38 /* max decimal exponent */
+#define FLT_MAX_EXP 128 /* max binary exponent */
+#define FLT_MIN 1.175494351e-38F /* min positive value */
+#define FLT_MIN_10_EXP (-37) /* min decimal exponent */
+#define FLT_MIN_EXP (-125) /* min binary exponent */
+#define FLT_NORMALIZE 0
+#define FLT_RADIX 2 /* exponent radix */
+#define FLT_ROUNDS 1 /* addition rounding: near */
+
+#define LDBL_DIG DBL_DIG /* # of decimal digits of precision */
+#define LDBL_EPSILON DBL_EPSILON /* smallest such that 1.0+LDBL_EPSILON != 1.0 */
+#define LDBL_MANT_DIG DBL_MANT_DIG /* # of bits in mantissa */
+#define LDBL_MAX DBL_MAX /* max value */
+#define LDBL_MAX_10_EXP DBL_MAX_10_EXP /* max decimal exponent */
+#define LDBL_MAX_EXP DBL_MAX_EXP /* max binary exponent */
+#define LDBL_MIN DBL_MIN /* min positive value */
+#define LDBL_MIN_10_EXP DBL_MIN_10_EXP /* min decimal exponent */
+#define LDBL_MIN_EXP DBL_MIN_EXP /* min binary exponent */
+#define _LDBL_RADIX DBL_RADIX /* exponent radix */
+#define _LDBL_ROUNDS DBL_ROUNDS /* addition rounding: near */
+
+// Abstract User Control Word Mask and bit definitions
+#define _MCW_EM 0x0008001f /* interrupt Exception Masks */
+#define _EM_INEXACT 0x00000001 /* inexact (precision) */
+#define _EM_UNDERFLOW 0x00000002 /* underflow */
+#define _EM_OVERFLOW 0x00000004 /* overflow */
+#define _EM_ZERODIVIDE 0x00000008 /* zero divide */
+#define _EM_INVALID 0x00000010 /* invalid */
+#define _MCW_RC 0x00000300 /* Rounding Control */
+#define _RC_NEAR 0x00000000 /* near */
+#define _RC_DOWN 0x00000100 /* down */
+#define _RC_UP 0x00000200 /* up */
+#define _RC_CHOP 0x00000300 /* chop */
+
+// Abstract User Status Word bit definitions
+#define _SW_INEXACT 0x00000001 /* inexact (precision) */
+#define _SW_UNDERFLOW 0x00000002 /* underflow */
+#define _SW_OVERFLOW 0x00000004 /* overflow */
+#define _SW_ZERODIVIDE 0x00000008 /* zero divide */
+#define _SW_INVALID 0x00000010 /* invalid */
+
+#if ! defined (_M_CEE)
+
+// i386 specific definitions
+#define _MCW_PC 0x00030000 /* Precision Control */
+#define _PC_64 0x00000000 /* 64 bits */
+#define _PC_53 0x00010000 /* 53 bits */
+#define _PC_24 0x00020000 /* 24 bits */
+#define _MCW_IC 0x00040000 /* Infinity Control */
+#define _IC_AFFINE 0x00040000 /* affine */
+#define _IC_PROJECTIVE 0x00000000 /* projective */
+#define _EM_DENORMAL 0x00080000 /* denormal exception mask (_control87 only) */
+#define _SW_DENORMAL 0x00080000 /* denormal status bit */
+
+// MIPS R4000 and SH4 specific definitions
+#ifdef _M_SH
+#define _MCW_DN 0x00040000 /* Denormal Control (SH4) */
+#define _DN_FLUSH 0x00040000 /* flush to zero (SH4) */
+#else
+#define _MCW_DN 0x01000000 /* Denormal Control (R4000) */
+#define _DN_FLUSH 0x01000000 /* flush to zero (R4000) */
+#endif
+#define _DN_SAVE 0x00000000 /* save */
+
+
+// initial Control Word value
+#ifdef _M_IX86
+#define _CW_DEFAULT ( _RC_NEAR + _PC_64 + _EM_INVALID + _EM_ZERODIVIDE + _EM_OVERFLOW + _EM_UNDERFLOW + _EM_INEXACT )
+#else
+#define _CW_DEFAULT ( _RC_NEAR + _PC_53 + _EM_INVALID + _EM_ZERODIVIDE + _EM_OVERFLOW + _EM_UNDERFLOW + _EM_INEXACT )
+#endif
+#endif // ! _M_CEE
+
+// invalid subconditions (_SW_INVALID also set)
+#define _SW_UNEMULATED 0x0040 /* unemulated instruction */
+#define _SW_SQRTNEG 0x0080 /* square root of a neg number */
+#define _SW_STACKOVERFLOW 0x0200 /* FP stack overflow */
+#define _SW_STACKUNDERFLOW 0x0400 /* FP stack underflow */
+
+// Floating point error signals and return codes
+#define _FPE_INVALID 0x81
+#define _FPE_DENORMAL 0x82
+#define _FPE_ZERODIVIDE 0x83
+#define _FPE_OVERFLOW 0x84
+#define _FPE_UNDERFLOW 0x85
+#define _FPE_INEXACT 0x86
+#define _FPE_UNEMULATED 0x87
+#define _FPE_SQRTNEG 0x88
+#define _FPE_STACKOVERFLOW 0x8a
+#define _FPE_STACKUNDERFLOW 0x8b
+#define _FPE_EXPLICITGEN 0x8c /* raise( SIGFPE ); */
+
+// Floating point function prototypes
+unsigned int __cdecl _clearfp(void);
+unsigned int __cdecl _controlfp(unsigned int,unsigned int);
+unsigned int __cdecl _statusfp(void);
+void __cdecl _fpreset(void);
+#define _clear87 _clearfp
+#define _status87 _statusfp
+
+// IEEE recommended functions
+double __cdecl _copysign (double, double);
+double __cdecl _chgsign (double);
+double __cdecl _scalb(double, long);
+double __cdecl _logb(double);
+double __cdecl _nextafter(double, double);
+int __cdecl _finite(double);
+int __cdecl _isnan(double);
+int __cdecl _fpclass(double);
+
+#define _FPCLASS_SNAN 0x0001 /* signaling NaN */
+#define _FPCLASS_QNAN 0x0002 /* quiet NaN */
+#define _FPCLASS_NINF 0x0004 /* negative infinity */
+#define _FPCLASS_NN 0x0008 /* negative normal */
+#define _FPCLASS_ND 0x0010 /* negative denormal */
+#define _FPCLASS_NZ 0x0020 /* -0 */
+#define _FPCLASS_PZ 0x0040 /* +0 */
+#define _FPCLASS_PD 0x0080 /* positive denormal */
+#define _FPCLASS_PN 0x0100 /* positive normal */
+#define _FPCLASS_PINF 0x0200 /* positive infinity */
+
+typedef float _FP32;
+typedef double _FP64;
+typedef short _I16;
+typedef int _I32;
+typedef unsigned short _U16;
+typedef unsigned int _U32;
+
+typedef struct {
+ unsigned long W[4];
+} _U32ARRAY;
+
+typedef struct {
+ unsigned short W[5];
+} _FP80;
+
+typedef struct {
+ unsigned long W[4];
+} _FP128;
+
+typedef struct {
+ unsigned long W[2];
+} _I64;
+
+typedef struct {
+ unsigned long W[2];
+} _U64;
+
+typedef struct {
+ unsigned short W[5];
+} _BCD80;
+
+typedef struct {
+ union {
+ _FP32 Fp32Value;
+ _FP64 Fp64Value;
+ _FP80 Fp80Value;
+ _FP128 Fp128Value;
+ _I16 I16Value;
+ _I32 I32Value;
+ _I64 I64Value;
+ _U16 U16Value;
+ _U32 U32Value;
+ _U64 U64Value;
+ _BCD80 Bcd80Value;
+ char *StringValue;
+ int CompareValue;
+ _U32ARRAY U32ArrayValue;
+ } Value;
+ unsigned int OperandValid : 1;
+ unsigned int Format : 4;
+} _FPIEEE_VALUE;
+
+typedef struct {
+ unsigned int Inexact : 1;
+ unsigned int Underflow : 1;
+ unsigned int Overflow : 1;
+ unsigned int ZeroDivide : 1;
+ unsigned int InvalidOperation : 1;
+} _FPIEEE_EXCEPTION_FLAGS;
+
+typedef struct {
+ unsigned int RoundingMode : 2;
+ unsigned int Precision : 3;
+ unsigned int Operation :12;
+ _FPIEEE_EXCEPTION_FLAGS Cause;
+ _FPIEEE_EXCEPTION_FLAGS Enable;
+ _FPIEEE_EXCEPTION_FLAGS Status;
+ _FPIEEE_VALUE Operand1;
+ _FPIEEE_VALUE Operand2;
+ _FPIEEE_VALUE Result;
+} _FPIEEE_RECORD;
+
+typedef struct _EXCEPTION_POINTERS *PEXCEPTION_POINTERS;
+
+#ifdef _WIN32_WCE_EMULATION
+int __cdecl _fpieee_flt(unsigned long exc_code, PEXCEPTION_POINTERS p, int handler(_FPIEEE_RECORD *));
+#else
+int _fpieee_flt(unsigned long exc_code, PEXCEPTION_POINTERS p, int handler(_FPIEEE_RECORD *));
+#endif
+
+// Non-ANSI names for compatibility
+#define DBL_RADIX _DBL_RADIX
+#define DBL_ROUNDS _DBL_ROUNDS
+#define LDBL_RADIX _LDBL_RADIX
+#define LDBL_ROUNDS _LDBL_ROUNDS
+#define MCW_EM _MCW_EM
+#define EM_INVALID _EM_INVALID
+#define EM_ZERODIVIDE _EM_ZERODIVIDE
+#define EM_OVERFLOW _EM_OVERFLOW
+#define EM_UNDERFLOW _EM_UNDERFLOW
+#define EM_INEXACT _EM_INEXACT
+
+#if ! defined (_M_CEE)
+
+#define EM_DENORMAL _EM_DENORMAL
+#define SW_DENORMAL _SW_DENORMAL
+#define MCW_IC _MCW_IC
+#define IC_AFFINE _IC_AFFINE
+#define IC_PROJECTIVE _IC_PROJECTIVE
+#define MCW_PC _MCW_PC
+#define PC_24 _PC_24
+#define PC_53 _PC_53
+#define PC_64 _PC_64
+
+#endif // ! _M_CEE
+
+#define MCW_RC _MCW_RC
+#define RC_CHOP _RC_CHOP
+#define RC_UP _RC_UP
+#define RC_DOWN _RC_DOWN
+#define RC_NEAR _RC_NEAR
+#define CW_DEFAULT _CW_DEFAULT
+#define SW_INVALID _SW_INVALID
+#define SW_ZERODIVIDE _SW_ZERODIVIDE
+#define SW_OVERFLOW _SW_OVERFLOW
+#define SW_UNDERFLOW _SW_UNDERFLOW
+#define SW_INEXACT _SW_INEXACT
+#define SW_UNEMULATED _SW_UNEMULATED
+#define SW_SQRTNEG _SW_SQRTNEG
+#define SW_STACKOVERFLOW _SW_STACKOVERFLOW
+#define SW_STACKUNDERFLOW _SW_STACKUNDERFLOW
+#define FPE_INVALID _FPE_INVALID
+#define FPE_DENORMAL _FPE_DENORMAL
+#define FPE_ZERODIVIDE _FPE_ZERODIVIDE
+#define FPE_OVERFLOW _FPE_OVERFLOW
+#define FPE_UNDERFLOW _FPE_UNDERFLOW
+#define FPE_INEXACT _FPE_INEXACT
+#define FPE_UNEMULATED _FPE_UNEMULATED
+#define FPE_SQRTNEG _FPE_SQRTNEG
+#define FPE_STACKOVERFLOW _FPE_STACKOVERFLOW
+#define FPE_STACKUNDERFLOW _FPE_STACKUNDERFLOW
+#define FPE_EXPLICITGEN _FPE_EXPLICITGEN
+
+#ifdef _WIN32_WCE_EMULATION
+double __cdecl _frnd(double);
+double __cdecl _fsqrt(double);
+#else
+double _frnd(double);
+double _fsqrt(double);
+#endif
+
+// definition of a _complex struct to be used by those who use cabs and
+// want type checking on their argument
+struct _complex {
+ double x,y; /* real and imaginary parts */
+ } ;
+
+// Non-ANSI name for compatibility
+#define complex _complex
+
+// definitions of _HUGE and HUGE_VAL - respectively the XENIX and ANSI names
+// for a value returned in case of error by a number of the floating point
+// math routines
+_CRTIMP
+extern double _HUGE;
+#define HUGE_VAL _HUGE
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __wcecompat__FLOAT_H__ */
diff --git a/thirdparties/wince/include/wcecompat/io.h b/thirdparties/wince/include/wcecompat/io.h
new file mode 100644
index 0000000..aa6d931
--- /dev/null
+++ b/thirdparties/wince/include/wcecompat/io.h
@@ -0,0 +1,57 @@
+/* wcecompat: Windows CE C Runtime Library "compatibility" library.
+ *
+ * Copyright (C) 2001-2002 Essemer Pty Ltd. All rights reserved.
+ * http://www.essemer.com.au/
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+#ifndef __wcecompat__IO_H__
+#define __wcecompat__IO_H__
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int __cdecl _get_osfhandle(int _FileHandle);
+int __cdecl _access(const char *pathname, int mode);
+int __cdecl _open(const char* filename, int flags, int mode);
+int __cdecl _wopen(const unsigned short* filename, int flags, int mode);
+int __cdecl _close(int fd);
+long __cdecl _lseek(int fd, long offset, int whence);
+int __cdecl _read(int fd, void *buffer, unsigned int count);
+int __cdecl _write(int fd, const void *buffer, unsigned int count);
+int __cdecl _unlink(const char *pathname);
+int __cdecl _isatty(int handle);
+#define get_osfhandle _get_osfhandle
+#define access _access
+#define open _open
+#define wopen _wopen
+#define close _close
+#define lseek _lseek
+#define read _read
+#define write _write
+#define unlink _unlink
+#define isatty _isatty
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif // __wcecompat__IO_H__
diff --git a/thirdparties/wince/include/wcecompat/limits.h b/thirdparties/wince/include/wcecompat/limits.h
new file mode 100644
index 0000000..505ef06
--- /dev/null
+++ b/thirdparties/wince/include/wcecompat/limits.h
@@ -0,0 +1,95 @@
+/* wcecompat: Windows CE C Runtime Library "compatibility" library.
+ *
+ * Copyright (C) 2001-2002 Essemer Pty Ltd. All rights reserved.
+ * http://www.essemer.com.au/
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+#ifndef __wcecompat__LIMITS_H__
+#define __wcecompat__LIMITS_H__
+
+#include "stddef.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define CHAR_BIT 8 /* number of bits in a char */
+#define SCHAR_MIN (-128) /* minimum signed char value */
+#define SCHAR_MAX 127 /* maximum signed char value */
+#define UCHAR_MAX 0xff /* maximum unsigned char value */
+
+#ifndef _CHAR_UNSIGNED
+#define CHAR_MIN SCHAR_MIN /* mimimum char value */
+#define CHAR_MAX SCHAR_MAX /* maximum char value */
+#else
+#define CHAR_MIN 0
+#define CHAR_MAX UCHAR_MAX
+#endif /* _CHAR_UNSIGNED */
+
+#define MB_LEN_MAX 2 /* max. # bytes in multibyte char */
+#define SHRT_MIN (-32768) /* minimum (signed) short value */
+#define SHRT_MAX 32767 /* maximum (signed) short value */
+#define USHRT_MAX 0xffff /* maximum unsigned short value */
+#define INT_MIN (-2147483647 - 1) /* minimum (signed) int value */
+#define INT_MAX 2147483647 /* maximum (signed) int value */
+#define UINT_MAX 0xffffffff /* maximum unsigned int value */
+#define LONG_MIN (-2147483647L - 1) /* minimum (signed) long value */
+#define LONG_MAX 2147483647L /* maximum (signed) long value */
+#define ULONG_MAX 0xffffffffUL /* maximum unsigned long value */
+
+#if _INTEGRAL_MAX_BITS >= 8
+#define _I8_MIN (-127i8 - 1) /* minimum signed 8 bit value */
+#define _I8_MAX 127i8 /* maximum signed 8 bit value */
+#define _UI8_MAX 0xffui8 /* maximum unsigned 8 bit value */
+#endif
+
+#if _INTEGRAL_MAX_BITS >= 16
+#define _I16_MIN (-32767i16 - 1) /* minimum signed 16 bit value */
+#define _I16_MAX 32767i16 /* maximum signed 16 bit value */
+#define _UI16_MAX 0xffffui16 /* maximum unsigned 16 bit value */
+#endif
+
+#if _INTEGRAL_MAX_BITS >= 32
+#define _I32_MIN (-2147483647i32 - 1) /* minimum signed 32 bit value */
+#define _I32_MAX 2147483647i32 /* maximum signed 32 bit value */
+#define _UI32_MAX 0xffffffffui32 /* maximum unsigned 32 bit value */
+#endif
+
+#if _INTEGRAL_MAX_BITS >= 64
+/* minimum signed 64 bit value */
+#define _I64_MIN (-9223372036854775807i64 - 1)
+/* maximum signed 64 bit value */
+#define _I64_MAX 9223372036854775807i64
+/* maximum unsigned 64 bit value */
+#define _UI64_MAX 0xffffffffffffffffui64
+#endif
+
+#if _INTEGRAL_MAX_BITS >= 128
+/* minimum signed 128 bit value */
+#define _I128_MIN (-170141183460469231731687303715884105727i128 - 1)
+/* maximum signed 128 bit value */
+#define _I128_MAX 170141183460469231731687303715884105727i128
+/* maximum unsigned 128 bit value */
+#define _UI128_MAX 0xffffffffffffffffffffffffffffffffui128
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __wcecompat__LIMITS_H__ */
diff --git a/thirdparties/wince/include/wcecompat/malloc.h b/thirdparties/wince/include/wcecompat/malloc.h
new file mode 100644
index 0000000..e97e3b3
--- /dev/null
+++ b/thirdparties/wince/include/wcecompat/malloc.h
@@ -0,0 +1,59 @@
+/* wcecompat: Windows CE C Runtime Library "compatibility" library.
+ *
+ * Copyright (C) 2001-2002 Essemer Pty Ltd. All rights reserved.
+ * http://www.essemer.com.au/
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+#ifndef __wcecompat__MALLOC_H__
+#define __wcecompat__MALLOC_H__
+
+#include "stddef.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_CRTIMP void __cdecl free(void *);
+_CRTIMP void * __cdecl malloc(size_t);
+_CRTIMP void * __cdecl calloc(size_t num, size_t size);
+size_t __cdecl _msize(void *);
+_CRTIMP void * __cdecl realloc(void *, size_t);
+
+// implemented by compiler
+void * __cdecl _alloca(size_t);
+
+// process exit functions
+void __cdecl exit (int code);
+void __cdecl _exit (int code);
+void __cdecl _cexit(void);
+void __cdecl _c_exit (void);
+
+#if !__STDC__
+/* Non-ANSI names for compatibility */
+#define alloca _alloca
+#endif /* __STDC__*/
+
+#if defined(_M_MRX000) || defined(_M_PPC) || defined(_M_ALPHA)
+#pragma intrinsic(_alloca)
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __wcecompat__MALLOC_H__ */
diff --git a/thirdparties/wince/include/wcecompat/math.h b/thirdparties/wince/include/wcecompat/math.h
new file mode 100644
index 0000000..d17b809
--- /dev/null
+++ b/thirdparties/wince/include/wcecompat/math.h
@@ -0,0 +1,95 @@
+/* wcecompat: Windows CE C Runtime Library "compatibility" library.
+ *
+ * Copyright (C) 2001-2002 Essemer Pty Ltd. All rights reserved.
+ * http://www.essemer.com.au/
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+#ifndef __wcecompat__MATH_H__
+#define __wcecompat__MATH_H__
+
+#include "stddef.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int __cdecl abs(int);
+long __cdecl labs(long);
+double __cdecl acos(double);
+double __cdecl asin(double);
+double __cdecl atan(double);
+double __cdecl atan2(double, double);
+double __cdecl cos(double);
+double __cdecl cosh(double);
+double __cdecl exp(double);
+double __cdecl fabs(double);
+double __cdecl fmod(double, double);
+double __cdecl log(double);
+double __cdecl log10(double);
+double __cdecl pow(double, double);
+double __cdecl sin(double);
+double __cdecl sinh(double);
+double __cdecl sqrt(double);
+double __cdecl tan(double);
+double __cdecl tanh(double);
+double __cdecl _cabs(struct _complex);
+double __cdecl ceil(double);
+double __cdecl floor(double);
+double __cdecl frexp(double, int *);
+double __cdecl _hypot(double, double);
+double __cdecl _j0(double);
+double __cdecl _j1(double);
+double __cdecl _jn(int, double);
+double __cdecl ldexp(double, int);
+_CRTIMP int __cdecl _matherr(struct _exception *);
+double __cdecl modf(double, double *);
+double __cdecl _y0(double);
+double __cdecl _y1(double);
+double __cdecl _yn(int, double);
+
+// macros -- oldnames
+#define acosl(x) ((long double)acos((double)(x)))
+#define asinl(x) ((long double)asin((double)(x)))
+#define atanl(x) ((long double)atan((double)(x)))
+#define atan2l(x,y) ((long double)atan2((double)(x), (double)(y)))
+#define ceill(x) ((long double)ceil((double)(x)))
+#define cosl(x) ((long double)cos((double)(x)))
+#define coshl(x) ((long double)cosh((double)(x)))
+#define expl(x) ((long double)exp((double)(x)))
+#define fabsl(x) ((long double)fabs((double)(x)))
+#define floorl(x) ((long double)floor((double)(x)))
+#define fmodl(x,y) ((long double)fmod((double)(x), (double)(y)))
+#define frexpl(x,y) ((long double)frexp((double)(x), (y)))
+#define hypotl(x,y) ((long double)hypot((double)(x), (double)(y)))
+#define ldexpl(x,y) ((long double)ldexp((double)(x), (y)))
+#define logl(x) ((long double)log((double)(x)))
+#define log10l(x) ((long double)log10((double)(x)))
+#define _matherrl _matherr
+#define modfl(x,y) ((long double)modf((double)(x), (double *)(y)))
+#define powl(x,y) ((long double)pow((double)(x), (double)(y)))
+#define sinl(x) ((long double)sin((double)(x)))
+#define sinhl(x) ((long double)sinh((double)(x)))
+#define sqrtl(x) ((long double)sqrt((double)(x)))
+#define tanl(x) ((long double)tan((double)(x)))
+#define tanhl(x) ((long double)tanh((double)(x)))
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __wcecompat__MATH_H__ */
diff --git a/thirdparties/wince/include/wcecompat/memory.h b/thirdparties/wince/include/wcecompat/memory.h
new file mode 100644
index 0000000..e95a519
--- /dev/null
+++ b/thirdparties/wince/include/wcecompat/memory.h
@@ -0,0 +1,44 @@
+/* wcecompat: Windows CE C Runtime Library "compatibility" library.
+ *
+ * Copyright (C) 2001-2002 Essemer Pty Ltd. All rights reserved.
+ * http://www.essemer.com.au/
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+#ifndef __wcecompat__MEMORY_H__
+#define __wcecompat__MEMORY_H__
+
+#include "stddef.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int __cdecl memcmp(const void *, const void *, size_t);
+void * __cdecl memcpy(void *, const void *, size_t);
+void * __cdecl memset(void *, int, size_t);
+
+_CRTIMP void * __cdecl memchr(const void *, int, size_t);
+_CRTIMP int __cdecl _memicmp(const void *, const void *, unsigned int);
+_CRTIMP void * __cdecl _memccpy(void *, const void *, int, unsigned int);
+_CRTIMP void * __cdecl memmove(void *, const void *, size_t);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __wcecompat__MEMORY_H__ */
diff --git a/thirdparties/wince/include/wcecompat/process.h b/thirdparties/wince/include/wcecompat/process.h
new file mode 100644
index 0000000..d93365f
--- /dev/null
+++ b/thirdparties/wince/include/wcecompat/process.h
@@ -0,0 +1,40 @@
+/* wcecompat: Windows CE C Runtime Library "compatibility" library.
+ *
+ * Copyright (C) 2001-2002 Essemer Pty Ltd. All rights reserved.
+ * http://www.essemer.com.au/
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+#ifndef __wcecompat__PROCESS_H__
+#define __wcecompat__PROCESS_H__
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+int __cdecl _getpid(void);
+#define getpid _getpid
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif // __wcecompat__PROCESS_H__
diff --git a/thirdparties/wince/include/wcecompat/setjmp.h b/thirdparties/wince/include/wcecompat/setjmp.h
new file mode 100644
index 0000000..2aaaa5b
--- /dev/null
+++ b/thirdparties/wince/include/wcecompat/setjmp.h
@@ -0,0 +1,69 @@
+/* wcecompat: Windows CE C Runtime Library "compatibility" library.
+ *
+ * Copyright (C) 2001-2002 Essemer Pty Ltd. All rights reserved.
+ * http://www.essemer.com.au/
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+#ifndef __wcecompat__SETJMP_H__
+#define __wcecompat__SETJMP_H__
+
+#include "stddef.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// Processor-dependent setjmp defns
+#ifdef _X86_
+
+#define setjmp _setjmp
+#define _JBLEN 16
+
+#elif defined(SHx) || defined(MIPS)
+
+#define setjmp _setjmp
+#define _JBLEN 32
+
+#elif defined(PPC)
+
+#define setjmp _setjmp
+#define _JBLEN 64
+
+#elif defined(ARM)
+
+#define setjmp _setjmp
+#define _JBLEN 11
+
+#elif defined(_M_CEE)
+
+#define setjmp _setjmp
+#define _JBLEN 64
+#endif
+
+// SETJMP: define the buffer type for holding the state information
+typedef int jmp_buf[_JBLEN];
+
+// SETJMP: function prototypes
+int __cdecl _setjmp(jmp_buf);
+void __cdecl longjmp(jmp_buf, int);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __wcecompat__SETJMP_H__ */
diff --git a/thirdparties/wince/include/wcecompat/signal.h b/thirdparties/wince/include/wcecompat/signal.h
new file mode 100644
index 0000000..3ef6ece
--- /dev/null
+++ b/thirdparties/wince/include/wcecompat/signal.h
@@ -0,0 +1,26 @@
+/* wcecompat: Windows CE C Runtime Library "compatibility" library.
+ *
+ * Copyright (C) 2001-2002 Essemer Pty Ltd. All rights reserved.
+ * http://www.essemer.com.au/
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+#ifndef __wcecompat__SIGNAL_H__
+#define __wcecompat__SIGNAL_H__
+
+
+#endif // __wcecompat__SIGNAL_H__
diff --git a/thirdparties/wince/include/wcecompat/stdarg.h b/thirdparties/wince/include/wcecompat/stdarg.h
new file mode 100644
index 0000000..bd6d42d
--- /dev/null
+++ b/thirdparties/wince/include/wcecompat/stdarg.h
@@ -0,0 +1,78 @@
+/* wcecompat: Windows CE C Runtime Library "compatibility" library.
+ *
+ * Copyright (C) 2001-2002 Essemer Pty Ltd. All rights reserved.
+ * http://www.essemer.com.au/
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+#ifndef __wcecompat__STDARG_H__
+#define __wcecompat__STDARG_H__
+
+#include "stddef.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if defined (_M_CEE)
+ typedef struct { void* p[4]; } va_list;
+#else
+ typedef char *va_list;
+#endif
+
+#ifdef MIPS
+
+#define va_start(ap,v) ap = (va_list)&v + sizeof(v)
+#define va_end(list) ( list = (va_list)0 )
+#define va_arg(list, mode) ((mode *)(list =\
+ (char *) ((((int)list + (__builtin_alignof(mode)<=4?3:7)) &\
+ (__builtin_alignof(mode)<=4?-4:-8))+sizeof(mode))))[-1]
+
+#elif defined(PPC)
+
+// PPC uses 8-byte alignment of 8-byte quantities
+#define _ALIGNIT(ap,t) ((((int)(ap))+(sizeof(t)<8?3:7)) & (sizeof(t)<8?~3:~7))
+
+#define _INTSIZEOF(n) ( (sizeof(n) + sizeof(int) - 1) & ~(sizeof(int) - 1) )
+#define va_start(ap,v) ( ap = (va_list)&v + _INTSIZEOF(v) )
+#define va_arg(ap,t) ( *(t *)((ap = (char *) (_ALIGNIT(ap, t) + _INTSIZEOF(t))) - _INTSIZEOF(t)) )
+#define va_end(ap) ( ap = (va_list)0 )
+
+#elif defined (_M_CEE)
+
+extern void __cdecl __va_start(va_list*, ...);
+extern void* __cdecl __va_arg(va_list*, ...);
+extern void __cdecl __va_end(va_list*);
+
+#define va_start(ap,v) (__va_start(&ap, &v, sizeof(v), __builtin_alignof(v), &v))
+#define va_arg(ap,t) (*((t*)__va_arg(&ap, sizeof(t), __builtin_alignof(t), (t*)0)))
+#define va_end(ap) (__va_end(&ap))
+
+#else
+
+#define _INTSIZEOF(n) ( (sizeof(n) + sizeof(int) - 1) & ~(sizeof(int) - 1) )
+#define va_start(ap,v) ( ap = (va_list)&v + _INTSIZEOF(v) )
+#define va_arg(ap,t) ( *(t *)((ap += _INTSIZEOF(t)) - _INTSIZEOF(t)) )
+#define va_end(ap) ( ap = (va_list)0 )
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __wcecompat__STDARG_H__ */
diff --git a/thirdparties/wince/include/wcecompat/stddef.h b/thirdparties/wince/include/wcecompat/stddef.h
new file mode 100644
index 0000000..65b9990
--- /dev/null
+++ b/thirdparties/wince/include/wcecompat/stddef.h
@@ -0,0 +1,86 @@
+/* wcecompat: Windows CE C Runtime Library "compatibility" library.
+ *
+ * Copyright (C) 2001-2002 Essemer Pty Ltd. All rights reserved.
+ * http://www.essemer.com.au/
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+#ifndef __wcecompat__STDDEF_H__
+#define __wcecompat__STDDEF_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Define _CRTAPI1 (for compatibility with the NT SDK) */
+#ifndef _CRTAPI1
+#if _MSC_VER >= 800 && _M_IX86 >= 300
+#define _CRTAPI1 __cdecl
+#else
+#define _CRTAPI1
+#endif
+#endif
+
+/* Define _CRTAPI2 (for compatibility with the NT SDK) */
+#ifndef _CRTAPI2
+#if _MSC_VER >= 800 && _M_IX86 >= 300
+#define _CRTAPI2 __cdecl
+#else
+#define _CRTAPI2
+#endif
+#endif
+
+#ifndef _CRTIMP
+#define _CRTIMP
+#endif
+
+#ifndef _SIZE_T_DEFINED
+typedef unsigned int size_t;
+#define _SIZE_T_DEFINED
+#endif
+
+#ifndef _WCHAR_T_DEFINED
+typedef unsigned short wchar_t;
+#define _WCHAR_T_DEFINED
+#endif
+
+#ifndef _WCTYPE_T_DEFINED
+typedef wchar_t wint_t;
+typedef wchar_t wctype_t;
+#define _WCTYPE_T_DEFINED
+#endif
+
+#ifndef _TIME_T_DEFINED
+typedef unsigned long time_t;
+#define _TIME_T_DEFINED /* avoid multiple def's of time_t */
+#endif
+
+#ifndef NULL
+#ifdef __cplusplus
+#define NULL 0
+#else
+#define NULL ((void *)0)
+#endif
+#endif
+
+#define offsetof(s,m) ((size_t)&(((s*)0)->m))
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __wcecompat__STDDEF_H__ */
diff --git a/thirdparties/wince/include/wcecompat/stdio.h b/thirdparties/wince/include/wcecompat/stdio.h
new file mode 100644
index 0000000..8fa86d2
--- /dev/null
+++ b/thirdparties/wince/include/wcecompat/stdio.h
@@ -0,0 +1,171 @@
+/* wcecompat: Windows CE C Runtime Library "compatibility" library.
+ *
+ * Copyright (C) 2001-2002 Essemer Pty Ltd. All rights reserved.
+ * http://www.essemer.com.au/
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+#ifndef __wcecompat__STDIO_H__
+#define __wcecompat__STDIO_H__
+
+#include "stddef.h"
+//#include "sys/types.h" /* size_t */
+#include "stdarg.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// STDIO constant defns
+#define _MAX_PATH MAX_PATH
+
+// EOF constants
+#define EOF (-1)
+#define WEOF (wint_t)(0xFFFF)
+
+// Seek method constants
+#define SEEK_CUR 1
+#define SEEK_END 2
+#define SEEK_SET 0
+
+// mode constants for _setmode()
+#define _O_TEXT 0x4000 /* file mode is text (translated) */
+#define _O_BINARY 0x8000 /* file mode is binary (untranslated) */
+
+// FILE is an opaque handle in Win CE. Users have no access to the internals
+#ifndef _FILE_DEFINED
+typedef void FILE;
+#define _FILE_DEFINED
+#endif
+
+#if _INTEGRAL_MAX_BITS >= 64
+typedef __int64 fpos_t;
+#else
+typedef long fpos_t;
+#endif
+
+// Std handle defns
+#define stdin _getstdfilex(0)
+#define stdout _getstdfilex(1)
+#define stderr _getstdfilex(2)
+
+// ANSI String formatting functions
+_CRTIMP int __cdecl sscanf(const char *, const char *, ...);
+_CRTIMP int __cdecl sprintf(char *, const char *, ...);
+_CRTIMP int __cdecl vsprintf(char *, const char *, va_list);
+_CRTIMP int __cdecl _snprintf(char *, size_t, const char *, ...);
+_CRTIMP int __cdecl _vsnprintf(char *, size_t, const char *, va_list);
+
+// Always present since wsprintfW (used by kernel) redirects to these
+_CRTIMP int __cdecl swprintf(wchar_t *, const wchar_t *, ...);
+_CRTIMP int __cdecl vswprintf(wchar_t *, const wchar_t *, va_list);
+_CRTIMP int __cdecl _snwprintf(wchar_t *, size_t, const wchar_t *, ...);
+_CRTIMP int __cdecl _vsnwprintf(wchar_t *, size_t, const wchar_t *, va_list);
+
+// WIDE String formatting functions
+_CRTIMP int __cdecl swscanf(const wchar_t *, const wchar_t *, ...);
+
+// ANSI Stdin/Out functions & macros
+_CRTIMP int __cdecl scanf(const char *, ...);
+_CRTIMP int __cdecl printf(const char *, ...);
+_CRTIMP int __cdecl vprintf(const char *, va_list);
+_CRTIMP int __cdecl getchar(void);
+_CRTIMP char * __cdecl gets(char *);
+_CRTIMP int __cdecl putchar(int);
+_CRTIMP int __cdecl puts(const char *);
+
+// ANSI functions for Stdin/out and/or general buffered file handling
+_CRTIMP int __cdecl fgetc(FILE *);
+_CRTIMP char * __cdecl fgets(char *, int, FILE *);
+_CRTIMP int __cdecl fputc(int, FILE *);
+_CRTIMP int __cdecl fputs(const char *, FILE *);
+_CRTIMP int __cdecl ungetc(int, FILE *);
+
+// ANSI functions for general buffered file handling
+_CRTIMP FILE * __cdecl fopen(const char *, const char *);
+_CRTIMP int __cdecl fscanf(FILE *, const char *, ...);
+_CRTIMP int __cdecl fprintf(FILE *, const char *, ...);
+_CRTIMP int __cdecl vfprintf(FILE *, const char *, va_list);
+
+#define getc(_stream) fgetc(_stream)
+#define putc(_i, _stream) fputc(_i, _stream)
+
+// functions for general buffered file handling in either ANSI or Wide
+_CRTIMP FILE* __cdecl _getstdfilex(int);
+_CRTIMP int __cdecl fclose(FILE *);
+_CRTIMP int __cdecl _fcloseall(void);
+_CRTIMP size_t __cdecl fread(void *, size_t, size_t, FILE *);
+_CRTIMP size_t __cdecl fwrite(const void *, size_t, size_t, FILE *);
+_CRTIMP int __cdecl fflush(FILE *);
+_CRTIMP int __cdecl _flushall(void);
+_CRTIMP int __cdecl feof(FILE *);
+_CRTIMP int __cdecl ferror(FILE *);
+_CRTIMP void __cdecl clearerr(FILE *);
+_CRTIMP int __cdecl fgetpos(FILE *, fpos_t *);
+_CRTIMP int __cdecl fsetpos(FILE *, const fpos_t *);
+_CRTIMP int __cdecl fseek(FILE *, long, int);
+_CRTIMP long __cdecl ftell(FILE *);
+_CRTIMP int __cdecl _fileno(FILE *);
+_CRTIMP int __cdecl _setmode(int fd, int mode);
+_CRTIMP FILE* __cdecl _wfdopen(void*, const wchar_t*);
+_CRTIMP FILE* __cdecl _wfreopen(const wchar_t *path, const wchar_t *mode, FILE *stream);
+// old names
+#define fcloseall _fcloseall
+#define fileno _fileno
+#define flushall _flushall
+
+// WIDE Stdin/Out functions & macros
+_CRTIMP int __cdecl wscanf(const wchar_t *, ...);
+_CRTIMP int __cdecl wprintf(const wchar_t *, ...);
+_CRTIMP int __cdecl vwprintf(const wchar_t *, va_list);
+_CRTIMP wint_t __cdecl getwchar(void);
+_CRTIMP wint_t __cdecl putwchar(wint_t);
+_CRTIMP wchar_t * __cdecl _getws(wchar_t *);
+_CRTIMP int __cdecl _putws(const wchar_t *);
+
+// WIDE functions for Stdin/out and/or general buffered file handling
+_CRTIMP wint_t __cdecl fgetwc(FILE *);
+_CRTIMP wint_t __cdecl fputwc(wint_t, FILE *);
+_CRTIMP wint_t __cdecl ungetwc(wint_t, FILE *);
+_CRTIMP wchar_t * __cdecl fgetws(wchar_t *, int, FILE *);
+_CRTIMP int __cdecl fputws(const wchar_t *, FILE *);
+
+#define getwc(_stm) fgetwc(_stm)
+#define putwc(_c,_stm) fputwc(_c,_stm)
+
+// WIDE functions for general buffered file handling
+_CRTIMP FILE * __cdecl _wfopen(const wchar_t *, const wchar_t *);
+_CRTIMP int __cdecl fwscanf(FILE *, const wchar_t *, ...);
+_CRTIMP int __cdecl fwprintf(FILE *, const wchar_t *, ...);
+_CRTIMP int __cdecl vfwprintf(FILE *, const wchar_t *, va_list);
+
+#define BUFSIZ (512)
+
+void perror(const char *prefix);
+
+_CRTIMP int __cdecl remove ( const char * filename );
+
+#define _IOFBF 0
+#define _IOLBF 1
+#define _IONBF 2
+int setvbuf(FILE* stream, char* buffer, int mode, size_t size);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __wcecompat__STDIO_H__ */
diff --git a/thirdparties/wince/include/wcecompat/stdlib.h b/thirdparties/wince/include/wcecompat/stdlib.h
new file mode 100644
index 0000000..81ff4b0
--- /dev/null
+++ b/thirdparties/wince/include/wcecompat/stdlib.h
@@ -0,0 +1,131 @@
+/* wcecompat: Windows CE C Runtime Library "compatibility" library.
+ *
+ * Copyright (C) 2001-2002 Essemer Pty Ltd. All rights reserved.
+ * http://www.essemer.com.au/
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+#ifndef __wcecompat__STDLIB_H__
+#define __wcecompat__STDLIB_H__
+
+#include "stddef.h"
+#include "malloc.h"
+#include "memory.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern int _fmode; /* default file translation mode */
+
+void abort(void);
+
+char * getenv(const char *name);
+int __cdecl _putenv(const char *);
+int __cdecl _wputenv(const wchar_t *);
+extern char** _environ; /* pointer to environment table */
+extern wchar_t** _wenviron; /* pointer to wide environment table */
+#define putenv _putenv
+#define environ _environ
+#ifdef UNICODE
+#define _tputenv _wputenv
+#define _tenviron _wenviron
+#else
+#define _tputenv _putenv
+#define _tenviron _environ
+#endif
+
+void * __cdecl bsearch(const void *key, const void *base, size_t nmemb, size_t size,
+ int (__cdecl * compar)(const void *, const void *));
+
+extern int __argc; /* count of cmd line args */
+extern char ** __argv; /* pointer to table of cmd line args */
+extern wchar_t ** __wargv; /* pointer to table of wide cmd line args */
+
+// min and max macros
+#define __max(a,b) (((a) > (b)) ? (a) : (b))
+#define __min(a,b) (((a) < (b)) ? (a) : (b))
+
+// Conversion function prototypes
+_CRTIMP double __cdecl strtod(const char *, char **);
+_CRTIMP long __cdecl strtol(const char *, char **, int);
+_CRTIMP unsigned long __cdecl strtoul(const char *, char **, int);
+_CRTIMP __int64 __cdecl _atoi64(const char *);
+_CRTIMP int __cdecl atoi(const char *);
+_CRTIMP double __cdecl atof(const char *);
+_CRTIMP long __cdecl atol(const char *);
+char * __cdecl _itoa(int, char *, int);
+char * __cdecl _ltoa(long, char *, int);
+char * __cdecl _ultoa(unsigned long, char *, int);
+char * __cdecl _ecvt(double, int, int *, int *);
+char * __cdecl _fcvt(double, int, int *, int *);
+char * __cdecl _gcvt(double, int, char *);
+_CRTIMP int __cdecl tolower(int);
+_CRTIMP int __cdecl toupper(int);
+_CRTIMP double __cdecl wcstod(const wchar_t *, wchar_t **);
+_CRTIMP long __cdecl wcstol(const wchar_t *, wchar_t **, int);
+wchar_t * __cdecl _ultow (unsigned long, wchar_t *, int);
+wchar_t * __cdecl _itow (int, wchar_t *, int);
+wchar_t * __cdecl _ltow (long, wchar_t *, int);
+_CRTIMP long __cdecl _wtol(const wchar_t *);
+_CRTIMP __int64 __cdecl _wtoll(const wchar_t *);
+unsigned long __cdecl wcstoul(const wchar_t *, wchar_t **, int);
+#define _wtoi _wtol
+#define _wtoi64 _wtoll
+
+// Extended logical Ops functions
+unsigned long __cdecl _lrotl(unsigned long, int);
+unsigned long __cdecl _lrotr(unsigned long, int);
+unsigned int __cdecl _rotl(unsigned int, int);
+unsigned int __cdecl _rotr(unsigned int, int);
+
+// Other misc STDLIB functions
+_CRTIMP void __cdecl _swab(char *, char *, int);
+_CRTIMP int __cdecl rand(void);
+_CRTIMP void __cdecl srand(unsigned int);
+void __cdecl qsort(void *, size_t, size_t, int (__cdecl *)(const void *, const void *));
+double __cdecl difftime(time_t, time_t);
+int __cdecl atexit(void (__cdecl *)(void));
+
+// Maximum value that can be returned by the rand function.
+#define RAND_MAX 0x7fff
+
+// onexit() defns
+#define EXIT_SUCCESS 0
+#define EXIT_FAILURE 1
+typedef int (__cdecl * _onexit_t)(void);
+#define onexit_t _onexit_t
+
+// Data structure & function definitions for div and ldiv runtimes
+typedef struct _div_t {
+ int quot;
+ int rem;
+} div_t;
+
+typedef struct _ldiv_t {
+ long quot;
+ long rem;
+} ldiv_t;
+
+div_t __cdecl div(int, int);
+ldiv_t __cdecl ldiv(long, long);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __wcecompat__STDLIB_H__ */
diff --git a/thirdparties/wince/include/wcecompat/string.h b/thirdparties/wince/include/wcecompat/string.h
new file mode 100644
index 0000000..30aef93
--- /dev/null
+++ b/thirdparties/wince/include/wcecompat/string.h
@@ -0,0 +1,101 @@
+/* wcecompat: Windows CE C Runtime Library "compatibility" library.
+ *
+ * Copyright (C) 2001-2002 Essemer Pty Ltd. All rights reserved.
+ * http://www.essemer.com.au/
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+#ifndef __wcecompat__STRING_H__
+#define __wcecompat__STRING_H__
+
+#include "stddef.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+char * __cdecl strerror(int errnum);
+
+// Widechar string functions
+_CRTIMP wchar_t * __cdecl wcscat(wchar_t *, const wchar_t *);
+_CRTIMP wchar_t * __cdecl wcschr(const wchar_t *, wchar_t);
+_CRTIMP int __cdecl wcscmp(const wchar_t *, const wchar_t *);
+_CRTIMP wchar_t * __cdecl wcscpy(wchar_t *, const wchar_t *);
+_CRTIMP size_t __cdecl wcscspn(const wchar_t *, const wchar_t *);
+_CRTIMP size_t __cdecl wcslen(const wchar_t *);
+_CRTIMP size_t __cdecl mbstowcs(wchar_t *wcstr, const char *mbstr, size_t count);
+_CRTIMP size_t __cdecl wcstombs(char *mbstr, const wchar_t *wcstr, size_t count);
+_CRTIMP wchar_t * __cdecl wcsncat(wchar_t *, const wchar_t *, size_t);
+_CRTIMP int __cdecl wcsncmp(const wchar_t *, const wchar_t *, size_t);
+_CRTIMP wchar_t * __cdecl wcsncpy(wchar_t *, const wchar_t *, size_t);
+_CRTIMP wchar_t * __cdecl wcspbrk(const wchar_t *, const wchar_t *);
+_CRTIMP wchar_t * __cdecl wcsrchr(const wchar_t *, wchar_t);
+_CRTIMP size_t __cdecl wcsspn(const wchar_t *, const wchar_t *);
+_CRTIMP wchar_t * __cdecl wcsstr(const wchar_t *, const wchar_t *);
+_CRTIMP wchar_t * __cdecl wcstok(wchar_t *, const wchar_t *);
+_CRTIMP wchar_t * __cdecl _wcsdup(const wchar_t *);
+_CRTIMP int __cdecl _wcsicmp(const wchar_t *, const wchar_t *);
+_CRTIMP int __cdecl _wcsnicmp(const wchar_t *, const wchar_t *, size_t);
+_CRTIMP wchar_t * __cdecl _wcsnset(wchar_t *, wchar_t, size_t);
+_CRTIMP wchar_t * __cdecl _wcsrev(wchar_t *);
+_CRTIMP wchar_t * __cdecl _wcsset(wchar_t *, wchar_t);
+_CRTIMP wchar_t * __cdecl _wcslwr(wchar_t *);
+_CRTIMP wchar_t * __cdecl _wcsupr(wchar_t *);
+
+void * __cdecl memcpy(void *, const void *, size_t);
+
+// Non STDC old names for above
+#define wcsdup _wcsdup
+#define wcsicmp _wcsicmp
+#define wcsnicmp _wcsnicmp
+#define wcsnset _wcsnset
+#define wcsrev _wcsrev
+#define wcsset _wcsset
+#define wcslwr _wcslwr
+#define wcsupr _wcsupr
+
+// ANSI string functions
+size_t __cdecl strlen(const char *);
+int __cdecl strcmp(const char *, const char *);
+char * __cdecl strcat(char *, const char *);
+char * __cdecl strcpy(char *, const char *);
+
+_CRTIMP char * __cdecl strchr(const char *, int);
+_CRTIMP size_t __cdecl strcspn(const char *, const char *);
+_CRTIMP char * __cdecl strncat(char *, const char *, size_t);
+_CRTIMP int __cdecl strncmp(const char *, const char *, size_t);
+_CRTIMP char * __cdecl strncpy(char *, const char *, size_t);
+_CRTIMP char * __cdecl strstr(const char *, const char *);
+_CRTIMP char * __cdecl strtok(char *, const char *);
+
+_CRTIMP int __cdecl _stricmp(const char *, const char *);
+_CRTIMP int __cdecl _strnicmp(const char *, const char *, size_t);
+_CRTIMP char * __cdecl strpbrk(const char *, const char *);
+_CRTIMP char * __cdecl strrchr(const char *, int);
+_CRTIMP size_t __cdecl strspn(const char *, const char *);
+_CRTIMP char * __cdecl _strdup(const char *);
+_CRTIMP char * __cdecl _strnset(char *, int, size_t);
+_CRTIMP char * __cdecl _strrev(char *);
+char * __cdecl _strset(char *, int);
+_CRTIMP char * __cdecl _strlwr(char *);
+_CRTIMP char * __cdecl _strupr(char *);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __wcecompat__STRING_H__ */
diff --git a/thirdparties/wince/include/wcecompat/sys/stat.h b/thirdparties/wince/include/wcecompat/sys/stat.h
new file mode 100644
index 0000000..f855cb5
--- /dev/null
+++ b/thirdparties/wince/include/wcecompat/sys/stat.h
@@ -0,0 +1,91 @@
+/* wcecompat: Windows CE C Runtime Library "compatibility" library.
+ *
+ * Copyright (C) 2001-2002 Essemer Pty Ltd. All rights reserved.
+ * http://www.essemer.com.au/
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+#ifndef __wcecompat__SYS__STAT_H__
+#define __wcecompat__SYS__STAT_H__
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#include <stdlib.h> /* time_t */
+
+
+#define _S_IFMT 0170000 /* file type mask */
+#define _S_IFDIR 0040000 /* directory */
+#define _S_IFCHR 0020000 /* character special */
+#define _S_IFIFO 0010000 /* pipe */
+#define _S_IFREG 0100000 /* regular */
+#define _S_IREAD 0000400 /* read permission, owner */
+#define _S_IWRITE 0000200 /* write permission, owner */
+#define _S_IEXEC 0000100 /* execute/search permission, owner */
+
+#define S_IFMT _S_IFMT
+#define S_IFDIR _S_IFDIR
+#define S_IFCHR _S_IFCHR
+#define S_IFIFO _S_IFIFO
+#define S_IFREG _S_IFREG
+#define S_IREAD _S_IREAD
+#define S_IWRITE _S_IWRITE
+#define S_IEXEC _S_IEXEC
+
+
+#ifndef _DEV_T_DEFINED
+typedef unsigned int _dev_t;
+#define _DEV_T_DEFINED
+#endif
+
+#ifndef _INO_T_DEFINED
+typedef unsigned short _ino_t;
+#define _INO_T_DEFINED
+#endif
+
+#ifndef _OFF_T_DEFINED
+typedef long _off_t;
+#define _OFF_T_DEFINED
+#endif
+
+struct stat
+{
+ _dev_t st_dev;
+ _ino_t st_ino;
+ unsigned short st_mode;
+ short st_nlink;
+ short st_uid;
+ short st_gid;
+ _dev_t st_rdev;
+ _off_t st_size;
+ time_t st_atime;
+ time_t st_mtime;
+ time_t st_ctime;
+};
+
+
+int __cdecl stat(const char *filename, struct stat *buf);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif // __wcecompat__SYS__STAT_H__
diff --git a/thirdparties/wince/include/wcecompat/sys/timeb.h b/thirdparties/wince/include/wcecompat/sys/timeb.h
new file mode 100644
index 0000000..722cedb
--- /dev/null
+++ b/thirdparties/wince/include/wcecompat/sys/timeb.h
@@ -0,0 +1,52 @@
+/* wcecompat: Windows CE C Runtime Library "compatibility" library.
+ *
+ * Copyright (C) 2001-2002 Essemer Pty Ltd. All rights reserved.
+ * http://www.essemer.com.au/
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+#ifndef __wcecompat__SYS__TIMEB_H__
+#define __wcecompat__SYS__TIMEB_H__
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#include <time.h>
+
+
+struct timeb
+{
+ time_t time;
+ unsigned short millitm;
+ short timezone;
+ short dstflag;
+};
+
+
+int __cdecl _ftime(struct timeb *tp);
+#define ftime _ftime
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif // __wcecompat__SYS__TIMEB_H__
diff --git a/thirdparties/wince/include/wcecompat/sys/types.h b/thirdparties/wince/include/wcecompat/sys/types.h
new file mode 100644
index 0000000..0983b39
--- /dev/null
+++ b/thirdparties/wince/include/wcecompat/sys/types.h
@@ -0,0 +1,32 @@
+/* wcecompat: Windows CE C Runtime Library "compatibility" library.
+ *
+ * Copyright (C) 2001-2002 Essemer Pty Ltd. All rights reserved.
+ * http://www.essemer.com.au/
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+#ifndef __wcecompat__SYS__TYPES_H__
+#define __wcecompat__SYS__TYPES_H__
+
+
+#ifndef _SIZE_T_DEFINED
+typedef unsigned int size_t;
+#define _SIZE_T_DEFINED
+#endif
+
+
+#endif // __wcecompat__SYS__TYPES_H__
diff --git a/thirdparties/wince/include/wcecompat/winsock_extras.h b/thirdparties/wince/include/wcecompat/winsock_extras.h
new file mode 100644
index 0000000..48cc0c8
--- /dev/null
+++ b/thirdparties/wince/include/wcecompat/winsock_extras.h
@@ -0,0 +1,41 @@
+/* wcecompat: Windows CE C Runtime Library "compatibility" library.
+ *
+ * Copyright (C) 2001-2002 Essemer Pty Ltd. All rights reserved.
+ * http://www.essemer.com.au/
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+#ifndef __wcecompat__WINSOCK_EXTRAS_H__
+#define __wcecompat__WINSOCK_EXTRAS_H__
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#include <winsock.h>
+
+struct servent* PASCAL getservbyname(const char* name, const char* proto);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif // __wcecompat__WINSOCK_EXTRAS_H__
OpenPOWER on IntegriCloud