mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
Use Gnulib's `alignof' module.
* m4/gnulib-cache.m4: Use `alignof'. * libguile/objcodes.c (scm_c_make_objcode_slice): Use `alignof_type'.
This commit is contained in:
parent
3452e6667f
commit
1119e49368
3 changed files with 6 additions and 5 deletions
|
@ -9,7 +9,7 @@
|
|||
# the same distribution terms as the rest of that program.
|
||||
#
|
||||
# Generated by gnulib-tool.
|
||||
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --lgpl --libtool --macro-prefix=gl --no-vc-files alloca-opt autobuild byteswap canonicalize-lgpl environ extensions flock fpieee full-read full-write havelib iconv_open-utf inet_ntop inet_pton lib-symbol-versions lib-symbol-visibility libunistring putenv stdlib strcase strftime striconveh string verify vsnprintf
|
||||
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --lgpl --libtool --macro-prefix=gl --no-vc-files alignof alloca-opt autobuild byteswap canonicalize-lgpl environ extensions flock fpieee full-read full-write havelib iconv_open-utf inet_ntop inet_pton lib-symbol-versions lib-symbol-visibility libunistring putenv stdlib strcase strftime striconveh string verify vsnprintf
|
||||
|
||||
AUTOMAKE_OPTIONS = 1.5 gnits subdir-objects
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -15,11 +15,12 @@
|
|||
|
||||
|
||||
# Specification in the form of a command-line invocation:
|
||||
# gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --lgpl --libtool --macro-prefix=gl --no-vc-files alloca-opt autobuild byteswap canonicalize-lgpl environ extensions flock fpieee full-read full-write havelib iconv_open-utf inet_ntop inet_pton lib-symbol-versions lib-symbol-visibility libunistring putenv stdlib strcase strftime striconveh string verify vsnprintf
|
||||
# gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --lgpl --libtool --macro-prefix=gl --no-vc-files alignof alloca-opt autobuild byteswap canonicalize-lgpl environ extensions flock fpieee full-read full-write havelib iconv_open-utf inet_ntop inet_pton lib-symbol-versions lib-symbol-visibility libunistring putenv stdlib strcase strftime striconveh string verify vsnprintf
|
||||
|
||||
# Specification in the form of a few gnulib-tool.m4 macro invocations:
|
||||
gl_LOCAL_DIR([])
|
||||
gl_MODULES([
|
||||
alignof
|
||||
alloca-opt
|
||||
autobuild
|
||||
byteswap
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue