Mail Archives: djgpp/1997/04/14/08:41:09
Once upon a time (on 14 Apr 97 at 8:01) Gisle Vanem said:
> How can I determine if my C-source is complile using the `-m486' option. I
> was thinking of using it along these lines:
>
> inline unsigned long _htonl (unsigned x)
> {
> #if defined(-m486)
> return bswap(x); /* 486+ instruction */
> #else
> return htonl(x);
> #endif
> }
>
> When compiling with `gcc -V', there's no extra define for `-m486'.
You may fiddle a little with the lib/specs file. There is no documentation
for it AFAIK, but you should be able to determine how to add a conditional
switch to define M486 or M386. Beware however, that this introduces a serious
incompatibility to your program - you'd have to be sure that everyone
compiling your program uses your specs as well. Besides, why would you need
such a macro?
==================================================
Stand straight, look me in the eye and say goodbye
Stand straight, we drifted past the point of
reasons why.
Yesterday starts tommorow, tommorow starts today
And the problems seem to be we're picking up the
pieces of a ricochet...
- Raw text -