cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: VMS fixes needed to allow building

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

On Wed, Mar 13, 2013, Tom Grace <Thomas.Grace_at_amdocs.com> 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() ?

-- 
-=[Yang]=-
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2013-03-13