]> git.ozlabs.org Git - ccan/blobdiff - ccan/mem/_info
mem: Rename memmem module to mem
[ccan] / ccan / mem / _info
diff --git a/ccan/mem/_info b/ccan/mem/_info
new file mode 100644 (file)
index 0000000..19b2228
--- /dev/null
@@ -0,0 +1,30 @@
+#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) {
+               return 0;
+       }
+
+       if (strcmp(argv[1], "testdepends") == 0) {
+               printf("ccan/array_size");
+               return 0;
+       }
+
+       return 1;
+}