[Xfce4-commits] <xfce4-dev-tools:master> Don't set the default visibility in XDT_FEATURE_VISIBILITY.

Brian J. Tarricone brian at tarricone.org
Thu Oct 22 23:16:19 CEST 2009

On Thu, Oct 22, 2009 at 04:50, Nick Schermer <nickschermer at gmail.com> wrote:
> 2009/10/22 Nick Schermer <nickschermer at gmail.com>:
>> 2009/10/22 Brian J. Tarricone <brian at tarricone.org>:
>>> Nick, revert this please.  If you don't want to use visibility properly
>>> in your module, then don't use the macro.  Don't make it useless for
>>> everyone else.
>> Define useless. You think this changes anything in, for example, xfconf?
> Let's put in another way, it is better to set the default visibility
> level for the library you compile if you want to use this. The global
> visibility makes this unusable for thunar (break modules), exo (gio
> module and private hal library), 4ui (private kbd lib) and the panel
> (all plugins). So that leaves use with xfconf and 4util.

By using that autoconf macro you are saying "I want to use the
compiler's visibility features to only export public API from the
library."  Obviously, if you are going to do this, you must define
what's public.  If you are not going to take the time to define what's
public, then you should not use this macro.

Furthermore, with your change, there is no straightforward way of
setting the default visibility to hidden if that's what you want.
Well, ok, you can check the value of $have_gnuc_visibility in
configure.ac, but that's retarded.

I would consider (one of) a couple changes from my original macro:

1.  Allowing the macro to take an argument specifying the default
visibility (defaults to "hidden" if not specified).
2.  Allowing the macro to take an argument specifying a variable to
stuff the visibility argument in, so you can add it (or not add it) to
different targets in the module (assuming there's more than one).  If
not specified, it defaults to putting the vis parameter in CFLAGS.

Regardless: revert your change.  And in the future, at least do me the
common courtesy of discussing changes to my code in a module I
maintain before checking things in.  Jannis convinced me we can all
behave properly without having tighter commit permissions on git;
please don't prove him wrong.


More information about the Xfce4-dev mailing list