Re: gnome-program.h: defining variables in headers



On Wed, 5 Dec 2001, ERDI Gergo wrote:

> there are these two gemstones in gnome-program.h:
> 
> #ifndef program_invocation_short_name
> char *program_invocation_short_name;
> #endif
> #ifndef program_invocation_name
> char *program_invocation_name;
> #endif
> 
> This is so broken I hope I won't even have to explain why.

There was much disagreement on #gnome on what to do.

I propose killing all of this, it is horribly some-version-of-glibc
dependant. FOr other systems, you can't optionally define the variables.
wrong wrong WRONG! So let's provide (properly namespaced) public accessor
functions instead, and initialize our own private invocation_name
variables inside gnome_program_preinit. This could be trivially done.

However, then Glynn proposed just removing them completely and relying on
the maintainers of other packages to use something else instead. 

Let me reiterate: we can't just 'let things be' with this. If you have
more than one source files in your project that include gnome-program.h (a
likely scenario), program_invocation_name will be defined multiple times
--> linking is not possible.

-- 
   .--= ULLA! =---------------------.   `We are not here to give users what
   \     http://cactus.rulez.org     \   they want'  -- RMS, at GUADEC 2001
    `---= cactus cactus rulez org =---'
Anyuuuuuuu! Ne inditsd el a centrifufufufufufufufufufufu




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]