Issue information

Issue ID
#1741
Status
Fixed
Severity
None
Started
Hercules Elf Bot
Jun 22, 2008 21:16
Last Post
Hercules Elf Bot
Jun 22, 2008 21:16
Confirmation
N/A

Hercules Elf Bot - Jun 22, 2008 21:16

Originally posted by [b]Ai4rei[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=1741

Due to (/src/common/sql.c):
CODE
    case SQLDT_LONGLONG: bind->buffer_type = Sql_P_SizeToMysqlIntType(sizeof(long long));
        buffer_len = sizeof(long long);


long long data type isn't present in VC 6. I suggest to replace long long by int64:
CODE
    case SQLDT_LONGLONG: bind->buffer_type = Sql_P_SizeToMysqlIntType(sizeof(int64));
        buffer_len = sizeof(int64);

because it's defined in /src/common/cbasetypes.h that way to replace long long:
CODE
//////////////////////////////////////////////////////////////////////////
// portable 64-bit integers
//////////////////////////////////////////////////////////////////////////
#if defined(_MSC_VER) || defined(__BORLANDC__)
typedef __int64                int64;
typedef signed __int64        sint64;
typedef unsigned __int64    uint64;
#define LLCONST(a)            (a##i64)
#else
typedef long long            int64;
typedef signed long long    sint64;
typedef unsigned long long    uint64;
#define LLCONST(a)            (a##ll)
#endif


This post has been edited by Ai4rei: Jun 22 2008, 02:17 PM