Bug #8872 Compiler errors with MinGW
Submitted: 1 Mar 2005 19:10 Modified: 29 Apr 2005 13:56
Reporter: Nils Durner Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:4.1 OS:Windows (Windows)
Assigned to: Michael Widenius CPU Architecture:Any

[1 Mar 2005 19:10] Nils Durner
Description:
Including "my_global.h" fails under MinGW (www.mingw.org, GNU utils for Windows) because of some type redefinitions.
These errors can be resolved by putting the definitions in config-win.h in preprocessor conditionals, see my patch.
The following autoconf statements set the preprocessor macros:
---
AC_CHECK_TYPES([sigset_t, off_t], [], [], [#include <sys/types.h>])
AC_CHECK_TYPES([size_t], [], [], [#include <stdio.h>])
---

How to repeat:
1. Get and install MinGW from www.mingw.org
2. Compile a small test programm that includes "mysql.h" and "my_global.h"

Suggested fix:
Apply patch.
[1 Mar 2005 19:10] Nils Durner
Patch

Attachment: mysql01.diff (text/x-patch), 1.14 KiB.

[2 Mar 2005 8:47] MySQL Verification Team
Thank you for the bug report. I just verified the compiler error
using Dev-C and not applied the patch.
[29 Apr 2005 13:56] Michael Widenius
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Thanks for the patch!
Fix should be in 4.1.12 and 5.0.6
[29 Apr 2005 13:59] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/24479