delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/06/06/01:55:22

Date: Wed, 6 Jun 2001 08:54:49 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Alex Oleynikov <alex AT compuweigh DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: DJGPP on PTS-DOS run problem
In-Reply-To: <000f01c0ee05$1ee47630$1400a8c0@alex2000>
Message-ID: <Pine.SUN.3.91.1010606085355.14278A-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

[Please don't post in HTML.]

On Tue, 5 Jun 2001, Alex Oleynikov wrote:

> It looks like under PTS-DOS the CPP cannot find this version.h file for
> some reason.

Here's why: on MS-DOS, GCC invokes the preprocessor like this:

>  d:/djgpp/lib/gcc-lib/djgpp/2.952/cpp.exe -lang-c -v -Id:/djgpp/include
> -Id:/grx/include -Id:/djgpp/contrib/pmcom11 -D__GNUC__=2
> -D__GNUC_MINOR__=95 -Dunix -Di386 -DGO32 -DDJGPP=2 -DMSDOS
> -D__unix__ -D__i386__ -D__GO32__ -D__DJGPP__=2 -D__MSDOS__ -D__unix
> -D__i386 -D__GO32 -D__DJGPP=2 -D__MSDOS -Asystem(unix) -Asystem(msdos)
> -Acpu(i386) -Amachine(i386) -g -Acpu(i386) -Amachine(i386) -Di386
> -D__i386 -D__i386__ -D__tune_pentium__
> -imacros d:/djgpp/lib/../include/sys/version.h -remap star300.c c:/ccDaGvq5.i

whereas on PTS-DOS, it invokes cpp like this:

>  d:/djgpp/lib/gcc-lib/djgpp/2.952/cpp.exe -lang-c -v -Id:/djgpp/include
> -Id:/grx/include -Id:/djgpp/contrib/pmcom11 -D__GNUC__=2
> -D__GNUC_MINOR__=3D95 -Dunix -Di386 -DGO32 -DDJGPP=2 -DMSDOS
> -D__unix__ -D__i386__ -D__GO32__ -D__DJGPP__=2 -D__MSDOS__ -D__unix
> -D__i386 -D__GO32 -D__DJGPP=2 -D__MSDOS -Asystem(unix) -Asystem(msdos)
> -Acpu(i386) -Amachine(i386) -g -Acpu(i386) -Amachine(i386) -Di386
> -D__i386 -D__i386__ -D__tune_pentium__ 
> -imacros ../include/sys/version.h -remap star300.c c:/ccp5SQML.i

See the difference?  The PTS-DOS command line doesn't prefix
../include/sys/version.h with d:/djgpp/lib when it passes that file
name to the -imacros switch.

Hmm.. I wonder what causes the difference...  What does the following
command print under each one of the two operating systems?

	gcc --print-file-name ../include/sys/version.h

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019