Ports of Mktemp
The mktemp code is highly portable and should compile on most any Unix-like operating system. It has also been ported to the following non-Unix operating systems:
A Windows port of mktemp is part of the gnuwin32 project. They have a page for the mktemp port.