patch for alloca on xstreamos/illumos

2015-01-23 Thread Gabriele Bulfon
Hi,
going on building, I found a couple of vcl sources using alloca, requiring an 
include on solaris/illumos.
So I had to patch both toolkit/source/awt/vclxgraphics.cxx and 
toolkit/source/awt/vclxfont.cxx to add this:
#ifdef __sun__
#include
#endif
and now it goes on ;)
Gabriele.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: patch for alloca on xstreamos/illumos

2015-01-23 Thread Michael Stahl
On 23.01.2015 10:01, Gabriele Bulfon wrote:
 Hi,
 
 going on building, I found a couple of vcl sources using alloca,
 requiring an include on solaris/illumos.
 So I had to patch both toolkit/source/awt/vclxgraphics.cxx and
 toolkit/source/awt/vclxfont.cxx to add this:
 
 #ifdef __sun__
 #include alloca.h
 #endif
 
 and now it goes on ;)

calling alloca() requires some platform dependent headers so we have the
wrapper sal/alloca.h that will include these; this one must be
included everywhere alloca() is used to avoid adding lots of #ifdefs
everywhere.

commit 91567c26f436ccce0fb60ad6a9671f046a4a68e7 should fix that on
master, backport for 4.4 is at https://gerrit.libreoffice.org/14125


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: patch for alloca on xstreamos/illumos

2015-01-23 Thread Richard PALO
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Le 23/01/15 10:01, Gabriele Bulfon a écrit :
 Hi,
 
 going on building, I found a couple of vcl sources using alloca, requiring 
 an include on solaris/illumos.
 So I had to patch both toolkit/source/awt/vclxgraphics.cxx and 
 toolkit/source/awt/vclxfont.cxx to add this:
 
 #ifdef __sun__
 #include alloca.h
 #endif
 
 and now it goes on ;)
 
 Gabriele.
 

==
 richard@omnis:/home/richard/src/libreoffice$ git grep  'alloca.h'
 include/sal/alloca.h:#include alloca.h

If you look there you see a guard for solaris... 

Therefore, perhaps consider simply including sal/alloca.h
and submit a patch if not already in master.

Hopefully there are not too many of these left...


-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJUwhu4AAoJECAB22fHtp27wrAH/1efW9CF4RLXdw/HdDuENzj5
spgnZ7nzCdBhojiFDHlPYW0CRfjgrX7BKcNTRiFGQWGgQeXfAscGtepl5+Xr4kLa
v35uKh3YSStVOTCaXMEoxhrA4/WF1XBzcwAv9xhGveWNerw+4n4rMLBUkmWgCZmw
8KrDTUQAsAYq+nKUmNxlIb5vmIRfUli1imzg/M7SuRKoNxhQj9WPIA+6fKS7fRdM
O+rkC7mBc084GfKdAQPnDnmE7SmTvhi6hMAOvZsxAYcuJsY4vGzl4WpOifNhIXon
OoGCD4xxkz7saCtGedB4A0UijBDpBoDRbugeMg7UIhcMDGbU1fqI0VSVzpkZa7U=
=PzG3
-END PGP SIGNATURE-
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice