Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 May 1996 12:33:49 +0200 (MET DST)
From:      Kees Jan Koster <dutchman@spase.nl>
To:        freebsd-hackers@FreeBSD.ORG (FreeBSD hackers Mailing list)
Subject:   g++ -ansi doesn't define -Di386
Message-ID:  <199605021033.MAA01244@phobos.spase.nl>

next in thread | raw e-mail | index | archive | help
Hoi Hackers,

When I run g++ it defines the -Di386 flag (and -D__i386__). When I run
g++ with the -ansi flag it does not define -Di386 anymore, but it does
defines -D__i386 instead.

Would anyone be so kind to explain to me why this is? Where can I find the
conventions for cpu and machine flags documented?

Anyway, I checked this against a linux box. The same thing happens, but
I noticed a difference in the header files in the <rpc/..> directory.
Most noticable was the use of __i386__ in #ifdefs instead of plain i386.

Well, to finish the story, here's my patch, in case you wish to compile
RPC stuff with -ansi.

phobos# uname -r
2.1.0-RELEASE
phobos# gcc --version
2.7.2
phobos# diff auth.h.orig auth.h 
71c71
< #if (mc68000 || sparc || vax || i386 || tahoe || hp300)
---
> #if (__mc68000__ || __sparc__ || __vax__ || __i386__ || __tahoe__ || __hp300__)

  Groetjes,
    Kees Jan

======================================================================v==
Kees Jan Koster                   e-mail: dutchman@spase.nl
Van Somerenstraat 50              tel: NL-24-3234708
6521 BS  Nijmegen
         the Netherlands
=========================================================================
 Who is this general Failure and why is he reading my disk?  (anonymous)
=========================================================================




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199605021033.MAA01244>