[fpc-devel] Bug#789091: fpc: ncurses/form unit declares internal libform objects

Michael Van Canneyt michael at freepascal.org
Thu Jun 18 08:03:03 CEST 2015



On Wed, 17 Jun 2015, peter green wrote:

> On 17/06/15 19:06, Sven Joachim wrote:
>> Source: fpc
>> Version: 2.6.4+dfsg-6
>> 
>> The file fpcsrc/packages/ncurses/src/form.pp declares the objects
>> _nc_Default_Form and _nc_Default_Field:
>> 
>> ,----
>> | (* Default objects  *)
>> | {$ifndef darwin}
>> |   _nc_Default_Form : PFORM;cvar;external;
>> |   _nc_Default_Field : PFIELD;cvar;external;
>> | {$else darwin}
>> |   _nc_Default_Form : PFORM external libform name '_nc_Default_Form';
>> |   _nc_Default_Field : PFIELD external libform name '_nc_Default_Field';
>> | {$endif darwin}
>> `----
>> 
>> There does not seem to be a good reason to do so, those symbols are not
>> part of the ncurses form API and will go away from the shared form
>> library soon, see #788610.
>>    Apparently those two symbols are still in the libform.a library, so as
>> long as fpc does not support dynamic linking (#472304) there should not
>> be a problem,
> This statement is incorrect, fpc doesn't dynamically link it's own run time 
> library but it most certainly can and does dynamically link C libraries.
>
>>   but please remove these useless declarations and ask
>> upstream to do the same.
>> 
> Freepascal upstream: any comments on this?

If they are declared, it means they were in the public headers at the time of translation.
If they disappear from the library, we'll remove them from the sources.

Note that they are declared as c variables. 
It means that the symbol isn't actually used in linking until someone writes code that actually uses the variable.

Michael.



More information about the fpc-devel mailing list