From: <and...@us...> - 2008-09-10 09:06:06
|
Revision: 8765 http://plplot.svn.sourceforge.net/plplot/?rev=8765&view=rev Author: andrewross Date: 2008-09-10 09:06:14 +0000 (Wed, 10 Sep 2008) Log Message: ----------- Add GCC visibilty pragma in around plplot_octave functions to ensure they have default visibility. Ensures that octave works with -fvisibility=hidden. Should be a nop on other systems or where -fvisibility is not used. Modified Paths: -------------- trunk/bindings/octave/matwrap/wrap_octave.pl Modified: trunk/bindings/octave/matwrap/wrap_octave.pl =================================================================== --- trunk/bindings/octave/matwrap/wrap_octave.pl 2008-09-10 08:59:31 UTC (rev 8764) +++ trunk/bindings/octave/matwrap/wrap_octave.pl 2008-09-10 09:06:14 UTC (rev 8765) @@ -95,6 +95,13 @@ sub finish { print OUTFILE qq[ +// The following section needs to be default visibility. The DEFUN_DLD macro +// defines several functions so we can't easily individually tag them, and so +// we resort to using the GGC pragma instead. What happens on Windows? +#if defined(__GNUC__) && __GNUC__ > 3 +#pragma GCC visibility push(default) +#endif + // // The main dispatch function. This function calls the appropriate wrapper // based on the value of the first argument. @@ -116,6 +123,10 @@ } } +#if defined(__GNUC__) && __GNUC__ > 3 +#pragma GCC visibility pop +#endif + "; close(OUTFILE); # Done with this file. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |