Commit 135bceec536b05e0486b65a9e9c6daa4cd927d39
- Diff rendering mode:
- inline
- side by side
build/lib/evc.mak
(7 / 0)
|   | |||
| 20 | 20 | STLPORT_INCLUDE_DIR = ../../stlport | |
| 21 | 21 | !include Makefile.inc | |
| 22 | 22 | ||
| 23 | SRC_CPP = $(SRC_CPP) \ | ||
| 24 | ../../src/wince_time.cpp \ | ||
| 25 | ../../src/wince_env.cpp \ | ||
| 26 | ../../src/wince_multibyte.cpp \ | ||
| 27 | ../../src/wince_string.cpp \ | ||
| 28 | ../../src/wince_file.cpp | ||
| 29 | |||
| 23 | 30 | CROSS_COMPILING=1 | |
| 24 | 31 | ||
| 25 | 32 | DEFS_REL = /D_STLP_USE_DYNAMIC_LIB |
src/wince_env.cpp
(22 / 0)
|   | |||
| 1 | #if defined(UNDER_CE) | ||
| 2 | |||
| 3 | #include "stlport_prefix.h" | ||
| 4 | |||
| 5 | #if defined(_STLP_USE_WINCE_CRT_FUNCTIONS) | ||
| 6 | |||
| 7 | #include <stdlib.h> | ||
| 8 | |||
| 9 | // | ||
| 10 | // No environment variables exist | ||
| 11 | // | ||
| 12 | |||
| 13 | char * environ[] = {NULL}; | ||
| 14 | |||
| 15 | char * getenv(const char *) | ||
| 16 | { | ||
| 17 | return NULL; | ||
| 18 | } | ||
| 19 | |||
| 20 | #endif // _STLP_USE_WINCE_CRT_FUNCTIONS | ||
| 21 | |||
| 22 | #endif // UNDER_CE |
src/wince_file.cpp
(43 / 0)
|   | |||
| 1 | #if _WIN32_WCE >= 0x500 | ||
| 2 | |||
| 3 | #include "stlport_prefix.h" | ||
| 4 | |||
| 5 | #if defined(_STLP_USE_WINCE_CRT_FUNCTIONS) | ||
| 6 | |||
| 7 | #include <windows.h> | ||
| 8 | #include <stdio.h> | ||
| 9 | |||
| 10 | |||
| 11 | // | ||
| 12 | // Supply a replacement for the remove and rename CRT functions | ||
| 13 | // | ||
| 14 | |||
| 15 | int remove(const char * filename) | ||
| 16 | { | ||
| 17 | int filename_size = strlen(filename); | ||
| 18 | LPWSTR wide_filename = (LPWSTR)_alloca( (filename_size + 1) * sizeof(WCHAR) ); | ||
| 19 | if(::MultiByteToWideChar(CP_ACP, 0, filename, filename_size, wide_filename, filename_size + 1) == 0) | ||
| 20 | return true; | ||
| 21 | |||
| 22 | return (::DeleteFile(wide_filename) == 0); | ||
| 23 | } | ||
| 24 | |||
| 25 | int rename(const char * oldname, const char * newname) | ||
| 26 | { | ||
| 27 | int oldname_size = strlen(oldname); | ||
| 28 | LPWSTR wide_oldname = (LPWSTR)_alloca( (oldname_size + 1) * sizeof(WCHAR) ); | ||
| 29 | if(::MultiByteToWideChar(CP_ACP, 0, oldname, oldname_size, wide_oldname, oldname_size + 1) == 0) | ||
| 30 | return true; | ||
| 31 | |||
| 32 | int newname_size = strlen(newname); | ||
| 33 | LPWSTR wide_newname = (LPWSTR)_alloca( (newname_size + 1) * sizeof(WCHAR) ); | ||
| 34 | if(::MultiByteToWideChar(CP_ACP, 0, newname, newname_size, wide_newname, newname_size + 1) == 0) | ||
| 35 | return true; | ||
| 36 | |||
| 37 | return (::MoveFile(wide_oldname, wide_newname) == 0); | ||
| 38 | } | ||
| 39 | |||
| 40 | |||
| 41 | #endif // _STLP_USE_WINCE_CRT_FUNCTIONS | ||
| 42 | |||
| 43 | #endif // _WIN32_WCE >= 0x500 |
src/wince_multibyte.cpp
(54 / 0)
|   | |||
| 1 | #ifdef UNDER_CE | ||
| 2 | |||
| 3 | #include "stlport_prefix.h" | ||
| 4 | |||
| 5 | #if defined(_STLP_USE_WINCE_CRT_FUNCTIONS) | ||
| 6 | |||
| 7 | #include <windows.h> | ||
| 8 | #include <wchar.h> | ||
| 9 | |||
| 10 | // | ||
| 11 | // Supply a replacement for the mbtowc and wctomb CRT functions that Windows CE does not include | ||
| 12 | // (at the moment, these routines simply use the system default code page) | ||
| 13 | // | ||
| 14 | |||
| 15 | int wctomb(char * s, wchar_t wchar) | ||
| 16 | { | ||
| 17 | int retVal = ::WideCharToMultiByte(CP_ACP, 0, &wchar, 1, s, 10, NULL, NULL); | ||
| 18 | if (retVal != 0) | ||
| 19 | return retVal; | ||
| 20 | |||
| 21 | return -1; | ||
| 22 | } | ||
| 23 | |||
| 24 | int mbtowc(wchar_t * pwc, char const * s, size_t n) | ||
| 25 | { | ||
| 26 | if (!s || n == 0) | ||
| 27 | return 0; | ||
| 28 | |||
| 29 | if (!pwc) | ||
| 30 | pwc = (wchar_t *)_alloca( sizeof(wchar_t) ); | ||
| 31 | |||
| 32 | int mbCharLen = mblen(s, n); | ||
| 33 | if (::MultiByteToWideChar(CP_ACP, 0, s, ((mbCharLen > 0) ? mbCharLen : 1), pwc, 1) == 0) | ||
| 34 | return -1; | ||
| 35 | |||
| 36 | return mbCharLen; | ||
| 37 | } | ||
| 38 | |||
| 39 | |||
| 40 | int mblen(char const * s, size_t n) | ||
| 41 | { | ||
| 42 | if (n == 0 || !s || s[0] == 0) | ||
| 43 | return 0; | ||
| 44 | |||
| 45 | if (n == 1 || !IsDBCSLeadByte( s[0] ) || s[1] == 0) | ||
| 46 | return 1; | ||
| 47 | |||
| 48 | return 2; | ||
| 49 | } | ||
| 50 | |||
| 51 | |||
| 52 | #endif // _STLP_USE_WINCE_CRT_FUNCTIONS | ||
| 53 | |||
| 54 | #endif // UNDER_CE |
src/wince_string.cpp
(47 / 0)
|   | |||
| 1 | #ifdef UNDER_CE | ||
| 2 | |||
| 3 | #include "stlport_prefix.h" | ||
| 4 | |||
| 5 | #if defined(_STLP_USE_WINCE_CRT_FUNCTIONS) | ||
| 6 | |||
| 7 | // | ||
| 8 | // Supply a replacement for the strerror, strxfrm, and wcsxfrm CRT functions that Windows CE | ||
| 9 | // does not include (at the moment, these routines assume the "C" locale) | ||
| 10 | // | ||
| 11 | |||
| 12 | #include <errno.h> | ||
| 13 | #include <string.h> | ||
| 14 | #include <wchar.h> | ||
| 15 | |||
| 16 | char * strerror(int errnum) | ||
| 17 | { | ||
| 18 | char * error_message[] = { | ||
| 19 | NULL, "EPERM", "ENOENT", "ERSCH", "EINTR", "EIO", "ENXIO", "E2BIG", "ENOEXEC", "EBADF", | ||
| 20 | "ECHILD", "EAGAIN", "ENOMEM", "EACCES", "EFAULT", NULL, "EBUSY", "EEXIST", "EXDEV", "ENODEV", | ||
| 21 | "ENOTDIR", "EISDIR", NULL, "ENFILE", "EMFILE", "ENOTTY", NULL, "EFBIG", "ENOSPC", "ESPIPE", | ||
| 22 | "EROFS", "EMLINK", "EPIPE", "EDOM", NULL, NULL, "EDEADLK", NULL, "ENAMETOOLONG", "ENOLCK", | ||
| 23 | "ENOSYS", "ENOTEMPTY" | ||
| 24 | }; | ||
| 25 | |||
| 26 | if (errnum >= (sizeof(error_message) / sizeof(char *))) | ||
| 27 | return NULL; | ||
| 28 | |||
| 29 | return error_message[errnum]; | ||
| 30 | } | ||
| 31 | |||
| 32 | size_t strxfrm(char * strDest, char const * strSource, size_t count) | ||
| 33 | { | ||
| 34 | strncpy(strDest, strSource, count); | ||
| 35 | return strlen(strDest); | ||
| 36 | } | ||
| 37 | |||
| 38 | size_t wcsxfrm(wchar_t * strDest, wchar_t const * strSource, size_t count) | ||
| 39 | { | ||
| 40 | wcsncpy(strDest, strSource, count); | ||
| 41 | return wcslen(strDest); | ||
| 42 | } | ||
| 43 | |||
| 44 | |||
| 45 | #endif // _STLP_USE_WINCE_CRT_FUNCTIONS | ||
| 46 | |||
| 47 | #endif // UNDER_CE |
src/wince_time.cpp
(160 / 0)
|   | |||
| 1 | #ifdef UNDER_CE | ||
| 2 | |||
| 3 | #include "stlport_prefix.h" | ||
| 4 | |||
| 5 | #if defined(_STLP_USE_WINCE_CRT_FUNCTIONS) | ||
| 6 | |||
| 7 | #include <windows.h> | ||
| 8 | |||
| 9 | |||
| 10 | // | ||
| 11 | // Supply a replacement for the time CRT function that Windows CE declares but never defines | ||
| 12 | // | ||
| 13 | |||
| 14 | #include <time.h> | ||
| 15 | |||
| 16 | static void ConvertFileTimeToUnixTime(const FILETIME & fileTime, time_t & unixTime) | ||
| 17 | { | ||
| 18 | // Subtract off the diffence from 1 Jan 1601 to 1 Jan 1970 | ||
| 19 | unsigned long long newTime = ((unsigned long long)fileTime.dwHighDateTime << 32) | (fileTime.dwLowDateTime); | ||
| 20 | newTime -= 116444736000000000; | ||
| 21 | |||
| 22 | // Convert from 100 nanoseconds to seconds | ||
| 23 | unixTime = time_t(newTime / 10000000); | ||
| 24 | } | ||
| 25 | |||
| 26 | |||
| 27 | static void ConvertUnixTimeToFileTime(time_t unixTime, FILETIME & fileTime) | ||
| 28 | { | ||
| 29 | // Convert from seconds to 100 nanoseconds | ||
| 30 | unsigned long long newTime = (unsigned long long)unixTime * (unsigned long long)10000000; | ||
| 31 | |||
| 32 | // Add in the diffence from 1 Jan 1601 to 1 Jan 1970 | ||
| 33 | newTime += 116444736000000000; | ||
| 34 | |||
| 35 | fileTime.dwLowDateTime = (newTime & 0xFFFFFFFF); | ||
| 36 | fileTime.dwHighDateTime = ((newTime >> 32) & 0xFFFFFFFF); | ||
| 37 | } | ||
| 38 | |||
| 39 | const int first_yday_of_month[12] = {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334}; | ||
| 40 | |||
| 41 | static void ConvertSystemTimeToTM(const SYSTEMTIME & sysTime, struct tm & gtime ) | ||
| 42 | { | ||
| 43 | gtime.tm_sec = sysTime.wSecond; | ||
| 44 | gtime.tm_min = sysTime.wMinute; | ||
| 45 | gtime.tm_hour = sysTime.wHour; | ||
| 46 | gtime.tm_mday = sysTime.wDay; | ||
| 47 | gtime.tm_mon = (sysTime.wMonth - 1); | ||
| 48 | gtime.tm_year = (sysTime.wYear - 1900); | ||
| 49 | gtime.tm_wday = sysTime.wDayOfWeek; | ||
| 50 | gtime.tm_isdst = 0; | ||
| 51 | |||
| 52 | gtime.tm_yday = first_yday_of_month[ gtime.tm_mon ] + (gtime.tm_mday - 1); | ||
| 53 | |||
| 54 | // If it is a leap year and we are after February, add one day | ||
| 55 | if (gtime.tm_mon > 1 && (((sysTime.wYear % 400) == 0) || (((sysTime.wYear % 4) == 0) && ((sysTime.wYear % 100) != 0)))) | ||
| 56 | ++gtime.tm_yday; | ||
| 57 | } | ||
| 58 | |||
| 59 | |||
| 60 | |||
| 61 | time_t time(time_t * timer) | ||
| 62 | { | ||
| 63 | SYSTEMTIME sysTime; | ||
| 64 | GetSystemTime( &sysTime ); | ||
| 65 | |||
| 66 | FILETIME fileTime; | ||
| 67 | SystemTimeToFileTime( &sysTime, &fileTime ); | ||
| 68 | |||
| 69 | time_t unixTime; | ||
| 70 | ConvertFileTimeToUnixTime( fileTime, unixTime ); | ||
| 71 | |||
| 72 | if (timer) | ||
| 73 | *timer = unixTime; | ||
| 74 | |||
| 75 | return unixTime; | ||
| 76 | } | ||
| 77 | |||
| 78 | |||
| 79 | // | ||
| 80 | // Supply a replacement for the clock CRT function that Windows CE declares but never defines | ||
| 81 | // | ||
| 82 | |||
| 83 | clock_t clock() | ||
| 84 | { | ||
| 85 | unsigned int ticks = GetTickCount(); | ||
| 86 | return (ticks * CLOCKS_PER_SEC / 1000); | ||
| 87 | } | ||
| 88 | |||
| 89 | |||
| 90 | // | ||
| 91 | // Supply replacements for the gmtime and localtime CRT functions that Windows CE declares but never defines | ||
| 92 | // | ||
| 93 | |||
| 94 | static DWORD g_TimeHolderTLSIndex = 0xFFFFFFFF; | ||
| 95 | |||
| 96 | static struct tm * GetTimeHolder() | ||
| 97 | { | ||
| 98 | if (g_TimeHolderTLSIndex == 0xFFFFFFFF) | ||
| 99 | { | ||
| 100 | DWORD newIndex = TlsAlloc(); | ||
| 101 | if (InterlockedCompareExchangePointer((PVOID*)&g_TimeHolderTLSIndex, (PVOID)newIndex, (PVOID)0xFFFFFFFF) != (PVOID)0xFFFFFFFF) | ||
| 102 | TlsFree( newIndex ); | ||
| 103 | } | ||
| 104 | |||
| 105 | struct tm * pTimeHolder = (struct tm *)TlsGetValue( g_TimeHolderTLSIndex ); | ||
| 106 | if (!pTimeHolder) | ||
| 107 | { | ||
| 108 | pTimeHolder = (struct tm *)LocalAlloc(0, sizeof(struct tm)); | ||
| 109 | TlsSetValue( g_TimeHolderTLSIndex, (PVOID)pTimeHolder ); | ||
| 110 | } | ||
| 111 | |||
| 112 | return pTimeHolder; | ||
| 113 | } | ||
| 114 | |||
| 115 | |||
| 116 | struct tm * gmtime(const time_t * timer) | ||
| 117 | { | ||
| 118 | if (!timer || *timer < 0) | ||
| 119 | return NULL; | ||
| 120 | |||
| 121 | struct tm * pTimeHolder = GetTimeHolder(); | ||
| 122 | if (!pTimeHolder) | ||
| 123 | return NULL; | ||
| 124 | |||
| 125 | FILETIME fileTime; | ||
| 126 | ConvertUnixTimeToFileTime( *timer, fileTime ); | ||
| 127 | |||
| 128 | SYSTEMTIME sysTime; | ||
| 129 | FileTimeToSystemTime( &fileTime, &sysTime ); | ||
| 130 | |||
| 131 | ConvertSystemTimeToTM( sysTime, *pTimeHolder ); | ||
| 132 | return pTimeHolder; | ||
| 133 | } | ||
| 134 | |||
| 135 | struct tm * localtime(const time_t * timer) | ||
| 136 | { | ||
| 137 | if (!timer || *timer < 0) | ||
| 138 | return NULL; | ||
| 139 | |||
| 140 | struct tm * pTimeHolder = GetTimeHolder(); | ||
| 141 | if (!pTimeHolder) | ||
| 142 | return NULL; | ||
| 143 | |||
| 144 | FILETIME fileTime; | ||
| 145 | ConvertUnixTimeToFileTime( *timer, fileTime ); | ||
| 146 | |||
| 147 | FILETIME localFileTime; | ||
| 148 | FileTimeToLocalFileTime( &fileTime, &localFileTime ); | ||
| 149 | |||
| 150 | SYSTEMTIME sysTime; | ||
| 151 | FileTimeToSystemTime( &localFileTime, &sysTime ); | ||
| 152 | |||
| 153 | ConvertSystemTimeToTM( sysTime, *pTimeHolder ); | ||
| 154 | return pTimeHolder; | ||
| 155 | } | ||
| 156 | |||
| 157 | |||
| 158 | #endif // _STLP_USE_WINCE_CRT_FUNCTIONS | ||
| 159 | |||
| 160 | #endif // UNDER_CE |
stlport/errno.h
(3 / 0)
|   | |||
| 22 | 22 | ||
| 23 | 23 | #ifdef _STLP_WCE | |
| 24 | 24 | /* only show message when directly including this file in a non-library build */ | |
| 25 | /* | ||
| 25 | 26 | # if !defined(__BUILDING_STLPORT) && (_STLP_OUTERMOST_HEADER_ID == 0x205) | |
| 26 | 27 | # pragma message("eMbedded Visual C++ 3 and .NET don't have a errno.h header; STLport won't include native errno.h here") | |
| 27 | 28 | # endif | |
| 29 | */ | ||
| 30 | # include <wince/errno.h> | ||
| 28 | 31 | #else | |
| 29 | 32 | # ifndef errno | |
| 30 | 33 | # if defined (_STLP_HAS_INCLUDE_NEXT) |
stlport/stdio.h
(4 / 0)
|   | |||
| 45 | 45 | _STLP_END_NAMESPACE | |
| 46 | 46 | # endif | |
| 47 | 47 | ||
| 48 | # if defined(_STLP_WCE) | ||
| 49 | # include <wince/stdio.h> | ||
| 50 | # endif | ||
| 51 | |||
| 48 | 52 | # if (_STLP_OUTERMOST_HEADER_ID == 0x264) | |
| 49 | 53 | # if !defined (_STLP_DONT_POP_HEADER_ID) | |
| 50 | 54 | # include <stl/_epilog.h> |
stlport/stdlib.h
(1 / 0)
|   | |||
| 53 | 53 | /* on evc3/evc4 including stdlib.h also defines setjmp macro */ | |
| 54 | 54 | # if defined (_STLP_WCE) | |
| 55 | 55 | # define _STLP_NATIVE_SETJMP_H_INCLUDED | |
| 56 | # include <wince/stdlib.h> | ||
| 56 | 57 | # endif | |
| 57 | 58 | ||
| 58 | 59 | # if (_STLP_OUTERMOST_HEADER_ID == 0x265) |
stlport/stl/_cstdio.h
(3 / 1)
|   | |||
| 100 | 100 | # endif | |
| 101 | 101 | using _STLP_VENDOR_CSTD::printf; | |
| 102 | 102 | using _STLP_VENDOR_CSTD::puts; | |
| 103 | # if !defined (_WIN32_WCE) || (_WIN32_WCE < 400) | ||
| 103 | # if !defined (_WIN32_WCE) || (_WIN32_WCE < 400) || defined(_STLP_USE_WINCE_CRT_FUNCTIONS) | ||
| 104 | 104 | using _STLP_VENDOR_CSTD::remove; | |
| 105 | 105 | using _STLP_VENDOR_CSTD::rename; | |
| 106 | # endif | ||
| 107 | # if !defined (_WIN32_WCE) || (_WIN32_WCE < 400) | ||
| 106 | 108 | using _STLP_VENDOR_CSTD::rewind; | |
| 107 | 109 | using _STLP_VENDOR_CSTD::setbuf; | |
| 108 | 110 | using _STLP_VENDOR_CSTD::tmpfile; |
stlport/stl/_cstdlib.h
(5 / 3)
|   | |||
| 61 | 61 | # ifndef _STLP_WCE | |
| 62 | 62 | // these functions just don't exist on Windows CE | |
| 63 | 63 | using _STLP_VENDOR_CSTD::abort; | |
| 64 | using _STLP_VENDOR_CSTD::system; | ||
| 65 | using _STLP_VENDOR_CSTD::bsearch; | ||
| 66 | # endif | ||
| 67 | # if !defined(_STLP_WCE) || defined(_STLP_USE_WINCE_CRT_FUNCTIONS) | ||
| 64 | 68 | using _STLP_VENDOR_CSTD::getenv; | |
| 65 | 69 | using _STLP_VENDOR_CSTD::mblen; | |
| 66 | 70 | using _STLP_VENDOR_CSTD::mbtowc; | |
| 67 | using _STLP_VENDOR_CSTD::system; | ||
| 68 | using _STLP_VENDOR_CSTD::bsearch; | ||
| 69 | 71 | # endif | |
| 70 | 72 | using _STLP_VENDOR_CSTD::atexit; | |
| 71 | 73 | using _STLP_VENDOR_CSTD::exit; | |
| … | … | ||
| 85 | 85 | ||
| 86 | 86 | # if !(defined (_STLP_NO_NATIVE_WIDE_STREAMS) || defined (_STLP_NO_NATIVE_MBSTATE_T)) | |
| 87 | 87 | using _STLP_VENDOR_CSTD::wcstombs; | |
| 88 | # ifndef _STLP_WCE | ||
| 88 | # if !defined(_STLP_WCE) || defined(_STLP_USE_WINCE_CRT_FUNCTIONS) | ||
| 89 | 89 | using _STLP_VENDOR_CSTD::wctomb; | |
| 90 | 90 | # endif | |
| 91 | 91 | # endif |
stlport/stl/config/user_config.h
(10 / 0)
|   | |||
| 317 | 317 | */ | |
| 318 | 318 | ||
| 319 | 319 | ||
| 320 | /* | ||
| 321 | * The Windows CE C runtime library chooses to omit certain functions. Replacements are | ||
| 322 | * provided for some of the more basic of these functions. Defining this macro chooses | ||
| 323 | * to include these replacement CRT functions in the libraries. | ||
| 324 | */ | ||
| 325 | |||
| 326 | /* | ||
| 327 | #define _STLP_USE_WINCE_CRT_FUNCTIONS 1 | ||
| 328 | */ | ||
| 329 | |||
| 320 | 330 | /*==========================================================*/ | |
| 321 | 331 | ||
| 322 | 332 | /* |
stlport/string.h
(4 / 0)
|   | |||
| 54 | 54 | # endif | |
| 55 | 55 | # endif | |
| 56 | 56 | ||
| 57 | # if defined(_STLP_WCE) | ||
| 58 | # include <wince/string.h> | ||
| 59 | # endif | ||
| 60 | |||
| 57 | 61 | # if (_STLP_OUTERMOST_HEADER_ID == 0x269) | |
| 58 | 62 | # if !defined (_STLP_DONT_POP_HEADER_ID) | |
| 59 | 63 | # include <stl/_epilog.h> |
stlport/time.h
(2 / 0)
|   | |||
| 25 | 25 | # if !defined(__BUILDING_STLPORT) && (_STLP_OUTERMOST_HEADER_ID == 0x272) | |
| 26 | 26 | # pragma message("eMbedded Visual C++ 3 doesn't have a time.h header; STLport won't include native time.h here") | |
| 27 | 27 | # endif | |
| 28 | #elif defined(_STLP_WCE) | ||
| 29 | # include <wince/time.h> | ||
| 28 | 30 | #else | |
| 29 | 31 | # if defined (_STLP_HAS_INCLUDE_NEXT) | |
| 30 | 32 | # include_next <time.h> |
stlport/using/cstring
(2 / 0)
|   | |||
| 16 | 16 | # if !defined (_STLP_WCE) | |
| 17 | 17 | // these functions just don't exist on Windows CE | |
| 18 | 18 | using _STLP_VENDOR_CSTD::strcoll; | |
| 19 | # endif | ||
| 20 | # if !defined (_STLP_WCE) || defined(_STLP_USE_WINCE_CRT_FUNCTIONS) | ||
| 19 | 21 | using _STLP_VENDOR_CSTD::strerror; | |
| 20 | 22 | using _STLP_VENDOR_CSTD::strxfrm; | |
| 21 | 23 | # endif |
stlport/wchar.h
(4 / 0)
|   | |||
| 53 | 53 | # include <stl/_mbstate_t.h> | |
| 54 | 54 | #endif | |
| 55 | 55 | ||
| 56 | #if defined(_STLP_WCE) | ||
| 57 | # include <wince/wchar.h> | ||
| 58 | #endif | ||
| 59 | |||
| 56 | 60 | #if (_STLP_OUTERMOST_HEADER_ID == 0x278) | |
| 57 | 61 | # if ! defined (_STLP_DONT_POP_HEADER_ID) | |
| 58 | 62 | # include <stl/_epilog.h> |
stlport/wince/errno.h
(45 / 0)
|   | |||
| 1 | #ifndef _STLP_INTERNAL_WINCE_ERRNO_H | ||
| 2 | #define _STLP_INTERNAL_WINCE_ERRNO_H | ||
| 3 | |||
| 4 | #if defined(_STLP_USE_WINCE_CRT_FUNCTIONS) | ||
| 5 | |||
| 6 | /* Define Error Codes that should be in errno.h */ | ||
| 7 | #define EPERM 1 | ||
| 8 | #define ENOENT 2 | ||
| 9 | #define ESRCH 3 | ||
| 10 | #define EINTR 4 | ||
| 11 | #define EIO 5 | ||
| 12 | #define ENXIO 6 | ||
| 13 | #define E2BIG 7 | ||
| 14 | #define ENOEXEC 8 | ||
| 15 | #define EBADF 9 | ||
| 16 | #define ECHILD 10 | ||
| 17 | #define EAGAIN 11 | ||
| 18 | #define ENOMEM 12 | ||
| 19 | #define EACCES 13 | ||
| 20 | #define EFAULT 14 | ||
| 21 | #define EBUSY 16 | ||
| 22 | #define EEXIST 17 | ||
| 23 | #define EXDEV 18 | ||
| 24 | #define ENODEV 19 | ||
| 25 | #define ENOTDIR 20 | ||
| 26 | #define EISDIR 21 | ||
| 27 | #define ENFILE 23 | ||
| 28 | #define EMFILE 24 | ||
| 29 | #define ENOTTY 25 | ||
| 30 | #define EFBIG 27 | ||
| 31 | #define ENOSPC 28 | ||
| 32 | #define ESPIPE 29 | ||
| 33 | #define EROFS 30 | ||
| 34 | #define EMLINK 31 | ||
| 35 | #define EPIPE 32 | ||
| 36 | #define EDOM 33 | ||
| 37 | #define EDEADLK 36 | ||
| 38 | #define ENAMETOOLONG 38 | ||
| 39 | #define ENOLCK 39 | ||
| 40 | #define ENOSYS 40 | ||
| 41 | #define ENOTEMPTY 41 | ||
| 42 | |||
| 43 | #endif /* _STLP_USE_WINCE_CRT_FUNCTIONS */ | ||
| 44 | |||
| 45 | #endif /* _STLP_INTERNAL_WINCE_ERRNO_H */ |
stlport/wince/stdio.h
(24 / 0)
|   | |||
| 1 | #ifndef _STLP_INTERNAL_WINCE_STDIO_H | ||
| 2 | #define _STLP_INTERNAL_WINCE_STDIO_H | ||
| 3 | |||
| 4 | #if _WIN32_WCE >= 0x500 | ||
| 5 | |||
| 6 | #if defined(_STLP_USE_WINCE_CRT_FUNCTIONS) | ||
| 7 | |||
| 8 | # if defined(__cplusplus) | ||
| 9 | extern "C" { | ||
| 10 | # endif | ||
| 11 | |||
| 12 | /* File functions that we are adding for Windows CE */ | ||
| 13 | _STLP_DECLSPEC int _STLP_CALL remove(char const * filename); | ||
| 14 | _STLP_DECLSPEC int _STLP_CALL rename(char const * oldname, char const * newname); | ||
| 15 | |||
| 16 | # if defined(__cplusplus) | ||
| 17 | } | ||
| 18 | # endif | ||
| 19 | |||
| 20 | #endif /* _STLP_USE_WINCE_CRT_FUNCTIONS */ | ||
| 21 | |||
| 22 | #endif /* _WIN32_WCE >= 0x500 */ | ||
| 23 | |||
| 24 | #endif /* _STLP_INTERNAL_WINCE_STDIO_H */ |
stlport/wince/stdlib.h
(25 / 0)
|   | |||
| 1 | #ifndef _STLP_INTERNAL_WINCE_STDLIB_H | ||
| 2 | #define _STLP_INTERNAL_WINCE_STDLIB_H | ||
| 3 | |||
| 4 | #if defined(_STLP_USE_WINCE_CRT_FUNCTIONS) | ||
| 5 | |||
| 6 | #if defined(__cplusplus) | ||
| 7 | extern "C" { | ||
| 8 | #endif | ||
| 9 | |||
| 10 | /* Multi-byte definitions that we are adding for Windows CE */ | ||
| 11 | _STLP_DECLSPEC int _STLP_CALL wctomb(char * mbchar, wchar_t wchar); | ||
| 12 | _STLP_DECLSPEC int _STLP_CALL mbtowc(wchar_t * wchar, char const * mbchar, size_t count); | ||
| 13 | _STLP_DECLSPEC int _STLP_CALL mblen(char const * mbstr, size_t count); | ||
| 14 | |||
| 15 | /* Environment definitions that we are adding for Windows CE */ | ||
| 16 | _STLP_DECLSPEC extern char * environ[]; | ||
| 17 | _STLP_DECLSPEC char * _STLP_CALL getenv(char const * name); | ||
| 18 | |||
| 19 | #if defined(__cplusplus) | ||
| 20 | } | ||
| 21 | #endif | ||
| 22 | |||
| 23 | #endif /* _STLP_USE_WINCE_CRT_FUNCTIONS */ | ||
| 24 | |||
| 25 | #endif /* _STLP_INTERNAL_WINCE_STDLIB_H */ |
stlport/wince/string.h
(20 / 0)
|   | |||
| 1 | #ifndef _STLP_INTERNAL_WINCE_STRING_H | ||
| 2 | #define _STLP_INTERNAL_WINCE_STRING_H | ||
| 3 | |||
| 4 | #if defined(_STLP_USE_WINCE_CRT_FUNCTIONS) | ||
| 5 | |||
| 6 | #if defined(__cplusplus) | ||
| 7 | extern "C" { | ||
| 8 | #endif | ||
| 9 | |||
| 10 | /* Include the string transform function that we are supplying for Windows CE */ | ||
| 11 | _STLP_DECLSPEC char * _STLP_CALL strerror(int errnum); | ||
| 12 | _STLP_DECLSPEC size_t _STLP_CALL strxfrm(char * strDest, char const * strSource, size_t count); | ||
| 13 | |||
| 14 | #if defined(__cplusplus) | ||
| 15 | } | ||
| 16 | #endif | ||
| 17 | |||
| 18 | #endif /* _STLP_USE_WINCE_CRT_FUNCTIONS */ | ||
| 19 | |||
| 20 | #endif /* _STLP_INTERNAL_WINCE_STRING_H */ |
stlport/wince/time.h
(96 / 0)
|   | |||
| 1 | #ifndef _STLP_INTERNAL_WINCE_TIME_H | ||
| 2 | #define _STLP_INTERNAL_WINCE_TIME_H | ||
| 3 | |||
| 4 | #if defined(_STLP_USE_WINCE_CRT_FUNCTIONS) | ||
| 5 | |||
| 6 | #ifdef __cplusplus | ||
| 7 | extern "C" { | ||
| 8 | #endif | ||
| 9 | |||
| 10 | |||
| 11 | #ifndef _WCHAR_T_DEFINED | ||
| 12 | typedef unsigned short wchar_t; | ||
| 13 | #define _WCHAR_T_DEFINED | ||
| 14 | #endif | ||
| 15 | |||
| 16 | #ifndef _TIME_T_DEFINED | ||
| 17 | typedef long time_t; | ||
| 18 | #define _TIME_T_DEFINED | ||
| 19 | #endif | ||
| 20 | |||
| 21 | #ifndef _CLOCK_T_DEFINED | ||
| 22 | typedef long clock_t; | ||
| 23 | #define _CLOCK_T_DEFINED | ||
| 24 | #endif | ||
| 25 | |||
| 26 | #ifndef _SIZE_T_DEFINED | ||
| 27 | typedef unsigned int size_t; | ||
| 28 | #define _SIZE_T_DEFINED | ||
| 29 | #endif | ||
| 30 | |||
| 31 | |||
| 32 | /* Define NULL pointer value */ | ||
| 33 | |||
| 34 | #ifndef NULL | ||
| 35 | #ifdef __cplusplus | ||
| 36 | #define NULL 0 | ||
| 37 | #else | ||
| 38 | #define NULL ((void *)0) | ||
| 39 | #endif | ||
| 40 | #endif | ||
| 41 | |||
| 42 | |||
| 43 | #ifndef _TM_DEFINED | ||
| 44 | struct tm | ||
| 45 | { | ||
| 46 | int tm_sec; | ||
| 47 | int tm_min; | ||
| 48 | int tm_hour; | ||
| 49 | int tm_mday; | ||
| 50 | int tm_mon; | ||
| 51 | int tm_year; | ||
| 52 | int tm_wday; | ||
| 53 | int tm_yday; | ||
| 54 | int tm_isdst; | ||
| 55 | }; | ||
| 56 | #define _TM_DEFINED | ||
| 57 | #endif | ||
| 58 | |||
| 59 | |||
| 60 | #define CLOCKS_PER_SEC 1000 | ||
| 61 | |||
| 62 | |||
| 63 | /* Function prototypes */ | ||
| 64 | _STLP_DECLSPEC char * _STLP_CALL asctime(const struct tm *); | ||
| 65 | _STLP_DECLSPEC char * _STLP_CALL ctime(const time_t *); | ||
| 66 | _STLP_DECLSPEC clock_t _STLP_CALL clock(void); | ||
| 67 | |||
| 68 | _STLP_DECLSPEC struct tm * _STLP_CALL gmtime(const time_t *); | ||
| 69 | _STLP_DECLSPEC struct tm * _STLP_CALL localtime(const time_t *); | ||
| 70 | _STLP_DECLSPEC time_t _STLP_CALL mktime(struct tm *); | ||
| 71 | _STLP_DECLSPEC size_t _STLP_CALL strftime(char *, size_t, const char *, const struct tm *); | ||
| 72 | _STLP_DECLSPEC char * _STLP_CALL _strdate(char *); | ||
| 73 | _STLP_DECLSPEC char * _STLP_CALL _strtime(char *); | ||
| 74 | _STLP_DECLSPEC time_t _STLP_CALL time(time_t *); | ||
| 75 | |||
| 76 | |||
| 77 | #ifndef _SIZE_T_DEFINED | ||
| 78 | typedef unsigned int size_t; | ||
| 79 | #define _SIZE_T_DEFINED | ||
| 80 | #endif | ||
| 81 | |||
| 82 | #if !__STDC__ || defined(_POSIX_) | ||
| 83 | |||
| 84 | /* Non-ANSI names for compatibility */ | ||
| 85 | #define CLK_TCK CLOCKS_PER_SEC | ||
| 86 | |||
| 87 | #endif /* __STDC__ */ | ||
| 88 | |||
| 89 | |||
| 90 | #ifdef __cplusplus | ||
| 91 | } | ||
| 92 | #endif | ||
| 93 | |||
| 94 | #endif /* _STLP_USE_WINCE_CRT_FUNCTIONS */ | ||
| 95 | |||
| 96 | #endif /* _STLP_INTERNAL_WINCE_TIME_H */ |
stlport/wince/wchar.h
(19 / 0)
|   | |||
| 1 | #ifndef _STLP_INTERNAL_WINCE_WCHAR_H | ||
| 2 | #define _STLP_INTERNAL_WINCE_WCHAR_H | ||
| 3 | |||
| 4 | #if defined(_STLP_USE_WINCE_CRT_FUNCTIONS) | ||
| 5 | |||
| 6 | #if defined(__cplusplus) | ||
| 7 | extern "C" { | ||
| 8 | #endif | ||
| 9 | |||
| 10 | /* Include the string transform function that we are supplying for Windows CE */ | ||
| 11 | _STLP_DECLSPEC size_t _STLP_CALL wcsxfrm(wchar_t * strDest, wchar_t const * strSource, size_t count); | ||
| 12 | |||
| 13 | #if defined(__cplusplus) | ||
| 14 | } | ||
| 15 | #endif | ||
| 16 | |||
| 17 | #endif /* _STLP_USE_WINCE_CRT_FUNCTIONS */ | ||
| 18 | |||
| 19 | #endif /* _STLP_INTERNAL_WINCE_WCHAR_H */ |

