mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-24 08:14:19 +01:00
Onion test program wants memcheck(). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
31 lines
551 B
Plaintext
31 lines
551 B
Plaintext
#include "config.h"
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
|
|
/**
|
|
* mem - Provide mem*() functions if missing from C library
|
|
*
|
|
* This code implements some string.h mem*() functions if they're not
|
|
* already available in the C library. Functions included are:
|
|
* memmem()
|
|
*
|
|
* License: CC0
|
|
*/
|
|
int main(int argc, char *argv[])
|
|
{
|
|
/* Expect exactly one argument */
|
|
if (argc != 2)
|
|
return 1;
|
|
|
|
if (strcmp(argv[1], "depends") == 0) {
|
|
printf("ccan/compiler");
|
|
return 0;
|
|
}
|
|
|
|
if (strcmp(argv[1], "testdepends") == 0) {
|
|
return 0;
|
|
}
|
|
|
|
return 1;
|
|
}
|