[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#413495: Background for this bug and new patch



Here is a new patch and an explanation for this problem which you
can forward upstream along with the patch.

In GCC 4.3, the C++ header dependencies have been cleaned up.  The
advantage of this is that programs will compile faster.  The downside
is that you actually need to directly #include everything you use (but
you really should do this anyway, otherwise your program won't work
with any compiler other than GCC).  Some background of this can be
found at http://gcc.gnu.org/PR28080

For the maintainer: You can reproduce this problem with gcc-snapshot
(20070326-1 or higher) from unstable. (Currently not available for
i386, but for amd64, powerpc and ia64.  I hope to have i386 binaries
in the archive in ~3 weeks.)  In any case, the patch I sent is tested.
The header dependencies have been cleaned up some more since I sent
the last patch, but I think this work is done now, so please apply
this patch and send it upstream.


--- libs/pbd/pool.cc~	2007-04-05 06:58:26.000000000 +0000
+++ libs/pbd/pool.cc	2007-04-05 06:58:34.000000000 +0000
@@ -18,6 +18,7 @@
     $Id: pool.cc,v 1.7 2003/05/02 22:08:27 pbd Exp $
 */
 
+#include <cstdlib>
 #include <iostream>
 #include <sys/mman.h>
 #include <vector>
--- libs/ardour/ardour/port.h~	2007-04-05 07:03:07.000000000 +0000
+++ libs/ardour/ardour/port.h	2007-04-05 07:03:15.000000000 +0000
@@ -21,6 +21,7 @@
 #ifndef __ardour_port_h__
 #define __ardour_port_h__
 
+#include <cstdlib>
 #include <sigc++/signal_system.h>
 #include <pbd/failed_constructor.h>
 #include <ardour/ardour.h>
--- libs/ardour/ardour/types.h~	2007-04-05 07:05:31.000000000 +0000
+++ libs/ardour/ardour/types.h	2007-04-05 07:05:41.000000000 +0000
@@ -25,6 +25,7 @@
 #define __STDC_FORMAT_MACROS /* PRI<foo>; C++ requires explicit requesting of these */
 #endif
 
+#include <sys/types.h>
 #include <inttypes.h>
 #include <jack/types.h>
 #include <map>
--- libs/ardour/audio_library.cc~	2007-04-05 07:01:43.000000000 +0000
+++ libs/ardour/audio_library.cc	2007-04-05 07:01:50.000000000 +0000
@@ -20,6 +20,7 @@
 */
 
 #include <cstdio> // Needed so that libraptor (included in lrdf) won't complain
+#include <cstdlib>
 #include <iostream>
 #include <sstream>
 #include <cctype>
--- libs/gtkmmext/gtkmmext/gtk_ui.h~	2007-04-05 07:16:45.000000000 +0000
+++ libs/gtkmmext/gtkmmext/gtk_ui.h	2007-04-05 07:16:51.000000000 +0000
@@ -21,6 +21,7 @@
 #ifndef __pbd_gtk_ui_h__
 #define __pbd_gtk_ui_h__
 
+#include <cstdlib>
 #include <string>
 #include <queue>
 #include <map>
--- libs/gtkmmext/hexentry.cc~	2007-04-05 07:17:48.000000000 +0000
+++ libs/gtkmmext/hexentry.cc	2007-04-05 07:17:53.000000000 +0000
@@ -19,6 +19,7 @@
 */
 
 #include <stdio.h> /* for sprintf, sigh ... */
+#include <cstdlib>
 #include <string>
 #include <ctype.h>
 
--- libs/gtkmmext/motionfeedback.cc~	2007-04-05 07:18:39.000000000 +0000
+++ libs/gtkmmext/motionfeedback.cc	2007-04-05 07:18:47.000000000 +0000
@@ -18,6 +18,7 @@
 */
 
 #include <cmath>
+#include <cstdlib>
 #include <unistd.h>
 #include <stdio.h> /* for snprintf, grrr */
 
--- libs/midi++/midicontrollable.cc~	2007-04-05 06:59:57.000000000 +0000
+++ libs/midi++/midicontrollable.cc	2007-04-05 07:00:36.000000000 +0000
@@ -19,6 +19,7 @@
 */
 
 #include <cstdio> /* for sprintf, sigh */
+#include <climits>
 #include <pbd/error.h>
 #include <midi++/port.h>
 #include <midi++/channel.h>

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



Reply to: