Martin v. Loewis writes:
>
> To find out what is defined, compile an empty C file with -v -E.

Compiling an empty C file with -E -dM would work better.

I get this from a ->i686-netbsdelf cross compiler:

#define __VERSION__ "3.3 20020913 (experimental)"
#define __ELF__ 1
#define __NetBSD__ 1
#define __i386 1
#define __i386__ 1
#define __tune_i686__ 1
#define __tune_pentiumpro__ 1
#define i386 1

so indeed it looks like neither 'unix' nor '__unix__' is defined.  
(I imagine a patch to define __unix__ would be acceptable, but we
are not adding any more predefined symbols that violate the user's
namespace.)

As you can see, that's a 3.3 development snapshot - 3.2 might behave
differently.

> > I'm also wondering just what is up with the -A flags, and what suitable
> > values for those are...
>
> What do you mean, "is up"? They are assertions, for use with the
> #QUESTION preprocessor mechanism. While this is potentially very
> powerful, it is not used widely.

It cannot do anything that cannot be done with predefines, and is less
portable.  We (upstream) officially recommend it not be used at all.

zw


Reply via email to