This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Problem compiling NONMEM with mingw gfortran 4.3.0 builds
- From: Jerry DeLisle <jvdelisle at verizon dot net>
- To: Danny Smith <dannysmith at clear dot net dot nz>, Fortran List <fortran at gcc dot gnu dot org>
- Date: Sat, 21 Jul 2007 10:13:32 -0700
- Subject: Re: Problem compiling NONMEM with mingw gfortran 4.3.0 builds
- References: <000301c7c8d0$b2ee4160$cb4861cb@THOMAS>
Danny,
I experimented with your simple Hello World in C running on Cygwin, writing to
CONOUT$. It does not error out, but does nothing.
On the gfortran side it creates a file named CONOUT$.
I would like to intercept this file name on mingw and cygwin systems and attempt
to map it to stdio in the gfortran runtime library. (band aid fix)
A couple of questions:
1) Is there a #define somewhere that I can use to conditionally compile this
"band aid" just for mingw and cygwin? I have looked in config.h and did not
find anything useful.
2) At least on cygwin, since the example does not work for the C version (I have
not tried mingw, but presume it works there) is there a "system" level fix for
this problem that would be more appropriate?
Best regards,
Jerry
Examples:
$ cat test.c
#include <fcntl.h>
#include <sys/stat.h>
#include <stdlib.h>
int main()
{
int fd= _open ("CONOUT$", _O_RDWR);
if (fd >= 0)
_write (fd, "Hello world", sizeof ("Hello world"));
return 0;
}
$ cat test.f
open(unit=29,file="CONOUT$")
write(29,100)
100 format('Hello, world!')
end