SF bug 563750 (Alex Martelli): posix_tmpfile():

The file returned by tmpfile() has mode w+b, so use that in the call
to PyFile_FromFile().

Bugfix candidate.
diff --git a/Doc/lib/libos.tex b/Doc/lib/libos.tex
index aafe7b1..c02d6a6 100644
--- a/Doc/lib/libos.tex
+++ b/Doc/lib/libos.tex
@@ -312,7 +312,7 @@
 \end{funcdesc}
 
 \begin{funcdesc}{tmpfile}{}
-Return a new file object opened in update mode (\samp{w+}).  The file
+Return a new file object opened in update mode (\samp{w+b}).  The file
 has no directory entries associated with it and will be automatically
 deleted once there are no file descriptors for the file.
 Availability: \UNIX, Windows.