use-mkstemp-20030617

have the BSDs use mkstemp(3)
This commit is contained in:
David Magda 2003-06-17 18:08:19 +00:00 committed by Jim Rees
parent ecfcebec10
commit ae5e2f7865

View File

@ -1390,8 +1390,10 @@ restoreText(tapeInfo, rstTapeInfoPtr, nextHeader)
/* open the text file */
sprintf(filename, "%s/bu_XXXXXX", gettmpdir());
#ifdef AFS_LINUX20_ENV
#if defined (AFS_LINUX20_ENV)
fid = open(mkstemp(filename), O_RDWR|O_CREAT|O_EXCL, 0600);
#elif defined (AFS_XBSD_ENV)
fid = mkstemp(filename);
#else
fid = open(mktemp(filename), O_RDWR|O_CREAT|O_EXCL, 0600);
#endif