DescriptionIt didn't take much to make gtest compile on MinGW:
* Code using SEH doesn't work on MinGW, so I had to update the #ifdefs appropriately. (No version of GCC supports SEH so I used defined(__GNUC__) as the condition.)
* MinGW defines helpful macros for posix functions which normally require a leading underscore on Windows. Unfortunately this is totally incompatible with gtest's attempt to move these functions into a namespace. For now I #undef'd them but this isn't a good long-term solution.
** UPDATE: I reverted this part of the change as Zhanyong is working on a better fix.
* MinGW doesn't support pthreads. The makefiles appear to assume that all systems use pthreads. I went ahead and added the ACX_PTHREAD macro that several other Google open source projects use to the m4 directory and made the configure script use it to detect pthreads. This should have other positive effects, like handling systems where the "-pthread" compiler flag doesn't exist (but -lpthread works).
Patch Set 1 #
Total comments: 21
Patch Set 2 : Address review comments. #Patch Set 3 : Updated to rev 242. #
Total comments: 11
Patch Set 4 : Add comment. #Patch Set 5 : Add comment. #
MessagesTotal messages: 10
|