This is the version of CCAN which CLN was using at the time these were taken. Unfortunately lots of whitespace has been changed, but AFAICT no source changes. Here's the command I ran (with ../ccan checked out to 1ae4c432): ``` make update-ccan CCAN_NEW="alignof array_size build_assert check_type container_of cppmagic likely list mem short_types str structeq take tal tal/str typesafe_cb utf8 endian crypto/sha256" ``` Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: William Casarin <jb55@jb55.com>
31 lines
651 B
Plaintext
31 lines
651 B
Plaintext
#include "config.h"
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
|
|
/**
|
|
* cppmagic - Abuse of the C preprocessor
|
|
*
|
|
* This contains a bunch of fancy macro techniques such as
|
|
* preprocessor-time evaluated conditionals and (quasi) recursion and
|
|
* iteration.
|
|
*
|
|
* It's based on these articles:
|
|
* - http://jhnet.co.uk/articles/cpp_magic
|
|
* - https://github.com/pfultz2/Cloak/wiki/C-Preprocessor-tricks,-tips,-and-idioms
|
|
* and code from the Boost C++ library.
|
|
*
|
|
* License: BSD-MIT
|
|
*/
|
|
int main(int argc, char *argv[])
|
|
{
|
|
/* Expect exactly one argument */
|
|
if (argc != 2)
|
|
return 1;
|
|
|
|
if (strcmp(argv[1], "depends") == 0) {
|
|
return 0;
|
|
}
|
|
|
|
return 1;
|
|
}
|