Package: gpsim
Version: 0.22.0-5
User: [EMAIL PROTECTED]
Usertags: ftbfs-gcc-4.4
Tags: patch

Your 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 gpsim_0.22.0-5 on em64t by sbuild/amd64 0.53
...
>  x86_64-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I.. -D_REENTRANT 
> -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 
> -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 
> -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/directfb 
> -I/usr/include/libpng12 -I/usr/include/pixman-1 -g -O2 -MT socket.lo -MD -MP 
> -MF .deps/socket.Tpo -c socket.cc  -fPIC -DPIC -o .libs/socket.o
> In file included from socket.cc:36:
> ../src/protocol.h:104:19: error: macro "putc" requires 2 arguments, but only 
> 1 given
> In file included from socket.cc:36:
> ../src/protocol.h:104: error: function definition does not declare parameters
> socket.cc: In member function 'void SocketBase::ParseObject()':
> socket.cc:656: warning: deprecated conversion from string constant to 'char*'
> socket.cc:678: warning: deprecated conversion from string constant to 'char*'
> socket.cc:698: warning: deprecated conversion from string constant to 'char*'
> socket.cc:732: warning: deprecated conversion from string constant to 'char*'
> socket.cc:773: warning: deprecated conversion from string constant to 'char*'
> socket.cc:778: warning: deprecated conversion from string constant to 'char*'
> socket.cc: In member function 'void SocketBase::Service()':
> socket.cc:805: warning: deprecated conversion from string constant to 'char*'
> socket.cc:807: warning: deprecated conversion from string constant to 'char*'
> make[3]: *** [socket.lo] Error 1
> make[3]: Leaving directory `/build/tbm/gpsim-0.22.0/cli'

This patch adds 3 missing #includes and changes one from stdio.h to
cstdio: I have done this because of problems with the namespace: you
use std::rewind which doesn't exist when you include in std when you
include the C .h header.

--- src/protocol.h~     2008-11-08 13:28:26.000000000 +0000
+++ src/protocol.h      2008-11-08 13:28:48.000000000 +0000
@@ -23,6 +23,7 @@
 //
 
 #include <glib.h>
+#include <cstdio>
 
 #ifndef __PROTCOL_H__
 #define __PROTCOL_H__
--- src/processor.cc~   2008-11-08 13:41:05.000000000 +0000
+++ src/processor.cc    2008-11-08 13:48:11.000000000 +0000
@@ -26,7 +26,7 @@
 
 */
 
-#include <stdio.h>
+#include <cstdio>
 #ifdef _WIN32
 #include "uxtime.h"
 #else
--- src/ValueCollections.h~     2008-11-08 13:50:11.000000000 +0000
+++ src/ValueCollections.h      2008-11-08 13:50:20.000000000 +0000
@@ -26,6 +26,7 @@
 #define __VALUECOLLECTIONS_H__
 
 #include <glib.h>
+#include <cstdio>
 #include <vector>
 #include <iostream>
 #include <sstream>
--- gui/settings_exdbm.cc~      2008-11-08 13:32:02.000000000 +0000
+++ gui/settings_exdbm.cc       2008-11-08 13:32:10.000000000 +0000
@@ -20,6 +20,7 @@
 Boston, MA 02111-1307, USA.  */
 
 #include "settings_exdbm.h"
+#include <cstdio>
 #include <stdlib.h>
 
 SettingsEXdbm::SettingsEXdbm(const char *appl_name)

-- 
Martin Michlmayr
http://www.cyrius.com/



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to