]> granicus.if.org Git - check/commit
Always try alternative to tmpfile() if necessary
authorbrarcher <brarcher@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Sat, 21 Sep 2013 16:03:14 +0000 (16:03 +0000)
committerbrarcher <brarcher@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Sat, 21 Sep 2013 16:03:14 +0000 (16:03 +0000)
commit4b4277588a0795560abb9ea0f01881c7d5010c4a
treeb26be713605606db111eab5d10b1d69f054c9047
parent69972abb53dbb4a2c9513bca26d75fbeb5b7716b
Always try alternative to tmpfile() if necessary

If tmpfile fails on a platform, there is no harm in trying the
alternative.

Previously the alternative was only attempted for Windows. However,
checking for WIN32 was not correct; instead _WIN32 should be used.
When the proper check for Windows was attempted, OSX would fail
to run its tests. However, removing the conditional and renaming
_tempnam to tempnam (which is available in MinGW, OSX, and GNU/Linux)
works for all three platforms.

Correctly check for Windows environment

The correct way to check for compiling for Windows is to check for
_WIN32 instead of WIN32.

Patch submitted by username bross on Sourceforge, patch#48

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@756 64e312b2-a51f-0410-8e61-82d0ca0eb02a
src/check_msg.c