delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2013/12/15/10:51:19

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
X-Recipient: djgpp-workers AT delorie DOT com
Message-ID: <52ADCFEC.8000108@iki.fi>
Date: Sun, 15 Dec 2013 17:51:08 +0200
From: Andris Pavenis <andris DOT pavenis AT iki DOT fi>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0
MIME-Version: 1.0
To: djgpp-workers AT delorie DOT com
Subject: Re: Attempts to build GCC under DOSEMU
References: <52AD9B08 DOT 1040501 AT iki DOT fi> <52ADBDCB DOT 2020203 AT gmx DOT de>
In-Reply-To: <52ADBDCB.2020203@gmx.de>
Reply-To: djgpp-workers AT delorie DOT com

On 12/15/2013 04:33 PM, Juan Manuel Guerrero wrote:
> Am 15.12.2013 13:05, schrieb Andris Pavenis:
>> I'm trying to build gcc-4.8.2 under DOSEMU (in Fedora 19 x86_64)
>>
>> 1) The first problem was that top level configure script failed
>> when trying to run config.status. Narrowed down the problem to
>> the starting sed:
>>
>> simplified example:
>>
>> sed -e 's:foo:bar:g' </dev/null
>>
>> worked OK (empty output) in DOS session under Windows Vista,
>> but outputed garbage under Dosemu. Rebuilding sed using
>> current DJGPP CVS version did not help. However upgrading
>> FreeDOS image to FreeDOS-1.1 did, so after that top level
>> configure finished OK
>>
>> 2) The second problem was creating config.status in gcc
>> subdirectory. In this case
>>
>> awk 'BEGIN {getline < "/dev/null"}'
>>
>> gets stuck (with FreeDOS-1.1). One can try one of the following:
>> echo "" | awk 'BEGIN  {getline < "/dev/null"}'
>> awk 'BEGIN  {getline < "/dev/null"}' </dev/null
>>
>> Perhaps the next step would be to rebuild awk and try
>> to debug the problem.
>>
>> I do not know whether one have similar problems when
>> using FreeDOS 1.1 directly or in virtual machine.
>>
>> Andris
>>
>
> I have tried this (gawk 'BEGIN {getline < "/dev/null"}' ) on vmware using winxp and msdos 6.22.
> It works flawlessly.  But with freedos 1.1 it fails.  Will put the issue on my todo list but it 
> will take
> some time.
>
> Regards,
> Juan M. Guerrero
>
>
Simple test program

[andris AT ap 0]$ cat testnull.c
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>

int main(int argc, char *argv[])
{
    const int SIZE = 256;
    char buffer[SIZE];
    int handle = open(argc > 1 ? argv[1] : "/dev/null", O_RDONLY);
    int i, k, len = read(handle, buffer, SIZE);
    printf("len=%d\n", len);
    if (len > 0)
    {
       for (i = 0; i < len; i+=16)
       {
          for (k = 0; k < 16 && i + k < len; k++)
          {
             printf(" %02X", (unsigned char)buffer[i+k]);
          }
          printf("\n", len);

       }
    }
    return 0;
}

outputs 'len=0' in Linux and DOS session under Windows Vista (DJGPP executable in last case)
as it is expected.

The output of the same DJGPP executable outputs in FreeDOS-1.1 (under Dosemu):

len=256
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

So support of /dev/null is broken for FreeDOS-1.1 at least under Dosemu. So
it is even surprising that I succeeded to get so far with trying to build
DJGPP stuff.

Andris





- Raw text -


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