[CONC-98] Compilation error with MinGW64 : incorrect use of 'vio_blocking' Created: 2014-06-09  Updated: 2014-12-09  Resolved: 2014-12-09

Status: Closed
Project: MariaDB Connector/C
Component/s: None
Affects Version/s: None
Fix Version/s: 2.1

Type: Bug Priority: Major
Reporter: Eric Trinh Assignee: Georg Richter
Resolution: Fixed Votes: 0
Labels: None
Environment:

MinGW64 4.8.0


Attachments: Text File mariadbr147.patch     Text File mariadbr155.patch    

 Description   

Hi,

On revision 142, when compiling with MinGW64, but should also happens with VC, there is a definition mismatch in the use of 'vio_blocking' (3 parameters, mysql_async.c:44) and its definition (2 parameters, violite.h:89).

I successfully compiled after patching mysql_async.c:44 to remove the unused last parameter and it works.

Best Regards,
Eric



 Comments   
Comment by Eric Trinh [ 2014-06-13 ]

Hi Georg,

I noticed another compilation issue with Mingw 32 bit only (I didn't noticed it with wIn64):
On include/my_global.h:459, the ifdef can be transformed to:
#ifdef _WIN32 -> #if defined(_WIN32) && defined(_MSVC)
#define NO_DIR_LIBRARY /* Not standar dir-library */
#define USE_MY_STAT_STRUCT /* For my_lib */
typedef SSIZE_T ssize_t;
#endif

Best Regards,
Eric

Comment by Eric Trinh [ 2014-06-19 ]

Hi Georg,

Just a fix to our other compilation issue, the fix I sent you creates some regressions.
Here is a correction:
#ifdef _WIN32
#define NO_DIR_LIBRARY /* Not standar dir-library */
#define USE_MY_STAT_STRUCT /* For my_lib */
#ifdef (_MSVC)
typedef SSIZE_T ssize_t;
#endif
#endif

Best Regards,
Eric

Comment by Eric Trinh [ 2014-06-19 ]

Here the patch file.
It also fixes a compilation error on OSX where the include of sys/socket.h is placed after some declarations which needs it.

Eric

Comment by Eric Trinh [ 2014-10-29 ]

Hi Georg,

Here is a new patch for compiling the client for OSX and Windows.

On OSX, it assumed that iconv is installed with MacPort, and fails if macport's iconv is not installed. I changed to use legacy iconv provided by Apple.
On Windows, when cross-compiling, there is just 2 small issue during compilation, a header file case sensitive file name (to follow genuine microsoft rules for filename: winsock2.h, windows.h are always lower case). Other case, is juste a double define definition.

Previous issues reported have been fixed in previous releases.

Thanks,
Best Regards,
Eric

Comment by Eric Trinh [ 2014-11-06 ]

Hi Georg,
Compilation works fine on OSX without macport (only Apple's command line interface), Windows 32/64 bit with mingw 4.8.0, and Windows Cross-compilation under ubuntu 14.10 with Mingw 4.9.1.

You can mark this issue as resolved.
Thanks,
Eric

Comment by Georg Richter [ 2014-12-09 ]

Closed (see user request)

Generated at Thu Feb 08 03:02:52 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.