X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=db-mysql%2Fclsql_mysql.c;h=372ee0ab72aec5a16be807f86614498d073e8239;hp=d1bb084a7bf898eadab6a43683c89c9bd6d4dfd7;hb=e7a577db720298ca6152c2da92f4aed647ee43c8;hpb=e3924d6e872f06dce33c923b15c5d30baa31460c diff --git a/db-mysql/clsql_mysql.c b/db-mysql/clsql_mysql.c index d1bb084..372ee0a 100644 --- a/db-mysql/clsql_mysql.c +++ b/db-mysql/clsql_mysql.c @@ -15,19 +15,19 @@ * (http://opensource.franz.com/preamble.html), also known as the LLGPL. ***************************************************************************/ -#ifdef WIN32 +#if defined(WIN32)||defined(WIN64) #include BOOL WINAPI DllEntryPoint(HINSTANCE hinstdll, DWORD fdwReason, - LPVOID lpvReserved) + LPVOID lpvReserved) { return 1; } - + #define DLLEXPORT __declspec(dllexport) #else -#define DLLEXPORT +#define DLLEXPORT #endif @@ -37,19 +37,19 @@ BOOL WINAPI DllEntryPoint(HINSTANCE hinstdll, DWORD fdwReason, DLLEXPORT void clsql_mysql_data_seek (MYSQL_RES* res, unsigned int offset_high32, - unsigned int offset_low32) + unsigned int offset_low32) { my_ulonglong offset; offset = offset_high32; offset = offset << 32; offset += offset_low32; - + mysql_data_seek (res, offset); } /* The following functions are used to return 64-bit integers to Lisp. - They return the 32-bit low part and store in upper 32-bits in a + They return the 32-bit low part and store in upper 32-bits in a located sent via a pointer */ static const unsigned int bitmask_32bits = 0xFFFFFFFF; @@ -87,7 +87,15 @@ clsql_mysql_insert_id (MYSQL* mysql, unsigned int* pHigh32) /* Accessor functions to hide the differences across MySQL versions */ DLLEXPORT -short int +unsigned int +clsql_mysql_field_flags (MYSQL_FIELD* field) +{ + return field->flags; +} + + +DLLEXPORT +unsigned int clsql_mysql_field_type (MYSQL_FIELD* field) { return field->type; @@ -127,8 +135,8 @@ allocate_bind (unsigned int n) DLLEXPORT void -bind_param (MYSQL_BIND bind[], unsigned int n, unsigned long length, unsigned short is_null, - void* buffer, unsigned short buffer_type, unsigned long buffer_length) +bind_param (MYSQL_BIND bind[], unsigned int n, unsigned long length, unsigned short is_null, + void* buffer, unsigned short buffer_type, unsigned long buffer_length) { *bind[n].length = length; *bind[n].is_null = is_null; @@ -138,7 +146,6 @@ bind_param (MYSQL_BIND bind[], unsigned int n, unsigned long length, unsigned sh } -DLLEXPORT DLLEXPORT unsigned int clsql_mysql_stmt_affected_rows (MYSQL_STMT* stmt, unsigned int* pHigh32) @@ -148,6 +155,5 @@ clsql_mysql_stmt_affected_rows (MYSQL_STMT* stmt, unsigned int* pHigh32) return lower_32bits(nAffected); } - #endif