Missing header for g++ 4.4 support

Description

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.

Environment

g++ 4.4 on Debian GNU/Linux unstable

Attachments

1
  • 10 Nov 2008, 07:02 PM

Activity

Show:

Scott Cantor June 23, 2009 at 12:46 PM

Closing after releases.

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Created November 10, 2008 at 7:02 PM
Updated June 24, 2021 at 3:39 PM
Resolved November 10, 2008 at 8:01 PM

Flag notifications