delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/28/05:27:39

Message-Id: <199810281027.MAA36800@ieva06.lanet.lv>
From: "Andris Pavenis" <pavenis AT lanet DOT lv>
To: djgpp AT delorie DOT com, dj AT delorie DOT com
Date: Wed, 28 Oct 1998 12:26:47 +0200
MIME-Version: 1.0
Subject: Re: DJGPP 2.02 Beta 981027
In-reply-to: <199810280228.VAA08194@indy.delorie.com>
X-mailer: Pegasus Mail for Win32 (v3.01b)
Reply-To: djgpp AT delorie DOT com

Date sent:      	Tue, 27 Oct 1998 21:28:25 -0500 (EST)
From:           	DJ Delorie <dj AT delorie DOT com>
Subject:        	DJGPP 2.02 Beta 981027

> 
> On Simtel.Net, int he v2/beta/981027 directory, is the first beta
> version of DJGPP 2.02.

Try to build djlsr202 using egcs-1.1 cross-compiler from Linux 
(i586-pc-linux-gnulibc1) to DJGPP (i586-pc-msdosdjgpp). All went 
smootly after I patched include/coff.h to workaround well known 
Linux problem with  _POSIX_SOURCE.

Haven't seriously tested yet but one problem discussed earlier is not fixed:

The problem when running BAT file with function system() does not work
when LFN support is enabled (this was discussed in djgpp-workers
this month). I'm resending all information to avoid need to search
mailing lists archives:

-----------------   here is test example  ---------------------
#include <stdlib.h>
#include <fstream>

void build_bat ()
  {
      ofstream os ("test.bat");
      os << "dir\nls\n";
  }

int  main (void)
  {
      build_bat ();
      system ("test.bat");
  }

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

There were 2 different patches suggested (each one fixes problem
in a different way):

---------------------  First variant --------------------------------------------------------
*** 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;

-------------------  Second variant  ----------------------------------------------------------------
*** dosexec.c~	Sun Jul 26 13:31:34 1998
--- dosexec.c	Mon Oct 19 11:09:00 1998
***************
*** 539,545 ****
    /* Non-DJGPP programs cannot be run by !proxy.  */
    if (!is_coff)
    {
!     return direct_exec(program, argv, envp);
    }
  
    if (found_si)
--- 539,548 ----
    /* Non-DJGPP programs cannot be run by !proxy.  */
    if (!is_coff)
    {
!     if (type->exec_format == _V2_EXEC_FORMAT_EXE)
!         return direct_exec(program, argv, envp);
!     else
!         return __dosexec_command_exec (program, argv, envp);
    }
  
    if (found_si)
--------------------------------------------------------------------------------------------------

As I already wrote I would prefer first variant (here my opinion is different
from one of Eli). I think it is rather weird to call COFF image as something.bat
(or similar)

Andris

- Raw text -


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