The unreleased g++ 4.4 compiler cleans up C++ headers even further, which leads to a compilation failure for software that includes XMLTooling-C header files without first including <cstdio>: For example, from OpenSAML 2.x:
> /bin/sh ../libtool --silent --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I.. -pthread -g -Wall -O2 -O2 -DNDEBUG -pthread -g -O2 -Wall -O2 -DNDEBUG -c -o Assertions.lo `test -f 'saml2/core/impl/Assertions.cpp' || echo './'`saml2/core/impl/Assertions.cpp > In file included from /usr/include/xmltooling/encryption/EncryptedKeyResolver.h:26, > from ../saml/encryption/EncryptedKeyResolver.h:27, > from saml2/core/impl/Assertions.cpp:25: > /usr/include/xmltooling/encryption/Encryption.h: In member function 'void xmlencryption::KeySize::setSize(int)': > /usr/include/xmltooling/encryption/Encryption.h:47: error: 'sprintf' was not declared in this scope
The attached patch fixes this by adding <cstdio> to base.h.
The unreleased g++ 4.4 compiler cleans up C++ headers even further, which leads to a compilation failure for software that includes XMLTooling-C header files without first including <cstdio>: For example, from OpenSAML 2.x:
> /bin/sh ../libtool --silent --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I.. -pthread -g -Wall -O2 -O2 -DNDEBUG -pthread -g -O2 -Wall -O2 -DNDEBUG -c -o Assertions.lo `test -f 'saml2/core/impl/Assertions.cpp' || echo './'`saml2/core/impl/Assertions.cpp
> In file included from /usr/include/xmltooling/encryption/EncryptedKeyResolver.h:26,
> from ../saml/encryption/EncryptedKeyResolver.h:27,
> from saml2/core/impl/Assertions.cpp:25:
> /usr/include/xmltooling/encryption/Encryption.h: In member function 'void xmlencryption::KeySize::setSize(int)':
> /usr/include/xmltooling/encryption/Encryption.h:47: error: 'sprintf' was not declared in this scope
The attached patch fixes this by adding <cstdio> to base.h.