From: Rusty Russell Date: Mon, 10 Nov 2008 06:12:46 +0000 (+1100) Subject: Simplify -I lines: change includes to ccan/ X-Git-Url: https://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=a8b248ea9de55316cac4423a99a727ca7b54e0fc Simplify -I lines: change includes to ccan/ --- diff --git a/Makefile b/Makefile index d3e05e9f..5ebdd7db 100644 --- a/Makefile +++ b/Makefile @@ -4,8 +4,6 @@ # This can be overridden on cmdline to generate pages elsewhere. WEBDIR=~/www/html/ccan/ -CFLAGS=-g -Wall -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Werror -Iccan -I. - ALL=$(patsubst ccan/%/test, %, $(wildcard ccan/*/test)) ALL_DIRS=$(patsubst %, ccan/%, $(ALL)) ALL_DEPENDS=$(patsubst %, ccan/%/.depends, $(ALL)) diff --git a/Makefile-ccan b/Makefile-ccan index cbd9871c..b2e39078 100644 --- a/Makefile-ccan +++ b/Makefile-ccan @@ -2,7 +2,7 @@ # You could just do: # SRCFILES += $(shell find ccan/ -name '[a-z]*.c') -CFLAGS=-g -O2 -Wall -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Werror -Iccan -I. +CFLAGS=-g -O2 -Wall -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Werror -I. CFILES=$(wildcard ccan/*/[a-z]*.c) OBJFILES=$(CFILES:.c=.o) diff --git a/ccan/alloc/alloc.c b/ccan/alloc/alloc.c index 5c851d82..d5accb40 100644 --- a/ccan/alloc/alloc.c +++ b/ccan/alloc/alloc.c @@ -5,8 +5,8 @@ #include #include #include "alloc.h" -#include "build_assert/build_assert.h" -#include "alignof/alignof.h" +#include +#include #include "config.h" /* FIXME: We assume getpagesize() doesnt change. Remapping file with diff --git a/ccan/antithread/antithread.c b/ccan/antithread/antithread.c index 273b5690..9297cdac 100644 --- a/ccan/antithread/antithread.c +++ b/ccan/antithread/antithread.c @@ -9,9 +9,9 @@ #include #include #include "antithread.h" -#include "noerr/noerr.h" -#include "talloc/talloc.h" -#include "alloc/alloc.h" +#include +#include +#include /* FIXME: Valgrind support should be possible for some cases. Tricky * case is where another process allocates for you, but at worst we diff --git a/ccan/container_of/container_of.h b/ccan/container_of/container_of.h index 1f4b18e4..ec66f106 100644 --- a/ccan/container_of/container_of.h +++ b/ccan/container_of/container_of.h @@ -3,7 +3,7 @@ #include #include "config.h" -#include "check_type/check_type.h" +#include /** * container_of - get pointer to enclosing structure diff --git a/ccan/grab_file/grab_file.c b/ccan/grab_file/grab_file.c index 6f2c9fe1..f21e1e5e 100644 --- a/ccan/grab_file/grab_file.c +++ b/ccan/grab_file/grab_file.c @@ -1,6 +1,6 @@ #include "grab_file.h" -#include "talloc/talloc.h" -#include "noerr/noerr.h" +#include +#include #include #include #include diff --git a/ccan/hash/hash.c b/ccan/hash/hash.c index 104a2958..5e106ad3 100644 --- a/ccan/hash/hash.c +++ b/ccan/hash/hash.c @@ -42,7 +42,7 @@ on 1 byte), but shoehorning those bytes into integers efficiently is messy. #include /* attempt to define endianness */ #endif -#include "hash/hash.h" +#include "hash.h" #ifdef linux # include /* attempt to define endianness */ #endif diff --git a/ccan/list/list.c b/ccan/list/list.c index b72f8f67..0a9e4e4d 100644 --- a/ccan/list/list.c +++ b/ccan/list/list.c @@ -1,6 +1,6 @@ #include #include -#include "list/list.h" +#include "list.h" struct list_head *list_check(struct list_head *h, const char *abortstr) { diff --git a/ccan/list/list.h b/ccan/list/list.h index c664d834..58c0a97c 100644 --- a/ccan/list/list.h +++ b/ccan/list/list.h @@ -1,7 +1,7 @@ #ifndef CCAN_LIST_H #define CCAN_LIST_H #include -#include "container_of/container_of.h" +#include /** * struct list_node - an entry in a doubly-linked list diff --git a/ccan/str_talloc/str_talloc.c b/ccan/str_talloc/str_talloc.c index 7438f480..d1d2f44d 100644 --- a/ccan/str_talloc/str_talloc.c +++ b/ccan/str_talloc/str_talloc.c @@ -4,7 +4,7 @@ #include #include #include "str_talloc.h" -#include "talloc/talloc.h" +#include char **strsplit(const void *ctx, const char *string, const char *delims, unsigned int *nump) diff --git a/ccan/talloc/talloc.h b/ccan/talloc/talloc.h index 380009f3..4efe3b9b 100644 --- a/ccan/talloc/talloc.h +++ b/ccan/talloc/talloc.h @@ -26,8 +26,8 @@ #include #include #include +#include #include "config.h" -#include "typesafe_cb/typesafe_cb.h" /* this uses a little trick to allow __LINE__ to be stringified diff --git a/tools/ccan_depends.c b/tools/ccan_depends.c index 0511648e..91d7c989 100644 --- a/tools/ccan_depends.c +++ b/tools/ccan_depends.c @@ -2,8 +2,8 @@ #include #include #include -#include "str/str.h" -#include "talloc/talloc.h" +#include +#include int main(int argc, char *argv[]) { diff --git a/tools/depends.c b/tools/depends.c index c631b9bc..5878ef61 100644 --- a/tools/depends.c +++ b/tools/depends.c @@ -1,7 +1,7 @@ -#include "talloc/talloc.h" -#include "str/str.h" -#include "grab_file/grab_file.h" -#include "str_talloc/str_talloc.h" +#include +#include +#include +#include #include "tools.h" #include #include diff --git a/tools/doc_extract.c b/tools/doc_extract.c index fb7024a7..987ca1ad 100644 --- a/tools/doc_extract.c +++ b/tools/doc_extract.c @@ -8,10 +8,10 @@ #include #include #include -#include "talloc/talloc.h" -#include "str/str.h" -#include "str_talloc/str_talloc.h" -#include "grab_file/grab_file.h" +#include +#include +#include +#include static char **grab_doc(const char *fname) {