and USE_TMPNAM_R at the top of the file and refer to them later; this catches a second reference to 'tmpnam_r' that I didn't spot first time around.