Operating System - OpenVMS
1752756 Members
4740 Online
108789 Solutions
New Discussion

Bug in Alpha VMS C RTL for V8.4

 
Berryman
Occasional Contributor

Bug in Alpha VMS C RTL for V8.4

The C RTL for Alpha VMS V8.4 is not capable of returning a unix-formatted result to the getcwd call.  The following is a simple reproducer:

 

$ type sys$login:t.c

#include <unistd>
#include <string>
#include <errno>
#include <stdio>

int main()
{
        char ovms[4000];
        char unix[4000];
        char *result;

        errno = 0;
        result = getcwd(ovms, 4000, 1);
        printf("vms = %d - %s\terrno = %d\n", result ? strlen(result) : 0, ovms, errno);
        errno = 0;
        result = getcwd(unix, 4000, 0);
        printf("unix = %d - %s\terrno = %d\n", result ? strlen(result) : 0, unix, errno);
}

 

$ set default freeware:[freeware.freetds-0_91]

$ run sys$login:t

vms = 32 - FREEWARE:[FREEWARE.FREETDS-0_91]     errno = 0
unix = 31 - /FREEWARE/FREEWARE/FREETDS-0_91     errno = 0
$

$ set default [-.freetds-0^.82]

$ run sys$login:t

vms = 33 - FREEWARE:[FREEWARE.FREETDS-0^.82]    errno = 0
unix = 0 -      errno = 34
$

 

This error does not occur on Integrity systems, only on Alpha.  It is still present in the recently released ACRTL patch.

1 REPLY 1
Berryman
Occasional Contributor

Re: Bug in Alpha VMS C RTL for V8.4

My mistake.  I just realized DECC$EFS_CHARSET was not defined.