diff options
author | Thomas Bertschinger <tahbertschinger@gmail.com> | 2024-01-15 23:41:02 -0700 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-16 01:47:05 -0500 |
commit | f5baaf48e3e82b1caf9f5cd1207d4d6feba3a2e5 (patch) | |
tree | 59f7b0e4667df7a9d3d5a45725f2aaab3e79b4c5 /ccan/array_size/_info | |
parent | fb35dbfdc5a9446fbb856dae5542b23963e28b89 (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/_info')
-rw-r--r-- | ccan/array_size/_info | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/ccan/array_size/_info b/ccan/array_size/_info deleted file mode 100644 index 69570f34..00000000 --- a/ccan/array_size/_info +++ /dev/null @@ -1,46 +0,0 @@ -#include "config.h" -#include <stdio.h> -#include <string.h> - -/** - * array_size - routine for safely deriving the size of a visible array. - * - * This provides a simple ARRAY_SIZE() macro, which (given a good compiler) - * will also break compile if you try to use it on a pointer. - * - * This can ensure your code is robust to changes, without needing a gratuitous - * macro or constant. - * - * Example: - * // Outputs "Initialized 32 values\n" - * #include <ccan/array_size/array_size.h> - * #include <stdlib.h> - * #include <stdio.h> - * - * // We currently use 32 random values. - * static unsigned int vals[32]; - * - * int main(void) - * { - * unsigned int i; - * for (i = 0; i < ARRAY_SIZE(vals); i++) - * vals[i] = random(); - * printf("Initialized %u values\n", i); - * return 0; - * } - * - * License: CC0 (Public domain) - * Author: Rusty Russell <rusty@rustcorp.com.au> - */ -int main(int argc, char *argv[]) -{ - if (argc != 2) - return 1; - - if (strcmp(argv[1], "depends") == 0) { - printf("ccan/build_assert\n"); - return 0; - } - - return 1; -} |