I think that mkdtemp() would better cross-platform replacement, although I'm not 100% sure. I imagine this is accessible from perl. - Daniel
On Thu, Oct 30, 2008 at 10:48 PM, Ted Kremenek <[EMAIL PROTECTED]> wrote: > Author: kremenek > Date: Fri Oct 31 00:48:42 2008 > New Revision: 58491 > > URL: http://llvm.org/viewvc/llvm-project?rev=58491&view=rev > Log: > On Mac OS X, use TMPDIR as the default location to place analysis results. > This is a more secure location for such files, and addresses > <rdar://problem/6334220>. > > Modified: > cfe/trunk/utils/scan-build > > Modified: cfe/trunk/utils/scan-build > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/scan-build?rev=58491&r1=58490&r2=58491&view=diff > > > ============================================================================== > --- cfe/trunk/utils/scan-build (original) > +++ cfe/trunk/utils/scan-build Fri Oct 31 00:48:42 2008 > @@ -137,7 +137,14 @@ > > my $TmpMode = 0; > if (!defined $Dir) { > - $Dir = "/tmp"; > + if (`uname` =~ /Darwin/) { > + $Dir = $ENV{'TMPDIR'}; > + if (!defined $Dir) { $Dir = "/tmp"; } > + } > + else { > + $Dir = "/tmp"; > + } > + > $TmpMode = 1; > } > > @@ -848,7 +855,7 @@ > -o - Target directory for HTML report files. Subdirectories > will be created as needed to represent separate "runs" of > the analyzer. If this option is not specified, a > directory > - is created in /tmp to store the reports. > + is created in /tmp (TMPDIR on Mac OS X) to store the > reports. > > -h - Display this message. > --help > > > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
