home *** CD-ROM | disk | FTP | other *** search
- *** orig/gcc-241/gcc.c Sat May 29 21:17:02 1993
- --- src/gcc-241/gcc.c Sat May 29 22:38:58 1993
- ***************
- *** 73,79 ****
- because there's no place else we can expect to use. */
- #if __MSDOS__
- #ifndef P_tmpdir
- ! #define P_tmpdir "./"
- #endif
- #endif
-
- --- 73,79 ----
- because there's no place else we can expect to use. */
- #if __MSDOS__
- #ifndef P_tmpdir
- ! #define P_tmpdir "."
- #endif
- #endif
-
- ***************
- *** 1330,1355 ****
- /* Compute a string to use as the base of all temporary file names.
- It is substituted for %g. */
-
- static void
- choose_temp_base ()
- {
- ! 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/";
- ! }
- ! }
-
- len = strlen (base);
- temp_filename = xmalloc (len + sizeof("/ccXXXXXX"));
- --- 1330,1372 ----
- /* Compute a string to use as the base of all temporary file names.
- It is substituted for %g. */
-
- + static char *
- + choose_temp_base_try (try, base)
- + char *try;
- + char *base;
- + {
- + char *rv;
- + if (base)
- + rv = base;
- + else if (try == (char *)0)
- + rv = 0;
- + else if (access (try, R_OK | W_OK) != 0)
- + rv = 0;
- + else
- + rv = try;
- + return rv;
- + }
- +
- static void
- choose_temp_base ()
- {
- ! char *base = 0;
- int len;
-
- ! base = choose_temp_base_try (getenv ("TMPDIR"), base);
- ! base = choose_temp_base_try (getenv ("TMP"), base);
- ! base = choose_temp_base_try (getenv ("TEMP"), base);
- !
- #ifdef P_tmpdir
- ! base = choose_temp_base_try (P_tmpdir, base);
- #endif
- !
- ! base = choose_temp_base_try ("/usr/tmp", base);
- ! base = choose_temp_base_try ("/tmp", base);
- !
- ! /* If all else fails, use the current directory! */
- ! if (base == (char *)0)
- ! base = "./";
-
- len = strlen (base);
- temp_filename = xmalloc (len + sizeof("/ccXXXXXX"));
-