On a Linux server I have a LSI/Symbios MegaRAID SATA 150-4 device. Here's the output of lspci -v
01:08.0 RAID bus controller: LSI Logic / Symbios Logic MegaRAID (rev 01)
Subsystem: LSI Logic / Symbios Logic MegaRAID SATA 150-4 RAID Controller
Flags: bus master, 66MHz, slow devsel, latency 128, IRQ 66
Memory at fdff0000 (32-bit, prefetchable) [size=64K]
Expansion ROM at fc000000 [disabled] [size=64K]
Capabilities: [80] Power Management version 2
The device works OK, but the documentation, while almost clear and complete is distributed as an horribly formatted ms word file. So I made little formatting modifications and have the same documentation available as HTML and PDF formats.
Index: build/lib/configure.bat
===================================================================
--- build/lib/configure.bat (revision 3112)
+++ build/lib/configure.bat (working copy)
@@ -258,6 +258,7 @@
:oc_evc8
echo Setting compiler: Microsoft Visual C++ .NET 2005 for Windows CE
echo COMPILER_NAME=evc8 >> ..\Makefiles\config.mak
+echo TARGET_PROC=arm >> ..\Makefiles\config.mak
set SELECTED_COMPILER_VERSION=80
if "%OSVERSION%"=="" (
echo OSVERSION not set, assuming target is CE 5.0
Index: build/Makefiles/nmake/evc8.mak
===================================================================
--- build/Makefiles/nmake/evc8.mak (revision 3112)
+++ build/Makefiles/nmake/evc8.mak (working copy)
@@ -54,14 +54,14 @@
# Note: /GX for MSC<14 has been replaced with /EHsc
-CFLAGS_COMMON = /nologo /TC /W4 /GF /GR /EHsc
+CFLAGS_COMMON = /nologo /TC /W4 /GF /GR /EHsc /wd4201
CFLAGS_REL = $(CFLAGS_COMMON) $(OPT_REL)
CFLAGS_STATIC_REL = $(CFLAGS_COMMON) $(OPT_STATIC_REL)
CFLAGS_DBG = $(CFLAGS_COMMON) $(OPT_DBG)
CFLAGS_STATIC_DBG = $(CFLAGS_COMMON) $(OPT_STATIC_DBG)
CFLAGS_STLDBG = $(CFLAGS_COMMON) $(OPT_STLDBG)
CFLAGS_STATIC_STLDBG = $(CFLAGS_COMMON) $(OPT_STATIC_STLDBG)
-CXXFLAGS_COMMON = /nologo /TP /W4 /GF /GR /EHsc
+CXXFLAGS_COMMON = /nologo /TP /W4 /GF /GR /EHsc /wd4201
CXXFLAGS_REL = $(CXXFLAGS_COMMON) $(OPT_REL)
CXXFLAGS_STATIC_REL = $(CXXFLAGS_COMMON) $(OPT_STATIC_REL)
CXXFLAGS_DBG = $(CXXFLAGS_COMMON) $(OPT_DBG)
Index: src/fstream_win32io.cpp
===================================================================
--- src/fstream_win32io.cpp (revision 3112)
+++ src/fstream_win32io.cpp (working copy)
@@ -79,12 +79,25 @@
#endif
_STLP_MOVE_TO_PRIV_NAMESPACE
-
-// Helper functions for _Filebuf_base.
-
+
+#if defined(_STLP_WCE)
+
+// GetFileType does not exist on CE. Try to reimplement it
+bool __is_regular_file(_STLP_fd fd) {
+ BY_HANDLE_FILE_INFORMATION info;
+ if (0 == GetFileInformationByHandle(fd, &info))
+ return false;
+ return !(info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY);
+}
+
+#else
+
+// Helper functions for _Filebuf_base.
bool __is_regular_file(_STLP_fd fd) {
return (GetFileType(fd) & ~FILE_TYPE_REMOTE) == FILE_TYPE_DISK;
-}
+}
+
+#endif //_STLP_WCE
// Number of characters in the file.
streamoff __file_size(_STLP_fd fd) {
Index: stlport/ctype.h
===================================================================
--- stlport/ctype.h (revision 3112)
+++ stlport/ctype.h (working copy)
@@ -62,6 +62,19 @@
# undef toupper
# undef tolower
+# undef iswalpha
+# undef iswupper
+# undef iswlower
+# undef iswdigit
+# undef iswxdigit
+# undef iswspace
+# undef iswpunct
+# undef iswalnum
+# undef iswprint
+# undef iswgraph
+# undef iswcntrl
+# undef iswascii
+
# if defined (UNDER_CE)
# if (_WIN32_WCE < 300) /* Only wide chars for older versions */
@@ -83,18 +96,18 @@
# undef _isctype
-__inline int (iswalpha)(int c) { return iswctype(c, _ALPHA); }
-__inline int (iswupper)(int c) { return iswctype(c, _UPPER); }
-__inline int (iswlower)(int c) { return iswctype(c, _LOWER); }
-__inline int (iswdigit)(int c) { return iswctype(c, _DIGIT); }
-__inline int (iswxdigit)(int c) { return iswctype(c, _HEX); }
-__inline int (iswspace)(int c) { return iswctype(c, _SPACE); }
-__inline int (iswpunct)(int c) { return iswctype(c, _PUNCT); }
-__inline int (iswalnum)(int c) { return iswctype(c, _ALPHA|_DIGIT); }
-__inline int (iswprint)(int c) { return iswctype(c, _BLANK|_PUNCT|_ALPHA|_DIGIT); }
-__inline int (iswgraph)(int c) { return iswctype(c, _PUNCT|_ALPHA|_DIGIT); }
-__inline int (iswcntrl)(int c) { return iswctype(c, _CONTROL); }
-__inline int (iswascii)(int c) { return ((unsigned)(c) < 0x80); }
+__inline int (iswalpha)(wint_t c) { return iswctype(c, _ALPHA); }
+__inline int (iswupper)(wint_t c) { return iswctype(c, _UPPER); }
+__inline int (iswlower)(wint_t c) { return iswctype(c, _LOWER); }
+__inline int (iswdigit)(wint_t c) { return iswctype(c, _DIGIT); }
+__inline int (iswxdigit)(wint_t c) { return iswctype(c, _HEX); }
+__inline int (iswspace)(wint_t c) { return iswctype(c, _SPACE); }
+__inline int (iswpunct)(wint_t c) { return iswctype(c, _PUNCT); }
+__inline int (iswalnum)(wint_t c) { return iswctype(c, _ALPHA|_DIGIT); }
+__inline int (iswprint)(wint_t c) { return iswctype(c, _BLANK|_PUNCT|_ALPHA|_DIGIT); }
+__inline int (iswgraph)(wint_t c) { return iswctype(c, _PUNCT|_ALPHA|_DIGIT); }
+__inline int (iswcntrl)(wint_t c) { return iswctype(c, _CONTROL); }
+__inline int (iswascii)(wint_t c) { return ((unsigned)(c) < 0x80); }
# endif /* UNDER_CE */
Index: stlport/stl/_cstdlib.h
===================================================================
--- stlport/stl/_cstdlib.h (revision 3112)
+++ stlport/stl/_cstdlib.h (working copy)
@@ -66,6 +66,49 @@
using _STLP_VENDOR_CSTD::mbtowc;
using _STLP_VENDOR_CSTD::system;
using _STLP_VENDOR_CSTD::bsearch;
+
+# else
+
+_STLP_END_NAMESPACE
+
+/* needed for IsDBCSLeadByte and WideCharToMultiByte */
+#include <windows.h>
+#include <winnls.h>
+
+//Wine-based reimplementation of mbtowc and mblen
+inline int mbtowc(wchar_t *wchar,const char *mbchar,size_t count)
+{
+ //temp var needed because MultiByteToWideChar wants non NULL destination
+ wchar_t tmpdst = '\0';
+
+ if(count <= 0 || !mbchar)
+ return 0;
+ //first 0 == CP_ACP, ANSI Code Page
+ if(!::MultiByteToWideChar(0, 0, mbchar, count, &tmpdst, 1))
+ return -1;
+ if(wchar)
+ *wchar = tmpdst;
+ //return the number of bytes from src that have been used
+ if(!*mbchar)
+ return 0;
+ if(count >= 2 && isleadbyte(*mbchar) && mbchar[1])
+ return 2;
+ return 1;
+}
+
+inline int mblen(const char *mbstr,size_t count)
+{
+ if (mbstr && *mbstr && count)
+ {
+ if(MB_CUR_MAX == 1)
+ return 1; // ASCII CP
+ return !isleadbyte(*mbstr) ? 1 : (count>1 ? 2 : -1);
+ }
+ return 0;
+}
+
+_STLP_BEGIN_NAMESPACE
+
# endif
using _STLP_VENDOR_CSTD::atexit;
using _STLP_VENDOR_CSTD::exit;
@@ -80,12 +123,28 @@
using _STLP_VENDOR_CSTD::strtod;
using _STLP_VENDOR_CSTD::strtol;
using _STLP_VENDOR_CSTD::strtoul;
+using _STLP_VENDOR_CSTD::mblen;
+using _STLP_VENDOR_CSTD::mbtowc;
# if !(defined (_STLP_NO_NATIVE_WIDE_STREAMS) || defined (_STLP_NO_MBSTATE_T))
using _STLP_VENDOR_CSTD::wcstombs;
-# ifndef _STLP_WCE
+# ifdef _STLP_WCE
+
+_STLP_END_NAMESPACE
+
+//Wine-based reimplementation
+inline int wctomb(char *mbchar, wchar_t wchar)
+{
+ //first 0 is CP_ACP, ANSI codepage
+ return ::WideCharToMultiByte(0, 0, &wchar, 1, mbchar, 6, NULL, NULL);
+}
+
+_STLP_BEGIN_NAMESPACE
+
+# endif //_STLP_WCE
+
using _STLP_VENDOR_CSTD::wctomb;
-# endif
+
# endif
using _STLP_VENDOR_CSTD::qsort;
using _STLP_VENDOR_CSTD::labs;
Index: stlport/stl/config/host.h
===================================================================
--- stlport/stl/config/host.h (revision 3112)
+++ stlport/stl/config/host.h (working copy)
@@ -72,10 +72,9 @@
* _STLP_NATIVE_INCLUDE_PATH.
* Hint: never install STLport in the directory that ends with "include"
*/
-/*
+
#undef _STLP_NATIVE_INCLUDE_PATH
-#define _STLP_NATIVE_INCLUDE_PATH ../include
-*/
+
/* same for C library headers like <cstring> */
/*
#undef _STLP_NATIVE_CPP_C_INCLUDE_PATH
|
|
August '07 |
|
||||
| Mo | Tu | We | Th | Fr | Sa | Su |
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 | 31 | ||
2006-2008 Giuseppe 'Cowo' Corbelli | Cowo's homepage | Cowo's photo page | Contact me | Back to top
Design by Andreas Viklund | Serendipity Template by Carl