summaryrefslogtreecommitdiff
path: root/ccan/array_size/array_size.h
diff options
context:
space:
mode:
authorThomas Bertschinger <tahbertschinger@gmail.com>2024-01-15 23:41:02 -0700
committerKent Overstreet <kent.overstreet@linux.dev>2024-01-16 01:47:05 -0500
commitf5baaf48e3e82b1caf9f5cd1207d4d6feba3a2e5 (patch)
tree59f7b0e4667df7a9d3d5a45725f2aaab3e79b4c5 /ccan/array_size/array_size.h
parentfb35dbfdc5a9446fbb856dae5542b23963e28b89 (diff)
move Rust sources to top level, C sources into c_src
This moves the Rust sources out of rust_src/ and into the top level. Running the bcachefs executable out of the development tree is now: $ ./target/release/bcachefs command or $ cargo run --profile release -- command instead of "./bcachefs command". Building and installing is still: $ make && make install Signed-off-by: Thomas Bertschinger <tahbertschinger@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'ccan/array_size/array_size.h')
-rw-r--r--ccan/array_size/array_size.h26
1 files changed, 0 insertions, 26 deletions
diff --git a/ccan/array_size/array_size.h b/ccan/array_size/array_size.h
deleted file mode 100644
index 0ca422a2..00000000
--- a/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 <ccan/build_assert/build_assert.h>
-
-/**
- * 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 */