Mail Archives: djgpp-workers/2000/08/22/16:45:09
> From what I see, Bash 2.04 has some trouble with any fragment of the
> configure script which uses <<\EOF, like this:
Turns out the problem in plain DOS is from a subtle change to the way here
documents are handled. This test case is a simplified version of the problem:
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <dos.h>
int main()
{
int fd, fd2;
const char document[]="I am a here document.";
int document_len;
document_len = strlen (document);
fd = open ("here.txt", O_TRUNC | O_WRONLY | O_CREAT | O_EXCL | O_TEXT,
0600);
write (fd, document, document_len);
/* _dos_commit (fd); */
fd2 = open (document, O_RDONLY, 0600);
close (fd);
/* Process here document in fd2. Won't work unless _dos_commit is
uncommented. */
close (fd2);
return 0;
}
Adding a call to '_dos_commit' solves the problem in Bash 2.04 for plain DOS.
Mark
- Raw text -