Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.88
 
1.89
 
MAIN:gmcgarry:20080417111438
 
cc.c
_>602602                         av[j++] = "-shared";
 603603                 } else {
 604604                         av[j++] = "-d";
<> 605+#ifndef os_win32
605606                         av[j++] = "-e";
 606607                         av[j++] = STARTLABEL;
<> 608+#endif
607609                         if (Bstatic == 0) { /* Dynamic linkage */
 608610                                 for (i = 0; dynlinker[i]; i++)
 609611                                         av[j++] = dynlinker[i];
     
 !
614616                         av[j++] = "-o";
 615617                         av[j++] = outfile;
 616618                 }
<> 619+#ifndef os_win32
617620                 if (shared) {
 618621 #ifdef STARTFILES_S
 619622                         for (i = 0; startfiles_S[i]; i++)
     
 !
626629                                         av[j++] = startfiles[i];
 627630                         }
 628631                 }
<> 632+#endif
629633                 i = 0;
 630634                 while(i<nl) {
 631635                         av[j++] = llist[i++];
     
 !
760764         return(s);
 761765 }
 762766 
<>763 -
  767+#ifdef WIN32
764768 int
 765769 callsys(char *f, char *v[])
 766770 {
 767771         int t, status = 0;
<>768 -#ifndef WIN32
 769 -        pid_t p;
 770 -#endif
 771 -        char *s;
 772 -
 773 -        if (vflag) {
 774 -                fprintf(stderr, "%s ", f);
 775 -                for (t = 1; v[t]; t++)
 776 -                        fprintf(stderr, "%s ", v[t]);
 777 -                fprintf(stderr, "\n");
 778 -        }
 779 -
 780 -#ifdef WIN32
 781 -        {
  772+        char cmd[MAX_PATH];
782773         STARTUPINFO si;
 783774         PROCESS_INFORMATION pi;
 784775         DWORD exitCode;
 785776         BOOL ok;
 786777 
<>787 -        // Set up the start up info struct.
  778+        len = strlcpy(cmd, f, MAX_PATH);
  779+        for (t = 1; v[t] && len < MAX_PATH; t++) {
  780+                len = strlcat(cmd, " ", MAX_PATH);
  781+                len = strlcat(cmd, v[t], MAX_PATH);
  782+        }
  783+
  784+        if (vflag)
  785+                printf("%s\n", cmd);
  786+
788787         ZeroMemory(&si, sizeof(STARTUPINFO));
 789788         si.cb = sizeof(STARTUPINFO);
<>790 -        GetStartupInfo(&si);
 791 -        ok = CreateProcess(f// the executable program
 792 -                NULL,   // the command line arguments
  789+        ZeroMemory(&pi, sizeof(PROCESS_INFORMATION));
  790+
  791+        ok = CreateProcess(NULL// the executable program
  792+                cmd,   // the command line arguments
793793                 NULL,       // ignored
 794794                 NULL,       // ignored
 795795                 TRUE,       // inherit handles
<>796 -                DETACHED_PROCESS | HIGH_PRIORITY_CLASS,
  796+                HIGH_PRIORITY_CLASS,
797797                 NULL,       // ignored
 798798                 NULL,       // ignored
 799799                 &si,
     
 !
804804                 return 100;
 805805         }
 806806 
<>807 -        GetExitCodeProcess(pi.hProcess, &exitCode);
  807+        WaitForSingleObject(pi.hProcess, INFINITE);
  808+        GetExitCodeProcess(pi.hProcess, &exitCode;
808809         return (exitCode != 0);
<>809 -        }
  810+}
  811+
810812 #else
 811813 
<> 814+int
  815+callsys(char *f, char *v[])
  816+{
  817+        int t, status = 0;
  818+        pid_t p;
  819+        char *s;
  820+
  821+        if (vflag) {
  822+                fprintf(stderr, "%s ", f);
  823+                for (t = 1; v[t]; t++)
  824+                        fprintf(stderr, "%s ", v[t]);
  825+                fprintf(stderr, "\n");
  826+        }
  827+
812828         if ((p = fork()) == 0) {
 813829                 if (Bflag) {
 814830                         size_t len = strlen(Bflag) + 8;
     
 !
841857         if (WIFSIGNALED(status))
 842858                 dexit(eflag);
 843859         errorx(8, "Fatal error in %s", f);
<>844 -#endif
845860 }
<> 861+#endif
846862 
 847863 char *
 848864 copy(char *as)
     
 !
863879         return(unlink(f));
 864880 }
 865881 
<> 882+#ifdef WIN32
866883 char *
 867884 gettmp(void)
 868885 {
<>869 -#ifdef WIN32
870886 #define BUFFSIZE 1000
 871887         DWORD pathSize;
 872888         char pathBuffer[BUFFSIZE];
     
 !
884900                 exit(8);
 885901         }
 886902         return copy(tempFilename);
<> 903+}
  904+
887905 #else
<> 906+
  907+char *
  908+gettmp(void)
  909+{
888910         char *sfn = copy("/tmp/ctm.XXXXXX");
 889911         int fd = -1;
 890912 
     
 !
894916         }
 895917         close(fd);
 896918         return sfn;
<>897 -#endif
898919 }
<_ 920+#endif
FishEye: Open Source License registered to PCC.
Your maintenance has expired. You can renew your license at http://www.atlassian.com/fisheye/renew
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-10-31 20:24 +0100