cURL / Mailing Lists / curl-library / Single Mail


Re: vms_show hack explained

From: John E. Malmberg <>
Date: Fri, 15 Mar 2013 21:14:10 -0500

On 3/14/2013 1:23 PM, Yang Tse wrote:
> On Thu, Mar 14, 2013, John E. Malmberg <> wrote:
> It is more palatable for me the inclusion of source code functions
> into lib/setup-vms.h as long as the following are all met:
> 1) curlbuild.h is just a copy of curlbuild.h.dist or it is a true
> equivalent of a properly generated one based on The
> resulting one shall be auto contained and can not depend on HAVE_*
> macros. Notice that this file is used when building the library and
> also when using it already installed with no config.h around.

The daily tarball that I used earlier did not have a curlbuild.h file in
it, so I had to generate it.

In reading the file several of the values in the file
depended on what had previously been generated in the curl_config.h file
and I did not see any cases where curlbuild.h was used with out
curl_config.h being include prior to it.

For implementing the procedure, I then had the
choice of:

   1. Having the curlbuild.h use definitions from curl_config.h

   2. Duplicate some complex code from the procedure.

   3. Read or parse the curl_config.h file

As it is, the values for VMS in curlbuild.h in the March 14 daily
tarball are incorrect for some !__VAX VMS releases. For !__VAX the size
of off_t is only 32 bits for older versions of VMS and is only 64 bits
on more recent versions and requires that support to be requested at
compile time.

I had changed the VMS build procedure to default to asking for that
support on non-VAX, but just because it asked for it, does not guarantee
that it will get it.

The procedure to generate the curl_config.h does set the off_t size
based on what the platform it is run on actually supports.

> 2) Generated or hand-crafted config.h does not include a single header file.

The is a generic procedure shared by multiple projects.
While it knows how to generate most of what is in the config.h file, it
does not know how to get everything correct.

So it includes a config_vms.h file that is built by a project specific
command file that knows what was not able to calculate for it.

For example, the reads the configure script to determine
how to set some symbols that it did not find in the header files. It
takes the first assignment it finds, which is not the default that we
want for many of the settings.

So a command procedure is run first based on the build options selected
and it generates the config_vms.h that combined with the auto-generated
config.h is correct. That procedure also renames the config.h file to

> 3) No change is done to the placement where header files curlbuild.h
> and setup-vms.h are included.

Some things need to be in the order that I set them or the correct
wrapper will not be used. I will try to check the latest daily build
this weekend.

> 4) Any special VMS need in other source files protected with 'ifdef
> __VMS' guards instead of 'ifdef HAVE_*' ones. Although with what you
> have in mind it seems near none will remain in some future.

That is the plan.

>>> For now, we should focus on making sure that 7.30.0 will build out of the
>>> box.

I would like to see that.

Personal Opinion Only

List admin:
Received on 2013-03-16