]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: do not include "expat.h" in heade file 7476/head
authorKefu Chai <kchai@redhat.com>
Tue, 2 Feb 2016 06:24:46 +0000 (14:24 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 2 Feb 2016 06:26:51 +0000 (14:26 +0800)
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 <expat.h>" into the source file to avoid this dependency.
and as a side effect, this also speed up the compilation.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/rgw/rgw_acl_s3.h
src/rgw/rgw_xml.cc
src/rgw/rgw_xml.h

index 694cc1d4a0701b92e3bd3bc4d873a98a658309f6..b5ea8608f886150b60ee2081aeeb0829c0a91cbe 100644 (file)
@@ -9,8 +9,6 @@
 #include <iosfwd>
 #include <include/types.h>
 
-#include <expat.h>
-
 #include "include/str_list.h"
 #include "rgw_xml.h"
 #include "rgw_acl.h"
index eda0887528234de76a328f804e8e0544263e1a68..df555f800ac2aeb91417f74d96ca8d7e65566002 100644 (file)
@@ -6,6 +6,8 @@
 #include <iostream>
 #include <map>
 
+#include <expat.h>
+
 #include "include/types.h"
 
 #include "rgw_common.h"
index 661e97cc77e95bd59e829ceca259a8a94bcd3ef7..f4278d1d21a2e890a0ffccaa9af1ba12e7b29b79 100644 (file)
@@ -10,8 +10,6 @@
 #include <include/types.h>
 #include <common/Formatter.h>
 
-#include <expat.h>
-
 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;