our package fails to build with the upcoming GCC 4.4.  Version 4.4
has not been released yet but I'm building with a snapshot in order
to find errors and give people an advance warning.

GCC 4.4 cleaned up some more C++ headers.  You always have to #include
headers directly and cannot rely for things to be included indirectly.

You can reproduce this problem with gcc-snapshot from unstable.

> Automatic build of libassa_3.5.0-1 on em64t by sbuild/amd64 0.53
...
> ../assa/Logger_Impl.h:226: error: 'va_list' has not been declared
> Logger_Impl.cpp:85: error: 'va_list' has not been declared
> Logger_Impl.cpp: In member function 'char* ASSA::Logger_Impl::format_msg(size_t, const char*, int, bool&)':
> Logger_Impl.cpp:99: error: '::vsnprintf' has not been declared
> make[3]: *** [Logger_Impl.lo] Error 1
> make[3]: Leaving directory `/build/tbm/libassa-3.5.0/assa'

--- assa/Logger_Impl.h~	2008-11-08 05:54:20.000000000 +0000
+++ assa/Logger_Impl.h	2008-11-08 05:54:28.000000000 +0000
@@ -15,6 +15,7 @@
 #define LOGGER_IMPL_H
 
 #include <errno.h>
+#include <cstdarg>
 #include <string>
 
 #if defined(sun)
--- assa/Logger_Impl.cpp~	2008-11-08 05:54:37.000000000 +0000
+++ assa/Logger_Impl.cpp	2008-11-08 05:54:43.000000000 +0000
@@ -12,6 +12,7 @@
 //  version 2 of the License, or (at your option) any later version.
 //------------------------------------------------------------------------------
 
+#include <cstdio>
 #include <iostream>
 #include <iomanip>
 #include <string.h>				// strerror(3)
posted on 2013-03-28 10:48  飞天2012  阅读(286)  评论(0)    收藏  举报