This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: [Fwd: Re: Problem compiling NONMEM with mingw gfortran 4.3.0 builds]
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: "'Jerry DeLisle'" <jvdelisle at verizon dot net>, <gcc at gcc dot gnu dot org>
- Date: Mon, 23 Jul 2007 10:46:23 +0100
- Subject: RE: [Fwd: Re: Problem compiling NONMEM with mingw gfortran 4.3.0 builds]
- References: <46A23F9C.1090607@verizon.net>
On 21 July 2007 18:17, Jerry DeLisle wrote:
> 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.
Well, yes, but... you need to do different things for cygwin and mingw. So:
#ifdef __CYGWIN__
and
#if defined (__MINGW32__) || defined (__MINGW64__)
should do the job.
> 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?
Cygwin does not recognize or support DOS special device names; it has its
own POSIX-compatible view on the filesystem. On cygwin, you want to be
writing to the unix device /dev/conout instead of CONOUT$.
cheers,
DaveK
--
Can't think of a witty .sigline today....