From eff2c75bba6d9f2069ffd0f4e36b9e2da0964dbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20M=2E=20L=C3=B3pez=20Mu=C3=B1oz?= Date: Wed, 22 Sep 2004 17:18:06 +0000 Subject: [PATCH] taken care of BOOST_NO_STDC_NAMESPACE [SVN r25345] --- assert_test.cpp | 7 ++++++- current_function_test.cpp | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/assert_test.cpp b/assert_test.cpp index 24f9761..693adc4 100644 --- a/assert_test.cpp +++ b/assert_test.cpp @@ -51,13 +51,18 @@ void test_disabled() #define BOOST_ENABLE_ASSERT_HANDLER #include +#include #include int handler_invoked = 0; void boost::assertion_failed(char const * expr, char const * function, char const * file, long line) { - std::printf("Expression: %s\nFunction: %s\nFile: %s\nLine: %ld\n\n", expr, function, file, line); +#if !defined(BOOST_NO_STDC_NAMESPACE) + using std::printf; +#endif + + printf("Expression: %s\nFunction: %s\nFile: %s\nLine: %ld\n\n", expr, function, file, line); ++handler_invoked; } diff --git a/current_function_test.cpp b/current_function_test.cpp index 7510948..d5651ad 100644 --- a/current_function_test.cpp +++ b/current_function_test.cpp @@ -18,11 +18,16 @@ // #include +#include #include void message(char const * file, long line, char const * func, char const * msg) { - std::printf("%s(%ld): %s in function '%s'\n", file, line, msg, func); +#if !defined(BOOST_NO_STDC_NAMESPACE) + using std::printf; +#endif + + printf("%s(%ld): %s in function '%s'\n", file, line, msg, func); } #define MESSAGE(msg) message(__FILE__, __LINE__, BOOST_CURRENT_FUNCTION, msg)