From: "Tim Van Holder" To: Cc: "'Perl 5 Porters'" Subject: Re: Win2k + djgpp Date: Mon, 10 Sep 2001 18:39:13 +0200 Message-ID: <001201c13a17$20353020$747d76d5@pandora.be> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0013_01C13A27.E3BE0020" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 In-Reply-To: <20010910163219.4AE6.H.M.BRAND@hccnet.nl> X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk 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 #include #include #include 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--