Re: gettext usage in libraries
- From: Alex Larsson <alexl redhat com>
- To: Dick Porter <dick ximian com>
- Cc: Havoc Pennington <hp redhat com>, Gediminas Paulauskas <menesis delfi lt>, <gnome-2-0-list gnome org>, <gnome-hackers gnome org>
- Subject: Re: gettext usage in libraries
- Date: Tue, 27 Nov 2001 10:13:34 -0500 (EST)
On Tue, 27 Nov 2001, Dick Porter wrote:
> On Tue, Nov 27, 2001 at 09:50:39AM -0500, Havoc Pennington wrote:
> > Gediminas Paulauskas <menesis delfi lt> writes:
> > > The problem is, that both things need to be called only once. So, add
> > > them to library initialize function (do they have one, how do I find
> > > them?), or, make the library use custom
> > >
> > > char* libfoo_gettext (char* str) {
> > > static int initialized = FALSE;
> > > if (!initialized) {
> > > bind......
> > >
> > > What is recomended, best way to do such things?
> >
> > I think it depends on the library; if a lib already has an init
> > function, that's the obvious place to do this stuff, if it doesn't,
> > then something like libfoo_gettext makes sense.
>
> Do all interesting compilers support the equivalent of gcc's constructor
> function attribute? And if so, isn't this something that can be abstracted
> by glib?
No. That is higly dependant on the linker and the ELF object format.
/ Alex
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]