Bug #60027 Invalid system check TIME_T_UNSIGNED
Submitted: 9 Feb 2011 0:29 Modified: 2 Dec 2012 17:45
Reporter: Vladislav Vaintroub Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.6 OS:Windows
Assigned to: CPU Architecture:Any

[9 Feb 2011 0:29] Vladislav Vaintroub
Toplevel configure.cmake contains new system check

# check whether time_t is unsigned
int main()
  int array[(((time_t)-1) > 0) ? 1 : -1];
  return 0;

This check will fail not because time_t is signed (which is the case on Windows), but because <time.h> which includes typedef for time_t is not included.

How to repeat:
Open  CMakeFiles/CMakeError.log
Find "Performing C SOURCE FILE Test TIME_T_UNSIGNED failed with the following output:"
src.c(4): error C2065: 'time_t' : undeclared identifier [H:\bzr\tpms1\xxx\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj]

Suggested fix:
For example, add 
#include <time.h>
to the start of the source snippet

CMAKE_EXTRA_INCLUDE_FILES should work as well (configure.cmake uses it in some places)
[9 Feb 2011 0:39] Vladislav Vaintroub
changing version (it is in 5.6.2 it seems)
[9 Feb 2011 7:43] Valeriy Kravchuk
Verified with current mysql-trunk.
[2 Dec 2012 17:45] Vladislav Vaintroub
No more interested in having it fixed
[12 Mar 2013 2:44] Paul DuBois
Noted in 5.5.32, 5.6.12, 5.7.2 changelogs.

The CMake check for unsigned time_t failed on all platforms.