GNU Pascal Homepage - gpc - gpc-announce - gpc-de - gpc-doc
Diese Seite auf deutsch

Mail #678

Back to main page of archive

Previous mail   Next mail   Unformatted/full headers
Overview  10 days   Subject   Date   Thread   Author  

From: Jan-Jaap van der Heijden
Subject: GPC platforms
Date: 29 May 1997, 13:15:58

On Thu, 29 May 1997, The African Chief wrote:

> On Wed, 28 May 1997 19:41:17 +0200 (MET DST) Peter Gerwinski 
> <peter@agnes.dida.physik.uni-essen.de> wrote:
> 
> >> Is it possible to tell which GPC platform and version is being used?
> >> [...]
> >> This would really help in writing portable code. What do you think?
> >
> >I agree in complete.  Let's ask the list what they think, but I am almost
> >sure that everybody will agree.
> 
> Ok. I am sending this response to the list.
> 
> >> [...]
> >> So, can this be done with GPC? It would help with a lot of things, e.g.,
> >> in the SYSTEM unit - so, could we have these pre-defined in GPC;
> >> 	__LINUX__
> >> 	__UNIX__
> >> 	__DJGPP__ (or __MSDOS__)
> >> 	__EMX__ (or __OS2__)
> >> 	__WIN32__ (or __CYGWIN__)
> >> - depending on which GPC port you are using.


They *are* defined
Run gpc -v and see what's defined if gpc-cpp is executed.

> >Since `__MSDOS__' is ambiguous and with EMX one and the same executable
> >runs on DOS as well as on OS/2 making this a run-time, not a compile-time
> >decision, I vote for `__DJGPP__' and `__EMX__' rather than `__MSDOS__'
> >and `__OS2__'. 
> 
> Yes, I agree.
> 
> >Since I agree with "xxxx"  that Windows 95/NT is
> >not a "win" in the sence of hacker's speech (see `jarg400.info.gz' from
> >the GNU distribution), but Cygnus is, I'd vote for `__CYGWIN__' rather
> >than `__WIN32__', although "Win32" is the official name of that API.
> 
> Yes, "__CYGWIN__" seems fine.
> 

No. Read back the cygwin32 mailinglists.
cygwin32 defines __CYGWIN32__ for code specific for the cygwin32
environment. It also defines _WIN32 for the more generic win32
dependencies. It used to define __WIN32__ but they don't do that anymore
because they figured out that cygwin.dll wasn't presenting a WIN32 API
(that's in kernel32, user32.dll etc. from M$)

DJGPP specific stuff (read: _go32_xxx and _dpmi_xxx functions) are best
surrounded by __DJGPP__
MS-DOS related code (lets's see, something about CRLF conversions for
example) should be surrounded by __MSDOS__ because it applies to EMX too.


> >> and you could have;
> >> 	__VER20__
> >> 
> >> or whatever, depending on the GPC version.

See __GPC_MAJOR__ and __GPC_MINOR__

Greetings,
JanJaap

---
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going
to land, and it could be dangerous sitting under them as they fly
overhead.  -- RFC1925.

Previous mail   Next mail   Unformatted/full headers
Overview  10 days   Subject   Date   Thread   Author  


In reply to

Author Subject Date
The Chief GPC platforms 29 May 1997, 10:35:09

Back to main page of archive


Note: This page contains information that does not originate from the owner of this web site, but from the authors of the mails archived. The owner of this web site is not responsible for the content of such information. Any use of that infomation requires the consent of the respective author.

Where WWW addresses (URLs) in the mails archived are marked as hyperlinks, this is only for the comfort of the reader. The content of the web pages linked to like this does not necessarily reflect the opinion of the owner of this web site or of the authors of the mails archived. The owner of this web site is not responsible for the content of such web pages. Those pages are explicitly not to be considered as part of the content of this page, but merely as references.


This page was created by Crystal 0.999 (Linux 2.4.27/i686).