[GIT] ppl/ppl(master): Work around a bug affecting some versions of <stdio. h>.

Module: ppl/ppl Branch: master Commit: db1ced1c1d7a1fb34b2b82a095e962100dd74680 URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=db1ced1c1d7a1...
Author: Roberto Bagnara bagnara@cs.unipr.it Date: Fri Apr 3 05:20:30 2009 +0000
Work around a bug affecting some versions of <stdio.h>.
---
interfaces/C/tests/ppl_c_test.cc | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/interfaces/C/tests/ppl_c_test.cc b/interfaces/C/tests/ppl_c_test.cc index d2c9c10..2333191 100644 --- a/interfaces/C/tests/ppl_c_test.cc +++ b/interfaces/C/tests/ppl_c_test.cc @@ -22,6 +22,18 @@ For the most up-to-date information see the Parma Polyhedra Library site: http://www.cs.unipr.it/ppl/ . */
#include "ppl-config.h" + +// The following inclusion of <cstdio> prior to "ppl_c_test.h" is to +// work around a bug whereby some versions of <stdio.h> do not obey +// clause D.5.2 of the C++ standard: "Each C header, whose name has +// the form name.h, behaves as if each name placed in the Standard +// library namespace by the corresponding cname header is also placed +// within the namespace scope of the namespace std and is followed by +// an explicit using-declaration (7.3.3)." By including <cstdio> +// prior to "ppl_c_test.h" we ensure std::FILE is defined at the time +// when "ppl_c.h" will include <gmp.h>. +#include <cstdio> + #include "ppl_c_test.h" #include <cstdlib>
participants (1)
-
Roberto Bagnara