[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gnulib] Symbol collision
From: |
Bruno Haible |
Subject: |
Re: [Bug-gnulib] Symbol collision |
Date: |
Mon, 14 Jul 2003 21:26:24 +0200 |
User-agent: |
KMail/1.5 |
Simon Josefsson wrote:
> I do have access to a cygwin system, does that count as Woe32?
In this case (regarding the behaviour of linker and dynamic linker), yes.
> Such as, from gnulib/lib/error.c:
>
> /* The calling program should define program_name and set it to the
> name of the executing program. */
> extern char *program_name;
This is not a problem, it's a variable _declaration_, not _definition_.
> This also make it problematic to use error.c in a library (or anything
> that uses error.c, such as xalloc, alloca, etc, or anything that uses
> xalloc, alloca, etc, and so on). I.e.: should my library define
> program_name?
No, it's the main program (or at most 1 library) which should define
the variable 'program_name'. The problems with error.c are
error_print_progname, error_message_count, error_one_per_line, ...
Bruno