git: math.h: Convert HUGE_VALL to constant, from const-qualified var
Stathis Kamperis
beket at crater.dragonflybsd.org
Thu Jul 1 01:10:50 PDT 2010
commit d1c42bb23082b2a1c10016ee94c3f7cdb678a2e8
Author: Stathis Kamperis <beket at dragonflybsd.org>
Date: Wed Jun 30 23:56:06 2010 +0300
math.h: Convert HUGE_VALL to constant, from const-qualified var
Define HUGE_VALL via a compiler builtin. If the compiler doesn't
support it, we just fallback to previous situation. Both gcc and
clang play well with it.
This patch allows us to:
1. use HUGE_VALL as initializer element for objects with static
storage duration
2. not worry about the format of long double (e.g., 96bit vs 128bit)
3. not worry about things like endianness
Briefly-discussed-with: corecode@, swildner@, but put the blame on me
if I broke something for you.
Special-thanks-to: swildner@ for checking code with clang.
P.S. HUGE_VAL{,F} already do the right thing.
Summary of changes:
include/math.h | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/d1c42bb23082b2a1c10016ee94c3f7cdb678a2e8
--
DragonFly BSD source repository
More information about the Commits
mailing list