diff options
author | Ludovic Courtès <ludo@gnu.org> | 2009-11-15 20:53:21 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2009-11-16 09:23:47 +0100 |
commit | 1119e493687ad4a0a2b1375cdad423dba3dda9ab (patch) | |
tree | ead990efd28366d68274fe8aaa7685ed25fb10b3 /libguile/objcodes.c | |
parent | 3452e6667f9c9a83004a38ed146d26aed8c17754 (diff) | |
download | guile-1119e493687ad4a0a2b1375cdad423dba3dda9ab.tar.gz |
Use Gnulib's `alignof' module.
* m4/gnulib-cache.m4: Use `alignof'.
* libguile/objcodes.c (scm_c_make_objcode_slice): Use `alignof_type'.
Diffstat (limited to 'libguile/objcodes.c')
-rw-r--r-- | libguile/objcodes.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libguile/objcodes.c b/libguile/objcodes.c index be3423271..de3a308e5 100644 --- a/libguile/objcodes.c +++ b/libguile/objcodes.c @@ -27,6 +27,7 @@ #include <sys/stat.h> #include <sys/types.h> #include <assert.h> +#include <alignof.h> #include "_scm.h" #include "vm-bootstrap.h" @@ -119,11 +120,10 @@ scm_c_make_objcode_slice (SCM parent, const scm_t_uint8 *ptr) scm_from_uint32 (parent_data->len), scm_from_uint32 (parent_data->metalen))); -#ifdef __GNUC__ /* we need `__alignof__' */ /* Make sure bytecode for the objcode-meta is suitable aligned. Failing to do so leads to SIGBUS/SIGSEGV on some arches (e.g., SPARC). */ - assert ((((scm_t_bits) ptr) & (__alignof__ (struct scm_objcode) - 1UL)) == 0); -#endif + assert ((((scm_t_bits) ptr) & + (alignof_type (struct scm_objcode) - 1UL)) == 0); data = (struct scm_objcode*)ptr; if (data->base + data->len + data->metalen > parent_data->base + parent_data->len + parent_data->metalen) |