quote.h: simplify the inclusion
Attempting to include quote.h without first including strbuf.h results in warnings: ./quote.h:33:33: warning: ‘struct strbuf’ declared inside parameter list ./quote.h:33:33: warning: its scope is only this definition or declaration, which is probably not what you want ./quote.h:34:34: warning: ‘struct strbuf’ declared inside parameter list ... Add a toplevel declaration for struct strbuf to avoid this. While at it, stop including system headers from quote.h. git source files already need to include git-compat-util.h sooner to ensure the appropriate feature test macros are defined. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jonathan Nieder committed
Jan 4, 2011 at 18:36 UTC
cf548cacdd0c553b6524969d0d3fd5e787efeb3c
1 file changed
+1
-2
quote.h
+1
-2
@@ -1,8 +1,7 @@
1
#ifndef QUOTE_H
2
#define QUOTE_H
3
4
-#include <stddef.h>
5
-#include <stdio.h>
4
+struct strbuf;
5
6
/* Help to copy the thing properly quoted for the shell safety.
7
* any single quote is replaced with '\'', any exclamation point