Re: [xml] building libxml 2.4.6 under OpenVMS



John A Fotheringham wrote:

       These messages also occur for "read" and "write" when
       compiling trio.c

These are supposed to be in <unistd.h>. Does the VMS build define
TRIO_PLATFORM_UNIX? If not, we need to add this header file for
VMS explictly (if <unistd.h> doesn't work, try <unixio.h> instead).

     - uninitialised variables.  Not usually a problem.  You can
       solve this by editing the code to initialise the variables
       affected
[...]
- I changed all dummy declarations in trio.c to be

     va_list dummy = NULL;

   to prevent compiler whinge in TRIO.C about uninitialised variables

This is unfortunately not portable, and will fail on at least one
configuration of a 64-bit Alpha machine (I forgot whether it was
Tru64 or Linux, and which compiler was used), where va_list is a
struct rather than a pointer.

The only correct way of initializing a va_list according to the
standard is to use va_start(). However, this cannot be used in the
above code, because the function does not have a variadic parameter
(the ...), which some compilers requires to use va_start(). They
will then terminate with an error.

I have tried many different ways to make this code fully portable,
but the best I have achieved is to leave the variable uninitialized
and live with a compiler warning. If anybody has any suggestions,
I will welcome them.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]