Subject: Re: changed files: 'src/gnu/usr.bin/gcc2/cc gcc.c'
To: None <conklin@kaleida.com>
From: Chris G. Demetriou <cgd@postgres.Berkeley.EDU>
List: source-changes
Date: 03/02/1994 17:44:14
> Gcc does the right thing if the user has the TMPDIR environment
> variable set.  But if you undef P_tmpdir, it won't check in /var/tmp,
> which on my machine has a lot less space than /tmp.

In a word: "*HUH*?"

the code in question:

  char *base = getenv ("TMPDIR");
  int len;
   
  if (base == (char *)0)
    {
#ifdef P_tmpdir
      if (access (P_tmpdir, R_OK | W_OK) == 0)
        base = P_tmpdir;
#endif 
      if (base == (char *)0)
        { 
          if (access ("/usr/tmp", R_OK | W_OK) == 0)
            base = "/usr/tmp/"; 
          else
            base = "/tmp/";
        }
    }


OK, it obviously gets TMPDIR right.  then it tries /usr/tmp, then /tmp.

/var/tmp is the *wrong* place to put cc temp files, as it
*HAS* to be "permanent storage," meaning that all creates
hit the disk.

P_tmpdir makes it use /var/tmp.


If your /var/tmp has lots less space than /tmp, why do you mind
if temp files *don't* go in /var/tmp?  (if your /tmp is so
small, use an MFS!)


cgd

------------------------------------------------------------------------------