Date:        Sat, 23 Oct 2010 16:33:37 +0100
    From:        Matthias Scheler <[email protected]>
    Message-ID:  <[email protected]>

  | I'm sorry but this whole code is horrible.

I agree with that, but ...

  | What is wrong with something as simple as this?

  | +#define _FPOS_OVERFLOW(pos) ((pos) < LONG_MIN || (pos) > LONG_MAX)

That evaluates its arg 0, 1 or 2 times  -- 0 if you're right and the wole
thing is sometimes optimised away, 1 if the value is < LONG_MIN, and twice
(most commonly) otherwise.

Macros that act like that without a very good reason are pure evil.

kre

Reply via email to