Mail Archives: djgpp-workers/2001/09/10/12:40:46
This is a multi-part message in MIME format.
------=_NextPart_000_0013_01C13A27.E3BE0020
Content-Type: text/plain;
charset="US-ASCII"
Content-Transfer-Encoding: 7bit
> If called from it prints
>
> DOS box MS-DOS LT02 5 50 i686
> bash-2.05 MS-DOS LT02 5 50 i686
> tcsh-6.10.00 MS-DOS LT02 5 50 i686
And this is DJGPP's uname? In order for Configure to recognize
DJGPP, that last item should be 'pc', not 'i686'. This is
probably due to the CVS libc (IIRC it has newfangled CPU
detection).
For me, it prints
MS-DOS FATBOYTI 8 00 pc
in a DOS box under WinME.
Maybe Configure should check for the 'MS-DOS' part instead, but
I'm not sure what other systems (if any) use that.
> bash probably is also the source of the failures running
> 'make minitest',
> cause the bail out message is
>
> base/cond......c:/util/djgpp/tmp/dj310000: Cannot duplicate
> fd 1: Bad file descriptor (EBADF)
> FAILED at test 0
There's a known problem with file descriptors perl-spawned
programs (present in 5.6.0, 5.6.1 and 5.7.2), which prevents
autoconf > 2.50 from functioning under DJGPP. I've yet to find
either cause or solution (Laszlo, you have any idea?). A test
case is attached - run normally, foo.exe will allocated
FDs 5 - 19 for the testfiles; if run from the perl script, it
gets FDs 3 - 17 (and 3 and 4 are not supposed to be used, IIRC).
It _might_ be something else though (perhaps another Win2K quirk).
------=_NextPart_000_0013_01C13A27.E3BE0020
Content-Type: application/octet-stream;
name="foo.pl"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="foo.pl"
#! perl -w
system ('./foo.exe');
exit;
------=_NextPart_000_0013_01C13A27.E3BE0020
Content-Type: application/octet-stream;
name="foo.c"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="foo.c"
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/stat.h>
int
main(void)
{
int fd[15] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
int i = 0;
for (i = 0; i < 15; ++i) {
char fname[8] = { "" };
sprintf (fname, "foo%d", i + 1);
fd[i] = open (fname, O_CREAT | O_WRONLY, S_IWUSR);
printf ("File %d got FD %d\n", i + 1, fd[i]);
if (fd[i] != 0) {
int bytes = write (fd[i], "foobar", 6);
if (bytes <= 0) {
printf ("-> Write failed (returned %d != 6)\n", bytes);
perror (fname);
}
}
}
for (i = 0; i < 15; ++i) {
char fname[8] = { "" };
sprintf (fname, "foo%d", i + 1);
if (close (fd[i]))
printf ("Failed to close FD %d (file %d)\n", fd[i], i + 1);
if (unlink (fname))
printf ("Failed to unlink file %d (%s)\n", i + 1, fname);
}
return 0;
}
------=_NextPart_000_0013_01C13A27.E3BE0020--
- Raw text -