[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Detecting kfreebsd kernel while compiling

Joachim Wiedorn dixit:

>> Useful trick (at least if you have an installation, VM or porterbox
>> acces): echo | gcc -E -dD - | less
>Wonderful - that is it! Now I can test this an all other architectures


Only on those where GCC is available (for example, not on DEC ULTRIX),
and then only for when using GCC instead of the vendor compiler to
build, for example on Minix 3 where there’s ACK and GCC (the latter
being the less preferable one, as on HP-UX, Solaris, AIX, etc. where
the vendor compiler rocks).

But for GCC platforms, yes, you can. Note that the definitions are
not even consistent across gcc versions sometimes.

Sometimes they [people] care too much: pretty printers [and syntax highligh-
ting, d.A.] mechanically produce pretty output that accentuates irrelevant
detail in the program, which is as sensible as putting all the prepositions
in English text in bold font.	-- Rob Pike in "Notes on Programming in C"

Reply to: