From b5fd066153c40a70a29caa1ea7987723ab687763 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Tue, 16 Jan 2024 17:00:02 -0500 Subject: Move c_src dirs back to toplevel We just wanted c sourcefiles out of the top level, not c source directories. Signed-off-by: Kent Overstreet --- c_src/ccan/array_size/array_size.h | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 c_src/ccan/array_size/array_size.h (limited to 'c_src/ccan/array_size/array_size.h') diff --git a/c_src/ccan/array_size/array_size.h b/c_src/ccan/array_size/array_size.h deleted file mode 100644 index 0ca422a2..00000000 --- a/c_src/ccan/array_size/array_size.h +++ /dev/null @@ -1,26 +0,0 @@ -/* CC0 (Public domain) - see LICENSE file for details */ -#ifndef CCAN_ARRAY_SIZE_H -#define CCAN_ARRAY_SIZE_H -#include "config.h" -#include - -/** - * ARRAY_SIZE - get the number of elements in a visible array - * @arr: the array whose size you want. - * - * This does not work on pointers, or arrays declared as [], or - * function parameters. With correct compiler support, such usage - * will cause a build error (see build_assert). - */ -#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + _array_size_chk(arr)) - -#if HAVE_BUILTIN_TYPES_COMPATIBLE_P && HAVE_TYPEOF -/* Two gcc extensions. - * &a[0] degrades to a pointer: a different type from an array */ -#define _array_size_chk(arr) \ - BUILD_ASSERT_OR_ZERO(!__builtin_types_compatible_p(typeof(arr), \ - typeof(&(arr)[0]))) -#else -#define _array_size_chk(arr) 0 -#endif -#endif /* CCAN_ALIGNOF_H */ -- cgit v1.2.3