]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
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)
commit636b8f11f8726d88f58cd7dabbb766b38c8f4e1f
treed1468be8a7fd9ecf85d9879903c8d6297c727d8f
parent3b93bc47648a0d0874853e424584774169ab5da1
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 <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