cURL / Mailing Lists / curl-library / Single Mail


Re: VMS fixes needed to allow building

From: Tom Grace <>
Date: Wed, 13 Mar 2013 00:17:59 +0000

>From: Yang Tse <<>>
>Date: Wed, 13 Mar 2013 00:30:11 +0100

>On Wed, Mar 13, 2013, Tom Grace <> wrote:

>>>Ok, I understand that declaring it with 'globaldef' instead of
>>>'static' in tool_main.c makes it a single instance variabe that is
>>>'visible' and can be modified from any other source file which happens
>>>to include tool_vms.h with its forward-declaration. Is this correct?
>> Oh yea,, a more portable version of globaldef is to just say
>> the following placed Outside the function, But the globaldef
>> could be placed anywhere.
>> int vms_show; /* placed outside the function */
>> The above will also work as the edit for tool_main.c

>Ideally we would want that definition to be auto-initialized by the
>compiler to 0. That was the reason for declaring it static. Would it
>be possible to achieve this somehow without having to initialize it to
>0 at the beginning of function main() ?

DECC implementation of extern has always jittery to me,

But at least its compliant now. Plus there are compile

time switches eehh.

An extern submits a psect and a global reference to

the linker to point to it.

Using "extern int vms_show = 0" also creates

a globaldef.

The use of the extern by itself does declare a psect but

does not declare a globalsymbol.

It does declare a globalref. But the linker needs

one and only one globaldef or there is an error.

Thus two modules

Extern int vms_show;

Extern int vms_show;

Does not work for the linker as these are two refs without a def.

But change one of em with one of the following

Extern int vms_show=0;


Globaldef int vms_show;

And your good.

This message and the information contained herein is proprietary and confidential and subject to the Amdocs policy statement,
you may review at

List admin:
Received on 2013-03-13