diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2015-04-08 03:09:47 +0000 |
---|---|---|
committer | <> | 2015-05-05 14:37:32 +0000 |
commit | f2541bb90af059680aa7036f315f052175999355 (patch) | |
tree | a5b214744b256f07e1dc2bd7273035a7808c659f /tools/build/src/engine/function.c | |
parent | ed232fdd34968697a68783b3195b1da4226915b5 (diff) | |
download | boost-tarball-master.tar.gz |
Imported from /home/lorry/working-area/delta_boost-tarball/boost_1_58_0.tar.bz2.HEADboost_1_58_0master
Diffstat (limited to 'tools/build/src/engine/function.c')
-rw-r--r-- | tools/build/src/engine/function.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/build/src/engine/function.c b/tools/build/src/engine/function.c index 690855e14..d9ad754e4 100644 --- a/tools/build/src/engine/function.c +++ b/tools/build/src/engine/function.c @@ -228,9 +228,18 @@ STACK * stack_global() return &result; } +struct list_alignment_helper +{ + char ch; + LIST * l; +}; + +#define LISTPTR_ALIGN_BASE ( sizeof( struct list_alignment_helper ) - sizeof( LIST * ) ) +#define LISTPTR_ALIGN ( ( LISTPTR_ALIGN_BASE > sizeof( LIST * ) ) ? sizeof( LIST * ) : LISTPTR_ALIGN_BASE ) + static void check_alignment( STACK * s ) { - assert( (size_t)s->data % sizeof( LIST * ) == 0 ); + assert( (size_t)s->data % LISTPTR_ALIGN == 0 ); } void * stack_allocate( STACK * s, int size ) |