DragonFly commits List (threaded) for 2012-10
git: Use GCC's builtin offset_of as the first option
Author: John Marino <email@example.com>
Date: Sun Oct 7 23:27:36 2012 +0200
Use GCC's builtin offset_of as the first option
Other than C++ code, the GCC offsetof builtin was never getting used.
The version that did get expanded could not be used for array
declarations on GCC 4.5 and later because it wasn't considered a
constant expression by those later GCC compilers.
The first symptom was seen when building world with GCC 4.6, but the
the offsetof expansion was finally identified as the cause of the
problem while discussion PostgreSQL 9.1 build failures on DragonFly.
Since DragonFly was the only platform exibiting the behavior, the
problem was narrowed down to the offsetof macro or the compiler itself.
Fixing the macro allowed the unpatched pgsql to compile.
Thanks-to: Tom Lane
Summary of changes:
sys/cpu/i386/include/stdint.h | 11 ++++++-----
sys/cpu/x86_64/include/stdint.h | 6 ++++--
2 files changed, 10 insertions(+), 7 deletions(-)
DragonFly BSD source repository