[cfe-commits] r58491 - /cfe/trunk/utils/scan-build

Daniel Dunbar daniel at zuster.org
Thu Oct 30 22:54:57 PDT 2008


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 <kremenek at apple.com> 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
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20081030/6a0ca238/attachment.html>


More information about the cfe-commits mailing list