From 636b8f11f8726d88f58cd7dabbb766b38c8f4e1f Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Tue, 2 Feb 2016 14:24:46 +0800 Subject: [PATCH] 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 --- src/rgw/rgw_acl_s3.h | 2 -- src/rgw/rgw_xml.cc | 2 ++ src/rgw/rgw_xml.h | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) 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; -- 2.39.5