Re: Results of a test mass rebuild of rawhide-20090126 with gcc-4.4.0-0.9

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

 



On Tue, Feb 03, 2009 at 05:40:33PM -0600, Jason L Tibbitts III wrote:
> Unfortunately this includes my package xu4, and while I do have some
> C++ experience (college was some time ago), the exact reason this has
> just started failing with 4.4 is eluding me.

The difference from 4.3 to 4.4 in this case is again <string> no longer
including <cstdio>.

You have:
#include <string>
...
#include <stdio.h>
...
struct U4FILE {
...
  virtual int putc(int c) = 0;
...
};
...

In 4.3 <string> would include <cstdio>, which includes <stdio.h> and
then #undefs a bunch of stuff, including putc, which is allowed to be a
macro in C.  Then stdio.h is included, but as it uses multiple inclusion
guards, it does nothing.  In 4.4 <string> no longer does that, <cstdio>
isn't included and so when stdio.h is included, it defines putc etc.
and nothing undefs it afterwards.
To fix this, #include <cstdio> instead of #include <stdio.h> (this is
probably not an option in this case, as stdio.h include comes from SDL
headers which are both for C and C++, so can't include cstdio), or
#include <cstdio> before including <stdio.h> (preferred), or surround
putc with ()s, as in:
  virtual int (putc)(int c) = 0;

	Jakub

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux