MSVC8 Project File + SDK Update

This commit is contained in:
Scott Ehlert 2006-04-26 23:54:12 +00:00
parent b65b8a1cf0
commit 2ca42b7b21
6 changed files with 520 additions and 11 deletions

View File

@ -0,0 +1,359 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="mysql2"
ProjectGUID="{7877D370-E48E-4A85-8EE4-131863A5B09F}"
RootNamespace="mysql2"
Keyword="Win32Proj"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="Debug"
IntermediateDirectory="Debug"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="mysql;thread;sdk;."
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MYSQL2_EXPORTS;SM_DEFAULT_THREADER"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
RuntimeTypeInfo="false"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="wsock32.lib mysqlclient.lib"
OutputFile="$(OutDir)/mysqlx_amxx.dll"
LinkIncremental="2"
IgnoreDefaultLibraryNames="LIBCMT"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)/mysql2.pdb"
SubSystem="2"
ImportLibrary="$(OutDir)/mysql2.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="Release"
IntermediateDirectory="Release"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="mysql;thread;sdk;."
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MYSQL2_EXPORTS;SM_DEFAULT_THREADER"
RuntimeLibrary="0"
RuntimeTypeInfo="false"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="wsock32.lib mysqlclient.lib"
OutputFile="$(OutDir)/mysqlx_amxx.dll"
LinkIncremental="1"
IgnoreDefaultLibraryNames=""
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(OutDir)/mysql2.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\basic_sql.cpp"
>
</File>
<File
RelativePath=".\handles.cpp"
>
</File>
<File
RelativePath=".\module.cpp"
>
</File>
<File
RelativePath=".\oldcompat_sql.cpp"
>
</File>
<File
RelativePath=".\threading.cpp"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath=".\mysql2_header.h"
>
</File>
<File
RelativePath=".\threading.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
<Filter
Name="Threader"
>
<File
RelativePath=".\thread\IThreader.h"
>
</File>
<Filter
Name="Source Files"
>
<File
RelativePath=".\thread\BaseWorker.cpp"
>
</File>
<File
RelativePath=".\thread\ThreadWorker.cpp"
>
</File>
<File
RelativePath=".\thread\WinThreads.cpp"
>
</File>
</Filter>
<Filter
Name="Header Files"
>
<File
RelativePath=".\thread\BaseWorker.h"
>
</File>
<File
RelativePath=".\thread\ThreadSupport.h"
>
</File>
<File
RelativePath=".\thread\ThreadWorker.h"
>
</File>
<File
RelativePath=".\thread\WinThreads.h"
>
</File>
</Filter>
</Filter>
<Filter
Name="Database"
>
<File
RelativePath=".\mysql\ISQLDriver.h"
>
</File>
<Filter
Name="Header Files"
>
<File
RelativePath=".\mysql\MysqlDatabase.h"
>
</File>
<File
RelativePath=".\mysql\MysqlDriver.h"
>
</File>
<File
RelativePath=".\mysql\MysqlHeaders.h"
>
</File>
<File
RelativePath=".\mysql\MysqlQuery.h"
>
</File>
<File
RelativePath=".\mysql\MysqlResultSet.h"
>
</File>
</Filter>
<Filter
Name="Source Files"
>
<File
RelativePath=".\mysql\MysqlDatabase.cpp"
>
</File>
<File
RelativePath=".\mysql\MysqlDriver.cpp"
>
</File>
<File
RelativePath=".\mysql\MysqlQuery.cpp"
>
</File>
<File
RelativePath=".\mysql\MysqlResultSet.cpp"
>
</File>
</Filter>
</Filter>
<Filter
Name="SDK"
>
<File
RelativePath=".\sdk\amxxmodule.cpp"
>
</File>
<File
RelativePath=".\sdk\amxxmodule.h"
>
</File>
<File
RelativePath=".\sdk\CVector.h"
>
</File>
<File
RelativePath=".\sdk\moduleconfig.h"
>
</File>
<File
RelativePath=".\sdk\sh_list.h"
>
</File>
<File
RelativePath=".\sdk\sh_stack.h"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -1,6 +1,20 @@
#ifndef _INCLUDE_SOURCEMOD_MYSQL_HEADERS_H
#define _INCLUDE_SOURCEMOD_MYSQL_HEADERS_H
#if _MSC_VER >= 1400
/* Disable deprecation warnings concerning unsafe CRT functions */
#if !defined _CRT_SECURE_NO_DEPRECATE
#define _CRT_SECURE_NO_DEPRECATE
#endif
/* Replace the POSIX function with ISO C++ conformant ones as they are now deprecated */
#define strnicmp _strnicmp
/* Disable deprecation warnings because MSVC8 seemingly thinks the ISO C++ conformant
* functions above are deprecated. */
#pragma warning (disable:4996)
#endif
#include <ISQLDriver.h>
#if defined WIN32 || defined _WIN32
#include <winsock.h>

View File

@ -2657,11 +2657,10 @@ C_DLLEXPORT int AMXX_PluginsLoaded()
// Advanced MF functions
void MF_Log(const char *fmt, ...)
{
// :TODO: Overflow possible here
char msg[3072];
va_list arglst;
va_start(arglst, fmt);
vsprintf(msg, fmt, arglst);
vsnprintf(msg, sizeof(msg) - 1, fmt, arglst);
va_end(arglst);
g_fn_Log("[%s] %s", MODULE_LOGTAG, msg);
@ -2669,11 +2668,10 @@ void MF_Log(const char *fmt, ...)
void MF_LogError(AMX *amx, int err, const char *fmt, ...)
{
// :TODO: Overflow possible here
char msg[3072];
va_list arglst;
va_start(arglst, fmt);
vsprintf(msg, fmt, arglst);
vsnprintf(msg, sizeof(msg) - 1, fmt, arglst);
va_end(arglst);
g_fn_LogErrorFunc(amx, err, "[%s] %s", MODULE_LOGTAG, msg);

View File

@ -156,6 +156,134 @@ typedef int (AMXAPI *AMX_DEBUG)(struct tagAMX *amx);
#pragma warning(disable:4103) /* disable warning message 4103 that complains
* about pragma pack in a header file */
#pragma warning(disable:4100) /* "'%$S' : unreferenced formal parameter" */
#if _MSC_VER >= 1400
#if !defined NO_MSVC8_AUTO_COMPAT
/* Disable deprecation warnings concerning unsafe CRT functions */
#if !defined _CRT_SECURE_NO_DEPRECATE
#define _CRT_SECURE_NO_DEPRECATE
#endif
/* Replace the POSIX function with ISO C++ conformant ones as they are now deprecated */
#define access _access
#define cabs _cabs
#define cgets _cgets
#define chdir _chdir
#define chmod _chmod
#define chsize _chsize
#define close _close
#define cprintf _cprintf
#define cputs _cputts
#define creat _creat
#define cscanf _cscanf
#define cwait _cwait
#define dup _dup
#define dup2 _dup2
#define ecvt _ecvt
#define eof _eof
#define execl _execl
#define execle _execle
#define execlp _execlp
#define execlpe _execlpe
#define execv _execv
#define execve _execv
#define execvp _execvp
#define execvpe _execvpe
#define fcloseall _fcloseall
#define fcvt _fcvt
#define fdopen _fdopen
#define fgetchar _fgetchar
#define filelength _filelength
#define fileno _fileno
#define flushall _flushall
#define fputchar _fputchar
#define gcvt _gcvt
#define getch _getch
#define getche _getche
#define getcwd _getcwd
#define getpid _getpid
#define getw _getw
#define hypot _hypot
#define inp _inp
#define inpw _inpw
#define isascii __isascii
#define isatty _isatty
#define iscsym __iscsym
#define iscsymf __iscsymf
#define itoa _itoa
#define j0 _j0
#define j1 _j1
#define jn _jn
#define kbhit _kbhit
#define lfind _lfind
#define locking _locking
#define lsearch _lsearch
#define lseek _lseek
#define ltoa _ltoa
#define memccpy _memccpy
#define memicmp _memicmp
#define mkdir _mkdir
#define mktemp _mktemp
#define open _open
#define outp _outp
#define outpw _outpw
#define putch _putch
#define putenv _putenv
#define putw _putw
#define read _read
#define rmdir _rmdir
#define rmtmp _rmtmp
#define setmode _setmode
#define sopen _sopen
#define spawnl _spawnl
#define spawnle _spawnle
#define spawnlp _spawnlp
#define spawnlpe _spawnlpe
#define spawnv _spawnv
#define spawnve _spawnve
#define spawnvp _spawnvp
#define spawnvpe _spawnvpe
#define strcmpi _strcmpi
#define strdup _strdup
#define stricmp _stricmp
#define strlwr _strlwr
#define strnicmp _strnicmp
#define strnset _strnset
#define strrev _strrev
#define strset _strset
#define strupr _strupr
#define swab _swab
#define tell _tell
#define tempnam _tempnam
#define toascii __toascii
#define tzset _tzset
#define ultoa _ultoa
#define umask _umask
#define ungetch _ungetch
#define unlink _unlink
#define wcsdup _wcsdup
#define wcsicmp _wcsicmp
#define wcsicoll _wcsicoll
#define wcslwr _wcslwr
#define wcsnicmp _wcsnicmp
#define wcsnset _wcsnset
#define wcsrev _wcsrev
#define wcsset _wcsset
#define wcsupr _wcsupr
#define write _write
#define y0 _y0
#define y1 _y1
#define yn _yn
/* Disable deprecation warnings because MSVC8 seemingly thinks the ISO C++ conformant
* functions above are deprecated. */
#pragma warning (disable:4996)
#endif
#else
#define vsnprintf _vsnprintf
#endif
#endif

View File

@ -5,7 +5,7 @@
// Module info
#define MODULE_NAME "MySQL X"
#define MODULE_VERSION "1.01"
#define MODULE_VERSION "1.72"
#define MODULE_AUTHOR "AMX Mod X Dev Team"
#define MODULE_URL "http://www.amxmodx.org/"
#define MODULE_LOGTAG "SQLX"
@ -31,6 +31,9 @@
// It allows you to compile without libstdc++.so as a dependency
// #define NO_ALLOC_OVERRIDES
// Uncomment this if you are using MSVC8 or greater and want to fix some of the compatibility issues yourself
// #define NO_MSVC8_AUTO_COMPAT
// - AMXX Init functions
// Also consider using FN_META_*
// AMXX query

View File

@ -11,6 +11,13 @@
#ifndef _INCLUDE_SMM_LIST_H
#define _INCLUDE_SMM_LIST_H
// MSVC8 fix for offsetof macro redefition warnings
#ifdef _MSC_VER
#if _MSC_VER >= 1400
#undef offsetof
#endif
#endif
#include <new>
#include <malloc.h>