* { font-family: Consolas, Lucida Console, Courier New; font-size: 100%; }
h1 { font-size: 150%; }
td.linenos { background-color: #f0f0f0; padding-right: 10px; }
span.lineno { background-color: #f0f0f0; padding: 0 5px 0 5px; }
pre { line-height: 100%; width: 100%; }
.highlight span { width: 100%; display:-moz-inline-stack; display:inline-block; zoom:1; *display:inline; }
body { background: #ffffff; }
body .c { color: #999988; font-style: italic } /* Comment */
body .err { color: #a61717; background-color: #e3d2d2 } /* Error */
body .k { font-weight: bold } /* Keyword */
body .o { font-weight: bold } /* Operator */
body .cm { color: #999988; font-style: italic } /* Comment.Multiline */
body .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
body .c1 { color: #999988; font-style: italic } /* Comment.Single */
body .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
body .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
body .ge { font-style: italic } /* Generic.Emph */
body .gr { color: #aa0000 } /* Generic.Error */
body .gh { color: #999999 } /* Generic.Heading */
body .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
body .go { color: #888888 } /* Generic.Output */
body .gp { color: #555555 } /* Generic.Prompt */
body .gs { font-weight: bold } /* Generic.Strong */
body .gu { color: #aaaaaa } /* Generic.Subheading */
body .gt { color: #aa0000 } /* Generic.Traceback */
body .kc { font-weight: bold } /* Keyword.Constant */
body .kd { font-weight: bold } /* Keyword.Declaration */
body .kp { font-weight: bold } /* Keyword.Pseudo */
body .kr { font-weight: bold } /* Keyword.Reserved */
body .kt { color: #445588; font-weight: bold } /* Keyword.Type */
body .m { color: #009999 } /* Literal.Number */
body .s { color: #bb8844 } /* Literal.String */
body .na { color: #008080 } /* Name.Attribute */
body .nb { color: #999999 } /* Name.Builtin */
body .nc { color: #445588; font-weight: bold } /* Name.Class */
body .no { color: #008080 } /* Name.Constant */
body .ni { color: #800080 } /* Name.Entity */
body .ne { color: #990000; font-weight: bold } /* Name.Exception */
body .nf { color: #990000; font-weight: bold } /* Name.Function */
body .nn { color: #555555 } /* Name.Namespace */
body .nt { color: #000080 } /* Name.Tag */
body .nv { color: #008080 } /* Name.Variable */
body .ow { font-weight: bold } /* Operator.Word */
body .w { color: #bbbbbb } /* Text.Whitespace */
body .mf { color: #009999 } /* Literal.Number.Float */
body .mh { color: #009999 } /* Literal.Number.Hex */
body .mi { color: #009999 } /* Literal.Number.Integer */
body .mo { color: #009999 } /* Literal.Number.Oct */
body .sb { color: #bb8844 } /* Literal.String.Backtick */
body .sc { color: #bb8844 } /* Literal.String.Char */
body .sd { color: #bb8844 } /* Literal.String.Doc */
body .s2 { color: #bb8844 } /* Literal.String.Double */
body .se { color: #bb8844 } /* Literal.String.Escape */
body .sh { color: #bb8844 } /* Literal.String.Heredoc */
body .si { color: #bb8844 } /* Literal.String.Interpol */
body .sx { color: #bb8844 } /* Literal.String.Other */
body .sr { color: #808000 } /* Literal.String.Regex */
body .s1 { color: #bb8844 } /* Literal.String.Single */
body .ss { color: #bb8844 } /* Literal.String.Symbol */
body .bp { color: #999999 } /* Name.Builtin.Pseudo */
body .vc { color: #008080 } /* Name.Variable.Class */
body .vg { color: #008080 } /* Name.Variable.Global */
body .vi { color: #008080 } /* Name.Variable.Instance */
body .il { color: #009999 } /* Literal.Number.Integer.Long */
Info
Revision:3319
Author:victor
Date:2008-06-19 00:23:56 +0300 (Thu, 19 Jun 2008)
Comment:SQLite code made compatible with Visual C++; more functions and global variables in server's code declared as exportable
Changes
U trunk/src/server/core/dbwrite.cpp
U trunk/src/server/core/tools.cpp
U trunk/src/server/dbdrv/sqlite/sqlite3.c
U trunk/src/server/include/nms_core.h
U trunk/src/server/include/nms_events.h
Diff
Modified: trunk/src/server/core/dbwrite.cpp
===================================================================
--- trunk/src/server/core/dbwrite.cpp 2008-06-18 19:29:24 UTC (rev 3318)
+++ trunk/src/server/core/dbwrite.cpp 2008-06-18 21:23:56 UTC (rev 3319)
@@ -49,7 +49,7 @@
// Put SQL request into queue for later execution
//
-void QueueSQLRequest(char *szQuery)
+void NXCORE_EXPORTABLE QueueSQLRequest(char *szQuery)
{
g_pLazyRequestQueue->Put(strdup(szQuery));
}
Modified: trunk/src/server/core/tools.cpp
===================================================================
--- trunk/src/server/core/tools.cpp 2008-06-18 19:29:24 UTC (rev 3318)
+++ trunk/src/server/core/tools.cpp 2008-06-18 21:23:56 UTC (rev 3319)
@@ -33,39 +33,6 @@
//
-// Get system error string by call to FormatMessage
-//
-
-#ifdef _WIN32
-
-char NXCORE_EXPORTABLE *GetSystemErrorText(DWORD error)
-{
- char *msgBuf;
- static char staticBuffer[1024];
-
- if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
- FORMAT_MESSAGE_FROM_SYSTEM |
- FORMAT_MESSAGE_IGNORE_INSERTS,
- NULL,error,
- MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT), // Default language
- (LPSTR)&msgBuf,0,NULL)>0)
- {
- msgBuf[strcspn(msgBuf,"\r\n")]=0;
- nx_strncpy(staticBuffer,msgBuf,1023);
- LocalFree(msgBuf);
- }
- else
- {
- sprintf(staticBuffer,"MSG 0x%08X - Unable to find message text",error);
- }
-
- return staticBuffer;
-}
-
-#endif /* _WIN32 */
-
-
-//
// Clean interface list from unneeded entries
//
Modified: trunk/src/server/dbdrv/sqlite/sqlite3.c
===================================================================
--- trunk/src/server/dbdrv/sqlite/sqlite3.c 2008-06-18 19:29:24 UTC (rev 3318)
+++ trunk/src/server/dbdrv/sqlite/sqlite3.c 2008-06-18 21:23:56 UTC (rev 3319)
@@ -19,6 +19,11 @@
**
** This amalgamation was generated on 2008-05-14 16:20:58 UTC.
*/
+
+#ifdef _WIN32
+#pragma warning(disable: 4018 4049 4244 4761)
+#endif
+
#define SQLITE_CORE 1
#define SQLITE_AMALGAMATION 1
#ifndef SQLITE_PRIVATE
@@ -349,16 +354,12 @@
** If none of the above are defined, then set SQLITE_SYSTEM_MALLOC as
** the default.
*/
-#if defined(SQLITE_SYSTEM_MALLOC)+defined(SQLITE_MEMDEBUG)+\
- defined(SQLITE_MEMORY_SIZE)+defined(SQLITE_MMAP_HEAP_SIZE)+\
- defined(SQLITE_POW2_MEMORY_SIZE)>1
+#if defined(SQLITE_SYSTEM_MALLOC)+defined(SQLITE_MEMDEBUG)+defined(SQLITE_MEMORY_SIZE)+defined(SQLITE_MMAP_HEAP_SIZE)+defined(SQLITE_POW2_MEMORY_SIZE)>1
# error "At most one of the following compile-time configuration options\
is allows: SQLITE_SYSTEM_MALLOC, SQLITE_MEMDEBUG, SQLITE_MEMORY_SIZE,\
SQLITE_MMAP_HEAP_SIZE, SQLITE_POW2_MEMORY_SIZE"
#endif
-#if defined(SQLITE_SYSTEM_MALLOC)+defined(SQLITE_MEMDEBUG)+\
- defined(SQLITE_MEMORY_SIZE)+defined(SQLITE_MMAP_HEAP_SIZE)+\
- defined(SQLITE_POW2_MEMORY_SIZE)==0
+#if defined(SQLITE_SYSTEM_MALLOC)+defined(SQLITE_MEMDEBUG)+defined(SQLITE_MEMORY_SIZE)+defined(SQLITE_MMAP_HEAP_SIZE)+defined(SQLITE_POW2_MEMORY_SIZE)==0
# define SQLITE_SYSTEM_MALLOC 1
#endif
Modified: trunk/src/server/include/nms_core.h
===================================================================
--- trunk/src/server/include/nms_core.h 2008-06-18 19:29:24 UTC (rev 3318)
+++ trunk/src/server/include/nms_core.h 2008-06-18 21:23:56 UTC (rev 3319)
@@ -605,7 +605,7 @@
void SaveObjects(DB_HANDLE hdb);
-void QueueSQLRequest(char *szQuery);
+void NXCORE_EXPORTABLE QueueSQLRequest(char *szQuery);
void StartDBWriter(void);
void StopDBWriter(void);
@@ -714,16 +714,10 @@
void ReloadCertificates(void);
#endif
-#ifdef _WIN32
-
-char NXCORE_EXPORTABLE *GetSystemErrorText(DWORD error);
-
-#else
-
+#ifndef _WIN32
THREAD_RESULT NXCORE_EXPORTABLE THREAD_CALL SignalHandler(void *);
+#endif /* not _WIN32 */
-#endif /* _WIN32 */
-
void DbgTestMutex(MUTEX hMutex, const TCHAR *szName, CONSOLE_CTX pCtx);
void DbgTestRWLock(RWLOCK hLock, const TCHAR *szName, CONSOLE_CTX pCtx);
void DumpSessions(CONSOLE_CTX pCtx);
@@ -757,9 +751,9 @@
extern DWORD g_dwThresholdRepeatInterval;
extern int g_nRequiredPolls;
-extern DB_HANDLE g_hCoreDB;
+extern DB_HANDLE NXCORE_EXPORTABLE g_hCoreDB;
extern Queue *g_pLazyRequestQueue;
-extern DWORD g_dwDBSyntax;
+extern DWORD NXCORE_EXPORTABLE g_dwDBSyntax;
#endif /* _nms_core_h_ */
Modified: trunk/src/server/include/nms_events.h
===================================================================
--- trunk/src/server/include/nms_events.h 2008-06-18 19:29:24 UTC (rev 3318)
+++ trunk/src/server/include/nms_events.h 2008-06-18 21:23:56 UTC (rev 3319)
@@ -93,7 +93,8 @@
DWORD GetParametersCount(void) { return m_dwNumParameters; }
char *GetParameter(DWORD dwIndex) { return (dwIndex < m_dwNumParameters) ? m_ppszParameters[dwIndex] : NULL; }
- DWORD GetParameterAsULong(DWORD dwIndex) { return (dwIndex < m_dwNumParameters) ? strtoul(m_ppszParameters[dwIndex], NULL, 0) : 0; }
+ DWORD GetParameterAsULong(DWORD dwIndex) { return (dwIndex < m_dwNumParameters) ? _tcstoul(m_ppszParameters[dwIndex], NULL, 0) : 0; }
+ QWORD GetParameterAsUInt64(DWORD dwIndex) { return (dwIndex < m_dwNumParameters) ? _tcstoull(m_ppszParameters[dwIndex], NULL, 0) : 0; }
void SetCustomMessage(const TCHAR *pszMessage) { safe_free(m_pszCustomMessage); m_pszCustomMessage = (pszMessage != NULL) ? _tcsdup(pszMessage) : NULL; }
};
Received on Thu Jun 19 2008 - 00:23:57 EEST
This archive was generated by hypermail 2.2.0 : Thu Jun 19 2008 - 00:19:58 EEST