delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/02/26/09:15:23

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: GNU preprocessor problem?
Date: 26 Feb 2002 14:05:39 GMT
Organization: Aachen University of Technology (RWTH)
Lines: 40
Message-ID: <a5g4nj$rv3$1@nets3.rz.RWTH-Aachen.DE>
References: <Pine DOT GSO DOT 4 DOT 44 DOT 0202231406580 DOT 7343-100000 AT mozart DOT orchestra DOT cse DOT unsw DOT EDU DOT AU> <a5atik$qfq$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <Pine DOT GSO DOT 4 DOT 44 DOT 0202250902360 DOT 1047-100000 AT mozart DOT orchestra DOT cse DOT unsw DOT EDU DOT AU> <a5d900$hv6$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <Pine DOT GSO DOT 4 DOT 44 DOT 0202262135450 DOT 29379-100000 AT mozart DOT orchestra DOT cse DOT unsw DOT EDU DOT AU>
NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de
X-Trace: nets3.rz.RWTH-Aachen.DE 1014732339 28643 137.226.32.75 (26 Feb 2002 14:05:39 GMT)
X-Complaints-To: abuse AT rwth-aachen DOT de
NNTP-Posting-Date: 26 Feb 2002 14:05:39 GMT
Originator: broeker@
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Dong Soo Kim <dsk666 AT cse DOT unsw DOT edu DOT au> wrote:

[... some line breaks inserted for readibility]
> RSXNTDJ=D:\DJGPP\RSXNTDJ
> C_INCLUDE_PATH=D:\DJGPP\RSXNTDJ\include\win32\anders;
> PATH=C:\JDK1.3\BIN;C:\TMP\HOME;C:\ATACR;D:\DJGPP\BIN;D:\DJGPP\RSXNTDJ\BIN;
>   C:\WINDOWS;C:\WINDOWS\COMMAND;C:\PROGRA~1\ULTRAE~1;D:\COMP;D:\JPEG
> DJGPP=D:\DJGPP\DJGPP.ENV

This combination of three variables almost certainly is the root of
your problem.  The order of paths is wrong if RSXNTDJ is your
currently used compiler (djgpp\rsxntdj\bin should come _before_
djgpp\bin), whereas C_INCLUDE_PATH should never be set this way if
you're trying to use DJGPP itself.

>  .. don't see anything to do with other gcc windows ports there. 

There is none.  The problem is between RSXNTDJ and DJGPP.

> #include's) has _WINDOWS_H anywhere in them. Really weird imo. But it
> seems you can check for _WINDOWS_H in order to verify that the win32 api
> is available.

Actually, you should rely on neither of these. The proper #define to
check whether you're on a Windows platform is _Windows, in my
experience.  Others may also work.  A look at gcc -v output to see the
predefined macros passed by gcc.exe to cpp.exe should be enlightening.

The _WINDOWS_H macro is meant for a different purpose, and shouldn't
be abused for this kind of check.  It's quite useless anyway: it just
moves the problem instead of solving it: it's still up to the
programmer to guarantee that #include <windows.h> has been done
*before* #include "errout.h".  Checking whether to do that or not, in
the calling source file, is exactly as hard has deciding which of to
alternative headers "errwin.h" and "errdos.h" to #include.


-- 
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


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