From: Kefu Chai Date: Tue, 2 Feb 2016 06:24:46 +0000 (+0800) Subject: rgw: do not include "expat.h" in heade file X-Git-Tag: v10.0.4~77^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F7476%2Fhead;p=ceph.git rgw: do not include "expat.h" in heade file Building Ceph without the Expat development library currently results in the following build error: ~/ceph> ./configure --without-fuse --without-tcmalloc --without-radosgw ... ~/ceph> make ... CXX ceph_dencoder-rgw_dencoder.o In file included from rgw/rgw_dencoder.cc:6:0: rgw/rgw_acl_s3.h:9:19: fatal error: expat.h: No such file or directory The ceph-dencoder binary is built with rgw_dencoder.cc, which includes rgw_acl_s3.h, which in turn includes expat.h. However, configure.ac currently only checks for Expat as part of radosgw. but we don't need expat.h for testing the encoding of rgw structs, so move "#include " into the source file to avoid this dependency. and as a side effect, this also speed up the compilation. Signed-off-by: Kefu Chai --- diff --git a/src/rgw/rgw_acl_s3.h b/src/rgw/rgw_acl_s3.h index 694cc1d4a0701..b5ea8608f8861 100644 --- a/src/rgw/rgw_acl_s3.h +++ b/src/rgw/rgw_acl_s3.h @@ -9,8 +9,6 @@ #include #include -#include - #include "include/str_list.h" #include "rgw_xml.h" #include "rgw_acl.h" diff --git a/src/rgw/rgw_xml.cc b/src/rgw/rgw_xml.cc index eda0887528234..df555f800ac2a 100644 --- a/src/rgw/rgw_xml.cc +++ b/src/rgw/rgw_xml.cc @@ -6,6 +6,8 @@ #include #include +#include + #include "include/types.h" #include "rgw_common.h" diff --git a/src/rgw/rgw_xml.h b/src/rgw/rgw_xml.h index 661e97cc77e95..f4278d1d21a2e 100644 --- a/src/rgw/rgw_xml.h +++ b/src/rgw/rgw_xml.h @@ -10,8 +10,6 @@ #include #include -#include - using namespace std; @@ -61,9 +59,10 @@ public: friend ostream& operator<<(ostream& out, XMLObj& obj); }; +struct XML_ParserStruct; class RGWXMLParser : public XMLObj { - XML_Parser p; + XML_ParserStruct *p; char *buf; int buf_len; XMLObj *cur_obj;