diff --git a/Zend/zend.c b/Zend/zend.c index bebf00a424d3..778c3ee9603c 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -632,7 +632,7 @@ static void function_copy_ctor(zval *zv) /* {{{ */ } func = pemalloc(sizeof(zend_internal_function), 1); Z_FUNC_P(zv) = func; - memcpy(func, old_func, sizeof(zend_internal_function)); + ZEND_MEMCPY_INLINE(func, old_func, sizeof(zend_internal_function)); function_add_ref(func); if ((old_func->common.fn_flags & (ZEND_ACC_HAS_RETURN_TYPE|ZEND_ACC_HAS_TYPE_HINTS)) && old_func->common.arg_info) { @@ -1298,7 +1298,7 @@ ZEND_API zval *zend_get_configuration_directive(zend_string *name) /* {{{ */ #define SAVE_STACK(stack) do { \ if (CG(stack).top) { \ - memcpy(&stack, &CG(stack), sizeof(zend_stack)); \ + ZEND_MEMCPY_INLINE(&stack, &CG(stack), sizeof(zend_stack)); \ CG(stack).top = CG(stack).max = 0; \ CG(stack).elements = NULL; \ } else { \ @@ -1309,7 +1309,7 @@ ZEND_API zval *zend_get_configuration_directive(zend_string *name) /* {{{ */ #define RESTORE_STACK(stack) do { \ if (stack.top) { \ zend_stack_destroy(&CG(stack)); \ - memcpy(&CG(stack), &stack, sizeof(zend_stack)); \ + ZEND_MEMCPY_INLINE(&CG(stack), &stack, sizeof(zend_stack)); \ } \ } while (0) diff --git a/Zend/zend_API.c b/Zend/zend_API.c index bfcbe2e5f3e1..c9da1256d5a9 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -1328,7 +1328,7 @@ ZEND_API HashTable *zend_separate_class_constants_table(zend_class_entry *class_ if (c->ce == class_type) { if (Z_TYPE(c->value) == IS_CONSTANT_AST) { new_c = zend_arena_alloc(&CG(arena), sizeof(zend_class_constant)); - memcpy(new_c, c, sizeof(zend_class_constant)); + ZEND_MEMCPY_INLINE(new_c, c, sizeof(zend_class_constant)); c = new_c; } Z_TRY_ADDREF(c->value); @@ -2770,7 +2770,7 @@ ZEND_API zend_result zend_register_functions(zend_class_entry *scope, const zend lowercase_name = zend_string_tolower_ex(internal_function->function_name, type == MODULE_PERSISTENT); lowercase_name = zend_new_interned_string(lowercase_name); reg_function = malloc(sizeof(zend_internal_function)); - memcpy(reg_function, &function, sizeof(zend_internal_function)); + ZEND_MEMCPY_INLINE(reg_function, &function, sizeof(zend_internal_function)); if (zend_hash_add_ptr(target_function_table, lowercase_name, reg_function) == NULL) { unload=1; free(reg_function); diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c index 0ed2ee2a79ae..12d8b96bbd05 100644 --- a/Zend/zend_alloc.c +++ b/Zend/zend_alloc.c @@ -3008,7 +3008,7 @@ ZEND_API zend_mm_heap *zend_mm_startup_ex(const zend_mm_handlers *handlers, void zend_mm_chunk *chunk; zend_mm_heap *heap; - memcpy((zend_mm_handlers*)&tmp_storage.handlers, handlers, sizeof(zend_mm_handlers)); + ZEND_MEMCPY_INLINE((zend_mm_handlers*)&tmp_storage.handlers, handlers, sizeof(zend_mm_handlers)); tmp_storage.data = data; chunk = (zend_mm_chunk*)handlers->chunk_alloc(&tmp_storage, ZEND_MM_CHUNK_SIZE, ZEND_MM_CHUNK_SIZE); if (UNEXPECTED(chunk == NULL)) { @@ -3068,7 +3068,7 @@ ZEND_API zend_mm_heap *zend_mm_startup_ex(const zend_mm_handlers *handlers, void #endif return NULL; } - memcpy(storage, &tmp_storage, sizeof(zend_mm_storage)); + ZEND_MEMCPY_INLINE(storage, &tmp_storage, sizeof(zend_mm_storage)); if (data) { storage->data = (void*)(((char*)storage + sizeof(zend_mm_storage))); memcpy(storage->data, data, data_size); diff --git a/Zend/zend_attributes.c b/Zend/zend_attributes.c index 6330887b2908..a1dfa6f4d60a 100644 --- a/Zend/zend_attributes.c +++ b/Zend/zend_attributes.c @@ -374,7 +374,7 @@ void zend_register_attribute_ce(void) zend_ce_sensitive_parameter = register_class_SensitiveParameter(); attr = zend_internal_attribute_register(zend_ce_sensitive_parameter, ZEND_ATTRIBUTE_TARGET_PARAMETER); - memcpy(&attributes_object_handlers_sensitive_parameter_value, &std_object_handlers, sizeof(zend_object_handlers)); + ZEND_MEMCPY_INLINE(&attributes_object_handlers_sensitive_parameter_value, &std_object_handlers, sizeof(zend_object_handlers)); attributes_object_handlers_sensitive_parameter_value.get_properties_for = attributes_sensitive_parameter_value_get_properties_for; /* This is not an actual attribute, thus the zend_internal_attribute_register() call is missing. */ diff --git a/Zend/zend_closures.c b/Zend/zend_closures.c index e141d0956dc9..42fc4a9cdf06 100644 --- a/Zend/zend_closures.c +++ b/Zend/zend_closures.c @@ -648,7 +648,7 @@ void zend_register_closure_ce(void) /* {{{ */ zend_ce_closure = register_class_Closure(); zend_ce_closure->create_object = zend_closure_new; - memcpy(&closure_handlers, &std_object_handlers, sizeof(zend_object_handlers)); + ZEND_MEMCPY_INLINE(&closure_handlers, &std_object_handlers, sizeof(zend_object_handlers)); closure_handlers.free_obj = zend_closure_free_storage; closure_handlers.get_constructor = zend_closure_get_constructor; closure_handlers.get_method = zend_closure_get_method; @@ -685,7 +685,7 @@ static void zend_create_closure_ex(zval *res, zend_function *func, zend_class_en } if (func->type == ZEND_USER_FUNCTION) { - memcpy(&closure->func, func, sizeof(zend_op_array)); + ZEND_MEMCPY_INLINE(&closure->func, func, sizeof(zend_op_array)); closure->func.common.fn_flags |= ZEND_ACC_CLOSURE; closure->func.common.fn_flags &= ~ZEND_ACC_IMMUTABLE; @@ -739,7 +739,7 @@ static void zend_create_closure_ex(zval *res, zend_function *func, zend_class_en (*closure->func.op_array.refcount)++; } } else { - memcpy(&closure->func, func, sizeof(zend_internal_function)); + ZEND_MEMCPY_INLINE(&closure->func, func, sizeof(zend_internal_function)); closure->func.common.fn_flags |= ZEND_ACC_CLOSURE; /* wrap internal function handler to avoid memory leak */ if (UNEXPECTED(closure->func.internal_function.handler == zend_closure_internal_handler)) { diff --git a/Zend/zend_constants.c b/Zend/zend_constants.c index 8ce832153a0b..49cd7b2191db 100644 --- a/Zend/zend_constants.c +++ b/Zend/zend_constants.c @@ -64,7 +64,7 @@ static void copy_zend_constant(zval *zv) ZEND_ASSERT(ZEND_CONSTANT_FLAGS(c) & CONST_PERSISTENT); Z_PTR_P(zv) = pemalloc(sizeof(zend_constant), 1); - memcpy(Z_PTR_P(zv), c, sizeof(zend_constant)); + ZEND_MEMCPY_INLINE(Z_PTR_P(zv), c, sizeof(zend_constant)); c = Z_PTR_P(zv); c->name = zend_string_copy(c->name); @@ -538,7 +538,7 @@ static void* zend_hash_add_constant(HashTable *ht, zend_string *key, zend_consta void *ret; zend_constant *copy = pemalloc(sizeof(zend_constant), ZEND_CONSTANT_FLAGS(c) & CONST_PERSISTENT); - memcpy(copy, c, sizeof(zend_constant)); + ZEND_MEMCPY_INLINE(copy, c, sizeof(zend_constant)); ret = zend_hash_add_ptr(ht, key, copy); if (!ret) { pefree(copy, ZEND_CONSTANT_FLAGS(c) & CONST_PERSISTENT); diff --git a/Zend/zend_enum.c b/Zend/zend_enum.c index ab4e6e4e6f93..bb0f83fa8cbd 100644 --- a/Zend/zend_enum.c +++ b/Zend/zend_enum.c @@ -156,7 +156,7 @@ void zend_register_enum_ce(void) zend_ce_backed_enum = register_class_BackedEnum(zend_ce_unit_enum); zend_ce_backed_enum->interface_gets_implemented = zend_implement_backed_enum; - memcpy(&enum_handlers, &std_object_handlers, sizeof(zend_object_handlers)); + ZEND_MEMCPY_INLINE(&enum_handlers, &std_object_handlers, sizeof(zend_object_handlers)); enum_handlers.clone_obj = NULL; enum_handlers.compare = zend_objects_not_comparable; } diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 3934a3cef071..882671bc84f2 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -744,7 +744,7 @@ void zend_register_default_exception(void) /* {{{ */ zend_ce_throwable = register_class_Throwable(zend_ce_stringable); zend_ce_throwable->interface_gets_implemented = zend_implement_throwable; - memcpy(&default_exception_handlers, &std_object_handlers, sizeof(zend_object_handlers)); + ZEND_MEMCPY_INLINE(&default_exception_handlers, &std_object_handlers, sizeof(zend_object_handlers)); default_exception_handlers.clone_obj = NULL; zend_ce_exception = register_class_Exception(zend_ce_throwable); diff --git a/Zend/zend_generators.c b/Zend/zend_generators.c index 99c888ee09e9..d89267a4115c 100644 --- a/Zend/zend_generators.c +++ b/Zend/zend_generators.c @@ -1133,7 +1133,7 @@ void zend_register_generator_ce(void) /* {{{ */ /* get_iterator has to be assigned *after* implementing the interface */ zend_ce_generator->get_iterator = zend_generator_get_iterator; - memcpy(&zend_generator_handlers, &std_object_handlers, sizeof(zend_object_handlers)); + ZEND_MEMCPY_INLINE(&zend_generator_handlers, &std_object_handlers, sizeof(zend_object_handlers)); zend_generator_handlers.free_obj = zend_generator_free_storage; zend_generator_handlers.dtor_obj = zend_generator_dtor_storage; zend_generator_handlers.get_gc = zend_generator_get_gc; diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index 3921ee35fe0d..1584f1ecde50 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -81,10 +81,10 @@ static zend_function *zend_duplicate_internal_function(zend_function *func, zend if (UNEXPECTED(ce->type & ZEND_INTERNAL_CLASS)) { new_function = pemalloc(sizeof(zend_internal_function), 1); - memcpy(new_function, func, sizeof(zend_internal_function)); + ZEND_MEMCPY_INLINE(new_function, func, sizeof(zend_internal_function)); } else { new_function = zend_arena_alloc(&CG(arena), sizeof(zend_internal_function)); - memcpy(new_function, func, sizeof(zend_internal_function)); + ZEND_MEMCPY_INLINE(new_function, func, sizeof(zend_internal_function)); new_function->common.fn_flags |= ZEND_ACC_ARENA_ALLOCATED; } if (EXPECTED(new_function->common.function_name)) { @@ -1111,7 +1111,7 @@ static zend_always_inline inheritance_status do_inheritance_check_on_method_ex( } else { /* op_array wasn't duplicated yet */ zend_function *new_function = zend_arena_alloc(&CG(arena), sizeof(zend_op_array)); - memcpy(new_function, child, sizeof(zend_op_array)); + ZEND_MEMCPY_INLINE(new_function, child, sizeof(zend_op_array)); Z_PTR_P(child_zv) = child = new_function; } } @@ -1352,13 +1352,13 @@ static void do_inherit_class_constant(zend_string *name, zend_class_constant *pa ce->ce_flags |= ZEND_ACC_HAS_AST_CONSTANTS; if (ce->parent->ce_flags & ZEND_ACC_IMMUTABLE) { c = zend_arena_alloc(&CG(arena), sizeof(zend_class_constant)); - memcpy(c, parent_const, sizeof(zend_class_constant)); + ZEND_MEMCPY_INLINE(c, parent_const, sizeof(zend_class_constant)); parent_const = c; } } if (ce->type & ZEND_INTERNAL_CLASS) { c = pemalloc(sizeof(zend_class_constant), 1); - memcpy(c, parent_const, sizeof(zend_class_constant)); + ZEND_MEMCPY_INLINE(c, parent_const, sizeof(zend_class_constant)); parent_const = c; } _zend_hash_append_ptr(&ce->constants_table, name, parent_const); @@ -1638,14 +1638,14 @@ static void do_inherit_iface_constant(zend_string *name, zend_class_constant *c, ce->ce_flags |= ZEND_ACC_HAS_AST_CONSTANTS; if (iface->ce_flags & ZEND_ACC_IMMUTABLE) { ct = zend_arena_alloc(&CG(arena), sizeof(zend_class_constant)); - memcpy(ct, c, sizeof(zend_class_constant)); + ZEND_MEMCPY_INLINE(ct, c, sizeof(zend_class_constant)); c = ct; Z_CONSTANT_FLAGS(c->value) |= CONST_OWNED; } } if (ce->type & ZEND_INTERNAL_CLASS) { ct = pemalloc(sizeof(zend_class_constant), 1); - memcpy(ct, c, sizeof(zend_class_constant)); + ZEND_MEMCPY_INLINE(ct, c, sizeof(zend_class_constant)); c = ct; } zend_hash_update_ptr(&ce->constants_table, name, c); @@ -1837,11 +1837,11 @@ static void zend_add_trait_method(zend_class_entry *ce, zend_string *name, zend_ if (UNEXPECTED(fn->type == ZEND_INTERNAL_FUNCTION)) { new_fn = zend_arena_alloc(&CG(arena), sizeof(zend_internal_function)); - memcpy(new_fn, fn, sizeof(zend_internal_function)); + ZEND_MEMCPY_INLINE(new_fn, fn, sizeof(zend_internal_function)); new_fn->common.fn_flags |= ZEND_ACC_ARENA_ALLOCATED; } else { new_fn = zend_arena_alloc(&CG(arena), sizeof(zend_op_array)); - memcpy(new_fn, fn, sizeof(zend_op_array)); + ZEND_MEMCPY_INLINE(new_fn, fn, sizeof(zend_op_array)); new_fn->op_array.fn_flags |= ZEND_ACC_TRAIT_CLONE; new_fn->op_array.fn_flags &= ~ZEND_ACC_IMMUTABLE; } @@ -2425,14 +2425,14 @@ static void add_compatibility_obligation( obligation->type = OBLIGATION_COMPATIBILITY; /* Copy functions, because they may be stack-allocated in the case of traits. */ if (child_fn->common.type == ZEND_INTERNAL_FUNCTION) { - memcpy(&obligation->child_fn, child_fn, sizeof(zend_internal_function)); + ZEND_MEMCPY_INLINE(&obligation->child_fn, child_fn, sizeof(zend_internal_function)); } else { - memcpy(&obligation->child_fn, child_fn, sizeof(zend_op_array)); + ZEND_MEMCPY_INLINE(&obligation->child_fn, child_fn, sizeof(zend_op_array)); } if (parent_fn->common.type == ZEND_INTERNAL_FUNCTION) { - memcpy(&obligation->parent_fn, parent_fn, sizeof(zend_internal_function)); + ZEND_MEMCPY_INLINE(&obligation->parent_fn, parent_fn, sizeof(zend_internal_function)); } else { - memcpy(&obligation->parent_fn, parent_fn, sizeof(zend_op_array)); + ZEND_MEMCPY_INLINE(&obligation->parent_fn, parent_fn, sizeof(zend_op_array)); } obligation->child_scope = child_scope; obligation->parent_scope = parent_scope; @@ -2553,7 +2553,7 @@ static zend_class_entry *zend_lazy_class_load(zend_class_entry *pce) Bucket *p, *end; ce = zend_arena_alloc(&CG(arena), sizeof(zend_class_entry)); - memcpy(ce, pce, sizeof(zend_class_entry)); + ZEND_MEMCPY_INLINE(ce, pce, sizeof(zend_class_entry)); ce->ce_flags &= ~ZEND_ACC_IMMUTABLE; ce->refcount = 1; ce->inheritance_cache = NULL; @@ -2592,7 +2592,7 @@ static zend_class_entry *zend_lazy_class_load(zend_class_entry *pce) ZEND_ASSERT(op_array->prototype == NULL); new_op_array = zend_arena_alloc(&CG(arena), sizeof(zend_op_array)); Z_PTR(p->val) = new_op_array; - memcpy(new_op_array, op_array, sizeof(zend_op_array)); + ZEND_MEMCPY_INLINE(new_op_array, op_array, sizeof(zend_op_array)); new_op_array->fn_flags &= ~ZEND_ACC_IMMUTABLE; new_op_array->scope = ce; ZEND_MAP_PTR_INIT(new_op_array->run_time_cache, NULL); @@ -2641,7 +2641,7 @@ static zend_class_entry *zend_lazy_class_load(zend_class_entry *pce) ZEND_ASSERT(prop_info->ce == pce); new_prop_info= zend_arena_alloc(&CG(arena), sizeof(zend_property_info)); Z_PTR(p->val) = new_prop_info; - memcpy(new_prop_info, prop_info, sizeof(zend_property_info)); + ZEND_MEMCPY_INLINE(new_prop_info, prop_info, sizeof(zend_property_info)); new_prop_info->ce = ce; if (ZEND_TYPE_HAS_LIST(new_prop_info->type)) { zend_type_list *new_list; @@ -2669,7 +2669,7 @@ static zend_class_entry *zend_lazy_class_load(zend_class_entry *pce) ZEND_ASSERT(c->ce == pce); new_c = zend_arena_alloc(&CG(arena), sizeof(zend_class_constant)); Z_PTR(p->val) = new_c; - memcpy(new_c, c, sizeof(zend_class_constant)); + ZEND_MEMCPY_INLINE(new_c, c, sizeof(zend_class_constant)); new_c->ce = ce; } } diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c index f4f17c7ba18e..6ec3f5a019e5 100644 --- a/Zend/zend_ini.c +++ b/Zend/zend_ini.c @@ -143,7 +143,7 @@ static void copy_ini_entry(zval *zv) /* {{{ */ zend_ini_entry *new_entry = pemalloc(sizeof(zend_ini_entry), 1); Z_PTR_P(zv) = new_entry; - memcpy(new_entry, old_entry, sizeof(zend_ini_entry)); + ZEND_MEMCPY_INLINE(new_entry, old_entry, sizeof(zend_ini_entry)); if (old_entry->name) { new_entry->name = zend_string_dup(old_entry->name, 1); } diff --git a/Zend/zend_portability.h b/Zend/zend_portability.h index 6ad9f1b1db2f..19cb7450631b 100644 --- a/Zend/zend_portability.h +++ b/Zend/zend_portability.h @@ -341,6 +341,12 @@ char *alloca(); # define UNEXPECTED(condition) (condition) #endif +#if PHP_HAVE_BUILTIN_MEMCPY_INLINE +# define ZEND_MEMCPY_INLINE(a, b, s) __builtin_memcpy_inline(a, b, s) +#else +# define ZEND_MEMCPY_INLINE(a, b, s) memcpy(a, b, s) +#endif + #ifndef XtOffsetOf # define XtOffsetOf(s_type, field) offsetof(s_type, field) #endif diff --git a/Zend/zend_signal.c b/Zend/zend_signal.c index 68bc3de3ff25..f23b3b4c4947 100644 --- a/Zend/zend_signal.c +++ b/Zend/zend_signal.c @@ -319,7 +319,7 @@ void zend_signal_activate(void) { size_t x; - memcpy(&SIGG(handlers), &global_orig_handlers, sizeof(global_orig_handlers)); + ZEND_MEMCPY_INLINE(&SIGG(handlers), &global_orig_handlers, sizeof(global_orig_handlers)); if (SIGG(reset)) { for (x = 0; x < sizeof(zend_sigs) / sizeof(*zend_sigs); x++) { diff --git a/Zend/zend_string.h b/Zend/zend_string.h index 1a1c0cd7a67b..b5546a2e4156 100644 --- a/Zend/zend_string.h +++ b/Zend/zend_string.h @@ -432,7 +432,7 @@ static zend_always_inline zend_ulong zend_inline_hash_func(const char *str, size time and extract each byte with a bit field extract instr. */ uint64_t chunk; - memcpy(&chunk, str, sizeof(chunk)); + ZEND_MEMCPY_INLINE(&chunk, str, sizeof(chunk)); hash = hash * 33 * 33 * 33 * 33 + ((chunk >> (8 * 0)) & 0xff) * 33 * 33 * 33 + diff --git a/Zend/zend_weakrefs.c b/Zend/zend_weakrefs.c index 9d530047f902..aa76ad566ed8 100644 --- a/Zend/zend_weakrefs.c +++ b/Zend/zend_weakrefs.c @@ -648,7 +648,7 @@ void zend_register_weakref_ce(void) /* {{{ */ zend_ce_weakref->create_object = zend_weakref_new; - memcpy(&zend_weakref_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); + ZEND_MEMCPY_INLINE(&zend_weakref_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); zend_weakref_handlers.offset = XtOffsetOf(zend_weakref, std); zend_weakref_handlers.free_obj = zend_weakref_free; @@ -659,7 +659,7 @@ void zend_register_weakref_ce(void) /* {{{ */ zend_ce_weakmap->create_object = zend_weakmap_create_object; zend_ce_weakmap->get_iterator = zend_weakmap_get_iterator; - memcpy(&zend_weakmap_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); + ZEND_MEMCPY_INLINE(&zend_weakmap_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); zend_weakmap_handlers.offset = XtOffsetOf(zend_weakmap, std); zend_weakmap_handlers.free_obj = zend_weakmap_free_obj; zend_weakmap_handlers.read_dimension = zend_weakmap_read_dimension; diff --git a/build/php.m4 b/build/php.m4 index fb28f462396f..5223f1e89a62 100644 --- a/build/php.m4 +++ b/build/php.m4 @@ -2733,6 +2733,26 @@ AC_DEFUN([PHP_CHECK_BUILTIN_CPU_SUPPORTS], [ [$have_builtin_cpu_supports], [Whether the compiler supports __builtin_cpu_supports]) ]) +dnl +dnl PHP_CHECK_BUILTIN_MEMCPY_INLINE +dnl +AC_DEFUN([PHP_CHECK_BUILTIN_MEMCPY_INLINE], [ + AC_MSG_CHECKING([for __builtin_memcpy_inline]) + + AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[ + int d, s = 5; + __builtin_memcpy_inline(&d,&s,sizeof(d)); + ]])], [ + have_builtin_memcpy_inline=1 + AC_MSG_RESULT([yes]) + ], [ + have_builtin_memcpy_inline=0 + AC_MSG_RESULT([no]) + ]) + + AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_MEMCPY_INLINE], [$have_builtin_memcpy_inline], [Whether the compiler supports __builtin_memcpy_inline]) +]) + dnl dnl PHP_PATCH_CONFIG_HEADERS([FILE]) dnl diff --git a/configure.ac b/configure.ac index 29dd3b0437a4..c5ef09c928e2 100644 --- a/configure.ac +++ b/configure.ac @@ -507,6 +507,8 @@ dnl Check __builtin_cpu_init PHP_CHECK_BUILTIN_CPU_INIT dnl Check __builtin_cpu_supports PHP_CHECK_BUILTIN_CPU_SUPPORTS +dnl Check __builtin_memcpy_inline +PHP_CHECK_BUILTIN_MEMCPY_INLINE dnl Check for __alignof__ support in the compiler AC_CACHE_CHECK(whether the compiler supports __alignof__, ac_cv_alignof_exists,[