It seems like apr_file_mktemp should guarantee that it will return a file that can be opened, instead of leaving that job up to the caller to pass in an appropriate template that includes a writable path.
So it seems to me that we should be using something like tmpfile() so that the location is appropriately picked as a "temporary file location". Unfortunately, tmpfile() returns a FILE* which is not exactly what we want, but it is the safest function (and probably most portable) to use considering that all others (tempnam, tmpnam, and also mkstemp (which we do use)) are either marked as deprecated or "don't use". --James
