delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/10/17/08:35:05

Date: Sat, 17 Oct 1998 15:28:30 +0200 (WET)
From: Andris Pavenis <pavenis AT lanet DOT lv>
To: djgpp-workers AT delorie DOT com
cc: dj AT delorie DOT com
Subject: Patch for src/libc/dos/process/dosexec.c
Message-ID: <Pine.A32.3.91.981017152040.83628A-100000@ieva01.lanet.lv>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com

Hi!

Here is patch that fixes problem when running BAT file with
system() when LFN support is available:
	we should SKIP additional extension when it is "" to
	avoid BAT file (or some script) missinterpretted as
	unstubbed COFF.

Andris

*** src/libc/dos/process/dosexec.c~	Sun Jul 26 13:31:34 1998
--- src/libc/dos/process/dosexec.c	Sat Oct 17 15:19:24 1998
***************
*** 1054,1060 ****
      for (i=0; interpreters[i].extension; i++)
      {
        strcpy(rp, interpreters[i].extension);
!       if (access(rpath, F_OK) == 0 && !(is_dir = (access(rpath, D_OK) == 0)))
        {
  	found = 1;
  	break;
--- 1054,1061 ----
      for (i=0; interpreters[i].extension; i++)
      {
        strcpy(rp, interpreters[i].extension);
!       if (access(rpath, F_OK) == 0 && !(is_dir = (access(rpath, D_OK) == 0))
!           && (*interpreters[i].extension || !rd))
        {
  	found = 1;
  	break;

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019