Sfoglia il codice sorgente

* Ported more CYGWIN fixes to 1.2.9

svn: 2577
Bryan Drewery 20 anni fa
parent
commit
94cbde66fc
3 ha cambiato i file con 9 aggiunte e 4 eliminazioni
  1. 2 1
      src/main.c
  2. 6 2
      src/misc_file.c
  3. 1 1
      src/shell.c

+ 2 - 1
src/main.c

@@ -377,7 +377,7 @@ static void dtx_arg(int argc, char *argv[])
         egg_strftime(date, sizeof date, "%c %Z", gmtime(&buildts));
 	printf("%s\nBuild Date: %s (%lu)\n", version, date, buildts);
 
-	printf("pack: %d conf: %d settings_t: %d pad: %d\n", SIZE_PACK, SIZE_CONF, sizeof(settings_t), SIZE_PAD);
+	sdprintf("pack: %d conf: %d settings_t: %d pad: %d\n", SIZE_PACK, SIZE_CONF, sizeof(settings_t), SIZE_PAD);
         if (settings.uname[0]) {
           sdebug++;
           bin_to_conf();
@@ -552,6 +552,7 @@ static void startup_checks(int hack) {
 
   if (can_stat(cfile))
     readconf(cfile, 0);	/* will read into &conf struct */
+  conf_checkpids();
 #endif /* CYGWIN_HACKS */
 
 #ifndef CYGWIN_HACKS

+ 6 - 2
src/misc_file.c

@@ -249,8 +249,11 @@ void Tempfile::FindDir()
 
 #ifdef CYGWIN_HACKS
   simple_snprintf(tempdir, DIRMAX, "tmp/");
-#endif /* CYGWIN_HACKS */
-
+  if (!check_tempdir(0)) {
+    clear_tmpdir = 0;
+    simple_snprintf(tempdir, DIRMAX, "./");
+  }
+#else
   if (!check_tempdir(0)) {
     clear_tmpdir = 0;
     simple_snprintf(tempdir, DIRMAX, "/tmp/");
@@ -272,4 +275,5 @@ void Tempfile::FindDir()
     check_tempdir(0);
     werr(ERR_TMPSTAT);
   }
+#endif /* CYGWIN_HACKS */
 }

+ 1 - 1
src/shell.c

@@ -51,7 +51,7 @@ bool clear_tmpdir = 0;
 
 int my_system(const char *run)
 {
-#ifdef WIN32-no
+#ifdef WIN32NOFUCK
   int ret = -1;
 
   PROCESS_INFORMATION pinfo;