Mail Archives: djgpp-workers/2013/12/15/10:51:19
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 -