Hi Sam,

> 1. There is already alignof module - is this a replacement?

It is not exactly a replacement, because there are two possible notions of
alignof - the necessary alignment and the optimal alignment [1]-, and while
alignof.h favors the optimal alignment, I think that <stdalign.h> favors
the necessary alignment. This is one of the problems that need to be dealt
with when adding this module to gnulib.

> 2. alignof.h uses offsetof macro - where is it defined?

It is defined in <stddef.h>. This is portable. No platform exists with
known portability problems.

> 3. clisp/src/lispbibl.d defines offsetof, offsetofa, alignof - which
>    gnulib modules should they be imported from? (or should I just leave
>    them defined in clisp?)

For offsetof, clisp could rely on <stddef.h>. offsetofa is a clisp invention.
For alignof, whether you want to use gnulib's <alignof.h> depends on what you
need - the necessary alignment and the optimal alignment.

Bruno

[1] See the comments in lib/alignof.h.
-- 
In memoriam Stjepan Đureković <http://en.wikipedia.org/wiki/Stjepan_Đureković>

Reply via email to