Orcan Ogetbil | 16 Jan 23:27 2012
Picon

gcc-4.7 compile fix

Hi all,

Hydrogen-0.9.5 failed to build from source against gcc-4.7. I prepared
the attached patch to fix this issue (note that the patch is against
0.9.5.  Since the portmidi driver sources are moved in the trunk, you
will have to do the fixes manually there).

Basically the "#include <unistd.h>" directive has been removed from a
bunch of headers (e.g. <string> <iostream> and some STL headers) and
now we have to add this directive directly if we want to call
functions like sleep() close() write() etc.

Note that I tested this only on Linux/gcc. I am not sure whether there
is a unistd.h on other platforms.

Best,
Orcan
Attachment (hydrogen-gcc47.patch): text/x-patch, 1750 bytes
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
(Continue reading)

Sebastian Moors | 17 Jan 00:24 2012
Picon

Re: gcc-4.7 compile fix

Am 16.01.2012 23:27, schrieb Orcan Ogetbil:
> Hi all,
>
> Hydrogen-0.9.5 failed to build from source against gcc-4.7. I prepared
> the attached patch to fix this issue (note that the patch is against
> 0.9.5.  Since the portmidi driver sources are moved in the trunk, you
> will have to do the fixes manually there).
>
> Basically the "#include<unistd.h>" directive has been removed from a
> bunch of headers (e.g.<string>  <iostream>  and some STL headers) and
> now we have to add this directive directly if we want to call
> functions like sleep() close() write() etc.
>
> Note that I tested this only on Linux/gcc. I am not sure whether there
> is a unistd.h on other platforms.
>
> Best,
> Orcan
Hi Orcan,

thanks for your patch! I've applied it to the 0.9.5 branch now, but i 
will be doing some
more tests on OS X tomorrow before i'm going to apply it to 0.9.6.
Regards,
Sebastian

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
(Continue reading)


Gmane