bug-gnulib
[Top][All Lists]
Advanced

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

Re: OpenVMS todo list:


From: John E. Malmberg
Subject: Re: OpenVMS todo list:
Date: Mon, 3 Jul 2017 19:58:52 -0500
User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0

On 7/3/2017 7:07 PM, Bruno Haible wrote:
Hello John,

* Config.h
    OpenVMS needs __UNIX_PUTC macro defined for putc_unlocked
    and friends to be visible.

The right place to do this (for a macro that affects multiple
gnulib modules) is the 'extensions' module.

* lib/passfd.c

    This needs "_X_OPEN_SOURCE_EXTENDED" for the XPG4 V2 features
    in the code to compile on OpenVMS.  Specifically the "msg_control"
    and "msg_controllen" members of struct msghdr.

    This would need to be defined before any system header files are
    included.

This too is best done in the 'extensions' module.

    For the OpenVMS header files, enabling _X_OPEN_SOURCE_EXTENDED
    causes macros and symbols not defined by the applicable
    standard to be hidden from the compiler.  There currently
    is no way to make them visible and have XPG4 V2 features enabled.

?? I don't understand the last sentence. What features get disabled
when you define _X_OPEN_SOURCE_EXTENDED?

Anything that is not specified in XPG4 V2. XPG4 V2 compliance requires that several extensions be disabled by default.

XPG4 V2 compliance allows extensions to be enabled. The OpenVMS supplied header files do not provide a way to enable these extensions when XPG4 V2 is requested, which is an odd omission.

All BSD extensions are disabled.

struct tm no longer has: tm_gmtoff tm_zone

The u_char, u_short, u_long typedefs are gone from types.h

/* And also makes these STDIO macros not defined */
#define _IOREAD  0x01
#define _IOWRT   0x02
#define _IOMYBUF 0x08
#define _IOSTRG  0x40
#define _IORW    0x80

The bcmp,bcopy,bzero,ffs, strcasecmp, strncasecmp, index, and rindex are only in <strings.h> not <string.h> and gnulib is not including string.h.

The setenv, unsetenv, strtoll prototypes are gone.

It exposes a bug in the OpenVMS if.h header file is missing an include of <times.h> because that is now the only place "timeval" is supplied.

It exposes a bug where the OpenVMS iconv header file is not testing the
_XOPEN_SOURCE macro properly.

And I am not sure that I have a complete list of what is disabled. It just got too painful trying to get the other gnulib modules to build in strict XPG4 V2 mode.


In this case, you need to arrange for REPLACE_STRTOUMAX to be 1.
But please limit these changes to OpenVMS, because it makes debugging
with gdb simpler when the 'rpl_' prefix is omitted when possible.

The reverse is the case with VMS because the compiler adds prefixes to all C library known built-in routines/symbols. There are supposed to ways to control that, I have not been able to get them to work reliably.

* The configure test for the real directory for OpenVMS system
    supplied header file fails because they are not in a real directory.
    They are in a library file.  If OpenVMS does not find a header
    file in supplied paths header files or in the source, it junks
    the directory portion the the header file path, and just looks
    up the filename in the text library.

    I export some symbols to cause Configure on VMS to skip the test.

    export gl_cv_next_errno_h="<vms_fake_path/errno.h>"

You need to find a way to make the
   #include "/usr/include/foo.h"
or
   #include_next "foo.h"
idiom to work, one way or the other. Gnulib relies heavily on it.

The #include "vms_fake_path/foo.h" is the way to make sure that the system supplied foo.h header is used as long as "vms_fake_path" does not exist.

The include_next is not available.

However I could have headers /usr/include as we get libraries ported.

So what I need is for configure to look in /usr/include or the Unix expected path first and if the header is not found to use the "vms_fake_path" as the path.

As far as doing things non-standard on OpenVMS:

There are currently an estimated less than 5 OpenVMS developers that are using the supplied configure scripts and related makefiles for building.

The rest are rolling their own makefiles and manually creating config.h files, and manually editing files until they get something building.

I am trying to get things so that the OpenVMS ports have less manual steps in them.

Regards,
-John



reply via email to

[Prev in Thread] Current Thread [Next in Thread]